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
cd9f833ebb40d94ebb642b911cf4ad7f8467341b
cff12f1fea3106d00cdc4755451dea24ca311211
/src/main/java/WarlordEmblem/cards/DeathKnight/WrathOfSindragosa.java
633888fd805a9d7f6dd1130ffbe6d2d24409751e
[]
no_license
Rita-Bernstein/Warlord-Emblem
2cb637cd805444dbe44c91048136d6373b55c9ae
ad4242b90ddb21d7324086b8afc291bcbb1a0f27
refs/heads/master
2021-07-17T05:57:07.768569
2021-01-20T02:43:49
2021-01-20T02:43:49
231,231,999
2
2
null
2020-05-02T00:25:58
2020-01-01T15:24:13
Java
UTF-8
Java
false
false
2,840
java
package WarlordEmblem.cards.DeathKnight; import WarlordEmblem.WarlordEmblem; import WarlordEmblem.patches.CardColorEnum; import WarlordEmblem.powers.WrathOfSindragosaPower; import basemod.BaseMod; import basemod.helpers.BaseModCardTags; import com.badlogic.gdx.graphics.Color; import com.megacrit.cardcrawl.actions.animations.VFXAction; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; import com.megacrit.cardcrawl.actions.utility.SFXAction; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.core.Settings; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.localization.CardStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.powers.ConfusionPower; import com.megacrit.cardcrawl.powers.VulnerablePower; import com.megacrit.cardcrawl.powers.WeakPower; import com.megacrit.cardcrawl.vfx.BorderLongFlashEffect; import com.megacrit.cardcrawl.vfx.combat.ShockWaveEffect; import com.megacrit.cardcrawl.vfx.combat.VerticalAuraEffect; public class WrathOfSindragosa extends AbstractDKCard { public static final String ID = WarlordEmblem.makeID("WrathOfSindragosa"); private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); public static final String NAME = cardStrings.NAME; public static final String IMG = WarlordEmblem.assetPath("img/cards/DeathKnight/wrath_of_sindragosa.png"); private static final int COST = 1; public static final String DESCRIPTION = cardStrings.DESCRIPTION; public static final CardType TYPE = CardType.SKILL; private static final CardColor COLOR = CardColorEnum.DeathKnight_LIME; private static final CardRarity RARITY = CardRarity.UNCOMMON; private static final CardTarget TARGET = CardTarget.SELF; public WrathOfSindragosa() { super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET); this.baseMagicNumber = 1; this.magicNumber = this.baseMagicNumber; } public void use(AbstractPlayer p, AbstractMonster m) { addToBot(new SFXAction("RAGE")); addToBot(new VFXAction(p, new ShockWaveEffect(p.hb.cX, p.hb.cY, Settings.RED_TEXT_COLOR, ShockWaveEffect.ShockWaveType.ADDITIVE), 1.2F)); AbstractDungeon.actionManager.addToBottom( new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new WrathOfSindragosaPower(AbstractDungeon.player, this.magicNumber), this.magicNumber, true)); } public AbstractCard makeCopy() { return new WrathOfSindragosa(); } public void upgrade() { if (!this.upgraded) { upgradeName(); updateCost(-1); } } }
[ "13536709069@163.com" ]
13536709069@163.com
39579bf58fdcee5d2681d21ad1c8bc879c1b1e20
49546d8dface7c6f55e2658d6c5286bbbbfb153a
/com/google/cloud/storage/SignatureInfo$Builder.java
f6c428e3c1188dc78cff5b147fb96e6c90bf174e
[ "MIT" ]
permissive
XeonLyfe/Backdoored-1.7-Deobf-Source-Leak
257901da437959bbdb976025e1ff1057f98c49f1
942bb61216fbb47f7909372d5c733e13d103e0ed
refs/heads/master
2022-03-18T17:09:16.301479
2019-11-18T01:42:56
2019-11-18T01:42:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,454
java
package com.google.cloud.storage; import com.google.common.base.Preconditions; import java.net.URI; import java.util.HashMap; import java.util.Map; public final class SignatureInfo$Builder { private final HttpMethod httpVerb; private String contentMd5; private String contentType; private final long expiration; private Map canonicalizedExtensionHeaders; private final URI canonicalizedResource; private Storage$SignUrlOption$SignatureVersion signatureVersion; private String accountEmail; private long timestamp; public SignatureInfo$Builder(HttpMethod httpVerb, long expiration, URI canonicalizedResource) { this.httpVerb = httpVerb; this.expiration = expiration; this.canonicalizedResource = canonicalizedResource; } public SignatureInfo$Builder(SignatureInfo signatureInfo) { this.httpVerb = SignatureInfo.access$900(signatureInfo); this.contentMd5 = SignatureInfo.access$1000(signatureInfo); this.contentType = SignatureInfo.access$1100(signatureInfo); this.expiration = SignatureInfo.access$1200(signatureInfo); this.canonicalizedExtensionHeaders = SignatureInfo.access$1300(signatureInfo); this.canonicalizedResource = SignatureInfo.access$1400(signatureInfo); this.signatureVersion = SignatureInfo.access$1500(signatureInfo); this.accountEmail = SignatureInfo.access$1600(signatureInfo); this.timestamp = SignatureInfo.access$1700(signatureInfo); } public SignatureInfo$Builder setContentMd5(String contentMd5) { this.contentMd5 = contentMd5; return this; } public SignatureInfo$Builder setContentType(String contentType) { this.contentType = contentType; return this; } public SignatureInfo$Builder setCanonicalizedExtensionHeaders(Map canonicalizedExtensionHeaders) { this.canonicalizedExtensionHeaders = canonicalizedExtensionHeaders; return this; } public SignatureInfo$Builder setSignatureVersion(Storage$SignUrlOption$SignatureVersion signatureVersion) { this.signatureVersion = signatureVersion; return this; } public SignatureInfo$Builder setAccountEmail(String accountEmail) { this.accountEmail = accountEmail; return this; } public SignatureInfo$Builder setTimestamp(long timestamp) { this.timestamp = timestamp; return this; } public SignatureInfo build() { Preconditions.checkArgument(this.httpVerb != null, "Required HTTP method"); Preconditions.checkArgument(this.canonicalizedResource != null, "Required canonicalized resource"); Preconditions.checkArgument(this.expiration >= 0L, "Expiration must be greater than or equal to zero"); if (Storage$SignUrlOption$SignatureVersion.V4.equals(this.signatureVersion)) { Preconditions.checkArgument(this.accountEmail != null, "Account email required to use V4 signing"); Preconditions.checkArgument(this.timestamp > 0L, "Timestamp required to use V4 signing"); Preconditions.checkArgument(this.expiration <= 604800L, "Expiration can't be longer than 7 days to use V4 signing"); } if (this.canonicalizedExtensionHeaders == null) { this.canonicalizedExtensionHeaders = new HashMap(); } return new SignatureInfo(this, (SignatureInfo$1)null); } // $FF: synthetic method static HttpMethod access$000(SignatureInfo$Builder x0) { return x0.httpVerb; } // $FF: synthetic method static String access$100(SignatureInfo$Builder x0) { return x0.contentMd5; } // $FF: synthetic method static String access$200(SignatureInfo$Builder x0) { return x0.contentType; } // $FF: synthetic method static long access$300(SignatureInfo$Builder x0) { return x0.expiration; } // $FF: synthetic method static URI access$400(SignatureInfo$Builder x0) { return x0.canonicalizedResource; } // $FF: synthetic method static Storage$SignUrlOption$SignatureVersion access$500(SignatureInfo$Builder x0) { return x0.signatureVersion; } // $FF: synthetic method static String access$600(SignatureInfo$Builder x0) { return x0.accountEmail; } // $FF: synthetic method static long access$700(SignatureInfo$Builder x0) { return x0.timestamp; } // $FF: synthetic method static Map access$800(SignatureInfo$Builder x0) { return x0.canonicalizedExtensionHeaders; } }
[ "57571957+RIPBackdoored@users.noreply.github.com" ]
57571957+RIPBackdoored@users.noreply.github.com
274b4081e33a7dffcd2e7f71e084796d8afc107e
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.3.jar/classes.jar/c/t/m/g/cm.java
9dbb56c20914695e06c8160f46e49dc18cd377ae
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
265
java
package c.t.m.g; public final class cm extends UnsatisfiedLinkError {} /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.3.jar\classes.jar * Qualified Name: c.t.m.g.cm * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
33c7a7e63287b8c6f1ef067a3b2897a21e7a2b31
74d5fcd46a4d13492412b5487bd1aca58692793f
/app/src/main/java/com/champs21/sciencerocks/models/Data.java
f38b4da1f4da80373134a192fb5d6246370b35d2
[]
no_license
muhib27/SR
a8da28d5add7d6b35e78337e7cf80065ed24c642
82137a03ffab6b700118a5171db92d7852f8490a
refs/heads/master
2020-09-15T23:17:01.084802
2016-09-20T09:39:49
2016-09-20T09:39:49
223,580,489
0
0
null
null
null
null
UTF-8
Java
false
false
4,852
java
package com.champs21.sciencerocks.models; /** * Created by BLACK HAT on 25-Apr-16. */ import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; public class Data { @SerializedName("topics") @Expose private List<Topic> topics = new ArrayList<Topic>(); @SerializedName("level") @Expose private List<Level> level = new ArrayList<Level>(); @SerializedName("questions") @Expose private List<Question> questions = new ArrayList<Question>(); @SerializedName("total") @Expose private String total; @SerializedName("has_next") @Expose private Boolean hasNext; @SerializedName("dailydose") @Expose private List<Dailydose> dailydose = new ArrayList<Dailydose>(); @SerializedName("asktheanchor") @Expose private List<Asktheanchor> asktheanchor = new ArrayList<Asktheanchor>(); @SerializedName("episodes") @Expose private List<Episode> episodes = new ArrayList<Episode>(); @SerializedName("score") @Expose private String score; @SerializedName("total_mark") @Expose private String totalMark; @SerializedName("total_question") @Expose private String totalQuestion; @SerializedName("list") @Expose private List<LeaderList> leaderList = new ArrayList<LeaderList>(); /** * * @return * The topics */ public List<Topic> getTopics() { return topics; } /** * * @param topics * The topics */ public void setTopics(List<Topic> topics) { this.topics = topics; } /** * * @return * The level */ public List<Level> getLevel() { return level; } /** * * @param level * The level */ public void setLevel(List<Level> level) { this.level = level; } /** * * @return * The questions */ public List<Question> getQuestions() { return questions; } /** * * @param questions * The questions */ public void setQuestions(List<Question> questions) { this.questions = questions; } /** * * @return * The total */ public String getTotal() { return total; } /** * * @param total * The total */ public void setTotal(String total) { this.total = total; } /** * * @return * The hasNext */ public Boolean getHasNext() { return hasNext; } /** * * @param hasNext * The has_next */ public void setHasNext(Boolean hasNext) { this.hasNext = hasNext; } /** * * @return * The dailydose */ public List<Dailydose> getDailydose() { return dailydose; } /** * * @param dailydose * The dailydose */ public void setDailydose(List<Dailydose> dailydose) { this.dailydose = dailydose; } /** * * @return * The asktheanchor */ public List<Asktheanchor> getAsktheanchor() { return asktheanchor; } /** * * @param asktheanchor * The asktheanchor */ public void setAsktheanchor(List<Asktheanchor> asktheanchor) { this.asktheanchor = asktheanchor; } /** * * @return * The episodes */ public List<Episode> getEpisodes() { return episodes; } /** * * @param episodes * The episodes */ public void setEpisodes(List<Episode> episodes) { this.episodes = episodes; } /** * * @return * The score */ public String getScore() { return score; } /** * * @param score * The score */ public void setScore(String score) { this.score = score; } /** * * @return * The totalMark */ public String getTotalMark() { return totalMark; } /** * * @param totalMark * The total_mark */ public void setTotalMark(String totalMark) { this.totalMark = totalMark; } /** * * @return * The totalQuestion */ public String getTotalQuestion() { return totalQuestion; } /** * * @param totalQuestion * The total_question */ public void setTotalQuestion(String totalQuestion) { this.totalQuestion = totalQuestion; } /** * * @return * The list */ public java.util.List<LeaderList> getLeaderList() { return leaderList; } /** * * @param list * The list */ public void setLeaderList(List<LeaderList> list) { this.leaderList = list; } }
[ "ovioviovi@gmail.com" ]
ovioviovi@gmail.com
70e87fc28dae4bf0b03e2f1bda2666323facbc1a
38c43c7f37fd5205feb0fa6e23ba47e11879db18
/mall-auth-server/src/main/java/daily/boot/gulimall/authserver/AuthServerApplication.java
23ce9d490b35a197531d3eab0d21459d52cb89f3
[]
no_license
amykiki/gulimall
2e8be360302dee0a408d0a89e94e65003b1b66f0
c3f1b6a505360c669c6dcc9867b6b0de4d3c9f32
refs/heads/main
2023-02-21T08:42:58.239680
2021-01-28T13:07:24
2021-01-28T13:07:24
303,411,164
0
1
null
null
null
null
UTF-8
Java
false
false
2,251
java
package daily.boot.gulimall.authserver; import com.fasterxml.jackson.databind.ObjectMapper; import daily.boot.gulimall.service.api.feign.MemberFeignService; import daily.boot.gulimall.service.api.feign.ThirdPartyFeignService; import daily.boot.unified.dispose.annotation.EnableGlobalDispose; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.i18n.SessionLocaleResolver; import java.util.Locale; @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients(clients = {ThirdPartyFeignService.class, MemberFeignService.class}) @EnableGlobalDispose @MapperScan({"daily.boot.gulimall.authserver.dao"}) public class AuthServerApplication { public static void main(String[] args) { SpringApplication.run(AuthServerApplication.class); } @Bean public LocaleResolver localeResolver() { SessionLocaleResolver localResolver=new SessionLocaleResolver(); localResolver.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); return localResolver; } @Bean //国际化信息,参考 //https://blog.codecentric.de/en/2017/08/localization-spring-security-error-messages-spring-boot/ //https://stackoverflow.com/questions/46659679/spring-boot-application-and-messagesource //https://www.jianshu.com/p/46a4355ad0a3 public MessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.addBasenames("classpath:org/springframework/security/messages"); return messageSource; } }
[ "staramy_2005@126.com" ]
staramy_2005@126.com
8bd57f9372d683d7fa00046dcb5f1d76a6a85e8b
bb2f3c0d834beb50341e9d03b3b96c24438a88ac
/milton/milton-api/src/main/java/com/bradmcevoy/http/values/AddressDataTypeList.java
595f8c0232ab4f0fa76dc1fdf2a04f463c29dc32
[ "Apache-2.0" ]
permissive
skoulouzis/lobcder
3e004d3e896fe9e600da931d8fb82c72a746c491
23bf0cc9c78f506193bb9ba9f6543e5f5597ae4d
refs/heads/dev
2022-02-22T20:56:32.472320
2022-02-08T10:07:01
2022-02-08T10:07:01
26,593,878
7
3
Apache-2.0
2022-02-08T10:07:02
2014-11-13T15:23:44
Java
UTF-8
Java
false
false
556
java
package com.bradmcevoy.http.values; import java.util.ArrayList; import java.util.Arrays; /** * Holds a list of Pair<String, String>, i.e. actually address data Type, where * object1 represents ContentType and object2 represents the version. * * @author nabil.shams */ public class AddressDataTypeList extends ArrayList<Pair<String, String>>{ public static AddressDataTypeList asList(Pair<String, String>... items) { AddressDataTypeList list = new AddressDataTypeList(); list.addAll(Arrays.asList(items)); return list; } }
[ "sS.Koulouzis@uva.nl" ]
sS.Koulouzis@uva.nl
927e0a5fd32e6651c5b57717dccaf890f245b1f5
5c699c9b7d67ca17fd4aa81d846e7f820d827022
/src/test/java/id/ac/tazkia/dosen/controller/DosenTests.java
4bba84d8b9c05aa6095c8880a9f8e7a82a4bf05b
[ "Apache-2.0" ]
permissive
jimmyrengga/aplikasi-dosen
31c81e2ba5b406081316034b83045ea8c239ae50
1aa70b94f454948befd829193b448f4b8387689d
refs/heads/master
2021-01-11T13:52:17.735594
2017-06-19T07:31:22
2017-06-19T07:31:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
775
java
package id.ac.tazkia.dosen.controller; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; public class DosenTests extends BaseSeleniumTests { private String urlListView = "/dosen/list"; private String titleListView = "Aplikasi Dosen :: Daftar Dosen"; private String urlFormView = "/dosen/form"; private String titleFormView = "Aplikasi Dosen :: Edit Data Dosen"; @Test public void testListView() throws Exception { webDriver.get(baseUrl + urlListView); assertThat(webDriver.getTitle()).isEqualTo(titleListView); } @Test public void testFormView() throws Exception { webDriver.get(baseUrl + urlFormView); assertThat(webDriver.getTitle()).isEqualTo(titleFormView); } }
[ "endy.muhardin@gmail.com" ]
endy.muhardin@gmail.com
2eb3f908c9efd0c657e3b3c6816c79c956fc5f87
71dd49676c58c4d510e78b55048255861b6b45ff
/src/com/ss/editor/ui/component/asset/tree/context/menu/action/RenameFileAction.java
2b5d090053f2b2766559d7ef5d066619ec865d2c
[ "Apache-2.0" ]
permissive
vp-byte/jME3-SpaceShift-Editor
00b797b8332616a32d2fdd8fba6d5da71e21783c
91af7f6e8fa0c5d8fe0a41bd725d924a209a97e9
refs/heads/0.9.3
2020-05-27T22:20:43.181370
2017-02-04T18:48:55
2017-02-04T18:48:55
83,591,264
4
0
null
2017-03-01T19:13:07
2017-03-01T19:13:07
null
UTF-8
Java
false
false
3,098
java
package com.ss.editor.ui.component.asset.tree.context.menu.action; import com.ss.editor.JFXApplication; import com.ss.editor.Messages; import com.ss.editor.ui.Icons; import com.ss.editor.ui.component.asset.tree.resource.ResourceElement; import com.ss.editor.ui.dialog.RenameDialog; import com.ss.editor.ui.event.FXEventManager; import com.ss.editor.ui.event.impl.RenamedFileEvent; import com.ss.editor.ui.scene.EditorFXScene; import com.ss.editor.util.EditorUtil; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import javafx.scene.control.MenuItem; import javafx.scene.image.ImageView; import rlib.util.FileUtils; import rlib.util.StringUtils; /** * The action to rename a file. * * @author JavaSaBr */ public class RenameFileAction extends MenuItem { private static final JFXApplication JFX_APPLICATION = JFXApplication.getInstance(); private static final FXEventManager FX_EVENT_MANAGER = FXEventManager.getInstance(); /** * The action element. */ private final ResourceElement element; public RenameFileAction(final ResourceElement element) { this.element = element; setText(Messages.ASSET_COMPONENT_RESOURCE_TREE_CONTEXT_MENU_RENAME_FILE); setOnAction(event -> processRename()); setGraphic(new ImageView(Icons.EDIT_16)); } /** * The process of this action. */ private void processRename() { final EditorFXScene scene = JFX_APPLICATION.getScene(); final Path file = element.getFile(); final RenameDialog renameDialog = new RenameDialog(); renameDialog.setValidator(this::checkName); renameDialog.setHandler(this::processRename); renameDialog.setInitName(FileUtils.getNameWithoutExtension(file)); renameDialog.show(scene.getWindow()); } /** * The checking of the new file name. */ private Boolean checkName(final String newFileName) { if (!FileUtils.isValidName(newFileName)) return false; final Path file = element.getFile(); final String extension = FileUtils.getExtension(file); final Path parent = file.getParent(); final Path targetFile = parent.resolve(StringUtils.isEmpty(extension) ? newFileName : newFileName + "." + extension); return !Files.exists(targetFile); } /** * The process of renaming. */ private void processRename(final String newFileName) { final Path file = element.getFile(); final String extension = FileUtils.getExtension(file); final String resultName = StringUtils.isEmpty(extension) ? newFileName : newFileName + "." + extension; final Path newFile = file.resolveSibling(resultName); try { Files.move(file, newFile); } catch (final IOException e) { EditorUtil.handleException(null, this, e); return; } final RenamedFileEvent event = new RenamedFileEvent(); event.setNewFile(newFile); event.setPrevFile(file); FX_EVENT_MANAGER.notify(event); } }
[ "javasabr@gmail.com" ]
javasabr@gmail.com
53bb1e7670871a06c21659520f4da987a841a531
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_67e5afbb797449a09c800fa5e4913294a6802a9d/AbstractPreAuthenticatedProcessingFilter/7_67e5afbb797449a09c800fa5e4913294a6802a9d_AbstractPreAuthenticatedProcessingFilter_t.java
3be66aa470622fdd9a069cab0fecc49dd8b5eb06
[]
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
7,775
java
package org.springframework.security.ui.preauth; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.providers.preauth.PreAuthenticatedAuthenticationToken; import org.springframework.security.AuthenticationManager; import org.springframework.security.Authentication; import org.springframework.security.AuthenticationException; import org.springframework.security.event.authentication.InteractiveAuthenticationSuccessEvent; import org.springframework.security.ui.AuthenticationDetailsSource; import org.springframework.security.ui.WebAuthenticationDetailsSource; import org.springframework.security.ui.AbstractProcessingFilter; import org.springframework.security.ui.SpringSecurityFilter; import org.springframework.security.context.SecurityContextHolder; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.util.Assert; /** * Base class for processing filters that handle pre-authenticated authentication requests. Subclasses must implement * the getPreAuthenticatedPrincipal() and getPreAuthenticatedCredentials() methods. * <p> * By default, the filter chain will proceed when an authentication attempt fails in order to allow other * authentication mechanisms to process the request. To reject the credentials immediately, set the * <tt>continueFilterChainOnUnsuccessfulAuthentication</tt> flag to false. The exception raised by the * <tt>AuthenticationManager</tt> will the be re-thrown. Note that this will not affect cases where the principal * returned by {@link #getPreAuthenticatedPrincipal} is null, when the chain will still proceed as normal. * * * @author Luke Taylor * @author Ruud Senden * @since 2.0 */ public abstract class AbstractPreAuthenticatedProcessingFilter extends SpringSecurityFilter implements InitializingBean, ApplicationEventPublisherAware { private ApplicationEventPublisher eventPublisher = null; private AuthenticationDetailsSource authenticationDetailsSource = new WebAuthenticationDetailsSource(); private AuthenticationManager authenticationManager = null; private boolean continueFilterChainOnUnsuccessfulAuthentication = true; /** * Check whether all required properties have been set. */ public void afterPropertiesSet() throws Exception { Assert.notNull(authenticationManager, "An AuthenticationManager must be set"); } /** * Try to authenticate a pre-authenticated user with Spring Security if the user has not yet been authenticated. */ public void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws IOException, ServletException { if (logger.isDebugEnabled()) { logger.debug("Checking secure context token: " + SecurityContextHolder.getContext().getAuthentication()); } if (SecurityContextHolder.getContext().getAuthentication() == null) { doAuthenticate(request, response); } filterChain.doFilter(request, response); } /** * Do the actual authentication for a pre-authenticated user. */ private void doAuthenticate(HttpServletRequest request, HttpServletResponse response) { Authentication authResult = null; Object principal = getPreAuthenticatedPrincipal(request); Object credentials = getPreAuthenticatedCredentials(request); if (principal == null) { if (logger.isDebugEnabled()) { logger.debug("No pre-authenticated principal found in request"); } return; } if (logger.isDebugEnabled()) { logger.debug("preAuthenticatedPrincipal = " + principal + ", trying to authenticate"); } try { PreAuthenticatedAuthenticationToken authRequest = new PreAuthenticatedAuthenticationToken(principal, credentials); authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); authResult = authenticationManager.authenticate(authRequest); successfulAuthentication(request, response, authResult); } catch (AuthenticationException failed) { unsuccessfulAuthentication(request, response, failed); if (!continueFilterChainOnUnsuccessfulAuthentication) { throw failed; } } } /** * Puts the <code>Authentication</code> instance returned by the * authentication manager into the secure context. */ protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) { if (logger.isDebugEnabled()) { logger.debug("Authentication success: " + authResult); } SecurityContextHolder.getContext().setAuthentication(authResult); // Fire event if (this.eventPublisher != null) { eventPublisher.publishEvent(new InteractiveAuthenticationSuccessEvent(authResult, this.getClass())); } } /** * Ensures the authentication object in the secure context is set to null * when authentication fails. */ protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) { SecurityContextHolder.clearContext(); if (logger.isDebugEnabled()) { logger.debug("Cleared security context due to exception", failed); } request.getSession().setAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY, failed); } /** * @param anApplicationEventPublisher * The ApplicationEventPublisher to use */ public void setApplicationEventPublisher(ApplicationEventPublisher anApplicationEventPublisher) { this.eventPublisher = anApplicationEventPublisher; } /** * @param authenticationDetailsSource * The AuthenticationDetailsSource to use */ public void setAuthenticationDetailsSource(AuthenticationDetailsSource authenticationDetailsSource) { Assert.notNull(authenticationDetailsSource, "AuthenticationDetailsSource required"); this.authenticationDetailsSource = authenticationDetailsSource; } /** * @param authenticationManager * The AuthenticationManager to use */ public void setAuthenticationManager(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; } public void setContinueFilterChainOnUnsuccessfulAuthentication(boolean shouldContinue) { continueFilterChainOnUnsuccessfulAuthentication = shouldContinue; } /** * Override to extract the principal information from the current request */ protected abstract Object getPreAuthenticatedPrincipal(HttpServletRequest request); /** * Override to extract the credentials (if applicable) from the current request. Some implementations * may return a dummy value. */ protected abstract Object getPreAuthenticatedCredentials(HttpServletRequest request); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1ac241567411292f972ca3aaa2f70268a0f3a4f1
c488ea144ac4ee8f2f9a98cd696f10abae7cc03d
/app/src/main/java/com/spark/qtz/app/me/finance/ad/AdActivity.java
10243490f5ad57a82eb4f7c3be6cc22d7f9b45d0
[]
no_license
cnamway/quantization_android
561f8d853ab8482d94a457ed9dbc6bd32e8310d4
fed44d83882e6d06df20c657d428d955dbe40806
refs/heads/master
2020-09-26T13:08:05.392575
2019-09-24T08:33:59
2019-09-24T08:33:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
package com.spark.qtz.app.me.finance.ad; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import com.alibaba.android.arouter.facade.annotation.Autowired; import com.alibaba.android.arouter.facade.annotation.Route; import com.spark.qtz.BR; import com.spark.qtz.R; import com.spark.qtz.base.ARouterPath; import com.spark.qtz.bean.TitleBean; import com.spark.qtz.databinding.ActivityAdBinding; import com.spark.qtz.ui.adapter.SlideTabPagerAdapter; import com.spark.qtz.util.StatueBarUtils; import java.util.ArrayList; import me.spark.mvvm.base.BaseActivity; /** * ================================================ * 作 者:ccs * 版 本:1.0.0 * 创建日期:2019/4/28 * 描 述: * 修订历史: * ================================================ */ @Route(path = ARouterPath.ACTIVITY_ME_AD) public class AdActivity extends BaseActivity<ActivityAdBinding, AdViewModel> { @Autowired(name = "adUp") public boolean adUp; private TitleBean mTitleModel; private ArrayList<Fragment> mFragments = new ArrayList<>(); private String[] mTitles; private SlideTabPagerAdapter mAdapter; @Override public int initContentView(Bundle savedInstanceState) { return R.layout.activity_ad; } @Override public int initVariableId() { return BR.adViewModel; } @Override public void initView() { super.initView(); StatueBarUtils.setStatusBarLightMode(this, true); StatueBarUtils.addMarginTopEqualStatusBarHeight(binding.adTitle.fakeStatusBar); StatueBarUtils.setStatusBarColor(this, Color.WHITE); mTitles = getResources().getStringArray(R.array.ad_tab); //TitleSet mTitleModel = new TitleBean(); mTitleModel.setShowRightImg(false); binding.adTitle.titleRightImg.setImageDrawable(getResources().getDrawable(R.drawable.svg_filter)); binding.adTitle.setViewTitle(mTitleModel); setTitleListener(binding.adTitle.titleRootLeft, binding.adTitle.titleRootRight); mFragments.add(AdFragment.newInstance(0)); mFragments.add(AdFragment.newInstance(1)); mAdapter = new SlideTabPagerAdapter(getSupportFragmentManager(), mFragments, mTitles); binding.adVp.setAdapter(mAdapter); binding.adTab.setViewPager(binding.adVp); if (adUp) { binding.adVp.setCurrentItem(1); } } @Override protected void onTitleRightClick() { } }
[ "ccs7727@163.com" ]
ccs7727@163.com
1ebcbfebbe1d26c83c8c7d33cdfe0dccc1eb8de0
e73e87ae5023cea015b3141f1a0b6ed3c99e8a0a
/Art/src/tw/group4/_35_/cms/model/InterfaceEventSpaceDao.java
716f3fcc23e7e98e26ddc22779948794df853d7b
[]
no_license
Jimmy1215/Art-Final
a75e8331cb57ec1a08093680e903b3def3e66eb4
96be88938ffde121c5d8186dde466b1ca8ad8b53
refs/heads/master
2023-02-24T06:34:03.847900
2021-01-26T12:07:24
2021-01-26T12:07:24
333,072,132
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package tw.group4._35_.cms.model; import java.util.List; public interface InterfaceEventSpaceDao { //依場地名稱查詢 List<EventSpace> select(String name); //查詢全部場地 List<EventSpace> selectAll(); //新增。存在就不新增,不存在才新增。 EventSpace insert(EventSpace bean); //更新。傳入bean.getId對應的資料,確認資料庫有這筆後。 //detach搜尋到的物件再次進行更新 boolean update(EventSpace bean); //刪除。傳入name有對應資料才刪除。 boolean delete(String name); }
[ "71664044+Jimmy1215@users.noreply.github.com" ]
71664044+Jimmy1215@users.noreply.github.com
84d70bda2ce338f45a1f29ce0d75ea696c370378
4e9cc5d6eb8ec75e717404c7d65ab07e8f749c83
/sdk-hook/src/main/java/com/dingtalk/api/response/OapiKacDatavTelconfGetResponse.java
bab01a2614b9d86a91fc0df6e44c9ed4aebde145
[]
no_license
cvdnn/ZtoneNetwork
38878e5d21a17d6fe69a107cfc901d310418e230
2b985cc83eb56d690ec3b7964301aeb4fda7b817
refs/heads/master
2023-05-03T16:41:01.132198
2021-05-19T07:35:58
2021-05-19T07:35:58
92,125,735
0
1
null
null
null
null
UTF-8
Java
false
false
2,429
java
package com.dingtalk.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.TaobaoObject; import com.taobao.api.TaobaoResponse; /** * TOP DingTalk-API: dingtalk.oapi.kac.datav.telconf.get response. * * @author top auto create * @since 1.0, null */ public class OapiKacDatavTelconfGetResponse extends TaobaoResponse { private static final long serialVersionUID = 7236391397864428772L; /** * 结果码 */ @ApiField("errcode") private Long errcode; /** * 提示信息 */ @ApiField("errmsg") private String errmsg; /** * 结果 */ @ApiField("result") private TelConferenceSummaryResponse result; public void setErrcode(Long errcode) { this.errcode = errcode; } public Long getErrcode( ) { return this.errcode; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } public String getErrmsg( ) { return this.errmsg; } public void setResult(TelConferenceSummaryResponse result) { this.result = result; } public TelConferenceSummaryResponse getResult( ) { return this.result; } public boolean isSuccess() { return getErrcode() == null || getErrcode().equals(0L); } /** * 结果 * * @author top auto create * @since 1.0, null */ public static class TelConferenceSummaryResponse extends TaobaoObject { private static final long serialVersionUID = 1445376181366911419L; /** * 呼叫成功次数 */ @ApiField("call_count") private Long callCount; /** * 呼叫成功时长(秒) */ @ApiField("call_duration") private String callDuration; /** * 呼叫成功时长(分钟) */ @ApiField("call_duration_min") private String callDurationMin; /** * 呼叫参与人次 */ @ApiField("call_join_pv") private Long callJoinPv; public Long getCallCount() { return this.callCount; } public void setCallCount(Long callCount) { this.callCount = callCount; } public String getCallDuration() { return this.callDuration; } public void setCallDuration(String callDuration) { this.callDuration = callDuration; } public String getCallDurationMin() { return this.callDurationMin; } public void setCallDurationMin(String callDurationMin) { this.callDurationMin = callDurationMin; } public Long getCallJoinPv() { return this.callJoinPv; } public void setCallJoinPv(Long callJoinPv) { this.callJoinPv = callJoinPv; } } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
9d0b1577f8b2e0494aab6cf0ea85b5090b790501
69c0835b7aaca9969c692ba7a42c896d16fcd748
/src/main/java/com/example/web/rest/errors/ErrorDTO.java
69c30f55232b8e43b3e417559ec4c782af4bbbef
[]
no_license
apellegero/ligabasquet
09d0dfc3d47f7343d25b8a79ba1f697af235cf85
3df975a9f10055a17f2ad7557016ab791dd85c6c
refs/heads/master
2021-05-04T10:51:10.087768
2016-02-03T18:41:09
2016-02-03T18:41:09
49,583,680
0
1
null
2020-09-18T06:44:45
2016-01-13T15:47:44
Java
UTF-8
Java
false
false
1,276
java
package com.example.web.rest.errors; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * DTO for transfering error message with a list of field errors. */ public class ErrorDTO implements Serializable { private static final long serialVersionUID = 1L; private final String message; private final String description; private List<FieldErrorDTO> fieldErrors; ErrorDTO(String message) { this(message, null); } ErrorDTO(String message, String description) { this.message = message; this.description = description; } ErrorDTO(String message, String description, List<FieldErrorDTO> fieldErrors) { this.message = message; this.description = description; this.fieldErrors = fieldErrors; } public void add(String objectName, String field, String message) { if (fieldErrors == null) { fieldErrors = new ArrayList<>(); } fieldErrors.add(new FieldErrorDTO(objectName, field, message)); } public String getMessage() { return message; } public String getDescription() { return description; } public List<FieldErrorDTO> getFieldErrors() { return fieldErrors; } }
[ "alfredoru@gmail.com" ]
alfredoru@gmail.com
d31bc56cfe9bac69870b422233cf5446ec9ab589
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_9209ba68aad30c47ce05ce8df800aca0a331afa9/Boomerang/22_9209ba68aad30c47ce05ce8df800aca0a331afa9_Boomerang_t.java
7470cd8f4af72aab9eadaa077b042dd87fa2f6f8
[]
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,529
java
/* Copyright (2005-2009) Schibsted Søk AS * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * SESAT 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with SESAT. If not, see <http://www.gnu.org/licenses/>. */ package no.sesat.search.result; import java.net.MalformedURLException; import java.util.StringTokenizer; import no.sesat.search.site.Site; import no.sesat.search.site.config.SiteConfiguration; import org.apache.log4j.Logger; /** * Boomerang manipulates URL links, for example to ensure outbound links are logged. * * <b> Immutable. </b> * * * * @version $Id$ */ public final class Boomerang { // Constants ----------------------------------------------------- private static final Logger LOG = Logger.getLogger(Boomerang.class); private static final String BASE_URL = "boomerang/"; // Attributes ---------------------------------------------------- // Static -------------------------------------------------------- public static String getUrl( final Site site, final String orgUrl, final String paramString) { final StringBuilder toUrl = new StringBuilder("http://" + site.getName() + BASE_URL); // click attributes comes as a string seperated by ';' final StringTokenizer tokeniser = new StringTokenizer(paramString, ";"); while(tokeniser.hasMoreTokens()){ toUrl.append(tokeniser.nextToken().replace(':', '=')); toUrl.append(';'); } // remove last ';' toUrl.setLength(toUrl.length() - 1); toUrl.append('/'); // add the destination url if(!orgUrl.startsWith("http")){ // any relative url must be made absolute against the current skin toUrl.append("http://" + site.getName()); // avoid double / if(orgUrl.startsWith("/")){ toUrl.setLength(toUrl.length() - 1); } } // append the original destination url toUrl.append(punyencode(orgUrl)); return toUrl.toString(); } private static String punyencode(String url) { String host = null; try { host = new java.net.URL(url).getHost(); } catch (MalformedURLException ex) { LOG.warn("Invalid url in boomerang: " + url, ex); } if (host != null) { url = url.replace(host, java.net.IDN.toASCII(host)); } return url; } // Constructors ------------------------------------------------- // Public -------------------------------------------------------- // Package protected --------------------------------------------- // Protected ----------------------------------------------------- // Private ------------------------------------------------------- // Inner classes ------------------------------------------------- }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f410aa0df04282e19a8122aa2c6e3a2ec1908a40
034416becb36f4a9922053daf5f1175349a2843f
/mmall-promotion/mmall-promotion-api/src/main/java/com/xyl/mmall/promotion/dto/PromotionQueryBeanDTO.java
b975ef85c3207a7c02707bc50d97b787c43aaa2c
[]
no_license
timgle/utilcode
40ee8d05e96ac324f452fccb412e07b4465e5345
a8c81c90ec1965d45589dd7be8d2c8b0991a6b6a
refs/heads/master
2021-05-09T22:39:11.417003
2016-03-20T14:30:52
2016-03-20T14:30:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
/* * 2014-12-24 * * Copyright 2014 Netease, Inc. All rights reserved. */ package com.xyl.mmall.promotion.dto; /** * PromotionQueryBeanDTO.java * * @author <A HREF="mailto:hzruanhy@corp.netease.com">Roy</A> * @version 1.0 2014-12-24 * @since 1.0 */ @SuppressWarnings("serial") public class PromotionQueryBeanDTO extends PromotionDTO { /** * 最大权限 */ private long fullPermission; private int limit; private int offset; public long getFullPermission() { return fullPermission; } public void setFullPermission(long fullPermission) { this.fullPermission = fullPermission; } public int getLimit() { return limit; } public void setLimit(int limit) { this.limit = limit; } public int getOffset() { return offset; } public void setOffset(int offset) { this.offset = offset; } }
[ "jack_lhp@163.com" ]
jack_lhp@163.com
6b05ee83b20fb76367045a297f960c6a3660d239
796f00b13d3ac2ab543e02b0c1f4dc65a9cca600
/src/main/java/com/anelsoftware/config/WebsocketSecurityConfiguration.java
345a9d58b38bfd61ebca685bee9b4f05e23d8c10
[]
no_license
BulkSecurityGeneratorProject/ClothesJh
f6707e47708fd5f05af1814ab3c3138081dd160b
fac26fde219134f32c8796de7d0a81eb5015dd15
refs/heads/master
2022-12-24T13:15:36.613031
2017-08-04T02:25:44
2017-08-04T02:25:44
296,570,542
0
0
null
2020-09-18T09:06:01
2020-09-18T09:06:00
null
UTF-8
Java
false
false
1,478
java
package com.anelsoftware.config; import com.anelsoftware.security.AuthoritiesConstants; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; import org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer; @Configuration public class WebsocketSecurityConfiguration extends AbstractSecurityWebSocketMessageBrokerConfigurer { @Override protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) { messages .nullDestMatcher().authenticated() .simpDestMatchers("/topic/tracker").hasAuthority(AuthoritiesConstants.ADMIN) // matches any destination that starts with /topic/ // (i.e. cannot send messages directly to /topic/) // (i.e. cannot subscribe to /topic/messages/* to get messages sent to // /topic/messages-user<id>) .simpDestMatchers("/topic/**").authenticated() // message types other than MESSAGE and SUBSCRIBE .simpTypeMatchers(SimpMessageType.MESSAGE, SimpMessageType.SUBSCRIBE).denyAll() // catch all .anyMessage().denyAll(); } /** * Disables CSRF for Websockets. */ @Override protected boolean sameOriginDisabled() { return true; } }
[ "jlopezjuy@gmail.com" ]
jlopezjuy@gmail.com
5ba8baec307120c11c28ab5fa41869d49addb9fe
95a826f180d50e68c9eeaaf00a1b5305b4b8368f
/Exception_Handling/src/app5/D.java
51fd2a4ddc621130e90a4bf75e649ee2d8361c98
[]
no_license
Vijay-Ky/JAN-2019_BATCH
70c21ee91b86347667607ac42e4b232bdd377e0a
8636eac816ac383125361e021ba605ce592b982d
refs/heads/master
2020-04-15T05:22:43.351866
2019-02-08T08:56:46
2019-02-08T08:56:46
164,419,177
1
0
null
null
null
null
UTF-8
Java
false
false
199
java
import java.sql.*; class D { public static void main(String[] args) { try { Connection con = DriverManager.getConnection("","",""); } catch (ClassNotFoundException ex) { } } }
[ "vijayk007@gmail.com" ]
vijayk007@gmail.com
b107982f4a47629c298fefa5f15bc90e32d91a22
538b307916a3473e4eeed209a92675f9bc577c5f
/cloud-commons-base/src/main/java/com/st/fox/commons/base/tree/TreeUtil.java
6917094ad90be086a2fac451146ad31d6da045a1
[ "MIT" ]
permissive
luozhonghua/foxcommon
b33ac3ae31a9a3d4cc142813cf9df9b363ae456a
d4f7081275350069897f6f20014454dc2aeb2e30
refs/heads/master
2020-03-26T13:43:11.153905
2018-08-16T12:39:30
2018-08-16T12:39:30
144,953,248
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
package com.st.fox.commons.base.tree; import java.util.ArrayList; import java.util.List; /** * 递归树形 * * @author luozhonghua */ public class TreeUtil { public static <T extends TreeNode> List<T> build(List<T> treeNodes, Object root) { List<T> trees = new ArrayList<T>(); for (T treeNode : treeNodes) { if (root.equals(treeNode.getPid())) { trees.add(findChildren(treeNode, treeNodes)); } } return trees; } private static <T extends TreeNode> T findChildren(T node, List<T> treeNodes) { for (T n : treeNodes) { if (node.getId().equals(n.getPid())) { if (node.getChildren() == null) { node.setChildren(new ArrayList<TreeNode>()); } node.add(findChildren(n, treeNodes)); } } return node; } }
[ "172257861@qq.com" ]
172257861@qq.com
9790681fd8cc4d3d421065b0a1150ab274129a12
605c28cc4d7ffd35583f6aba8cc58c7068f237e2
/src/com/dxjr/portal/member/service/impl/OnlineCounterServiceImpl.java
8432308f4bdaf7db6a9fd8c417e7f5d2499ca4b8
[]
no_license
Lwb6666/dxjr_portal
7ffb56c79f0bd07a39ac94f30b2280f7cc98a2e4
cceef6ee83d711988e9d1340f682e0782e392ba0
refs/heads/master
2023-04-21T07:38:25.528219
2021-05-10T02:47:22
2021-05-10T02:47:22
351,003,513
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
package com.dxjr.portal.member.service.impl; import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.dxjr.base.entity.Member; import com.dxjr.base.entity.OnlineCounter; import com.dxjr.base.mapper.BaseOnlineCounterMapper; import com.dxjr.common.page.Page; import com.dxjr.portal.member.mapper.OnlineCounterMapper; import com.dxjr.portal.member.service.OnlineCounterService; import com.dxjr.portal.member.util.BaiDuIp; import com.dxjr.portal.member.vo.OnlineCounterCnd; import com.dxjr.portal.member.vo.OnlineCounterVo; @Service public class OnlineCounterServiceImpl implements OnlineCounterService { @Autowired private OnlineCounterMapper onlineCounterMapper; @Autowired private BaseOnlineCounterMapper baseOnlineCounterMapper; @Override public List<OnlineCounterVo> queryListByCnd(OnlineCounterCnd onlineCounterCnd) throws Exception { return onlineCounterMapper.queryListByCnd(onlineCounterCnd); } @Override public OnlineCounter insertOnlineCounter(Member member, String system, HttpServletRequest request, HttpSession session) throws Exception { OnlineCounter onlineCounter = new OnlineCounter(); Date nowtime = new Date(); String ip = member.getIp(); // 调用百度api获得位置 BaiDuIp.IpAddr ipAddr = BaiDuIp.queryAddrByIp(ip); onlineCounter.setUserId(member.getId()); onlineCounter.setUsername(member.getUsername()); onlineCounter.setAddtime(nowtime); onlineCounter.setLogintime(nowtime); onlineCounter.setLastexisttime(nowtime); onlineCounter.setSessionid(session.getId()); onlineCounter.setLastupdatetime(nowtime); onlineCounter.setAddip(ip); onlineCounter.setSystem(system); onlineCounter.setArea(ipAddr.getArea()); onlineCounter.setProvince(ipAddr.getProvince()); onlineCounter.setCity(ipAddr.getCity()); onlineCounter.setPlatform(member.getPlatform()); baseOnlineCounterMapper.insertEntity(onlineCounter); return onlineCounter; } @Override public OnlineCounterVo queryLastOnlineCounterByUserId(Integer userId) throws Exception { return onlineCounterMapper.queryLastOnlineCounterByUserId(userId); } @Override public Page queryPageByCnd(Integer userId, Page page) { page.setResult(onlineCounterMapper.queryListByUserId(userId, page)); return page; } }
[ "1677406532@qq.com" ]
1677406532@qq.com
dd02ca4ce004838814a4cde34c64ef120ecd0466
256ba91f21e03bee6763cc17a65793d9aab9cbe9
/src/Backtracking/Combination/GenerateParentheses.java
85a830201b55ca258b979cd6779fae680063e43b
[]
no_license
binhnguyennus/AlgorithmExercise_01
02e1a7a3b4f9d584994b6e242392098a2d309e05
5731b3c07b179a4c6216e6c9cdbf5d9c6f1824eb
refs/heads/master
2020-05-02T04:00:50.079893
2019-02-25T02:26:09
2019-02-25T02:26:09
177,740,732
1
3
null
2019-03-26T08:00:04
2019-03-26T08:00:04
null
UTF-8
Java
false
false
2,778
java
/* 22. Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. * Thought Process: * */ package Backtracking.Combination; import java.util.ArrayList; import java.util.List; import java.util.Stack; /** * * @author xinrong */ public class GenerateParentheses { public static void main(String[] args) { new GenerateParentheses().generateParenthesis(2); } public List<String> generateParenthesis(int n) { List<String> allRes = new ArrayList<>(); // getCombUtil(n * 2, 0, "", allRes); System.out.println("WISE : "); getCombUtil("", allRes, 0, 0, n); System.out.println("NAIVE : "); getCombUtil("", allRes, n, n); return allRes; } private void getCombUtil(String curRes, List<String> allRes, int leftNum, int rightNum, int n) { // System.out.println("leftNum : " + leftNum + ", rightNum : " + rightNum); if (leftNum == n && rightNum == n) { System.out.println(curRes); allRes.add(curRes); } else { if (leftNum < n) { getCombUtil(curRes + "(", allRes, leftNum + 1, rightNum, n); } if (rightNum < leftNum) { getCombUtil(curRes + ")", allRes, leftNum, rightNum + 1, n); } } } private void getCombUtil(String curRes, List<String> allRes, int leftTarget, int rightTarget) { if (leftTarget == 0 && rightTarget == 0) { System.out.println(curRes); if (isValid(curRes)) { allRes.add(curRes); } } else { if (leftTarget > 0) { getCombUtil(curRes + "(", allRes, leftTarget - 1, rightTarget); } if (rightTarget > 0) { getCombUtil(curRes + ")", allRes, leftTarget, rightTarget - 1); } } } private void getCombUtil(int target, int lvl, String curRes, List<String> allRes) { if (lvl == target) { if (isValid(curRes)) { allRes.add(curRes); } } else { getCombUtil(target, lvl + 1, curRes + "(", allRes); getCombUtil(target, lvl + 1, curRes + ")", allRes); } } private boolean isValid(String curRes) { Stack<Character> stack = new Stack<>(); for (char ch : curRes.toCharArray()) { if (ch == '(') { stack.push(')'); } else { if (stack.isEmpty()) { return false; } if (stack.pop() != ch) { return false; } } } return stack.isEmpty(); } }
[ "meng.careers@gmail.com" ]
meng.careers@gmail.com
550c9780ae0eb6a7e4411b4083cfd6be7d2d7f4d
135bec354622330ea6bcf637ef52c7363fb97467
/src/February9Day6/MonthsToString.java
07173134a9b478b9099d380caf406ac275f8df72
[]
no_license
Orlando-Houston/Java
1b057b2e6447ba79e2173462139c6714c6743b4c
b6ccbf6c05d9cbec9580875be7c5edd6e42f0de9
refs/heads/master
2020-08-31T09:12:40.047696
2020-06-23T22:44:04
2020-06-23T22:44:04
238,321,900
2
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
package February9Day6; import java.util.Scanner; public class MonthsToString { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Please enter month number : "); int month = scanner.nextInt(); String monthText="x"; switch (month){ case 1: //System.out.println(); monthText="January"; break; case 2: monthText="February"; break; case 3 : monthText="March"; break; case 4: monthText="April"; break; case 5: monthText="May"; break; case 6: monthText="June"; break; case 7: monthText="July"; break; case 8: monthText="August"; break; case 9: monthText="September"; break; case 10: monthText="October"; break; case 11: monthText="November"; break; case 12: monthText="December"; break; default: System.out.println("Only 1-12"); break; } if(!monthText.equals("x")) System.out.println(monthText); } }
[ "a.ozder@outlook.com" ]
a.ozder@outlook.com
bfb5a5348a0ddc25b101a4c38f3467879f84cf11
75ae440466edf001ab811878619d9abab9e64e3a
/Investigacion/Investigacion-ejb/src/java/ec/edu/espe_ctt_investigacion/session/SeaFormatoLargoFacade.java
255635863ce599ab861fa0cfe6aef8fc7f6778ca
[]
no_license
developerJhonAlon/ProyectosSociales
deefdbd3a5f512a11439c1cc53d785032d9a8133
70100377499be092460e0578478b9ceefa92464b
refs/heads/master
2020-03-26T03:54:33.641829
2020-03-22T02:20:12
2020-03-22T02:20:12
144,476,444
0
0
null
null
null
null
UTF-8
Java
false
false
3,546
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ec.edu.espe_ctt_investigacion.session; import ec.edu.espe_ctt_investigacion.entity.SeaDatGeneralProy; import ec.edu.espe_ctt_investigacion.entity.SeaFormatoLargo; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; /** * * @author PC1 */ @Stateless public class SeaFormatoLargoFacade extends AbstractFacade<SeaFormatoLargo> { @PersistenceContext(unitName = "Investigacion-ejbPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public SeaFormatoLargoFacade() { super(SeaFormatoLargo.class); } public SeaFormatoLargo findIdFormatoByCodPro(BigDecimal codPro){ List<SeaFormatoLargo> result = null ; Query query = em.createQuery("SELECT o FROM SeaFormatoLargo o WHERE o.datgeproyId.datgeproyId =:codPro"); query.setParameter("codPro", codPro); query.setHint("eclipselink.refresh", true); result = query.getResultList(); return result == null || result.isEmpty() ? null : result.get(0); } public List<SeaFormatoLargo> findFormatoByCodPro(BigDecimal codPro){ List<SeaFormatoLargo> result = null; Query query = em.createQuery("SELECT o FROM SeaFormatoLargo o WHERE o.datgeproyId.datgeproyId =:codPro"); query.setParameter("codPro", codPro); result = query.getResultList(); return result == null || result.isEmpty() ? null : result; } public List<SeaFormatoLargo> findFormatoLargo(){ List<SeaFormatoLargo> result = null; Query query = em.createQuery("SELECT o FROM SeaFormatoLargo o"); result = query.getResultList(); return result == null || result.isEmpty() ? null : result; } public List<SeaFormatoLargo> findFormatoLargoByCodUsu(BigDecimal codUsu){ List<SeaFormatoLargo> result = null; Query query = em.createQuery("SELECT o FROM SeaFormatoLargo o WHERE o.datgeproyId.usuId.usuId =:codUsu"); query.setParameter("codUsu", codUsu); query.setHint("eclipselink.refresh", true); result = query.getResultList(); return result == null || result.isEmpty() ? null : result; } public List<SeaFormatoLargo> findByConvocatoria(BigDecimal idConvocatoria){ String hql = "SELECT o FROM SeaFormatoLargo o"; if (idConvocatoria!=null){ hql+=" WHERE o.datgeproyId.convocaId.convocaId =:idConvocatoria"; } Query query = em.createQuery(hql); if (idConvocatoria!=null){ query.setParameter("idConvocatoria", idConvocatoria); } return query.getResultList(); } public List<SeaFormatoLargo> findByAprobadoPar(BigDecimal idConvocatoria){ String hql = "SELECT o FROM SeaFormatoLargo o WHERE o.datgeproyId.datgeproyEstado = :estado"; if (idConvocatoria!=null){ hql+=" AND o.datgeproyId.convocaId.convocaId = :idConvocatoria"; } Query query = em.createQuery(hql); if (idConvocatoria!=null){ query.setParameter("idConvocatoria", idConvocatoria); } query.setParameter("estado", SeaDatGeneralProy.ESTADO_EVALUADO_PAR); return query.getResultList(); } }
[ "jhonalonjami@gmail.com" ]
jhonalonjami@gmail.com
6463f2172a1e96429416d9e7aaf6df0c26c25456
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_717.java
a9a8b1310fea59817379c44125eac9ab1c443f35
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT EMPLOYEE_ID, JOB_ID FROM EMPLOYEES WHERE JOB_ID >=" + val1); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
1def42a5c622b7c185b4f65702d519ec09e6f205
3712420b5a792a1d7389426d349418e710722f7f
/spider-common/src/main/java/com/jin10/spider/common/request/SocketActiveRequest.java
3a882b12e3300f0ce65e8dfe4bd3fda9146eb3b3
[]
no_license
Raofy/spider
da27aaa020148ffc5098b505fbfa358d2de697b0
11f6eb207857ddda8b6cd84f34a0c63f0b25e237
refs/heads/master
2023-02-07T08:28:25.518740
2021-01-04T10:34:18
2021-01-04T10:34:18
325,261,912
1
0
null
null
null
null
UTF-8
Java
false
false
409
java
package com.jin10.spider.common.request; import com.jin10.spider.common.constants.ActionCodeConstants; import lombok.Data; /** * @author hongda.fang * @date 2019-11-22 17:43 * ---------------------------------------------- * 上下线监控请求 */ @Data public class SocketActiveRequest { private int action = ActionCodeConstants.SOCKET_ACTIVE; private String ip; private int status; }
[ "1312170600@qq.com" ]
1312170600@qq.com
ab221c7c5c216d538ff8c0bf4b6161821596a2e9
9104a27220e335e8e0b2841ffa9e264549c3c3e0
/src/test/java/com/example/bddspring1568809136/DemoApplicationTests.java
542df6c001e50ac96b0bb779cc3b81705f33b060
[]
no_license
cb-kubecd/bdd-spring-1568809136
19fed8bdea1322f13a6c15d29353245479f6cb7a
986b204ea8f64dcab177238f005ae039d1ef059d
refs/heads/master
2020-07-28T04:00:41.364612
2019-09-18T12:19:18
2019-09-18T12:19:18
209,301,189
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.example.bddspring1568809136; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class DemoApplicationTests { @Test public void contextLoads() { } }
[ "jenkins-x@googlegroups.com" ]
jenkins-x@googlegroups.com
647a67780c9474b874fc30d86aad986a06c96dcf
13fd6f4a641a21ccbb4a220446e6f67a289b8263
/src/zj/util/Time24.java
8dfe3bc8acc00cb674295ab2409a92cc5a3ebaa2
[ "MIT" ]
permissive
webturing/zjTools
82575463db9cd75565bbb75d43e178ef090d3188
e699e0341e3707d25961abd2e5d5e7811b52f4c9
refs/heads/master
2020-05-07T16:28:36.208058
2019-04-11T00:35:36
2019-04-11T00:35:36
180,684,521
2
0
null
null
null
null
UTF-8
Java
false
false
1,178
java
package zj.util; public class Time24 { int hour; int min; int sec; public Time24(int hour, int min, int sec) { super(); this.hour = hour; this.min = min; this.sec = sec; rationalize(); } private void rationalize() { int inc = sec / 60; sec %= 60; min += inc; inc = min / 60; min %= 60; inc = hour / 24; hour %= 24; } @Override public String toString() { return "Time24 [hour=" + hour + ", min=" + min + ", sec=" + sec + ", getHour()=" + getHour() + ", getMin()=" + getMin() + ", getSec()=" + getSec() + ", toString()=" + super.toString() + "]"; } public int getHour() { return hour; } public void setHour(int hour) { this.hour = hour; } public int getMin() { return min; } public void setMin(int min) { this.min = min; } public int getSec() { return sec; } public void setSec(int sec) { this.sec = sec; } void incSec() { sec++; rationalize(); } void incMin() { min++; rationalize(); } void incHour() { hour++; rationalize(); } public static void main(String[] args) { Time24 a = new Time24(1, 2, 3); System.out.println(a); a.incHour(); System.out.println(a); } }
[ "zj@webturing.com" ]
zj@webturing.com
868dd53ec3d7112081079b49837cda86bfe2e852
c1580ce429ae0d1d1915a35cb71631f0d922acb6
/src/main/java/com/thinkgem/jeesite/modules/ftc/convert/product/SpecAttributeConverter.java
8662aa877280c61e6eca0c760f32b9bbc5d4e08e
[ "Apache-2.0" ]
permissive
wangning82/FTC
3934901ef68cf9bf9f8d62ff8bddc88582deb4b9
c3f302ed0cbe9c78ecadc4d2dd32a65cc8fb17d5
refs/heads/master
2021-01-20T14:19:29.711016
2017-11-21T06:46:13
2017-11-21T06:46:13
90,590,426
0
1
null
null
null
null
UTF-8
Java
false
false
794
java
package com.thinkgem.jeesite.modules.ftc.convert.product; import com.thinkgem.jeesite.common.rest.BaseConverter; import com.thinkgem.jeesite.modules.ftc.dto.product.SpecAttributeDto; import com.thinkgem.jeesite.modules.ftc.entity.product.SpecAttribute; /** * Created by wangqingxiang on 2017/6/17. */ public class SpecAttributeConverter extends BaseConverter<SpecAttribute,SpecAttributeDto>{ @Override public SpecAttribute convertDtoToModel(SpecAttributeDto dto) { return super.convertDtoToModel(dto); } @Override public SpecAttributeDto convertModelToDto(SpecAttribute model) { SpecAttributeDto dto=new SpecAttributeDto(); dto.setValue(model.getName()); dto.setId(model.getId()); return super.convertModelToDto(model); } }
[ "heavendarren@126.com" ]
heavendarren@126.com
c5c69e194a4ff72af1014d839254ae8c0f3e5eef
f55fb5a7b4b08e13b679c6e463854af46e49bd74
/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/tableeditor/settings/handler/EditSettingsHandler.java
33890da4b39e09702a5d30615aa606a1e1bb88de
[ "Apache-2.0" ]
permissive
ChuniMuni/RED
6586a8b3bf5e7092623af1f9c29ced3314f80ada
fac8e0c2da122dc512fad02a7bd74b9b301b08e8
refs/heads/master
2020-07-03T23:42:37.793692
2017-12-14T06:49:03
2017-12-14T06:49:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,467
java
/* * Copyright 2015 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.robotframework.ide.eclipse.main.plugin.tableeditor.settings.handler; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.jface.viewers.IStructuredSelection; import org.robotframework.ide.eclipse.main.plugin.model.RobotModelEvents; import org.robotframework.ide.eclipse.main.plugin.model.RobotSetting; import org.robotframework.ide.eclipse.main.plugin.tableeditor.settings.handler.EditSettingsHandler.E4EditSettingsHandler; import org.robotframework.red.commands.DIParameterizedHandler; import org.robotframework.red.viewers.Selections; public class EditSettingsHandler extends DIParameterizedHandler<E4EditSettingsHandler> { public EditSettingsHandler() { super(E4EditSettingsHandler.class); } public static class E4EditSettingsHandler { @Inject protected IEventBroker eventBroker; @Execute public void editSettings(@Named(Selections.SELECTION) final IStructuredSelection selection) { final RobotSetting setting = Selections.getSingleElement(selection, RobotSetting.class); eventBroker.send(RobotModelEvents.ROBOT_SETTING_IMPORTS_EDIT, setting); } } }
[ "CI-nokia@users.noreply.github.com" ]
CI-nokia@users.noreply.github.com
5ad017075dede87f50350857659518fb0f99f128
be68bcbe1055784dfd723aa47ccca52f310fda5f
/sources/android/support/p010v7/widget/C0410df.java
b24e028ec7bc145cc599c23d04c8f6c9f4a9335f
[]
no_license
nicholaschum/DecompiledEvoziSmartLED
02710bc9b7ddb5db2f7fbbcebfe21605f8e889f8
42d3df21feac3d039219c3384e12e56e5f587028
refs/heads/master
2023-08-18T01:57:52.644220
2021-09-17T20:48:43
2021-09-17T20:48:43
407,675,617
0
0
null
null
null
null
UTF-8
Java
false
false
391
java
package android.support.p010v7.widget; import android.view.View; /* renamed from: android.support.v7.widget.df */ final class C0410df implements View.OnClickListener { /* renamed from: a */ final /* synthetic */ Toolbar f1830a; C0410df(Toolbar toolbar) { this.f1830a = toolbar; } public final void onClick(View view) { this.f1830a.mo4234h(); } }
[ "nicholas@prjkt.io" ]
nicholas@prjkt.io
6986ebb69772acf26fd402a002afcd64b3c1ae71
75604d83db3d7c6e783a54097687a1bb9d1be338
/src/BaekJoon/P1325_2.java
bd1a60621cb86f7c86a4266766d756b6eae53910
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
c1999a8ef3bfc1370abee56c0597c286a1cb81af
refs/heads/master
2023-08-17T04:39:41.236707
2022-09-07T06:22:56
2022-09-07T06:22:56
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
1,072
java
package BaekJoon; import java.util.ArrayList; import java.util.Scanner; public class P1325_2 { static ArrayList<Integer>[] arr; static boolean[] his; static int[] c; static int sol(int index) { if(his[index]) return 0; his[index]=true; int r=1; if(arr[index]==null) return c[index]=r; for(int i=0;i<arr[index].size();i++) { if(c[arr[index].get(i)]!=0) r+=c[arr[index].get(i)]; else r+=sol(arr[index].get(i)); } return c[index]=r; } public static void main(String[] args) { Scanner s=new Scanner(System.in); int n=s.nextInt()+1,m=s.nextInt(),max=0; arr=new ArrayList[n]; c=new int[n]; for(int i=0;i<m;i++) { int a=s.nextInt(),b=s.nextInt(); if(arr[b]==null) arr[b]=new ArrayList<>(); arr[b].add(a); } // for(int i=0;i<n;i++) { // if(arr[i]!=null) // System.out.println(i+" "+arr[i].toString()); // } for(int i=1;i<n;i++) { his=new boolean[n]; c[i]=sol(i); max=max>c[i]?max:c[i]; } for(int i=1;i<n;i++) { if(c[i]==max) System.out.print(i+" "); } } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
9f0a045f201c9b7f157595f0bb4b386fd89c7b63
5be8c5c03c12e05d845c3102ff0a2948cf6638a8
/components/camel-aws/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddbstream/ShardTreeTest.java
f2a84a4eda72805f0441df76a093b1d7e2798fa0
[ "Apache-2.0" ]
permissive
Talend/apache-camel
cfc4657dc28a6c5701854b0889b9e0d090675b05
fe9484bf5236f7af665c35cc7ed29527def8fe48
refs/heads/master
2023-08-10T14:15:19.145861
2023-06-28T06:30:44
2023-06-28T06:30:44
35,226,644
15
61
Apache-2.0
2023-08-29T11:53:02
2015-05-07T15:03:34
Java
UTF-8
Java
false
false
2,724
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.component.aws2.ddbstream; import java.util.Arrays; import org.junit.jupiter.api.Test; import software.amazon.awssdk.services.dynamodb.model.Shard; import static org.apache.camel.component.aws2.ddbstream.ShardFixtures.*; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; class ShardTreeTest { private final ShardTree underTest = new ShardTree(); @Test void shouldGetLeafShards() { underTest.populate(Arrays.asList(SHARD_0, SHARD_1, SHARD_2, SHARD_3, SHARD_4, SHARD_5, SHARD_6)); assertEquals(Arrays.asList(SHARD_5, SHARD_6, SHARD_3, SHARD_4), underTest.getLeaves()); } @Test void shouldReturnEmptyListIfAllShardsHaveAnEndingSequenceNumber() { underTest.populate(Arrays.asList(SHARD_0, SHARD_1, SHARD_2)); assertEquals(Arrays.asList(), underTest.getLeaves()); } @Test void shouldGetRootShards() { underTest.populate(Arrays.asList(SHARD_1, SHARD_2, SHARD_3, SHARD_4, SHARD_5, SHARD_6)); assertEquals(Arrays.asList(SHARD_1, SHARD_2), underTest.getRoots()); } @Test void shouldThrowIfNoUnparentedShardsCanBeFound() { Shard selfParentingShard = Shard.builder().shardId("SHARD_X").parentShardId("SHARD_X").build(); underTest.populate(Arrays.asList(selfParentingShard)); assertThrows(IllegalStateException.class, () -> underTest.getRoots()); } @Test void shouldGetChildShards() { underTest.populate(Arrays.asList(SHARD_0, SHARD_1, SHARD_2, SHARD_3, SHARD_4, SHARD_5, SHARD_6)); assertEquals(Arrays.asList(SHARD_5, SHARD_6), underTest.getChildren("SHARD_2")); } @Test void shouldReturnEmptyListIfTheShardHasNoChildren() { underTest.populate(Arrays.asList(SHARD_6)); assertEquals(Arrays.asList(), underTest.getChildren("SHARD_6")); } }
[ "ancosen@gmail.com" ]
ancosen@gmail.com
b664c805f6dd8430b6e24ff9624b4a4694b0772e
a52d6bb42e75ef0678cfcd291e5696a9e358fc4d
/af_webapp/src/main/java/org/kuali/kfs/module/ec/document/service/EffortCertificationAutomaticReportPeriodUpdateService.java
404142e7347cf9ebb4e746e25e7a5647c0f1c6de
[]
no_license
Ariah-Group/Finance
894e39cfeda8f6fdb4f48a4917045c0bc50050c5
ca49930ca456799f99aad57e1e974453d8fe479d
refs/heads/master
2021-01-21T12:11:40.987504
2016-03-24T14:22:40
2016-03-24T14:22:40
26,879,430
0
0
null
null
null
null
UTF-8
Java
false
false
1,831
java
/* * Copyright 2007 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * 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.kuali.kfs.module.ec.document.service; import java.util.List; import org.kuali.kfs.module.ec.businessobject.EffortCertificationReportDefinition; import org.kuali.kfs.module.ec.dataaccess.EffortCertificationReportDefinitionDao; /** * Contains service methods for the Effort Certification Automatic Period Update Process */ public interface EffortCertificationAutomaticReportPeriodUpdateService { /** * Checks if this report definition will overlap an already existing report definition * @param reportDefinition * @return true reportDefinition is an overlapping report defintion */ public boolean isAnOverlappingReportDefinition(EffortCertificationReportDefinition reportDefinition); /** * gets all EffortCertificationReportDefinition records * @return list of EffortCertificationReportDefinition records */ public List<EffortCertificationReportDefinition> getAllReportDefinitions(); /** * * Sets dao to be used by service * @param effortCertificationReportDefinitionDao */ public void setEffortCertificationReportDefinitionDao(EffortCertificationReportDefinitionDao effortCertificationReportDefinitionDao); }
[ "code@ariahgroup.org" ]
code@ariahgroup.org
9033fed4abd57f4a50f0ed32db17fde1cc5a91fe
969b1dd1ccd1c65842f8f7d8758e6a7f2cf9bcc0
/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java
7c8b0ca00764bec8e24b71645af5e109a85dc7d2
[ "Apache-2.0" ]
permissive
sinotopia/spring-framework
faa83b6e58547c133b3adb0d80e2a556f31d040a
56b1a9aec3c25ffef02675e138dc2ff1a276a7c5
refs/heads/master
2021-06-09T21:18:37.357791
2019-07-31T07:24:58
2019-07-31T07:24:58
132,296,191
0
0
null
2018-05-06T01:06:27
2018-05-06T01:06:26
null
UTF-8
Java
false
false
3,285
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.core.codec; import java.nio.ByteBuffer; import java.util.Collections; import org.junit.Test; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.util.MimeTypeUtils; import static org.junit.Assert.*; /** * @author Sebastien Deleuze */ public class ByteBufferDecoderTests extends AbstractDataBufferAllocatingTestCase { private final ByteBufferDecoder decoder = new ByteBufferDecoder(); @Test public void canDecode() { assertTrue(this.decoder.canDecode(ResolvableType.forClass(ByteBuffer.class), MimeTypeUtils.TEXT_PLAIN)); assertFalse(this.decoder.canDecode(ResolvableType.forClass(Integer.class), MimeTypeUtils.TEXT_PLAIN)); assertTrue(this.decoder.canDecode(ResolvableType.forClass(ByteBuffer.class), MimeTypeUtils.APPLICATION_JSON)); } @Test public void decode() { DataBuffer fooBuffer = stringBuffer("foo"); DataBuffer barBuffer = stringBuffer("bar"); Flux<DataBuffer> source = Flux.just(fooBuffer, barBuffer); Flux<ByteBuffer> output = this.decoder.decode(source, ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class), null, Collections.emptyMap()); StepVerifier.create(output) .expectNext(ByteBuffer.wrap("foo".getBytes()), ByteBuffer.wrap("bar".getBytes())) .expectComplete() .verify(); } @Test public void decodeError() { DataBuffer fooBuffer = stringBuffer("foo"); Flux<DataBuffer> source = Flux.just(fooBuffer).concatWith(Flux.error(new RuntimeException())); Flux<ByteBuffer> output = this.decoder.decode(source, ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class), null, Collections.emptyMap()); StepVerifier.create(output) .expectNext(ByteBuffer.wrap("foo".getBytes())) .expectError() .verify(); } @Test public void decodeToMono() { DataBuffer fooBuffer = stringBuffer("foo"); DataBuffer barBuffer = stringBuffer("bar"); Flux<DataBuffer> source = Flux.just(fooBuffer, barBuffer); Mono<ByteBuffer> output = this.decoder.decodeToMono(source, ResolvableType.forClassWithGenerics(Publisher.class, ByteBuffer.class), null, Collections.emptyMap()); StepVerifier.create(output) .expectNext(ByteBuffer.wrap("foobar".getBytes())) .expectComplete() .verify(); } }
[ "sinosie7en@gmail.com" ]
sinosie7en@gmail.com
250542e3e8fde15fe3a63c04878bd7593c712c89
146bb491879b9489890cdeaa37a055711fd36122
/RentalCars/src/test/java/com/org/enterprise/model/PerDayRent.java
711e700b2bbabf6d113446718b6cbebcccd55f6c
[]
no_license
kalyanikapu/RentalCarsProject
546f3764c199b2496061d53453a85941d5246a67
68d61bfdce6b3d56d2d12ee1a2c8a45af5f045c4
refs/heads/master
2020-03-26T16:54:14.776054
2018-08-17T21:54:48
2018-08-17T21:54:48
145,130,535
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.org.enterprise.model; public class PerDayRent { int price; int discount; public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } public int getDiscount() { return discount; } public void setDiscount(int discount) { this.discount = discount; } }
[ "you@example.com" ]
you@example.com
319324ff27a1eecb0e880ba3969b0d04a59e4fc7
097009b1eaf29d2f1d91a4a12e713f8871eedaca
/CustomPlayerModels-1.16/src/main/java/com/tom/cpm/client/optifine/proxy/TextureOF.java
3620f22edb74d2445f76489b9673223c88bbf01f
[ "MIT" ]
permissive
Bilicraft-Community/CustomPlayerModels
371b56907c0b538594b1148acd693a9ee0ac0a9d
1b36cf7e66656a4a3e5785f264ebc372ec854221
refs/heads/master
2023-06-08T05:03:35.139597
2021-07-03T01:53:01
2021-07-03T01:53:01
382,501,884
0
0
MIT
2021-07-03T01:48:56
2021-07-03T01:48:56
null
UTF-8
Java
false
false
183
java
package com.tom.cpm.client.optifine.proxy; import net.optifine.shaders.MultiTexID; public interface TextureOF { MultiTexID cpm$multiTex(); void cpm$copyMultiTex(MultiTexID mt); }
[ "tom5454a@gmail.com" ]
tom5454a@gmail.com
393975ad87b1f308aa60f33d927e76127461baa2
a486d51bb0b994e27d05ed47c1d88e00eb43ed06
/spring-web/src/main/java/org/springframework/http/client/reactive/AbstractClientHttpRequest.java
037e8b41913f3ac13ea91f4e37b4c41995b3d359
[]
no_license
tzh476/spring-framework-5.0.8.RELEASE
caa9820d8d636d10ad4ecf15617d45cd9b5bec18
1fb5d26284a2a1febb0b2ee22bdc0d4a11deda0f
refs/heads/master
2022-02-18T12:21:59.955213
2019-09-05T12:38:41
2019-09-05T12:38:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,375
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.http.client.reactive; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; import java.util.stream.Collectors; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.http.HttpCookie; import org.springframework.http.HttpHeaders; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** * Base class for {@link ClientHttpRequest} implementations. * * @author Rossen Stoyanchev * @author Brian Clozel * @since 5.0 */ public abstract class AbstractClientHttpRequest implements ClientHttpRequest { /** * COMMITTING -> COMMITTED is the period after doCommit is called but before * the response status and headers have been applied to the underlying * response during which time pre-commit actions can still make changes to * the response status and headers. */ private enum State {NEW, COMMITTING, COMMITTED} private final HttpHeaders headers; private final MultiValueMap<String, HttpCookie> cookies; private final AtomicReference<State> state = new AtomicReference<>(State.NEW); private final List<Supplier<? extends Publisher<Void>>> commitActions = new ArrayList<>(4); public AbstractClientHttpRequest() { this(new HttpHeaders()); } public AbstractClientHttpRequest(HttpHeaders headers) { Assert.notNull(headers, "HttpHeaders must not be null"); this.headers = headers; this.cookies = new LinkedMultiValueMap<>(); } @Override public HttpHeaders getHeaders() { if (State.COMMITTED.equals(this.state.get())) { return HttpHeaders.readOnlyHttpHeaders(this.headers); } return this.headers; } @Override public MultiValueMap<String, HttpCookie> getCookies() { if (State.COMMITTED.equals(this.state.get())) { return CollectionUtils.unmodifiableMultiValueMap(this.cookies); } return this.cookies; } @Override public void beforeCommit(Supplier<? extends Mono<Void>> action) { Assert.notNull(action, "Action must not be null"); this.commitActions.add(action); } @Override public boolean isCommitted() { return (this.state.get() != State.NEW); } /** * A variant of {@link #doCommit(Supplier)} for a request without body. * * @return a completion publisher */ protected Mono<Void> doCommit() { return doCommit(null); } /** * Apply {@link #beforeCommit(Supplier) beforeCommit} actions, apply the * request headers/cookies, and write the request body. * * @param writeAction the action to write the request body (may be {@code null}) * @return a completion publisher */ protected Mono<Void> doCommit(@Nullable Supplier<? extends Publisher<Void>> writeAction) { if (!this.state.compareAndSet(State.NEW, State.COMMITTING)) { return Mono.empty(); } this.commitActions.add(() -> Mono.fromRunnable(() -> { applyHeaders(); applyCookies(); this.state.set(State.COMMITTED); })); if (writeAction != null) { this.commitActions.add(writeAction); } List<? extends Publisher<Void>> actions = this.commitActions.stream() .map(Supplier::get).collect(Collectors.toList()); return Flux.concat(actions).then(); } /** * Apply header changes from {@link #getHeaders()} to the underlying response. * This method is called once only. */ protected abstract void applyHeaders(); /** * Add cookies from {@link #getHeaders()} to the underlying response. * This method is called once only. */ protected abstract void applyCookies(); }
[ "877635632@qq.com" ]
877635632@qq.com
48dc4ab360c15bf1acadcdd5b3bdc9f679e9ec51
5b26b9138e718f8b3d91722c2c79ac3562a91928
/src/main/java/magicbees/elec332/corerepack/compat/forestry/allele/AlleleEffectPotion.java
cdabc6471b4627dcf6d186fb0af4e8247b8f0343
[ "WTFPL" ]
permissive
KryptonCaptain/MagicBees
5d907e1b22c378aa48edaa751c87cad231103bd5
d7f0b364728604347f91c4eea23c4faad81a8270
refs/heads/1.12
2022-02-16T05:12:49.598940
2017-09-08T20:12:45
2017-09-08T20:12:45
103,616,212
3
3
null
2017-09-15T05:08:10
2017-09-15T05:08:10
null
UTF-8
Java
false
false
2,390
java
package magicbees.elec332.corerepack.compat.forestry.allele; import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeHousing; import forestry.api.genetics.IEffectData; import magicbees.elec332.corerepack.compat.forestry.EffectData; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ResourceLocation; import java.util.List; /** * Created by Elec332 on 25-8-2016. */ public class AlleleEffectPotion extends AlleleEffectThrottled { public AlleleEffectPotion(ResourceLocation rl, PotionEffect baseEffect) { super(rl); setThrottle(200); this.baseEffect = baseEffect; } public AlleleEffectPotion(String s, PotionEffect baseEffect) { super(s); setThrottle(200); this.baseEffect = baseEffect; } public AlleleEffectPotion(String uid, String unlocalizedName, PotionEffect baseEffect) { super(uid, unlocalizedName); setThrottle(200); this.baseEffect = baseEffect; } public AlleleEffectPotion setBypassesArmour(){ this.bypassesArmour = true; return this; } private final PotionEffect baseEffect; private boolean bypassesArmour; @Override public IEffectData validateStorage(IEffectData storedData) { if (storedData == null){ storedData = new EffectData(1, 0, 0); } return storedData; } @Override public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) { List<EntityLivingBase> entities = getEntitiesInRange(genome, housing, EntityLivingBase.class); for (EntityLivingBase entityLivingBase : entities){ if (bypassesArmour){ entityLivingBase.addPotionEffect(new PotionEffect(baseEffect)); } else { int armour = BeeManager.armorApiaristHelper.wearsItems(entityLivingBase, getUID(), true); PotionEffect effect = new PotionEffect(baseEffect.getPotion(), baseEffect.getDuration() / 60 * armour, baseEffect.getAmplifier(), false, baseEffect.doesShowParticles()); effect.setCurativeItems(baseEffect.getCurativeItems()); entityLivingBase.addPotionEffect(effect); } } return storedData; } }
[ "arnout1998@gmail.com" ]
arnout1998@gmail.com
76ced10532052cfcec822a54416a3600017dae2c
5f8c84de8b2c30b0b96ee0d2e73b16235cc2eb54
/modules/Core/src/main/java/net/prisontech/prisonbreak/core/commands/CoreCommands.java
87cb74a006a935cc2fb55ec6b77655ea8bc2bdd9
[]
no_license
jared-paul/PrisonBreak
522adb3519a402744a31ccc46984a0d8b4aea83c
9f7463a657f2b8af5965f810941919508acedc10
refs/heads/master
2020-05-24T06:35:40.659972
2019-05-17T03:45:39
2019-05-17T03:45:39
187,141,495
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
package net.prisontech.prisonbreak.core.commands; import net.prisontech.prisonbreak.api.commands.Command; import net.prisontech.prisonbreak.api.commands.CommandClass; import net.prisontech.prisonbreak.api.commands.CommandContext; import org.bukkit.command.CommandSender; import java.io.File; import java.io.IOException; public class CoreCommands implements CommandClass { @Command( aliases = {"prisonbreak", "pb"}, usage = "/prisonbreak start", description = "starts the minigame", initializer = "start", minArgs = 0, maxArgs = 0 ) public void start(CommandContext args, CommandSender sender) { try { Process p = Runtime.getRuntime().exec("cmd /c start.bat", null, new File("C:\\Users\\Jared\\Desktop\\BungeeCord\\Server2")); } catch (IOException e) { e.printStackTrace(); } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
16ff9f436c37463346556e60e2c3cbb8187d2e1d
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/ant/1.7/org/apache/tools/ant/filters/util/JavaClassHelper.java
4dc0c28675568e4b6e539695bea7750f39dee552
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
1,789
java
package org.apache.tools.ant.filters.util; import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.bcel.classfile.ClassParser; import org.apache.bcel.classfile.ConstantValue; import org.apache.bcel.classfile.Field; import org.apache.bcel.classfile.JavaClass; /** * Helper class that filters constants from a Java Class * */ public final class JavaClassHelper { /** System specific line separator. */ private static final String LS = System.getProperty("line.separator"); /** * Get the constants declared in a file as name=value * * @param bytes the class as a array of bytes * @return a StringBuffer contains the name=value pairs * @exception IOException if an error occurs */ public static StringBuffer getConstants(byte[] bytes) throws IOException { final StringBuffer sb = new StringBuffer(); final ByteArrayInputStream bis = new ByteArrayInputStream(bytes); final ClassParser parser = new ClassParser(bis, ""); final JavaClass javaClass = parser.parse(); final Field[] fields = javaClass.getFields(); for (int i = 0; i < fields.length; i++) { final Field field = fields[i]; if (field != null) { final ConstantValue cv = field.getConstantValue(); if (cv != null) { String cvs = cv.toString(); if (cvs.startsWith("\"") && cvs.endsWith("\"")) { cvs = cvs.substring(1, cvs.length() - 1); } sb.append(field.getName()); sb.append('='); sb.append(cvs); sb.append(LS); } } } return sb; } }
[ "hvdthong@github.com" ]
hvdthong@github.com
400981b1e1055e480a296f870c12a1b548e21d07
2e00baf7ecd4b2d4979aacb0cc1faee1d65b957d
/src/main/java/com/tool/RemoveUTF8BOM.java
cdcba1e67dd23e49aa378d19d768dac74143fb38
[]
no_license
Leon-Y/demo
e6c0eb3b2503bace8927a38b5f5b8b2b14a05a8f
d15fcb3ef34f7fae26da2d2231f84b308a9465ae
refs/heads/demo-brunch1
2022-06-30T06:56:13.265171
2021-08-30T11:43:11
2021-08-30T11:43:11
206,946,242
0
0
null
2022-06-21T01:49:52
2019-09-07T09:32:18
Java
UTF-8
Java
false
false
2,394
java
package com.tool; import java.io.*; import java.util.Set; public class RemoveUTF8BOM { /** * 读取流中前面的字符,看是否有bom,如果有bom,将bom头先读掉丢弃 * * @param in * @return * @throws IOException */ public static InputStream getInputStream(InputStream in) throws IOException { PushbackInputStream testin = new PushbackInputStream(in); int ch = testin.read(); if (ch != 0xEF) { testin.unread(ch); } else if ((ch = testin.read()) != 0xBB) { testin.unread(ch); testin.unread(0xef); } else if ((ch = testin.read()) != 0xBF) { throw new IOException("错误的UTF-8格式文件"); } else { // 不需要做,这里是bom头被读完了 // System.out.println("still exist bom"); System.out.println("bom头已被洗掉"); } return testin; } /** * 根据一个文件名,读取完文件,干掉bom头。 * * @param fileName * @throws IOException */ public static void trimBom(String fileName) throws IOException { FileInputStream fin = new FileInputStream(fileName); // 开始写临时文件 InputStream in = getInputStream(fin); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte b[] = new byte[4096]; int len = 0; while (in.available() > 0) { len = in.read(b, 0, 4096); // out.write(b, 0, len); bos.write(b, 0, len); } in.close(); fin.close(); bos.close(); // 临时文件写完,开始将临时文件写回本文件。 System.out.println("[" + fileName + "]"); FileOutputStream out = new FileOutputStream(fileName); out.write(bos.toByteArray()); out.close(); System.out.println("处理文件" + fileName); } /** * 根据ant编译错误来去除bom * * @param resultFile * @throws IOException */ static void trimBomByCompileResult(String resultFile) throws IOException { Set<String> set = getFileNamesFromCompileResult(resultFile); for (String fName : set) { trimBom(fName); } } private static Set<String> getFileNamesFromCompileResult(String resultFile) { return null; } }
[ "365608783@qq.com" ]
365608783@qq.com
c909d7aa5a42c3fffaff305f836e849c4cf96b8d
077ed3ed4754423dd9e868668f4ef545fccc4017
/web/show/app/bussiness/LookPwdService.java
d1bcdef2139b95ff2f8213e4d4e1e878ef18b149
[]
no_license
li5220008/Free
e797ce065f9be00638bd37885c46766ba0b4d5b4
ff80eb4581271270acd21687573c5cb8be9825e1
refs/heads/master
2016-09-06T05:54:42.049187
2013-08-03T03:26:44
2013-08-03T03:26:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
package bussiness; import models.common.UserInfo; import org.apache.commons.mail.EmailException; import org.apache.commons.mail.HtmlEmail; import utils.MessageBuilder; /** * 找回密码 * User: liangbing * Date: 12-12-26 * Time: 上午11:03 */ public class LookPwdService { // 发邮箱方法 public static void sendMsg(UserInfo userInfo,String newPwd) { HtmlEmail email = new HtmlEmail(); email.setCharset("UTF-8");// 编码格式 email.setHostName("smtp.163.com");// smtp服务器 try { email.addTo(userInfo.email);// 接收者 email.setFrom("gta_qic@163.com", "超级管理员");// 发送者,姓名 email.setSubject("找回密码邮箱");// 邮件标题 email.setAuthentication("gta_qic@163.com", "gta123");// 用户名,密码 String message= SystemConfigService.get("otherMsg");//得到模板类容 MessageBuilder messageBuilder = new MessageBuilder(message); messageBuilder.addParameter("userInfo",userInfo); String inputVal = messageBuilder.execute(); inputVal=inputVal.replace(userInfo.pwd,newPwd); email.setMsg(inputVal);// 发送内容 email.send(); } catch (EmailException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }
[ "li5220008@163.com" ]
li5220008@163.com
1c4827cb46c8a636c5d65e9b3b87fb9417caf685
a0b732448e08291c894e7edf73a2d0c01124016a
/templates/mvvm-arms/arms/src/main/java/me/xiaobailong24/mvvmarms/di/component/ArmsComponent.java
a7e0f1e02b2b2b1362deaa2838853abd429b2b06
[ "MIT", "Apache-2.0" ]
permissive
androidstarters/androidstarters.com
5c29f99ccd696118f75bedb41783347077db388a
010258565bc3e941d73f9ab3950f8bae0ad38e7b
refs/heads/develop
2023-08-22T11:56:29.637058
2018-09-27T05:13:01
2018-09-27T05:13:01
95,357,887
299
28
MIT
2021-01-07T13:41:32
2017-06-25T12:18:07
Java
UTF-8
Java
false
false
1,288
java
package <%= appPackage %>.di.component; import android.app.Application; import javax.inject.Singleton; import dagger.Component; import <%= appPackage %>.base.ArmsInjector; import <%= appPackage %>.di.module.ArmsConfigModule; import <%= appPackage %>.di.module.ArmsModule; import <%= appPackage %>.di.module.ViewModelFactoryModule; import <%= appPackage %>.http.imageloader.ImageLoader; import <%= appPackage %>.lifecycle.di.module.LifecycleModule; import <%= appPackage %>.repository.di.module.RepositoryModule; /** * @author xiaobailong24 * @date 2017/7/13 * Dagger ArmsComponent 向外提供一些方法获取需要的对象, * 通过 {@link <%= appPackage %>.utils.ArmsUtils} 获取 */ @Singleton @Component(modules = {ViewModelFactoryModule.class, RepositoryModule.class, LifecycleModule.class, ArmsModule.class, ArmsConfigModule.class}) public interface ArmsComponent { /** * 获取 Application * * @return Application */ Application application(); /** * 图片加载管理器,策略模式,默认使用 Glide * * @return ImageLoader */ ImageLoader imageLoader(); /** * Dagger 注入 * * @param armsInjector ArmsInjector */ void inject(ArmsInjector armsInjector); }
[ "ravidsrk@gmail.com" ]
ravidsrk@gmail.com
2c7c65e26cceac7635c97116ae10d345a4992a13
fa63fa8fea6dfd24f369d69f39f322f78143077c
/mall-product/src/main/java/com/scut/mall/product/config/MyCacheConfig.java
e3ec0f6789c1f6eff608087cb5bada4cc3b2a0c4
[]
no_license
laizikeng/mall
4741f36ba872a673210c1f75b2da8abe2e505083
70f1ead689b4101f3e796438d8200285d0b32fcf
refs/heads/main
2023-07-05T02:36:05.184978
2021-08-21T02:42:33
2021-08-21T02:42:33
387,080,581
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package com.scut.mall.product.config; import org.springframework.boot.autoconfigure.cache.CacheProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.StringRedisSerializer; @EnableConfigurationProperties(CacheProperties.class) @Configuration public class MyCacheConfig { /** * 配置文件中 TTL设置没用上 * * 原来: * @ConfigurationProperties(prefix = "spring.cache") * public class CacheProperties * * 现在要让这个配置文件生效 : @EnableConfigurationProperties(CacheProperties.class) * */ @Bean RedisCacheConfiguration redisCacheConfiguration(CacheProperties cacheProperties){ RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig(); // 设置kv的序列化机制 config = config.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer())); config = config.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer())); CacheProperties.Redis redisproperties = cacheProperties.getRedis(); // 设置配置 if(redisproperties.getTimeToLive() != null){ config = config.entryTtl(redisproperties.getTimeToLive()); } if(redisproperties.getKeyPrefix() != null){ config = config.prefixKeysWith(redisproperties.getKeyPrefix()); } if(!redisproperties.isCacheNullValues()){ config = config.disableCachingNullValues(); } if(!redisproperties.isUseKeyPrefix()){ config = config.disableKeyPrefix(); } return config; } }
[ "2601665132@qq.com" ]
2601665132@qq.com
5cf0d9d23a40f04b6b61889799679fabfa8dd572
ea4b2e14a0d00d8dd03dd5a69ff56da1e693dcd4
/Java-Examples-WORKSPACE/MyJavaExamples/src/com/nestedclasses/ClassInInterface.java
cb83a0a5413b200c180037b5edbc52331194e664
[]
no_license
umeshkilkile/java
c69aa244a3f62988cee94337b1b47581a35d1764
0879eecf56faae8842bcde7aebccb42b52c6d189
refs/heads/master
2020-04-09T22:36:28.326660
2019-01-04T11:02:49
2019-01-04T11:02:49
160,633,177
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.nestedclasses; public interface ClassInInterface { void howdy(); class Test implements ClassInInterface { @Override public void howdy() { System.out.println("Howdy!"); } public static void main(String[] args) { new Test().howdy(); } } }
[ "umeshsubhash.kilkile@lowes.com" ]
umeshsubhash.kilkile@lowes.com
5f158fcfc8673cb96db3c2d18c6c6c091d6a8a1d
bada32b901ca6907b9b3748e77cde27d66c06cac
/order-server/src/main/java/com/white/orderserver/OrderServerApplication.java
7512642d478373920e63e3eca259cb7392e7caaa
[]
no_license
white211/microservice
47e0534519f699f1eaabff2b3334c58e43307e24
a8165e2da6281b938b56814eb72da4e8e82e732b
refs/heads/master
2023-08-09T17:00:48.441173
2019-11-29T17:32:08
2019-11-29T17:32:08
183,912,521
0
0
null
2023-07-22T04:18:49
2019-04-28T13:34:14
Java
UTF-8
Java
false
false
324
java
package com.white.orderserver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class OrderServerApplication { public static void main(String[] args) { SpringApplication.run(OrderServerApplication.class, args); } }
[ "942364283@qq.com" ]
942364283@qq.com
1b623b4d4f4902ea3c88ee067eba8301a27630c7
05e8db6ca54457783b406d46049fd99fb1b27e41
/JAVA/Tp Java M1 STIC/BanqueInteractifJava/src/Compte.java
30e84c8cf0d368e6198a9af6dddc56cdfdd4bebb
[]
no_license
mohsenuss91/Academic
f860c21886b6915206cc0831bd1ff4acfc4df8e9
12507a09d9a821646f03464a72b17e2ba2c402b0
refs/heads/master
2016-09-05T15:45:02.440164
2016-02-03T14:47:35
2016-02-03T14:47:35
26,594,620
0
0
null
2014-11-13T18:21:01
2014-11-13T15:38:50
JavaScript
ISO-8859-2
Java
false
false
1,423
java
class Compte { private int numero ; //le numero du compte private double solde = 0;//le solde du compte /*Faire un depot sur le compte*/ public void depot(double valeur) { if (valeur>0){solde=solde + valeur;} else {System.out.println("Le montant est négatif");} } /*Faire un retrait sur le compte*/ public void retrait(double valeur) { if ((valeur>0)&&(this.solde>valeur)) {solde=solde - valeur; } else{ if(valeur<0){System.out.println("Attention, le montant est negative");} if(this.solde<valeur){System.out.println("Votre solde est inferieur au montant");} } } /*Obtenir la valeur du solde*/ public double getSolde() { return this.solde; } /*Obtenir la numero du compte*/ public int getNum() { return this.numero; } /* numero du compte*/ public void SetNum(int num) { this.numero=num; } /*Afficher le solde*/ public void afficherSolde() { System.out.println("Le solde du compte N°"+this.getNum()+ " est de "+solde+"DA"); } /*Faire un virement d'un compte a un autre*/ public void virer(double value,Compte destinataire) { double comps=this.getSolde(); if (value>0) { retrait(value); if(value<comps) destinataire.depot(value); }else{System.out.println("Attention, Le montant est negartif");} } }
[ "mohsenuss91@hotmail.com" ]
mohsenuss91@hotmail.com
99414d3ae2aa91d713c0584c524b2acfd6a4940e
3171f8d20b105bb4a884ebd541c9987ce21c569e
/app/ems-partinfo/src/main/java/cn/suntak/ems/partinfo/service/impl/OrderHeadServiceImpl.java
aab87888235aaeca21040db0269d15d8b75e9db0
[]
no_license
linpeiqin/suntak
d6726a690e5f4d5bfb3508bd9d8627d3f6b485cd
6ca83f93fe9a852ad28c7ce81a16d620b316868e
refs/heads/master
2021-01-21T20:49:38.698729
2017-05-24T11:19:57
2017-05-24T11:19:57
92,284,730
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package cn.suntak.ems.partinfo.service.impl; import cn.oz.dao.Page; import cn.oz.exception.OzException; import cn.oz.search.SearchQuery; import cn.oz.service.CRUDServiceImpl; import cn.suntak.ems.partinfo.dao.OrderHeadDao; import cn.suntak.ems.partinfo.domain.OrderHead; import cn.suntak.ems.partinfo.service.OrderHeadService; /** * * @author linking * @version 1.0.0 * @since 1.0.0 */ public class OrderHeadServiceImpl extends CRUDServiceImpl< OrderHead, Long, OrderHeadDao> implements OrderHeadService{ @Override public OrderHead create() throws OzException { return new OrderHead(); } @Override public void getPage(Page page, SearchQuery searchQuery) { this.getSimpleDao().getPage(page, searchQuery); } }
[ "286513319@qq.com" ]
286513319@qq.com
fe4195449fcdcd041ca99b6d84e82d4d2e7c3666
38801ab66863e9db549c2f3d5e73fb9fac4db3dc
/src/main/java/br/com/swconsultoria/nfe/schema_4/enviNFe/TConsReciNFe.java
70a578dc710a963be1ee274d9d87d8f29f53dbfd
[ "MIT" ]
permissive
tiagoceridorio/Java_NFe
c5050a89301678fe567e0c8b7766ad587040a0f6
bafd4dfb5938509ce3e15cf7aa5aad1d28e46422
refs/heads/master
2022-05-13T14:45:45.627504
2022-05-01T02:25:40
2022-05-01T02:25:40
84,336,574
1
0
MIT
2022-01-23T20:42:20
2017-03-08T15:35:21
Java
UTF-8
Java
false
false
2,917
java
package br.com.swconsultoria.nfe.schema_4.enviNFe; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Tipo Pedido de Consulta do Recido do Lote de Notas Fiscais Eletrônicas * * <p>Classe Java de TConsReciNFe complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="TConsReciNFe"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="tpAmb" type="{http://www.portalfiscal.inf.br/nfe}TAmb"/> * &lt;element name="nRec" type="{http://www.portalfiscal.inf.br/nfe}TRec"/> * &lt;/sequence> * &lt;attribute name="versao" use="required" type="{http://www.portalfiscal.inf.br/nfe}TVerNFe" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TConsReciNFe", namespace = "http://www.portalfiscal.inf.br/nfe", propOrder = { "tpAmb", "nRec" }) public class TConsReciNFe { @XmlElement(namespace = "http://www.portalfiscal.inf.br/nfe", required = true) protected String tpAmb; @XmlElement(namespace = "http://www.portalfiscal.inf.br/nfe", required = true) protected String nRec; @XmlAttribute(name = "versao", required = true) protected String versao; /** * Obtém o valor da propriedade tpAmb. * * @return * possible object is * {@link String } * */ public String getTpAmb() { return tpAmb; } /** * Define o valor da propriedade tpAmb. * * @param value * allowed object is * {@link String } * */ public void setTpAmb(String value) { this.tpAmb = value; } /** * Obtém o valor da propriedade nRec. * * @return * possible object is * {@link String } * */ public String getNRec() { return nRec; } /** * Define o valor da propriedade nRec. * * @param value * allowed object is * {@link String } * */ public void setNRec(String value) { this.nRec = value; } /** * Obtém o valor da propriedade versao. * * @return * possible object is * {@link String } * */ public String getVersao() { return versao; } /** * Define o valor da propriedade versao. * * @param value * allowed object is * {@link String } * */ public void setVersao(String value) { this.versao = value; } }
[ "samuk.exe@hotmail.com" ]
samuk.exe@hotmail.com
7fa018e6638bbf7fbe94e1c25c040e5c3114f8ed
ab59063ff2ae941b876324070d8f8e8165cef960
/chunking_text_file/40authors/Viscent/master/AbstractTerminatableThread.java
10e51077bdd54a6d97bdf6d20844503f35ed6027
[]
no_license
gpoorvi92/author_class
f7c26f46f1ca9608a8c98fb18fc74a544cf99c36
b079ef0a477a2868140d77c4b32c317d4492725e
refs/heads/master
2020-04-01T18:01:54.665333
2018-12-10T14:55:11
2018-12-10T14:55:11
153,466,983
1
0
null
2018-10-17T14:44:56
2018-10-17T14:03:04
Java
UTF-8
Java
false
false
3,103
java
/* 授权声明: 本源码系《Java多线程编程实战指南(设计模式篇)》一书(ISBN:978-1-7-121-27006-2,以下称之为“原书”)的配套源码, 欲了解本代码的更多细节,请参考原书。 本代码仅为原书的配套说明之用,并不附带任何承诺(如质量保证和收益)。 以任何形式将本代码之部分或者全部用于营利性用途需经版权人书面同意。 将本代码之部分或者全部用于非营利性用途需要在代码中保留本声明。 任何对本代码的修改需在代码中以注释的形式注明修改人、修改时间以及修改内容。 本代码可以从下URL下载: https://github.com/Viscent/javamtp http://www.broadview.com.cn/27006 */ package io.github.viscent.mtpattern.ch5.tpt; /** * 可停止的抽象线程。 * * 模式角色:Two-phaseTermination.AbstractTerminatableThread * * @author Viscent Huang */ public abstract class AbstractTerminatableThread extends Thread implements Terminatable { // 模式角色:Two-phaseTermination.TerminationToken public final TerminationToken terminationToken; public AbstractTerminatableThread() { this(new TerminationToken()); } /** * * @param terminationToken * 线程间共享的线程终止标志实例 */ public AbstractTerminatableThread(TerminationToken terminationToken) { super(); this.setDaemon(true); this.terminationToken = terminationToken; terminationToken.register(this); } /** * 留给子类实现其线程处理逻辑。 * * @throws Exception */ protected abstract void doRun() throws Exception; /** * 留给子类实现。用于实现线程停止后的一些清理动作。 * * @param cause */ protected void doCleanup(Exception cause) { // 什么也不做 } /** * 留给子类实现。用于执行线程停止所需的操作。 */ protected void doTerminiate() { // 什么也不做 } @Override public void run() { Exception ex = null; try { for (;;) { // 在执行线程的处理逻辑前先判断线程停止的标志。 if (terminationToken.isToShutdown() && terminationToken.reservations.get() <= 0) { break; } doRun(); } } catch (Exception e) { // 使得线程能够响应interrupt调用而退出 ex = e; } finally { try { doCleanup(ex); } finally { terminationToken.notifyThreadTermination(this); } } } @Override public void interrupt() { terminate(); } /* * 请求停止线程。 * * @see io.github.viscent.mtpattern.tpt.Terminatable#terminate() */ @Override public void terminate() { terminationToken.setToShutdown(true); try { doTerminiate(); } finally { // 若无待处理的任务,则试图强制终止线程 if (terminationToken.reservations.get() <= 0) { super.interrupt(); } } } public void terminate(boolean waitUtilThreadTerminated) { terminate(); if (waitUtilThreadTerminated) { try { this.join(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } }
[ "gpoorvi92@gmail.com" ]
gpoorvi92@gmail.com
657fdd4be1f98d17cf1b0f2bd82f1d6add9df345
ba6b506a9b27f3a7b1e264b200a605a29184998d
/src/java/edu/uns/escalafon/ejb/EscPersHorarioFacade.java
139dbbcb44fe0c98185bee68293f29cba0078544
[]
no_license
davidpy3/pegasusERP
3255158ce837b2e1256ea5dd639b94ec1bfc5dfa
0b6d8653c20f6c2d776249d9dc539dfc897a37b4
refs/heads/master
2021-01-10T11:51:18.822607
2015-11-16T21:57:18
2015-11-16T21:57:18
46,126,676
0
0
null
null
null
null
UTF-8
Java
false
false
284
java
package edu.uns.escalafon.ejb; import edu.uns.escalafon.jpa.EscPersHorario; import javax.ejb.Stateless; import org.jsuns.util.AbstractFacade; @Stateless public class EscPersHorarioFacade extends AbstractFacade<EscPersHorario> implements EscPersHorarioFacadeLocal { }
[ "TOSHIBA@192.168.1.34" ]
TOSHIBA@192.168.1.34
3e4961740c11190c209d66f08a3ac3a9f978fb7c
c7b70bfc62c76c6ee4c2c3dab1414c47f6af1754
/client/src/Class48.java
5d9278fe2485e614f6bdf98f6d086020af94f9a0
[]
no_license
EnlistedGhost/MorrowRealm-v718
4459bb58f5ceb4dca8e4ef5ee7dcd55e57951a6b
8608210d1a3a3bd4374200ffe938fc56d071b554
refs/heads/master
2020-06-01T21:26:28.610346
2019-06-24T18:48:29
2019-06-24T18:48:29
190,932,255
2
1
null
null
null
null
UTF-8
Java
false
false
1,152
java
/* Class48 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ import jaggl.OpenGL; public class Class48 { int anInt492; static int anInt493 = 35632; static int anInt494 = 35633; Class_ra_Sub2 aClass_ra_Sub2_495; static int[] anIntArray496 = new int[2]; Class48(Class_ra_Sub2 class_ra_sub2, int i, int i_0_) { ((Class48) this).aClass_ra_Sub2_495 = class_ra_sub2; ((Class48) this).anInt492 = i; } static Class48 method526(Class_ra_Sub2 class_ra_sub2, int i, String string) { int i_1_ = OpenGL.glCreateShader(i); OpenGL.glShaderSource(i_1_, string); OpenGL.glCompileShader(i_1_); OpenGL.glGetShaderiv(i_1_, 35713, anIntArray496, 0); if (anIntArray496[0] == 0) { if (anIntArray496[0] == 0) System.out.println(""); OpenGL.glGetShaderiv(i_1_, 35716, anIntArray496, 1); if (anIntArray496[1] > 1) { byte[] is = new byte[anIntArray496[1]]; OpenGL.glGetShaderInfoLog(i_1_, anIntArray496[1], anIntArray496, 0, is, 0); System.out.println(new String(is)); } if (anIntArray496[0] == 0) { OpenGL.glDeleteShader(i_1_); return null; } } return new Class48(class_ra_sub2, i_1_, i); } }
[ "enlisted.ghost@gmail.com" ]
enlisted.ghost@gmail.com
70e2ff692d25d40691f926f2b04faa129dc0f18d
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/response/AlipayInsSceneCouponReceiveResponse.java
12ad1a67f58e848b4e04b77b8eccfd3c83d056db
[ "Apache-2.0" ]
permissive
WindLee05-17/alipay-sdk-java-all
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
19ccb203268316b346ead9c36ff8aa5f1eac6c77
refs/heads/master
2022-11-30T18:42:42.077288
2020-08-17T05:57:47
2020-08-17T05:57:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
970
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.InsProduct; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ins.scene.coupon.receive response. * * @author auto create * @since 1.0, 2019-08-26 17:24:53 */ public class AlipayInsSceneCouponReceiveResponse extends AlipayResponse { private static final long serialVersionUID = 2472541557915729982L; /** * 保单凭证号;商户生成的外部投保业务号不传时则必传 */ @ApiField("policy_no") private String policyNo; /** * 保险产品 */ @ApiField("product") private InsProduct product; public void setPolicyNo(String policyNo) { this.policyNo = policyNo; } public String getPolicyNo( ) { return this.policyNo; } public void setProduct(InsProduct product) { this.product = product; } public InsProduct getProduct( ) { return this.product; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ff2a7ea1c22389bc14b6029667fd28053f1b6a8f
6494431bcd79c7de8e465481c7fc0914b5ef89d5
/src/main/java/com/coinbase/android/ui/SuccessRouter.java
2a591108b78c6d134ba502235303e51234a64e48
[]
no_license
maisamali/coinbase_decompile
97975a22962e7c8623bdec5c201e015d7f2c911d
8cb94962be91a7734a2182cc625efc64feae21bf
refs/heads/master
2020-06-04T07:10:24.589247
2018-07-18T05:11:02
2018-07-18T05:11:02
191,918,070
2
0
null
2019-06-14T09:45:43
2019-06-14T09:45:43
null
UTF-8
Java
false
false
2,306
java
package com.coinbase.android.ui; import android.text.TextUtils; import com.bluelinelabs.conductor.Controller; import com.coinbase.android.ControllerScope; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @ControllerScope public class SuccessRouter { public static final int SUCCESS_REQUEST_CODE = 66; public static final int SUCCESS_RESULT_CODE = 66; private final ActionBarController mController; private final Logger mLogger = LoggerFactory.getLogger(SuccessRouter.class); @Inject public SuccessRouter(ActionBarController controller) { this.mController = controller; } public boolean shouldRouteSuccess() { return !TextUtils.isEmpty(this.mController.getLocalRoot()); } public void routeSuccess() { Controller rootController; if (this.mController.getParentController() == null || this.mController.getParentController().getRouter() == null) { rootController = null; } else { rootController = this.mController.getParentController().getRouter().getControllerWithTag(this.mController.getLocalRoot()); } if (this.mController.getRouter().getControllerWithTag(this.mController.getLocalRoot()) != null && rootController == null) { this.mController.getRouter().getControllerWithTag(this.mController.getLocalRoot()).onActivityResult(66, 66, null); this.mController.getRouter().popToTag(this.mController.getLocalRoot()); } else if (rootController == null || this.mController.getParentController() == null) { this.mLogger.error("Couldn't pop to tag in success router [" + this.mController.getLocalRoot() + "]"); } else { this.mController.getParentController().removeChildRouter(this.mController.getRouter()); this.mController.getParentController().getRouter().getControllerWithTag(this.mController.getLocalRoot()).onActivityResult(66, 66, null); this.mController.getParentController().getRouter().popToTag(this.mController.getLocalRoot()); } } public boolean hasRootTag(Class<?> clazz) { if (shouldRouteSuccess()) { return TextUtils.equals(clazz.getName(), this.mController.getLocalRoot()); } return false; } }
[ "gulincheng@droi.com" ]
gulincheng@droi.com
63034a1ed39200435f0a307e8e8a08831c193200
79f54607037ed8be4f99dd2f366e889f5d03e9b0
/xCLCharts/src/main/java/org/xclcharts/chart/ArcLineData.java
21aa8d3594b3d3eafb8212d4d2c2efab262886d0
[]
no_license
willpyshan13/WifiClub1.0
76a3f25587bb7771ac35240571f7d4ecbcd345f0
e28b22e057ea9a35cc996627ffa5308a83d9b73b
refs/heads/master
2021-01-20T14:19:29.283428
2017-05-08T05:55:39
2017-05-08T05:55:39
90,591,181
0
0
null
null
null
null
UTF-8
Java
false
false
3,782
java
/** * Copyright 2014 XCL-Charts * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @Project XCL-Charts * @Description Android图表基类库 * @author XiongChuanLiang<br/>(xcl_168@aliyun.com) * @license http://www.apache.org/licenses/ Apache v2 License * @version 1.5 */ package org.xclcharts.chart; import android.util.Log; import org.xclcharts.common.MathHelper; /** * @author XiongChuanLiang<br/>(xcl_168@aliyun.com) * @ClassName ArcLineData * @Description 弧线比较图数据类 */ public class ArcLineData { private final String TAG = "RoundBarData"; private String mKey = ""; private String mLabel = ""; private double mValue = 0.0f; private int mColor = 0; public ArcLineData() { // TODO Auto-generated constructor stub //super(); } /** * @param label 标签 * @param percent 百分比 * @param color 显示颜色 */ public ArcLineData(String label, double percent, int color) { setLabel(label); setPercentage(percent); setBarColor(color); } /** * @param key 键值 * @param label 标签 * @param percent 百分比 * @param color 显示颜色 */ public ArcLineData(String key, String label, double percent, int color) { setLabel(label); setPercentage(percent); setBarColor(color); setKey(key); } /** * 设置Key值 * * @param key Key值 */ public void setKey(String key) { mKey = key; } /** * 返回Key值 * * @return Key值 */ public String getKey() { return mKey; } /** * 设置标签 * * @param label 标签 */ public void setLabel(String label) { mLabel = label; } /** * 设置百分比,绘制时,会将其转换为对应的圆心角 * * @param value 百分比 */ public void setPercentage(double value) { mValue = value; } /** * 设置扇区颜色 * * @param color 颜色 */ public void setBarColor(int color) { mColor = color; } /** * 返回标签 * * @return 标签 */ public String getLabel() { return mLabel; } /** * 返回当前百分比 * * @return 百分比 */ public double getPercentage() { return mValue; } /** * 返回扇区颜色 * * @return 颜色 */ public int getBarColor() { return mColor; } /** * 将百分比转换为图显示角度 * * @return 圆心角度 */ public float getSliceAngle() { float Angle = 0.0f; try { float currentValue = (float) this.getPercentage(); if (currentValue >= 101f || currentValue < 0.0f) { Log.e(TAG, "输入的百分比不合规范.须在0~100之间."); } else { //Angle = (float) Math.rint( 360f * (currentValue / 100f) ); Angle = MathHelper.getInstance().round(360f * (currentValue / 100f), 2); } } catch (Exception ex) { Angle = -1f; } finally { } return Angle; } }
[ "545512533@qq.com" ]
545512533@qq.com
427ec4acbfef0afef6a358ddf9c69f99e1decbf9
bf7b4c21300a8ccebb380e0e0a031982466ccd83
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/Security/QOP.java
4c131395972b5d68d62136957dcde8fee9e93586
[]
no_license
Puriakshat/Tuberlin
3fe36b970aabad30ed95e8a07c2f875e4912a3db
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
refs/heads/master
2021-01-19T07:30:16.857479
2014-11-06T18:49:16
2014-11-06T18:49:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,996
java
package org.omg.Security; /** * Generated from IDL enum "QOP". * * @author JacORB IDL compiler V @project.version@ * @version generated at 27-May-2014 20:14:30 */ public final class QOP implements org.omg.CORBA.portable.IDLEntity { /** Serial version UID. */ private static final long serialVersionUID = 1L; private int value = -1; public static final int _SecQOPNoProtection = 0; public static final QOP SecQOPNoProtection = new QOP(_SecQOPNoProtection); public static final int _SecQOPIntegrity = 1; public static final QOP SecQOPIntegrity = new QOP(_SecQOPIntegrity); public static final int _SecQOPConfidentiality = 2; public static final QOP SecQOPConfidentiality = new QOP(_SecQOPConfidentiality); public static final int _SecQOPIntegrityAndConfidentiality = 3; public static final QOP SecQOPIntegrityAndConfidentiality = new QOP(_SecQOPIntegrityAndConfidentiality); public int value() { return value; } public static QOP from_int(int value) { switch (value) { case _SecQOPNoProtection: return SecQOPNoProtection; case _SecQOPIntegrity: return SecQOPIntegrity; case _SecQOPConfidentiality: return SecQOPConfidentiality; case _SecQOPIntegrityAndConfidentiality: return SecQOPIntegrityAndConfidentiality; default: throw new org.omg.CORBA.BAD_PARAM(); } } public String toString() { switch (value) { case _SecQOPNoProtection: return "SecQOPNoProtection"; case _SecQOPIntegrity: return "SecQOPIntegrity"; case _SecQOPConfidentiality: return "SecQOPConfidentiality"; case _SecQOPIntegrityAndConfidentiality: return "SecQOPIntegrityAndConfidentiality"; default: throw new org.omg.CORBA.BAD_PARAM(); } } protected QOP(int i) { value = i; } /** * Designate replacement object when deserialized from stream. See * http://www.omg.org/docs/ptc/02-01-03.htm#Issue4271 * * @throws java.io.ObjectStreamException */ java.lang.Object readResolve() throws java.io.ObjectStreamException { return from_int(value()); } }
[ "puri.akshat@gmail.com" ]
puri.akshat@gmail.com
0edf1f1d3e4033edf51583ea5438e75f481d5fef
46f0d8511a43a442d403095c0da83d7f10946279
/kmn/src/id/ac/idu/irs/dao/impl/CutimhsDAOImpl.java
e5ab9f6aeca40af2e1b6e287aa2e788aaccf8eab
[]
no_license
gopichaithanya/kmn-med-equip-int
6d26c258f94dd7cd1232da3cf6bdb3329e4dc283
d20c3dfb9552a85ef5c9157f058677474cf2ad26
refs/heads/master
2021-01-10T22:06:58.175568
2015-03-09T10:07:21
2015-03-09T10:07:21
35,512,139
0
0
null
null
null
null
UTF-8
Java
false
false
1,694
java
package id.ac.idu.irs.dao.impl; import id.ac.idu.backend.dao.impl.BasisDAO; import id.ac.idu.backend.model.Tcutimhs; import id.ac.idu.irs.dao.CutimhsDAO; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.springframework.dao.support.DataAccessUtils; import java.util.Date; import java.util.List; /** * User: hermanto * Date: 08 Mar 12 * Time: 9:03:21 */ public class CutimhsDAOImpl extends BasisDAO<Tcutimhs> implements CutimhsDAO { @Override public Tcutimhs getNew() { return new Tcutimhs(); } @Override public Tcutimhs getByNo(String _no) { return get(Tcutimhs.class, _no); } @Override public List<Tcutimhs> getAll() { return getHibernateTemplate().loadAll(Tcutimhs.class); } @Override public List<Tcutimhs> getByTanggal(Date _tanggal) { DetachedCriteria criteria = DetachedCriteria.forClass(Tcutimhs.class); criteria.add(Restrictions.eq("dtglsurat", _tanggal)); return getHibernateTemplate().findByCriteria(criteria); } @Override public List<Tcutimhs> getByTahun(String _tahun) { DetachedCriteria criteria = DetachedCriteria.forClass(Tcutimhs.class); criteria.add(Restrictions.eq("cthajar", _tahun)); return getHibernateTemplate().findByCriteria(criteria); } @Override public void deleteByNo(String _no) { Tcutimhs cutimhs = getByNo(_no); if(cutimhs != null) delete(cutimhs); } @Override public int getCount() { return DataAccessUtils.intResult(getHibernateTemplate().find("select count(*) from Tcutimhs")); } }
[ "valeo.gumilang@gmail.com@72968348-e250-7342-0a59-a134bd1d5c99" ]
valeo.gumilang@gmail.com@72968348-e250-7342-0a59-a134bd1d5c99
24bcf4d3b02051af185399eb21fca23f577ec080
9965a5193c8230acbb0e7a7caa468c7dc9b4a099
/src/test/java/chap09/UserGivenHelperTest.java
21ea939a9d42afd6fe28df259266897d605c9197
[]
no_license
eeswk/myTdd
3e0e65062a4815f2416583c57b53123e41d7799c
f922dc906e4db19ed021dc125c0c828bc622fb3a
refs/heads/master
2021-03-12T10:38:31.132621
2020-04-02T15:17:38
2020-04-02T15:17:38
246,613,083
0
0
null
2023-09-08T12:20:36
2020-03-11T15:46:42
Java
UTF-8
Java
false
false
1,630
java
package chap09; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @SpringBootTest public class UserGivenHelperTest { @Autowired private UserRegister register; @Autowired private JdbcTemplate jdbcTemplate; private UserGivenHelper given; @BeforeEach void setUp() { given = new UserGivenHelper(jdbcTemplate); } @Test void dupId() { given.givenUser("cbk","strongpw", "cbk@email.com"); //실행, 결과확인 assertThrows(DupIdException.class, () -> register.register("cbk","strongpw", "cbk@email.com")); } @Test void changeEmailTest() { given.givenUser("cbk","strongpw", "cbk1@email.com"); given.changeEmail("cbk", "strongpw", "cbk2@email.com"); SqlRowSet rs = jdbcTemplate.queryForRowSet("select * from user where id = ? ", "cbk"); rs.next(); assertEquals("cbk2@email.com", rs.getString("email")); } @Test void 존재하지_않으면_저장함() { register.register("cbk2", "strongpw","cbk2@email.com"); SqlRowSet rs = jdbcTemplate.queryForRowSet("select * from user where id = ? ", "cbk2"); rs.next(); assertEquals("cbk2", rs.getString("id")); } }
[ "themorning84@gmail.com" ]
themorning84@gmail.com
011af3f8f75e92999b0265b6853529f6bdc5273d
f79fe306ab22040c13042278decd9c5227e7bf44
/thread/src/com/thinlk/threadDemo5/MyRunnableTest.java
d30dcfd2a14d3e789d1a2c346f78065c5502e9c7
[]
no_license
lancer82/JavaPractice
876e2f6f48c23c4ddade5cac20a380a3f2e55ff7
3ad707670d74c2a95f803900ae6f41198ea65bb6
refs/heads/master
2023-05-13T16:00:04.945323
2021-05-24T12:47:26
2021-05-24T12:47:26
288,116,462
0
0
null
null
null
null
UTF-8
Java
false
false
428
java
package com.thinlk.threadDemo5; public class MyRunnableTest { public static void main(String[] args) { MyRunnable mr = new MyRunnable(); Thread t1 = new Thread(mr); Thread t2 = new Thread(mr); Thread t3 = new Thread(mr); t1.setName("窗口一"); t2.setName("窗口二"); t3.setName("窗口三"); t1.start(); t2.start(); t3.start(); } }
[ "lp_job@163.com" ]
lp_job@163.com
f7c44681d957ae6f136496fbe4845a98b3399ecd
243a31a30a60dbf7521e2e0d780177b5851d3b71
/spring-security-modules/spring-security-mvc-custom/src/main/java/com/tom/web/controller/FooController.java
42010110d022ecd5a8f82ee694098f33695ebbb6
[]
no_license
tomlxq/tutorials
db6c5524d0324631c4b5d9338ed9e20b9efa87f7
3bd7739e89b6d5dff3e4518c0b8fe98425600809
refs/heads/master
2020-12-19T07:13:42.578910
2020-07-19T16:23:10
2020-07-19T16:23:10
235,655,480
0
0
null
2020-06-13T02:00:22
2020-01-22T20:00:48
Java
UTF-8
Java
false
false
1,794
java
package com.tom.web.controller; import com.tom.web.dto.Foo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.util.UriComponentsBuilder; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; @Controller @RequestMapping(value = "/auth/foos") public class FooController { @Autowired private ApplicationEventPublisher eventPublisher; public FooController() { super(); } // API // read - single @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public Foo findById(@PathVariable("id") final Long id, final UriComponentsBuilder uriBuilder, final HttpServletResponse response) { return new Foo(randomAlphabetic(6)); } // read - multiple @RequestMapping(method = RequestMethod.GET) @ResponseBody public List<Foo> findAll() { return Arrays.asList(new Foo(randomAlphabetic(6))); } // write - just for test @RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) @ResponseBody public Foo create(@RequestBody final Foo foo) { return foo; } }
[ "21429503@qq.com" ]
21429503@qq.com
6757d8ca0c8aa16e0cc4c635e228283dbaab4b97
1a3073840ac16e160ff6f351b77d4658b5ce8bc7
/platforms/spring-boot/components-starter/camel-sql-starter/src/main/java/org/apache/camel/component/sql/springboot/SqlComponentConfiguration.java
5ce7925e82fc99e84b7d7b7a12c8e30a2d030f37
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "Apache-2.0" ]
permissive
fastfishio/camel
84d5f4af6a71398cdb64d8a5aa5a9ef38bd51a29
0e20f47645becc2eb72a97b8564546dfe218ff2e
refs/heads/master
2021-09-14T22:53:17.000689
2020-12-21T16:41:48
2020-12-21T16:41:48
81,466,332
0
0
Apache-2.0
2021-06-28T13:22:51
2017-02-09T15:47:24
Java
UTF-8
Java
false
false
1,908
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.component.sql.springboot; import javax.sql.DataSource; import org.springframework.boot.context.properties.ConfigurationProperties; /** * The sql component allows you to work with databases using JDBC SQL queries. * * Generated by camel-package-maven-plugin - do not edit this file! */ @ConfigurationProperties(prefix = "camel.component.sql") public class SqlComponentConfiguration { /** * Sets the DataSource to use to communicate with the database. */ private DataSource dataSource; /** * Sets whether to use placeholder and replace all placeholder characters * with sign in the SQL queries. This option is default true */ private Boolean usePlaceholder = true; public DataSource getDataSource() { return dataSource; } public void setDataSource(DataSource dataSource) { this.dataSource = dataSource; } public Boolean getUsePlaceholder() { return usePlaceholder; } public void setUsePlaceholder(Boolean usePlaceholder) { this.usePlaceholder = usePlaceholder; } }
[ "davsclaus@apache.org" ]
davsclaus@apache.org
94e05fdc2106b488101000b7c933db2c1efaa96b
1593413117aac6b9118e00d17038a62698663fb1
/src/krasa/editorGroups/tabs/impl/DefaultEditorTabsPainter.java
d4757cbd31cf09634eeaaf9dd13dbef597ce8ad7
[ "Apache-2.0" ]
permissive
kool79/EditorGroups
f40840807b4ac7519e7658aea4d0a687b22aa3a4
c3a87c4a133764bf4e16da674e18cf122526ffb5
refs/heads/master
2020-06-13T15:48:58.396441
2019-05-26T14:42:39
2019-05-26T14:42:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,269
java
/* * Copyright 2000-2017 JetBrains s.r.o. * * 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 krasa.editorGroups.tabs.impl; import com.intellij.ui.ColorUtil; import com.intellij.ui.Gray; import com.intellij.ui.JBColor; import com.intellij.util.ui.UIUtil; import java.awt.*; /** * @author Konstantin Bulenkov */ @SuppressWarnings("UseJBColor") public class DefaultEditorTabsPainter extends JBEditorTabsPainter { public DefaultEditorTabsPainter(JBEditorTabs tabs) { super(tabs); } @Override public void doPaintInactive(Graphics2D g2d, Rectangle effectiveBounds, int x, int y, int w, int h, Color tabColor, int row, int column, boolean vertical) { g2d.setColor(tabColor != null ? tabColor : getDefaultTabColor()); g2d.fillRect(x, y, w, h); g2d.setColor(getInactiveMaskColor()); g2d.fillRect(x, y, w, h); } @Override public void doPaintBackground(Graphics2D g, Rectangle clip, boolean vertical, Rectangle rectangle) { g.setColor(getBackgroundColor()); g.fill(clip); } public void fillSelectionAndBorder(Graphics2D g, JBTabsImpl.ShapeInfo selectedShape, Color tabColor, int x, int y, int height) { g.setColor(tabColor != null ? tabColor : getDefaultTabColor()); g.fill(selectedShape.fillPath.getShape()); //g.draw(selectedShape.fillPath.getShape()); } @Override public Color getBackgroundColor() { return myTabs.hasUnderlineSelection() ? new JBColor(Gray._255, Gray.x4B) : UIUtil.CONTRAST_BORDER_COLOR; } protected Color getDefaultTabColor() { if (myDefaultTabColor != null) { return myDefaultTabColor; } return Color.WHITE; } protected Color getInactiveMaskColor() { return ColorUtil.withAlpha(new Color(0x262626), .2); } }
[ "vojta.krasa@gmail.com" ]
vojta.krasa@gmail.com
9d3ba9aa14e97641b57990ffc3ea6b04d88bbf6a
9ff08a955c7661b35e90d6f822d0843bdf12c507
/Chapter13/src/main/java/it/vige/webprogramming/servletjsp/eventlistener/SampleHttpSessionActivationListener.java
8b396094bca669a68e41b2054adae70d67019d72
[ "MIT" ]
permissive
PacktPublishing/Mastering-Java-EE-Development-with-WildFly
db5cca03f852767e5eecb2ad32c9c3eda61410e3
619c0e94defd0249c778a10776dae4acafe56616
refs/heads/master
2023-02-06T08:04:33.128572
2023-01-30T08:32:56
2023-01-30T08:32:56
94,743,961
13
17
null
null
null
null
UTF-8
Java
false
false
998
java
package it.vige.webprogramming.servletjsp.eventlistener; import static java.util.logging.Logger.getLogger; import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; import javax.servlet.http.HttpSessionActivationListener; import javax.servlet.http.HttpSessionEvent; public class SampleHttpSessionActivationListener implements HttpSessionActivationListener { private static final Logger logger = getLogger(SampleHttpSessionActivationListener.class.getName()); public static Set<Integer> sampleHttpSessionActivationSet = new HashSet<Integer>(); @Override public void sessionWillPassivate(HttpSessionEvent se) { logger.info("MyHttpSessionActivationListener.sessionWillPassivate: " + se.getSession().getId()); sampleHttpSessionActivationSet.add(1); } @Override public void sessionDidActivate(HttpSessionEvent se) { logger.info("MyHttpSessionActivationListener.sessionDidActivate: " + se.getSession().getId()); sampleHttpSessionActivationSet.add(2); } }
[ "murtazat@packtpub.com" ]
murtazat@packtpub.com
f4c6b4cfb37e69fbc719719da635f275f6454073
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-81-29-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java
536e0ffdcf9717f0bc367287e404144bffa592ce
[]
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
576
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 22:15:41 UTC 2020 */ package org.xwiki.velocity.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3dda8466df92acf46a7a0255c8e675dbe55bbbe8
a636258c60406f8db850d695b064836eaf75338b
/src-gen/org/openbravo/model/manufacturing/processplan/ProcessPlanTotalizedAux.java
831b090b939387d020e3c4c2f06abb053f27a3ee
[]
no_license
Afford-Solutions/openbravo-payroll
ed08af5a581fa41455f4e9b233cb182d787d5064
026fee4fe79b1f621959670fdd9ae6dec33d263e
refs/heads/master
2022-03-10T20:43:13.162216
2019-11-07T18:31:05
2019-11-07T18:31:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,651
java
/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2008-2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ package org.openbravo.model.manufacturing.processplan; import java.math.BigDecimal; import org.openbravo.base.structure.BaseOBObject; /** * Entity class for entity ProcessPlanTotalized (stored in table MA_ProcessPlan_Tot_Aux). * * NOTE: This class should not be instantiated directly. To instantiate this * class the {@link org.openbravo.base.provider.OBProvider} should be used. */ public class ProcessPlanTotalizedAux extends BaseOBObject { private static final long serialVersionUID = 1L; public static final String TABLE_NAME = "MA_ProcessPlan_Tot_Aux"; public static final String ENTITY_NAME = "ProcessPlanTotalized"; public static final String PROPERTY_PROCESSPLAN = "processPlan"; public static final String PROPERTY_PROCESSPLANVERSION = "processPlanVersion"; public static final String PROPERTY_PRODUCED = "produced"; public static final String PROPERTY_PROQTY = "proqty"; public static final String PROPERTY_DEPENDANTPRODUCT = "dependantproduct"; public static final String PROPERTY_DEPQTY = "depqty"; public static final String PROPERTY_ID = "id"; public ProcessPlanTotalizedAux() { } @Override public String getEntityName() { return ENTITY_NAME; } public ProcessPlan getProcessPlan() { return (ProcessPlan) get(PROPERTY_PROCESSPLAN); } public void setProcessPlan(ProcessPlan processPlan) { set(PROPERTY_PROCESSPLAN, processPlan); } public Version getProcessPlanVersion() { return (Version) get(PROPERTY_PROCESSPLANVERSION); } public void setProcessPlanVersion(Version processPlanVersion) { set(PROPERTY_PROCESSPLANVERSION, processPlanVersion); } public String getProduced() { return (String) get(PROPERTY_PRODUCED); } public void setProduced(String produced) { set(PROPERTY_PRODUCED, produced); } public BigDecimal getProqty() { return (BigDecimal) get(PROPERTY_PROQTY); } public void setProqty(BigDecimal proqty) { set(PROPERTY_PROQTY, proqty); } public String getDependantproduct() { return (String) get(PROPERTY_DEPENDANTPRODUCT); } public void setDependantproduct(String dependantproduct) { set(PROPERTY_DEPENDANTPRODUCT, dependantproduct); } public BigDecimal getDepqty() { return (BigDecimal) get(PROPERTY_DEPQTY); } public void setDepqty(BigDecimal depqty) { set(PROPERTY_DEPQTY, depqty); } public String getId() { return (String) get(PROPERTY_ID); } public void setId(String id) { set(PROPERTY_ID, id); } }
[ "rcss@ubuntu-server.administrator" ]
rcss@ubuntu-server.administrator
8fd366613b9f59536a88a74b983923447537e14a
71a07503f21ea6c27c22f227ce83a64b26c023d7
/src/main/java/com/greenright/dao/UpcyclingRecommendDao.java
e146281e4cd3284f0adcc0c3fc850a8be4b77b14
[]
no_license
icewaterdrop/greenright
ef8730e4a809a3359a6f322642cd7daef9d92c65
2a5a1bcb477c519b89ec7f194e43f50a7a800918
refs/heads/master
2020-09-20T04:41:36.916202
2019-11-27T01:50:55
2019-11-27T01:50:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package com.greenright.dao; import com.greenright.domain.UpcyclingRecommend; public interface UpcyclingRecommendDao { int insertRecommend(UpcyclingRecommend upcyclingRecommend) throws Exception; int deleteRecommend(UpcyclingRecommend upcyclingRecommend) throws Exception; int CountRecommendForCheck(UpcyclingRecommend upcyclingRecommend) throws Exception; int CountRecommend(int productNo) throws Exception; }
[ "karnenis@gmail.com" ]
karnenis@gmail.com
078994ca87914f5ddeb4d97bad04521bed9fe978
2ff78e0994cb710a619b79659d64d2617cc3e586
/code/RecycleRush/src/frc492/CANTalonServo.java
d8fcd898b0edcd53931653d1bcf9a2cda24b3897
[ "MIT" ]
permissive
trc492/Frc2015RecycleRush
d2d662ff8ea653a9f2aad3fe444b98e1800de5e6
302e06aaa89560d20ed34fd89eac05f2d77805bb
refs/heads/master
2021-01-10T01:59:40.009034
2018-05-27T19:32:48
2018-05-27T19:32:48
49,762,591
0
0
null
null
null
null
UTF-8
Java
false
false
1,547
java
package frc492; import edu.wpi.first.wpilibj.CANTalon; public class CANTalonServo extends CANTalon { private double m_kEMF; // Velocity to voltage public void kEMF(double val) { m_kEMF = val; } public double kEMF() {return m_kEMF; } private double m_Drive; // Requested torque output public void Drive(double val) { m_Drive = val; } public double Drive() {return m_Drive; } private boolean m_Saturated; public boolean isSaturated() { return m_Saturated; } public CANTalonServo(int deviceNumber) { super(deviceNumber); } // Torque, like drive, is -1.0 to 1.0. No compensation for voltage // variation (could do this with more math and sampling bus voltage) // Assumes incremental encoder attached to Talon. NB the velocity values // returned are counts/.1 sec. Could compute velocity in terms of the // call rate, I suppose. // // Math: Apply full power (1.0), measure velocity, then kEMF becomes 1.0/vel // Probably should have separate values for reverse as sometimes the PMDC // motors have their coils shifted and thus differing kEMF. // // To handle varying bus voltage, the math would be (untested) // kEMF = 1.0/vBus/Velocity. Then the required additional drive would be // Velocity * kEMF/vBus - thus boosted as vBus sags. // public void setTorque(double torque) { double output = m_Drive + (m_kEMF * getEncVelocity()); m_Saturated = true; if (output > 1.0) this.set(1.0); else if (output < -1.0) this.set(-1.0); else { this.set(output); m_Saturated = false; } } }
[ "trc492@live.com" ]
trc492@live.com
265dccef196db52798b9b8343c8b8565449e5b2f
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/google/android/gms/internal/ads/wh.java
4c8327d91d71fa45759f3447ff24de10cac94467
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
520
java
package com.google.android.gms.internal.ads; final class wh implements zzapv { /* renamed from: a */ private final /* synthetic */ zzaps f16718a; /* renamed from: b */ private final /* synthetic */ zzwp f16719b; wh(zzxn zzxn, zzaps zzaps, zzwp zzwp) { this.f16718a = zzaps; this.f16719b = zzwp; } /* renamed from: a */ public final void mo1940a() { this.f16718a.m21289a(new zzxb("Unable to obtain a JavascriptEngine.")); this.f16719b.m26858c(); } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
4d99844d0cb61c6084063dde2ff992e0d64b7c28
4f6a5237c7dfaac0687b9214d0b38c3178e829fc
/generatewordslist/src/main/groovy/com/anysoftkeyboard/tools/generatewordslist/Parser.java
cbce27f3a0099a6e6b28484a991656d88af33c03
[]
no_license
Fuish/AnySoftKeyboardTools
b8b58c42cdc00242004cb42e83940102961a1149
c00bc22ab2f7561633bcb2d6879ea0740ccad633
refs/heads/master
2021-01-22T01:12:22.386642
2016-05-06T13:43:49
2016-05-06T13:43:49
58,502,520
1
0
null
2016-05-11T00:40:46
2016-05-11T00:40:45
Java
UTF-8
Java
false
false
4,990
java
package com.anysoftkeyboard.tools.generatewordslist; import java.io.*; import java.util.*; class Parser { private final static int LOOKING_FOR_WORD_START = 1; private final static int LOOKING_FOR_WORD_END = 2; private final InputStreamReader mInput; private final OutputStreamWriter mOutput; private final HashSet<Character> mLangChars; private final HashSet<Character> mLangInnerChars; private final HashMap<String, WordWithCount> mWords; private final long mInputSize; private final int mMaxListSize; private final Locale mLocale; public Parser(File inputFile, File outputFile, char[] wordCharacters, Locale locale, char[] additionalInnerWordCharacters, int maxListSize) throws IOException { if (!inputFile.exists()) throw new IOException("Could not file input file " + inputFile); if (!inputFile.isFile()) throw new IOException("Input must be a file."); mLocale = locale; mMaxListSize = maxListSize; mInputSize = inputFile.length(); mInput = new InputStreamReader(new FileInputStream(inputFile)); mOutput = new OutputStreamWriter(new FileOutputStream(outputFile)); mLangInnerChars = new HashSet<>(additionalInnerWordCharacters.length + wordCharacters.length); mLangChars = new HashSet<>(wordCharacters.length); for (char c : wordCharacters) { mLangChars.add(c); mLangInnerChars.add(c); } for (char c : additionalInnerWordCharacters) { mLangInnerChars.add(c); } mWords = new HashMap<>(); System.out.println(String.format(Locale.US, "Parsing '%s' for maximum %d words, and writing into '%s'.", inputFile, mMaxListSize, outputFile)); } public void parse() throws IOException { System.out.println("Reading input..."); addWordsFromInputStream(mInput); mInput.close(); System.out.println("Sorting list..."); List<WordWithCount> sortedList = new ArrayList<>(Math.min(mWords.size(), mMaxListSize)); sortedList.addAll(mWords.values()); Collections.sort(sortedList); System.out.println("Creating output XML file..."); createXml(sortedList, mOutput, mMaxListSize); mOutput.flush(); mOutput.close(); System.out.println("Done."); } public static void createXml(List<WordWithCount> sortedList, Writer outputWriter, int maxListSize) throws IOException { final int wordsCount = Math.min(maxListSize, sortedList.size()); XmlWriter writer = new XmlWriter(outputWriter, false, 0, true); writer.writeEntity("wordlist"); for (int wordIndex = 0; wordIndex < wordsCount; wordIndex++) { WordWithCount word = sortedList.get(wordIndex); writer.writeEntity("w").writeAttribute("f", Integer.toString(calcActualFreq(wordIndex, wordsCount))).writeText(word.getWord()).endEntity(); } System.out.println("Wrote "+wordsCount+" words."); writer.endEntity(); } private static int calcActualFreq(double wordIndex, double wordsCount) { return Math.min(255, 1 + (int) (255 * (wordsCount - wordIndex) / wordsCount)); } private void addWordsFromInputStream(InputStreamReader input) throws IOException { StringBuilder word = new StringBuilder(); int intChar; int state = LOOKING_FOR_WORD_START; int read = 0; while ((intChar = input.read()) > 0) { if ((read % 50000) == 0) { System.out.println("Read " + read + " out of " + mInputSize + " (" + ((100 * read) / mInputSize) + "%)..."); } char currentChar = (char) intChar; read++; switch (state) { case LOOKING_FOR_WORD_START: if (mLangChars.contains(currentChar)) { word.append(currentChar); state = LOOKING_FOR_WORD_END; } break; case LOOKING_FOR_WORD_END: if (mLangInnerChars.contains(currentChar)) { word.append(currentChar); } else { addWord(word); word.setLength(0); state = LOOKING_FOR_WORD_START; } } } //last word? if (word.length() > 0) addWord(word); } private void addWord(StringBuilder word) { //removing all none chars from the end. String typedWord = word.toString(); String wordKey = typedWord.toLowerCase(mLocale); if (mWords.containsKey(wordKey)) { mWords.get(wordKey).addFreq(typedWord); } else { mWords.put(wordKey, new WordWithCount(typedWord)); } } }
[ "menny@evendanan.net" ]
menny@evendanan.net
061eac4a877369a96570308ccef3272b867454ad
95fa181c8a9bb16b19eb21a43b8b66bac4db0eac
/PR171-DBFlow/app/src/main/java/es/iessaladillo/pedrojoya/pr171/db/Alumno.java
e7a53241408aded3a3dfa2ad92583d92a1a2591d
[]
no_license
Maycon1992/studio
4ec746b46fc2d4a2ffb5ec6f739459034d213cfc
0eb083b259786920efbd086ab02fca4164d032e4
refs/heads/master
2021-01-02T09:20:10.630345
2016-12-21T11:40:14
2016-12-21T11:40:14
78,685,531
1
0
null
2017-01-11T22:25:38
2017-01-11T22:25:38
null
UTF-8
Java
false
false
3,407
java
package es.iessaladillo.pedrojoya.pr171.db; import android.os.Parcel; import android.os.Parcelable; import com.raizlabs.android.dbflow.annotation.Column; import com.raizlabs.android.dbflow.annotation.ForeignKey; import com.raizlabs.android.dbflow.annotation.PrimaryKey; import com.raizlabs.android.dbflow.annotation.Table; import com.raizlabs.android.dbflow.config.FlowManager; import com.raizlabs.android.dbflow.sql.language.SQLite; import com.raizlabs.android.dbflow.structure.BaseModel; import com.raizlabs.android.dbflow.structure.container.ForeignKeyContainer; import java.util.List; @Table(database = Instituto.class) public class Alumno extends BaseModel implements Parcelable { @PrimaryKey(autoincrement = true) @Column private long id; @Column private String avatar; @Column private String nombre; @Column private String telefono; @Column private String direccion; @ForeignKey(saveForeignKeyModel = false) ForeignKeyContainer<Curso> cursoForeignKeyContainer; Curso curso; public void setCurso(Curso curso) { cursoForeignKeyContainer = FlowManager.getContainerAdapter(Curso.class).toForeignKeyContainer(curso); } public Curso getCurso() { return cursoForeignKeyContainer.load(); } List<Asignatura_Alumno> asignaturas; public List<Asignatura_Alumno> getAsignaturas() { if (asignaturas == null || asignaturas.isEmpty()) { asignaturas = SQLite.select() .from(Asignatura_Alumno.class) .where(Asignatura_Alumno_Table.alumno_id.eq(id)) .queryList(); } return asignaturas; } public Alumno() { } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getTelefono() { return telefono; } public void setTelefono(String telefono) { this.telefono = telefono; } public String getDireccion() { return direccion; } public void setDireccion(String direccion) { this.direccion = direccion; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(this.id); dest.writeString(this.avatar); dest.writeString(this.nombre); dest.writeString(this.telefono); dest.writeString(this.direccion); dest.writeParcelable(getCurso(), 0); } protected Alumno(Parcel in) { this.id = in.readLong(); this.avatar = in.readString(); this.nombre = in.readString(); this.telefono = in.readString(); this.direccion = in.readString(); setCurso((Curso) in.readParcelable(Curso.class.getClassLoader())); } public static final Creator<Alumno> CREATOR = new Creator<Alumno>() { public Alumno createFromParcel(Parcel source) { return new Alumno(source); } public Alumno[] newArray(int size) { return new Alumno[size]; } }; }
[ "pedrojoya@gmail.com" ]
pedrojoya@gmail.com
9c1522d008b7ba8003f15de2324acbfbaae730be
e35ec48addb74fd2c32883624356f15679d54e80
/app/src/main/java/com/jxxx/zf/bean/AdviserListBean.java
afc45461f8353720ca6cbf3f57aa4082d78e9012
[]
no_license
ltg263/ZuFang
e6e816dd7910640579026b5bef7c43dd223f109a
2e0195b52e63f1de01f9ace57f449494c1ae0764
refs/heads/master
2023-07-01T22:18:40.870333
2021-08-19T03:55:48
2021-08-19T03:55:48
371,552,449
0
0
null
null
null
null
UTF-8
Java
false
false
3,767
java
package com.jxxx.zf.bean; import java.util.List; public class AdviserListBean { /** * count : 1 * list : [{"businessAreaId":1,"createTime":1625625305000,"delTf":0,"id":1,"imgUrl":"tu.jpg","mobile":"15958243735","note":"说明","realName":"AAA","score":4.6,"serverNum":33,"status":1,"userId":7}] */ private String count; private List<ListBean> list; public String getCount() { return count; } public void setCount(String count) { this.count = count; } public List<ListBean> getList() { return list; } public void setList(List<ListBean> list) { this.list = list; } public static class ListBean { /** * businessAreaId : 1 * createTime : 1625625305000 * delTf : 0 * id : 1 * imgUrl : tu.jpg * mobile : 15958243735 * note : 说明 * realName : AAA * score : 4.6 * serverNum : 33 * status : 1 * userId : 7 */ private String adviserAuthentication; private String businessAreaId; private String createTime; private String delTf; private String id; private String imgUrl; private String mobile; private String note; private String realName; private float score; private String serverNum; private String status; private String userId; public void setAdviserAuthentication(String adviserAuthentication) { this.adviserAuthentication = adviserAuthentication; } public String getAdviserAuthentication() { return adviserAuthentication; } public String getBusinessAreaId() { return businessAreaId; } public void setBusinessAreaId(String businessAreaId) { this.businessAreaId = businessAreaId; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getDelTf() { return delTf; } public void setDelTf(String delTf) { this.delTf = delTf; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getImgUrl() { return imgUrl; } public void setImgUrl(String imgUrl) { this.imgUrl = imgUrl; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName; } public float getScore() { return score; } public void setScore(float score) { this.score = score; } public String getServerNum() { return serverNum; } public void setServerNum(String serverNum) { this.serverNum = serverNum; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } } }
[ "qzj842179561@gmail.com" ]
qzj842179561@gmail.com
bfcac5c939b9e9e864ee1d0fddd455a655c8f361
710c5587a1aa4a83a644ad12f1f8ec2c33027fc0
/src/main/java/com/poc/SpringBootFileUploadDownloadApplication.java
ff2b818a954aa2ad74df6bf1b81e05beb3cbc488
[]
no_license
Yela1/spring-boot-file-upload-download
20b9ca34965dd0fdc7d015257292b2e340826d93
1ae13f519d6e8c53372c3298a84a0c00a23f081b
refs/heads/master
2022-02-06T23:51:35.114323
2019-06-23T22:35:41
2019-06-23T22:35:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.poc; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootFileUploadDownloadApplication { public static void main(String[] args) { SpringApplication.run(SpringBootFileUploadDownloadApplication.class, args); } }
[ "ankamma.java@gmail.com" ]
ankamma.java@gmail.com
b8eca3bcb68fea17d8ce881e6b54a65cb6fd4031
8f07d264d7d19bd086d2a4cead0653e613a2f3eb
/JAVA基础篇/内部类的创建20201011/src/内部类的创建.java
117ebbb05ff1057a10d36c97927ce5f72f07ec78
[]
no_license
GaoLingCong/Java-SE
5bdc948310b8e9ba4e065c0d7b7a88b8a97525aa
285542ca713224e155b8224b0fcf1e4cc8f4e092
refs/heads/master
2023-04-08T10:18:27.388378
2021-03-30T07:13:25
2021-03-30T07:13:25
303,992,701
0
0
null
null
null
null
UTF-8
Java
false
false
405
java
public class 内部类的创建 { private String name; public void method1()//外部类的方法 { 内部类 内类 = new 内部类(); 内类.method2();//间接调用 } class 内部类 { public void method2() { System.out.println("内部类方法"); } } }
[ "you@example.com" ]
you@example.com
9b0ee6c78adc91bad43c9ab6f0e446bbfce1181c
31a8861a391903739f7065725615eb38d2add5f2
/modules/bpmn/src/main/java/org/jbpm/bpmn/deployer/BpmnDeployer.java
0a927c1a3fc390e85baae01de6d531b160618723
[]
no_license
achrafelkari/jbpm4community
8b6cda20bfcf1a3dc290ac7d3088b5fe25a64aa3
68218dbcfaca0de06226c7b5437d6c54516893a9
refs/heads/master
2020-05-17T22:19:19.883824
2010-07-21T03:20:35
2010-07-21T03:20:35
34,602,056
1
1
null
null
null
null
UTF-8
Java
false
false
1,458
java
/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jbpm.bpmn.deployer; import org.jbpm.bpmn.parser.BpmnParser; import org.jbpm.pvm.internal.repository.ProcessDeployer; /** * @author Tom Baeyens */ public class BpmnDeployer extends ProcessDeployer { static final BpmnParser BPMN_PARSER = new BpmnParser(); static final String BPMN_EXTENSION = ".bpmn.xml"; public BpmnDeployer() { super(BPMN_EXTENSION, BPMN_PARSER); } }
[ "lingosurf168@gmail.com@4176473f-49b9-eb0f-29b8-c11706d975a3" ]
lingosurf168@gmail.com@4176473f-49b9-eb0f-29b8-c11706d975a3
1b4c7cc804fe904c65a3b586311343321fb9abc5
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_4_1045/header.java
57f8c20e1d82d6be94f2a265611b1c7c0173ed5f
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
1,550
java
void method0() { /** The list of harvest agent status records. */ private HashMap<String, HarvestAgentStatusDTO> harvestAgents; /** the object for persisting harvest coordinator data, */ private HarvestCoordinatorDAO harvestCoordinatorDao; private TargetInstanceManager targetInstanceManager; /** the object for accessing target instance data. */ private TargetInstanceDAO targetInstanceDao; /** The factory for getting a harvest agent. */ private HarvestAgentFactory harvestAgentFactory; private DigitalAssetStoreFactory digitalAssetStoreFactory; private HarvestAgentConfig harvestAgentConfig; /** The Target Manager. */ private TargetManager targetManager; /** The InTrayManager. */ private InTrayManager inTrayManager; /** The minimum bandwidth setting. */ private int minimumBandwidth = 1; /** The maximum bandwidth percentage allocated to specific jobs. */ private int maxBandwidthPercent = 80; /** the number of days before a target instance's digital assets are purged from the DAS. */ private int daysBeforeDASPurge = 14; /** the number of days before an aborted target instance's remnant data are purged from the system. */ private int daysBeforeAbortedTargetInstancePurge = 7; /** The max global bandwidth setting from the previous check. */ private long previousMaxGlobalBandwidth = 0; /** The Auditor to use */ private Auditor auditor = null; private SipBuilder sipBuilder = null; /** The logger. */ private Log log; /** Queue paused flag. */ private boolean queuePaused = false; /** Automatic QA Url */ private String autoQAUrl = ""; }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
e3498a910ea26179ada89b20b60477a0eb15d895
79d6581b637a5e157fed8d4335f183c8447e07de
/src/test/java/com/tuowazi/code_view_guide/cp01/_03/ReverseStackTest.java
e98c0b02f7d408f4cb0363e6e98a8412849e0c77
[]
no_license
zwxbest/Coding-Interview-Guide
8482c7e695afcd867f91e8a6bd8ad54b995ce0e9
68b732f741251e561e87b89a907c13da5f19787b
refs/heads/master
2021-06-13T21:04:31.824752
2019-07-11T12:51:10
2019-07-11T12:51:10
175,943,407
0
0
null
2020-10-13T12:24:13
2019-03-16T07:58:41
Java
UTF-8
Java
false
false
847
java
package com.tuowazi.code_view_guide.cp01._03; import com.tuowazi.test.BaseTest; import java.util.Stack; import org.junit.Test; /** * @author zhangweixiao - 19-3-18 */ public class ReverseStackTest extends BaseTest{ private ReverseStack<Integer> reverseStack = new ReverseStack<>(); @Test public void test() { Stack<Integer> stack = new Stack<>(); stack.push(1); stack.push(2); stack.push(3); reverseStack.reverseStack(stack); assertEqual(stack.pop(), 1); assertEqual(stack.pop(), 2); assertEqual(stack.pop(), 3); } @Test public void test1() { ReverseStack<Integer> reverseStack = new ReverseStack<>(); Stack<Integer> stack = new Stack<>(); reverseStack.reverseStack(stack); assertEqual(stack.isEmpty(), true); } }
[ "zhangweixiao@live.com" ]
zhangweixiao@live.com
6d94f3a4606ff20e8cfbe1e9b23e8cc6b7f6d370
f078618306df61d4fdc6cfb332d554431312c95a
/advanced/nodefx/src/test/java/org/arakhne/afc/nodefx/tests/MyDrawer3.java
cc21312ece2e8993c3737321620f7e2e8cc85746
[ "Apache-2.0" ]
permissive
gallandarakhneorg/afc
b146ea0f100b07bb76af2d991a9752f79b29d623
185a6564abd77974f683522e1d4510d83ac8e073
refs/heads/master
2023-08-05T11:47:02.837987
2022-08-02T00:43:46
2022-08-02T00:43:46
9,714,608
10
10
Apache-2.0
2022-11-16T02:53:07
2013-04-27T12:49:55
Java
UTF-8
Java
false
false
1,307
java
/* * $Id$ * This file is a part of the Arakhne Foundation Classes, http://www.arakhne.org/afc * * Copyright (c) 2000-2012 Stephane GALLAND. * Copyright (c) 2005-10, Multiagent Team, Laboratoire Systemes et Transports, * Universite de Technologie de Belfort-Montbeliard. * Copyright (c) 2013-2022 The original authors, and other authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.arakhne.afc.nodefx.tests; import org.arakhne.afc.nodefx.Drawer; import org.arakhne.afc.nodefx.ZoomableGraphicsContext; @SuppressWarnings("all") public class MyDrawer3 implements Drawer<Number> { @Override public void draw(ZoomableGraphicsContext gc, Number element) { // } @Override public Class<? extends Number> getPrimitiveType() { return Double.class; } }
[ "galland@arakhne.org" ]
galland@arakhne.org
feb3d9abf66df1cf86d0db5c1a3bcb4d6adedd1b
ea465f7f22f6bba4c722c7f00266dd30d20f1b2c
/tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/TikaResourceFetcherTest.java
93dab810b44fd5fc39d6e8cec2b6719cbbfee2b0
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "Classpath-exception-2.0", "LGPL-2.1-or-later", "CDDL-1.0", "MIT", "CDDL-1.1", "GPL-2.0-only", "EPL-1.0", "ICU", "LicenseRef-scancode-bsd-simplified-darwin", "MPL-2.0", "LicenseRef-scancode-iptc-2006", "LicenseRef-scancode-proprietary-license", "NetCDF", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unrar" ]
permissive
aledyad/tika
8e26275457fc44775db265873d425a4076d9dfb2
62af5295a1246470d90d5f4bf528b1c48e20adcf
refs/heads/main
2022-05-22T18:27:58.826334
2022-04-18T16:57:19
2022-04-18T16:57:19
190,400,803
0
0
Apache-2.0
2022-04-19T08:56:23
2019-06-05T13:32:40
Java
UTF-8
Java
false
false
4,485
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.server.core; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import javax.ws.rs.core.MultivaluedHashMap; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; import org.apache.cxf.jaxrs.client.WebClient; import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider; import org.junit.jupiter.api.Test; import org.apache.tika.exception.TikaConfigException; import org.apache.tika.io.TikaInputStream; import org.apache.tika.pipes.fetcher.FetcherManager; import org.apache.tika.server.core.resource.TikaResource; import org.apache.tika.server.core.writer.JSONMessageBodyWriter; public class TikaResourceFetcherTest extends CXFTestBase { private static final String TIKA_PATH = "/tika"; @Override protected void setUpResources(JAXRSServerFactoryBean sf) { sf.setResourceClasses(TikaResource.class); sf.setResourceProvider(TikaResource.class, new SingletonResourceProvider(new TikaResource())); } @Override protected void setUpProviders(JAXRSServerFactoryBean sf) { List<Object> providers = new ArrayList<>(); providers.add(new TikaServerParseExceptionMapper(false)); providers.add(new JSONMessageBodyWriter()); sf.setProviders(providers); } @Override protected InputStream getTikaConfigInputStream() throws IOException { Path inputDir = null; try { inputDir = Paths.get( TikaResourceFetcherTest.class.getResource("/test-documents/").toURI()); } catch (URISyntaxException e) { throw new RuntimeException(e); } String configXML = getStringFromInputStream( TikaResourceFetcherTest.class.getResourceAsStream( "/configs/tika-config-server-fetcher-template.xml")); configXML = configXML.replaceAll("\\$\\{FETCHER_BASE_PATH\\}", inputDir.toAbsolutePath().toString()); configXML = configXML.replaceAll("\\$\\{PORT\\}", "9998"); return new ByteArrayInputStream(configXML.getBytes(StandardCharsets.UTF_8)); } @Override protected InputStreamFactory getInputStreamFactory(InputStream is) { try (TikaInputStream tis = TikaInputStream.get(is)) { FetcherManager fetcherManager = FetcherManager.load(tis.getPath()); return new FetcherStreamFactory(fetcherManager); } catch (IOException | TikaConfigException e) { throw new RuntimeException(e); } } @Test public void testHeader() throws Exception { MultivaluedMap<String, String> map = new MultivaluedHashMap<>(); map.putSingle("fetcherName", "fsf"); map.putSingle("fetchKey", "mock/hello_world.xml"); Response response = WebClient.create(endPoint + TIKA_PATH).headers(map).accept("text/xml").put(null); String xml = getStringFromInputStream((InputStream) response.getEntity()); assertContains("hello world", xml); } @Test public void testQueryPart() throws Exception { Response response = WebClient.create(endPoint + TIKA_PATH).query("fetcherName", "fsf") .query("fetchKey", "mock/hello_world.xml").accept("text/xml").put(null); String xml = getStringFromInputStream((InputStream) response.getEntity()); assertContains("hello world", xml); } }
[ "tallison@apache.org" ]
tallison@apache.org
0339bc6e1977c20cf7f25c9d568846b5180521a8
9fd2d6acbb8313817f56717063c6ece3cef98f2c
/com/google/android/gms/games/multiplayer/a.java
c0721ec5af4a1ae242216293e78a0552d796b646
[]
no_license
mathysaru/realestate
2d977f1a400ec8b30bc24c3f2f49f105ef61fafd
6bc640ff4774c690407bc37121886628be822458
refs/heads/master
2023-07-26T17:06:18.588404
2021-09-04T15:24:57
2021-09-04T15:24:57
403,090,679
0
0
null
null
null
null
UTF-8
Java
false
false
3,356
java
package com.google.android.gms.games.multiplayer; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a.a; import com.google.android.gms.common.internal.safeparcel.b; import com.google.android.gms.games.GameEntity; import java.util.ArrayList; public class a implements Parcelable.Creator<InvitationEntity> { static void a(InvitationEntity paramInvitationEntity, Parcel paramParcel, int paramInt) { int i = b.k(paramParcel); b.a(paramParcel, 1, paramInvitationEntity.getGame(), paramInt, false); b.c(paramParcel, 1000, paramInvitationEntity.getVersionCode()); b.a(paramParcel, 2, paramInvitationEntity.getInvitationId(), false); b.a(paramParcel, 3, paramInvitationEntity.getCreationTimestamp()); b.c(paramParcel, 4, paramInvitationEntity.ch()); b.a(paramParcel, 5, paramInvitationEntity.getInviter(), paramInt, false); b.b(paramParcel, 6, paramInvitationEntity.getParticipants(), false); b.c(paramParcel, 7, paramInvitationEntity.getVariant()); b.C(paramParcel, i); } public InvitationEntity[] S(int paramInt) { return new InvitationEntity[paramInt]; } public InvitationEntity v(Parcel paramParcel) { int i = 0; ArrayList localArrayList = null; int m = com.google.android.gms.common.internal.safeparcel.a.j(paramParcel); long l = 0L; ParticipantEntity localParticipantEntity = null; int j = 0; String str = null; GameEntity localGameEntity = null; int k = 0; while (paramParcel.dataPosition() < m) { int n = com.google.android.gms.common.internal.safeparcel.a.i(paramParcel); switch (com.google.android.gms.common.internal.safeparcel.a.y(n)) { default: com.google.android.gms.common.internal.safeparcel.a.b(paramParcel, n); break; case 1: localGameEntity = (GameEntity)com.google.android.gms.common.internal.safeparcel.a.a(paramParcel, n, GameEntity.CREATOR); break; case 1000: k = com.google.android.gms.common.internal.safeparcel.a.f(paramParcel, n); break; case 2: str = com.google.android.gms.common.internal.safeparcel.a.l(paramParcel, n); break; case 3: l = com.google.android.gms.common.internal.safeparcel.a.g(paramParcel, n); break; case 4: j = com.google.android.gms.common.internal.safeparcel.a.f(paramParcel, n); break; case 5: localParticipantEntity = (ParticipantEntity)com.google.android.gms.common.internal.safeparcel.a.a(paramParcel, n, ParticipantEntity.CREATOR); break; case 6: localArrayList = com.google.android.gms.common.internal.safeparcel.a.c(paramParcel, n, ParticipantEntity.CREATOR); break; case 7: i = com.google.android.gms.common.internal.safeparcel.a.f(paramParcel, n); } } if (paramParcel.dataPosition() != m) { throw new a.a("Overread allowed size end=" + m, paramParcel); } return new InvitationEntity(k, localGameEntity, str, l, j, localParticipantEntity, localArrayList, i); } } /* Location: C:\Users\shivane\Decompilation\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\games\multiplayer\a.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "72138083+Tvmpteam@users.noreply.github.com" ]
72138083+Tvmpteam@users.noreply.github.com
2946a9999105220eeaa266ac8142871c4f63ec45
dbf8d92d0ea2442028271bc0eb89c9b2e714683a
/src/main/java/org/zmx/designmode/chainofresponsibility/Handler.java
5ba6dc6886e2468d3ed29e2f42c8bd63291bdb48
[]
no_license
zmx729618/DesignModeTest
3c96857a0f020a518427fe0a5c384b5dac8443e9
9ab942afdf07291a023f37bf2467422a8512b1b0
refs/heads/master
2021-07-19T17:39:39.715149
2017-10-25T01:38:05
2017-10-25T01:38:05
108,205,003
0
0
null
null
null
null
UTF-8
Java
false
false
729
java
package org.zmx.designmode.chainofresponsibility; /** * Created by zhangwenchao on 2017/7/28. */ public abstract class Handler { /** * 持有后继的责任对象 */ private Handler successor;//继任者的意思 /** * 示意处理请求的方法,虽然这个示意方法是没有传入参数的 但实际是可以传入参数的,根据具体需要来选择是否传递参数 */ public abstract void handleRequest(); /** * 取值方法 */ public Handler getSuccessor() { return successor; } /** * 赋值方法,设置后继的责任对象 */ public void setSuccessor(Handler successor) { this.successor = successor; } }
[ "zmx729618@163.com" ]
zmx729618@163.com
116fbc56e11953f7ec931b0585651a4f5a73c03a
b8743f5f3d3c8754eba595d3c9a8a4de8259b68a
/bitcamp-java-basic/src/main/java/ch22/i/character_stream/Test01_2.java
13cecfe867ef1cd5413a71dedbed483fa0048a6a
[]
no_license
ryong890314/bitcamp-java-20190527
bb68333bca72e5acc6268ff1ec31f8f22ee3529d
a55614799700fd2ee99d8e2070562a2a4680826f
refs/heads/master
2020-06-13T20:14:36.797757
2020-04-20T06:59:10
2020-04-20T06:59:10
194,775,345
0
0
null
2020-04-30T11:48:02
2019-07-02T02:41:02
Java
UTF-8
Java
false
false
731
java
// 파일에 출력하기 - Stream API를 사용하여 데이터 출력하기 package ch22.i.character_stream; import java.io.FileWriter; public class Test01_2 { public static void main(String[] args) { // 문자를 '가'에서 부터 100자 출력한다. // 1) 문자를 출력할 파일 출력 객체 준비 try (FileWriter out = new FileWriter("temp/data.txt")){ // 2) 짝수를 바이트 배열에 출력한다. for (int i = 0, ch = '가';i < 100; i++, ch++) { out.append((char)(ch)); } System.out.println("출력 완료!"); } catch (Exception e) { System.out.println("파일 출력 예외 발생!"); e.printStackTrace(); } } }
[ "syamsyalla@naver.com" ]
syamsyalla@naver.com
7dfa6de5375c3dcf74ffc37d17a9a947fb029d34
9dd5545e5358e113e1dcb41fa1ef809e48c1fc38
/src/main/java/com/wf/ssm/common/persistence/dialect/db/H2Dialect.java
412a0282ce559e1ea45b03cc860f5552c30b4cec
[]
no_license
wangpf2011/osframework
23fd3c20021de590121dd9fe544cf215e3bb68f9
3ff5ef9c5c26724a832c6dc5b4bff0a03efa37bf
refs/heads/master
2021-01-17T04:51:06.291963
2019-05-21T14:13:06
2019-05-21T14:13:06
83,005,035
0
0
null
null
null
null
UTF-8
Java
false
false
1,468
java
package com.wf.ssm.common.persistence.dialect.db; import com.wf.ssm.common.persistence.dialect.Dialect; /** * A dialect compatible with the H2 database. * * @author wangpf * @version 2017-01-15 */ public class H2Dialect implements Dialect { public boolean supportsLimit() { return true; } /** * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换. * <pre> * 如mysql * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回 * select * from user limit :offset,:limit * </pre> * * @param sql 实际SQL语句 * @param offset 分页开始纪录条数 * @param offsetPlaceholder 分页开始纪录条数-占位符号 * @param limit 分页每页显示纪录条数 * @param limitPlaceholder 分页纪录条数占位符号 * @return 包含占位符的分页sql */ private String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder) { return sql + ((offset > 0) ? " limit " + limitPlaceholder + " offset " + offsetPlaceholder : " limit " + limitPlaceholder); } @Override public String getLimitString(String sql, int offset, int limit) { return getLimitString(sql, offset, Integer.toString(offset), limit, Integer.toString(limit)); } }
[ "wangpf2011@163.com" ]
wangpf2011@163.com
6ffb2af14580368bc9c818ed0e6edf88e1227fe3
b8108ba80e8cab81cae3958ee8ded2fd69e38701
/zhihuiduo-core/src/com/zwotech/common/persistence/dialect/Dialect.java
8d0759388b865b8028fbcddbbaa8a6a712fee04a
[]
no_license
huangjixin/zhiwo-mall
585418b3efad818ebd572a1377566742bb22e927
3f8b8ff1445749fe06afc2dd45ef6b2524415cb6
refs/heads/master
2022-07-14T20:03:43.572458
2018-10-26T03:38:09
2018-10-26T03:38:09
94,043,571
0
4
null
2022-07-01T02:11:10
2017-06-12T01:31:47
Java
UTF-8
Java
false
false
931
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.zwotech.common.persistence.dialect; /** * 类似hibernate的Dialect,但只精简出分页部分 * * @author poplar.yfyang * @version 1.0 2011-11-18 下午12:31 * @since JDK 1.5 */ public interface Dialect { /** * 数据库本身是否支持分页当前的分页查询方式 * 如果数据库不支持的话,则不进行数据库分页 * * @return true:支持当前的分页查询方式 */ public boolean supportsLimit(); /** * 将sql转换为分页SQL,分别调用分页sql * * @param sql SQL语句 * @param offset 开始条数 * @param limit 每页显示多少纪录条数 * @return 分页查询的sql */ public String getLimitString(String sql, int offset, int limit); }
[ "635152644@qq.com" ]
635152644@qq.com
044c9773f2f635e8b2e0742c9131e490da522f97
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/android/support/v4/content/IntentCompatHoneycomb.java
25366e40fcca97481453afa546cbfdc778bfcdb4
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
653
java
package android.support.v4.content; import android.content.ComponentName; import android.content.Intent; class IntentCompatHoneycomb { public static Intent makeMainActivity(ComponentName paramComponentName) { return Intent.makeMainActivity(paramComponentName); } public static Intent makeRestartActivityTask(ComponentName paramComponentName) { return Intent.makeRestartActivityTask(paramComponentName); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes.jar * Qualified Name: android.support.v4.content.IntentCompatHoneycomb * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
1064f7e85c1fa5802aa71049904eef4b59e146b8
293e395565a5689af9781f6f87389a87becadfa5
/thevpc-common-fprint/src/main/java/net/thevpc/common/fprint/parser/TextNodeList.java
525f0a3277b8ccedc842bd9609925cf9d6fbb292
[]
no_license
thevpc/vpc-common
fa0bcc7a40c7ab426d0871ee4620177717517435
af29b2340a4beb1d5e6e3f278ec8c99077302144
refs/heads/master
2023-06-07T17:00:18.820723
2023-05-31T12:54:32
2023-05-31T12:54:32
71,976,446
0
0
null
2022-01-05T21:28:01
2016-10-26T07:14:22
Java
UTF-8
Java
false
false
2,106
java
/** * ==================================================================== * Nuts : Network Updatable Things Service * (universal package manager) * * is a new Open Source Package Manager to help install packages * and libraries for runtime execution. Nuts is the ultimate companion for * maven (and other build managers) as it helps installing all package * dependencies at runtime. Nuts is not tied to java and is a good choice * to share shell scripts and other 'things' . Its based on an extensible * architecture to help supporting a large range of sub managers / repositories. * <br> * * Copyright [2020] [thevpc] * 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. * <br> * ==================================================================== */ package net.thevpc.common.fprint.parser; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * Created by vpc on 5/23/17. */ public class TextNodeList implements TextNode, Iterable<TextNode> { private List<TextNode> children = new ArrayList<TextNode>(); public TextNodeList(TextNode... children) { for (TextNode c : children) { add(c); } } public void add(TextNode item) { children.add(item); } public TextNode get(int index) { return children.get(index); } public int size() { return children.size(); } @Override public Iterator<TextNode> iterator() { return children.iterator(); } @Override public String toString() { return children.toString(); } }
[ "taha.bensalah@gmail.com" ]
taha.bensalah@gmail.com
0bea3350cdcb2a4cbcd769b1bf394a3faf314507
d81b8829ebc2deea1acf4b41b39e8eda2734a952
/waiter/src/main/java/ru/shaplov/job4j/patterns/electronicwaiter/OrderSubscriber.java
909a3ffac707ea689209d2989cda8d29d5401e3b
[ "Apache-2.0" ]
permissive
DmitriyShaplov/job4j
6d8c4b505f0f6bd9f19d6e829370eb45492e73c7
46acbe6deb17ecfd00492533555f27e0df481d37
refs/heads/master
2022-12-04T14:51:37.185520
2021-02-01T21:41:00
2021-02-01T21:59:02
159,066,243
0
0
Apache-2.0
2022-11-16T12:25:02
2018-11-25T19:23:23
Java
UTF-8
Java
false
false
199
java
package ru.shaplov.job4j.patterns.electronicwaiter; public interface OrderSubscriber { default void reactOnOrderIsReady(Order order) {}; default void reactOnOrderAccepted(Order order) {}; }
[ "shaplovd@gmail.com" ]
shaplovd@gmail.com
43dcc1d44c715a86bf1bb95f4d64f6ee25f6473e
ec85c36a25d2f3000e09599a4f6b3414ceba7edf
/test_executors_java/generatedTests/seed_12/evosuite-tests/java_programs/SQRT_ESTest.java
e7f2c077a8ffd65c49b12f6e893a4b26e1306f53
[]
no_license
danglotb/quixbugs-experiment
669a7f46f06e357bb056169372b15f9e08800908
84b7cd506a8909135412c9bb170662d7fa8b2b07
refs/heads/master
2021-04-06T08:46:49.626196
2018-03-14T14:03:56
2018-03-14T14:03:56
125,274,258
0
0
null
2018-03-14T21:13:44
2018-03-14T21:13:44
null
UTF-8
Java
false
false
1,019
java
/* * This file was automatically generated by EvoSuite * Tue Mar 06 04:25:50 GMT 2018 */ package java_programs; import org.junit.Test; import static org.junit.Assert.*; import java_programs.SQRT; public class SQRT_ESTest { @Test(timeout = 4000) public void test0() throws Throwable { SQRT sQRT0 = new SQRT(); } @Test(timeout = 4000) public void test1() throws Throwable { double double0 = SQRT.sqrt(1704.52228, 2537.77868); assertEquals(63.494588918592434, double0, 0.01); } @Test(timeout = 4000) public void test2() throws Throwable { // Undeclared exception! SQRT.sqrt((-1.0), (-57.3087439617)); } @Test(timeout = 4000) public void test3() throws Throwable { double double0 = SQRT.sqrt((-759.0999383588), 1429.37688343); assertEquals((-12.020089170649891), double0, 0.01); } @Test(timeout = 4000) public void test4() throws Throwable { double double0 = SQRT.sqrt(0.0, 0.0); assertEquals(0.0, double0, 0.01); } }
[ "matias.sebastian.martinez@gmail.com" ]
matias.sebastian.martinez@gmail.com
7451384fd6f2ac2e016e69a09293af821776943e
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/SASAbus_SASAbus/app/src/main/java/it/sasabz/android/sasabus/ui/ecopoints/detail/LeaderboardActivity.java
338d3c6b68c423cc6005c94db6abbe8de9f93f13
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,306
java
// isComment package it.sasabz.android.sasabus.ui.ecopoints.detail; import android.content.BroadcastReceiver; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import java.util.ArrayList; import java.util.Collections; import butterknife.BindView; import butterknife.ButterKnife; import it.sasabz.android.sasabus.R; import it.sasabz.android.sasabus.data.network.NetUtils; import it.sasabz.android.sasabus.data.network.auth.AuthHelper; import it.sasabz.android.sasabus.data.network.RestClient; import it.sasabz.android.sasabus.data.network.rest.api.EcoPointsApi; import it.sasabz.android.sasabus.data.network.rest.model.LeaderboardPlayer; import it.sasabz.android.sasabus.data.network.rest.response.LeaderboardResponse; import it.sasabz.android.sasabus.ui.ecopoints.LoginActivity; import it.sasabz.android.sasabus.util.AnalyticsHelper; import it.sasabz.android.sasabus.util.Utils; import it.sasabz.android.sasabus.util.recycler.LeaderboardDetailsAdapter; import rx.Observer; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; import timber.log.Timber; public class isClassOrIsInterface extends AppCompatActivity { private static final String isVariable = "isStringConstant"; @BindView(isNameExpr.isFieldAccessExpr.isFieldAccessExpr) RecyclerView isVariable; private ArrayList<LeaderboardPlayer> isVariable; private LeaderboardDetailsAdapter isVariable; private int isVariable; private BroadcastReceiver isVariable; @Override protected void isMethod(@Nullable Bundle isParameter) { super.isMethod(isNameExpr); if (!isNameExpr.isMethod()) { isNameExpr.isMethod("isStringConstant"); isMethod(); isMethod(new Intent(this, LoginActivity.class)); return; } isNameExpr = isNameExpr.isMethod(this); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(this); isNameExpr.isMethod(isNameExpr); Toolbar isVariable = (Toolbar) isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isNameExpr); isNameExpr.isMethod(isParameter -> isMethod()); assert isMethod() != null; isMethod().isMethod(true); isNameExpr = new ArrayList<>(); isNameExpr.isMethod(new LinearLayoutManager(this) { @Override public boolean isMethod() { return true; } }); isNameExpr = new LeaderboardDetailsAdapter(this, isNameExpr, isNameExpr, () -> { isNameExpr++; isMethod(); }); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(true); isNameExpr.isFieldAccessExpr.isMethod(); } @Override protected void isMethod() { super.isMethod(); isNameExpr.isMethod(this, isNameExpr); } private void isMethod() { if (!isNameExpr.isMethod(this)) { return; } EcoPointsApi isVariable = isNameExpr.isFieldAccessExpr.isMethod().isMethod(EcoPointsApi.class); isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr.isMethod()).isMethod(isNameExpr.isMethod()).isMethod(new Observer<LeaderboardResponse>() { @Override public void isMethod() { } @Override public void isMethod(Throwable isParameter) { isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr.this, isNameExpr); } @Override public void isMethod(LeaderboardResponse isParameter) { isNameExpr.isMethod(isNameExpr.isMethod((LeaderboardPlayer) null)); isNameExpr.isMethod(); isNameExpr.isMethod(isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(); if (isNameExpr.isFieldAccessExpr.isMethod() < isNameExpr.isFieldAccessExpr) { isNameExpr.isMethod(true); } isNameExpr.isMethod(true); } }); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
f553449a285b6f15071b7987175fda5b66786dc6
d1864a7fffb94862ec87b3fbb0c391180c24e181
/mockserver-core/src/main/java/org/mockserver/exception/ExceptionHandling.java
07871df96fb5e61afac3c35aa15e2a8a720c5fd3
[ "Apache-2.0" ]
permissive
Guillerbr/mockserver-1
c2006e3345511675dbd7103c54f090d6495b4710
c27a3de1c67a69d797a56e5f5a2b0570cc2e2a7b
refs/heads/master
2020-12-10T00:06:26.482565
2020-01-12T07:43:02
2020-01-12T07:43:02
233,452,505
0
0
Apache-2.0
2020-01-12T20:16:27
2020-01-12T20:16:19
null
UTF-8
Java
false
false
732
java
package org.mockserver.exception; import org.mockserver.log.model.LogEntry; import org.mockserver.logging.MockServerLogger; import static org.slf4j.event.Level.WARN; public class ExceptionHandling { static MockServerLogger mockServerLogger = new MockServerLogger(); public static void swallowThrowable(Runnable runnable) { try { runnable.run(); } catch (Throwable throwable) { mockServerLogger.logEvent( new LogEntry() .setType(LogEntry.LogMessageType.EXCEPTION) .setLogLevel(WARN) .setMessageFormat(throwable.getMessage()) .setThrowable(throwable) ); } } }
[ "733179+jamesdbloom@users.noreply.github.com" ]
733179+jamesdbloom@users.noreply.github.com
b48adc45c8d2a28f0a92cdce6fc5fa62d9a396c9
7b3201872912a819983a0f7368d4c0bccabe68ec
/blogs/src/main/java/service/BlogService.java
36331f9998151f79f019b14e0d1c58753a1b423e
[]
no_license
akaFrank888/JavaTribe
a8d572e367f8e605834e524428d655021b02587e
d488c3084a0d3823d516714fb65eee51ed7347f4
refs/heads/master
2023-06-01T02:33:06.418623
2021-07-09T00:19:51
2021-07-09T00:19:51
383,640,537
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package service; import domain.Blog; import domain.PageBean; import domain.UserInfo; /** * 实现分页查询 */ public interface BlogService { // 设计一个方法 显示一页的博客(在Servlet里已经将接收到的String参数-->int) public PageBean<Blog> pageQuery(int currentPage, int pageSize,String content); // 设计一个方法 显示一页我的博客 public PageBean<Blog> pageQueryOfMine(int currentPage, int pageSize,String account); // 设计一个方法 在博客页面显示作者博客 public Blog showOneByBlog(String date); // 设计一个方法 在博客页面显示作者资料 public UserInfo showOneByUser(String account); // 设计一个方法 在数据库中保存一则博客 public boolean save(Blog blog); }
[ "hello@qq.com" ]
hello@qq.com
83e6b3f2ffa6f93fbcca55f398886a4aae0c5c5c
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.companion.server-CompanionServer/sources/com/oculus/companion/server/Protocol$WifiReconnectRequestOrBuilder.java
51b73dda9644edc21728a6e6438c2a7726f16edf
[]
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
177
java
package com.oculus.companion.server; import com.google.protobuf.MessageLiteOrBuilder; public interface Protocol$WifiReconnectRequestOrBuilder extends MessageLiteOrBuilder { }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
3152044c732b8306046dd5ef937d606ceed1a915
374ad03287670140e4a716aa211cdaf60f50c944
/ztr-weixin/ztr-common/ztravel-common/src/main/java/com/ztravel/common/util/PriceUtil.java
d9e2574f2a3b6fd5c203bce53ab3a1632d97c0d3
[]
no_license
xxxJppp/firstproj
ca541f8cbe004a557faff577698c0424f1bbd1aa
00dcfbe731644eda62bd2d34d55144a3fb627181
refs/heads/master
2020-07-12T17:00:00.549410
2017-04-17T08:29:58
2017-04-17T08:29:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package com.ztravel.common.util; import java.math.BigDecimal; import java.text.DecimalFormat; public class PriceUtil { public static String cent2yuan(Long cent) { if(cent == null){ return null; } DecimalFormat decimalFormat = new DecimalFormat("0.00"); String yuan = decimalFormat.format(cent.longValue() / 100.0); return yuan; } public static Long yuan2cent(String yuan) { if(yuan == null){ return null; } BigDecimal bd = new BigDecimal(yuan); Long cent = bd.longValue() * 100; return cent; } }
[ "yining.ni@travelzen.com" ]
yining.ni@travelzen.com
b738d0df4c7ce5dd64c6b0af089b7ab3eecee3e2
d44afa3570d26886894b848e0faeadffdd56d298
/plugins/rich_ui_framework/thirdparty/src/com/l2fprod/common/swing/plaf/metal/MetalTaskPaneGroupUI.java
e89f1e53fb235a57d6031f3849377022525dae44
[]
no_license
ap0n/dynamo
9bfa6d96147448c795a19f468096f0670fa4086f
2c756fff07157af6a076416e5c0f77994c80d600
refs/heads/master
2021-01-10T13:56:07.470945
2016-03-20T07:42:10
2016-03-20T07:42:10
54,305,984
0
0
null
null
null
null
UTF-8
Java
false
false
3,329
java
/* _______________________ Apatar Open Source Data Integration Copyright (C) 2005-2007, Apatar, Inc. info@apatar.com 195 Meadow St., 2nd Floor Chicopee, MA 01013 ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.# See the ### GNU General Public License for more details. ### You should have received a copy of the GNU General Public License along ### with this program; if not, write to the Free Software Foundation, Inc., ### 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ________________________ */ /** * $ $ License. * * Copyright $ L2FProd.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.l2fprod.common.swing.plaf.metal; import com.l2fprod.common.swing.JTaskPaneGroup; import com.l2fprod.common.swing.plaf.basic.BasicTaskPaneGroupUI; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import javax.swing.JComponent; import javax.swing.border.Border; import javax.swing.plaf.ComponentUI; /** * Metal implementation of the <code>JTaskPaneGroup</code> UI. <br> * * @author <a href="mailto:fred@L2FProd.com">Frederic Lavigne</a> */ public class MetalTaskPaneGroupUI extends BasicTaskPaneGroupUI { public static ComponentUI createUI(JComponent c) { return new MetalTaskPaneGroupUI(); } protected void installDefaults() { super.installDefaults(); group.setOpaque(false); } protected Border createPaneBorder() { return new MetalPaneBorder(); } /** * The border of the taskpane group paints the "text", the "icon", * the "expanded" status and the "special" type. * */ class MetalPaneBorder extends PaneBorder { protected void paintExpandedControls(JTaskPaneGroup group, Graphics g, int x, int y, int width, int height) { ((Graphics2D)g).setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setColor(getPaintColor(group)); paintRectAroundControls(group, g, x, y, width, height, g.getColor(), g .getColor()); paintChevronControls(group, g, x, y, width, height); ((Graphics2D)g).setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } protected boolean isMouseOverBorder() { return true; } } }
[ "anydriotis@gmail.com" ]
anydriotis@gmail.com
8f37310466a645a25790eb6744cd6836efb0143b
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/iqoption/deposit/complete/BaseCompletePaymentFragment$payAmount$2.java
9eeaf4fb942512a4993e586808180b968127f10d
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
1,064
java
package com.iqoption.deposit.complete; import java.io.Serializable; import java.math.BigDecimal; import kotlin.TypeCastException; import kotlin.i; import kotlin.jvm.a.a; import kotlin.jvm.internal.Lambda; @i(bne = {1, 1, 15}, bnf = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, bng = {"<anonymous>", "Ljava/math/BigDecimal;", "invoke"}) /* compiled from: BaseCompletePaymentFragment.kt */ final class BaseCompletePaymentFragment$payAmount$2 extends Lambda implements a<BigDecimal> { final /* synthetic */ a this$0; BaseCompletePaymentFragment$payAmount$2(a aVar) { this.this$0 = aVar; super(0); } /* renamed from: aqb */ public final BigDecimal invoke() { Serializable serializable = com.iqoption.core.ext.a.s(this.this$0).getSerializable("ARG_PAY_AMOUNT"); if (serializable != null) { return (BigDecimal) serializable; } throw new TypeCastException("null cannot be cast to non-null type java.math.BigDecimal"); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
8cb877e5aec3d89e76920f1cc4d38cc82838ef3b
d21bbc4d153b7ebe623abf48923cc5b7b5eb824a
/Hibernate/HIbernate-HQL/src/com/Product.java
0c5e7e02308b4a7840a58009a8df9083a86cc6f8
[]
no_license
tracksdata/CTS-Chennai-Java
8eaebc1a6d239703231c50e786a8321cf2967b1e
4b03debb6cd83745f6c373522fd82be367309820
refs/heads/master
2021-07-13T00:08:34.425982
2017-08-04T10:05:31
2017-08-04T10:05:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
644
java
package com; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Product { @Id @Column(name = "product_id") private String prodId; @Column(name = "product_name") private String prodName; private double price; public String getProdId() { return prodId; } public void setProdId(String prodId) { this.prodId = prodId; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public String getProdName() { return prodName; } public void setProdName(String prodName) { this.prodName = prodName; } }
[ "praveen.somireddy@gmail.com" ]
praveen.somireddy@gmail.com
c520643a043cbc0b61fda92f7fb81a4afdba56d5
f7770e21f34ef093eb78dae21fd9bde99b6e9011
/src/main/java/com/hengyuan/hicash/domain/event/user/CollarApp2UpdateEvent.java
db105beea5cfe79b86e38f31b8ba2a978ba9e223
[]
no_license
webvul/HicashAppService
9ac8e50c00203df0f4666cd81c108a7f14a3e6e0
abf27908f537979ef26dfac91406c1869867ec50
refs/heads/master
2020-03-22T19:58:41.549565
2017-12-26T08:30:04
2017-12-26T08:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,582
java
package com.hengyuan.hicash.domain.event.user; import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; import com.hengyuan.hicash.constant.Consts; import com.hengyuan.hicash.constant.TableConsts; import com.hengyuan.hicash.dao.collection.ConnManager; import com.hengyuan.hicash.exception.UpdateInfoException; import com.hengyuan.hicash.parameters.request.user.CollarApp2UpdateReq; import com.hengyuan.hicash.utils.MapAssemForSql; import com.hengyuan.hicash.utils.RecordUtils; import com.hengyuan.hicash.utils.RegexValidate; /** * 白领完善资料dao * * @author LiHua.Ren * @create date 2015-05-23 * */ public class CollarApp2UpdateEvent { private static Logger logger = Logger.getLogger(CollarApp2UpdateEvent.class); /** * 修改个人信息 * * @param req * @return * @throws UpdateInfoException */ public void updateCollarMsg(CollarApp2UpdateReq req) throws UpdateInfoException { Map<String, Object> setMap = new HashMap<String, Object>(); setMap.put("unitName", req.getUnitName());//单位名称 setMap.put("job_nature", req.getInDepartment());//部门 setMap.put("workExperience", req.getWorkDate());//工作年限 if(RegexValidate.isNull(req.getUnitStartDateYear())&&RegexValidate.isNull(req.getUnitEndDateMonth()))//入职时间 { setMap.put("entry_time",null); }else{ setMap.put("entry_time", req.getUnitStartDateYear() + "-" + req.getUnitEndDateMonth()); } setMap.put("work_Area_Province", req.getUnitProvince()); setMap.put("work_Area_City", req.getUnitCity()); setMap.put("work_Area_Area", req.getUnitDistrict()); setMap.put("work_Area_Road", req.getUnitDetails());//单位地址 setMap.put("fimily_Area_Province", req.getHomeProvince()); setMap.put("fimily_Area_City", req.getHomeCity()); setMap.put("fimily_Area_Area", req.getHomeDistrict()); setMap.put("fimily_Area_Road", req.getHomeDetails()); setMap.put("unit_tel_area", req.getUnitPhoneArea());//单位电话 setMap.put("unit_tel", req.getUnitPhoneNum());//单位电话 setMap.put("EXPRESS_ADDRESSTYPE", req.getExpressAddressType()); if(Consts.UNIT_CODE.equals(req.getExpressAddressType())){ /* 邮寄地址 为 单位地址 */ setMap.put("EXPRESS_PROVINCE", req.getUnitProvince()); setMap.put("EXPRESS_CITY", req.getUnitCity()); setMap.put("EXPRESS_AREA", req.getUnitDistrict()); setMap.put("EXPRESS_DETAIL", req.getUnitDetails()); setMap.put("other_Adress_Province", req.getUnitProvince()); setMap.put("other_Adress_City", req.getUnitCity()); setMap.put("Other_Adress_Area", req.getUnitDistrict()); setMap.put("other_Accommodation_Address", req.getUnitDetails()); //同步现居住地址类型 setMap.put("now_Fimily_Adress", Consts.UNIT_CODE); } else if(Consts.HOME_CODE.equals(req.getExpressAddressType())){ /* 邮寄地址 为 家庭地址 */ setMap.put("EXPRESS_PROVINCE", req.getHomeProvince()); setMap.put("EXPRESS_CITY", req.getHomeCity()); setMap.put("EXPRESS_AREA", req.getHomeDistrict()); setMap.put("EXPRESS_DETAIL", req.getHomeDetails()); setMap.put("other_Adress_Province", req.getHomeProvince()); setMap.put("other_Adress_City", req.getHomeCity()); setMap.put("Other_Adress_Area", req.getHomeDistrict()); setMap.put("other_Accommodation_Address", req.getHomeDetails()); //同步现居住地址类型 setMap.put("now_Fimily_Adress", Consts.HOME_CODE); } else if(Consts.OTHER_CODE.equals(req.getExpressAddressType())){ setMap.put("EXPRESS_PROVINCE", req.getExpressProvince()); setMap.put("EXPRESS_CITY", req.getExpressCity()); setMap.put("EXPRESS_AREA", req.getExpressDistrict()); setMap.put("EXPRESS_DETAIL", req.getExpressDetails()); setMap.put("other_Adress_Province", req.getExpressProvince()); setMap.put("other_Adress_City", req.getExpressCity()); setMap.put("Other_Adress_Area", req.getExpressDistrict()); setMap.put("other_Accommodation_Address", req.getExpressDetails()); //同步现居住地址类型 setMap.put("now_Fimily_Adress", Consts.OTHER_CODE); } setMap.put("monthly_income", req.getMonthlyIncome()); setMap.put("monthlyConsumption", req.getMonthlyConsumption()); /**2016-4-13*/ setMap.put("COMPANY_SCALE", req.getCompanyScale()); setMap.put("COMPANY_WORK_YEAR", req.getCompanyWorkYear()); setMap.put("job_duties", req.getJobduties()); Map<String, Object> whereMap = new HashMap<String, Object>(); whereMap.put("username", req.getUserName()); String updateSql = MapAssemForSql.getUpdateSql(TableConsts.CUST_CUSTOMER, setMap, whereMap); //记录日志 RecordUtils.writeAction(logger, req.getUuid(), updateSql); if(ConnManager.executeUpdate(updateSql) <= 0){ throw new UpdateInfoException(); } } /* *//** * 更新个人信息表(白领) * cust_personal_info * @param req * @param isExist * @return * @throws UpdateBasicException *//* public void updatePersonalinfo(CollarBasicInfoReq req) throws UpdateBasicException { Map<String, Object> setMap = new HashMap<String, Object>(); setMap.put("school_Name", req.getSchoolName()); setMap.put("graduation_Date", req.getEndDateYear() + "-" + req.getEndDateMonth()); setMap.put("education_Background", req.getEducationBg()); setMap.put("educational_System", req.getEducationalSystem()); setMap.put("matrimony_System", req.getMatrimonySystem()); setMap.put("sltHousing_System", req.getHousingSystem()); Map<String, Object> whereMap = new HashMap<String, Object>(); whereMap.put("username", req.getUserName()); String updateSql = MapAssemForSql.getUpdateSql(TableConsts.CUST_PERSONAL_INFO, setMap, whereMap); if(ConnManager.executeUpdate(updateSql) <= 0){ throw new UpdateBasicException(); } } *//** * 将个人信息保存到个人信息表(白领) * @param req * @return * @throws UpdateBasicException *//* public void savePersonalInfo(CollarBasicInfoReq req) throws UpdateBasicException{ String updateSql = "INSERT INTO cust_personal_info (username,school_Name,graduation_Date,education_Background,educational_System,matrimony_System,sltHousing_System) VALUES('" + req.getUserName() + "','" + req.getSchoolName() + "','" + req.getEndDateYear() + "-" + req.getEndDateMonth() + "','" + req.getEducationBg() + "','" + req.getEducationalSystem() + "','" + req.getMatrimonySystem() + "','" + req.getHousingSystem() + "')"; if(ConnManager.executeUpdate(updateSql) <= 0){ throw new UpdateBasicException(); } } */ }
[ "hanlu@dpandora.cn" ]
hanlu@dpandora.cn
d5b9bd97103822bad62bb758515a4759c89f2c4a
28166525372e27dd26411f356062a5bcd2735a22
/tracing/src/main/java/com/networknt/ob/model/OBReadTransaction4.java
4c3737c260aa1549bcea0636000a87372d60fcf9
[ "Apache-2.0" ]
permissive
open-banking/transactions
cbcf3df10f0b9721342067c0c6c8c8bdeb3bc781
083002f91696c69a95bba9184f7313438b6545f8
refs/heads/master
2023-08-18T08:43:17.692535
2023-08-17T20:56:06
2023-08-17T20:56:06
227,717,798
0
0
Apache-2.0
2023-07-07T21:55:12
2019-12-12T23:51:44
Java
UTF-8
Java
false
false
2,068
java
package com.networknt.ob.model; import java.util.Arrays; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; public class OBReadTransaction4 { private Links Links; private Meta Meta; private Object Data; public OBReadTransaction4 () { } @JsonProperty("Links") public Links getLinks() { return Links; } public void setLinks(Links Links) { this.Links = Links; } @JsonProperty("Meta") public Meta getMeta() { return Meta; } public void setMeta(Meta Meta) { this.Meta = Meta; } @JsonProperty("Data") public Object getData() { return Data; } public void setData(Object Data) { this.Data = Data; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OBReadTransaction4 OBReadTransaction4 = (OBReadTransaction4) o; return Objects.equals(Links, OBReadTransaction4.Links) && Objects.equals(Meta, OBReadTransaction4.Meta) && Objects.equals(Data, OBReadTransaction4.Data); } @Override public int hashCode() { return Objects.hash(Links, Meta, Data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OBReadTransaction4 {\n"); sb.append(" Links: ").append(toIndentedString(Links)).append("\n"); sb.append(" Meta: ").append(toIndentedString(Meta)).append("\n"); sb.append(" Data: ").append(toIndentedString(Data)).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(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "stevehu@gmail.com" ]
stevehu@gmail.com
b4246fee63a0b72e7e4fb0bfe014dbdf2ba79937
f5b38977a922766bc542e24434f8d37ad6e35235
/src/main/java/com/google/devtools/build/lib/platform/SleepPreventionModule.java
9a85c9c412dc887a8ed1da40f5b33e139eb2fdb2
[ "Apache-2.0" ]
permissive
kaymarie26/bazel
f6c02fd37d51c77b24b40aa6aa192d1df0cfddd7
363522a926ef7d94a64d5acfc887b729c75af383
refs/heads/master
2022-11-26T04:33:01.259239
2020-07-30T10:03:02
2020-07-30T10:04:17
283,742,932
2
0
Apache-2.0
2020-07-30T10:36:14
2020-07-30T10:36:13
null
UTF-8
Java
false
false
2,103
java
// Copyright 2019 The Bazel Authors. 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.devtools.build.lib.platform; import com.google.common.annotations.VisibleForTesting; import com.google.devtools.build.lib.runtime.BlazeModule; import com.google.devtools.build.lib.runtime.CommandEnvironment; /** Prevents the computer from going to sleep while a Bazel command is running. */ public final class SleepPreventionModule extends BlazeModule { /** Methods for dealing with sleep prevention on local hardware. */ @VisibleForTesting public static final class SleepPrevention extends JniLoader { /** * Push a request to disable automatic sleep for hardware. Useful for making sure computers * don't go to sleep during long builds. Must be matched with a {@link #popDisableSleep} call. * * @return 0 on success, -1 if sleep is not supported. */ public static native int pushDisableSleep(); /** * Pop a request to disable automatic sleep for hardware. Useful for making sure computers don't * go to sleep during long builds. Must be matched with a previous {@link #pushDisableSleep} * call. * * @return 0 on success, -1 if sleep is not supported. */ public static native int popDisableSleep(); } @Override public void beforeCommand(CommandEnvironment env) { if (JniLoader.jniEnabled()) { SleepPrevention.pushDisableSleep(); } } @Override public void afterCommand() { if (JniLoader.jniEnabled()) { SleepPrevention.popDisableSleep(); } } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
4ae646f4376abff720e9a53e2712307fe6299a03
498cdfaf7a3f1fce0addd51cd21ec8da04739f96
/src/main/java/springboot/com/entor/service/impl/BaseServiceimpl.java
128a2a6f8e03da11b0228a91d5a1c409c08052b1
[]
no_license
gbh66574/springboot
2f05a14b9746c816b435fa4f11649af295df8200
9ca20917f3ee17f2fe4afb4ae07367894f7ec356
refs/heads/master
2020-04-26T23:07:39.697146
2019-03-05T07:02:25
2019-03-05T07:02:25
173,892,982
0
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package springboot.com.entor.service.impl; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import springboot.com.entor.dao.BaseDao; import springboot.com.entor.entity.Student; import springboot.com.entor.service.BaseService; @Service("baseService") public class BaseServiceimpl<T> implements BaseService<T> { @Resource private BaseDao<T> baseDao; @Override public void add(T t) { baseDao.add(t); } @Override public void addMore(List<T> list) { baseDao.addMore(list); } @Override public void deleteById(Class<?> cls, int id) { baseDao.deleteById(cls, id); } @Override public void deleteMore(Class<?> cls, String ids) { baseDao.deleteMore(cls, ids); } @Override public void update(T t) { baseDao.update(t); } @Override public T queryById(Class<?> cls, Serializable id) { return baseDao.queryById(cls, id); } @Override public List<T> queryAll(Class<?> cls) { return baseDao.queryAll(cls); } @Override public List<T> queryByPage(Class<?> cls, int currentPage, int pageSize) { Map<String,Integer> map = new HashMap<String, Integer>(); map.put("start", (currentPage-1)*pageSize); map.put("pageSize", pageSize); return baseDao.queryByPage(cls, map); } @Override public int getTotals(Class<?> cls) { return baseDao.getTotals(cls); } }
[ "Administrator@80DR054LIU0TTAN" ]
Administrator@80DR054LIU0TTAN
9f613ab35f89550dc97bcdb909dd4f3f72504d94
539f553004fa334ab470339ba7fc507910f5f130
/src/main/java/id/ais/ng/boot/repository/UserRepository.java
5d90b42085dc40ba4bf076aeee3abea3d0b98b47
[]
no_license
anggun-indra/crud-ng-boot
38d30dcea537e9cb4dcf025a29d206cc468baf2e
84c44419e19c66d87faff5ab280ddb1336fbdd2a
refs/heads/master
2021-06-30T03:07:41.478173
2018-10-16T09:03:09
2018-10-16T09:03:09
153,255,413
0
1
null
2020-09-18T05:37:57
2018-10-16T09:03:01
Java
UTF-8
Java
false
false
1,528
java
package id.ais.ng.boot.repository; import id.ais.ng.boot.domain.User; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; import java.time.Instant; /** * Spring Data JPA repository for the User entity. */ @Repository public interface UserRepository extends JpaRepository<User, Long> { String USERS_BY_LOGIN_CACHE = "usersByLogin"; String USERS_BY_EMAIL_CACHE = "usersByEmail"; Optional<User> findOneByActivationKey(String activationKey); List<User> findAllByActivatedIsFalseAndCreatedDateBefore(Instant dateTime); Optional<User> findOneByResetKey(String resetKey); Optional<User> findOneByEmailIgnoreCase(String email); Optional<User> findOneByLogin(String login); @EntityGraph(attributePaths = "authorities") Optional<User> findOneWithAuthoritiesById(Long id); @EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) Optional<User> findOneWithAuthoritiesByLogin(String login); @EntityGraph(attributePaths = "authorities") @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) Optional<User> findOneWithAuthoritiesByEmail(String email); Page<User> findAllByLoginNot(Pageable pageable, String login); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e22b5dd3c2d699ef318b155fbf66c774f55ced4c
68f09500cb6762ee84b27e97e8a548246e93cc58
/server/src/main/java/org/trams/junggu/data/repository/jpa/NoticeJpaRepository.java
fd9c1bb3ff6eeb23c14a339759d998f6808bc6f7
[]
no_license
minajsaaa/junggu_server
4a933ffcef35fa9f242eeb39369b0c03c41dedc3
1620f71c4ccdadf33ad6b367ecfd60c5e1cd916b
refs/heads/master
2023-05-25T20:00:41.022462
2017-12-25T09:58:47
2017-12-25T09:58:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package org.trams.junggu.data.repository.jpa; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.trams.junggu.bean.jpa.NoticeEntity; /** * Repository : Notice. */ public interface NoticeJpaRepository extends PagingAndSortingRepository<NoticeEntity, Integer> { @Query( "Select n from NoticeEntity n where n.isDelete !=1" ) Page<NoticeEntity> listPaging(Pageable pageable); @Query( "Select c from NoticeEntity c where c.updateDate > ?1 " ) List<NoticeEntity> findAllUpdate(java.util.Date updateDate, Pageable pageable); }
[ "kennyphong2811@gmail.com" ]
kennyphong2811@gmail.com