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
d17754498e792370d3e0d446b329f2c58ac2b97b
dd70bacf12f2b3fd81e4dac135b9a4e491f73cb8
/net/minecraft/world/gen/stateprovider/ForestFlowerBlockStateProvider.java
de705695fd44fcc4ce8dc3632946d7668fa9912d
[]
no_license
dennisvoliver/minecraft
bd9d8e256778ac3d00c1ab61a2b6c4702ed56827
fbf6271791785db06a3f8fe4a86c6a92f6a8d951
refs/heads/main
2023-04-23T12:38:25.848640
2021-05-19T07:15:38
2021-05-19T07:15:38
368,775,994
2
0
null
null
null
null
UTF-8
Java
false
false
1,533
java
package net.minecraft.world.gen.stateprovider; import com.mojang.serialization.Codec; import java.util.Random; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.biome.Biome; public class ForestFlowerBlockStateProvider extends BlockStateProvider { public static final Codec<ForestFlowerBlockStateProvider> CODEC = Codec.unit(() -> { return INSTANCE; }); private static final BlockState[] FLOWERS; public static final ForestFlowerBlockStateProvider INSTANCE; protected BlockStateProviderType<?> getType() { return BlockStateProviderType.FOREST_FLOWER_PROVIDER; } public BlockState getBlockState(Random random, BlockPos pos) { double d = MathHelper.clamp((1.0D + Biome.FOLIAGE_NOISE.sample((double)pos.getX() / 48.0D, (double)pos.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D); return FLOWERS[(int)(d * (double)FLOWERS.length)]; } static { FLOWERS = new BlockState[]{Blocks.DANDELION.getDefaultState(), Blocks.POPPY.getDefaultState(), Blocks.ALLIUM.getDefaultState(), Blocks.AZURE_BLUET.getDefaultState(), Blocks.RED_TULIP.getDefaultState(), Blocks.ORANGE_TULIP.getDefaultState(), Blocks.WHITE_TULIP.getDefaultState(), Blocks.PINK_TULIP.getDefaultState(), Blocks.OXEYE_DAISY.getDefaultState(), Blocks.CORNFLOWER.getDefaultState(), Blocks.LILY_OF_THE_VALLEY.getDefaultState()}; INSTANCE = new ForestFlowerBlockStateProvider(); } }
[ "user@email.com" ]
user@email.com
fe1123f34cc1f29b13bd69abefc37d3d012a9cc1
bc4a8550e346a405dd04bc41da1a640245d1e0c5
/src/main/java/com/bpms/sys/controller/EnterpriseSettingController.java
fe44da65ff864ffa4ed4a94701c9bd1122368c01
[]
no_license
senmeibin/testframework
6ef976733f4c558aa8c15288186aa7fd9825663a
6d2d0521e570385137a46673b64474d4901152ed
refs/heads/master
2020-05-24T15:09:57.751092
2019-05-18T11:27:05
2019-05-18T11:27:05
187,322,550
2
0
null
null
null
null
UTF-8
Java
false
false
1,828
java
package com.bpms.sys.controller; import com.bpms.sys.entity.ext.EnterpriseSettingExt; import com.bpms.sys.service.EnterpriseSettingService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * 企业设置控制器类 */ @Controller @RequestMapping("/sys/enterprisesetting") public class EnterpriseSettingController extends SysBaseController<EnterpriseSettingExt> { /** * Service对象 */ @Autowired private EnterpriseSettingService enterpriseSettingService; /** * 取得Service对象 */ @Override public EnterpriseSettingService getService() { return enterpriseSettingService; } /** * 数据一览画面初期化 * * @param model Model对象 * @return 数据一览JSP页面 * @throws IOException * @throws IllegalAccessException * @throws InstantiationException */ @Override @RequestMapping(value = {"list", ""}, method = RequestMethod.GET) public String list(Model model) throws IllegalAccessException, IOException, InstantiationException { return super.list(model); } /** * 初始化下拉框选项内容 * * @param model Model对象 * @throws IllegalAccessException * @throws IOException */ @Override public void initOptionList(Model model) throws IllegalAccessException, IOException { Map<String, Object> dicMap = new HashMap<>(); model.addAttribute("jsonOptionList_" + this.getEntityName(), this.toJSON(dicMap, true)); } }
[ "senmeibin@gmail.com" ]
senmeibin@gmail.com
015fff95acb126c1f46148d28c7c7ae00828c62f
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/zendesk/support/guide/HelpCenterFragment.java
de0158bcff708343978019f5e3da1d8b6088921a
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
3,168
java
package zendesk.support.guide; import android.annotation.SuppressLint; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.core.content.C0540a; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView.C1074l; import p333g.p384h.p385a.C12135e; import p333g.p384h.p385a.C12136f; import p333g.p384h.p385a.C12138h; import zendesk.commonui.C13561l; import zendesk.commonui.UiConfig; import zendesk.core.NetworkInfoProvider; import zendesk.support.HelpCenterProvider; import zendesk.support.SdkDependencyProvider; public class HelpCenterFragment extends Fragment { private HelpRecyclerViewAdapter adapter; HelpCenterProvider helpCenterProvider; NetworkInfoProvider networkInfoProvider; private HelpCenterMvp$Presenter presenter; private RecyclerView recyclerView; @SuppressLint({"RestrictedApi"}) public static HelpCenterFragment newInstance(HelpCenterUiConfig helpCenterUiConfig) { Bundle bundle = new Bundle(); C13561l.m35896a(bundle, (UiConfig) helpCenterUiConfig); HelpCenterFragment helpCenterFragment = new HelpCenterFragment(); helpCenterFragment.setArguments(bundle); return helpCenterFragment; } private void setupRecyclerView() { this.recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), 1, false)); this.recyclerView.mo5045a((C1074l) new SeparatorDecoration(C0540a.m2546c(getContext(), C12135e.zs_help_separator))); this.recyclerView.setAdapter(this.adapter); } public void onCreate(Bundle bundle) { super.onCreate(bundle); setRetainInstance(true); if (SdkDependencyProvider.INSTANCE.isInitialized()) { HelpCenterUiConfig helpCenterUiConfig = (HelpCenterUiConfig) C13561l.m35892a(getArguments(), HelpCenterUiConfig.class); SdkDependencyProvider.INSTANCE.provideSupportSdkComponent().inject(this); this.adapter = new HelpRecyclerViewAdapter(helpCenterUiConfig, this.helpCenterProvider, this.networkInfoProvider); HelpCenterMvp$Presenter helpCenterMvp$Presenter = this.presenter; if (helpCenterMvp$Presenter != null) { this.adapter.setContentUpdateListener(helpCenterMvp$Presenter); } } } public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(C12138h.zs_fragment_help, viewGroup, false); this.recyclerView = (RecyclerView) inflate.findViewById(C12136f.help_center_article_list); setupRecyclerView(); return inflate; } public void setPresenter(HelpCenterMvp$Presenter helpCenterMvp$Presenter) { this.presenter = helpCenterMvp$Presenter; HelpRecyclerViewAdapter helpRecyclerViewAdapter = this.adapter; if (helpRecyclerViewAdapter != null) { helpRecyclerViewAdapter.setContentUpdateListener(helpCenterMvp$Presenter); } } }
[ "developer@appzoc.com" ]
developer@appzoc.com
f6bf0f99e7a578e1e1ff3c958ee069fa0c7bd38d
c7c020db6d7df2aeb8c6bd419714a164bd77cd04
/spring-thyme-leaf-web/src/main/java/com/proshanto/spring/config/WebAppInitializer.java
43b37bebd6820a5d1bcc61e91cd9278428f81dbc
[]
no_license
proshantokuet/spring-thymeleaf-javabased-config
d738f15214731bcb4587b2491476d3224a93f199
ce2bfd49d8599fdc315b63adacd4b517cc99ff78
refs/heads/master
2021-07-03T17:59:13.737932
2017-09-14T12:11:20
2017-09-14T12:11:20
103,132,518
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
/** * */ package com.proshanto.spring.config; import javax.servlet.ServletContext; import javax.servlet.ServletRegistration; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; /** * @author proshanto */ public class WebAppInitializer implements WebApplicationInitializer { @Override public void onStartup(ServletContext container) { // Create the 'root' Spring application context AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext(); //rootContext.register(ServiceConfig.class, JPAConfig.class, SecurityConfig.class); // Manage the lifecycle of the root application context //container.addListener(new ContextLoaderListener(rootContext)); // Create the dispatcher servlet's Spring application context AnnotationConfigWebApplicationContext dispatcherServlet = new AnnotationConfigWebApplicationContext(); dispatcherServlet.register(MvcConfig.class, BeanConfig.class); // Register and map the dispatcher servlet ServletRegistration.Dynamic dispatcher = container .addServlet("dispatcher", new DispatcherServlet(dispatcherServlet)); dispatcher.setLoadOnStartup(1); dispatcher.addMapping("/"); } }
[ "proshanto@mpower-social.com" ]
proshanto@mpower-social.com
3cb85e727c1447deb8388beb0d6e66ce7f70e95d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_8af8f9c5fc1ea879254d446db89bef69a4ed4122/AbstractHeadingTag/27_8af8f9c5fc1ea879254d446db89bef69a4ed4122_AbstractHeadingTag_s.java
a7c50ce80672ab0bada72f8b3f459c578e5520d1
[]
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
6,970
java
/** * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999. * * This program is free software; you can redistribute it and/or modify * it under the terms of the latest version of the GNU Lesser General * Public License as published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program (LICENSE.txt); if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.jamwiki.parser.jflex; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.jamwiki.DataAccessException; import org.jamwiki.parser.ParserException; import org.jamwiki.parser.ParserInput; import org.jamwiki.parser.ParserOutput; import org.jamwiki.parser.TableOfContents; import org.jamwiki.utils.LinkUtil; import org.jamwiki.utils.Utilities; import org.jamwiki.utils.WikiLogger; /** * Abstract parent class used for parsing wiki & HTML heading tags. */ public abstract class AbstractHeadingTag implements JFlexParserTag { private static final WikiLogger logger = WikiLogger.getLogger(AbstractHeadingTag.class.getName()); /** * */ private String buildSectionEditLink(ParserInput parserInput, int section) { if (!parserInput.getAllowSectionEdit()) { return ""; } if (parserInput.getLocale() == null) { logger.info("Unable to build section edit links for " + parserInput.getTopicName() + " - locale is empty"); return ""; } // FIXME - template inclusion causes section edits to break, so disable for now Integer inclusion = (Integer)parserInput.getTempParams().get(TemplateTag.TEMPLATE_INCLUSION); boolean disallowInclusion = (inclusion != null && inclusion > 0); if (disallowInclusion) { return ""; } String url = ""; try { url = LinkUtil.buildEditLinkUrl(parserInput.getContext(), parserInput.getVirtualWiki(), parserInput.getTopicName(), null, section); } catch (DataAccessException e) { logger.error("Failure while building link for topic " + parserInput.getVirtualWiki() + " / " + parserInput.getTopicName(), e); } StringBuilder output = new StringBuilder("<span class=\"editsection\">[<a href=\"").append(url).append("\">"); output.append(Utilities.formatMessage("common.sectionedit", parserInput.getLocale())); output.append("</a>]</span>"); return output.toString(); } /** * */ private String buildTagName(JFlexLexer lexer, String tocText) { // re-convert any &uuml; or other (converted by the parser) entities back String tagName = StringEscapeUtils.unescapeHtml(tocText); return lexer.getParserInput().getTableOfContents().checkForUniqueName(tagName); } /** * */ private String buildTocText(JFlexLexer lexer, String tagText) throws ParserException { // since the TOC isn't part of the editable content use a copy of the parser input/ // and an empty output. ParserInput tmpParserInput = new ParserInput(lexer.getParserInput()); ParserOutput parserOutput = new ParserOutput(); String tocText = this.processTocText(tmpParserInput, parserOutput, tagText, JFlexParser.MODE_PROCESS); return Utilities.stripMarkup(tocText); } /** * */ private String generateOutput(JFlexLexer lexer, String tagName, String tocText, String tagText, int level, String raw, Object... args) throws ParserException { StringBuilder output = new StringBuilder(this.updateToc(lexer.getParserInput(), tagName, tocText, level)); int nextSection = lexer.getParserInput().getTableOfContents().size(); output.append("<a name=\"").append(Utilities.encodeAndEscapeTopicName(tagName)).append("\"></a>"); output.append(generateTagOpen(raw, args)); output.append(this.buildSectionEditLink(lexer.getParserInput(), nextSection)); String parsedTocText = this.processTocText(lexer.getParserInput(), lexer.getParserOutput(), tagText, lexer.getMode()); output.append("<span>").append(parsedTocText).append("</span>"); output.append("</h").append(level).append('>'); return output.toString(); } /** * */ protected abstract int generateTagLevel(String raw, Object... args) throws ParserException; /** * */ protected abstract String generateTagOpen(String raw, Object... args) throws ParserException; /** * */ protected abstract String generateTagText(String raw, Object... args) throws ParserException; /** * Parse a Mediawiki heading of the form "==heading==" and return the * resulting HTML output. */ public String parse(JFlexLexer lexer, String raw, Object... args) throws ParserException { if (logger.isTraceEnabled()) { logger.trace("heading: " + raw + " (" + lexer.yystate() + ")"); } int level = this.generateTagLevel(raw, args); String tagText = this.generateTagText(raw, args); if (lexer.peekTag().getTagType().equals("p")) { lexer.popTag("p"); } if (lexer instanceof JAMWikiProcessor && lexer.yystate() == JAMWikiProcessor.PARAGRAPH) { lexer.endState(); } String tocText = this.buildTocText(lexer, tagText); String tagName = this.buildTagName(lexer, tocText); if (lexer.getMode() <= JFlexParser.MODE_SLICE) { lexer.getParserOutput().setSectionName(tagName); return raw; } return this.generateOutput(lexer, tagName, tocText, tagText, level, raw, args); } /** * Process all text inside of the equals signs. */ private String processTocText(ParserInput parserInput, ParserOutput parserOutput, String tagText, int mode) throws ParserException { // special case - if text is of the form "=======text=======" then after stripping equals // signs "=text=" will be left. in this one case strip any opening equals signs before parsing. String extraEqualSigns = ""; int pos = StringUtils.indexOfAnyBut(tagText, "= \t"); if (pos != -1) { extraEqualSigns = tagText.substring(0, pos); tagText = (pos < tagText.length()) ? tagText.substring(pos) : ""; } return extraEqualSigns + JFlexParserUtil.parseFragment(parserInput, parserOutput, tagText, mode); } /** * */ private String updateToc(ParserInput parserInput, String name, String text, int level) { String output = ""; if (parserInput.getTableOfContents().getStatus() == TableOfContents.STATUS_TOC_UNINITIALIZED) { output += "__TOC__"; } parserInput.getTableOfContents().addEntry(name, text, level); return output; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4ba99a9e1a967787fd7225ab8d4784e09cb5eca5
1de0bd7e9bf278009bcccb892864b893883ed0cb
/.history/43.multiply-strings_20190310114302.java
856cbe0d3a56851892ab1e4801596ab2718614f1
[]
no_license
zhejianusc/leetcode_vs_code
b90a6539ff3d610302df06284d9ef2c4b27c6cca
485565448adc98f90cc1135c7cd12cfdd3fde31c
refs/heads/master
2020-04-24T00:44:20.160179
2020-03-24T04:40:32
2020-03-24T04:40:32
171,574,685
0
0
null
null
null
null
UTF-8
Java
false
false
2,149
java
/* * @lc app=leetcode id=43 lang=java * * [43] Multiply Strings * * https://leetcode.com/problems/multiply-strings/description/ * * algorithms * Medium (29.83%) * Total Accepted: 185K * Total Submissions: 616.9K * Testcase Example: '"2"\n"3"' * * Given two non-negative integers num1 and num2 represented as strings, return * the product of num1 and num2, also represented as a string. * * Example 1: * * * Input: num1 = "2", num2 = "3" * Output: "6" * * Example 2: * * * Input: num1 = "123", num2 = "456" * Output: "56088" * * * Note: * * * The length of both num1 and num2 is < 110. * Both num1 and num2 contain only digits 0-9. * Both num1 and num2 do not contain any leading zero, except the number 0 * itself. * You must not use any built-in BigInteger library or convert the inputs to * integer directly. * * */ class Solution { public String multiply(String num1, String num2) { int m = num1.length(); int n = num2.length(); int[] results = new int[m + n]; for(int i = m - 1; i >= 0; i--) { for(int j = n - 1; j >= 0; j--) { int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0'); int p1 = i + j; int p2 = i + j + 1; int s = results[p2] + mul; results[p1] += s / 10; results[p2] = s % 10; } } StringBuilder sb = new StringBuilder(); for(int p : results) { if(!(sb.length() == 0 && p == 0)) { sb.append(p); } } return sb.length() == 0 ? "0" : sb.toString(); } public String multiply(String num1, String num2) { int m = num1.length(); int n = num2.length(); int[] result = new int[m + n]; for(int i = m - 1; i >= 0; i--) { for(int j = n - 1; j >= 0; j--) { int p1 = i + j; int p2 = i + j + 1; int mul = (num1.charAt(i) - '0') * (num2.charAt(j) - '0'); int sum = mul + result[p2]; } } } }
[ "jianzher@sina.com" ]
jianzher@sina.com
879f79a7700a72891451f55529aca9217a6db938
d24de9be4c3993d9dc726e9a3c74d9662c470226
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/kotlin/io/ByteStreamsKt$iterator$1.java
255e8963f187db9e0f20ba9acb82a3d85a6658df
[]
no_license
MEJIOMAH17/rocketbank-api
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
refs/heads/master
2022-07-17T20:24:29.721131
2019-07-26T18:55:21
2019-07-26T18:55:21
198,698,231
4
0
null
2022-06-20T22:43:15
2019-07-24T19:31:49
Smali
UTF-8
Java
false
false
1,709
java
package kotlin.io; import java.io.BufferedInputStream; import java.util.NoSuchElementException; import kotlin.collections.ByteIterator; /* compiled from: IOStreams.kt */ public final class ByteStreamsKt$iterator$1 extends ByteIterator { private boolean finished; private int nextByte = -1; private boolean nextPrepared; final /* synthetic */ BufferedInputStream receiver$0; ByteStreamsKt$iterator$1(BufferedInputStream bufferedInputStream) { this.receiver$0 = bufferedInputStream; } public final int getNextByte() { return this.nextByte; } public final void setNextByte(int i) { this.nextByte = i; } public final boolean getNextPrepared() { return this.nextPrepared; } public final void setNextPrepared(boolean z) { this.nextPrepared = z; } public final boolean getFinished() { return this.finished; } public final void setFinished(boolean z) { this.finished = z; } private final void prepareNext() { if (!this.nextPrepared && !this.finished) { this.nextByte = this.receiver$0.read(); boolean z = true; this.nextPrepared = true; if (this.nextByte != -1) { z = false; } this.finished = z; } } public final boolean hasNext() { prepareNext(); return !this.finished; } public final byte nextByte() { prepareNext(); if (this.finished) { throw new NoSuchElementException("Input stream is over."); } byte b = (byte) this.nextByte; this.nextPrepared = false; return b; } }
[ "mekosichkin.ru" ]
mekosichkin.ru
f737897428968b70ac42df390b936ec6e87da402
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/128/888/CWE190_Integer_Overflow__int_connect_tcp_square_68b.java
b5baf3b1d750166954634a051355ca1d613a3a7b
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
2,145
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int_connect_tcp_square_68b.java Label Definition File: CWE190_Integer_Overflow__int.label.xml Template File: sources-sinks-68b.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: square * GoodSink: Ensure there will not be an overflow before squaring data * BadSink : Square data, which can lead to overflow * Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package * * */ public class CWE190_Integer_Overflow__int_connect_tcp_square_68b { public void badSink() throws Throwable { int data = CWE190_Integer_Overflow__int_connect_tcp_square_68a.data; /* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */ int result = (int)(data * data); IO.writeLine("result: " + result); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink() throws Throwable { int data = CWE190_Integer_Overflow__int_connect_tcp_square_68a.data; /* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */ int result = (int)(data * data); IO.writeLine("result: " + result); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink() throws Throwable { int data = CWE190_Integer_Overflow__int_connect_tcp_square_68a.data; /* FIX: Add a check to prevent an overflow from occurring */ /* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */ if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Integer.MAX_VALUE))) { int result = (int)(data * data); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform squaring."); } } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
6c3b36d9c3cc2446dbcbf1e6798d315e91eb812a
5848bcd14655edc7b5f7a043e2e99a6715f5163a
/nano-core/src/test/java/org/nanoframework/core/component/PluginLoaderInit.java
ee3f18894e4522c5b1e826e724318b6413e0d2bb
[ "Apache-2.0" ]
permissive
ycmag/nano-framework
d4c11a3088ab310d026f62160b63192509c433eb
768af5e189783a724d9915d958bdc8a4cf5c28e4
refs/heads/master
2021-01-14T08:50:14.077622
2016-08-23T08:48:30
2016-08-23T08:48:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,727
java
/* * Copyright 2015-2016 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.nanoframework.core.component; import java.util.Enumeration; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import org.junit.After; import org.junit.Before; import org.nanoframework.core.plugins.defaults.DefaultPluginLoader; /** * * @author yanghe * @since 1.3.15 */ public abstract class PluginLoaderInit { @Before public void init() { new DefaultPluginLoader().init(new ServletConfig() { @Override public String getServletName() { return null; } @Override public ServletContext getServletContext() { return null; } @Override public Enumeration<String> getInitParameterNames() { return null; } @Override public String getInitParameter(String name) { return null; } }); } @After public void clear() throws Throwable { Components.destroy(); } }
[ "comicme_yanghe@icloud.com" ]
comicme_yanghe@icloud.com
45f38a91753eb359e5498679220be7af4a6f72d4
8b9190a8c5855d5753eb8ba7003e1db875f5d28f
/sources/com/facebook/react/jstasks/HeadlessJsTaskRetryPolicy.java
fe842d108f9269c00dc3707927f28016863f410d
[]
no_license
stevehav/iowa-caucus-app
6aeb7de7487bd800f69cb0b51cc901f79bd4666b
e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044
refs/heads/master
2020-12-29T10:25:28.354117
2020-02-05T23:15:52
2020-02-05T23:15:52
238,565,283
21
3
null
null
null
null
UTF-8
Java
false
false
274
java
package com.facebook.react.jstasks; import javax.annotation.CheckReturnValue; public interface HeadlessJsTaskRetryPolicy { boolean canRetry(); HeadlessJsTaskRetryPolicy copy(); int getDelay(); @CheckReturnValue HeadlessJsTaskRetryPolicy update(); }
[ "steve@havelka.co" ]
steve@havelka.co
4522827423593394e14ff4ec1a3cc62e157d7098
6dc818eac00d33bb873402b40f2828090800b0c4
/JSP 폴더/JSP Files/210503_sourcecode/webStudy04_springMVC_Sem/src/main/java/kr/or/ddit/member/service/RealMemberDeleteJob.java
ed7af9566d1a8cd925207f52eaf22c02aaa366c1
[]
no_license
JeonghoonWon/ddit
0df0d29db4a2a1e15a7754adddb6fb5ef87935be
478812565f3c2ed297e80bc69a5699c58c1dfdb8
refs/heads/master
2023-06-01T18:42:04.310131
2021-06-29T07:48:42
2021-06-29T07:48:42
342,758,724
0
0
null
null
null
null
UTF-8
Java
false
false
835
java
package kr.or.ddit.member.service; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import kr.or.ddit.member.dao.IMemberDAO; @Component public class RealMemberDeleteJob { private static final Logger logger = LoggerFactory.getLogger(RealMemberDeleteJob.class); @Inject private IMemberDAO dao; @Scheduled(cron = "0 0 3 ? * MON") // @Scheduled(cron = "*/5 * * * * *") public void realDelete() { Map<String, Object> pMap = new HashMap<>(); dao.realDeleteMembers(pMap); Integer delCount = (Integer) pMap.get("delcount"); logger.info("스케쥴러가 동작했고, {} 명이 탈퇴되었음.", delCount); } }
[ "expedition1205@gmail.com" ]
expedition1205@gmail.com
a4ae358a14b88f728a1c2e2a366c3d00798701ce
b69c0253ae9415db3ad3cc5704b0fbe8e5fcaaa4
/app/src/main/java/com/marverenic/music/fragments/MiniplayerFragment.java
6fe102ff0dbafb034bf01f27542060e42dc716f9
[ "Apache-2.0" ]
permissive
agathabacani/Jockey
13461908f8472a9cbb7c279c28eb8e2249f59eb3
f32d543d6857d55d297f7f1e0e96203243b00d48
refs/heads/master
2021-01-21T05:32:03.112662
2017-02-25T23:49:22
2017-02-25T23:49:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,043
java
package com.marverenic.music.fragments; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import com.marverenic.music.JockeyApplication; import com.marverenic.music.data.store.ThemeStore; import com.marverenic.music.databinding.FragmentMiniplayerBinding; import com.marverenic.music.viewmodel.MiniplayerViewModel; import javax.inject.Inject; public class MiniplayerFragment extends BaseFragment { private FragmentMiniplayerBinding mBinding; @Inject ThemeStore mThemeStore; @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); JockeyApplication.getComponent(getContext()).inject(this); } @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mBinding = FragmentMiniplayerBinding.inflate(inflater, container, false); mBinding.setViewModel(new MiniplayerViewModel(this)); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { ProgressBar progressBar = mBinding.miniplayerProgress; LayerDrawable progressBarDrawable = (LayerDrawable) progressBar.getProgressDrawable(); Drawable progress = progressBarDrawable.findDrawableByLayerId(android.R.id.progress); progress.setColorFilter(mThemeStore.getAccentColor(), PorterDuff.Mode.SRC_ATOP); } return mBinding.getRoot(); } @Override public void onResume() { super.onResume(); mBinding.getViewModel().onActivityEnterForeground(); } @Override public void onPause() { super.onPause(); mBinding.getViewModel().onActivityExitForeground(); } }
[ "marverenic@gmail.com" ]
marverenic@gmail.com
a3bf9f1427c329adf6388e5e698a4b233ba0f817
b84f994cbb9d87ba31c4152904924b672b5f0fca
/04-microsservicos-de-pedido/ifood/cadastro/src/main/java/com/github/rafaellbarros/ifood/cadastro/infra/ConstraintViolationExceptionMapper.java
6c6045b859c7d8bc0653eb9f93c137e4b6f8230f
[]
no_license
rafaellbarros/desenvolvimento-web-com-quarkus
9670a779fc86bfa76e41639d8c3e1ed530d27b46
52af2ee43e778ddb176fe6b60e26db122b177658
refs/heads/master
2023-03-07T00:24:25.619654
2021-02-23T00:02:26
2021-02-23T01:07:35
299,351,375
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package com.github.rafaellbarros.ifood.cadastro.infra; import javax.validation.ConstraintViolationException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; @Provider public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> { @Override public Response toResponse(ConstraintViolationException exception) { return Response.status(Response.Status.BAD_REQUEST).entity(ConstraintViolationResponse.of(exception)).build(); } }
[ "rafaelbarros.df@gmail.com" ]
rafaelbarros.df@gmail.com
3badcf9c0e0ecb1ca28c94ec9719745d3a477cd8
c8d02dce0bf6c7f5817cfc40608552df6a97f81e
/src/com/threethclass1/FileTreatmentException.java
0587e438aa307c9c13fd2a62d2fac29a18351746
[]
no_license
zhangmenghan/DesignPatternQue
2d1741aa700fa3e7bc9bc46df7a7178a741cc201
47e8fbe4a9d60dda24b832bb527980c45b7f0027
refs/heads/master
2020-08-16T11:59:16.427586
2019-10-30T07:37:31
2019-10-30T07:37:31
215,499,312
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.threethclass1; public class FileTreatmentException extends RuntimeException { private static final long serialVersionUID = 1L; public FileTreatmentException() { } public FileTreatmentException(String msg) { super(msg); } }
[ "2423306508@qq.com" ]
2423306508@qq.com
0e24e3c493409bb2c15f1f1f79d49548166dc1ad
377e5e05fb9c6c8ed90ad9980565c00605f2542b
/bin/ext-integration/sap/synchronousOM/sapordermgmtb2bfacades/src/de/hybris/platform/sap/sapordermgmtb2bfacades/jalo/Sapordermgmtb2bfacadesManager.java
64d9f420cbb44cea4285e706fafa879e702f6d5a
[]
no_license
automaticinfotech/HybrisProject
c22b13db7863e1e80ccc29774f43e5c32e41e519
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
refs/heads/master
2021-07-20T18:41:04.727081
2017-10-30T13:24:11
2017-10-30T13:24:11
108,957,448
0
0
null
null
null
null
UTF-8
Java
false
false
4,578
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.sap.sapordermgmtb2bfacades.jalo; import de.hybris.platform.core.Registry; import de.hybris.platform.util.JspContext; import java.util.Map; import org.apache.log4j.Logger; import de.hybris.platform.sap.sapordermgmtb2bfacades.constants.Sapordermgmtb2bfacadesConstants; /** * This is the extension manager of the Sapordermgmtb2bfacades extension. */ public class Sapordermgmtb2bfacadesManager extends GeneratedSapordermgmtb2bfacadesManager { /** Edit the local|project.properties to change logging behavior (properties 'log4j.*'). */ private static final Logger LOG = Logger.getLogger(Sapordermgmtb2bfacadesManager.class.getName()); /* * Some important tips for development: * * Do NEVER use the default constructor of manager's or items. => If you want to do something whenever the manger is * created use the init() or destroy() methods described below * * Do NEVER use STATIC fields in your manager or items! => If you want to cache anything in a "static" way, use an * instance variable in your manager, the manager is created only once in the lifetime of a "deployment" or tenant. */ /** * Get the valid instance of this manager. * * @return the current instance of this manager */ public static Sapordermgmtb2bfacadesManager getInstance() { return (Sapordermgmtb2bfacadesManager) Registry.getCurrentTenant().getJaloConnection().getExtensionManager().getExtension( Sapordermgmtb2bfacadesConstants.EXTENSIONNAME); } /** * Never call the constructor of any manager directly, call getInstance() You can place your business logic here - * like registering a jalo session listener. Each manager is created once for each tenant. */ public Sapordermgmtb2bfacadesManager() // NOPMD { if (LOG.isDebugEnabled()) { LOG.debug("constructor of Sapordermgmtb2bfacadesManager called."); } } /** * Use this method to do some basic work only ONCE in the lifetime of a tenant resp. "deployment". This method is * called after manager creation (for example within startup of a tenant). Note that if you have more than one tenant * you have a manager instance for each tenant. */ @Override public void init() { if (LOG.isDebugEnabled()) { LOG.debug("init() of Sapordermgmtb2bfacadesManager called. " + getTenant().getTenantID()); } } /** * Use this method as a callback when the manager instance is being destroyed (this happens before system * initialization, at redeployment or if you shutdown your VM). Note that if you have more than one tenant you have a * manager instance for each tenant. */ @Override public void destroy() { if (LOG.isDebugEnabled()) { LOG.debug("destroy() of Sapordermgmtb2bfacadesManager called, current tenant: " + getTenant().getTenantID()); } } /** * Implement this method to create initial objects. This method will be called by system creator during * initialization and system update. Be sure that this method can be called repeatedly. * * An example usage of this method is to create required cronjobs or modifying the type system (setting e.g some * default values) * * @param params * the parameters provided by user for creation of objects for the extension * @param jspc * the jsp context; you can use it to write progress information to the jsp page during creation */ @Override public void createEssentialData(final Map<String, String> params, final JspContext jspc) { // implement here code creating essential data } /** * Implement this method to create data that is used in your project. This method will be called during the system * initialization. * * An example use is to import initial data like currencies or languages for your project from an csv file. * * @param params * the parameters provided by user for creation of objects for the extension * @param jspc * the jsp context; you can use it to write progress information to the jsp page during creation */ @Override public void createProjectData(final Map<String, String> params, final JspContext jspc) { // implement here code creating project data } }
[ "santosh.kshirsagar@automaticinfotech.com" ]
santosh.kshirsagar@automaticinfotech.com
b00a6695ec8674911d0abe21391b2284036500f3
55fc5cd9f4d4441e93f1bd5d3f653bde9d1e1078
/src/main/java/com/mauwahid/imd/friendsManagement/service/PersonStoryService.java
dbc51cf7862db7a1c50d18524766d36006dd3aa5
[]
no_license
mauwahid/friendsManagement
f4c05dc5825e74c101a95fbd52f71164b189bc2f
4ff436d46539ce1d59a186334c827cfdf6cea796
refs/heads/master
2021-07-03T20:11:59.794302
2017-09-25T16:42:15
2017-09-25T16:42:15
103,479,639
0
0
null
null
null
null
UTF-8
Java
false
false
2,518
java
package com.mauwahid.imd.friendsManagement.service; import com.mauwahid.imd.friendsManagement.entity.Person; import com.mauwahid.imd.friendsManagement.entity.PersonStory; import com.mauwahid.imd.friendsManagement.repository.PersonRepository; import com.mauwahid.imd.friendsManagement.repository.PersonStoryRepository; import com.mauwahid.imd.friendsManagement.utils.Common; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; @Service public class PersonStoryService { @Autowired private PersonRepository personRepository; @Autowired private PersonStoryRepository personStoryRepository; public Set<String> postStatus(String emailSender, String text){ Person person = personRepository.findByEmail(emailSender).stream().findFirst().orElse(null); PersonStory personStory = new PersonStory(); personStory.setPerson(person); personStory.setText(text); personStoryRepository.save(personStory); Set<String> emailsMentioned = Common.getEmailsFromText(text); Set<Person> memberMentioned = personRepository.findByEmailIn(emailsMentioned); Set<String> memberEmails = memberMentioned.stream().map(data-> data.getEmail() ).collect(Collectors.toSet()); emailsMentioned.removeAll(memberEmails); emailsMentioned.forEach(email -> { final Person nonMemberToSave = new Person(); personRepository.save(person); }); Set<Person> friends = personRepository.getAllFriend(person); Set<Person> blocked; Set<Person> subscribers; try{ blocked = person.getBlockedPeople(); }catch (NullPointerException ex){ blocked = new HashSet<>(); } try{ subscribers = person.getSubscribersPeople(); }catch (NullPointerException ex){ subscribers = new HashSet<>(); } Set<Person> receiverPeople = memberMentioned; receiverPeople.addAll(subscribers); receiverPeople.addAll(friends); receiverPeople.removeAll(blocked); Set<String> finalRecepients = receiverPeople.stream().map(data -> data.getEmail() ).collect(Collectors.toSet()); finalRecepients.addAll(emailsMentioned); return finalRecepients; } }
[ "mau.wahid@gmail.com" ]
mau.wahid@gmail.com
0b21bae9baebcd277ee3b9fe86e13eaa0f42817d
b7d8579d965579da3656db0e0918ca69829a40f8
/src/copyListwRandomPointer/CopyListwRandomPointer.java
6c5315dfec889434f77d76fc44747100b50ffe05
[]
no_license
ee08b397/leetcode_two
222e8047c3b70529bcce3027e4a6a60334d444b1
3ce3f5aa5cb909409058118f431ca04930d71902
refs/heads/master
2021-01-17T08:56:27.030789
2014-12-01T04:09:12
2014-12-01T04:09:12
42,875,788
1
0
null
2015-09-21T15:39:05
2015-09-21T15:39:05
null
UTF-8
Java
false
false
1,914
java
package copyListwRandomPointer; public class CopyListwRandomPointer{ public RandomListNode copyRandomList(RandomListNode head){ RandomListNode dh = new RandomListNode(0);//dummy head of copied list RandomListNode tail = dh;//tail of copied list RandomListNode cur = head;//current node in original list RandomListNode next = null;//next of original list RandomListNode copy = null;//current copied node //for each cur node and its next node, insert a copied node between them while(cur != null){ next = cur.next; copy = new RandomListNode(cur.label); cur.next = copy; copy.next = next; cur = next; } //set random pointer for each copied node cur = head; while(cur != null){ copy = cur.next; if(cur.random != null) copy.random = cur.random.next;//set random pointer for copied node cur = copy.next; } //seperate two lists cur = head; while(cur != null){ copy = cur.next; cur.next = copy.next; tail.next = copy; tail = tail.next; cur = cur.next; } return dh.next; } public static void main(String[] args){ CopyListwRandomPointer s = new CopyListwRandomPointer(); RandomListNode head = new RandomListNode(1); head.next = new RandomListNode(2); head.next.next = new RandomListNode(3); head.random = head.next.next; head.next.next.random = head; RandomListNode cp = s.copyRandomList(head); s.print(cp); } private void print(RandomListNode head){ while(head != null){ System.out.print(head.label + "->"); head = head.next; } System.out.println(); } } class RandomListNode{ int label; RandomListNode next,random; RandomListNode(int x){ this.label = x; } }
[ "zhou66.ustc@gmail.com" ]
zhou66.ustc@gmail.com
a7d9f2d0df8f2264ee33e03649e66810b751a31b
afb9ccb615f4acd2a1716a2666cc46167efc3454
/app/src/main/java/com/example/mamorky/socialplayer/ui/Song/SongView.java
916605c4262f86d944ccf8fbbcd79a46cc506829
[]
no_license
Mamorky/SocialPlayerBeta
d6fb8bde889a21f8e5bb353aa5908b72be877ec5
4ff65f19f311299b6b45907657cdc255f659c8ea
refs/heads/master
2021-09-16T00:20:12.037129
2018-06-13T18:19:16
2018-06-13T18:19:16
108,892,117
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package com.example.mamorky.socialplayer.ui.Song; import com.example.mamorky.socialplayer.data.db.pojo.Song; import java.util.ArrayList; import java.util.Set; import com.example.mamorky.socialplayer.adapter.SongAdapter; /** * Created by mamorky on 12/11/17. */ public interface SongView { void onLoadSuccess(ArrayList<Song> songs); void deleteSelectedSongs(Set<Integer> positions); }
[ "andres_ball@hotmail.com" ]
andres_ball@hotmail.com
d8e011569d01368ff067206059a6d75f3e8a7ad4
b474398887fd3f2fbebd29ccc580c5fb293e252d
/src/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java
19eadca535f867df5e87b23f888e541997971184
[ "MIT" ]
permissive
AndyChenIT/JDKSourceCode1.8
65a27e356debdcedc15642849602174c6ea286aa
4aa406b5b52e19ef8a323f9f829ea1852105d18b
refs/heads/master
2023-09-02T15:14:37.857475
2021-11-19T10:13:31
2021-11-19T10:13:31
428,856,994
0
0
MIT
2021-11-17T00:26:30
2021-11-17T00:26:29
null
UTF-8
Java
false
false
5,524
java
/* * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /** * 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 com.sun.org.apache.xml.internal.security.keys.content; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509EncodedKeySpec; import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; import com.sun.org.apache.xml.internal.security.utils.Constants; import com.sun.org.apache.xml.internal.security.utils.Signature11ElementProxy; import org.w3c.dom.Document; import org.w3c.dom.Element; /** * Provides content model support for the <code>dsig11:DEREncodedKeyvalue</code> element. * * @author Brent Putman (putmanb@georgetown.edu) */ public class DEREncodedKeyValue extends Signature11ElementProxy implements KeyInfoContent { /** JCA algorithm key types supported by this implementation. */ private static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"}; /** * Constructor DEREncodedKeyValue * * @param element * @param BaseURI * @throws XMLSecurityException */ public DEREncodedKeyValue(Element element, String BaseURI) throws XMLSecurityException { super(element, BaseURI); } /** * Constructor DEREncodedKeyValue * * @param doc * @param publicKey * @throws XMLSecurityException */ public DEREncodedKeyValue(Document doc, PublicKey publicKey) throws XMLSecurityException { super(doc); this.addBase64Text(getEncodedDER(publicKey)); } /** * Constructor DEREncodedKeyValue * * @param doc * @param base64EncodedKey */ public DEREncodedKeyValue(Document doc, byte[] encodedKey) { super(doc); this.addBase64Text(encodedKey); } /** * Sets the <code>Id</code> attribute * * @param Id ID */ public void setId(String id) { if (id != null) { this.constructionElement.setAttributeNS(null, Constants._ATT_ID, id); this.constructionElement.setIdAttributeNS(null, Constants._ATT_ID, true); } else { this.constructionElement.removeAttributeNS(null, Constants._ATT_ID); } } /** * Returns the <code>Id</code> attribute * * @return the <code>Id</code> attribute */ public String getId() { return this.constructionElement.getAttributeNS(null, Constants._ATT_ID); } /** @inheritDoc */ public String getBaseLocalName() { return Constants._TAG_DERENCODEDKEYVALUE; } /** * Method getPublicKey * * @return the public key * @throws XMLSecurityException */ public PublicKey getPublicKey() throws XMLSecurityException { byte[] encodedKey = getBytesFromTextChild(); // Iterate over the supported key types until one produces a public key. for (String keyType : supportedKeyTypes) { try { KeyFactory keyFactory = KeyFactory.getInstance(keyType); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey); PublicKey publicKey = keyFactory.generatePublic(keySpec); if (publicKey != null) { return publicKey; } } catch (NoSuchAlgorithmException e) { // Do nothing, try the next type } catch (InvalidKeySpecException e) { // Do nothing, try the next type } } throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedEncodedKey"); } /** * Method getEncodedDER * * @return the public key * @throws XMLSecurityException */ protected byte[] getEncodedDER(PublicKey publicKey) throws XMLSecurityException { try { KeyFactory keyFactory = KeyFactory.getInstance(publicKey.getAlgorithm()); X509EncodedKeySpec keySpec = keyFactory.getKeySpec(publicKey, X509EncodedKeySpec.class); return keySpec.getEncoded(); } catch (NoSuchAlgorithmException e) { Object exArgs[] = { publicKey.getAlgorithm(), publicKey.getFormat(), publicKey.getClass().getName() }; throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedPublicKey", exArgs, e); } catch (InvalidKeySpecException e) { Object exArgs[] = { publicKey.getAlgorithm(), publicKey.getFormat(), publicKey.getClass().getName() }; throw new XMLSecurityException("DEREncodedKeyValue.UnsupportedPublicKey", exArgs, e); } } }
[ "wupx@glodon.com" ]
wupx@glodon.com
d16907748405271318d89adf1cfbbc39090ca04f
47bd92b0ec19cef05398478e93f141e985cc0e05
/comparer/comparer.synchro/comparer.synchro.reader.readerbookmaker/comparer.synchro.reader.readerbookmaker.bean/src/main/java/com/comparadorad/bet/comparer/synchro/reader/readerbookmaker/bean/betonline/Odds.java
46caf45e7f22677c496d12fe62278b02858eaa41
[]
no_license
chuguet/my-comparer
f43c0c3dbf7f635864bbf346c0c11c455f3cb831
471e7d83d1c5c5400f90d901faa4f24f8e755490
refs/heads/master
2021-01-15T21:03:21.584668
2014-08-07T08:57:20
2014-08-07T08:57:20
null
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
1,931
java
// // Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.6 // Visite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. // Generado el: PM.06.04 a las 04:59:13 PM CEST // package com.comparadorad.bet.comparer.synchro.reader.readerbookmaker.bean.betonline; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Clase Java para anonymous complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{}moneyline"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "moneyline" }) @XmlRootElement(name = "odds") public class Odds { @XmlElement(required = true) protected String moneyline; /** * Obtiene el valor de la propiedad moneyline. * * @return * possible object is * {@link String } * */ public String getMoneyline() { return moneyline; } /** * Define el valor de la propiedad moneyline. * * @param value * allowed object is * {@link String } * */ public void setMoneyline(String value) { this.moneyline = value; } }
[ "huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd" ]
huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd
08374c0ebbe4f61ccfef8e657cef5decda44e251
293af93207a07cea4c437478322f032d04ef5f5d
/app/src/main/java/com/eshop/mvp/ui/activity/login/ForgetPasswordActivity.java
91a3800d1ce315362228cfc62c299e2e9c31a865
[]
no_license
thinking123/yiqi-android-pro
1918f861678ea64a90fab63d0532a7df85c0af09
7c67c1fe1c28699565abd75ef0918810d8587c65
refs/heads/master
2020-06-24T11:47:17.849026
2019-04-24T02:25:19
2019-04-24T02:25:19
198,954,139
1
0
null
null
null
null
UTF-8
Java
false
false
7,093
java
package com.eshop.mvp.ui.activity.login; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Html; import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.eshop.R; import com.eshop.app.base.BaseApp; import com.eshop.app.base.BaseSupportActivity; import com.eshop.di.component.DaggerLoginComponent; import com.eshop.di.module.LoginModule; import com.eshop.mvp.contract.LoginContract; import com.eshop.mvp.http.entity.login.LoginBean; import com.eshop.mvp.http.entity.login.UserInfoBean; import com.eshop.mvp.presenter.LoginPresenter; import com.eshop.mvp.ui.activity.MainActivity; import com.eshop.mvp.utils.AppConstant; import com.eshop.mvp.utils.LoginUtils; import com.eshop.mvp.utils.SpUtils; import com.jess.arms.di.component.AppComponent; import java.util.regex.Matcher; import java.util.regex.Pattern; import butterknife.BindView; import butterknife.OnClick; import timber.log.Timber; public class ForgetPasswordActivity extends BaseSupportActivity<LoginPresenter> implements LoginContract.View { @BindView(R.id.toolbar_back) RelativeLayout toolbarBack; @BindView(R.id.toolbar_title) TextView toolbarTitle; @BindView(R.id.phone) EditText phone; @BindView(R.id.code) EditText code; @BindView(R.id.send_sms) CountDownButton _codeButton; @BindView(R.id.password) EditText password; @BindView(R.id.re_password) EditText re_password; @BindView(R.id.btn_register) Button btnRegister; @Override public void setupActivityComponent(@NonNull AppComponent appComponent) { DaggerLoginComponent.builder() .appComponent(appComponent) .loginModule(new LoginModule(this)) .build() .inject(this); } @Override public int initView(@Nullable Bundle savedInstanceState) { return R.layout.activity_setpassword; } @Override public void initData(@Nullable Bundle savedInstanceState) { toolbarTitle.setText("密码重置"); toolbarBack.setVisibility(View.VISIBLE); //phone.setText(BaseApp.loginBean.getPhone()); } @Override public void loginResult(LoginBean msg) { //SpUtils.put(mContext, AppConstant.Api.TOKEN, msg.getToken()); //Timber.e((String) SpUtils.get(mContext, AppConstant.Api.TOKEN, "")); BaseApp.loginBean = msg; LoginUtils.saveLogin(this); startActivity(new Intent(mContext, MainActivity.class)); finish(); } @Override public void registerSuccess(UserInfoBean userBean) { } @Override public void setPasswordResult(LoginBean msg) { String phones = phone.getText().toString().trim(); String passwords = password.getText().toString().trim(); showMessage("重置密码成功"); if (mPresenter != null) { mPresenter.login(phones, passwords,"android"); } } @Override public void updateUserImageSuccess(String url) { } @Override public void updateUserInfoSuccess(LoginBean msg) { } @Override public void wxLoginResult(LoginBean msg) { } @Override public void checkPhoneSuccess() { } @Override public void checkCodeSuccess() { } @Override public void showLoading() { } @Override public void hideLoading() { } @Override public void showMessage(@NonNull String message) { Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show(); } @Override public void launchActivity(@NonNull Intent intent) { } @Override public void killMyself() { } @OnClick({R.id.send_sms, R.id.btn_register}) public void onViewClicked(View view) { String phones = phone.getText().toString().trim(); String passwords = password.getText().toString().trim(); String re_passwords = re_password.getText().toString().trim(); String codes = code.getText().toString().trim(); switch (view.getId()) { case R.id.send_sms: if (validate_phone(phones)) { if (mPresenter != null) { mPresenter.sendSms(phones); } } else { _codeButton.removeCountDown(); } break; case R.id.btn_register: if (validate_phone(phones) && canUseCode(codes) && canUsePassword(passwords,re_passwords)) if (mPresenter != null) { mPresenter.checkCode(passwords, phones, codes,"password"); } break; } } public boolean canUsePhone(String phone) { if (TextUtils.isEmpty(phone) || phone.length() != 11) { showMessage("手机号不能为空/位数不对"); return false; } return true; } public boolean canUsePassword(String password,String re_password) { if (TextUtils.isEmpty(password) || password.length() < 8) { showMessage("密码不能为空/不能小于8位"); return false; }else if(!password.equalsIgnoreCase(re_password)){ showMessage("密码确认有误"); return false; } return true; } public boolean canUseCode(String code) { if (TextUtils.isEmpty(code) || code.length() < 4) { showMessage("验证码不能为空/不可用"); return false; } return true; } public boolean validate_phone(String phone) { boolean valid = true; if (phone.isEmpty() || !isMobileNO(phone)) { showMessage("手机号不能为空/手机号码格式错误!"); valid = false; } return valid; } /** * 验证手机格式 */ public boolean isMobileNO(String mobiles) { /* 移动:134、135、136、137、138、139、150、151、157(TD)、158、159、187、188 联通:130、131、132、152、155、156、185、186 电信:133、153、180、189、(1349卫通) 总结起来就是第一位必定为1,第二位必定为3或5或8,其他位置的可以为0-9 */ String telRegex = "[1][345789]\\d{9}";//"[1]"代表第1位为数字1,"[358]"代表第二位可以为3、5、8中的一个,"\\d{9}"代表后面是可以是0~9的数字,有9位。 if (TextUtils.isEmpty(mobiles)) return false; else return mobiles.matches(telRegex); } public boolean isNumeric(String str) { Pattern pattern = Pattern.compile("[0-9]*"); Matcher isNum = pattern.matcher(str); if (!isNum.matches()) { return false; } return true; } }
[ "1294873004@qq.com" ]
1294873004@qq.com
5be9a09a50c3fc1936faf798300ed3d68344f473
020079f75ac2297ee0cda2e368a8f96b60fea312
/test-function/src/main/java/cn/fan/testfunction/model/JavaObservable.java
1da7db24294b84a99398558920f462be8826ac1a
[]
no_license
LightMoney/sprinboot
f49477031e0d74f64b1d5c9f674e612cecbdcd33
9343e702c93f54e537146662b475d83f4a7162de
refs/heads/master
2022-11-04T18:16:30.791356
2021-06-03T07:03:51
2021-06-03T07:03:51
243,511,692
1
0
null
2022-10-12T20:38:28
2020-02-27T12:16:25
Java
UTF-8
Java
false
false
536
java
package cn.fan.testfunction.model; import lombok.Data; import java.util.Observable; /** * 观察类 * * @author HTHLKJ * @version 1.0 * @date 2021/4/13 16:19 */ @Data public class JavaObservable extends Observable { private String article; /** * 发表文章 * @param article */ public void publish(String article){ // 发表文章 this.article = article; // 改变状态 this.setChanged(); // 通知所有观察者 this.notifyObservers(); } }
[ "fan85719223@outlook.com" ]
fan85719223@outlook.com
9e3770f503ea0c424c2857e1168f02a8bf5a71be
f767b5f5bb09fbe6368711b5d5f8986f40d0da0a
/src/main/java/exceptions/MyException.java
489ea169ace0f767ef8629d2b8db9eab7110285b
[]
no_license
MikiKru/tarr5_java_adv
10c3f0f6564bf6e0261cb2c579e10e210cb66ce6
822f7638c9e0312eff59f01b794eead25e426435
refs/heads/master
2022-11-21T16:45:46.643420
2020-07-19T10:00:23
2020-07-19T10:00:23
277,061,053
1
1
null
null
null
null
UTF-8
Java
false
false
656
java
package exceptions; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class MyException extends Exception { public MyException() { System.out.println("Jestem w kontruktorze: MyException"); System.out.println(getExceptionDateTime()); } @Override public void printStackTrace() { super.printStackTrace(); // wywołanie metody z nadklasy Exception System.out.println("Moja obsługa wyjątku"); // własna obsługa } public String getExceptionDateTime(){ return DateTimeFormatter.ofPattern("dd.MM.yyyy'r.' '('HH:mm:ss')'").format(LocalDateTime.now()); } }
[ "michal_kruczkowski@o2.pl" ]
michal_kruczkowski@o2.pl
5fe58f0915071c0172421000e0f6675dcc68f474
9ff1a051355bdc55e69a64f14a6062533feef0d7
/Hello/src/Loop3.java
381602fe798142b3e6591d7aba79a192be603348
[]
no_license
victorgonzalezs/java_danvitoriano
af8e46d6fad92633eb71867a285d1f1ebebb070d
6e70c2d72e83f013a91c24daca71696f0cbca2ef
refs/heads/master
2020-08-04T17:03:33.866268
2019-10-04T01:48:09
2019-10-04T01:48:09
212,213,321
0
0
null
null
null
null
UTF-8
Java
false
false
136
java
public class Loop3 { public static void main(String[] args) { for (int x = 3; x <= 100; x += 3) { System.out.println(x); } } }
[ "logonaluno@local.com" ]
logonaluno@local.com
10341f849dd5679174605e502333c768e07a3c5e
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/BoilerActuator5078.java
65e8fdbd36e72f8f3bfe491a48b04afcb79b2178
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator5078 { public execute(int temperatureDifference5078, boolean boilerStatus5078) { //sync _bfpnGUbFEeqXnfGWlV5078, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
27125cef59eb4c84162c8ef4c665a9913a6832c2
8388d3009c0be9cb4e3ea25abbce7a0ad6f9b299
/business/agriprpall/agriprpall-core/src/main/java/com/sinosoft/agriprpall/core/policymanage/service/impl/PrpCexpenseServiceImpl.java
3489900ad24381eb0467967fe20c027a8c32fe9d
[]
no_license
foxhack/NewAgri2018
a182bd34d0c583a53c30d825d5e2fa569f605515
be8ab05e0784c6e7e7f46fea743debb846407e4f
refs/heads/master
2021-09-24T21:58:18.577979
2018-10-15T11:24:21
2018-10-15T11:24:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,682
java
package com.sinosoft.agriprpall.core.policymanage.service.impl; import com.sinosoft.agriprpall.api.endorsemanage.dto.PrpCPexpenseDto; import com.sinosoft.agriprpall.api.endorsemanage.dto.PrpPexpenseDto; import com.sinosoft.agriprpall.api.policymanage.dto.PrpCexpenseDto; import com.sinosoft.agriprpall.core.policymanage.service.PrpCexpenseService; import com.sinosoft.framework.core.service.impl.BaseServiceImpl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * PrpCexpense表服务接口实现类 * @Author: 王保良 * @Date: 9:00 2017/11/28 */ @Service public class PrpCexpenseServiceImpl extends BaseServiceImpl implements PrpCexpenseService { /** * P表记录转为C表记录 * @author: 王保良 * @date: 2017/11/18 * @param prpPexpenseDto * @return prpCexpenseDto * @throws Exception */ @Override @Transactional(rollbackFor = Exception.class) public PrpCexpenseDto PEvaluateC(PrpPexpenseDto prpPexpenseDto) throws Exception { PrpCexpenseDto prpCexpenseDto=new PrpCexpenseDto(); prpCexpenseDto.setPolicyNo(prpPexpenseDto.getPolicyNo()); prpCexpenseDto.setRiskCode(prpPexpenseDto.getRiskCode()); prpCexpenseDto.setManageFeeRate(prpPexpenseDto.getManageFeeRate()); prpCexpenseDto.setMaxManageFeeRate(prpPexpenseDto.getMaxManageFeeRate()); prpCexpenseDto.setFlag(prpPexpenseDto.getFlag()); prpCexpenseDto.setBasePerformanceRate(prpPexpenseDto.getBasePerformanceRate()); prpCexpenseDto.setBasePerformance(prpPexpenseDto.getBasePerformance()); prpCexpenseDto.setEncouragePerformanceRate(prpPexpenseDto.getEncouragePerformanceRate()); prpCexpenseDto.setEncouragePerformance(prpPexpenseDto.getEncouragePerformance()); prpCexpenseDto.setNoTaxFee(prpPexpenseDto.getNoTaxFee()); prpCexpenseDto.setTaxRate(prpPexpenseDto.getTaxRate()); prpCexpenseDto.setTaxFee(prpPexpenseDto.getTaxFee()); return prpCexpenseDto; } /** * CP表记录转为C表记录 * @author: 王保良 * @date: 2017/11/18 * @param prpCPexpenseDto * @return PrpCexpenseDto * @throws Exception */ @Override @Transactional(rollbackFor = Exception.class) public PrpCexpenseDto generatePrpCexpense(PrpCPexpenseDto prpCPexpenseDto) throws Exception { PrpCexpenseDto prpCexpenseDto=new PrpCexpenseDto(); prpCexpenseDto.setPolicyNo(prpCPexpenseDto.getPolicyNo()); prpCexpenseDto.setRiskCode(prpCPexpenseDto.getRiskCode()); prpCexpenseDto.setManageFeeRate(prpCPexpenseDto.getManageFeeRate()); prpCexpenseDto.setMaxManageFeeRate(prpCPexpenseDto.getMaxManageFeeRate()); // add by luyang 救助基金比例 20060616 prpCexpenseDto.setSalvationFee(prpCPexpenseDto.getSalvationFee()); prpCexpenseDto.setSalvationRate(prpCPexpenseDto.getSalvationRate()); prpCexpenseDto.setCurrency(prpCPexpenseDto.getCurrency()); prpCexpenseDto.setFlag(prpCPexpenseDto.getFlag()); prpCexpenseDto.setBasePerformanceRate(prpCPexpenseDto.getBasePerformanceRate()); prpCexpenseDto.setBasePerformance(prpCPexpenseDto.getBasePerformance()); prpCexpenseDto.setEncouragePerformanceRate(prpCPexpenseDto.getEncouragePerformanceRate()); prpCexpenseDto.setEncouragePerformance(prpCPexpenseDto.getEncouragePerformance()); prpCexpenseDto.setNoTaxFee(prpCPexpenseDto.getNoTaxFee()); prpCexpenseDto.setTaxRate(prpCPexpenseDto.getTaxRate()); prpCexpenseDto.setTaxFee(prpCPexpenseDto.getTaxFee()); return prpCexpenseDto; } }
[ "vicentdk77@users.noreply.github.com" ]
vicentdk77@users.noreply.github.com
b78f039ca1f15d9b1e29f3d1d582ed6be64748fd
637b4faf515c75451a10c580287f7e5f44423ba0
/1.JavaSyntax/src/com/javarush/task/task08/task0812/Solution.java
aa220418754043ed00d298dfa9081c1d4a198e99
[]
no_license
Abrekov/JavaRushTasks
ccc51f357ee542801e90811dbbc2a4c99845e0e6
b1703a05303f3b1442e373a853a861bf793031b0
refs/heads/master
2020-09-07T05:57:18.878059
2019-12-08T17:19:18
2019-12-08T17:19:18
220,676,965
0
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
package com.javarush.task.task08.task0812; import java.awt.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; /* Cамая длинная последовательность */ public class Solution { public static void main(String[] args) throws IOException { //напишите тут ваш код List<Integer> list = new ArrayList<>(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0; i < 10; i++) { list.add(Integer.parseInt(reader.readLine())); } int count = 1; int maxSeq = 1; for (int i = 1; i < 10; i++) { if (list.get(i).intValue() == list.get(i - 1).intValue()) { count++; } else { count = 1; } if (maxSeq < count) { maxSeq = count; } } System.out.println(maxSeq); } }
[ "abrekov@ya.ru" ]
abrekov@ya.ru
cf983cc915f60e334e2d8d7c3f171cf59b3ad1a2
fde12555b15598267c8042deea260e841f4b93a0
/08 - Spring Advanced/07 - Aspect Oriented Programming (AOP)/proxies/src/main/java/proxies/cache/StudentServiceInvocationHandler.java
54a4a362a934ea7fb8f9dda0541db2351e5a47a5
[]
no_license
elenaborisova/SoftUni-Java-Web-Developer-Path
de4cc3c0bb85784815246f23c186aff3f56cc4e8
49b435de458df4d89fcb88742ce96461c325270e
refs/heads/master
2023-07-14T21:10:46.689598
2021-09-03T13:06:28
2021-09-03T13:06:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package proxies.cache; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; public class StudentServiceInvocationHandler implements InvocationHandler { private Object realObj; private Map<String, Object> cache = new HashMap<>(); public StudentServiceInvocationHandler(Object realObj) { this.realObj = realObj; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Cacheable cacheableAnnotation = realObj.getClass() .getMethod(method.getName(), method.getParameterTypes()) .getAnnotation(Cacheable.class); if(cacheableAnnotation != null){ if(cache.containsKey(cacheableAnnotation.value())){ return cache.get(cacheableAnnotation.value()); }else { Object toCache = method.invoke(realObj, args); cache.put(cacheableAnnotation.value(), toCache); return toCache; } }else { return method.invoke(realObj, args); } } }
[ "p.bozidarova@gmail.com" ]
p.bozidarova@gmail.com
0a4a3c3612cafb01b2c39882ada20e49759a5849
b72fb54ae059f7cc7ad96af522bee50993938634
/src/equinox/data/ui/HelpTreeCell.java
3dede195be092c97f153509b7ecf0d884bfa56ac
[ "Apache-2.0" ]
permissive
happydpc/Equinox
d10d3f50e70686fa1555e4eed12683ff02dff5b9
7a4ddad63ba2d3a54ed3813d39a268f0a1aadcd4
refs/heads/master
2020-03-31T13:53:54.946261
2018-10-04T23:20:12
2018-10-04T23:20:12
152,272,099
2
0
null
2018-10-09T15:06:26
2018-10-09T15:06:26
null
UTF-8
Java
false
false
1,204
java
/* * Copyright 2018 Murat Artim (muratartim@gmail.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package equinox.data.ui; import javafx.scene.control.TreeCell; /** * Class for customized help tree cell. * * @author Murat Artim * @date Jan 20, 2014 * @time 1:32:11 PM */ public final class HelpTreeCell extends TreeCell<String> { @Override public void updateItem(String item, boolean empty) { // update item super.updateItem(item, empty); // empty cell if (empty) { setText(null); setGraphic(null); } // valid cell else { HelpItem helpItem = (HelpItem) getTreeItem(); setText(helpItem.toString()); setGraphic(helpItem.getIcon()); } } }
[ "muratartim@gmail.com" ]
muratartim@gmail.com
651e79de26ce363f37f862f828b0b8813d102540
e1520517adcdd4ee45fb7b19e7002fdd5a46a02a
/polardbx-optimizer/src/main/java/com/alibaba/polardbx/optimizer/view/InformationSchemaRoutines.java
e00ccec42850b8eaa1af57a7d995c4d83343a736
[ "Apache-2.0" ]
permissive
huashen/galaxysql
7702969269d7f126d36f269e3331ed1c8da4dc20
b6c88d516367af105d85c6db60126431a7e4df4c
refs/heads/main
2023-09-04T11:40:36.590004
2021-10-25T15:43:14
2021-10-25T15:43:14
421,088,419
1
0
null
null
null
null
UTF-8
Java
false
false
5,404
java
/* * Copyright [2013-2021], Alibaba Group Holding Limited * * 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.alibaba.polardbx.optimizer.view; import org.apache.calcite.plan.RelOptCluster; import org.apache.calcite.plan.RelTraitSet; import org.apache.calcite.rel.RelInput; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.rel.type.RelDataTypeFieldImpl; import org.apache.calcite.sql.type.SqlTypeName; import java.util.LinkedList; import java.util.List; /** * @author dylan */ public class InformationSchemaRoutines extends VirtualView { public InformationSchemaRoutines(RelOptCluster cluster, RelTraitSet traitSet) { super(cluster, traitSet, VirtualViewType.ROUTINES); } public InformationSchemaRoutines(RelInput relInput) { super(relInput); } @Override protected RelDataType deriveRowType() { final RelDataTypeFactory typeFactory = getCluster().getTypeFactory(); List<RelDataTypeFieldImpl> columns = new LinkedList<>(); columns.add(new RelDataTypeFieldImpl("SPECIFIC_NAME", 0, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_CATALOG", 1, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_SCHEMA", 2, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_NAME", 3, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_TYPE", 4, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("DATA_TYPE", 5, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add( new RelDataTypeFieldImpl("CHARACTER_MAXIMUM_LENGTH", 6, typeFactory.createSqlType(SqlTypeName.BIGINT))); columns .add(new RelDataTypeFieldImpl("CHARACTER_OCTET_LENGTH", 7, typeFactory.createSqlType(SqlTypeName.BIGINT))); columns.add( new RelDataTypeFieldImpl("NUMERIC_PRECISION", 8, typeFactory.createSqlType(SqlTypeName.INTEGER_UNSIGNED))); columns .add(new RelDataTypeFieldImpl("NUMERIC_SCALE", 9, typeFactory.createSqlType(SqlTypeName.INTEGER_UNSIGNED))); columns.add(new RelDataTypeFieldImpl("DATETIME_PRECISION", 10, typeFactory.createSqlType(SqlTypeName.INTEGER_UNSIGNED))); columns.add(new RelDataTypeFieldImpl("CHARACTER_SET_NAME", 11, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("COLLATION_NAME", 12, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("DTD_IDENTIFIER", 13, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_BODY", 14, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_DEFINITION", 15, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("EXTERNAL_NAME", 16, typeFactory.createSqlType(SqlTypeName.BINARY))); columns.add(new RelDataTypeFieldImpl("EXTERNAL_LANGUAGE", 17, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("PARAMETER_STYLE", 18, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("IS_DETERMINISTIC", 19, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("SQL_DATA_ACCESS", 20, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("SQL_PATH", 21, typeFactory.createSqlType(SqlTypeName.BINARY))); columns.add(new RelDataTypeFieldImpl("SECURITY_TYPE", 22, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("CREATED", 23, typeFactory.createSqlType(SqlTypeName.TIMESTAMP))); columns.add(new RelDataTypeFieldImpl("LAST_ALTERED", 24, typeFactory.createSqlType(SqlTypeName.TIMESTAMP))); columns.add(new RelDataTypeFieldImpl("SQL_MODE", 25, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("ROUTINE_COMMENT", 26, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("DEFINER", 27, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns .add(new RelDataTypeFieldImpl("CHARACTER_SET_CLIENT", 28, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns .add(new RelDataTypeFieldImpl("COLLATION_CONNECTION", 29, typeFactory.createSqlType(SqlTypeName.VARCHAR))); columns.add(new RelDataTypeFieldImpl("DATABASE_COLLATION", 30, typeFactory.createSqlType(SqlTypeName.VARCHAR))); return typeFactory.createStructType(columns); } }
[ "chenmo.cm@alibaba-inc.com" ]
chenmo.cm@alibaba-inc.com
6cddef5c449bcd6301bfb63c1bca034cfebec824
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/iflytek/voiceads/p622d/p628f/C5477i.java
71266502b238e20a0cb9c269a9d0fd69aa0dbd84
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
package com.iflytek.voiceads.p622d.p628f; import com.iflytek.voiceads.p622d.p624b.C5283b; import com.iflytek.voiceads.p622d.p626d.C5297h; /* renamed from: com.iflytek.voiceads.d.f.i */ public class C5477i { /* renamed from: com.iflytek.voiceads.d.f.i$a */ public static class C5478a extends IllegalStateException { public C5478a(String str, Object... objArr) { super(String.format(str, objArr)); } } /* renamed from: a */ public static C5433c m33914a(AbstractC5434d dVar, C5297h hVar) { C5283b.m33169a(dVar); C5283b.m33169a(hVar); return C5427a.m33833a(dVar, hVar); } /* renamed from: a */ public static C5433c m33915a(String str, C5297h hVar) { C5283b.m33171a(str); return m33914a(C5476h.m33894a(str), hVar); } /* renamed from: b */ public static C5297h m33916b(String str, C5297h hVar) { C5283b.m33171a(str); return C5427a.m33834b(C5476h.m33894a(str), hVar); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
0e1579d8661c835b39c301e3c9a2fbc45b95beff
da1489356ca38c6dbafd48242da0c45c503abb94
/querydsl-sql/src/test/java/com/mysema/query/_h2/InsertH2Test.java
124aec1fda8d42cacb2fb0b2ca048aba8ef3954a
[]
no_license
john7doe/querydsl
8920e7e3752a053d363710e41b714b6ddf3b7d07
2a9b59233360333eb2293bd493488ac3de85877b
refs/heads/master
2021-01-18T11:07:37.268450
2012-05-16T17:22:33
2012-05-16T17:22:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
/* * Copyright 2011, Mysema Ltd * * 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.mysema.query._h2; import java.sql.SQLException; import org.junit.Before; import org.junit.BeforeClass; import com.mysema.query.Connections; import com.mysema.query.InsertBaseTest; import com.mysema.query.Target; import com.mysema.query.sql.H2Templates; import com.mysema.testutil.Label; @Label(Target.H2) public class InsertH2Test extends InsertBaseTest{ @BeforeClass public static void setUpClass() throws Exception { Connections.initH2(); } @Before public void setUp() throws SQLException { templates = new H2Templates(){{ newLineToSingleSpace(); }}; super.setUp(); } }
[ "timo.westkamper@mysema.com" ]
timo.westkamper@mysema.com
e4c8d922f38a33335ee95d6dca4547435bc355c5
e47823f99752ec2da083ac5881f526d4add98d66
/test_data/14_Azureus2.3.0.6/src/com/aelitis/azureus/core/update/AzureusRestarter.java
34f964fb6dd5e1496be54692072588701fd9d27d
[]
no_license
Echtzeitsysteme/hulk-ase-2016
1dee8aca80e2425ab6acab18c8166542dace25cd
fbfb7aee1b9f29355a20e365f03bdf095afe9475
refs/heads/master
2020-12-24T05:31:49.671785
2017-05-04T08:18:32
2017-05-04T08:18:32
56,681,308
2
0
null
null
null
null
UTF-8
Java
false
false
1,104
java
/* * Created on 17-Nov-2004 * Created by Paul Gardner * Copyright (C) 2004 Aelitis, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * AELITIS, SARL au capital de 30,000 euros * 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France. * */ package com.aelitis.azureus.core.update; /** * @author parg * */ public interface AzureusRestarter { public void restart( boolean update_only ); }
[ "sven.peldszus@stud.tu-darmstadt.de" ]
sven.peldszus@stud.tu-darmstadt.de
11fcb2bc3d81efc24641362faccf7c5a311b94e2
dc9d66ecb20067c7bf0fe2e191a4879ab4058940
/app/src/main/java/com/angcyo/pagescaledemo/MainActivity.java
38574bdf89eb1e19c1b21dfa98a0c20c3e5558ea
[]
no_license
angcyo/PageScaleDemo
a9d40180eeaf3269cc8780f48e642ff4446518e6
12a9f5fbdbca61d78bd12d35ce6763fb2269c6e2
refs/heads/master
2016-08-12T04:43:11.096753
2015-11-12T03:11:45
2015-11-12T03:11:45
46,026,014
0
0
null
null
null
null
UTF-8
Java
false
false
3,958
java
package com.angcyo.pagescaledemo; import android.graphics.Color; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity { ViewPager viewPager; int[] imgs = new int[]{R.drawable.img_meizi1, R.drawable.img_meizi2, R.drawable.img_meizi3}; String[] texts = new String[]{"第一页", "第二页", "第三页"}; List views; FloatingActionButton fab; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); initViews(); } private void initViews() { views = new ArrayList(); View item1 = View.inflate(this, R.layout.layout_item, null); ((ImageView) item1.findViewById(R.id.img)).setImageResource(imgs[0]); ((TextView) item1.findViewById(R.id.text)).setText(texts[0]); views.add(item1); View item2 = View.inflate(this, R.layout.layout_item, null); ((ImageView) item2.findViewById(R.id.img)).setImageResource(imgs[1]); ((TextView) item2.findViewById(R.id.text)).setText(texts[1]); views.add(item2); View item3 = View.inflate(this, R.layout.layout_item, null); ((ImageView) item3.findViewById(R.id.img)).setImageResource(imgs[2]); ((TextView) item3.findViewById(R.id.text)).setText(texts[2]); views.add(item3); viewPager = (ViewPager) findViewById(R.id.pageView); viewPager.setAdapter(new PagerAdapter() { @Override public int getCount() { return views.size(); } @Override public Object instantiateItem(ViewGroup container, int position) { container.addView((View) views.get(position)); container.setBackgroundColor(Color.TRANSPARENT); return views.get(position); } @Override public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((View) views.get(position)); } @Override public boolean isViewFromObject(View view, Object object) { return view == object; } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "angcyo@126.com" ]
angcyo@126.com
2e76ad329a6b3990d7fef65fe9050760bcd4394b
9008c0d68f2ced89970c57f201624f6cd014e30a
/plugins/ru.runa.gpd.form.quick/src/ru/runa/gpd/quick/extension/QuickTemplateRegister.java
0bee8ae7652137993b743505cab11e922b9e2ea7
[]
no_license
MaximCheb/runawfe-free-devstudio
fa9cabc442280123b5eb5469416054b056838bb2
7a9546e4a5a5e8c2573e26d62af1248b9cc6238f
refs/heads/master
2023-05-31T10:26:07.838582
2021-06-14T21:36:32
2021-06-14T21:36:32
366,336,621
0
0
null
2021-06-05T21:51:17
2021-05-11T10:04:50
null
UTF-8
Java
false
false
3,907
java
package ru.runa.gpd.quick.extension; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.Platform; import org.osgi.framework.Bundle; import ru.runa.gpd.Activator; import ru.runa.gpd.extension.Artifact; import ru.runa.gpd.extension.ArtifactRegistry; import com.google.common.base.Objects; import com.google.common.collect.Lists; public class QuickTemplateRegister extends ArtifactRegistry<QuickTemplateArtifact> { private static Map<String, Bundle> templateBundles = new HashMap<String, Bundle>(); private static final String XML_FILE_NAME = "quicktemplates.xml"; private static final QuickTemplateRegister instance = new QuickTemplateRegister(new QuickTemplateContentProvider()); public static QuickTemplateRegister getInstance() { return instance; } public QuickTemplateRegister(QuickTemplateContentProvider contentProvider) { super(contentProvider); } @Override protected File getContentFile() { return new File(Activator.getPreferencesFolder(), XML_FILE_NAME); } @Override protected void loadDefaults(List<QuickTemplateArtifact> list) { IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint("ru.runa.gpd.form.quick.templates").getExtensions(); for (IExtension extension : extensions) { Bundle bundle = Platform.getBundle(extension.getNamespaceIdentifier()); IConfigurationElement[] configElements = extension.getConfigurationElements(); for (IConfigurationElement configElement : configElements) { boolean enabled = Boolean.valueOf(configElement.getAttribute("enabled")); String name = configElement.getAttribute("name"); String label = configElement.getAttribute("label"); String fileName = configElement.getAttribute("filename"); QuickTemplateArtifact artifact = new QuickTemplateArtifact(enabled, name, label, fileName); if(configElement.getChildren() != null) { List<Artifact> parameters = new ArrayList<Artifact>(); for(IConfigurationElement parameterConfig : configElement.getChildren()) { Artifact parameterArtifact = new Artifact(); parameterArtifact.setName(parameterConfig.getAttribute("name")); parameterArtifact.setLabel(parameterConfig.getAttribute("label")); parameters.add(parameterArtifact); } artifact.setParameters(parameters); } list.add(artifact); templateBundles.put(fileName, bundle); } } } public static Bundle getBundle(String fileName) { if (templateBundles.containsKey(fileName)) { return templateBundles.get(fileName); } return null; } public List<QuickTemplateArtifact> getAll(boolean onlyEnabled) { List<QuickTemplateArtifact> list = Lists.newArrayList(); for (QuickTemplateArtifact handlerArtifact : getAll()) { if (onlyEnabled && !handlerArtifact.isEnabled()) { continue; } list.add(handlerArtifact); } return list; } public boolean isArtifactRegistered(String name) { QuickTemplateArtifact handlerArtifact = getArtifact(name); return handlerArtifact != null; } public QuickTemplateArtifact getArtifactByFileName(String fileName) { for (QuickTemplateArtifact artifact : getAll()) { if (Objects.equal(fileName, artifact.getFileName())) { return artifact; } } return null; } }
[ "tarwirdur@ya.ru" ]
tarwirdur@ya.ru
6ec21b22baa4e6f7bdc33e0a50ed075393640a6e
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/yaal/archive/2012.09/2012.09 - September Challenge 2012/ThreeIsCrowd.java
e26d7d184cc38e79b1dcb0ebf0c3af27812b4634
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
701
java
package net.egork; import net.egork.numbers.IntegerUtils; import net.egork.numbers.Matrix; import net.egork.utils.io.InputReader; import net.egork.utils.io.OutputWriter; public class ThreeIsCrowd { static final long MOD = (long) (1e9 + 7); public void solve(int testNumber, InputReader in, OutputWriter out) { long count = in.readLong(); Matrix matrix = new Matrix(3, 3); matrix.data[0][0] = matrix.data[0][1] = matrix.data[0][2] = matrix.data[1][0] = matrix.data[2][1] = 1; Matrix.mod = MOD; matrix = matrix.power(count); long answer = ((IntegerUtils.power(2, count, MOD) - matrix.data[0][0] - matrix.data[1][0] - matrix.data[2][0]) % MOD + MOD) % MOD; out.printLine(answer); } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
f9acf915d12336776d6b9d65cd2096144002b449
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/api/model/settings/PushSettingsKt.java
d765d840179dc283b0763099912d1aaea61f9a81
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
1,465
java
package com.tinder.api.model.settings; import kotlin.Metadata; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0007\"\u000e\u0010\u0000\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0004\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0005\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0006\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0007\u001a\u00020\u0001X†T¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"KEY_FAST_MATCH_FREQUENCY", "", "KEY_PUSH_MATCH", "KEY_PUSH_MESSAGES", "KEY_PUSH_MESSAGE_LIKE", "KEY_PUSH_PLACES", "KEY_PUSH_SUPERLIKE", "KEY_TOP_PICKS_DAILY", "api_release"}, k = 2, mv = {1, 1, 10}) public final class PushSettingsKt { @NotNull public static final String KEY_FAST_MATCH_FREQUENCY = "fast_match_frequency"; @NotNull public static final String KEY_PUSH_MATCH = "match"; @NotNull public static final String KEY_PUSH_MESSAGES = "message"; @NotNull public static final String KEY_PUSH_MESSAGE_LIKE = "message_like"; @NotNull public static final String KEY_PUSH_PLACES = "places"; @NotNull public static final String KEY_PUSH_SUPERLIKE = "super_like"; @NotNull public static final String KEY_TOP_PICKS_DAILY = "top_picks_daily"; }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
dab1d1c11d1996e558710b7faccac07558465422
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MATH-31b-4-30-Single_Objective_GGA-WeightedSum/org/apache/commons/math3/special/Beta_ESTest_scaffolding.java
86193a397027aa0416f38b95b5c1793cf3faf0e1
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Jan 17 22:25:32 UTC 2020 */ package org.apache.commons.math3.special; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Beta_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d63f0dcf58bb72e70f80da15f44149a536e1c184
d6dbf44c6d02f95fef62f26edc7ac77d70a277f9
/src/main/java/com/prituladima/yaal/collections/iss/IndependentSetSystem.java
4aa17f4d3e1cc89731cd996f4d33a027c1e0045b
[]
no_license
a357/codeforces
e9e70d04eae565b2bf10bc3f113b29e2649e0c2b
cf17328bd70f69af8c95cc7843e40261784bcad9
refs/heads/master
2020-04-17T22:28:30.868457
2019-01-21T22:20:34
2019-01-21T22:20:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package com.prituladima.yaal.collections.iss; /** * */ public interface IndependentSetSystem { public boolean join(int first, int second); public int get(int index); public int getSetCount(); public void setListener(Listener listener); public static interface Listener { public void joined(int joinedRoot, int root); } }
[ "prituladima@gmail.com" ]
prituladima@gmail.com
4283575ef4c23e23fa8bdfcd60dbfc9cf1dc9638
63d319fbd88e49701d8dcc2919c8f3a6013e90d0
/Applications/CIM/plugins/es.tid.cim.diagram/src/es/tid/cim/diagram/edit/parts/SettingDataSettingsDefineCapabilitiesEditPart.java
1396d6044f36aa84c9374da6eaaca3d0cb43a603
[]
no_license
DevBoost/Reuseware
2e6b3626c0d434bb435fcf688e3a3c570714d980
4c2f0170df52f110c77ee8cffd2705af69b66506
refs/heads/master
2021-01-19T21:28:13.184309
2019-06-09T20:39:41
2019-06-09T20:48:34
5,324,741
1
1
null
null
null
null
UTF-8
Java
false
false
3,119
java
package es.tid.cim.diagram.edit.parts; import org.eclipse.draw2d.Connection; import org.eclipse.gef.EditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx; import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; import org.eclipse.gmf.runtime.notation.View; import es.tid.cim.diagram.edit.policies.SettingDataSettingsDefineCapabilitiesItemSemanticEditPolicy; /** * @generated */ public class SettingDataSettingsDefineCapabilitiesEditPart extends ConnectionNodeEditPart implements ITreeBranchEditPart { /** * @generated */ public static final int VISUAL_ID = 4034; /** * @generated */ public SettingDataSettingsDefineCapabilitiesEditPart(View view) { super(view); } /** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy( EditPolicyRoles.SEMANTIC_ROLE, new SettingDataSettingsDefineCapabilitiesItemSemanticEditPolicy()); } /** * @generated */ protected boolean addFixedChild(EditPart childEditPart) { if (childEditPart instanceof WrappingLabel128EditPart) { ((WrappingLabel128EditPart) childEditPart) .setLabel(getPrimaryShape() .getFigureLinkSettingsDefineCapabilitiesNameFigure()); return true; } return false; } /** * @generated */ protected void addChildVisual(EditPart childEditPart, int index) { if (addFixedChild(childEditPart)) { return; } super.addChildVisual(childEditPart, -1); } /** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected Connection createConnectionFigure() { return new LinkSettingsDefineCapabilitiesNameFigure(); } /** * @generated */ public LinkSettingsDefineCapabilitiesNameFigure getPrimaryShape() { return (LinkSettingsDefineCapabilitiesNameFigure) getFigure(); } /** * @generated */ public class LinkSettingsDefineCapabilitiesNameFigure extends PolylineConnectionEx { /** * @generated */ private WrappingLabel fFigureLinkSettingsDefineCapabilitiesNameFigure; /** * @generated */ public LinkSettingsDefineCapabilitiesNameFigure() { createContents(); } /** * @generated */ private void createContents() { fFigureLinkSettingsDefineCapabilitiesNameFigure = new WrappingLabel(); fFigureLinkSettingsDefineCapabilitiesNameFigure .setText("< SettingsDefineCapabilities >"); this.add(fFigureLinkSettingsDefineCapabilitiesNameFigure); } /** * @generated */ public WrappingLabel getFigureLinkSettingsDefineCapabilitiesNameFigure() { return fFigureLinkSettingsDefineCapabilitiesNameFigure; } } }
[ "jendrik.johannes@devboost.de" ]
jendrik.johannes@devboost.de
237b584f82fa97cd07d44adc03d627703f61af8d
e51c210ccf72a8ac1414791d8af552662c3fb034
/ptolemy/ptolemy.gui/src/main/java/ptolemy/vergil/actor/DocBuilderEffigy.java
765c2f122018a611c13bac4515bb79c430ecae06
[]
no_license
eclipselabs/passerelle
0187efa4fba411265ab58d60b5d83e74af09b203
e327dea8f4188e4bfe5ef4a76dd2476ad6f5664d
refs/heads/master
2021-01-18T09:26:07.614275
2017-06-28T10:05:12
2017-06-28T10:05:12
36,805,342
5
3
null
2015-08-04T18:43:19
2015-06-03T13:27:15
Java
UTF-8
Java
false
false
4,842
java
/* A representative of a DocBuilder Copyright (c) 2006-2007 The Regents of the University of California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. PT_COPYRIGHT_VERSION_2 COPYRIGHTENDKEY */ package ptolemy.vergil.actor; import java.net.URL; import ptolemy.actor.gui.Effigy; import ptolemy.actor.gui.EffigyFactory; import ptolemy.actor.gui.PtolemyEffigy; import ptolemy.kernel.CompositeEntity; import ptolemy.kernel.util.IllegalActionException; import ptolemy.kernel.util.NameDuplicationException; ////////////////////////////////////////////////////////////////////////// //// DocBuilderEffigy /** An effigy for a DocBuilder. @author Christopher Brooks @version $Id: DocBuilderEffigy.java,v 1.9 2007/12/06 21:56:28 cxh Exp $ @since Ptolemy II 5.2 @Pt.ProposedRating Green (cxh) @Pt.AcceptedRating Red (cxh) */ public class DocBuilderEffigy extends PtolemyEffigy { /** Create a new effigy in the given directory with the given name. * @param container The directory that contains this effigy. * @param name The name of this effigy. * @exception IllegalActionException If thrown by the superclass. * @exception NameDuplicationException If thrown by the superclass. */ public DocBuilderEffigy(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException { super(container, name); } /////////////////////////////////////////////////////////////////// //// inner classes //// /** A factory for creating new effigies. */ public static class Factory extends EffigyFactory { /** Create a factory with the given name and container. * @param container The container. * @param name The name. * @exception IllegalActionException If the container is incompatible * with this entity. * @exception NameDuplicationException If the name coincides with * an entity already in the container. */ public Factory(CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException { super(container, name); } /////////////////////////////////////////////////////////////// //// public methods //// /** Return false, indicating that this effigy factory is not * capable of creating an effigy without a URL being specified. * @return False. */ public boolean canCreateBlankEffigy() { return false; } /** Create a new effigy in the given container. * @param container The container for the effigy. * @param base The base for relative file references, or null if * there are no relative file references. This is ignored in this * class. * @param input The input URL, which is ignored. * @return A new instance of DocBuilderEffigy. * @exception Exception If the URL cannot be read. */ public Effigy createEffigy(CompositeEntity container, URL base, URL input) throws Exception { if (input != null) { String extension = getExtension(input); if (extension.equals("xml")) { // Check for DTD designation. if (checkForDTD(input, "<!DOCTYPE doc PUBLIC \"-//UC Berkeley//DTD DocML", null)) { // This is a doc file. DocBuilderEffigy effigy = new DocBuilderEffigy( container, container.uniqueName("effigy")); return effigy; } } } return null; } } }
[ "erwindl0@gmail.com" ]
erwindl0@gmail.com
1e8036a95059ae74ed64b0a08581eb039cc16178
1d2ceb9aea3f8674ac662600f1296c6eb2cc4bbc
/src/main/java/com/cdkj/coin/wallet/enums/ECurrency.java
0114fdcda1f0eae2488f8b68fcd6b300fc8b7700
[]
no_license
13110992819/cs-wellet
4eed68622480c7e7ea5974578edc2c03d90e4f40
abf8134e3813ef6880dbf52764048ce2e64cc337
refs/heads/master
2020-04-09T18:19:26.452780
2018-02-10T03:55:45
2018-02-10T03:55:45
124,237,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
/** * @Title ECurrency.java * @Package com.ibis.account.enums * @Description * @author miyb * @date 2015-3-15 下午4:41:06 * @version V1.0 */ package com.cdkj.coin.wallet.enums; import java.util.HashMap; import java.util.Map; import com.cdkj.coin.wallet.exception.BizException; /** * @author: xieyj * @since: 2016年12月24日 下午1:51:38 * @history: */ public enum ECurrency { CNY("CNY", "人民币"), USD("USD", "美元"), HKD("HKD", "港币"); public static Map<String, ECurrency> getCurrencyMap() { Map<String, ECurrency> map = new HashMap<String, ECurrency>(); for (ECurrency currency : ECurrency.values()) { map.put(currency.getCode(), currency); } return map; } public static ECurrency getCurrency(String code) { Map<String, ECurrency> map = getCurrencyMap(); ECurrency result = map.get(code); if (result == null) { throw new BizException("XN0000", code + "对应的currency不存在"); } return result; } ECurrency(String code, String value) { this.code = code; this.value = value; } private String code; private String value; public String getCode() { return code; } public String getValue() { return value; } }
[ "leo.zheng@hichengdai.com" ]
leo.zheng@hichengdai.com
ae21a84d6d01d2168c2dccda13269c43981e3b27
68997877e267f71388a878d37e3380e161f2f1bb
/app/src/main/java/com/sy/bottle/view/VoiceSendingView.java
d1d965a305bdddb26736fc2b19d80cb6f3ab9354
[]
no_license
jiangadmin/Bottle
1af8555efb6d54a314c500ec8e83fe795c20f796
582c7ab0eb216400980cd4aae830a3db131b66f6
refs/heads/master
2020-03-20T00:53:31.757289
2018-07-25T01:22:42
2018-07-25T01:22:42
137,059,653
1
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
package com.sy.bottle.view; import android.content.Context; import android.graphics.drawable.AnimationDrawable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; import android.widget.RelativeLayout; import com.sy.bottle.R; /** * 发送语音提示控件 */ public class VoiceSendingView extends RelativeLayout { private static final String TAG = "VoiceSendingView"; // private AnimationDrawable frameAnimation; public VoiceSendingView(Context context, AttributeSet attrs) { super(context, attrs); LayoutInflater.from(context).inflate(R.layout.voice_sending, this); // ImageView img = findViewById(R.id.microphone); // img.setBackgroundResource(R.drawable.animation_voice); // frameAnimation = (AnimationDrawable) img.getBackground(); } public void showRecording() { // frameAnimation.start(); } public void showCancel() { // frameAnimation.stop(); } public void release() { // frameAnimation.stop(); } }
[ "www.fangmu@qq.com" ]
www.fangmu@qq.com
979bf824981c084a1e3d0d9280caf6140547b46c
2ed0c54fb9c565239c7ed4db785fd0d7fd00c2d2
/src/basic/sort/Merge.java
bd579757b927f47ff01df1720d432ca00c1258cb
[]
no_license
jaeho214/Algorithm_study
d825d033b18094c083527096a549b240ccade850
449d9e1a3e74ada93855f0474fccac15a0f2e79a
refs/heads/master
2021-06-24T12:34:43.312884
2021-03-30T08:11:19
2021-03-30T08:11:19
217,222,426
1
1
null
null
null
null
UTF-8
Java
false
false
1,801
java
package basic.sort; import java.util.Arrays; /* * 합병 정렬 : 문제를 작은 2문제로 분리한 다음 결과를 모아서 해결하는 방식 * 어떤한 경우에도 O(nlogn)의 시간복잡도를 가진다. * 배열로 진행할 경우 별도의 임시배열이 필요하다. * 연결리스트로 진행할 경우 인덱스만 바꾸면 되므로 간편 */ public class Merge { int[] sorted; public static void main(String[] args) { Merge merge = new Merge(); int[] input = {8,7,6,5,4,3,2,1}; merge.init(input.length); merge.mergeSort(input, 0, input.length-1); } private void init(int length) { sorted = new int[length]; } private void mergeSort(int[] input, int low, int high) { int mid = 0; if(low < high){ mid = (low + high) / 2; mergeSort(input, low, mid); mergeSort(input, mid+1, high); merge(input, low, mid, high); } } private void merge(int[] input, int low, int mid, int high) { int i = low; int j = mid + 1; int k = low; while(i<=mid && j<=high){ if(input[i] <= input[j]){ sorted[k] = input[i]; i++; }else{ sorted[k] = input[j]; j++; } k++; } if(i > mid){ for(int idx=j;idx<=high;idx++, k++){ sorted[k] = input[idx]; } }else{ for(int idx=i;idx<=mid;idx++, k++){ sorted[k] = input[idx]; } } for(int idx=low; idx<=high; idx++){ input[idx] = sorted[idx]; } System.out.println("병합 정렬 후 : " + Arrays.toString(input)); } }
[ "jaeho214@naver.com" ]
jaeho214@naver.com
299eb4bacb300054a89a449cc025d3fe42b3c91c
8eac9fe5030455cb9d1692d2136fa79046fa3350
/src/main/java/com/i4one/base/model/category/SimpleCategoryManager.java
073fdcf0f93a7a419a308ec8cceb48646bc84b93
[ "MIT" ]
permissive
badiozam/concord
1987190d9aac2fb89b990e561acab6a59275bd7b
343842aa69f25ff9917e51936eabe72999b81407
refs/heads/master
2022-12-24T06:29:32.881068
2020-07-01T19:26:05
2020-07-01T19:26:05
149,226,043
0
0
MIT
2022-12-16T09:44:00
2018-09-18T03:53:29
Java
UTF-8
Java
false
false
4,005
java
/* * MIT License * * Copyright (c) 2018 i4one Interactive, LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.i4one.base.model.category; import com.i4one.base.dao.Dao; import com.i4one.base.model.ErrorMessage; import com.i4one.base.model.Errors; import com.i4one.base.model.ReturnType; import com.i4one.base.model.client.SingleClient; import com.i4one.base.model.manager.BaseSimpleManager; import com.i4one.base.model.manager.pagination.PaginationFilter; import java.util.Set; import org.springframework.transaction.annotation.Transactional; /** * @author Hamid Badiozamani * @param <U> * @param <T> */ public abstract class SimpleCategoryManager<U extends CategoryRecord, T extends Category<U>> extends BaseSimpleManager<U, T> implements CategoryManager<U,T> { @Override public T getCategory(String title, PaginationFilter pagination) { U record = getDao().getByTitle(title, pagination); T retVal = emptyInstance(); if ( record != null ) { retVal.setOwnedDelegate(record); } return retVal; } @Override public Set<T> getAllCategories(PaginationFilter pagination) { return super.convertDelegates(getDao().getAllCategories(pagination)); } @Override public boolean isEmpty(T item) { return getDao().isEmpty(item.getDelegate()); } @Transactional(readOnly = false) @Override public ReturnType<T> update(T item) { // We call the super-class' update to make sure the validators get called // and to load the previous object from the database in order to have the // latest copy // ReturnType<T> retVal = super.update(item); T preItem = retVal.getPre(); // We check to see if the previous client is a member of the new client being set. // If the new client is a parent or superset of the existing client, then the update can // proceed. If the new client is either a child or a subset of the existing client // then no guarantee can be made that the items in the category will also all be within // the category's client range and the update must be aborted // // NOTE: We need to pull these out into their own variable in order to work around the following // JDK 1.8.0_20 bug: https://bugs.openjdk.java.net/browse/JDK-8056984 // SingleClient preItemClient = preItem.getClient(); SingleClient itemClient = item.getClient(); if ( !preItemClient.isMemberOf(itemClient) && !isEmpty(item) ) { throw new Errors(getInterfaceName() + ".update", new ErrorMessage("msg." + getInterfaceName() + ".update.notempty", "Category $item.title ($item.ser) is not empty and reducing its client level invalidates its member objects", new Object[] { "item", item })); } else { return retVal; } } @Override public CategoryRecordDao<U> getDao() { Dao<U> baseDao = super.getDao(); if ( baseDao instanceof CategoryRecordDao ) { CategoryRecordDao<U> categoryRecordDao = (CategoryRecordDao<U>) baseDao; return categoryRecordDao; } else { return null; } } }
[ "badiozam@yahoo.com" ]
badiozam@yahoo.com
a2a4b642c60cfc36f643d439144343f01fe359f0
d4896a7eb2ee39cca5734585a28ca79bd6cc78da
/sources/com/yandex/metrica/impl/ob/dn.java
87ef56c7b7c0509d82b39a173b0dac6bfe0be351
[]
no_license
zadweb/zadedu.apk
a235ad005829e6e34ac525cbb3aeca3164cf88be
8f89db0590333929897217631b162e39cb2fe51d
refs/heads/master
2023-08-13T03:03:37.015952
2021-10-12T21:22:59
2021-10-12T21:22:59
416,498,604
0
0
null
null
null
null
UTF-8
Java
false
false
376
java
package com.yandex.metrica.impl.ob; public class dn extends Cdo { private dm b; public dn(int i) { super(i); this.b = new dm(i); } @Override // com.yandex.metrica.impl.ob.Cdo public void a() { try { Thread.sleep((long) this.b.a()); } catch (InterruptedException unused) { } super.a(); } }
[ "midoekid@gmail.com" ]
midoekid@gmail.com
6b0daf128dc61dd54fb6487456fc4def0fa41625
2d60e1f2cc053518466f8aac1d4636068ac2e605
/youermenzhen-portal/src/main/java/com/youershaicha/common/domain/LogDO.java
f404a5ede2e0d776db60e489d104d9a4beb385e3
[]
no_license
tangminnan/kidmenzhen
660b458936e340d6e4cebaa801914fb71e62829a
5e84e91f04d480e9986b24efd5cfda87e183065a
refs/heads/master
2023-02-12T23:24:01.044910
2021-01-15T10:46:12
2021-01-15T10:46:12
328,048,204
0
0
null
null
null
null
UTF-8
Java
false
false
1,967
java
package com.youershaicha.common.domain; import com.fasterxml.jackson.annotation.JsonFormat; import java.util.Date; public class LogDO { private Long id; private Long userId; private String username; private String operation; private Integer time; private String method; private String params; private String ip; @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") private Date gmtCreate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username == null ? null : username.trim(); } public String getOperation() { return operation; } public void setOperation(String operation) { this.operation = operation == null ? null : operation.trim(); } public Integer getTime() { return time; } public void setTime(Integer time) { this.time = time; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method == null ? null : method.trim(); } public String getParams() { return params; } public void setParams(String params) { this.params = params == null ? null : params.trim(); } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip == null ? null : ip.trim(); } public Date getGmtCreate() { return gmtCreate; } public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } @Override public String toString() { return "LogDO{" + "id=" + id + ", userId=" + userId + ", username='" + username + '\'' + ", operation='" + operation + '\'' + ", time=" + time + ", method='" + method + '\'' + ", params='" + params + '\'' + ", ip='" + ip + '\'' + ", gmtCreate=" + gmtCreate + '}'; } }
[ "349829327@qq.com" ]
349829327@qq.com
e7f015a4f4519e321ee146ce711c4d00d8842b8d
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/64/org/apache/commons/math/MaxIterationsExceededException_MaxIterationsExceededException_44.java
ad434808e029435289069c3601093c31e8b0c60d
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
490
java
org apach common math error thrown numer comput exce allow number iter version revis date max iter exceed except maxiterationsexceededexcept converg except convergenceexcept construct except detail messag param max iter maxiter maxim number iter allow max iter exceed except maxiterationsexceededexcept max iter maxiter local format localizedformat max iter exceed max iter maxiter max iter maxiter max iter maxiter
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
54d0a8983cce4d3c82c3ed097fe6f272ddcf603e
4233bb5405f9fc02b39256babe5df78901ec14b2
/src/fit/hrkj/generic/ArrayError.java
e198eb52db05d85c623b4dbfd790bdd1a04969ee
[]
no_license
yuandonghua/JavaBasedDemo
e7413b778317e0894549398e7a79bfc01ed02a28
b1df4de7d9171e94e369074c6a373c7aeaa6824b
refs/heads/master
2022-10-18T10:46:29.137990
2020-01-01T07:10:48
2020-01-01T07:10:48
193,418,921
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package fit.hrkj.generic; /** * <br> * 2019年8月5日 上午11:27:31 * * @author 华软科技 * @version 1.0 */ public class ArrayError { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub // 定义一个Integer数组 Integer[] i = new Integer[5]; // 可以把一个Integer[]数组赋给Number[]变量 Number[] n = i; // 下面代码编译正常,但运行时会引发ArrayStoreException异常 // 因为0.8并不是Integer n[0] = 0.8;// ① } }
[ "1348474384@qq.com" ]
1348474384@qq.com
1880be74dfa13592e6b5348b8f17f3fc24a0e37b
b1ef95c7ddab1649e13679437f320ba881903c1a
/ForArray.java
9d5b5e1ae66e4f828937e5f1068405d3008c7b3c
[]
no_license
Zhangxumi/45
0c4e55447ded36bc92526e861283e45e636ba3f7
6c6883bbba1f61a8e68b735dd3c30796d742e423
refs/heads/master
2020-07-30T06:14:08.778089
2019-06-14T13:19:09
2019-06-14T13:19:09
210,114,733
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
public class ForArray{ public static void main(String[]args){ int[]array = new int[(int)(Math.random()*10)+1]; for(int i = 0;i < array.length;++i) array[i] = (int)(Math.random()*100); for(int value:array) System.out.println(value); } }
[ "you@example.com" ]
you@example.com
d499fc9ea042b3956fd4aba22e311138bf2bdfe8
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/com/google/android/gms/ads/mediation/customevent/CustomEventExtras.java
d4e6fb320374f6cbf3f791efd859af798d331445
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
512
java
package com.google.android.gms.ads.mediation.customevent; import com.google.ads.mediation.NetworkExtras; import java.util.HashMap; @Deprecated public final class CustomEventExtras implements NetworkExtras { private final HashMap<String, Object> zzaaW; public CustomEventExtras() { this.zzaaW = new HashMap(); } public Object getExtra(String str) { return this.zzaaW.get(str); } public void setExtra(String str, Object obj) { this.zzaaW.put(str, obj); } }
[ "swasen@cisco.com" ]
swasen@cisco.com
9f92dccb0140f55648ae40ecc5d7ec0047d8d945
56adea945b27ccaf880decadb7f7cb86de450a8d
/core/ep-core/src/test/java/com/elasticpath/service/changeset/impl/ProductSkuMetadataResolverTest.java
d7d9d401665a3a306a4382c95fc3343a4f87af00
[]
no_license
ryanlfoster/ep-commerce-engine-68
89b56878806ca784eca453d58fb91836782a0987
7364bce45d25892e06df2e1c51da84dbdcebce5d
refs/heads/master
2020-04-16T04:27:40.577543
2013-12-10T19:31:52
2013-12-10T20:01:08
40,164,760
1
1
null
2015-08-04T05:15:25
2015-08-04T05:15:25
null
UTF-8
Java
false
false
4,658
java
/** * Copyright (c) Elastic Path Software Inc., 2008 */ package com.elasticpath.service.changeset.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Locale; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.jmock.Expectations; import org.jmock.integration.junit4.JUnitRuleMockery; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import com.elasticpath.domain.catalog.Catalog; import com.elasticpath.domain.catalog.Product; import com.elasticpath.domain.catalog.ProductSku; import com.elasticpath.domain.objectgroup.BusinessObjectDescriptor; import com.elasticpath.domain.objectgroup.impl.BusinessObjectDescriptorImpl; import com.elasticpath.service.catalog.ProductSkuService; /** * Test that ProductSkuMetadataResolver resolves metadata as expected. */ public class ProductSkuMetadataResolverTest { private ProductSkuMetadataResolver resolver; private ProductSkuService skuService; @Rule public final JUnitRuleMockery context = new JUnitRuleMockery(); /** * Set up required for each test. */ @Before public void setUp() { resolver = new ProductSkuMetadataResolver(); skuService = context.mock(ProductSkuService.class); resolver.setSkuService(skuService); } /** * Test validation behaves as required. */ @Test public void testIsValidResolverForObjectType() { assertTrue("Sku should be valid", resolver.isValidResolverForObjectType("Product SKU")); assertFalse("Null should not be valid", resolver.isValidResolverForObjectType(null)); assertFalse("Empty string should not be valid", resolver.isValidResolverForObjectType(StringUtils.EMPTY)); assertFalse("A different object string should not be valid", resolver.isValidResolverForObjectType("Product")); assertFalse("Arbitrary string should not be valid", resolver.isValidResolverForObjectType("anything")); } /** * Test name metadata for a sku is retrieved by the sku service. */ @Test public void testResolveMetaDataSku() { final String skuCode = "SKUCODE"; final BusinessObjectDescriptor objectDescriptor = new BusinessObjectDescriptorImpl(); objectDescriptor.setObjectIdentifier(skuCode); objectDescriptor.setObjectType("Product SKU"); final String productName = "Amazing Product"; final String skuConfigName = "red, large"; final String expectedName = productName + " - " + skuConfigName; final ProductSku sku = context.mock(ProductSku.class); final Product product = context.mock(Product.class); final Catalog catalog = context.mock(Catalog.class); final Locale defaultLocale = Locale.GERMAN; context.checking(new Expectations() { { oneOf(skuService).findBySkuCode(skuCode); will(returnValue(sku)); oneOf(catalog).getDefaultLocale(); will(returnValue(defaultLocale)); oneOf(sku).getProduct(); will(returnValue(product)); oneOf(sku).getDisplayName(defaultLocale); will(returnValue(skuConfigName)); oneOf(product).getMasterCatalog(); will(returnValue(catalog)); oneOf(product).getDisplayName(defaultLocale); will(returnValue(productName)); oneOf(product).hasMultipleSkus(); will(returnValue(true)); } }); Map<String, String> metadata = resolver.resolveMetaData(objectDescriptor); assertEquals("There should be metadata returned", 1, metadata.size()); assertEquals("The sku name should be as expected", expectedName, metadata.get("objectName")); } /** * Test no metadata returned if the query returns no results (e.g. sku does not exist). */ @Test public void testResolveMetaDataNonExistentSku() { final String skuCode = "NOSUCHCODE"; final BusinessObjectDescriptor objectDescriptor = new BusinessObjectDescriptorImpl(); objectDescriptor.setObjectIdentifier(skuCode); objectDescriptor.setObjectType("Product SKU"); context.checking(new Expectations() { { oneOf(skuService).findBySkuCode(skuCode); will(returnValue(null)); } }); Map<String, String> metadata = resolver.resolveMetaData(objectDescriptor); assertEquals("There should be no metadata returned", 0, metadata.size()); } /** * Test that no metadata is returned when the object is not a valid type. */ @Test public void testResolveMetaDataForNonSkuObject() { final BusinessObjectDescriptor objectDescriptor = new BusinessObjectDescriptorImpl(); objectDescriptor.setObjectIdentifier("WHATEVER"); objectDescriptor.setObjectType("Product"); Map<String, String> metadata = resolver.resolveMetaData(objectDescriptor); assertEquals("There should be no metadata returned", 0, metadata.size()); } }
[ "chris.gomes@pearson.com" ]
chris.gomes@pearson.com
387f55a2fb6a9b018216ab72deac1291254b2340
e46d8e8fd1848a93472d9b8a50335cfc422a87c6
/src/main/java/com/netsuite/webservices/lists/supplychain_2018_1/ManufacturingCostTemplateSearch.java
226c9a007b4d3b50f8100489b178ee48b79adcb2
[]
no_license
djXplosivo/suitetalk-webservices
6d0f1737c52c566fde07eb6e008603b3c271d8d1
bff927f0acb45e772a5944272d0f7d55b87caf2a
refs/heads/master
2020-03-28T02:56:52.772003
2018-09-06T02:52:57
2018-09-06T02:52:57
147,608,548
0
0
null
null
null
null
UTF-8
Java
false
false
4,623
java
package com.netsuite.webservices.lists.supplychain_2018_1; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.netsuite.webservices.platform.common_2018_1.CustomSearchJoin; import com.netsuite.webservices.platform.common_2018_1.EmployeeSearchBasic; import com.netsuite.webservices.platform.common_2018_1.ItemSearchBasic; import com.netsuite.webservices.platform.common_2018_1.ManufacturingCostTemplateSearchBasic; import com.netsuite.webservices.platform.core_2018_1.SearchRecord; /** * <p>Java class for ManufacturingCostTemplateSearch complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ManufacturingCostTemplateSearch"> * &lt;complexContent> * &lt;extension base="{urn:core_2018_1.platform.webservices.netsuite.com}SearchRecord"> * &lt;sequence> * &lt;element name="basic" type="{urn:common_2018_1.platform.webservices.netsuite.com}ManufacturingCostTemplateSearchBasic" minOccurs="0"/> * &lt;element name="itemJoin" type="{urn:common_2018_1.platform.webservices.netsuite.com}ItemSearchBasic" minOccurs="0"/> * &lt;element name="userJoin" type="{urn:common_2018_1.platform.webservices.netsuite.com}EmployeeSearchBasic" minOccurs="0"/> * &lt;element name="customSearchJoin" type="{urn:common_2018_1.platform.webservices.netsuite.com}CustomSearchJoin" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ManufacturingCostTemplateSearch", propOrder = { "basic", "itemJoin", "userJoin", "customSearchJoin" }) public class ManufacturingCostTemplateSearch extends SearchRecord { protected ManufacturingCostTemplateSearchBasic basic; protected ItemSearchBasic itemJoin; protected EmployeeSearchBasic userJoin; protected List<CustomSearchJoin> customSearchJoin; /** * Gets the value of the basic property. * * @return * possible object is * {@link ManufacturingCostTemplateSearchBasic } * */ public ManufacturingCostTemplateSearchBasic getBasic() { return basic; } /** * Sets the value of the basic property. * * @param value * allowed object is * {@link ManufacturingCostTemplateSearchBasic } * */ public void setBasic(ManufacturingCostTemplateSearchBasic value) { this.basic = value; } /** * Gets the value of the itemJoin property. * * @return * possible object is * {@link ItemSearchBasic } * */ public ItemSearchBasic getItemJoin() { return itemJoin; } /** * Sets the value of the itemJoin property. * * @param value * allowed object is * {@link ItemSearchBasic } * */ public void setItemJoin(ItemSearchBasic value) { this.itemJoin = value; } /** * Gets the value of the userJoin property. * * @return * possible object is * {@link EmployeeSearchBasic } * */ public EmployeeSearchBasic getUserJoin() { return userJoin; } /** * Sets the value of the userJoin property. * * @param value * allowed object is * {@link EmployeeSearchBasic } * */ public void setUserJoin(EmployeeSearchBasic value) { this.userJoin = value; } /** * Gets the value of the customSearchJoin property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the customSearchJoin property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCustomSearchJoin().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CustomSearchJoin } * * */ public List<CustomSearchJoin> getCustomSearchJoin() { if (customSearchJoin == null) { customSearchJoin = new ArrayList<CustomSearchJoin>(); } return this.customSearchJoin; } }
[ "ccolon@git.eandjmedia.com" ]
ccolon@git.eandjmedia.com
1ffdee89389d88c309b6a6977098c680da00f784
d718694c904a96b8d88e364ad535e34c58164889
/FlightsService/src/main/java/com/sep6/flights/model/flight/MeanAirtime.java
769e6d3653273f644dd55ca20f4326628b29cdd0
[]
no_license
Michaela97/SEP6
a455158904bdeb707914bfd6972ca9089f5d1212
08eb862bf79cd0f6b189190b27fd617863b6cb8d
refs/heads/master
2022-09-29T18:27:42.529936
2020-06-03T16:15:05
2020-06-03T16:15:05
262,758,180
0
0
null
2020-05-31T09:04:09
2020-05-10T10:03:24
HTML
UTF-8
Java
false
false
619
java
package com.sep6.flights.model.flight; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.annotations.NamedQuery; import javax.persistence.Entity; import javax.persistence.Id; @Entity @AllArgsConstructor @NoArgsConstructor @Data @NamedQuery(name = "MeanAirtime.getMeanAirtimeByOrigin", query = "select new com.sep6.flights.model.flight.MeanAirtime(f.origin, avg(f.air_time))" + " from Flight as f" + " group by f.origin") public class MeanAirtime { @Id private String origin; private double meanAirtime; }
[ "11michi11@gmail.com" ]
11michi11@gmail.com
0e6f1692f42352e8d06c2a606768300f643ba47f
1418390864a051a3bd9f164b2eb27e304c3fa48f
/app/src/main/java/com/gxc/utils/RecycleBin.java
d88e37b35bbb43ffbb4dca1da135b2fcbcdac419
[]
no_license
JusofunAppMobile/GXCAndroid
15f78f422c5ddf26caa926df06bafc521220d5d9
9ee76a86f23eeba2f32866ef503ab1b47c688b91
refs/heads/master
2020-04-15T16:00:00.112812
2019-03-21T06:46:17
2019-03-21T06:46:17
164,814,771
0
0
null
null
null
null
UTF-8
Java
false
false
5,046
java
package com.gxc.utils; import android.os.Build; import android.util.SparseArray; import android.view.View; /** * The RecycleBin facilitates reuse of views across layouts. The RecycleBin has two levels of * storage: ActiveViews and ScrapViews. ActiveViews are those views which were onscreen at the * start of a layout. By construction, they are displaying current information. At the end of * layout, all views in ActiveViews are demoted to ScrapViews. ScrapViews are old views that * could potentially be used by the adapter to avoid allocating views unnecessarily. * <p> * This class was taken from Android's implementation of {@link android.widget.AbsListView} which * is copyrighted 2006 The Android Open Source Project. */ public class RecycleBin { /** * Views that were on screen at the start of layout. This array is populated at the start of * layout, and at the end of layout all view in activeViews are moved to scrapViews. * Views in activeViews represent a contiguous range of Views, with position of the first * view store in mFirstActivePosition. */ private View[] activeViews = new View[0]; private int[] activeViewTypes = new int[0]; /** Unsorted views that can be used by the adapter as a convert view. */ private SparseArray<View>[] scrapViews; private int viewTypeCount; private SparseArray<View> currentScrapViews; public void setViewTypeCount(int viewTypeCount) { if (viewTypeCount < 1) { throw new IllegalArgumentException("Can't have a viewTypeCount < 1"); } //noinspection unchecked SparseArray<View>[] scrapViews = new SparseArray[viewTypeCount]; for (int i = 0; i < viewTypeCount; i++) { scrapViews[i] = new SparseArray<View>(); } this.viewTypeCount = viewTypeCount; currentScrapViews = scrapViews[0]; this.scrapViews = scrapViews; } protected boolean shouldRecycleViewType(int viewType) { return viewType >= 0; } /** @return A view from the ScrapViews collection. These are unordered. */ public View getScrapView(int position, int viewType) { if (viewTypeCount == 1) { return retrieveFromScrap(currentScrapViews, position); } else if (viewType >= 0 && viewType < scrapViews.length) { return retrieveFromScrap(scrapViews[viewType], position); } return null; } /** * Put a view into the ScrapViews list. These views are unordered. * * @param scrap The view to add */ public void addScrapView(View scrap, int position, int viewType) { if (viewTypeCount == 1) { currentScrapViews.put(position, scrap); } else { scrapViews[viewType].put(position, scrap); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { scrap.setAccessibilityDelegate(null); } } /** Move all views remaining in activeViews to scrapViews. */ public void scrapActiveViews() { final View[] activeViews = this.activeViews; final int[] activeViewTypes = this.activeViewTypes; final boolean multipleScraps = viewTypeCount > 1; SparseArray<View> scrapViews = currentScrapViews; final int count = activeViews.length; for (int i = count - 1; i >= 0; i--) { final View victim = activeViews[i]; if (victim != null) { int whichScrap = activeViewTypes[i]; activeViews[i] = null; activeViewTypes[i] = -1; if (!shouldRecycleViewType(whichScrap)) { continue; } if (multipleScraps) { scrapViews = this.scrapViews[whichScrap]; } scrapViews.put(i, victim); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { victim.setAccessibilityDelegate(null); } } } pruneScrapViews(); } /** * Makes sure that the size of scrapViews does not exceed the size of activeViews. * (This can happen if an adapter does not recycle its views). */ private void pruneScrapViews() { final int maxViews = activeViews.length; final int viewTypeCount = this.viewTypeCount; final SparseArray<View>[] scrapViews = this.scrapViews; for (int i = 0; i < viewTypeCount; ++i) { final SparseArray<View> scrapPile = scrapViews[i]; int size = scrapPile.size(); final int extras = size - maxViews; size--; for (int j = 0; j < extras; j++) { scrapPile.remove(scrapPile.keyAt(size--)); } } } static View retrieveFromScrap(SparseArray<View> scrapViews, int position) { int size = scrapViews.size(); if (size > 0) { // See if we still have a view for this position. for (int i = 0; i < size; i++) { int fromPosition = scrapViews.keyAt(i); View view = scrapViews.get(fromPosition); if (fromPosition == position) { scrapViews.remove(fromPosition); return view; } } int index = size - 1; View r = scrapViews.valueAt(index); scrapViews.remove(scrapViews.keyAt(index)); return r; } else { return null; } } }
[ "515376293@qq.com" ]
515376293@qq.com
a1b951d9792a00c60571b1cd23274aebfc14a81e
bad08ce4b707f8d479a6f9d6562f90d397042df7
/Spring-cloud/zuul/zuul-请求过滤.java
75941eb33422fcc2283097ac35926f9f198aa794
[]
no_license
lengyue1024/notes
93bf4ec614cbde69341bc7e4decad169a608ff39
549358063da05057654811a352ae408e48498f25
refs/heads/master
2020-04-29T07:14:45.482919
2019-03-16T07:51:26
2019-03-16T07:51:26
175,945,339
2
0
null
2019-03-16T08:19:53
2019-03-16T08:19:52
null
GB18030
Java
false
false
1,129
java
------------------------ zuul | ------------------------ # 请求过滤,实现接口: com.netflix.zuul.ZuulFilter @Bean //注册ioc即生效 public class DemoFilter extends ZuulFilter{ @Override public boolean shouldFilter(); * 判断当前过滤器是否被执行 @Override public Object run(); @Override public String filterType(); * 定义过滤器的类型,它决定了过滤器在请求的哪个生命周期中执行,枚举字符串 pre * 在请求处理之前执行 @Override public int filterOrder(); * 当存在多个过滤器的时候,该值定义了过滤器的执行顺序 } # 校验小Demo @Override public Object run() { RequestContext requestContext = RequestContext.getCurrentContext(); HttpServletRequest httpServletRequest = requestContext.getRequest(); if(httpServletRequest.getHeader("auth") == null) { //不进行路由 requestContext.setSendZuulResponse(false); //设置响应状态码为401 requestContext.setResponseStatusCode(HttpServletResponse.SC_UNAUTHORIZED); return null; } return null; }
[ "747692844@qq.com" ]
747692844@qq.com
f4846f50bfd7c30df8786f4826de416f8d55237a
d5e5129850e4332a8d4ccdcecef81c84220538d9
/Courses/TestingXP_WMD_Test/src/com/wmd/server/service/TestCopyProblemServiceImpl.java
06043c6ef90d144cffeecf798aed8e8d87f944d2
[]
no_license
ClickerMonkey/ship
e52da76735d6bf388668517c033e58846c6fe017
044430be32d4ec385e01deb17de919eda0389d5e
refs/heads/master
2020-03-18T00:43:52.330132
2018-05-22T13:45:14
2018-05-22T13:45:14
134,109,816
0
0
null
null
null
null
UTF-8
Java
false
false
1,565
java
package com.wmd.server.service; import static org.junit.Assert.*; import java.sql.SQLException; import org.junit.Ignore; import org.junit.Test; import com.wmd.client.msg.Level; import com.wmd.client.msg.ProblemMsg; import com.wmd.server.db.DatabaseTest; /** * * @author Sam Storino, Scotty Rhinehart, Phil Diffenderfer * Tests the CopyProblemServiceImpl to make sure that an assignment can be copied * from one level to another. * */ public class TestCopyProblemServiceImpl extends DatabaseTest { /** * Creates constant variables for the test problem message */ private static final int ASSIGNMENT = 1; private static final int PROBLEM_NUMBER = 1; private static final Level PROBLEM_LEVEL_FROM = Level.Medium; private static final Level PROBLEM_LEVEL_TO = Level.Easy; /** * Actual test that connects to the test database and copies * the defined problem message from one level to another. Returns * true if the copyProblem method is a success, otherwise it * returns false meaning there was a problem copying it from one * difficulty level to the other, or the problem doesn't exist. * * @throws SQLException */ @Test @Ignore public void testImpl() throws SQLException { //Creates a CopyProblemServiceImpl object to copy the problem CopyProblemServiceImpl cpsi = new CopyProblemServiceImpl(); // Build the problem message ProblemMsg msg = new ProblemMsg(ASSIGNMENT, PROBLEM_LEVEL_FROM, PROBLEM_NUMBER); // Make sure the problem is copied assertTrue( cpsi.copyProblem(msg, PROBLEM_LEVEL_TO) ); } }
[ "pdiffenderfer@gmail.com" ]
pdiffenderfer@gmail.com
5618cb68853d74f20a1eb4c0629062b421a1a44d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_07e91a9e942956a4db1a991da65b575c9f6e0ce1/MatkakorttiApi/12_07e91a9e942956a4db1a991da65b575c9f6e0ce1_MatkakorttiApi_s.java
2e52a3fc82a08a05444635caa70f2134960cc904
[]
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
4,654
java
package fi.iki.dezgeg.matkakorttiwidget.matkakortti; import com.gistlabs.mechanize.MechanizeAgent; import com.gistlabs.mechanize.document.Document; import com.gistlabs.mechanize.document.html.HtmlDocument; import com.gistlabs.mechanize.document.html.HtmlElement; import com.gistlabs.mechanize.document.html.form.Form; import com.gistlabs.mechanize.document.html.form.SubmitButton; import org.apache.http.impl.client.AbstractHttpClient; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import static com.gistlabs.mechanize.document.html.query.HtmlQueryBuilder.byId; import static com.gistlabs.mechanize.document.html.query.HtmlQueryBuilder.byTag; public class MatkakorttiApi { private String username; private String password; public static final Pattern CARDS_JSON_PATTERN = Pattern.compile(".*?parseJSON\\('(.*)'\\).*", Pattern.DOTALL); public static final Pattern DATE_PATTERN = Pattern.compile("^/Date\\(([0-9]+)\\)/$"); public static final Pattern SESSION_EXISTS_PATTERN = Pattern.compile(".*on toinen avoin istunto.*"); public MatkakorttiApi(String username, String password) { this.username = username; this.password = password; } public List<Card> getCards() throws Exception { MechanizeAgent agent; try { agent = login(); } catch (MatkakorttiException me) { if (SESSION_EXISTS_PATTERN.matcher(me.getMessage()).matches()) // Try again once agent = login(); else throw me; } // TODO: Follow redirects HtmlDocument response = agent.get("https://omamatkakortti.hsl.fi/Basic/Cards.aspx"); List<HtmlElement> scripts = response.htmlElements().getAll(byTag("script")); List<Card> cards = new ArrayList<Card>(); for (HtmlElement script : scripts) { Matcher matcher = CARDS_JSON_PATTERN.matcher(script.getInnerHtml()); if (matcher.matches()) { JSONArray cardsJson = new JSONArray(matcher.group(1)); for (int i = 0; i < cardsJson.length(); i++) { cards.add(createCardFromJSON(cardsJson.getJSONObject(i))); } return cards; } } throw new MatkakorttiException("No voi vittu"); } private MechanizeAgent login() throws Exception { AbstractHttpClient httpClient = NonverifyingSSLSocketFactory.createNonverifyingHttpClient(); MechanizeAgent agent = new MechanizeAgent(httpClient); Document page = agent.get("https://omamatkakortti.hsl.fi/Login.aspx"); Form loginForm = page.forms().get(byId("aspnetForm")); String prefix = "Etuile$MainContent$LoginControl$LoginForm$"; loginForm.get(prefix + "UserName").set(username); loginForm.get(prefix + "Password").set(password); HtmlDocument loginResponse = loginForm.submit((SubmitButton) loginForm.get(prefix + "LoginButton")); HtmlElement validationSummary = loginResponse.htmlElements().get(byId("Etuile_mainValidationSummary")); if (validationSummary != null) { List<HtmlElement> errorElements = validationSummary.get(byTag("ul")).getAll(byTag("li")); String errors = ""; // - 1 since the service will always complain about our browser. for (int i = 0; i < errorElements.size() - 1; i++) errors += errorElements.get(i).getText() + "\n"; throw new MatkakorttiException(errors); } return agent; } private Card createCardFromJSON(JSONObject card) throws JSONException { double moneyAsDouble = card.getDouble("RemainingMoney"); // Round to BigDecimal cents safely BigDecimal money = new BigDecimal((int)Math.round(100 * moneyAsDouble)).divide(new BigDecimal(100)); String expiryDateStr = card.getJSONObject("PeriodProductState").getString("ExpiringDate"); Date expiryDate = null; if (!expiryDateStr.equals("null")) { Matcher expiryDateMatch = DATE_PATTERN.matcher(expiryDateStr); expiryDateMatch.matches(); // Must do this. expiryDate = new Date(Long.parseLong(expiryDateMatch.group(1))); } return new Card(card.getString("name"), card.getString("id"), money, expiryDate); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1a8c37f1627f20fa7c5b371566b897a75ca31d29
344b3b8790c30ddfc475873700f7d5559b73fe32
/currency-conversion-service/src/main/java/com/akash/maharana/springBoot/microServices/currencyconversionservice/CurrencyConversionBean.java
a197e4b7959b29017a3e3bbb6260629297ba3cbc
[]
no_license
AkashMaharana/Microservices
04f040b8b06861c1cc739c177eced36e269897c7
2a843a8966a36423f0767206fd1a3c3242157b01
refs/heads/master
2020-03-17T05:02:19.987910
2018-05-14T04:10:33
2018-05-14T04:10:33
133,300,041
0
0
null
null
null
null
UTF-8
Java
false
false
1,797
java
package com.akash.maharana.springBoot.microServices.currencyconversionservice; import java.math.BigDecimal; import java.math.BigInteger; public class CurrencyConversionBean { private Long id; private String from; private String to; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFrom() { return from; } public void setFrom(String from) { this.from = from; } public CurrencyConversionBean() { } public String getTo() { return to; } public void setTo(String to) { this.to = to; } public BigDecimal getConversionMultiplier() { return conversionMultiplier; } public void setConversionMultiplier(BigDecimal conversionMultiplier) { this.conversionMultiplier = conversionMultiplier; } public BigDecimal getQuantity() { return quantity; } public void setQuantity(BigDecimal quantity) { this.quantity = quantity; } public BigDecimal getCalculatedAmount() { return calculatedAmount; } public void setCalculatedAmount(BigDecimal calculatedAmount) { this.calculatedAmount = calculatedAmount; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } public CurrencyConversionBean(Long id, String from, String to, BigDecimal conversionMultiplier, BigDecimal quantity, BigDecimal calculatedAmount, int port) { super(); this.id = id; this.from = from; this.to = to; this.conversionMultiplier = conversionMultiplier; this.quantity = quantity; this.calculatedAmount = calculatedAmount; this.port = port; } private BigDecimal conversionMultiplier; private BigDecimal quantity; private BigDecimal calculatedAmount; private int port; }
[ "akashmaharana93@gmail.com" ]
akashmaharana93@gmail.com
8fd9585db1e9e8a60a6ecb4f7b85ee16b45a6bdf
24a32bc2aafcca19cf5e5a72ee13781387be7f0b
/src/framework/tags/gwt-test-utils-parent-0.25.3/gwt-test-utils-gxt/src/main/java/se/fishtank/css/selectors/PseudoClassSpecifier.java
49e57eeb0bef04c13eb4806c6a7037048ec1f8db
[]
no_license
google-code-export/gwt-test-utils
27d6ee080f039a8b4111e04f32ba03e5396dced5
0391347ea51b3db30c4433566a8985c4e3be240e
refs/heads/master
2016-09-09T17:24:59.969944
2012-11-20T07:13:03
2012-11-20T07:13:03
32,134,062
0
0
null
null
null
null
UTF-8
Java
false
false
1,076
java
package se.fishtank.css.selectors; /** * An implementation of {@link Specifier} for pseudo-classes. * <p/> * Note: <br/> * The negation pseudo-class specifier is implemented by * {@link NegationSpecifier}, and the {@code nth-*} pseudo-classes are * implemented by {@link PseudoNthSpecifier}. * * @see <a * href="http://www.w3.org/TR/css3-selectors/#pseudo-classes">Pseudo-classes</a> * * @author Christer Sandberg */ class PseudoClassSpecifier implements Specifier { /** The pseudo-class value. */ private final String value; /** * Create a new pseudo-class specifier with the specified value. * * @param value The pseudo-class value. */ public PseudoClassSpecifier(String value) { Assert.notNull(value, "value is null!"); this.value = value; } /** * {@inheritDoc} */ public Type getType() { return Type.PSEUDO; } /** * Get the pseudo-class value. * * @return The pseudo-class value. */ public String getValue() { return value; } }
[ "gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa" ]
gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa
f41e8ee346d36777cde48518a6b0765a0abbe302
60eab9b092bb9d5a50b807f45cbe310774d0e456
/dataset/cl1/src/test/org/apache/commons/lang/enum/EnumTestSuite.java
898b8a0894c2a6267ff0e98eb81d7a23b70bbc0a
[ "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
SpoonLabs/nopol-experiments
7b691c39b09e68c3c310bffee713aae608db61bc
2cf383cb84a00df568a6e41fc1ab01680a4a9cc6
refs/heads/master
2022-02-13T19:44:43.869060
2022-01-22T22:06:28
2022-01-22T22:14:45
56,683,489
6
1
null
2019-03-05T11:02:20
2016-04-20T12:05:51
Java
UTF-8
Java
false
false
3,659
java
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.commons.lang.enum; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * Test suite for the Enum package. * * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a> * @version $Id: EnumTestSuite.java,v 1.1 2002/08/11 23:17:54 scolebourne Exp $ */ public class EnumTestSuite extends TestCase { /** * Construct a new instance. */ public EnumTestSuite(String name) { super(name); } /** * Command-line interface. */ public static void main(String[] args) { TestRunner.run(suite()); } /** * Get the suite of tests */ public static Test suite() { TestSuite suite = new TestSuite(); suite.setName("Commons-Lang-Enum Tests"); suite.addTest(EnumTest.suite()); suite.addTest(EnumUtilsTest.suite()); suite.addTest(ValuedEnumTest.suite()); return suite; } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
6c035bb549ea70058017e0af7c0f1f247962bc14
d6920bff5730bf8823315e15b0858c68a91db544
/android/ftsafe_0.7.04_source_from_cfr/gnu/kawa/models/Box.java
5f1d576a3aec228a867ed1d2d3f3049b72167ab9
[]
no_license
AppWerft/Ti.FeitianSmartcardReader
f862f9a2a01e1d2f71e09794aa8ff5e28264e458
48657e262044be3ae8b395065d814e169bd8ad7d
refs/heads/master
2020-05-09T10:54:56.278195
2020-03-17T08:04:07
2020-03-17T08:04:07
181,058,540
2
0
null
null
null
null
UTF-8
Java
false
false
1,734
java
/* * Decompiled with CFR 0.139. */ package gnu.kawa.models; import gnu.kawa.models.Display; import gnu.kawa.models.Model; import gnu.kawa.models.Spacer; import gnu.kawa.models.Viewable; import gnu.math.IntNum; import java.awt.Dimension; import java.io.Serializable; public abstract class Box extends Model implements Viewable, Serializable { Viewable[] components; int numComponents; Viewable cellSpacing; public Viewable getCellSpacing() { return this.cellSpacing; } public void setCellSpacing(Object cellSpacing) { if (cellSpacing instanceof IntNum || cellSpacing instanceof Integer) { int size = ((Number)cellSpacing).intValue(); Dimension dim = this.getAxis() == 0 ? new Dimension(size, 0) : new Dimension(0, size); this.cellSpacing = Spacer.rigidArea(dim); } else { this.cellSpacing = (Viewable)cellSpacing; } } public abstract int getAxis(); public final int getComponentCount() { return this.numComponents; } public final Viewable getComponent(int i) { return this.components[i]; } public void add(Viewable component) { Viewable[] arr = this.components; int n = this.numComponents; if (n == 0) { this.components = arr = new Viewable[4]; } else if (arr.length <= n) { this.components = new Viewable[2 * n]; System.arraycopy(arr, 0, this.components, 0, n); arr = this.components; } this.components[n] = component; this.numComponents = n + 1; } @Override public void makeView(Display display, Object where) { display.addBox(this, where); } }
[ "“rs@hamburger-appwerft.de“" ]
“rs@hamburger-appwerft.de“
bad9a5b523a20f67f2bd7cbf39de87be5a369945
8d8472ec9020d0dbe15399a711e06879da35d09e
/test/org/traccar/FilterHandlerTest.java
bb7e69dc0a7e5d383879304c4a731199d7f4fc40
[ "Apache-2.0" ]
permissive
geekineers/traccar
9d72a02dea29f224c80a2355624db558b898fb56
e1929de123313f5e7f70e26c455a86b1c31c7b46
refs/heads/master
2021-01-11T03:51:49.846565
2016-10-18T19:05:07
2016-10-18T19:05:07
71,279,999
0
0
null
2016-10-18T18:41:58
2016-10-18T18:41:57
null
UTF-8
Java
false
false
2,279
java
package org.traccar; import java.util.Date; import org.junit.After; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import org.junit.Before; import org.junit.Test; import org.traccar.model.Position; public class FilterHandlerTest { private FilterHandler filtingHandler; private FilterHandler passingHandler; @Before public void setUp() { passingHandler = new FilterHandler(); filtingHandler = new FilterHandler(); filtingHandler.setFilterInvalid(true); filtingHandler.setFilterZero(true); filtingHandler.setFilterDuplicate(true); filtingHandler.setFilterFuture(true); filtingHandler.setFilterApproximate(true); filtingHandler.setFilterStatic(true); filtingHandler.setFilterDistance(10); filtingHandler.setFilterLimit(10); } @After public void tearDown() { filtingHandler = null; passingHandler = null; } private Position createPosition( long deviceId, Date time, boolean valid, double latitude, double longitude, double altitude, double speed, double course) { Position p = new Position(); p.setDeviceId(deviceId); p.setTime(time); p.setValid(valid); p.setLatitude(latitude); p.setLongitude(longitude); p.setAltitude(altitude); p.setSpeed(speed); p.setCourse(course); return p; } @Test public void testFilterInvalid() throws Exception { Position position = createPosition(0, new Date(), true, 10, 10, 10, 10, 10); assertNotNull(filtingHandler.decode(null, null, position)); assertNotNull(passingHandler.decode(null, null, position)); position = createPosition(0, new Date(Long.MAX_VALUE), true, 10, 10, 10, 10, 10); assertNull(filtingHandler.decode(null, null, position)); assertNotNull(passingHandler.decode(null, null, position)); position = createPosition(0, new Date(), false, 10, 10, 10, 10, 10); assertNull(filtingHandler.decode(null, null, position)); assertNotNull(passingHandler.decode(null, null, position)); } }
[ "anton.tananaev@gmail.com" ]
anton.tananaev@gmail.com
f8281a1c9ed259dc87189cb35cfe3e231c2ed715
3eb360b54c646b2bdf9239696ddd7ce8409ece8d
/lm_terminal/src/com/lauvan/dutymanage1/vo/DutySchedule1Vo.java
c641e50d19ae6bf54c5ef0aa631f6661c2d37331
[]
no_license
amoydream/workspace
46a8052230a1eeede2c51b5ed2ca9e4c3f8fc39e
72f0f1db3e4a63916634929210d0ab3512a69df5
refs/heads/master
2021-06-11T12:05:24.524282
2017-03-01T01:43:35
2017-03-01T01:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package com.lauvan.dutymanage1.vo; import java.util.Date; import org.springframework.format.annotation.DateTimeFormat; public class DutySchedule1Vo { private Integer duty_id; /** * 值班日期 */ @DateTimeFormat(pattern="yyyy-MM-dd") private Date duty_date; /** * 值班性质 */ private String duty_prop; /** * 值班类型 */ private String duty_type; /** * 是否模板(1) */ private String duty_temp; /** * 是否上级领导(1是,0不是) */ private String duty_ifleader; /** * 人员ID */ private Integer pe_id; /** * 拖动天数 */ private Integer days; public Integer getDuty_id() { return duty_id; } public void setDuty_id(Integer duty_id) { this.duty_id = duty_id; } public Date getDuty_date() { return duty_date; } public void setDuty_date(Date duty_date) { this.duty_date = duty_date; } public String getDuty_prop() { return duty_prop; } public void setDuty_prop(String duty_prop) { this.duty_prop = duty_prop; } public String getDuty_type() { return duty_type; } public void setDuty_type(String duty_type) { this.duty_type = duty_type; } public String getDuty_temp() { return duty_temp; } public void setDuty_temp(String duty_temp) { this.duty_temp = duty_temp; } public Integer getPe_id() { return pe_id; } public void setPe_id(Integer pe_id) { this.pe_id = pe_id; } public Integer getDays() { return days; } public void setDays(Integer days) { this.days = days; } public String getDuty_ifleader() { return duty_ifleader; } public void setDuty_ifleader(String duty_ifleader) { this.duty_ifleader = duty_ifleader; } }
[ "jason.ss.tao@qq.com" ]
jason.ss.tao@qq.com
4eb0b0cd11833fa507a668f4a5ad2c1610a92b66
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/gms/internal/ads/zzeeh.java
d67daaff13f8adcaaa8b4af0977a8e5d7e9391f1
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,988
java
package com.google.android.gms.internal.ads; import com.google.android.gms.internal.ads.zzekh; /* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */ public final class zzeeh extends zzekh<zzeeh, zza> implements zzelu { private static volatile zzemb<zzeeh> zzei; /* access modifiers changed from: private */ public static final zzeeh zzicb; /* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */ public static final class zza extends zzekh.zza<zzeeh, zza> implements zzelu { private zza() { super(zzeeh.zzicb); } /* synthetic */ zza(s60 s60) { this(); } } static { zzeeh zzeeh = new zzeeh(); zzicb = zzeeh; zzekh.zza(zzeeh.class, zzeeh); } private zzeeh() { } public static zzeeh zzp(zzeiu zzeiu, zzeju zzeju) { return (zzeeh) zzekh.zza(zzicb, zzeiu, zzeju); } /* access modifiers changed from: protected */ public final Object zza(int i, Object obj, Object obj2) { switch (s60.f10855a[i - 1]) { case 1: return new zzeeh(); case 2: return new zza((s60) null); case 3: return zzekh.zza((zzels) zzicb, "\u0000\u0000", (Object[]) null); case 4: return zzicb; case 5: zzemb<zzeeh> zzemb = zzei; if (zzemb == null) { synchronized (zzeeh.class) { zzemb = zzei; if (zzemb == null) { zzemb = new zzekh.zzc<>(zzicb); zzei = zzemb; } } } return zzemb; case 6: return (byte) 1; case 7: return null; default: throw new UnsupportedOperationException(); } } }
[ "mred312@gmail.com" ]
mred312@gmail.com
7984d4e1390b8b679782eeba3e902bce4b26dd65
033d9dfed385dd49c2a40892e2cb98a36485ee83
/jonix-onix2/src/main/java/com/tectonica/jonix/onix2/DownloadCredit.java
1b449e18ab3ace79596f6908e13e835cdb7f92c3
[ "Apache-2.0" ]
permissive
88keys/jonix
8307892c4ee1289d5980052ec1bc26841870634b
bd00c10ac78a9ae1e80d8ea6c99182a5d68c0450
refs/heads/master
2021-01-14T12:45:04.496629
2015-06-28T12:28:07
2015-06-28T12:28:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,366
java
/* * Copyright (C) 2012 Zach Melamed * * Latest version available online at https://github.com/zach-m/jonix * Contact me at zach@tectonica.co.il * * 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.tectonica.jonix.onix2; import java.io.Serializable; import com.tectonica.jonix.JPU; import com.tectonica.jonix.OnixElement; import com.tectonica.jonix.codelist.LanguageCodes; import com.tectonica.jonix.codelist.RecordSourceTypes; import com.tectonica.jonix.codelist.TextCaseFlags; import com.tectonica.jonix.codelist.TextFormats; import com.tectonica.jonix.codelist.TransliterationSchemes; /* * NOTE: THIS IS AN AUTO-GENERATED FILE, DON'T EDIT MANUALLY */ @SuppressWarnings("serial") public class DownloadCredit implements OnixElement, Serializable { public static final String refname = "DownloadCredit"; public static final String shortname = "f120"; public TextFormats textformat; public TextCaseFlags textcase; public LanguageCodes language; public TransliterationSchemes transliteration; /** * (type: DateOrDateTime) */ public String datestamp; public RecordSourceTypes sourcetype; public String sourcename; /** * (type: XHTML) */ public String value; public DownloadCredit() {} public DownloadCredit(org.w3c.dom.Element element) { textformat = TextFormats.byValue(JPU.getAttribute(element, "textformat")); textcase = TextCaseFlags.byValue(JPU.getAttribute(element, "textcase")); language = LanguageCodes.byValue(JPU.getAttribute(element, "language")); transliteration = TransliterationSchemes.byValue(JPU.getAttribute(element, "transliteration")); datestamp = JPU.getAttribute(element, "datestamp"); sourcetype = RecordSourceTypes.byValue(JPU.getAttribute(element, "sourcetype")); sourcename = JPU.getAttribute(element, "sourcename"); value = JPU.getChildXHTML(element, true); } }
[ "zach@tectonica.co.il" ]
zach@tectonica.co.il
7a1e895ee972c163863bc1d413b3477acbf95dbf
c0267fd7e9cfaf05d77294a6d8b248d0d8890657
/petstore/petstore-account/src/main/java/com/feiyangedu/springcloud/petstore/account/domain/UserPasswdAuth.java
d770f978aa730ea5075c7ab93c19eb02f23654ad
[ "Apache-2.0" ]
permissive
zyanam/springcloud
967ca44298c3ad79f8d8e4c34eefef7570119430
bdcd5b963fd9cc4e9b87791bc71a47ba9409917f
refs/heads/master
2021-10-16T15:58:20.794258
2019-02-12T00:28:15
2019-02-12T00:28:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
860
java
package com.feiyangedu.springcloud.petstore.account.domain; import javax.persistence.Column; import javax.persistence.Entity; import com.feiyangedu.springcloud.petstore.common.domain.AbstractEntity; @Entity public class UserPasswdAuth extends AbstractEntity { @Column(length = ID_LENGTH, nullable = false, updatable = false, unique = true) private String userId; @Column(length = VARCHAR_100, nullable = false) private String passwd; @Column(length = VARCHAR_100, nullable = false) private String salt; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getPasswd() { return passwd; } public void setPasswd(String passwd) { this.passwd = passwd; } public String getSalt() { return salt; } public void setSalt(String salt) { this.salt = salt; } }
[ "askxuefeng@gmail.com" ]
askxuefeng@gmail.com
e8c689deb4bd8c95f744c06c1b30c309f43949c3
48631c3851b15fbc20e61e29b82480b64eec2885
/blog-root/blog-manager/src/main/java/com/prosayj/springboot/blog/manager/operation/service/impl/CategoryServiceImpl.java
e1c597fad60ef557515bfc1a9cf65f666ee2dfff
[ "Apache-2.0" ]
permissive
ProSayJ/springbootstudy
56cb7f80502888d2c564d7a4bda23dd0650750f7
04b5ce563b9e6163ab6d6217292d7dd266e105c3
refs/heads/master
2022-12-25T10:42:49.047945
2021-04-09T15:20:12
2021-04-09T15:20:12
147,488,466
0
0
Apache-2.0
2022-12-16T03:22:22
2018-09-05T08:52:00
Java
UTF-8
Java
false
false
2,283
java
package com.prosayj.springboot.blog.manager.operation.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.prosayj.springboot.blog.core.entity.operation.Category; import com.prosayj.springboot.blog.core.mapper.operation.CategoryMapper; import com.prosayj.springboot.blog.manager.operation.service.CategoryService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * <p> * 服务实现类 * </p> * */ @Service @Slf4j public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService { /** * 查询所有菜单 * * @param params * @return */ @Override public List<Category> queryWithParentName(Map<String, Object> params) { return baseMapper.queryAll(params); } /** * 根据父级别查询子级别 * * @param id * @return */ @Override public List<Category> queryListParentId(Integer id) { return baseMapper.selectList(new QueryWrapper<Category>().lambda() .eq(Category::getParentId,id)); } /** * 根据类别Id数组查询类别数组 * @param categoryIds * @param categoryList * @return */ @Override public String renderCategoryArr(String categoryIds, List<Category> categoryList) { if (StringUtils.isEmpty(categoryIds)) { return ""; } List<String> categoryStrList = new ArrayList<>(); String[] categoryIdArr = categoryIds.split(","); for (int i = 0; i < categoryIdArr.length; i++) { Integer categoryId = Integer.parseInt(categoryIdArr[i]); // 根据Id查找类别名称 String categoryStr = categoryList .stream() .filter(category -> category.getId().equals(categoryId)) .map(Category::getName) .findAny().orElse("类别已被删除"); categoryStrList.add(categoryStr); } return String.join(",",categoryStrList); } }
[ "yangjian@bubi.cn" ]
yangjian@bubi.cn
4c83477c665367286b295fc9bac1d23f5c890f49
e3efc1fede34736a2cd21da72c83939186277ca2
/server/src/main/java/org/fastcatsearch/common/FixedByteArrayCache.java
eb24dac110f6fc8c10e036d76c5c6115a429bd89
[ "Apache-2.0" ]
permissive
songaal/abcc
e3a646d3636105b1290c251395c90e3b785f9c88
6839cbf947296ff8ff4439c591aa314a14f19f7b
refs/heads/master
2023-04-03T04:40:09.743919
2019-10-14T08:05:21
2019-10-14T08:05:21
222,627,949
0
0
Apache-2.0
2023-03-23T20:38:31
2019-11-19T06:47:36
Java
UTF-8
Java
false
false
1,548
java
package org.fastcatsearch.common; import java.lang.ref.SoftReference; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; public class FixedByteArrayCache { private SoftReference<Queue<byte[]>> cache; private final AtomicInteger counter = new AtomicInteger(); private int cacheSizeLimit; private int bufferSize; public FixedByteArrayCache(int bufferSize){ this(bufferSize, 100); } public FixedByteArrayCache(int bufferSize, int cacheSizeLimit){ this.bufferSize = bufferSize; this.cacheSizeLimit = cacheSizeLimit; Queue<byte[]> ref = new ConcurrentLinkedQueue<byte[]>(); cache = new SoftReference<Queue<byte[]>>(ref); } public byte[] pop() { Queue<byte[]> ref = cache.get(); if (ref == null) { return new byte[bufferSize]; } byte[] array = ref.poll(); if (array == null) { return new byte[bufferSize]; } counter.decrementAndGet(); return array; } public void push(byte[] array) { if (array.length != bufferSize) { return; } Queue<byte[]> ref = cache.get(); if (ref == null) { ref = new ConcurrentLinkedQueue<byte[]>(); counter.set(0); cache = new SoftReference<Queue<byte[]>>(ref); } if (counter.incrementAndGet() > cacheSizeLimit) { counter.decrementAndGet(); } else { ref.add(array); } } }
[ "swsong@danawa.com" ]
swsong@danawa.com
9245e217c06563c54eea4dd976f554ade1e86667
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/p005b/p096l/p180d/p185o/p189e0/C3901z.java
359921f42ecb8297cfc277f2dbaf7fc7eac65112
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
package p005b.p096l.p180d.p185o.p189e0; import androidx.annotation.Nullable; /* renamed from: b.l.d.o.e0.z */ public final class C3901z { /* renamed from: a */ public final String f7185a; /* renamed from: b */ public final String f7186b; /* renamed from: c */ public final String f7187c; @Nullable /* renamed from: d */ public final String f7188d; /* renamed from: e */ public final String f7189e; public C3901z(String str, String str2, String str3, @Nullable String str4, String str5) { this.f7185a = str; this.f7186b = str2; this.f7187c = str3; this.f7188d = str4; this.f7189e = str5; } }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
540d7acc3fd823e47c1108bb79eb35dd1df7cb6f
0dc7b5884df384709a2704a8bd7995058f039a4b
/tesuto-content-services/tesuto-content-api/src/main/java/org/cccnext/tesuto/content/service/AssessmentAccessService.java
a8eb7d4735263e82f3f7e85805b553e490b1d801
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0" ]
permissive
apereo-tesuto/tesuto
b1672fc2ebbd4b5d4647ee15e3e4285c8e3dc0be
90ed26311b1baa15cd90d67bb55e7d4c613bdc53
refs/heads/master
2021-10-08T01:02:49.098929
2021-09-24T21:22:52
2021-09-24T21:22:52
218,090,150
4
3
Apache-2.0
2021-09-24T21:22:53
2019-10-28T16:08:04
null
UTF-8
Java
false
false
1,540
java
/******************************************************************************* * Copyright © 2019 by California Community Colleges Chancellor's Office * * 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.cccnext.tesuto.content.service; import java.util.Collection; import java.util.Set; import org.cccnext.tesuto.admin.dto.TestLocationDto; import org.cccnext.tesuto.content.model.AssessmentAccess; import org.cccnext.tesuto.content.model.AssessmentAccessId; import org.cccnext.tesuto.content.model.ScopedIdentifier; public interface AssessmentAccessService { Set<ScopedIdentifier> getAllowedAssessments(String userId, String locationId); Collection<? extends AssessmentAccess> findByLocationsAndUserIds(Set<TestLocationDto> locations, Set<String> userIds); void create(AssessmentAccess assessmentAccess); void delete(AssessmentAccess assessmentAccess); void delete(AssessmentAccessId assessmentAccessId); }
[ "jstanley@unicon.net" ]
jstanley@unicon.net
02d9e18aa62cd850ebae44bf97398a72b27d5926
23954a7d5713fbbe5e35a87c81745907cabc5462
/src/main/java/com/youedata/nncloud/modular/nanning/service/impl/ColletServiceImpl.java
f17a471bec407faf78b6a1dbe8be98d4cc9df6a6
[]
no_license
lj88811498/db
410a8c5af0f2e7c34bc78996e08650b16ee966e3
fd19c30fff7a5c44ebae34dbe10a6101d67eae74
refs/heads/master
2022-10-07T05:33:43.516126
2020-01-06T09:38:16
2020-01-06T09:38:16
232,068,336
0
0
null
2022-09-01T23:18:23
2020-01-06T09:35:38
JavaScript
UTF-8
Java
false
false
2,205
java
package com.youedata.nncloud.modular.nanning.service.impl; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.youedata.nncloud.core.common.constant.factory.PageFactory; import com.youedata.nncloud.modular.nanning.dao.ColletMapper; import com.youedata.nncloud.modular.nanning.dao.QuestionMapper; import com.youedata.nncloud.modular.nanning.model.vo.QuestionListVo; import org.apache.ibatis.annotations.Param; import org.springframework.transaction.annotation.Transactional; import com.youedata.nncloud.modular.nanning.model.Collet; import org.springframework.stereotype.Service; import com.youedata.nncloud.modular.nanning.service.IColletService; import javax.annotation.Resource; import java.util.List; import java.util.Map; /** * 收藏Service * * @author monkey * @Date 2018-09-12 10:11:32 */ @Service @Transactional(rollbackFor = java.lang.Exception.class) public class ColletServiceImpl extends ServiceImpl<BaseMapper<Collet>,Collet> implements IColletService { @Resource private ColletMapper colletMapper; @Resource private QuestionMapper questionMapper; /** * 根据问题Id查询收藏 * @param questionId * @return */ @Override public Collet getByQuestionId(Integer questionId, int colletUserId) { return colletMapper.getByQuestionId(questionId, colletUserId); } /** * 根据用户id查询收藏 * @param userId * @return */ @Override public Page getByUserId(Integer userId, String title, String type, String beginTime, String endTime, String progress, String orderByField, boolean isAsc, int size, int curPage) { Page page = new PageFactory<Map<String, String>>().defaultPage2(size, curPage); List<QuestionListVo> result = questionMapper.getByCollentUserId(page,orderByField,isAsc, userId, title, type, beginTime, endTime, progress); page.setRecords(result); return page; } @Override public void deleteByQuestionId(Integer questionId, int colletUserId) { colletMapper.deleteByQuestionId(questionId, colletUserId); } }
[ "450416064@qq.com" ]
450416064@qq.com
289c8d30a7568cd43a976baf4cefb2e587b6ee33
f4e15ee34808877459d81fd601d6be03bdfb4a9d
/org/fourthline/cling/support/model/DeviceCapabilities.java
c0fc76ef8e3600b7878f8fa90080a9c505d5baac
[]
no_license
Lianite/wurm-server-reference
369081debfa72f44eafc6a080002c4a3970f8385
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
refs/heads/master
2023-07-22T16:06:23.426163
2020-04-07T23:15:35
2020-04-07T23:15:35
253,933,452
0
0
null
null
null
null
UTF-8
Java
false
false
2,093
java
// // Decompiled by Procyon v0.5.30 // package org.fourthline.cling.support.model; import org.fourthline.cling.model.ModelUtil; import org.fourthline.cling.model.action.ActionArgumentValue; import java.util.Map; public class DeviceCapabilities { private StorageMedium[] playMedia; private StorageMedium[] recMedia; private RecordQualityMode[] recQualityModes; public DeviceCapabilities(final Map<String, ActionArgumentValue> args) { this(StorageMedium.valueOfCommaSeparatedList((String)args.get("PlayMedia").getValue()), StorageMedium.valueOfCommaSeparatedList((String)args.get("RecMedia").getValue()), RecordQualityMode.valueOfCommaSeparatedList((String)args.get("RecQualityModes").getValue())); } public DeviceCapabilities(final StorageMedium[] playMedia) { this.recMedia = new StorageMedium[] { StorageMedium.NOT_IMPLEMENTED }; this.recQualityModes = new RecordQualityMode[] { RecordQualityMode.NOT_IMPLEMENTED }; this.playMedia = playMedia; } public DeviceCapabilities(final StorageMedium[] playMedia, final StorageMedium[] recMedia, final RecordQualityMode[] recQualityModes) { this.recMedia = new StorageMedium[] { StorageMedium.NOT_IMPLEMENTED }; this.recQualityModes = new RecordQualityMode[] { RecordQualityMode.NOT_IMPLEMENTED }; this.playMedia = playMedia; this.recMedia = recMedia; this.recQualityModes = recQualityModes; } public StorageMedium[] getPlayMedia() { return this.playMedia; } public StorageMedium[] getRecMedia() { return this.recMedia; } public RecordQualityMode[] getRecQualityModes() { return this.recQualityModes; } public String getPlayMediaString() { return ModelUtil.toCommaSeparatedList(this.playMedia); } public String getRecMediaString() { return ModelUtil.toCommaSeparatedList(this.recMedia); } public String getRecQualityModesString() { return ModelUtil.toCommaSeparatedList(this.recQualityModes); } }
[ "jdraco6@gmail.com" ]
jdraco6@gmail.com
4c0c8879381a448c001b5623e39584494e8d592d
677d33925e5f8f677f257695202b28cb0ba96a0b
/src/main/java/ru/wkn/client/windows/controllers/EmployeeWindowController.java
2bb99d2b6ea972e200ef69fd5f122f0a2c7aa369
[]
no_license
Vaysman/TimekeepingSystem
2f7b910ee40cb337617ec98f15e44060dcedfa82
9c42ca1c9d12fabbd8839bbcb66f31954166e4f9
refs/heads/master
2020-03-14T22:14:07.617519
2018-05-02T06:45:28
2018-05-02T06:45:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,200
java
package ru.wkn.client.windows.controllers; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.RadioButton; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; import ru.wkn.client.windows.AuthorizationWindow; import ru.wkn.client.windows.Window; import ru.wkn.client.windows.container.Container; import java.io.IOException; public class EmployeeWindowController { @FXML public AnchorPane employee; @FXML public GridPane creatorEventGridPane; @FXML public Label aboutMeLabel; @FXML public RadioButton aboutMeButton; @FXML public RadioButton createEventButton; @FXML public RadioButton myTasksButton; @FXML public RadioButton searchEmployeeButton; @FXML public RadioButton calendarEventsButton; @FXML public Button exitButton; public Button startShiftButton; public Button startBreakButton; public Button endBreakButton; public Button endShiftButton; private void hide() { employee.getScene().getWindow().hide(); } @FXML public void aboutMeClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("INFO"); Information.writeMessage("Информация о пользователе", Container.getDataInputStream().readUTF()); } catch (IOException e) { e.printStackTrace(); } } @FXML public void exitClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("EXIT"); hide(); Window window = new AuthorizationWindow(); } catch (IOException e) { e.printStackTrace(); } } @FXML public void createEventClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("EVENT_MANAGER"); hide(); // } catch (IOException e) { e.printStackTrace(); } } @FXML public void myTasksClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("MY_TASKS"); hide(); // } catch (IOException e) { e.printStackTrace(); } } @FXML public void searchEmployeeClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("READ"); hide(); // } catch (IOException e) { e.printStackTrace(); } } @FXML public void calendarEventsClick(ActionEvent actionEvent) { try { Container.getDataOutputStream().writeUTF("CALENDAR_EVENTS"); hide(); // } catch (IOException e) { e.printStackTrace(); } } public void startShiftClick(ActionEvent actionEvent) { // } public void startBreakClick(ActionEvent actionEvent) { // } public void endBreakClick(ActionEvent actionEvent) { // } public void endShiftClick(ActionEvent actionEvent) { // } }
[ "pickalov.artyom@yandex.ru" ]
pickalov.artyom@yandex.ru
edad1b5f33e53263ae378bd54eb38ef28b62b4b3
14ba89d545d118d09ffaa232939810f97b60f7b6
/oca-8-certificate/src/main/java/kim/eren/oca_8_certificate/mala_gupta_guide/chapterIII/topicVIII/PersonTest.java
6b6109cc55fdd4340aa0001fa4979aaa4f527da9
[]
no_license
ErenKaya/code-practices
dc48ec896d50af6b9dfa88764b7bcba93f8c6d88
c21373e6c5a79fd535d1e84270de335f02f9d65a
refs/heads/master
2022-10-17T22:04:30.331438
2022-10-10T03:29:07
2022-10-10T03:29:07
132,752,781
5
1
null
2022-08-01T10:45:05
2018-05-09T12:21:17
Java
UTF-8
Java
false
false
806
java
package kim.eren.oca_8_certificate.mala_gupta_guide.chapterIII.topicVIII; class Person{ private String name; public Person setName(String name){ this.name = name; return this; } public String getName(){ return this.name; } } public class PersonTest{ public static void swap(Person p1,Person p2){ Person temp = p1; p1=p2; p2=temp; } public static void main(String[] args) { Person person1 = new Person().setName("John"); Person person2 = new Person().setName("Wiley"); System.out.println("Person1Name :"+person1.getName()+" Person2Name :"+person2.getName()); swap(person1, person2); System.out.println("Person1Name :"+person1.getName()+" Person2Name :"+person2.getName()); } }
[ "erenkaya1993@gmail.com" ]
erenkaya1993@gmail.com
04a6566d4450909fa692cdf98026d5256d33e425
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/76/org/apache/commons/math/linear/OpenMapRealVector_OpenMapRealVector_95.java
4fa86b6af96dea626c7080b4b8565022ebeb4a71
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,339
java
org apach common math linear link real vector realvector link open int doubl hash map openinttodoublehashmap back store version revis date open map real vector openmaprealvector abstract real vector abstractrealvector spars real vector sparserealvector serializ build vector spars advanc param dimens size vector param expect size expecteds expect number entri open map real vector openmaprealvector dimens expect size expecteds dimens expect size expecteds default toler
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
affd0c74f1949eb45cb1fa87f87461acebb8b785
bbc589433385bd974da18ad276024d7d08c947f4
/app/src/main/java/com/example/acer/netcaseskin/BaseActivity.java
06fc0675ab9eb82222f9b23619f76534e05ef3cc
[]
no_license
ltpdev/NetcaseSkin
31233f43a2b6c0f0167f54ea37531ee1fb005ba5
05783b2cd8774a2586027f4f38e3046c62abcac8
refs/heads/master
2020-04-06T14:51:57.993614
2018-11-14T14:01:39
2018-11-14T14:01:39
157,557,215
0
0
null
null
null
null
UTF-8
Java
false
false
767
java
package com.example.acer.netcaseskin; import android.os.Bundle; import android.os.Environment; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; public abstract class BaseActivity extends AppCompatActivity { protected SkinFactory skinFactory; @Override protected void onCreate(Bundle savedInstanceState) { skinFactory=new SkinFactory(); LayoutInflater.from(this).setFactory(skinFactory); SkinManager.getInstance().init(this); super.onCreate(savedInstanceState); setContentView(getLayoutId()); } protected abstract int getLayoutId(); @Override protected void onResume() { super.onResume(); skinFactory.apply(); } }
[ "1776494277@qq.com" ]
1776494277@qq.com
31c5a0eeedd217f03b1431e2c0fb4f2fa1774870
7278e7e153bb09ed4454a35d7c2b40d797d3385b
/NxLjngMeter/src/main/java/com/zfg/org/myexample/amap/map2d/cloud/CloudOverlay.java
2e47812f7c6a5bff78f6afc0d15367b056ab7f91
[]
no_license
CapRobin/LjngProject
f530dce3f917222b7c669ff273fd6e7f9c41f859
a63ce5d483ed41be57ac714910b394ba40682a5a
refs/heads/master
2020-03-11T17:07:25.914849
2018-05-08T11:20:17
2018-05-08T11:20:17
130,138,154
1
0
null
null
null
null
UTF-8
Java
false
false
2,610
java
package com.zfg.org.myexample.amap.map2d.cloud;//package com.zfg.org.myexample.amap.map2d.cloud; // // //import java.util.ArrayList; //import java.util.List; // //import com.amap.api.maps2d.AMap; //import com.amap.api.maps2d.CameraUpdateFactory; //import com.amap.api.maps2d.model.BitmapDescriptor; //import com.amap.api.maps2d.model.LatLng; //import com.amap.api.maps2d.model.LatLngBounds; //import com.amap.api.maps2d.model.Marker; //import com.amap.api.maps2d.model.MarkerOptions; //import com.amap.api.services.cloud.CloudItem; // // //public class CloudOverlay { // private List<CloudItem> mPois; // private AMap mAMap; // private ArrayList<Marker> mPoiMarks = new ArrayList<Marker>(); // // public CloudOverlay(AMap amap, List<CloudItem> pois) { // mAMap = amap; // mPois = pois; // } // // public void addToMap() { // for (int i = 0; i < mPois.size(); i++) { // Marker marker = mAMap.addMarker(getMarkerOptions(i)); // marker.setObject(i); // mPoiMarks.add(marker); // } // } // // public void removeFromMap() { // for (Marker mark : mPoiMarks) { // mark.remove(); // } // } // // public void zoomToSpan() { // if (mPois != null && mPois.size() > 0) { // if (mAMap == null) // return; // LatLngBounds bounds = getLatLngBounds(); // mAMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 20)); // } // } // // private LatLngBounds getLatLngBounds() { // LatLngBounds.Builder b = LatLngBounds.builder(); // for (int i = 0; i < mPois.size(); i++) { // b.include(new LatLng(mPois.get(i).getLatLonPoint().getLatitude(), // mPois.get(i).getLatLonPoint().getLongitude())); // } // return b.build(); // } // // private MarkerOptions getMarkerOptions(int index) { // return new MarkerOptions() // .position( // new LatLng(mPois.get(index).getLatLonPoint() // .getLatitude(), mPois.get(index) // .getLatLonPoint().getLongitude())) // .title(getTitle(index)).snippet(getSnippet(index)) // .icon(getBitmapDescriptor(index)); // } // // protected BitmapDescriptor getBitmapDescriptor(int index) { // return null; // } // // protected String getTitle(int index) { // return mPois.get(index).getTitle(); // } // // protected String getSnippet(int index) { // return mPois.get(index).getSnippet(); // } // // public int getPoiIndex(Marker marker) { // for (int i = 0; i < mPoiMarks.size(); i++) { // if (mPoiMarks.get(i).equals(marker)) { // return i; // } // } // return -1; // } // // public CloudItem getPoiItem(int index) { // if (index < 0 || index >= mPois.size()) { // return null; // } // return mPois.get(index); // } //}
[ "CapRobin@yeah.net" ]
CapRobin@yeah.net
fb2ec620a60ff64477504c15263d0c9ce379dc95
7694ed412502bffd6f36178ccf2dc2695e11d319
/src/mapa/Mapa.java
6483df898dcd1d7e19f4d8912aeb0f6d1372b53b
[]
no_license
tomasmalio/cmc_dibujo_progra_3_uade
0fcfa3f2987094b0f2be6d7f22101e2e5d37116a
c5c899a19e3a7bfb6e2069bd31ccf77ff911919a
refs/heads/master
2021-01-23T01:34:37.093371
2017-06-24T15:49:47
2017-06-24T15:49:47
92,879,879
0
0
null
null
null
null
UTF-8
Java
false
false
979
java
package mapa; import grafico.Area; import grafico.DibujoTDA; import grafico.Punto; public class Mapa { static int VALOR_MAXIMO = 3; private int[][] grilla; public Mapa() { this.grilla = new int[DibujoTDA.LARGO][DibujoTDA.ALTO]; } public int[][] getGrilla() { return this.grilla; } public void setArea(Area area) { int[] c = area.getCoordenadas(); for (int w = 0; w < c[2]; w++) for (int h = 0; h < c[3]; h++) this.grilla[(c[0] + w)][(c[1] + h)] = area.getColorOrdinal(); } public int getDensidad(int x, int y) { return this.grilla[x][y]; } public int getDensidad(Punto p) { return this.grilla[p.getX()][p.getY()]; } public boolean puntoValido(Punto p) { if ((p.getX() < 0) || (p.getX() >= DibujoTDA.LARGO)) return false; if ((p.getY() < 0) || (p.getY() >= DibujoTDA.ALTO)) return false; if (this.grilla[p.getX()][p.getY()] >= VALOR_MAXIMO) { return false; } return true; } }
[ "tomasmalio@gmail.com" ]
tomasmalio@gmail.com
bcec99e1a819154702b84a536c21fe2bfc48899b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_69f027fa7ce2eb99db6e00bc61272bd439ec0d2c/VisitListController/4_69f027fa7ce2eb99db6e00bc61272bd439ec0d2c_VisitListController_s.java
d986b016223109c751e44cba1fac2cf1e728ddaf
[]
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,456
java
/** * The contents of this file are subject to the OpenMRS Public License * Version 1.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://license.openmrs.org * * 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. * * Copyright (C) OpenMRS, LLC. All Rights Reserved. */ package org.openmrs.web.controller.visit; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.directwebremoting.util.Logger; import org.openmrs.Encounter; import org.openmrs.Form; import org.openmrs.Patient; import org.openmrs.Provider; import org.openmrs.Visit; import org.openmrs.api.context.Context; import org.openmrs.util.OpenmrsUtil; import org.openmrs.web.controller.PortletControllerUtil; import org.openmrs.web.controller.bean.DatatableRequest; import org.openmrs.web.controller.bean.DatatableResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; /** * Lists visits. */ @Controller public class VisitListController { protected final Logger log = Logger.getLogger(getClass()); public static final String VISITS_PATH = "/admin/visits/datatable"; public static final String PATIENT = "patient"; /** * It handles calls from DataTables. * * @param patient * @param request * @return {@link DatatableResponse} */ @RequestMapping(VISITS_PATH) public @ResponseBody DatatableResponse getVisits(@ModelAttribute Patient patient, HttpServletRequest request) { DatatableRequest datatable = DatatableRequest.parseRequest(request); DatatableResponse response = new DatatableResponse(datatable); Integer totalVisitsCount = Context.getEncounterService().getEncountersByVisitsAndPatientCount(patient, false, null); response.setiTotalRecords(totalVisitsCount); Map<String, Object> model = new HashMap<String, Object>(); model.put("person", patient); PortletControllerUtil.addFormToEditAndViewUrlMaps(model); @SuppressWarnings("unchecked") Map<Form, String> formToViewUrlMap = (Map<Form, String>) model.get("formToViewUrlMap"); if (!StringUtils.isBlank(datatable.getsSearch())) { Integer filteredVisitsCount = Context.getEncounterService().getEncountersByVisitsAndPatientCount(patient, false, datatable.getsSearch()); response.setiTotalDisplayRecords(filteredVisitsCount); } else { response.setiTotalDisplayRecords(totalVisitsCount); } List<Encounter> encounters = Context.getEncounterService().getEncountersByVisitsAndPatient(patient, false, datatable.getsSearch(), datatable.getiDisplayStart(), datatable.getiDisplayLength()); response.setsColumns("visitId", "visitActive", "visitType", "visitLocation", "visitFrom", "visitTo", "visitIndication", "firstInVisit", "lastInVisit", "encounterId", "encounterDate", "encounterType", "encounterProviders", "encounterLocation", "encounterEnterer", "formViewURL"); Map<String, String> row = new HashMap<String, String>(); for (Encounter encounter : encounters) { if (encounter.getVisit() != null) { Visit visit = encounter.getVisit(); row.put("visitId", visit.getId().toString()); row.put("visitActive", Boolean.toString(isActive(visit.getStartDatetime(), visit.getStopDatetime()))); row.put("visitType", visit.getVisitType().getName()); row.put("visitLocation", (visit.getLocation() != null) ? visit.getLocation().getName() : ""); row.put("visitFrom", Context.getDateFormat().format(visit.getStartDatetime())); if (visit.getStopDatetime() != null) { row.put("visitTo", Context.getDateFormat().format(visit.getStopDatetime())); } if (visit.getIndication() != null && visit.getIndication().getName() != null) { row.put("visitIndication", visit.getIndication().getName().getName()); } Object[] visitEncounters = visit.getEncounters().toArray(); if (visitEncounters.length > 0) { if (encounter.equals(visitEncounters[0])) { row.put("firstInVisit", Boolean.TRUE.toString()); } if (encounter.equals(visitEncounters[visitEncounters.length - 1])) { row.put("lastInVisit", Boolean.TRUE.toString()); } } else { row.put("firstInVisit", Boolean.TRUE.toString()); row.put("lastInVisit", Boolean.TRUE.toString()); } } if (encounter.getId() != null) { //If it is not mocked encounter row.put("encounterId", encounter.getId().toString()); row.put("encounterDate", Context.getDateFormat().format(encounter.getEncounterDatetime())); row.put("encounterType", encounter.getEncounterType().getName()); row.put("encounterProviders", getProviders(encounter)); row.put("encounterLocation", (encounter.getLocation() != null) ? encounter.getLocation().getName() : ""); row.put("encounterEnterer", (encounter.getCreator() != null) ? encounter.getCreator().getPersonName() .toString() : ""); row.put("formViewURL", getViewFormURL(request, formToViewUrlMap, encounter)); } response.addRow(row); } return response; } private String getViewFormURL(HttpServletRequest request, Map<Form, String> formToViewUrlMap, Encounter encounter) { String viewFormURL = formToViewUrlMap.get(encounter.getForm()); if (viewFormURL != null) { viewFormURL = request.getContextPath() + "/" + viewFormURL + "?encounterId=" + encounter.getId(); } else { viewFormURL = request.getContextPath() + "/admin/encounters/encounterDisplay.list?encounterId=" + encounter.getId(); } return viewFormURL; } private String getProviders(Encounter encounter) { StringBuilder providersBuilder = new StringBuilder(); for (Set<Provider> providers : encounter.getProvidersByRoles().values()) { for (Provider provider : providers) { if (provider.getPerson() != null) { providersBuilder.append(provider.getPerson().getPersonName().getFullName()); } else { providersBuilder.append(provider.getIdentifier()); } providersBuilder.append(", "); } } if (providersBuilder.length() > 1) { return providersBuilder.substring(0, providersBuilder.length() - 2); } else { return ""; } } @ModelAttribute public Patient getPatient(@RequestParam(PATIENT) Integer patientId) { return Context.getPatientService().getPatient(patientId); } private boolean isActive(Date start, Date end) { Date now = new Date(); if (OpenmrsUtil.compare(now, start) >= 0) { if (OpenmrsUtil.compareWithNullAsLatest(now, end) < 0) { return true; } } return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7a962a88bb3a27240c5f03f9eb52fbc032174212
1c40b7839027cf2ef11826a31d65e6fea18c0b38
/testframewok/src/main/java/com/nvidia/developer/opengl/ui/NvUIPopupMenu.java
4253fa060181e6b201e1baa6f33202c45c5929dd
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mzhg/PostProcessingWork
5370d37597015a178aef8cb631cc2925e4dde71e
fbc0f2a4693995102f623bf5b7643c15d7309f9a
refs/heads/master
2022-10-21T04:32:24.792131
2022-10-06T06:37:31
2022-10-06T06:37:31
86,224,204
17
8
null
null
null
null
UTF-8
Java
false
false
6,067
java
//---------------------------------------------------------------------------------- // File: NvUIPopupMenu.java // SDK Version: v1.2 // Email: gameworks@nvidia.com // Site: http://developer.nvidia.com/ // // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of NVIDIA CORPORATION nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // //---------------------------------------------------------------------------------- package com.nvidia.developer.opengl.ui; /** * The NvUIPopupMenu is a specialized container class that simulates a popup * menu. * <p> * Note that this class itself does minimal work to make the 'menu magic' * happen. It is really the contents of our container, the 'menu item' elements * themselves, that control the real functionality and visuals of a given * NvUIPopupMenu. * <p> * * There is no default implementation of menu items or other substructure, aside * from currently we add items vertically in order (a subclass could implement * different layout for a specialized menu with known visual structure). The * items should generally be NvUIButtons, but could also be static graphics for * dividers, or static text for other status in the menu. * * @author Nvidia 2014-9-12 11:21 * @see {@link NvUIPopup} * @see {@link NvUIContainer} */ public class NvUIPopupMenu extends NvUIContainer { /** The popup button that owns/shows/hides us. */ private NvUIPopup m_myButton; /** * Default constructor. Basically just sets up our NvUIContainer superclass * for us. * * @param btn * The NvUIPopup that owns this popup menu. * @param width * The base width of the menu. * @param height * The base height of the menu (noting actual container height * changes as items are added...). * @param bg * <b>[</b>optional<b>]</b> Background graphic to display under * the menu items themselves. For a menu, handy to have an * NvUIGraphicFrame for the background element. */ public NvUIPopupMenu(NvUIPopup btn, float width, float height, NvUIGraphic bg) { super(width, height, bg); m_myButton = btn; m_canFocus = true; m_canMoveFocus = true; } /** * Override to ensure we take down the popup menu at the right times. * <p> * * We first allow the normal inherited container handling to occur. If * nothing in the container handles the event, and the event was a press or * a release, we tell our NvUIPopup button to finish the popup. * <p> * * If something in the container DID handle the event, and the event was a * release, and there was NO reaction to the event, we presume there was a * release inside the container but not inside an item, and thus also tell * out button to finish the popup. * * @see {@link NvUIPopup} * @see {@link NvUIContainer} */ public int HandleEvent(NvGestureEvent ev, long timeUST, NvUIElement hasInteract) { int r = super.handleEvent(ev, timeUST, hasInteract); if (r==nvuiEventNotHandled) // if we didn't handle the event... { // and it wasn't INSIDE my button, which can handle itself... if (!m_myButton.hit(ev.x, ev.y)) { // and it was a press or a release... if (ev.kind==NvGestureKind.PRESS) // || ev.kind&NvGestureKind::MASK_RELEASED) { // then take down the popup... m_myButton.popupFinish(); // and flag that we handled! r = nvuiEventHandledInteract; // but NO reaction... } } } else // child handled in some form? if ((ev.kind&NvGestureKind.MASK_RELEASED)!= 0 && (r & nvuiEventHadReaction) == 0) { // no reaction. means handled, but nothing tripped. out of hitrect 99.9%. m_myButton.popupFinish(); } else { } return r; } /** Override to handle events so we stay up until otherwise put away... */ public int handleFocusEvent(int evt) { if (!getVisibility()) return nvuiEventNotHandled; if (evt == NvFocusEvent.FOCUS_CLEAR) { // close the menu. m_myButton.popupFinish(); return nvuiEventHandled; } int r = super.handleFocusEvent(evt); if ((r & nvuiEventHandled) == 0) { if (evt == NvFocusEvent.ACT_PRESS) { // then take down the popup... m_myButton.popupFinish(); // and flag that we handled! r = nvuiEventHandledInteract; // but NO reaction... } } return (r | nvuiEventHandled); // while we're up, stay up. } }
[ "mzhg001@sina.com" ]
mzhg001@sina.com
e0814176d59f0f6f5822f76b8927a007778e463b
97b6b04ea5fe1a85da921fc6e8eea5a88c893a14
/src/com/day10/com/til/Test1.java
8f25cfd805fc4fc5a5f9e274abce9d879e80c9b5
[]
no_license
To-chase/JavaPro
a1809b4ea03f80332ac3ea01fb3e2bd0a0cbfd86
6b5efa8d75998207a123c8602369db5d35729129
refs/heads/master
2020-12-11T10:01:28.179800
2020-01-19T08:19:23
2020-01-19T08:19:23
233,815,240
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package com.day10.com.til; public class Test1 { public static void main(String[] args) { String num="23.23456789"; // Handle handle=new Handle(); // handle.HandleString(num); HandleAble handleAble=new HandleAble() { @Override public void HandleString(String num) { System.out.println("原数字:"+num); System.out.println("取整后:"+num.substring(0,num.indexOf("."))); Double d=Double.parseDouble(num); double d1=Math.round(d*10000); double result=d1/10000; System.out.println("四舍五入后:"+result); } }; handleAble.HandleString(num); } }
[ "1174934578@qq.com" ]
1174934578@qq.com
2147f1197c5ef0cd0b3527545348a98b59dc9bd0
1658bea262f4e812082c7ed4b4fcb6ca50d1199d
/src/main/java/ksmdapija/CThostFtdcQryCFMMCBrokerKeyField.java
da2a1e54b6948f36ff15977a869381a1b8e87d0e
[]
no_license
kingstar007/kingstarJA
8d6ed04cedd47cf7fc8ba89d320ceaee06b882d2
d6fa94fcb7ad6634d7b3bfe65df65059a63f6da7
refs/heads/master
2020-12-28T17:24:57.597022
2013-09-11T02:50:30
2013-09-11T02:50:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package ksmdapija; import org.bridj.Pointer; import org.bridj.StructObject; import org.bridj.ann.Array; import org.bridj.ann.Field; import org.bridj.ann.Library; /** * \ufffd\ufffd\u046f\ufffd\ufffd\u05a4\ufffd\ufffd\ufffd\ufffd\u03f5\u0373\ufffd\ufffd\ufffd\u0379\ufffd\u02fe\ufffd\ufffd\u053f<br> * <i>native declaration : kingstarapi/linux/libfiles/KSUserApiStructEx.h:3651</i><br> * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br> * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br> * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> . */ @Library("ksmdapija") public class CThostFtdcQryCFMMCBrokerKeyField extends StructObject { /** * \ufffd\ufffd\ufffd\u0379\ufffd\u02fe\ufffd\ufffd\ufffd\ufffd<br> * C type : TThostFtdcBrokerIDType */ @Array({11}) @Field(0) public Pointer<Byte > BrokerID() { return this.io.getPointerField(this, 0); } public CThostFtdcQryCFMMCBrokerKeyField() { super(); } public CThostFtdcQryCFMMCBrokerKeyField(Pointer pointer) { super(pointer); } }
[ "trade@ubuntu.(none)" ]
trade@ubuntu.(none)
f3e0ba9cf49c307c6f14c936706c8ff167f80a2e
dbad3213f6544564d580932e20dca31c7c1943da
/src/org/apache/catalina/Server.java
6dfa9d02989612306f0e2fba51033413d751005a
[]
no_license
Lyon1994/MyTomcatServerApp
0ef3db59bc3bc0ecdbd35e4d616ca75d082420be
37304fdfa03a7d03f119ae7eaa54f13539021b50
refs/heads/master
2021-01-19T03:19:02.243034
2015-07-28T06:21:44
2015-07-28T06:58:51
39,816,568
1
0
null
null
null
null
UTF-8
Java
false
false
6,323
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.catalina; import java.io.File; import org.apache.catalina.deploy.NamingResourcesImpl; import org.apache.catalina.startup.Catalina; /** * A <code>Server</code> element represents the entire Catalina * servlet container. Its attributes represent the characteristics of * the servlet container as a whole. A <code>Server</code> may contain * one or more <code>Services</code>, and the top level set of naming * resources. * <p> * Normally, an implementation of this interface will also implement * <code>Lifecycle</code>, such that when the <code>start()</code> and * <code>stop()</code> methods are called, all of the defined * <code>Services</code> are also started or stopped. * <p> * In between, the implementation must open a server socket on the port number * specified by the <code>port</code> property. When a connection is accepted, * the first line is read and compared with the specified shutdown command. * If the command matches, shutdown of the server is initiated. * <p> * <strong>NOTE</strong> - The concrete implementation of this class should * register the (singleton) instance with the <code>ServerFactory</code> * class in its constructor(s). * * @author Craig R. McClanahan */ public interface Server extends Lifecycle { // ------------------------------------------------------------- Properties /** * Return the global naming resources. */ public NamingResourcesImpl getGlobalNamingResources(); /** * Set the global naming resources. * * @param globalNamingResources The new global naming resources */ public void setGlobalNamingResources (NamingResourcesImpl globalNamingResources); /** * Return the global naming resources context. */ public javax.naming.Context getGlobalNamingContext(); /** * Return the port number we listen to for shutdown commands. */ public int getPort(); /** * Set the port number we listen to for shutdown commands. * * @param port The new port number */ public void setPort(int port); /** * Return the address on which we listen to for shutdown commands. */ public String getAddress(); /** * Set the address on which we listen to for shutdown commands. * * @param address The new address */ public void setAddress(String address); /** * Return the shutdown command string we are waiting for. */ public String getShutdown(); /** * Set the shutdown command we are waiting for. * * @param shutdown The new shutdown command */ public void setShutdown(String shutdown); /** * Return the parent class loader for this component. If not set, return * {@link #getCatalina()} {@link Catalina#getParentClassLoader()}. If * catalina has not been set, return the system class loader. */ public ClassLoader getParentClassLoader(); /** * Set the parent class loader for this server. * * @param parent The new parent class loader */ public void setParentClassLoader(ClassLoader parent); /** * Return the outer Catalina startup/shutdown component if present. */ public Catalina getCatalina(); /** * Set the outer Catalina startup/shutdown component if present. */ public void setCatalina(Catalina catalina); /** * Obtain the configured base (instance) directory. Note that home and base * may be the same (and are by default). If this is not set the value * returned by {@link #getCatalinaHome()} will be used. */ public File getCatalinaBase(); /** * Set the configured base (instance) directory. Note that home and base * may be the same (and are by default). */ public void setCatalinaBase(File catalinaBase); /** * Obtain the configured home (binary) directory. Note that home and base * may be the same (and are by default). */ public File getCatalinaHome(); /** * Set the configured home (binary) directory. Note that home and base * may be the same (and are by default). */ public void setCatalinaHome(File catalinaHome); // --------------------------------------------------------- Public Methods /** * Add a new Service to the set of defined Services. * * @param service The Service to be added */ public void addService(Service service); /** * Wait until a proper shutdown command is received, then return. */ public void await(); /** * Return the specified Service (if it exists); otherwise return * <code>null</code>. * * @param name Name of the Service to be returned */ public Service findService(String name); /** * Return the set of Services defined within this Server. */ public Service[] findServices(); /** * Remove the specified Service from the set associated from this * Server. * * @param service The Service to be removed */ public void removeService(Service service); /** * Obtain the token necessary for operations on the associated JNDI naming * context. */ public Object getNamingToken(); }
[ "765211630@qq.com" ]
765211630@qq.com
90393e9104dd52263ae49a10aece8be39314133c
24605743dbd29461804c94bccde1c28fe7b57703
/fr/unedic/cali/autresdoms/cohab/sigma/listeressource/dom/Ressource.java
257e2f8f8703a9415a957d3c7a9f1e3be861a449
[]
no_license
foretjerome/ARE
aa00cee993ed3e61c47f246616dc2c6cc3ab8f45
d8e2b5c67ae0370e254742cd5f6fcf50c0257994
refs/heads/master
2020-05-02T15:21:27.784344
2019-03-27T16:58:56
2019-03-27T16:58:56
178,038,731
0
0
null
null
null
null
UTF-8
Java
false
false
2,718
java
package fr.unedic.cali.autresdoms.cohab.sigma.listeressource.dom; import fr.unedic.cali.autresdoms.cohab.sigma.listeressource.dom.spec.RessourceSpec; import fr.unedic.util.QuantiteEuro; import fr.unedic.util.temps.Damj; public class Ressource implements RessourceSpec { private String m_referenceExterne; private String m_codeCertification; private String m_origine; private String m_codeSituationFamiliale; private Damj m_dateEffet; private QuantiteEuro m_montant; private int m_rang; private QuantiteEuro m_ressourcesAllocataire; private QuantiteEuro m_ressourcesConjoint; private Damj m_dateReference; private int m_nombreEnfant; public String getReferenceExterne() { return m_referenceExterne; } public void setReferenceExterne(String p_referenceExterne) { m_referenceExterne = p_referenceExterne; } public String getCodeCertification() { return m_codeCertification; } public String getOrigine() { return m_origine; } public String getCodeSituationFamiliale() { return m_codeSituationFamiliale; } public Damj getDateEffet() { return m_dateEffet; } public QuantiteEuro getMontant() { return m_montant; } public int getRang() { return m_rang; } public QuantiteEuro getRessourcesAllocataire() { return m_ressourcesAllocataire; } public QuantiteEuro getRessourcesConjoint() { return m_ressourcesConjoint; } public void setCodeCertification(String p_code) { m_codeCertification = p_code; } public void setOrigine(String p_origine) { m_origine = p_origine; } public void setCodeSituationFamiliale(String p_code) { m_codeSituationFamiliale = p_code; } public void setDateEffet(Damj p_dateEffet) { m_dateEffet = p_dateEffet; } public void setMontant(QuantiteEuro p_montant) { m_montant = p_montant; } public void setRang(int p_rang) { m_rang = p_rang; } public void setRessourcesAllocataire(QuantiteEuro p_ressourcesAllocataire) { m_ressourcesAllocataire = p_ressourcesAllocataire; } public void setRessourcesConjoint(QuantiteEuro p_ressourcesConjoint) { m_ressourcesConjoint = p_ressourcesConjoint; } public Damj getDateReference() { return m_dateReference; } public void setDateReference(Damj p_reference) { m_dateReference = p_reference.getFinMois(); } public int getNombreEnfant() { return m_nombreEnfant; } public void setNombreEnfant(int p_nombreEnfant) { m_nombreEnfant = p_nombreEnfant; } } /* Location: * Qualified Name: Ressource * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "jerome.foret@codecasesoftware.com" ]
jerome.foret@codecasesoftware.com
4d7af8bb565b7a972491fc71d476ae380b905b39
449cc92656d1f55bd7e58692657cd24792847353
/oms-web/src/main/java/com/lj/oms/msg/MsgWeixinController.java
557f62e9e7b49abc7fd3dd0bebd1a85f72150d89
[]
no_license
cansou/HLM
f80ae1c71d0ce8ead95c00044a318796820a8c1e
69d859700bfc074b5948b6f2c11734ea2e030327
refs/heads/master
2022-08-27T16:40:17.206566
2019-12-18T06:48:10
2019-12-18T06:48:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,874
java
package com.lj.oms.msg; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.lj.oms.common.BaseController; import com.google.common.collect.Lists; import com.lj.base.core.pagination.Page; import com.lj.business.cm.dto.FindMaterialCommen; import com.lj.business.cm.dto.FindMaterialCommenPage; import com.lj.business.cm.dto.FindMaterialCommenPageReturn; import com.lj.business.cm.dto.FindMaterialCommenReturn; import com.lj.business.cm.service.IMaterialCommenService; import com.lj.business.member.dto.FindPmTypePageReturn; import com.lj.business.member.service.IPmTypeService; import com.lj.oms.entity.sys.Office; import com.lj.oms.service.sys.OfficeService; import com.lj.oms.utils.UserUtils; /** * * * 类说明:微信消息Controller * * * <p> * 详细描述: * * @Company: 扬恩科技有限公司 * @author 段志鹏 * * CreateDate: 2017年7月11日 */ @Controller @RequestMapping(value = "${adminPath}/msg/weixin") public class MsgWeixinController extends BaseController{ @Resource //公用素材 private IMaterialCommenService materialcommenService; @Resource //客户分组 private IPmTypeService pmTypeService; /** * 机构服务 */ @Autowired private OfficeService officeService; /** * * * 方法说明:微信已发送列表 * * @param model * @param pageNo * @param pageSize * @return * * @author 段志鹏 CreateDate: 2017年7月14日 * */ @RequestMapping(value={"list", ""}) public String list(Model model,Integer pageNo,Integer pageSize){ return "modules/msg/weixinList"; } /** * * * 方法说明:多维度选择客户发送 * * @param model * @param pageNo * @param pageSize * @return * * @author 段志鹏 CreateDate: 2017年7月14日 * */ @RequestMapping(value="form") public String form(Model model,Integer pageNo,Integer pageSize){ try { //获取公用素材下拉框信息 FindMaterialCommenPage findMaterialCommenPage=new FindMaterialCommenPage(); findMaterialCommenPage.setMerchantNo(UserUtils.getUser().getCompany().getId()); findMaterialCommenPage.setLimit(100); Page<FindMaterialCommenPageReturn> pages = materialcommenService.findMaterialCommenPage(findMaterialCommenPage); List<FindMaterialCommenPageReturn> commenList = Lists.newArrayList(); commenList.addAll(pages.getRows()); model.addAttribute("commenList",commenList); //获取客户分组下拉信息 FindPmTypePageReturn findPmTypePageReturn=new FindPmTypePageReturn(); findPmTypePageReturn.setStatus("Y"); findPmTypePageReturn.setMerchantNo(UserUtils.getUser().getCompany().getId()); List<FindPmTypePageReturn> pmType=pmTypeService.findPmTypePages(findPmTypePageReturn); model.addAttribute("pmType",pmType); } catch (Exception e) { logger.error("",e); } return "modules/msg/weixinForm"; } /** * * * 方法说明:公共素材列表信息 * * @param model * @param pageNo * @param pageSize * @return * * @author 段志鹏 CreateDate: 2017年7月14日 * */ @RequestMapping(value="materialList") @ResponseBody public List<FindMaterialCommenPageReturn> findMaterial(Model model,Integer pageNo,Integer pageSize,FindMaterialCommenPage findMaterialCommenPage){ try { //获取公用素材下拉框信息 findMaterialCommenPage.setMerchantNo(UserUtils.getUser().getCompany().getId()); List<FindMaterialCommenPageReturn> commenList=materialcommenService.findMaterialCommenList(findMaterialCommenPage); return commenList; } catch (Exception e) { logger.error("",e); } return new ArrayList<FindMaterialCommenPageReturn>(); } /** * 公共素材展示 * @param findMaterialCommen * @param model * @return */ @RequestMapping(value="materialShow") @ResponseBody public Map<String,Object> viewH5(FindMaterialCommen findMaterialCommen, Model model) { Map<String,Object> MaterialInfo=new HashMap<String,Object>(); try { if(findMaterialCommen!=null && findMaterialCommen.getCode()!=null){ FindMaterialCommenReturn findMaterialCommenReturn= materialcommenService.findMaterialCommen(findMaterialCommen); MaterialInfo.put("MaterialCommen", findMaterialCommenReturn); if(!findMaterialCommenReturn.getMerchantNo().isEmpty()){ Office company= officeService.get(officeService.get(findMaterialCommenReturn.getMerchantNo())); MaterialInfo.put("company", company); } } } catch (Exception e) { logger.error("",e); } return MaterialInfo; } }
[ "37724558+wo510751575@users.noreply.github.com" ]
37724558+wo510751575@users.noreply.github.com
13440b3cb23becdc9621ad08eb153ce6b7097e06
a6dbc3ed241bb57235301d72a4ebaa70807f2fa5
/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/impl/ConfigurationManagerImpl.java
823155cf4d0e6974003fc287175983e64c090446
[ "Apache-2.0" ]
permissive
taverna-incubator/incubator-taverna-osgi
3677897f191354aca6e021c3740c89907502ff69
c9bb093ac3ea4c32472265a3303b32b40203b58f
refs/heads/master
2021-01-16T19:23:28.774700
2015-02-23T10:05:41
2015-02-23T10:05:41
28,214,391
0
0
null
null
null
null
UTF-8
Java
false
false
4,957
java
/******************************************************************************* * Copyright (C) 2007 The University of Manchester * * Modifications to the initial code base are copyright of their * respective authors, or their employers as appropriate. * * This program 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 program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ******************************************************************************/ package uk.org.taverna.configuration.impl; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Map; import java.util.Properties; import org.apache.log4j.Logger; import uk.org.taverna.configuration.Configurable; import uk.org.taverna.configuration.ConfigurationManager; import uk.org.taverna.configuration.app.ApplicationConfiguration; /** * Handles the configuration for a {@link Configurable} object * * @author Ian Dunlop * @author Stuart Owen */ public class ConfigurationManagerImpl implements ConfigurationManager { private static final Logger logger = Logger.getLogger(ConfigurationManagerImpl.class); private File baseConfigLocation; public ConfigurationManagerImpl(ApplicationConfiguration applicationConfiguration) { File home = applicationConfiguration.getApplicationHomeDir(); File config = new File(home,"conf"); if (!config.exists()) { config.mkdir(); } setBaseConfigLocation(config); } /** * Write out the properties configuration to disk based on the UUID of the * {@link Configurable} * <br> * Default values are not stored within the file, but only those that have been changed or deleted. * * @param configurable * @throws Exception */ @Override public void store(Configurable configurable) throws Exception { try { Map<String, String> propertyMap = configurable.getInternalPropertyMap(); Properties props = new Properties(); for (String key : propertyMap.keySet()) { if (!propertyMap.get(key).equals(configurable.getDefaultProperty(key))) { props.put(key, propertyMap.get(key)); } } File configFile = new File(baseConfigLocation,generateFilename(configurable)); logger.info("Storing configuration for "+configurable.getFilePrefix()+" to "+configFile.getAbsolutePath()); props.store(new FileOutputStream(configFile), ""); } catch (Exception e) { throw new Exception("Configuration storage failed: " + e); } } /** * Loads the configuration details from disk or from memory and populates the provided Configurable * * @param configurable * @return * @throws Exception * if there are no configuration details available */ @Override public void populate(Configurable configurable) throws Exception { try { File configFile = new File(baseConfigLocation,generateFilename(configurable)); if (configFile.exists()) { Properties props = new Properties(); props.load(new FileInputStream(configFile)); configurable.clear(); for (Object key : props.keySet()) { configurable.setProperty(key.toString(), props.getProperty(key.toString())); } } else { logger.info("Config file for "+configurable.getFilePrefix()+" not yet created. Creating with default values."); configurable.restoreDefaults(); store(configurable); } } catch (Exception e) { logger.error("There was a error reading the configuration file for "+configurable.getFilePrefix()+", using defaults",e); configurable.restoreDefaults(); } } protected String generateFilename(Configurable configurable) { return configurable.getFilePrefix()+"-"+configurable.getUUID() + ".config"; } public boolean isBaseLocationSet() { return baseConfigLocation!=null; } /** * Where the config files are being stored * * @return * @throws Exception */ public File getBaseConfigLocation() throws Exception { if (isBaseLocationSet()) { return baseConfigLocation; } else { throw new Exception("Set location first"); } } /** * Where should the config files be stored * * @return * @throws Exception */ public void setBaseConfigLocation(File baseConfigLocation) { // TODO if this is a different place than before then copy all the // config files to this new place this.baseConfigLocation = baseConfigLocation; } }
[ "stain@apache.org" ]
stain@apache.org
76ae92e963534cb52b1285037a6165477527dff0
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
/java/classes/android/support/v7/a/a/a.java
26495bacaf9acf488513617ca54dd6e3b67e7404
[ "Apache-2.0" ]
permissive
Paladin1412/house
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
refs/heads/master
2021-09-17T03:37:48.576781
2018-06-27T12:39:38
2018-06-27T12:41:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,902
java
package android.support.v7.a.a; import android.content.res.ColorStateList; import android.content.res.Resources; import android.content.res.Resources.Theme; import android.content.res.TypedArray; import android.graphics.Color; import android.support.v4.graphics.ColorUtils; import android.support.v7.appcompat.R.attr; import android.support.v7.appcompat.R.styleable; import android.util.AttributeSet; import android.util.StateSet; import android.util.Xml; import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; final class a { private static int a(int paramInt, float paramFloat) { return ColorUtils.setAlphaComponent(paramInt, Math.round(Color.alpha(paramInt) * paramFloat)); } private static ColorStateList a(Resources paramResources, XmlPullParser paramXmlPullParser, AttributeSet paramAttributeSet, Resources.Theme paramTheme) throws XmlPullParserException, IOException { String str = paramXmlPullParser.getName(); if (!str.equals("selector")) { throw new XmlPullParserException(paramXmlPullParser.getPositionDescription() + ": invalid color state list tag " + str); } return b(paramResources, paramXmlPullParser, paramAttributeSet, paramTheme); } private static TypedArray a(Resources paramResources, Resources.Theme paramTheme, AttributeSet paramAttributeSet, int[] paramArrayOfInt) { if (paramTheme == null) { return paramResources.obtainAttributes(paramAttributeSet, paramArrayOfInt); } return paramTheme.obtainStyledAttributes(paramAttributeSet, paramArrayOfInt, 0, 0); } private static ColorStateList b(Resources paramResources, XmlPullParser paramXmlPullParser, AttributeSet paramAttributeSet, Resources.Theme paramTheme) throws XmlPullParserException, IOException { int n = paramXmlPullParser.getDepth() + 1; int[][] arrayOfInt = new int[20][]; int[] arrayOfInt1 = new int[arrayOfInt.length]; int j = 0; int i; int k; do { i = paramXmlPullParser.next(); if (i == 1) { break; } k = paramXmlPullParser.getDepth(); if ((k < n) && (i == 3)) { break; } } while ((i != 2) || (k > n) || (!paramXmlPullParser.getName().equals("item"))); Object localObject = a(paramResources, paramTheme, paramAttributeSet, R.styleable.ColorStateListItem); int i1 = ((TypedArray)localObject).getColor(R.styleable.ColorStateListItem_android_color, -65281); float f = 1.0F; label137: label162: int m; if (((TypedArray)localObject).hasValue(R.styleable.ColorStateListItem_android_alpha)) { f = ((TypedArray)localObject).getFloat(R.styleable.ColorStateListItem_android_alpha, 1.0F); ((TypedArray)localObject).recycle(); i = 0; int i2 = paramAttributeSet.getAttributeCount(); localObject = new int[i2]; k = 0; if (k >= i2) { break label268; } m = paramAttributeSet.getAttributeNameResource(k); if ((m == 16843173) || (m == 16843551) || (m == R.attr.alpha)) { break label372; } if (!paramAttributeSet.getAttributeBooleanValue(k, false)) { break label260; } label213: localObject[i] = m; i += 1; } label260: label268: label372: for (;;) { k += 1; break label162; if (!((TypedArray)localObject).hasValue(R.styleable.ColorStateListItem_alpha)) { break label137; } f = ((TypedArray)localObject).getFloat(R.styleable.ColorStateListItem_alpha, 1.0F); break label137; m = -m; break label213; localObject = StateSet.trimStateSet((int[])localObject, i); i = a(i1, f); if ((j != 0) && (localObject.length == 0)) {} arrayOfInt1 = c.append(arrayOfInt1, j, i); arrayOfInt = (int[][])c.append(arrayOfInt, j, localObject); j += 1; break; paramResources = new int[j]; paramXmlPullParser = new int[j][]; System.arraycopy(arrayOfInt1, 0, paramResources, 0, j); System.arraycopy(arrayOfInt, 0, paramXmlPullParser, 0, j); return new ColorStateList(paramXmlPullParser, paramResources); } } public static ColorStateList createFromXml(Resources paramResources, XmlPullParser paramXmlPullParser, Resources.Theme paramTheme) throws XmlPullParserException, IOException { AttributeSet localAttributeSet = Xml.asAttributeSet(paramXmlPullParser); int i; do { i = paramXmlPullParser.next(); } while ((i != 2) && (i != 1)); if (i != 2) { throw new XmlPullParserException("No start tag found"); } return a(paramResources, paramXmlPullParser, localAttributeSet, paramTheme); } } /* Location: /Users/gaoht/Downloads/zirom/classes-dex2jar.jar!/android/support/v7/a/a/a.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ght163988@autonavi.com" ]
ght163988@autonavi.com
f39d798ed7130d402dcd1687c39aa83035162caa
5f2fb08c46b2acdfe52583cf95925325b36c6820
/skWeiChatBaidu/src/main/java/com/xfyyim/cn/downloader/FailReason.java
76269a29ab21a53da8db815d71da79b9f1f226dc
[]
no_license
309925753/xinfuyouyue
7324fb7062c126156ee350a0e14b8b18bed7afe6
0bc8f8bb387d2203b74af05bfcc6733cde51cda2
refs/heads/master
2022-11-30T23:46:53.082249
2020-05-19T11:48:55
2020-05-19T11:48:55
287,436,362
3
6
null
null
null
null
UTF-8
Java
false
false
944
java
package com.xfyyim.cn.downloader; public class FailReason { private final FailType type; private final Throwable cause; public FailReason(FailType type, Throwable cause) { this.type = type; this.cause = cause; } /** * @return {@linkplain FailType Fail type} */ public FailType getType() { return type; } /** * @return Thrown exception/error, can be <b>null</b> */ public Throwable getCause() { return cause; } /** * Presents type of fail while image loading */ public static enum FailType { /** * Input/output error. Can be caused by network communication fail or * error while caching image on file system. */ IO_ERROR, /* URI为空,不可用 */ URI_EMPTY, /** * Unknown error was occurred while loading image */ UNKNOWN } }
[ "309925753@qq.com" ]
309925753@qq.com
fc9f1c73920dab9107bc6c792504ca98314b5b6f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-422-19-5-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter_ESTest.java
9e00ab91be8ca7e22857fd74099d6ff22a2c275e
[]
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
597
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 17:58:00 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; 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 XHTMLWhitespaceXMLFilter_ESTest extends XHTMLWhitespaceXMLFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
80aa72ff1e922ba3b921cb40e0250ad047f7c483
98a1031e2972ce85b41b54cff4e9f3b787fb16a7
/src/com/br/ott/client/select/controller/AssetLogController.java
8a640c0607f0e88c1aa10a4c98cc660ab854b23a
[]
no_license
LichaoStone/sjhkcms
7905ac9b2b474ec5286e5121f791c1bd713f02b8
8c41339beff80a95c9e6bd1488577f3914c3e208
refs/heads/master
2021-03-07T00:49:49.546427
2020-03-10T07:29:07
2020-03-10T07:29:07
246,234,893
0
0
null
null
null
null
UTF-8
Java
false
false
3,185
java
package com.br.ott.client.select.controller; import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.br.ott.base.BaseController; import com.br.ott.client.common.service.OperaLogService; import com.br.ott.client.select.entity.AssetLog; import com.br.ott.client.select.service.AssetLogsService; import com.br.ott.common.util.Feedback; import com.br.ott.common.util.StringUtil; /** * 文件名:AssetLogController.java * 版权:BoRuiCubeNet. Copyright 2014-2015,All rights reserved * 公司名称:青岛博瑞立方科技有限公司 * 创建人:xiaojxiang * 创建时间:2016-9-12 */ @Controller @RequestMapping(value = "/log") public class AssetLogController extends BaseController{ @Autowired private AssetLogsService assetLogService; @Autowired private OperaLogService operaLogService; private static final String BUSI_NAME = "资产同步日志管理"; @RequestMapping(value = "findAssetLog", method = RequestMethod.GET) public String findAssetLog(HttpServletRequest request, AssetLog assetLog, Model model) { assetLog.setCurrentPage(getPageNo(request)); assetLog.setShowCount(getPageRow(request)); List<AssetLog> list = assetLogService .findAssetLogByPage(assetLog); model.addAttribute("list", list); model.addAttribute("type", assetLog); list = null; return "select/listAssetLog"; } /** * 去资产同步详情页面 * * 创建人:xiaojxiang 创建时间:2016-9-12 * * @param @param request * @param @param model * @param @return * 返回类型:String * @exception throws */ @RequestMapping(value = "toAssetLog", method = RequestMethod.GET) public String toAssetLog(HttpServletRequest request, Model model) { String id = request.getParameter("id"); AssetLog type = new AssetLog(); if (StringUtil.isNotEmpty(id)) { type = assetLogService.getAssetLogById(id); } model.addAttribute("type", type); return "select/assetLogInfo"; } /** * 通过check 选中多个数据删除 * * @param ids * @return */ @RequestMapping(value = "delAssetLog", method = RequestMethod.POST) public @ResponseBody Feedback delAssetLog(@RequestParam("ids") String ids, HttpServletRequest request) { if (StringUtil.isEmpty(ids)) { return Feedback.fail("资产同步日志删除失败,请选择要删除的资产同步日志"); } try { String[] logids = ids.split(","); assetLogService.delAssetLogList(Arrays.asList(logids)); operaLogService.addOperaLog(OPERA_TYPE_DELETE, request, BUSI_NAME, "资产同步日志编号是:" + ids); return Feedback.success("资产同步日志删除成功"); } catch (Exception e) { e.printStackTrace(); return Feedback.fail("资产同步日志删除失败"); } } }
[ "lichao@sdtv.cn" ]
lichao@sdtv.cn
c9cb5f5dc8c9aa2157347286959bf5a4c09ba757
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AnonymousClass35Z.java
c82946f053b9eda04e0028cf87c2884df42e4771
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
580
java
package X; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import com.whatsapp.util.FloatingChildLayout; /* renamed from: X.35Z reason: invalid class name */ public class AnonymousClass35Z extends AnimatorListenerAdapter { public final /* synthetic */ FloatingChildLayout A00; public AnonymousClass35Z(FloatingChildLayout floatingChildLayout) { this.A00 = floatingChildLayout; } public void onAnimationEnd(Animator animator) { super.onAnimationEnd(animator); this.A00.A07.setVisibility(4); } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
a2ff832ef3c06c34cff5c8c50e370882ded82747
13cbb329807224bd736ff0ac38fd731eb6739389
/sun/net/www/HeaderParser.java
e9f64d4d97490d6013451cdd9d317bcdeb553af3
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
5,761
java
package sun.net.www; import java.util.Iterator; public class HeaderParser { String raw; String[][] tab; int nkeys; int asize = 10; public HeaderParser(String paramString) { this.raw = paramString; this.tab = new String[this.asize][2]; parse(); } private HeaderParser() {} public HeaderParser subsequence(int paramInt1, int paramInt2) { if (paramInt1 == 0 && paramInt2 == this.nkeys) return this; if (paramInt1 < 0 || paramInt1 >= paramInt2 || paramInt2 > this.nkeys) throw new IllegalArgumentException("invalid start or end"); HeaderParser headerParser = new HeaderParser(); headerParser.tab = new String[this.asize][2]; headerParser.asize = this.asize; System.arraycopy(this.tab, paramInt1, headerParser.tab, 0, paramInt2 - paramInt1); headerParser.nkeys = paramInt2 - paramInt1; return headerParser; } private void parse() { if (this.raw != null) { this.raw = this.raw.trim(); char[] arrayOfChar = this.raw.toCharArray(); byte b1 = 0; byte b2 = 0; byte b3 = 0; boolean bool1 = true; boolean bool2 = false; int i = arrayOfChar.length; while (b2 < i) { char c = arrayOfChar[b2]; if (c == '=' && !bool2) { this.tab[b3][0] = (new String(arrayOfChar, b1, b2 - b1)).toLowerCase(); bool1 = false; b1 = ++b2; } else if (c == '"') { if (bool2) { this.tab[b3++][1] = new String(arrayOfChar, b1, b2 - b1); bool2 = false; do { } while (++b2 < i && (arrayOfChar[b2] == ' ' || arrayOfChar[b2] == ',')); bool1 = true; b1 = b2; } else { bool2 = true; b1 = ++b2; } } else if (c == ' ' || c == ',') { if (bool2) { b2++; continue; } if (bool1) { this.tab[b3++][0] = (new String(arrayOfChar, b1, b2 - b1)).toLowerCase(); } else { this.tab[b3++][1] = new String(arrayOfChar, b1, b2 - b1); } while (b2 < i && (arrayOfChar[b2] == ' ' || arrayOfChar[b2] == ',')) b2++; bool1 = true; b1 = b2; } else { b2++; } if (b3 == this.asize) { this.asize *= 2; String[][] arrayOfString = new String[this.asize][2]; System.arraycopy(this.tab, 0, arrayOfString, 0, this.tab.length); this.tab = arrayOfString; } } if (--b2 > b1) { if (!bool1) { if (arrayOfChar[b2] == '"') { this.tab[b3++][1] = new String(arrayOfChar, b1, b2 - b1); } else { this.tab[b3++][1] = new String(arrayOfChar, b1, b2 - b1 + 1); } } else { this.tab[b3++][0] = (new String(arrayOfChar, b1, b2 - b1 + 1)).toLowerCase(); } } else if (b2 == b1) { if (!bool1) { if (arrayOfChar[b2] == '"') { this.tab[b3++][1] = String.valueOf(arrayOfChar[b2 - 1]); } else { this.tab[b3++][1] = String.valueOf(arrayOfChar[b2]); } } else { this.tab[b3++][0] = String.valueOf(arrayOfChar[b2]).toLowerCase(); } } this.nkeys = b3; } } public String findKey(int paramInt) { return (paramInt < 0 || paramInt > this.asize) ? null : this.tab[paramInt][0]; } public String findValue(int paramInt) { return (paramInt < 0 || paramInt > this.asize) ? null : this.tab[paramInt][1]; } public String findValue(String paramString) { return findValue(paramString, null); } public String findValue(String paramString1, String paramString2) { if (paramString1 == null) return paramString2; paramString1 = paramString1.toLowerCase(); for (byte b = 0; b < this.asize; b++) { if (this.tab[b][false] == null) return paramString2; if (paramString1.equals(this.tab[b][0])) return this.tab[b][1]; } return paramString2; } public Iterator<String> keys() { return new ParserIterator(false); } public Iterator<String> values() { return new ParserIterator(true); } public String toString() { Iterator iterator = keys(); StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("{size=" + this.asize + " nkeys=" + this.nkeys + " "); for (byte b = 0; iterator.hasNext(); b++) { String str1 = (String)iterator.next(); String str2 = findValue(b); if (str2 != null && "".equals(str2)) str2 = null; stringBuffer.append(" {" + str1 + ((str2 == null) ? "" : ("," + str2)) + "}"); if (iterator.hasNext()) stringBuffer.append(","); } stringBuffer.append(" }"); return new String(stringBuffer); } public int findInt(String paramString, int paramInt) { try { return Integer.parseInt(findValue(paramString, String.valueOf(paramInt))); } catch (Throwable throwable) { return paramInt; } } class ParserIterator extends Object implements Iterator<String> { int index; boolean returnsValue; ParserIterator(boolean param1Boolean) { this.returnsValue = param1Boolean; } public boolean hasNext() { return (this.index < HeaderParser.this.nkeys); } public String next() { return HeaderParser.this.tab[this.index++][this.returnsValue ? 1 : 0]; } public void remove() { throw new UnsupportedOperationException("remove not supported"); } } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\sun\net\www\HeaderParser.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
edd6e4f1c4184a0b19da1336d282db8ee5eb34da
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/platform/ext/platformservices/src/de/hybris/platform/catalog/dynamic/CompanyContactAddressesAttributeHandler.java
19496109aae67a701d3194403099c556d6a48058
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
970
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.catalog.dynamic; import de.hybris.platform.core.model.user.AddressModel; import java.util.Collection; import java.util.Iterator; public class CompanyContactAddressesAttributeHandler extends AbstractCompanyAddressAttributeHandler { @Override public void filterOutAddresses(final Collection<AddressModel> addresses) { for (final Iterator<AddressModel> it = addresses.iterator(); it.hasNext(); ) { final AddressModel address = it.next(); if (address.getContactAddress() == null || !address.getContactAddress()) { it.remove(); } } } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
0192d2482add2aa6fc8cc76b4275dbf28e331991
30b712de555f6e2780503c32f705c902bf1e8e56
/src/test/java/com/ealanta/SendRabbitMessageTest.java
b20e9d422b26fe9585f3827ca75c20b01474ddc6
[]
no_license
davidhay/spring-rabbit
2aeda943d12b5549484e9bfc63cb6a8dbb2d282e
bb42d156e8c62e5ef5c4809f8aa4540f7d648837
refs/heads/master
2021-06-21T21:00:56.700347
2019-10-01T07:55:56
2019-10-01T07:55:56
210,931,800
0
0
null
null
null
null
UTF-8
Java
false
false
1,116
java
package com.ealanta; import java.nio.charset.StandardCharsets; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.amqp.core.Message; import org.springframework.amqp.core.MessageProperties; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.ealanta.rabbit.RabbitInfo; @RunWith(SpringRunner.class) @SpringBootTest @Ignore public class SendRabbitMessageTest { @Autowired private RabbitTemplate template; @Test public void testSendMessage() { DateTimeFormatter fmt = DateTimeFormatter.ISO_DATE_TIME; LocalDateTime now = LocalDateTime.now(); String time = fmt.format(now); MessageProperties props = new MessageProperties(); Message message = new Message(time.getBytes(StandardCharsets.UTF_8), props); template.send(RabbitInfo.QUEUE_TEST_1, message); } }
[ "david.j.hay@gmail.com" ]
david.j.hay@gmail.com
2af5ee3115746044bfb1b0c17d23fe387e75e4e1
56700a696d604f674f78e9ec8cb590101312a225
/src/test/java/com/edu/recipies/converters/toCommands/IngredientToCommandTest.java
a0b68f4fd302c63de97eaa0cd9efb9db2ee2b1ad
[]
no_license
KostNik/spring5-edu-recipe-app
af05cf80a652ed99d799491c3843615af993cb98
8674d85b1bca00e1e538a6b60c179cd4dbc5ab13
refs/heads/master
2021-09-05T03:42:37.623724
2018-01-17T02:16:15
2018-01-17T02:16:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package com.edu.recipies.converters.toCommands; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class IngredientToCommandTest { @Before public void setUp() throws Exception { } @Test public void convert() { } }
[ "kost.nik88@gmail.com" ]
kost.nik88@gmail.com
47d590555d340737162699beb8b2d0d57d03105d
7a9c01bbee5d314a2d97bfb2aef67fcb4accc11d
/com/igexin/push/core/p044c/C0454p.java
606bccf8dc696a6ce58fe08c4c915bacf305fcaa
[]
no_license
Kainanchen/Sangokushi
72c9ec0aa654e95bc3622a8a3d758eedfc32276e
80fdb55c92776690b9b02aa0a6fba3dc7790025e
refs/heads/master
2021-01-13T01:17:35.153817
2017-03-14T22:01:10
2017-03-14T22:01:10
82,147,818
0
1
null
null
null
null
UTF-8
Java
false
false
466
java
package com.igexin.push.core.p044c; import com.igexin.push.core.C0483g; import com.igexin.push.p039b.C0343d; import com.igexin.push.p052f.C0515d; /* renamed from: com.igexin.push.core.c.p */ class C0454p extends C0343d { final /* synthetic */ C0444f f1218a; C0454p(C0444f c0444f) { this.f1218a = c0444f; } public void m1619a() { C0444f.m1577a().m1579a(this.c, 19, C0515d.m1857a(String.valueOf(C0483g.f1338x).getBytes())); } }
[ "kainan.chen.cn@gmail.com" ]
kainan.chen.cn@gmail.com
dc830a9a30365d9e69e73cb272218acf60c408ba
ebff4108ace2fcbfbd2bc3dea924f8da88654149
/app/src/main/java/douya/network/api/info/frodo/BroadcastLikerList.java
99c3e319720f1b5aa1531f37d640b0e93a7fda2d
[]
no_license
447857062/client_douban
9b046512a84bee48b343f77ff3d214c672450888
4e0b677e3e6e5cee8d2922e0cdf67d6129276351
refs/heads/master
2020-03-19T06:01:10.211955
2018-06-14T01:47:54
2018-06-14T01:47:54
135,983,473
1
0
null
null
null
null
UTF-8
Java
false
false
1,198
java
/* * Copyright (c) 2017 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> * All Rights Reserved. */ package douya.network.api.info.frodo; import android.os.Parcel; import java.util.ArrayList; public class BroadcastLikerList extends BaseList<SimpleUser> { public ArrayList<SimpleUser> likers = new ArrayList<>(); @Override public ArrayList<SimpleUser> getList() { return likers; } public static final Creator<BroadcastLikerList> CREATOR = new Creator<BroadcastLikerList>() { @Override public BroadcastLikerList createFromParcel(Parcel source) { return new BroadcastLikerList(source); } @Override public BroadcastLikerList[] newArray(int size) { return new BroadcastLikerList[size]; } }; public BroadcastLikerList() {} protected BroadcastLikerList(Parcel in) { super(in); likers = in.createTypedArrayList(SimpleUser.CREATOR); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeTypedList(likers); } }
[ "447857062@qq.com" ]
447857062@qq.com
3a2ad892faac00d3bda918f0cc35961f6c22bfde
f119e34262f653ce45d495d3d91e6d3d87f5c955
/src/main/java/com/board/notification/model/dto/GroupNotificationSearchDTO.java
8981e1f033b7ea9434ad0f3f8b77a06ea5d7b4cc
[]
no_license
rachapalli/notification-board
1f711383b9e0d0e39de242faa0d718413d39cbee
1d7197d0e0b028f037330b39640cd28275d7c533
refs/heads/main
2023-03-04T18:27:05.819294
2021-02-13T04:41:37
2021-02-13T04:41:37
301,483,535
0
0
null
2021-02-13T04:41:38
2020-10-05T17:13:17
Java
UTF-8
Java
false
false
1,005
java
package com.board.notification.model.dto; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; import com.board.notification.model.NotificationType; public class GroupNotificationSearchDTO { @Email(regexp = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$", message = "Invalid email") @NotBlank(message = "email cannot be null or empty") private String email; private NotificationType notificationType; private String groupName; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public NotificationType getNotificationType() { return notificationType; } public void setNotificationType(NotificationType notificationType) { this.notificationType = notificationType; } public String getGroupName() { return groupName; } public void setGroupName(String groupName) { this.groupName = groupName; } }
[ "s" ]
s
0d1e6b20ee1cc9c81091daf8d93a0bf925ada8c3
f30d49642d0aacbab53177a4617ebbb5f33d8c94
/src/net/frapu/code/visualization/petrinets/TimeConsumer.java
506bcbc049b5b1c0ab7c7a772ffd658146fffc38
[ "Apache-2.0" ]
permissive
frapu78/processeditor
393892ab855ff4dbc83cc320279315a1c2789a8c
2e317a17308f5958d35c2b7cecb3e86d06a1b9c1
refs/heads/master
2023-08-09T23:26:22.035014
2023-07-24T16:06:11
2023-07-24T16:06:11
20,647,096
5
6
null
2015-03-24T16:31:59
2014-06-09T13:18:37
Java
UTF-8
Java
false
false
642
java
/** * * Process Editor - Petri net Package * * (C) 2008,2009 Frank Puhlmann * * http://frapu.net * */ package net.frapu.code.visualization.petrinets; /** * * This interface might be implemented by nodes that consume time. It is * called by different time sources to update the node. * * @author fpu */ public interface TimeConsumer { /** * Adds one time unit to the current time. */ public void addTick(); /** * Adds ticks ticks to the current time. * @param ticks */ public void addTicks(int ticks); /** * Resets the ticks to zero. */ public void resetTicks(); }
[ "frank@frapu.de" ]
frank@frapu.de