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
55cbe51365085ac5b1ad3df5e0f0db2b4c1c6c06
20b4db62248a41c7d8164b7d8b5a52e3eaaf686a
/server-data-order/src/main/java/com/serverdata/order/serverdataorder/repository/ShopOrderRepository.java
52a4235fe16d53371f55916e4030ad7b98338ef1
[]
no_license
black-ant/antsystem
a521d5a4e18cd99ca8c9856eb60364cacb8e6682
ef16e9749317d5cf4a490cc7be2483137a8bd89d
refs/heads/master
2020-04-15T02:22:22.672645
2019-04-23T15:00:18
2019-04-23T15:00:18
164,312,282
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.serverdata.order.serverdataorder.repository; import com.serverdata.order.serverdataorder.Entity.ShopOrder; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * @author 10169 * @Description TODO * @Date 2019/1/28 23:09 * @Version 1.0 **/ @Repository public interface ShopOrderRepository extends JpaRepository<ShopOrder,Long> { ShopOrderRepository findByOrderid(String orderid); }
[ "1016930479@qq.com" ]
1016930479@qq.com
74d3131e54b0352fb6b546a87a685ad6dc88ced2
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/wenote/ui/nativenote/b/k.java
cce0883cc463def2a34632dca7c6cbd514828563
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,207
java
package com.tencent.mm.plugin.wenote.ui.nativenote.b; import android.view.View; import android.widget.LinearLayout.LayoutParams; import com.tencent.mm.R; import com.tencent.mm.plugin.wenote.model.a.b; import com.tencent.mm.plugin.wenote.model.a.h; import com.tencent.mm.plugin.wenote.model.nativenote.manager.WXRTEditText; import com.tencent.mm.plugin.wenote.model.nativenote.manager.c; import com.tencent.mm.pluginsdk.ui.d.j; import com.tencent.mm.sdk.platformtools.ah; import com.tencent.mm.sdk.platformtools.x; public final class k extends a { private WXRTEditText qvK; public k(View view, com.tencent.mm.plugin.wenote.model.nativenote.manager.k kVar) { super(view, kVar); this.qvK = (WXRTEditText) view.findViewById(R.h.rte_text); if (!(kVar.qrC == 2 && this.qtF.qrD)) { this.qvK.setKeyListener(null); this.qvK.setFocusable(false); this.qvK.setClickable(true); } this.qvK.qqL = this; this.qvK.setEditTextType(0); this.qtF.o(this.qvK); this.qvK.getViewTreeObserver().addOnGlobalLayoutListener(new 1(this)); } public final void a(b bVar, int i, int i2) { LayoutParams layoutParams; this.qvK.setPosInDataList(i); h hVar = (h) bVar; hVar.qoM = this.qvK; hVar.qoK = null; hVar.qoL = null; b Bv = c.bZD().Bv(i - 1); if (Bv != null && Bv.getType() == 1) { layoutParams = (LayoutParams) this.qvK.getLayoutParams(); layoutParams.topMargin = 0; this.qvK.setLayoutParams(layoutParams); } Bv = c.bZD().Bv(i + 1); if (Bv != null && Bv.getType() == 1) { layoutParams = (LayoutParams) this.qvK.getLayoutParams(); layoutParams.bottomMargin = 0; this.qvK.setLayoutParams(layoutParams); } if (this.qtF.qrC == 2 && this.qtF.qrD) { ah.A(new 2(this, hVar)); } else { this.qvK.setRichTextEditing(hVar.content); j.g(this.qvK); } x.i("MicroMsg.Note.NoteTextItemHolder", "TextItemHolder position is " + gl()); } public final int caZ() { return 1; } }
[ "707194831@qq.com" ]
707194831@qq.com
5f49fe5b9b2ce73c139d34036dde3060e91d670c
a915d83d3088d355d90ba03e5b4df4987bf20a2a
/src/Applications/jetty/websocket/api/io/WebSocketBlockingConnection.java
a1551e695a4800deb79efee7b68bf49653f2be17
[]
no_license
worldeditor/Aegean
164c74d961185231d8b40dbbb6f8b88dcd978d79
33a2c651e826561e685fb84c1e3848c44d2ac79f
refs/heads/master
2022-02-15T15:34:02.074428
2019-08-21T03:52:48
2019-08-21T15:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,811
java
// // ======================================================================== // Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // and Apache License v2.0 which accompanies this distribution. // // The Eclipse Public License is available at // http://www.eclipse.org/legal/epl-v10.html // // The Apache License v2.0 is available at // http://www.opensource.org/licenses/apache2.0.php // // You may elect to redistribute this code under either of these licenses. // ======================================================================== // package Applications.jetty.websocket.api.io; import Applications.jetty.websocket.api.RemoteEndpoint; import Applications.jetty.websocket.api.Session; import java.io.IOException; import java.nio.ByteBuffer; /** * For working with the {@link Session} in a blocking technique. * <p> * This is an end-user accessible class. */ public class WebSocketBlockingConnection { private final RemoteEndpoint remote; public WebSocketBlockingConnection(Session session) { this.remote = session.getRemote(); } /** * Send a binary message. * <p> * Basic usage, results in a blocking write. */ public void write(byte[] data, int offset, int length) throws IOException { ByteBuffer buf = ByteBuffer.wrap(data, offset, length); remote.sendBytes(buf); } /** * Send text message. * <p> * Basic usage, results in a blocking write. */ public void write(String message) throws IOException { remote.sendString(message); } }
[ "remzican_aksoy@apple.com" ]
remzican_aksoy@apple.com
90155ed7bcc915a47afabf7213421bc84d5c5595
a6744f48b9c7e0bd19b11e46741bdc198de236fc
/1-core-module/spring-java-config/src/com/martimlima/springcourse/coremodule/javaconfig/SportConfig.java
347acf7c2003cec3191744b509a927ec46f98921
[]
no_license
martimdLima/spring-and-hibernate-course
887d6282845d73bc224b9c7556af61d8b03e0f94
f0a1287c347a54843c873952e8259b0753d6f7e3
refs/heads/main
2022-12-31T11:55:57.605932
2020-10-14T21:05:02
2020-10-14T21:05:02
303,544,909
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
package com.martimlima.springcourse.coremodule.javaconfig; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @Configuration @ComponentScan("com.mdlima.springdemo") public class SportConfig {}
[ "martim.d.lima@protonmail.com" ]
martim.d.lima@protonmail.com
6edb8f57af4a6c28861a81a61990629edb51caff
abee3a4de8b376f0f08a2a599a81c24eeb23d8bc
/src/generator/spring-boot/project/crud/crud/src/main/java/com/jasmine/crud/pojo/req/UpdateBackendConfigReq.java
544df3d5c15de930e2bb1b5adc4c164148c598da
[]
no_license
anlei-fu/code-generator
bf261246b26f5edca9aedf653c1b863f43636925
4fc092b0c24964df8e0a08fa920bffaaaf245d2a
refs/heads/master
2021-08-03T09:17:50.409263
2021-07-18T00:18:12
2021-07-18T00:18:12
210,876,449
1
0
null
2020-01-22T01:31:20
2019-09-25T15:16:33
PLSQL
UTF-8
Java
false
false
815
java
/*---------------------------------------------------------------------------- * Jasmine code generator, a tool to build web crud application,with spring- * boot, mybatis, mysql,swagger,spring-security. * Generated at 6/9/2021, 6:11:52 PM * All rights reserved by fal(email:767550758@qq.com) since 2019 *---------------------------------------------------------------------------*/ package com.jasmine.crud.pojo.req; import lombok.Getter; import lombok.Setter; import javax.validation.constraints.NotNull; /** * */ @Getter @Setter public class UpdateBackendConfigReq { /** * */ @NotNull private Integer id; /** * */ @NotNull private Integer projectId; /** * */ private String content; }
[ "767550758@qq.com" ]
767550758@qq.com
5045a07936d6306d766355c3291aecad1367c153
238120a6429b231c7480ed02c2f65f42291bedb9
/java/src/com/st809/interview/graphs/weigheddigraph/AcylicShortestPath.java
30e05cdf4b52575c1552409c7ff3335685b9468d
[]
no_license
sarahtattersall/InterviewRevision
4df63c0c04a5576813e04c53e267a32b0beac8f9
4a9df4f1e7228a82e7296745504e966f0718f40b
refs/heads/master
2021-05-27T12:13:47.248489
2014-05-17T14:22:25
2014-05-17T14:22:25
12,517,703
1
0
null
null
null
null
UTF-8
Java
false
false
2,509
java
package com.st809.interview.graphs.weigheddigraph; import com.st809.interview.graphs.directed.TopologicalOrder; import com.st809.interview.graphs.weighted.DistanceToVertex; import java.util.ArrayDeque; import java.util.Collection; import java.util.Deque; /** * Computes shortest path in linear time (E + V) if the graph is acyclic * It is therefore preferred to Dijkstra where possible */ public class AcylicShortestPath implements ShortestPath { private DirectedEdge[] edgeTo; private double[] distTo; /** * Computes the shortest path by taking advantage of visiting the nodes in * topological order. Uses the fact that once visited it is not possible to get * back to the node and so we have found the nodes shortest path */ public AcylicShortestPath(EdgeWeightedDigraph g, int source) { edgeTo = new DirectedEdge[g.V()]; distTo = new double[g.V()]; for (int v = 0; v < g.V(); v++) { distTo[v] = Double.POSITIVE_INFINITY; } distTo[source] = 0; Topological top = new Topological(g); for (int v : top.getOrder()) { relax(g, v); } } /** * Edge relaxation * <p/> * To relax an edge v->w means to test if the best know way * from the source to w is to go from the source to v and then take the edge from v to w. * If it is we update the data structures to indicate it to be the best case */ private void relax(DirectedEdge edge) { int v = edge.from(); int w = edge.to(); if (distTo[w] > distTo[v] + edge.weight()) { distTo[w] = distTo[v] + edge.weight(); edgeTo[w] = edge; } } /** * Vertex relaxation * * @param g * @param v */ private void relax(EdgeWeightedDigraph g, int v) { for (DirectedEdge e : g.adj(v)) { relax(e); } } public double distanceTo(int v) { return distTo[v]; } public boolean hasPathTo(int v) { return distTo[v] < Double.POSITIVE_INFINITY; } /** * @param v * @return empty list if no path, else the path in order to v */ public Collection<DirectedEdge> pathTo(int v) { Deque<DirectedEdge> path = new ArrayDeque<>(); if (hasPathTo(v)) { for (DirectedEdge edge = edgeTo[v]; edge != null; edge = edgeTo[edge.from()]) { path.push(edge); } } return path; } }
[ "sarah.tattersall09@imperial.ac.uk" ]
sarah.tattersall09@imperial.ac.uk
16a74fdcd77b3f3a9ce0eb950240cf588a5ce4cf
7c83b3cf100af54fc1aa9b82b9367f9a58696372
/src/main/java/org/lanternpowered/api/script/function/condition/ConditionTypes.java
18667276ed5f0530b7476929d3c8c19b47d776ee
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
GustaveHooghmoed/LanternServer
c971eb284fdc18554f4aceefef47f40f116e4f14
61b3d181e87d571bcea01fbab8093a0a718578f8
refs/heads/master
2021-05-14T14:29:46.643758
2017-09-21T13:15:46
2017-12-30T14:10:59
115,972,253
1
0
null
2018-01-02T03:48:32
2018-01-02T03:48:32
null
UTF-8
Java
false
false
1,727
java
/* * This file is part of LanternServer, licensed under the MIT License (MIT). * * Copyright (c) LanternPowered <https://www.lanternpowered.org> * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * 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 org.lanternpowered.api.script.function.condition; import org.spongepowered.api.util.generator.dummy.DummyObjectProvider; public final class ConditionTypes { public static final ConditionType AND = DummyObjectProvider.createFor(ConditionType.class, "AND"); public static final ConditionType OR = DummyObjectProvider.createFor(ConditionType.class, "OR"); private ConditionTypes() { } }
[ "seppevolkaerts@hotmail.com" ]
seppevolkaerts@hotmail.com
c63946450615724195a960333aca889525743353
753458bb1ef870387666f338449521c2985d8f0a
/src-launcher/hu/sllauncher/service/registration/RegManager.java
b874be9391c7e5dad67679403b6e69d7d77886fb
[ "Apache-2.0" ]
permissive
icza/scelight
f4f7099404077f994aa9c4738a0d38a6b29fe702
7360c30765c9bc2f25b069da4377b37e47d4b426
refs/heads/master
2022-08-23T09:15:32.451515
2022-08-12T13:35:16
2022-08-12T13:35:16
51,061,294
128
23
Apache-2.0
2023-09-12T20:20:51
2016-02-04T08:04:52
Java
UTF-8
Java
false
false
5,013
java
/* * Project Scelight * * Copyright (c) 2013 Andras Belicza <iczaaa@gmail.com> * * This software is the property of Andras Belicza. * Copying, modifying, distributing, refactoring without the author's permission * is prohibited and protected by Law. */ package hu.sllauncher.service.registration; import hu.sllauncher.bean.reginfo.RegInfoBean; import hu.sllauncher.service.env.LEnv; import hu.sllauncher.util.LUtils; import hu.sllauncher.util.secure.DecryptUtil; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.Calendar; import java.util.Date; import java.util.zip.InflaterInputStream; import javax.xml.bind.JAXB; /** * Registration manager. * * @author Andras Belicza */ public class RegManager { /** Magic word of the registration files (<code>"SLREG"</code>). */ private static final byte[] REG_FILE_MAGIC = new byte[] { 'S', 'L', 'R', 'E', 'G' }; /** Handled registration file version. */ private static final byte[] REG_FILE_VERSION = new byte[] { 0, 1 }; /** Bytes of accepted / valid key selector. */ private static final byte[] KEY_SELECTOR = new byte[] { (byte) ( DecryptUtil.CURRENT_KEY_SELECTOR >> 8 ), (byte) DecryptUtil.CURRENT_KEY_SELECTOR }; /** Registration file path. */ public static final Path PATH_REGISTRATION_FILE = LEnv.PATH_WORKSPACE.resolve( "reginfo.slreg" ); /** Expiration time of the registration file in months (calculated from the reg file encryption date). */ public static final int REG_FILE_EXPIRATION_MONTHS = 6; /** Registration status. */ public final RegStatus regStatus; /** Loaded registration info. */ private final RegInfoBean regInfo; /** * Creates a new {@link RegManager}. */ public RegManager() { // Check registration file if ( !Files.exists( PATH_REGISTRATION_FILE ) ) { regStatus = RegStatus.NOT_FOUND; LEnv.LOGGER.debug( "No registration file found." ); regInfo = null; return; } // Load registration info RegInfoBean regInfo_; try { final byte[] regInfoEncData = Files.readAllBytes( PATH_REGISTRATION_FILE ); // "reginfo.xml.deflated.enc" int offset = 0; // Check magic for ( int i = 0; i < REG_FILE_MAGIC.length; i++, offset++ ) if ( REG_FILE_MAGIC[ i ] != regInfoEncData[ offset ] ) throw new RuntimeException( "Invalid magic word!" ); // Check version for ( int i = 0; i < REG_FILE_VERSION.length; i++, offset++ ) if ( REG_FILE_VERSION[ i ] != regInfoEncData[ offset ] ) throw new RuntimeException( "Invalid or unsupported version!" ); // Check key selector for ( int i = 0; i < KEY_SELECTOR.length; i++, offset++ ) if ( KEY_SELECTOR[ i ] != regInfoEncData[ offset ] ) throw new RuntimeException( "Invalid or unsupported key selector!" ); // We're cool, decrypt... final byte[] regInfodeflatedXmlData = DecryptUtil.decrypt( regInfoEncData, offset, regInfoEncData.length - offset ); // "reginfo.xml.deflated" if ( regInfodeflatedXmlData == null ) throw new Exception( "Failed to decrypt registration file!" ); // ...and inflate try ( final InputStream in = new InflaterInputStream( new ByteArrayInputStream( regInfodeflatedXmlData ) ) ) { regInfo_ = JAXB.unmarshal( in, RegInfoBean.class ); // "reginfo.xml" } if ( LEnv.LOGGER.testDebug() ) LEnv.LOGGER.debug( "Registration info loaded (registered to: " + regInfo_.getPerson().getPersonName() + ")." ); if ( LEnv.LOGGER.testTrace() ) LEnv.LOGGER.trace( "Registration info: " + regInfo_.toString() ); } catch ( final Exception e ) { regStatus = RegStatus.INVALID; LEnv.LOGGER.error( "Invalid or corrupt registration file: " + PATH_REGISTRATION_FILE, e ); regInfo = null; return; } regInfo = regInfo_; // Check expiration final Calendar expCal = Calendar.getInstance(); expCal.setTime( regInfo.getEncryptionDate() ); expCal.add( Calendar.MONTH, REG_FILE_EXPIRATION_MONTHS ); if ( new Date().after( expCal.getTime() ) ) { regStatus = RegStatus.EXPIRED; LEnv.LOGGER.warning( "Registration file has expired!" ); return; } // Quick check if registered system info matches current system info if ( !LUtils.getSysInfo().matches( regInfo.getSysInfo() ) ) { regStatus = RegStatus.SYSINFO_MISMATCH; LEnv.LOGGER.warning( "Registration info mismatch: your system info does not match the registered system info!" ); return; } regStatus = RegStatus.MATCH; } /** * @return the loaded registration info */ public RegInfoBean getRegInfo() { return regInfo; } /** * Returns if registration is OK. * * @return if registration is OK. */ public boolean isOk() { return regStatus == RegStatus.MATCH; } }
[ "iczaaa@gmail.com" ]
iczaaa@gmail.com
6aaad5d5792242d314bbd2125084aa858200f4fb
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/TIME-7b-3-28-NSGA_II-WeightedSum:TestLen:CallDiversity/org/joda/time/format/DateTimeParserBucket$SavedField_ESTest.java
e871d320024596563c0703e4690603d344d2ff15
[]
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
1,132
java
/* * This file was automatically generated by EvoSuite * Sun Jan 19 04:27:49 UTC 2020 */ package org.joda.time.format; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.joda.time.DateTimeField; import org.joda.time.chrono.BuddhistChronology; import org.joda.time.format.DateTimeParserBucket; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DateTimeParserBucket$SavedField_ESTest extends DateTimeParserBucket$SavedField_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { BuddhistChronology buddhistChronology0 = BuddhistChronology.getInstance(); DateTimeField dateTimeField0 = buddhistChronology0.dayOfYear(); DateTimeParserBucket.SavedField dateTimeParserBucket_SavedField0 = new DateTimeParserBucket.SavedField(dateTimeField0, 12740629); // Undeclared exception! dateTimeParserBucket_SavedField0.set(12740629, true); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b0e5c88e72cbbf0709cbfb542549b1aa7ed8d437
8c81eeaa4bde7c4f9e402c1647940de5deb146fc
/src/RemoveDuplicates.java
f56ae92324b91ab415d49aba2ad5536add710c2b
[]
no_license
Luciwar/Example
f4b51b53eef6189ba18ea7714f5ee38be4287864
15b5d4d48e930d75597555b1c9c128b8501812f4
refs/heads/master
2020-06-04T23:41:07.098593
2018-10-11T15:31:24
2018-10-11T15:31:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
874
java
/* Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. Given nums = [1,1,2], Your function should return length = 2, with the first two elements of nums being 1 and 2 respectively. It doesn't matter what you leave beyond the returned length. */ class RemoveDuplicates { public int removeDuplicates(int[] nums) { if(nums.length == 0){ return 0; } if(nums.length == 1){ return 1; } int index = 1; for(int i=1; i<nums.length; i++){ if(nums[i]!=nums[i-1]){ nums[index] = nums[i]; index++; } } return index; } }
[ "linhhoang13k@gmail.com" ]
linhhoang13k@gmail.com
f970839a3f0797d42d7222673634d50f869585ad
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/72_battlecry-bcry.bcModule-0.5-6/bcry/bcModule_ESTest_scaffolding.java
0b0e1f43a11664eee5f4f3c5de085596d1727bcb
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 14:17:30 GMT 2019 */ package bcry; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class bcModule_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
f2e6486f96ffff15a9e493ea1bf11068ec6b39fb
2d75e0d9ea18e271222a6c22763b2cdb2b2ddab9
/winder-core/src/main/java/org/ebayopensource/winder/quartz/WinderJDBCDelegate.java
590c4476fa53af852d5f682afd856e19e28755dd
[ "MIT" ]
permissive
shaoxt/Winder
40fbc01afff80e73eee0a615d2890ca9b0c9edb0
9708fcb79cdabb3fc57ed2dccba29ed9fd74f701
refs/heads/master
2020-04-01T03:12:07.670281
2019-01-14T18:20:00
2019-01-14T18:20:00
152,813,348
0
0
NOASSERTION
2018-10-12T22:21:12
2018-10-12T22:21:12
null
UTF-8
Java
false
false
5,111
java
/** * Copyright (c) 2016 eBay Software Foundation. All rights reserved. * <p> * Licensed under the MIT license. * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * <p> * 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: * <p> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p> * 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 org.ebayopensource.winder.quartz; import org.ebayopensource.winder.JobId; import org.ebayopensource.winder.WinderEngine; import org.quartz.Job; import org.quartz.JobDataMap; import org.quartz.JobDetail; import org.quartz.JobKey; import org.quartz.impl.JobDetailImpl; import org.quartz.impl.jdbcjobstore.StdJDBCDelegate; import org.quartz.spi.ClassLoadHelper; import java.io.IOException; import java.io.InputStream; import java.sql.*; import java.util.Map; import java.util.Properties; /** * Winder JDBC Delegate * * Winder has one more field than standard quartz, it categorizes job details. * So we have to store the jobCategory in db as well. * * @author Sheldon Shao xshao@ebay.com on 3/19/17. * @version 1.0 */ public class WinderJDBCDelegate extends StdJDBCDelegate { private WinderEngine engine = QuartzEngine.getInstance(); static final String COL_JOB_CREATED = "JOB_CREATED"; /** * <p> * Select the JobDetail object for a given job name / group name. * </p> * * @param conn * the DB Connection * @return the populated JobDetail object * @throws ClassNotFoundException * if a class found during deserialization cannot be found or if * the job class could not be found * @throws IOException * if deserialization causes an error */ public JobDetail selectJobDetail(Connection conn, JobKey jobKey, ClassLoadHelper loadHelper) throws ClassNotFoundException, IOException, SQLException { PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.prepareStatement(rtp(SELECT_JOB_DETAIL)); ps.setString(1, jobKey.getName()); ps.setString(2, jobKey.getGroup()); rs = ps.executeQuery(); JobDetailImpl job = null; QuartzJobDetail winderJobDetails = null; if (rs.next()) { job = new JobDetailImpl(); String jobName = rs.getString(COL_JOB_NAME); String groupName = rs.getString(COL_JOB_GROUP); job.setName(jobName); job.setGroup(groupName); job.setDescription(rs.getString(COL_DESCRIPTION)); job.setJobClass( loadHelper.loadClass(rs.getString(COL_JOB_CLASS), Job.class)); job.setDurability(getBoolean(rs, COL_IS_DURABLE)); job.setRequestsRecovery(getBoolean(rs, COL_REQUESTS_RECOVERY)); JobId jobId = new QuartzJobId(groupName, jobName, engine.getClusterName()); Map<?, ?> map = null; if (canUseProperties()) { map = getMapFromProperties(rs); } else { map = (Map<?, ?>) getObjectFromBlob(rs, COL_JOB_DATAMAP); } if (null != map) { job.setJobDataMap(new JobDataMap(map)); } Timestamp timestamp = rs.getTimestamp(COL_JOB_CREATED); winderJobDetails = new QuartzJobDetail(engine, jobId, job, timestamp); } return winderJobDetails; } finally { closeResultSet(rs); closeStatement(ps); } } /** * build Map from java.util.Properties encoding. */ private Map<?, ?> getMapFromProperties(ResultSet rs) throws ClassNotFoundException, IOException, SQLException { Map<?, ?> map; InputStream is = (InputStream) getJobDataFromBlob(rs, COL_JOB_DATAMAP); if(is == null) { return null; } Properties properties = new Properties(); try { properties.load(is); } finally { is.close(); } map = convertFromProperty(properties); return map; } }
[ "shaoxt@gmail.com" ]
shaoxt@gmail.com
8fc8b87805cc9877a256c16eb034a59be2cc27cb
927c8d365e1cd66e5ec224710156939d12cbbe17
/restlet-1.1.6-5346-sonatype/modules/org.restlet.test/src/org/restlet/test/spring/AllSpringTests.java
e2148298afa6a0b859fb4faf85fcfeb4e87685cf
[]
no_license
peterlynch/spice
63531485189d794d6bdb23dd5f4baae5725a348b
e95877f143d4e9eab3c464550fabe3787da75561
refs/heads/master
2022-10-19T11:30:27.921153
2010-10-12T13:32:12
2010-10-12T13:32:12
997,598
0
0
null
2022-10-04T23:47:23
2010-10-18T13:34:10
Java
UTF-8
Java
false
false
1,661
java
/** * Copyright 2005-2008 Noelios Technologies. * * The contents of this file are subject to the terms of the following open * source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 (the "Licenses"). You can * select the license that you prefer but you may not use this file except in * compliance with one of these Licenses. * * You can obtain a copy of the LGPL 3.0 license at * http://www.gnu.org/licenses/lgpl-3.0.html * * You can obtain a copy of the LGPL 2.1 license at * http://www.gnu.org/licenses/lgpl-2.1.html * * You can obtain a copy of the CDDL 1.0 license at * http://www.sun.com/cddl/cddl.html * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royaltee free commercial license with less * limitations, transferable or non-transferable, directly at * http://www.noelios.com/products/restlet-engine * * Restlet is a registered trademark of Noelios Technologies. */ package org.restlet.test.spring; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.restlet.test.SpringTestCase; /** * Suite with all Spring unit tests. * * @author Rhett Sutphin */ public class AllSpringTests extends TestCase { public static Test suite() { final TestSuite suite = new TestSuite(); suite.setName("all spring-ext tests"); suite.addTestSuite(SpringTestCase.class); suite.addTestSuite(SpringBeanFinderTest.class); suite.addTestSuite(BeanNameRouterTest.class); return suite; } }
[ "dbradicich@5751e0cb-dcb7-432f-92e2-260806df54be" ]
dbradicich@5751e0cb-dcb7-432f-92e2-260806df54be
6df5ffae3fee6b66c6fe6caf43c511af7f677da4
6f28ba66909fa293d9058eb033e1694b4ec97eb0
/smartenv-person/smartenv-person-api/src/main/java/com/ai/apac/smartenv/person/entity/PersonJobNumber.java
b415c235783e21869dd44ef7833637873e523c2f
[]
no_license
fangxunqing/smart-env
01870c01ceb8141787652585b7bf3738a3498641
99665cb17c8f7b96f1f6d29223d26a08b5b05d8a
refs/heads/main
2023-04-26T17:55:03.072112
2021-05-25T03:29:15
2021-05-25T03:29:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,800
java
/* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package com.ai.apac.smartenv.person.entity; import com.baomidou.mybatisplus.annotation.TableName; import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.tenant.mp.TenantEntity; import lombok.Data; import lombok.EqualsAndHashCode; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * 实体类 * * @author Blade * @since 2020-08-19 */ @Data @TableName("ai_person_job_number") @EqualsAndHashCode(callSuper = true) @ApiModel(value = "PersonJobNumber对象", description = "PersonJobNumber对象") public class PersonJobNumber extends TenantEntity { private static final long serialVersionUID = 1L; private Long id; /** * 当前工号 */ @ApiModelProperty(value = "当前工号") private Integer currentNumber; /** * 工号位数 */ @ApiModelProperty(value = "工号位数") private Integer figures; /** * 前缀 */ @ApiModelProperty(value = "前缀") private String prefix; }
[ "15251810316@163.com" ]
15251810316@163.com
278b787869e22d81868d2e136bd3bbe17463b979
83110fbb179713c411ddf301c90ef4b814285846
/src/HostDatastoreBrowserSearchResults.java
e93baa1c6a97d4f1d960e0fee1a9dd75e543557c
[]
no_license
mikelopez/jvm
f10590edf42b498f2d81dec71b0fee120e381c9a
36a960897062224eabd0c18a1434f7c8961ee81c
refs/heads/master
2021-01-19T05:36:54.710665
2013-06-09T04:36:41
2013-06-09T04:36:41
3,783,647
2
0
null
null
null
null
UTF-8
Java
false
false
3,240
java
package com.vmware.vim25; 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; /** * <p>Java class for HostDatastoreBrowserSearchResults complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="HostDatastoreBrowserSearchResults"> * &lt;complexContent> * &lt;extension base="{urn:vim25}DynamicData"> * &lt;sequence> * &lt;element name="datastore" type="{urn:vim25}ManagedObjectReference" minOccurs="0"/> * &lt;element name="folderPath" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="file" type="{urn:vim25}FileInfo" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "HostDatastoreBrowserSearchResults", propOrder = { "datastore", "folderPath", "file" }) public class HostDatastoreBrowserSearchResults extends DynamicData { protected ManagedObjectReference datastore; protected String folderPath; protected List<FileInfo> file; /** * Gets the value of the datastore property. * * @return * possible object is * {@link ManagedObjectReference } * */ public ManagedObjectReference getDatastore() { return datastore; } /** * Sets the value of the datastore property. * * @param value * allowed object is * {@link ManagedObjectReference } * */ public void setDatastore(ManagedObjectReference value) { this.datastore = value; } /** * Gets the value of the folderPath property. * * @return * possible object is * {@link String } * */ public String getFolderPath() { return folderPath; } /** * Sets the value of the folderPath property. * * @param value * allowed object is * {@link String } * */ public void setFolderPath(String value) { this.folderPath = value; } /** * Gets the value of the file 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 file property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFile().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link FileInfo } * * */ public List<FileInfo> getFile() { if (file == null) { file = new ArrayList<FileInfo>(); } return this.file; } }
[ "dev@scidentify.info" ]
dev@scidentify.info
60de4e194922c12c4d2f7e5aaa4f14f8b0bb61e2
c7f2dad950549c08a65e2545f1a028265925b80b
/src/xyz/msws/treecreation/commands/ListCommand.java
f88cb659db7c630ffee2eb9c97393902fedccb97
[]
no_license
MSWS/TreeCreation
c14ae8f12a3802f339563b4adf750a8a0096ccca
78d8db1915e3deec6e5a04556809ae37dbb775b2
refs/heads/master
2023-02-18T13:19:53.864402
2021-01-19T07:48:52
2021-01-19T07:48:52
326,889,012
0
0
null
null
null
null
UTF-8
Java
false
false
1,614
java
package xyz.msws.treecreation.commands; import java.util.Map.Entry; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.command.defaults.BukkitCommand; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.HoverEvent.Action; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.hover.content.Text; import xyz.msws.treecreation.api.TreeAPI; import xyz.msws.treecreation.data.AbstractTree; public class ListCommand extends BukkitCommand { private TreeAPI plugin; public ListCommand(TreeAPI plugin) { super("list"); this.plugin = plugin; } @Override public boolean execute(CommandSender sender, String alias, String[] args) { plugin.getMSG().tell(sender, "Tree List", "Listing %s%s %stree%s", ChatColor.YELLOW, plugin.getTreeTemplates().size(), plugin.getMSG().primary, plugin.getTreeTemplates().size() == 1 ? "" : "s"); for (Entry<String, AbstractTree> tree : plugin.getTreeTemplates().entrySet()) { TextComponent msg = new TextComponent(tree.getKey() + " (" + ChatColor.YELLOW + tree.getValue().getBlocks().size() + ChatColor.GRAY + ")"); msg.setColor(net.md_5.bungee.api.ChatColor.GRAY); msg.setHoverEvent(new HoverEvent(Action.SHOW_TEXT, new Text(plugin.getMSG().color(tree.getValue().getDescription() + "\nClick to Create")))); msg.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/tree create " + tree.getKey())); sender.spigot().sendMessage(msg); } return true; } }
[ "imodmaker@gmail.com" ]
imodmaker@gmail.com
45a4c3a361a78f0c9d341955cc5efe415869bd24
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
/Crawler/data/KillMonsterIncident.java
48568c633c97bf65fead60be53be9faa05e0b5f1
[]
no_license
NayrozD/DD2476-Project
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
94dfb3c0a470527b069e2e0fd9ee375787ee5532
refs/heads/master
2023-03-18T04:04:59.111664
2021-03-10T15:03:07
2021-03-10T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,938
java
74 https://raw.githubusercontent.com/rayfowler/rotp-public/master/src/rotp/model/incidents/KillMonsterIncident.java /* * Copyright 2015-2020 Ray Fowler * * Licensed under the GNU General Public License, Version 3 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.gnu.org/licenses/gpl-3.0.html * * 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 rotp.model.incidents; public class KillMonsterIncident extends DiplomaticIncident { private static final long serialVersionUID = 1L; final int empMe; final int empYou; String monsterKey; public static KillMonsterIncident create(int e1, int e2, String key) { KillMonsterIncident inc = new KillMonsterIncident(e1, e2, key); return inc; } private KillMonsterIncident(int e1, int e2, String key) { empMe = e1; empYou = e2; monsterKey = key; severity = 50; dateOccurred = galaxy().currentYear(); duration = 30; } @Override public String title() { return text("INC_KILLED_MONSTER_TITLE", text(monsterKey)); } @Override public String key() { return "Killed Monster: "+monsterKey; } @Override public String description() { return decode(text("INC_KILLED_MONSTER_DESC")); } @Override public String decode(String s) { String s1 = super.decode(s); s1 = galaxy().empire(empMe).replaceTokens(s1, "my"); s1 = galaxy().empire(empYou).replaceTokens(s1, "your"); s1 = s1.replace("[monster]", text(monsterKey)); return s1; } }
[ "veronika.cucorova@gmail.com" ]
veronika.cucorova@gmail.com
c72366cef45a902ff5ecce20e51e8c7a194cd664
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_3911156b702694ce1013aeeca0777e52dfbbfc5e/XMLStreamReaderComparator/23_3911156b702694ce1013aeeca0777e52dfbbfc5e_XMLStreamReaderComparator_s.java
d63ed929d2a39d7e675a4f4961829cb4719522e3
[]
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,593
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.axiom.om.impl; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import javax.xml.stream.XMLStreamReader; import junit.framework.Assert; import org.apache.axiom.om.util.StAXUtils; /** * Helper class that compares the events produced by two {@link XMLStreamReader} objects. */ public class XMLStreamReaderComparator extends Assert { private final XMLStreamReader expected; private final XMLStreamReader actual; public XMLStreamReaderComparator(XMLStreamReader expected, XMLStreamReader actual) { this.expected = expected; this.actual = actual; } private Object[] invoke(String methodName, Object[] args) throws Exception { if (args == null) { args = new Object[0]; } Method[] methods = XMLStreamReader.class.getMethods(); Method method = null; for (int i=0; i<methods.length; i++) { Method candidate = methods[i]; if (candidate.getName().equals(methodName) && candidate.getParameterTypes().length == args.length) { method = candidate; break; } } if (method == null) { fail("Method " + methodName + " not found"); } Object expectedResult; Throwable expectedException; try { expectedResult = method.invoke(expected, args); expectedException = null; } catch (InvocationTargetException ex) { expectedResult = null; expectedException = ex.getCause(); } Object actualResult; Throwable actualException; try { actualResult = method.invoke(actual, args); actualException = null; } catch (InvocationTargetException ex) { actualResult = null; actualException = ex.getCause(); } if (expectedException == null) { if (actualException != null) { fail("Method " + methodName + " threw unexpected exception " + actualException.getClass().getName() + "; event type was " + StAXUtils.getEventTypeString(expected.getEventType())); } else { return new Object[] { expectedResult, actualResult }; } } else { if (actualException == null) { fail("Expected " + methodName + " to throw " + expectedException.getClass().getName() + ", but the method retuned normally; event type was " + StAXUtils.getEventTypeString(expected.getEventType())); } else { assertEquals(expectedException.getClass(), actualException.getClass()); } } return null; } private Object assertSameResult(String methodName, Object[] args) throws Exception { Object[] results = invoke(methodName, args); if (results != null) { assertEquals("Return value of " + methodName + " (event type " + StAXUtils.getEventTypeString(expected.getEventType()) + ")", results[0], results[1]); return results[0]; } else { return null; } } public void compare() throws Exception { while (expected.next() != XMLStreamReader.END_DOCUMENT) { actual.next(); Integer attributeCount = (Integer)assertSameResult("getAttributeCount", null); if (attributeCount != null) { for (int i=0; i<attributeCount.intValue(); i++) { Object[] args = { Integer.valueOf(i) }; assertSameResult("getAttributeLocalName", args); assertSameResult("getAttributeName", args); assertSameResult("getAttributeNamespace", args); assertSameResult("getAttributePrefix", args); assertSameResult("getAttributeType", args); assertSameResult("getAttributeValue", args); } } assertSameResult("getLocalName", null); assertSameResult("getName", null); Integer namespaceCount = (Integer)assertSameResult("getNamespaceCount", null); if (namespaceCount != null) { Map expectedNamespaces = new HashMap(); Map actualNamespaces = new HashMap(); for (int i=0; i<namespaceCount.intValue(); i++) { expectedNamespaces.put(expected.getNamespacePrefix(i), expected.getNamespaceURI(i)); actualNamespaces.put(actual.getNamespacePrefix(i), actual.getNamespaceURI(i)); } // assertEquals(expectedNamespaces, actualNamespaces); } assertSameResult("getNamespaceURI", null); assertSameResult("getPIData", null); assertSameResult("getPITarget", null); // assertSameResult("getPrefix", null); assertSameResult("getText", null); assertSameResult("getTextLength", null); assertSameResult("hasName", null); assertSameResult("hasText", null); assertSameResult("isCharacters", null); assertSameResult("isEndElement", null); assertSameResult("isStartElement", null); assertSameResult("isWhiteSpace", null); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
68fc7ab5de9cc4cbb04f6379ea0b413d7e0bf61f
f241aca9604219d55af44f20b2b4b8db1f53f6f9
/src/main/java/com/github/seratch/jslack/api/methods/request/api/ApiTestRequest.java
40ae5a5f3b93f90391c946d84d51c1a9d7fd2821
[ "MIT" ]
permissive
SylvainJuge/jslack
8e0dd6582d00c442b33606ab448273f1421f2222
7235a1ed4f1e2a6d75a9855ed9c37022ac3b8d02
refs/heads/master
2020-04-01T11:38:17.485398
2018-10-18T07:35:51
2018-10-18T07:35:51
153,170,864
0
0
MIT
2018-10-15T19:35:06
2018-10-15T19:35:06
null
UTF-8
Java
false
false
390
java
package com.github.seratch.jslack.api.methods.request.api; import com.github.seratch.jslack.api.methods.SlackApiRequest; import lombok.Builder; import lombok.Data; @Data @Builder public class ApiTestRequest implements SlackApiRequest { /** * example property to return */ private String foo; /** * Error response to return */ private String error; }
[ "seratch@gmail.com" ]
seratch@gmail.com
6e26a8a9944e29c480eff44bded2eda893f2b9e3
208ba847cec642cdf7b77cff26bdc4f30a97e795
/zd/zb/src/main/java/org.wp.zb/util/helpers/WPImageGetter.java
4bc7b2a56dc219c150694442b177263fe49dfb7c
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
6,176
java
package org.wp.zb.util.helpers; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.text.Html; import android.text.TextUtils; import android.widget.TextView; import com.android.volley.VolleyError; import com.android.volley.toolbox.ImageLoader; import org.wp.zb.util.AppLog; import org.wp.zb.util.AppLog.T; import org.wp.zb.util.PhotonUtils; import java.lang.ref.WeakReference; /** * ImageGetter for Html.fromHtml() * adapted from existing ImageGetter code in NoteCommentFragment */ public class WPImageGetter implements Html.ImageGetter { private final WeakReference<TextView> mWeakView; private final int mMaxSize; private ImageLoader mImageLoader; private Drawable mLoadingDrawable; private Drawable mFailedDrawable; public WPImageGetter(TextView view) { this(view, 0); } public WPImageGetter(TextView view, int maxSize) { mWeakView = new WeakReference<TextView>(view); mMaxSize = maxSize; } public WPImageGetter(TextView view, int maxSize, ImageLoader imageLoader, Drawable loadingDrawable, Drawable failedDrawable) { mWeakView = new WeakReference<TextView>(view); mMaxSize = maxSize; mImageLoader = imageLoader; mLoadingDrawable = loadingDrawable; mFailedDrawable = failedDrawable; } private TextView getView() { return mWeakView.get(); } @Override public Drawable getDrawable(String source) { if (mImageLoader == null || mLoadingDrawable == null || mFailedDrawable == null) { throw new RuntimeException("Developer, you need to call setImageLoader, setLoadingDrawable and setFailedDrawable"); } if (TextUtils.isEmpty(source)) { return null; } // images in reader comments may skip "http:" (no idea why) so make sure to add protocol here if (source.startsWith("//")) { source = "http:" + source; } // use Photon if a max size is requested (otherwise the full-sized image will be downloaded // and then resized) if (mMaxSize > 0) { source = PhotonUtils.getPhotonImageUrl(source, mMaxSize, 0); } final RemoteDrawable remote = new RemoteDrawable(mLoadingDrawable, mFailedDrawable); mImageLoader.get(source, new ImageLoader.ImageListener() { @Override public void onErrorResponse(VolleyError error) { remote.displayFailed(); TextView view = getView(); if (view != null) { view.invalidate(); } } @Override public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) { if (response.getBitmap() == null) { AppLog.w(T.UTILS, "WPImageGetter null bitmap"); } TextView view = getView(); if (view == null) { AppLog.w(T.UTILS, "WPImageGetter view is invalid"); return; } int maxWidth = view.getWidth() - view.getPaddingLeft() - view.getPaddingRight(); if (mMaxSize > 0 && (maxWidth > mMaxSize || maxWidth == 0)) { maxWidth = mMaxSize; } Drawable drawable = new BitmapDrawable(view.getContext().getResources(), response.getBitmap()); remote.setRemoteDrawable(drawable, maxWidth); // force textView to resize correctly if image isn't cached by resetting the content // to itself - this way the textView will use the cached image, and resizing to // accommodate the image isn't necessary if (!isImmediate) { view.setText(view.getText()); } } }); return remote; } public static class RemoteDrawable extends BitmapDrawable { Drawable mRemoteDrawable; final Drawable mLoadingDrawable; final Drawable mFailedDrawable; private boolean mDidFail = false; public RemoteDrawable(Drawable loadingDrawable, Drawable failedDrawable) { mLoadingDrawable = loadingDrawable; mFailedDrawable = failedDrawable; setBounds(0, 0, mLoadingDrawable.getIntrinsicWidth(), mLoadingDrawable.getIntrinsicHeight()); } public void displayFailed() { mDidFail = true; } public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (mRemoteDrawable != null) { mRemoteDrawable.setBounds(x, y, width, height); return; } if (mLoadingDrawable != null) { mLoadingDrawable.setBounds(x, y, width, height); mFailedDrawable.setBounds(x, y, width, height); } } public void setRemoteDrawable(Drawable remote, int maxWidth) { // null sentinel for now if (remote == null) { // throw error return; } mRemoteDrawable = remote; // determine if we need to scale the image to fit in view int imgWidth = remote.getIntrinsicWidth(); int imgHeight = remote.getIntrinsicHeight(); float xScale = (float) imgWidth / (float) maxWidth; if (xScale > 1.0f) { setBounds(0, 0, Math.round(imgWidth / xScale), Math.round(imgHeight / xScale)); } else { setBounds(0, 0, imgWidth, imgHeight); } } public boolean didFail() { return mDidFail; } public void draw(Canvas canvas) { if (mRemoteDrawable != null) { mRemoteDrawable.draw(canvas); } else if (didFail()) { mFailedDrawable.draw(canvas); } else { mLoadingDrawable.draw(canvas); } } } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
23858dead261d1a308a1a2a99c9add3fc30b4970
32117643c745cfb06063951dd2e29c3ad3d11ca9
/src/main/java/io/github/angularlogin/repository/CustomAuditEventRepository.java
a5402d6bebb8ea011f79deb3aca8871852c4b138
[]
no_license
Balagangadhar/angularlogin
5964df55935ee5091d4fce398dcb057b52758def
23ed590fd11ba33d10ff438761823302cb180704
refs/heads/master
2021-06-27T22:14:51.650368
2018-12-13T16:10:22
2018-12-13T16:10:22
153,274,783
1
1
null
2020-09-18T14:56:55
2018-10-16T11:32:55
Java
UTF-8
Java
false
false
3,624
java
package io.github.angularlogin.repository; import io.github.angularlogin.config.Constants; import io.github.angularlogin.config.audit.AuditEventConverter; import io.github.angularlogin.domain.PersistentAuditEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.actuate.audit.AuditEventRepository; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.*; /** * An implementation of Spring Boot's AuditEventRepository. */ @Repository public class CustomAuditEventRepository implements AuditEventRepository { private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE"; /** * Should be the same as in Liquibase migration. */ protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255; private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; private final Logger log = LoggerFactory.getLogger(getClass()); public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; } @Override public List<AuditEvent> find(String principal, Instant after, String type) { Iterable<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after, type); return auditEventConverter.convertToAuditEvent(persistentAuditEvents); } @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void add(AuditEvent event) { if (!AUTHORIZATION_FAILURE.equals(event.getType()) && !Constants.ANONYMOUS_USER.equals(event.getPrincipal())) { PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent(); persistentAuditEvent.setPrincipal(event.getPrincipal()); persistentAuditEvent.setAuditEventType(event.getType()); persistentAuditEvent.setAuditEventDate(event.getTimestamp()); Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData()); persistentAuditEvent.setData(truncate(eventData)); persistenceAuditEventRepository.save(persistentAuditEvent); } } /** * Truncate event data that might exceed column length. */ private Map<String, String> truncate(Map<String, String> data) { Map<String, String> results = new HashMap<>(); if (data != null) { for (Map.Entry<String, String> entry : data.entrySet()) { String value = entry.getValue(); if (value != null) { int length = value.length(); if (length > EVENT_DATA_COLUMN_MAX_LENGTH) { value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH); log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.", entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH); } } results.put(entry.getKey(), value); } } return results; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
456144ee0e1a5c3dd729fb4f9b480a10d893da6e
7f8911ca170a2a974576a0d44125e733eeca3b0c
/admin-portal/eny/src/main/java/com/gea/portal/eny/page/ReportDto.java
84faa24c795aebd05a886f21fe5e743046d072ca
[]
no_license
jianfengEric/testcase3
019afb24e28a8019e1bc4f3b22239be8fe48aa77
f7f98e281fd12d413f4c923172e96f86ccb6d34b
refs/heads/master
2020-04-28T08:53:01.617761
2019-04-01T03:12:24
2019-04-01T03:12:24
175,145,884
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
package com.gea.portal.eny.page; import java.io.Serializable; /** * Created by Owen on 2017/1/11. */ public class ReportDto implements Serializable { private String contentType; private String fileName; private byte[] content; public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public byte[] getContent() { return content; } public void setContent(byte[] content) { this.content = content; } public String getContentType() { return contentType; } public void setContentType(String contentType) { this.contentType = contentType; } }
[ "eric.lu@sinodynamic.com" ]
eric.lu@sinodynamic.com
03c31b1002ee8b38800441300874be5712b4c940
722e33e42a3bc79b24ea7a676956c66a82710332
/occurrence-hive/src/main/java/org/gbif/occurrence/hive/udf/ArrayNullsRemoverGenericUDF.java
28c72c21787553592486ed748c5c9dbd6eb322b2
[ "Apache-2.0" ]
permissive
gubra/occurrence
8b60753b41793bfd18692813b35d5aeb9024dde0
ef10ed2468124e4af75f5fa5ba131c6f1ac5c3a5
refs/heads/master
2021-01-23T21:01:29.085548
2014-06-11T14:04:43
2014-06-11T14:04:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,751
java
package org.gbif.occurrence.hive.udf; import java.util.Collections; import java.util.List; import com.google.common.collect.Lists; import org.apache.hadoop.hive.ql.exec.UDFArgumentException; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.StandardListObjectInspector; /** * A simple UDF that remove nulls from a list. */ public class ArrayNullsRemoverGenericUDF extends GenericUDF { private StandardListObjectInspector retValInspector; @Override public Object evaluate(DeferredObject[] arg0) throws HiveException { List<?> list = retValInspector.getList(arg0[0].get()); List<?> result = Lists.newArrayList(); if (list != null && !list.isEmpty()) { result = Lists.newArrayList(list); result.removeAll(Collections.singleton(null)); } return result; } @Override public String getDisplayString(String[] arg0) { return "removeNulls( " + arg0[0] + ")"; } @Override public ObjectInspector initialize(ObjectInspector[] arg0) throws UDFArgumentException { if (arg0.length != 1) { throw new UDFArgumentException("removeNulls takes an array as argument"); } if (arg0[0].getCategory() != Category.LIST) { throw new UDFArgumentException("removeNulls takes an array as argument"); } retValInspector = (StandardListObjectInspector) ObjectInspectorUtils.getStandardObjectInspector(arg0[0]); return retValInspector; } }
[ "federicomh@gmail.com" ]
federicomh@gmail.com
399b5c62935b2f9c308594318e6a92ccdcc36b8f
72de978af5fd379f08ca407218953640d603c8c7
/Menus1/src/com/example/menus1/MainActivity.java
3b6c9afd5626f5d14f3cc6e284860dfd7e018ff3
[]
no_license
MadhuHS/JECM2
96b1a50aadf214ab14cff3ee7cc2ff7b568980e3
090f80d597ecf81cc14ee2086b7ea1fac463243e
refs/heads/master
2021-01-10T17:01:09.789626
2015-11-01T16:08:20
2015-11-01T16:08:20
43,344,317
4
1
null
null
null
null
UTF-8
Java
false
false
1,277
java
package com.example.menus1; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends Activity { EditText messageedittext; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); messageedittext = (EditText) findViewById(R.id.editText1); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId()==R.id.share) { String inptmsg = messageedittext.getText().toString(); Intent shareintent = new Intent(Intent.ACTION_SEND); shareintent.setType("text/plain"); shareintent.putExtra(Intent.EXTRA_TEXT,inptmsg); startActivity(Intent.createChooser(shareintent,"Share Via")); //Toast.makeText(MainActivity.this,"U clicked on share",Toast.LENGTH_SHORT).show(); } return super.onOptionsItemSelected(item); } }
[ "madhuhs943@gmail.com" ]
madhuhs943@gmail.com
99d380a05a418ef57b0ba8d038f676ecbdf33944
951a2cebfb3b742a0b9da0dee787f4610505292c
/toq/Misc/JavaSrc/org/alljoyn/ns/NotificationReceiver.java
bbee239de270f5a2a9c212f907813b314cfeeb54
[]
no_license
marciallus/mytoqmanager
eca30683508878b712e9c1c6642f39f34c2e257b
65fe1d54e8593900262d5b263d75feb646c015e6
refs/heads/master
2020-05-17T01:03:44.121469
2014-12-10T07:22:14
2014-12-10T07:22:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) fieldsfirst noctor space package org.alljoyn.ns; import java.util.UUID; // Referenced classes of package org.alljoyn.ns: // Notification public interface NotificationReceiver { public abstract void dismiss(int i, UUID uuid); public abstract void receive(Notification notification); }
[ "marc.lanouiller@gmail.com" ]
marc.lanouiller@gmail.com
68e33613f897f6628c6ea717630a441ef641c466
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project99/src/test/java/org/gradle/test/performance99_2/Test99_155.java
b6e700e990d1822e471e1e958a0b2d7240be1275
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance99_2; import static org.junit.Assert.*; public class Test99_155 { private final Production99_155 production = new Production99_155("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
15a9c06f5810dd3ab3867466f8584124b65bda14
8cb62243998650987ea57de8775cc6e0a952c156
/src/main/java/com/cowerling/daytrace/security/UserAccessPermissionEvaluator.java
b4b05b03318fa3c3af2924b8a411e899fe827f3d
[]
no_license
Cowerling/DayTrace
d7ce67fb124af6996a86be251c38c4ccdf97a071
b6b86dbe33a141dd847269fd2c4a92c07a7c6a90
refs/heads/master
2021-07-04T00:31:56.082807
2017-09-26T06:07:33
2017-09-26T06:07:33
100,329,763
0
0
null
null
null
null
UTF-8
Java
false
false
2,069
java
package com.cowerling.daytrace.security; import com.cowerling.daytrace.data.UserRepository; import com.cowerling.daytrace.domain.user.User; import com.cowerling.daytrace.domain.user.UserRole; import com.cowerling.daytrace.domain.user.form.UserEditForm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.PermissionEvaluator; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Component; import java.io.Serializable; @Component public class UserAccessPermissionEvaluator implements PermissionEvaluator { @Autowired private UserRepository userRepository; @Override public boolean hasPermission(Authentication authentication, Object target, Object permission) { if (target instanceof String && permission instanceof User) { User user = userRepository.findUserByName((String) target); if (user == null) { return false; } User loginUser = (User) permission; if (user.getUserRole().ordinal() > loginUser.getUserRole().ordinal()) { return true; } else { return false; } } else if (target instanceof UserEditForm && permission instanceof User) { User user = userRepository.findUserByName(((UserEditForm) target).getOriginName()); if (user == null) { return false; } User loginUser = (User) permission; if (user.getUserRole().ordinal() > loginUser.getUserRole().ordinal()) { return true; } else { return false; } } throw new UnsupportedOperationException("hasPermission not supported for object <" + target + "> and permission <" + permission + ">"); } @Override public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) { throw new UnsupportedOperationException(); } }
[ "Cowerling@gmail.com" ]
Cowerling@gmail.com
6fd62a609757912df054419dae2129ea39821af0
70c9e7e0ca4865b81615361577d565a57042a324
/src/test/java/ZZZ/VerifyLinks.java
7a1f8d89b99facd5c7bd70ac22f41e964e7f99c5
[]
no_license
sharmadeepak8616/Schl
66cfe34db7b041d516d72c44e3abeb21a02c6bbc
7b463034ed38ed8b0b2087f8271469a4d580252f
refs/heads/master
2022-07-06T19:36:51.852730
2019-12-21T15:23:33
2019-12-21T15:23:33
229,442,887
0
0
null
2022-06-29T17:51:51
2019-12-21T14:59:32
Java
UTF-8
Java
false
false
824
java
package ZZZ; import java.io.IOException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; public class VerifyLinks { public static void main(String[] args) { String checkUrl = "https://www.google.com"; try { URL url = new URL(checkUrl); HttpURLConnection http = (HttpURLConnection)url.openConnection(); http.setConnectTimeout(5000); http.connect(); System.out.println(http.getResponseCode() + " -- " + HttpURLConnection.HTTP_OK); System.out.println(http.getResponseMessage()); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
[ "sharma.deepak8616@gmail.com" ]
sharma.deepak8616@gmail.com
49412308fb86fb2deb71d39a21aa78cec1d4a466
9623f83defac3911b4780bc408634c078da73387
/powercraft_147/src/minecraft/powercraft/hologram/PChg_ItemBlockHologramBlockEmpty.java
d917ae7f09b1c7bbf61ef5262919519a7ed28523
[]
no_license
BlearStudio/powercraft-legacy
42b839393223494748e8b5d05acdaf59f18bd6c6
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
refs/heads/master
2021-01-21T21:18:55.774908
2015-04-06T20:45:25
2015-04-06T20:45:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package powercraft.hologram; import java.util.List; import net.minecraft.item.ItemStack; import powercraft.api.block.PC_ItemBlock; import powercraft.api.registry.PC_LangRegistry.LangEntry; import powercraft.api.registry.PC_MSGRegistry; public class PChg_ItemBlockHologramBlockEmpty extends PC_ItemBlock { public PChg_ItemBlockHologramBlockEmpty(int id) { super(id); } @Override public boolean hasEffect(ItemStack par1ItemStack) { return true; } @Override public Object msg(int msg, Object... obj) { switch(msg){ case PC_MSGRegistry.MSG_DEFAULT_NAME: List<LangEntry> names = (List<LangEntry>)obj[0]; names.add(new LangEntry(getItemName(), "Hologramblock")); return names; } return null; } }
[ "nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c" ]
nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
c710cc4796b93ee7ebd613205b1be5fa73d74091
fee80e730c0a9d2ede2721d4441970bafaaaa646
/src/org/ace/insurance/report/common/SummaryReportCriteria.java
0587b624ac781e1e92020d286861aeb5f19c295f
[]
no_license
LifeTeam-TAT/GGLI-Core
242360ba9a6dd7cb3841fa495f9124a327df8450
d000f3068b863a581775f5cd7b78b2bfd06b378f
refs/heads/master
2023-03-29T06:26:44.456523
2021-04-02T15:03:18
2021-04-02T15:03:18
354,049,682
0
0
null
null
null
null
UTF-8
Java
false
false
2,469
java
package org.ace.insurance.report.common; import java.util.Date; import org.ace.insurance.common.LifeProductType; import org.ace.insurance.common.ProductIDConfig; import org.ace.insurance.common.Utils; import org.ace.insurance.system.common.branch.Branch; import org.ace.insurance.system.common.entitys.Entitys; import org.ace.insurance.system.common.salepoint.SalePoint; public class SummaryReportCriteria { private String reportType; private int year; private int month; private Date startDate; private Date endDate; private LifeProductType lifeProductType; private boolean continuePolicy; private Branch branch; private SalePoint salepoint; private Entitys entity; public Branch getBranch() { return branch; } public void setBranch(Branch branch) { this.branch = branch; } public String getReportType() { return reportType; } public void setReportType(String reportType) { this.reportType = reportType; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public int getMonth() { return month; } public void setMonth(int month) { this.month = month; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public LifeProductType getLifeProductType() { return lifeProductType; } public void setLifeProductType(LifeProductType lifeProductType) { this.lifeProductType = lifeProductType; } public SalePoint getSalepoint() { return salepoint; } public void setSalepoint(SalePoint salepoint) { this.salepoint = salepoint; } public Entitys getEntity() { return entity; } public void setEntity(Entitys entity) { this.entity = entity; } public String getProductId() { switch (lifeProductType) { case PUBLIC_LIFE: { return ProductIDConfig.getPublicLifeId(); } case GROUP_LIFE: { return ProductIDConfig.getGroupLifeId(); } case SNAKE_BITE: { return ProductIDConfig.getSnakeBikeId(); } case SPORT_MAN: { return ProductIDConfig.getSportManId(); } } return null; } public String getMonthString() { return Utils.getMonthString(month); } public boolean isContinuePolicy() { return continuePolicy; } public void setContinuePolicy(boolean continuePolicy) { this.continuePolicy = continuePolicy; } }
[ "lifeteam.tat@gmail.com" ]
lifeteam.tat@gmail.com
b3ab618982307fff337a2d422b2d032eee271dd7
84e41905d2bf955eaae2a82d80eb8f77a59c5f63
/thinkwin-yunmeeting-service-weixin-parent/thinkwin-yunmeeting-service-weixin/src/main/java/com/thinkwin/yunmeeting/weixin/handler/NullHandler.java
b67f29fb00be8b880668e4e291c2570e46bcb82e
[]
no_license
moyu3390/wang
ac91803f34e04e55dd5f7d883f779ba736e96aa1
207c75752590bf6b3d7d58aedd9e6b3ccc9424d4
refs/heads/master
2022-01-14T22:36:19.096206
2018-08-10T09:50:07
2018-08-10T09:50:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.thinkwin.yunmeeting.weixin.handler; import me.chanjar.weixin.common.session.WxSessionManager; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage; import org.springframework.stereotype.Component; import java.util.Map; /* * 类说明: * @author lining 2017/7/3 * @version 1.0 * */ @Component public class NullHandler extends AbstractHandler { @Override public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage, Map<String, Object> context, WxMpService wxMpService, WxSessionManager sessionManager) { return null; } }
[ "173030685@qq.com" ]
173030685@qq.com
9b7c5bde4633a447296036e45178111604af140c
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module2171_public/tests/more/src/java/module2171_public_tests_more/a/Foo2.java
e6752eab6347edee1ad34800b528c444259c9d66
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,690
java
package module2171_public_tests_more.a; import java.nio.file.*; import java.sql.*; import java.util.logging.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.annotation.processing.Completion * @see javax.lang.model.AnnotatedConstruct * @see javax.management.Attribute */ @SuppressWarnings("all") public abstract class Foo2<S> extends module2171_public_tests_more.a.Foo0<S> implements module2171_public_tests_more.a.IFoo2<S> { javax.naming.directory.DirContext f0 = null; javax.net.ssl.ExtendedSSLSession f1 = null; javax.rmi.ssl.SslRMIClientSocketFactory f2 = null; public S element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module2171_public_tests_more.a.Foo0.create(input); } public String getName() { return module2171_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module2171_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public S get() { return (S)module2171_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (S)element; module2171_public_tests_more.a.Foo0.getInstance().set(this.element); } public S call() throws Exception { return (S)module2171_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
eb7c85deee821660dbe9afbaf2c343a2afe5cd5f
78c696de905e3f1a699b106c6f23893bd0e96fa3
/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
3322d59f300c397d62448eba47ec2749e6d743cf
[]
no_license
jiangyu2015/eclipse-4.5.2-source
71d1e0b45e744ce0038e5ba17b6c3c12fd3634c5
e4a90a19989564e28d73ff64a4a2ffc2cbfeaf9e
refs/heads/master
2021-01-10T09:07:58.554745
2016-03-03T13:18:11
2016-03-03T13:18:11
52,862,391
0
0
null
null
null
null
UTF-8
Java
false
false
6,575
java
/******************************************************************************* * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.help.internal.webapp.data; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.*; import javax.servlet.http.*; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Platform; import org.eclipse.help.internal.webapp.HelpWebappPlugin; import org.eclipse.help.webapp.AbstractButton; /** * Control for a toolbar. */ public class ToolbarData extends RequestData { private static final String BUTTON_EXTENSION_POINT = "org.eclipse.help.webapp.toolbarButton"; //$NON-NLS-1$ private ToolbarButton[] buttons; private String[] scriptFiles; private static Pattern jsNamePattern = Pattern.compile("^[a-zA-Z_$][a-zA-Z1-9_]*"); //$NON-NLS-1$ public ToolbarData(ServletContext context, HttpServletRequest request, HttpServletResponse response) { super(context, request, response); loadButtons(); } /* * Returns whether or not this toolbar has a menu button (has an arrow with drop * down menu). */ public boolean hasMenu() { for (ToolbarButton button : buttons) { if ("menu".equals(button.getAction())) { //$NON-NLS-1$ return true; } } return false; } private void loadButtons() { String[] names = request.getParameterValues("name"); //$NON-NLS-1$ String[] tooltips = request.getParameterValues("tooltip"); //$NON-NLS-1$ String[] images = request.getParameterValues("image"); //$NON-NLS-1$ String[] actions = request.getParameterValues("action"); //$NON-NLS-1$ String[] params = request.getParameterValues("param"); //$NON-NLS-1$ String[] states = request.getParameterValues("state"); //$NON-NLS-1$ if (names == null || tooltips == null || images == null || actions == null || params == null || states == null || names.length != tooltips.length || names.length != images.length || names.length != actions.length || names.length != params.length || names.length != states.length) { buttons = new ToolbarButton[0]; scriptFiles = new String[0]; return; } List<ToolbarButton> buttonList = new ArrayList<ToolbarButton>(); for (int i = 0; i < names.length; i++) { if ("".equals(names[i])) //$NON-NLS-1$ buttonList.add(new ToolbarButton()); else{ // Is this a valid javascript name (and not a script injection) Matcher matcher = jsNamePattern.matcher(names[i]); if (matcher.matches()) buttonList.add(new ToolbarButton(names[i], ServletResources .getString(tooltips[i], request), preferences .getImagesDirectory() + "/e_" + images[i], //$NON-NLS-1$ actions[i], params[i], states[i])); } } addExtensionButtons(buttonList); // add implicit maximize/restore button on all toolbars if (isIE() || isMozilla() && "1.2.1".compareTo(getMozillaVersion()) <= 0 //$NON-NLS-1$ || (isSafari() && "120".compareTo(getSafariVersion()) <= 0)) { //$NON-NLS-1$ buttonList.add(new ToolbarButton("maximize_restore", //$NON-NLS-1$ getMaximizeTooltip(), preferences.getImagesDirectory() + "/" + "maximize.gif", //$NON-NLS-1$ //$NON-NLS-2$ "restore_maximize", null, "off")); //$NON-NLS-1$ //$NON-NLS-2$ } buttons = buttonList .toArray(new ToolbarButton[buttonList.size()]); } private void addExtensionButtons(List<ToolbarButton> buttonList) { IExtensionRegistry registry = Platform.getExtensionRegistry(); IConfigurationElement[] elements = registry .getConfigurationElementsFor(BUTTON_EXTENSION_POINT); List<AbstractButton> extensionButtons = new ArrayList<AbstractButton>(); List<String> scripts = new ArrayList<String>(); for (IConfigurationElement element : elements) { Object obj = null; try { obj = element.createExecutableExtension("class"); //$NON-NLS-1$ } catch (CoreException e) { HelpWebappPlugin.logError("Create extension failed:[" //$NON-NLS-1$ + BUTTON_EXTENSION_POINT + "].", e); //$NON-NLS-1$ } if (obj instanceof AbstractButton) { AbstractButton button = (AbstractButton) obj; String toolbarName = request.getParameter("view"); //$NON-NLS-1$ if (toolbarName == null) { toolbarName = request.getParameter("toolbar"); //$NON-NLS-1$ } if (button.isAddedToToolbar(toolbarName)) { extensionButtons.add(button); } } } Collections.sort(extensionButtons); for (AbstractButton button : extensionButtons) { String scriptFile = button.getJavaScriptURL(); if (scriptFile != null) { scripts.add(UrlUtil.getRelativePath(request, scriptFile)); } ToolbarButton toolButton = new ToolbarButton(button.getId(), button.getTooltip(UrlUtil.getLocaleObj(request, response)), request.getContextPath() + button.getImageURL(), button.getAction(), "", //$NON-NLS-1$ button.getState()); buttonList.add(toolButton); } scriptFiles = scripts.toArray(new String[scripts.size()]); } public ToolbarButton[] getButtons() { return buttons; } public String getName() { if (request.getParameter("view") == null) //$NON-NLS-1$ return ""; //$NON-NLS-1$ return request.getParameter("view"); //$NON-NLS-1$ } public String getTitle() { if (request.getParameter("view") == null) //$NON-NLS-1$ return ""; //$NON-NLS-1$ return ServletResources.getString(request.getParameter("view"), //$NON-NLS-1$ request); } public String getScript() { return request.getParameter("script"); //$NON-NLS-1$ } public String getMaximizeImage() { return preferences.getImagesDirectory() + "/e_maximize.gif"; //$NON-NLS-1$ } public String getRestoreImage() { return preferences.getImagesDirectory() + "/e_restore.gif"; //$NON-NLS-1$ } public String getMaximizeTooltip() { return ServletResources.getString("maximize", request); //$NON-NLS-1$ } public String getRestoreTooltip() { return ServletResources.getString("restore", request); //$NON-NLS-1$ } public String[] getScriptFiles() { return scriptFiles; } }
[ "187_6810_5877@sina.com" ]
187_6810_5877@sina.com
494c933d8591518ff5ae86282c130568bf112e00
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
/TRAVACC_R5/travelfulfilmentprocess/src/de/hybris/platform/travelfulfilmentprocess/actions/order/SendOrderCompletedNotificationAction.java
5115b8b38b598a50680a12ecd69d23fd3c509fa6
[]
no_license
RabeS/model-T
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
refs/heads/master
2021-07-01T02:13:15.818439
2020-09-05T08:33:43
2020-09-05T08:33:43
147,307,585
0
0
null
null
null
null
UTF-8
Java
false
false
1,785
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.travelfulfilmentprocess.actions.order; import de.hybris.platform.orderprocessing.events.OrderCompletedEvent; import de.hybris.platform.orderprocessing.model.OrderProcessModel; import de.hybris.platform.processengine.action.AbstractProceduralAction; import de.hybris.platform.servicelayer.event.EventService; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; /** * Send event representing the completion of an order process. */ public class SendOrderCompletedNotificationAction extends AbstractProceduralAction<OrderProcessModel> { private static final Logger LOG = Logger.getLogger(SendOrderCompletedNotificationAction.class); private EventService eventService; @Override public void executeAction(final OrderProcessModel process) { getEventService().publishEvent(new OrderCompletedEvent(process)); if (LOG.isInfoEnabled()) { LOG.info("Process: " + process.getCode() + " in step " + getClass()); } } /** * Gets event service. * * @return the event service */ protected EventService getEventService() { return eventService; } /** * Sets event service. * * @param eventService * the event service */ @Required public void setEventService(final EventService eventService) { this.eventService = eventService; } }
[ "sebastian.rulik@gmail.com" ]
sebastian.rulik@gmail.com
fa2913bae65e5e18702471a4f3b2103879cea253
1b91e8700fa75b0336aed4a06ac0d964ca5df677
/src/main/java/com/datastructure/learning/basicTest/设计模式/工厂模式/简单工厂/MailSender.java
5f8c013a3d3124a89416e28bc04c2822ed384d60
[]
no_license
lovepli/learning
a745f69fb119a75f5ed6166429f9bccf1bc088b0
5b1f791b1ad161d60991d441f21408ab2d743608
refs/heads/master
2022-12-21T23:53:13.656671
2021-03-23T08:27:56
2021-03-23T08:27:56
224,960,753
0
0
null
2022-12-16T15:41:01
2019-11-30T04:46:17
Java
UTF-8
Java
false
false
293
java
package com.datastructure.learning.basicTest.设计模式.工厂模式.简单工厂; /** * @author: lipan * @date: 2020-04-23 * @description: */ public class MailSender implements Sender { @Override public void send() { System.out.println("this is mail sender!"); } }
[ "1171205514@qq.com" ]
1171205514@qq.com
66db42e55039f2ce4792e57308d61f13264b6b46
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/h/c/g/Calc_1_1_17260.java
b644d2a84d6dcb550db9d86d7b75605c35482e6b
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.h.c.g; public class Calc_1_1_17260 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
2cc3f9a6e203bef86504c6556452e07290bf2b26
559ea64c50ae629202d0a9a55e9a3d87e9ef2072
/org/xbill/DNS/A6Record.java
5f5a72387adab3bc7023585cbdf05d92c71d0594
[]
no_license
CrazyWolf2014/VehicleBus
07872bf3ab60756e956c75a2b9d8f71cd84e2bc9
450150fc3f4c7d5d7230e8012786e426f3ff1149
refs/heads/master
2021-01-03T07:59:26.796624
2016-06-10T22:04:02
2016-06-10T22:04:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,327
java
package org.xbill.DNS; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; import org.codehaus.jackson.util.MinimalPrettyPrinter; import org.xbill.DNS.KEYRecord.Flags; public class A6Record extends Record { private static final long serialVersionUID = -8815026887337346789L; private Name prefix; private int prefixBits; private InetAddress suffix; A6Record() { } Record getObject() { return new A6Record(); } public A6Record(Name name, int i, long j, int i2, InetAddress inetAddress, Name name2) { super(name, 38, i, j); this.prefixBits = Record.checkU8("prefixBits", i2); if (inetAddress == null || Address.familyOf(inetAddress) == 2) { this.suffix = inetAddress; if (name2 != null) { this.prefix = Record.checkName("prefix", name2); return; } return; } throw new IllegalArgumentException("invalid IPv6 address"); } void rrFromWire(DNSInput dNSInput) throws IOException { this.prefixBits = dNSInput.readU8(); int i = ((128 - this.prefixBits) + 7) / 8; if (this.prefixBits < Flags.FLAG8) { byte[] bArr = new byte[16]; dNSInput.readByteArray(bArr, 16 - i, i); this.suffix = InetAddress.getByAddress(bArr); } if (this.prefixBits > 0) { this.prefix = new Name(dNSInput); } } void rdataFromString(Tokenizer tokenizer, Name name) throws IOException { this.prefixBits = tokenizer.getUInt8(); if (this.prefixBits > Flags.FLAG8) { throw tokenizer.exception("prefix bits must be [0..128]"); } if (this.prefixBits < Flags.FLAG8) { String string = tokenizer.getString(); try { this.suffix = Address.getByAddress(string, 2); } catch (UnknownHostException e) { throw tokenizer.exception("invalid IPv6 address: " + string); } } if (this.prefixBits > 0) { this.prefix = tokenizer.getName(name); } } String rrToString() { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(this.prefixBits); if (this.suffix != null) { stringBuffer.append(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR); stringBuffer.append(this.suffix.getHostAddress()); } if (this.prefix != null) { stringBuffer.append(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR); stringBuffer.append(this.prefix); } return stringBuffer.toString(); } public int getPrefixBits() { return this.prefixBits; } public InetAddress getSuffix() { return this.suffix; } public Name getPrefix() { return this.prefix; } void rrToWire(DNSOutput dNSOutput, Compression compression, boolean z) { dNSOutput.writeU8(this.prefixBits); if (this.suffix != null) { int i = ((128 - this.prefixBits) + 7) / 8; dNSOutput.writeByteArray(this.suffix.getAddress(), 16 - i, i); } if (this.prefix != null) { this.prefix.toWire(dNSOutput, null, z); } } }
[ "ahhmedd16@hotmail.com" ]
ahhmedd16@hotmail.com
3f689598c28a62c1d24f0faad0d0068ace55cff3
de2eff0e71efe69175d7e54889d84d449d6ed974
/ext-api/src/main/java/org/omg/PortableServer/ServantManagerHolder.java
02f081ca5dc93d6bc03774c5d699626742b274ae
[]
no_license
mmusgrov/corba
bb266f631ebdcbabb4719f7d70cb8c766609a3e5
03d993498b68d745018061b39196e7818e0fe64d
refs/heads/master
2021-01-18T10:42:20.114343
2013-01-22T06:02:07
2013-01-22T06:02:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package org.omg.PortableServer; /** * Generated from IDL interface "ServantManager". * * @author JacORB IDL compiler V 2.3.1, 27-May-2009 * @version generated at 10/01/2013 11:46:11 AM */ public final class ServantManagerHolder implements org.omg.CORBA.portable.Streamable{ public ServantManager value; public ServantManagerHolder() { } public ServantManagerHolder (final ServantManager initial) { value = initial; } public org.omg.CORBA.TypeCode _type() { return ServantManagerHelper.type(); } public void _read (final org.omg.CORBA.portable.InputStream in) { value = ServantManagerHelper.read (in); } public void _write (final org.omg.CORBA.portable.OutputStream _out) { ServantManagerHelper.write (_out,value); } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
34ae18159bb13be19133eca9c71e22c4bbee05bb
287daf8dc5337b53f18ded9aad350aa1c2b3e40f
/src/com/zj/junit/TestCases/TestServiceMethod.java
3bc00a16ba2fe674dc001bb58a614bc2e388f721
[]
no_license
zhujiancom/FashionWebSite_Old
e8025c4fe757345c4f888c72dd783ee7beaafcbd
9be254d59356a94f24141a2c20cb3f6ef9a8a456
refs/heads/master
2020-04-05T22:49:06.060625
2014-03-10T10:57:02
2014-03-10T10:57:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,046
java
package com.zj.junit.TestCases; import java.util.Collection; import java.util.List; import java.util.Map; import org.junit.Test; import com.zj.common.utils.PageInfo; import com.zj.common.ztreenode.ZTreeNode; import com.zj.core.dao.ICommonDAO; import com.zj.core.init.ApplicationInitialize; import com.zj.core.po.SysCategory; import com.zj.core.po.SysModule; import com.zj.core.po.SysRole; import com.zj.core.po.SysUser; import com.zj.core.service.ISysCategoryService; import com.zj.core.service.ISysModuleService; import com.zj.core.service.ISysUserService; public class TestServiceMethod extends AbstractTestCase { @SuppressWarnings("rawtypes") private ICommonDAO dao = context.getBean("mysqlDao", ICommonDAO.class); private ISysUserService userService = context.getBean("userService",ISysUserService.class); private ISysModuleService moduleService = context.getBean("moduleService",ISysModuleService.class); private ISysCategoryService categoryService = context.getBean("categoryService", ISysCategoryService.class); @Test public void testLogin() throws Exception{ // SysUserDTO userDTO = new SysUserDTO("zhujiancom"); // userDTO.setPswd("123456"); // userService.login(userDTO); } @Test public void testLoadModules() throws Exception{ SysUser user = (SysUser) dao.get(SysUser.class, 1L); Collection<SysRole> roles = user.getSysRoles(); // List<SysModule> modules = moduleService.loadModulesByRoles(roles); // for(SysModule module:modules){ // System.out.println(module); // } List<ZTreeNode> moduleList = moduleService.loadModulesByRoles(roles, 0L); for(ZTreeNode node:moduleList){ System.out.println(node); } } @Test public void testCategoryTreelist() throws Exception{ List<ZTreeNode> result = categoryService.getCategoryTreeList(0); for(ZTreeNode node:result){ System.out.println(node.toString()); } } @Test public void testCategoryLoadItems() throws Exception{ // PageInfo<SysCategory> items = categoryService.loadCategoryItemList(10, 1, 1); // System.out.println(items); } }
[ "eric87com@gmail.com" ]
eric87com@gmail.com
3afa8e83aea4bb7e75058d96168559ebc33317c2
a0fff392e810de5eeb780980a3299a73e8cc30d9
/app/src/main/java/com/bwie/cartdemo1612b/net/GlideCache.java
0ac2769861d31b866299dc789c83b0ef7e63a9f4
[]
no_license
KsonCode/CartDemo1612B
58cba07542f918efb21ce40f7e1284578b18d7cf
7b47c455c500c9c83437b32e1c43f861eef8b4c7
refs/heads/master
2020-06-04T07:08:42.413137
2019-06-18T09:36:42
2019-06-18T09:36:42
191,917,209
2
0
null
null
null
null
UTF-8
Java
false
false
1,145
java
package com.bwie.cartdemo1612b.net; import android.content.Context; import android.os.Environment; import android.support.annotation.NonNull; import com.bumptech.glide.Glide; import com.bumptech.glide.GlideBuilder; import com.bumptech.glide.Registry; import com.bumptech.glide.annotation.GlideModule; import com.bumptech.glide.load.engine.cache.DiskLruCacheFactory; import com.bumptech.glide.module.AppGlideModule; /** * 自定义缓存路径 */ @GlideModule public class GlideCache extends AppGlideModule { @Override public void applyOptions(Context context, GlideBuilder builder) { super.applyOptions(context, builder); int diskCacheSizeBytes = 1024 * 1024 * 100; // 100 MB //手机app路径 String appRootPath = context.getExternalCacheDir().getAbsolutePath(); builder.setDiskCache( new DiskLruCacheFactory( appRootPath+"/WDDisk", diskCacheSizeBytes ) ); } @Override public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) { super.registerComponents(context, glide, registry); } }
[ "19655910@qq.com" ]
19655910@qq.com
78fa4a6ce1c37ef299a6d2956f0bca013977626d
32b11897ace080471c15b31f0e282689fb732a93
/day01_Java基本语法/src/StringTest.java
fa03490d7bf3e6299b7d51acd84065b663c5dc07
[]
no_license
lxyqaq/JavaStudy
af4c1b1aa3feca937674be80fe3ad563823dfb7d
78ca487bcc9b583ca067c98c90c47d1251a7a3ee
refs/heads/master
2023-02-15T17:30:21.355406
2020-12-30T22:38:50
2020-12-30T22:38:50
292,304,922
1
0
null
null
null
null
UTF-8
Java
false
false
1,932
java
/** * @author lxyqaq * @date 2020/9/2 - 22:08 */ public class StringTest { public static void main(String[] args) { /* String类型变量的使用 1. String属于引用数据类型,翻译为:字符串 2. 声明String类型变量时,使用一对"" 3. String可以和8种基本数据类型变量做运算,且运算只能是连接运算:+ 4. 运算的结果仍然是String类型 */ String str1 = "Hello World"; System.out.println(str1); String str2 = "a"; String str3 = ""; //char c = '';编译不通过 //****************************** int num1 = 2017; String strNum = "学号:"; //+:连接运算 String info = strNum + num1; System.out.println(info); boolean b1 = true; String info1 = strNum + b1; System.out.println(info1); //****************************** //练习1 //a=97;A=65 char c = 'a'; int num = 10; String str = "hello"; //107hello System.out.println(c + num + str); //ahello10 System.out.println(c + str + num); //a10hello System.out.println(c + (num + str)); //107hello System.out.println((c + num) + str); //hello10a System.out.println(str + num + c); //练习2 //* * System.out.println("* *"); //93 System.out.println('*' + '\t' + '*'); //* * System.out.println('*' + "\t" + '*'); //51* System.out.println('*' + '\t' + "*"); //* * System.out.println('*' + ('\t' + "*")); //String str1 = 123;//编译不通过 String str4 = 123 + ""; //"123" System.out.println(str4); //int num1 = str1; //int num1 = (int)str1;//"123" int num2 = Integer.parseInt(str1); //123 System.out.println(num2); } }
[ "lxyqaq0128@gmail.com" ]
lxyqaq0128@gmail.com
1c8d770c256fdb1339238662d42df621ec94f780
855530d7e7245d043e47370d000047865ff43c0f
/src/main/java/br/com/alura/microservices/fornecedor/controller/PedidoController.java
1b004f5eabd5e33cf405c3ba56a8831350efbc89
[]
no_license
gabrielsmartins/spring-cloud-microservice-fornecedor
2e6ea1ebd104e268d44f7699dc767d4b85c7c53d
5c235a53b4aaa8b102b9cc596a0fafd8e429b1c7
refs/heads/master
2020-11-27T14:14:29.910470
2020-01-02T01:04:44
2020-01-02T01:04:44
229,480,162
0
0
null
null
null
null
UTF-8
Java
false
false
1,712
java
package br.com.alura.microservices.fornecedor.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import br.com.alura.microservices.fornecedor.dto.request.ItemPedidoRequestDto; import br.com.alura.microservices.fornecedor.dto.response.PedidoResponseDto; import br.com.alura.microservices.fornecedor.entity.PedidoEntity; import br.com.alura.microservices.fornecedor.mapper.PedidoMapper; import br.com.alura.microservices.fornecedor.service.PedidoService; @RestController @RequestMapping("pedido") public class PedidoController { @Autowired private PedidoService pedidoService; @PostMapping public ResponseEntity<?> realizaPedido(@RequestBody List<ItemPedidoRequestDto> itensRequestDto) { PedidoEntity pedido = pedidoService.realizaPedido(itensRequestDto); PedidoResponseDto pedidoResponseDto = PedidoMapper.mapToDto(pedido); return new ResponseEntity<>(pedidoResponseDto, HttpStatus.CREATED); } @GetMapping("/{id}") public ResponseEntity<?> getPedidoPorId(@PathVariable Long id) { PedidoEntity pedido = pedidoService.getPedidoPorId(id); PedidoResponseDto pedidoResponseDto = PedidoMapper.mapToDto(pedido); return new ResponseEntity<>(pedidoResponseDto, HttpStatus.OK); } }
[ "ga.smartins94@gmail.com" ]
ga.smartins94@gmail.com
8fc7e897c8ab176292251ebce2ee232c99ffdd02
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/syllables/ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f/003/mutations/128/syllables_ca505766_003.java
457bf868f62e4ad1503ccb6d5c770d63091746d5
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,318
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class syllables_ca505766_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { syllables_ca505766_003 mainClass = new syllables_ca505766_003 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { char[] inputString = new char[20]; IntObj length = new IntObj (), k = new IntObj (), j = new IntObj (), syl = new IntObj (); char[] vowels = new char[6]; vowels[0] = 'a'; vowels[1] = 'e'; vowels[2] = 'i'; vowels[3] = 'o'; vowels[4] = 'u'; vowels[5] = 'y'; CharObj temp = new CharObj (); k.value = 0; j.value = 0; syl.value = 0; output += (String.format ("Please enter a string > ")); inputString = scanner.nextLine ().toCharArray (); length.value = inputString.length; for (k.value = 0; (k.value < length.value); k.value++) { temp.value = inputString[length.value]; for (j.value = 0; (j.value < 5); j.value++) { if (temp.value == vowels[j.value]) { syl.value = syl.value + 1; j.value = 5; } } } output += (String.format ("The number of syllables is %d.", syl.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
d729d1c1665d38c374f470afa426f5daa07db00f
8e9ef418ba8f8ecf69dd8b6d21a26908bcc3521c
/org.pennyledger.sql.dialect.derby/src/org/pennyledger/sql/dialect/derby/DerbyEmbeddedDialect.java
c62ed4cc60a6ee56ae05daa3e6daa8788797ba6e
[]
no_license
kevinau/pennyledger
b520b5ec8df59e877aa06c525efb825317a9796f
2e3da70edadf50351790cbbf5a6606f95b963755
refs/heads/master
2021-03-24T11:59:33.610671
2016-09-24T06:28:27
2016-09-24T06:28:27
8,891,518
0
0
null
null
null
null
UTF-8
Java
false
false
1,673
java
package org.pennyledger.sql.dialect.derby; import java.nio.file.Path; import java.nio.file.Paths; import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; import org.pennyledger.osgi.ComponentConfiguration; import org.pennyledger.osgi.Configurable; import org.pennyledger.sql.dialect.IDialect; /** * An implementation of IDialect for the Derby database. * * @author Kevin Holloway * */ @Component(property={"dialect:String=derbyEmbedded"}, service=IDialect.class) public class DerbyEmbeddedDialect extends DerbyServerDialect { /** * The path under which Derby creates all its files. If this path is not configured, * it defaults to {user.home}/derby. */ @Configurable private Path derbyDir; @Activate protected void activate (ComponentContext context) { ComponentConfiguration.load(this, context); } @Deactivate protected void deactivate (ComponentContext context) { derbyDir = null; } @Override public String getName () { return "derbyEmbedded"; } @Override public String getURLTemplate () { if (derbyDir == null) { derbyDir = Paths.get(System.getProperty("user.home"), "derby"); // if (!Files.exists(derbyDir)) { // try { // Files.createDirectories(derbyDir); // } catch (IOException ex) { // throw new UncheckedIOException(ex); // } // } } return "jdbc:derby:directory:" + derbyDir + "/{1};create=true"; } }
[ "kholloway@geckosoftware.com.au" ]
kholloway@geckosoftware.com.au
56077c3bd4a1c7d1778549a0dfed85778fb8dc15
c0a717b3cae89fd5f7afd5270644774fde8b6ec1
/adm/src/java/com/sun/honeycomb/adm/client/PrintStreamCallback.java
d671993f29b573cf8c16759853f836d6e44a537b
[]
no_license
elambert/honeycomb
c11f60ace76ca0ab664e61b4d2ff7ead4653e0de
abd6ce4381b5db36a6c6b23e84c1fb8e8412d7b5
refs/heads/master
2020-03-27T22:39:34.505640
2012-08-29T20:09:16
2012-08-29T20:09:16
472,780
3
1
null
2012-08-29T19:52:10
2010-01-14T23:39:04
Java
WINDOWS-1252
Java
false
false
2,375
java
/* * Copyright © 2008, Sun Microsystems, Inc. * * 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 Sun Microsystems, Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 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.sun.honeycomb.adm.client; import java.io.Writer; import java.io.OutputStreamWriter; import java.io.BufferedWriter; import java.io.PrintStream; import java.io.IOException; import com.sun.honeycomb.mgmt.client.MethodCallback; public class PrintStreamCallback implements MethodCallback { private Writer wout; public PrintStreamCallback(PrintStream out) { try { wout = new BufferedWriter(new OutputStreamWriter(out, "UTF-8")); } catch (Exception ignore) { } } public String callback(String message) { try { wout.write(message, 0, message.length()); wout.flush(); } catch (IOException ioe) { System.out.println("failed to write schema on output"); } return "dummy"; } }
[ "eric.d.lambert@gmail.com" ]
eric.d.lambert@gmail.com
58383806e1466526816675abe85041a62aaca82a
6afbc6f970e03f1f84485764f472fcce2e703004
/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiVersionConcurrencyControl.java
bc9e39b301188bc3191ac3f86ececd6d85f238bd
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-protobuf", "CC-BY-3.0" ]
permissive
ukihsoroy/hbase-1.4
a9b1f03182017400fa2596e770f1e814dd332a32
ae851e7820d66ee2a44786540f014324b56213f4
refs/heads/master
2023-08-11T02:48:14.621791
2020-08-06T14:48:28
2020-08-06T14:48:28
275,592,246
0
0
Apache-2.0
2023-07-23T21:31:26
2020-06-28T13:37:09
Java
UTF-8
Java
false
false
4,182
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.hadoop.hbase.regionserver; import junit.framework.TestCase; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.junit.experimental.categories.Category; import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; /** * This is a hammer test that verifies MultiVersionConcurrencyControl in a * multiple writer single reader scenario. */ @Category(SmallTests.class) public class TestMultiVersionConcurrencyControl extends TestCase { static class Writer implements Runnable { final AtomicBoolean finished; final MultiVersionConcurrencyControl mvcc; final AtomicBoolean status; Writer(AtomicBoolean finished, MultiVersionConcurrencyControl mvcc, AtomicBoolean status) { this.finished = finished; this.mvcc = mvcc; this.status = status; } private Random rnd = new Random(); public boolean failed = false; public void run() { while (!finished.get()) { MultiVersionConcurrencyControl.WriteEntry e = mvcc.begin(); // System.out.println("Begin write: " + e.getWriteNumber()); // 10 usec - 500usec (including 0) int sleepTime = rnd.nextInt(500); // 500 * 1000 = 500,000ns = 500 usec // 1 * 100 = 100ns = 1usec try { if (sleepTime > 0) Thread.sleep(0, sleepTime * 1000); } catch (InterruptedException e1) { } try { mvcc.completeAndWait(e); } catch (RuntimeException ex) { // got failure System.out.println(ex.toString()); ex.printStackTrace(); status.set(false); return; // Report failure if possible. } } } } public void testParallelism() throws Exception { final MultiVersionConcurrencyControl mvcc = new MultiVersionConcurrencyControl(); final AtomicBoolean finished = new AtomicBoolean(false); // fail flag for the reader thread final AtomicBoolean readerFailed = new AtomicBoolean(false); final AtomicLong failedAt = new AtomicLong(); Runnable reader = new Runnable() { public void run() { long prev = mvcc.getReadPoint(); while (!finished.get()) { long newPrev = mvcc.getReadPoint(); if (newPrev < prev) { // serious problem. System.out.println("Reader got out of order, prev: " + prev + " next was: " + newPrev); readerFailed.set(true); // might as well give up failedAt.set(newPrev); return; } } } }; // writer thread parallelism. int n = 20; Thread[] writers = new Thread[n]; AtomicBoolean[] statuses = new AtomicBoolean[n]; Thread readThread = new Thread(reader); for (int i = 0; i < n; ++i) { statuses[i] = new AtomicBoolean(true); writers[i] = new Thread(new Writer(finished, mvcc, statuses[i])); writers[i].start(); } readThread.start(); try { Thread.sleep(10 * 1000); } catch (InterruptedException ex) { } finished.set(true); readThread.join(); for (int i = 0; i < n; ++i) { writers[i].join(); } // check failure. assertFalse(readerFailed.get()); for (int i = 0; i < n; ++i) { assertTrue(statuses[i].get()); } } }
[ "ko.shen@hotmail.com" ]
ko.shen@hotmail.com
1230c15ee46b42adea1c794f376a58e6eb0af5de
c2fb6846d5b932928854cfd194d95c79c723f04c
/java_backup/my java/ReesavXI_S/Inheritance/Bestfour.java
974562dbbc484b85eef7677db5eb9db7ca8c0a92
[ "MIT" ]
permissive
Jimut123/code-backup
ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59
8d4c16b9e960d352a7775786ea60290b29b30143
refs/heads/master
2022-12-07T04:10:59.604922
2021-04-28T10:22:19
2021-04-28T10:22:19
156,666,404
9
5
MIT
2022-12-02T20:27:22
2018-11-08T07:22:48
Jupyter Notebook
UTF-8
Java
false
false
314
java
package Inheritance; import java.util.*; class Bestfour extends IscScores { void bestsubjects() { super.input(); int points=0; for(int i=0;i<6;i++) { points+=point(number[i][0]); } System.out.print("Total points "+points); } }
[ "jimutbahanpal@yahoo.com" ]
jimutbahanpal@yahoo.com
26e231fd1b0e81a8c9df260c22c4d153a06627b7
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/jdbi/learning/2968/RegisterRowMapperFactoriesImpl.java
2dff620a8ee372dda6f55293a857b3e3341d75ad
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,579
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jdbi.v3.sqlobject.config.internal; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.stream.Stream; import org.jdbi.v3.core.config.ConfigRegistry; import org.jdbi.v3.sqlobject.config.Configurer; import org.jdbi.v3.sqlobject.config.RegisterRowMapperFactories; public class RegisterRowMapperFactoriesImpl implements Configurer { @Override public void configureForMethod(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType, Method method) { configureForType(registry, annotation , sqlObjectType); } @Override public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType) { Configurer delegate = new RegisterRowMapperFactoryImpl(); RegisterRowMapperFactories registerRowMapperFactories = (RegisterRowMapperFactories) annotation; Stream.of(registerRowMapperFactories.value()).forEach(anno -> delegate.configureForType(registry, anno, sqlObjectType)); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
67e9e8cd8ee2bb6d177634db0c83992ac653b7a8
f537eaaee279085ff7e7b7e72b1b2324635129dc
/src/main/java/com/yikangyiliao/pension/dao/SurveyTableDao.java
92cdc1f6fd6c371fcecc136a89a963bd13b64ce8
[]
no_license
yikangmc/yikangService
c74124b059e643ef412228bac8a0d58ef75ee21f
4b756554cd8a97df9b7c50f37887e8f228d7ef8a
refs/heads/master
2021-01-23T14:06:18.771321
2016-11-15T05:53:12
2016-11-15T05:53:12
56,838,269
2
1
null
null
null
null
UTF-8
Java
false
false
2,089
java
package com.yikangyiliao.pension.dao; import java.util.List; import java.util.Map; import com.yikangyiliao.pension.entity.SurveyTable; public interface SurveyTableDao { int deleteByPrimaryKey(Long surveyTableId); int insert(SurveyTable record); int insertSelective(SurveyTable record); SurveyTable selectByPrimaryKey(Long surveyTableId); int updateByPrimaryKeySelective(SurveyTable record); int updateByPrimaryKey(SurveyTable record); /** * @author liushuaic * @date 2015/08/06 * * **/ List<Map<String,Object>> getQuestionCrosswiseByTableName(String tableName); /** * @author liushuaic * @date 2015/08/06 * * **/ Map<String,Object> getQuestionCrosswiseByTableNameTwo(String tableName); /** * @author liushuaic * @date 2015/08/12 11:47 * @desc 根据某一个表,查询出所有的问题及答案 * */ Map<String,Object> getQuestionsAndAnswersByTableName(String tableName); /** * @author liushuaic * @date 2015/08/18 17:44 * @desc 获取某一个表中的某一个老人 评估状态 * **/ List<Map<String,Object>> getTableListByAssessmentId(Long assessmentId); /** * @author liushuaic * @date 2015/08/19 15:20 * @param assessmentId 档案袋id * @param surveyTableId 表id ` * */ Map<String,Object> getQuestionsAndAnswersIsCheck(Map<String,Object> paramData); /** * @author liushuaic * @date 2015/08/20 14:20 * @param assessmentId 档案袋id * @param surveyTableId 表id * @param questionCrosswiseId 问题分类id ` * */ Map<String,Object> getQuestionAndAnswersIsCheckTwo(Map<String,Object> paramData); /** * @author liushuaic * @date 2015/08/24 11:54 * @param assessmentId 档案袋id * @param surveyTableId 表id * 查询某一个表,所有问题, 所有答案 * */ Map<String,Object> getQuestionAndAnswersIsCheckThree(Map<String,Object> paramData); }
[ "lavedream@hotmail.com" ]
lavedream@hotmail.com
f93ef0b61512b43be6d8225ffbf3df75efb9b64d
38b42aa714e2489714dd02f45d9fa88665257f5f
/ipanti/src/main/java/com/jdcloud/sdk/service/ipanti/client/DescribeCustomPagesExecutor.java
cb02ed2f618fe0079e8f799a207248de342f85e1
[ "Apache-2.0" ]
permissive
Tanc009/jdcloud-sdk-java
6de6c2cb521d5946de08b9503baa37f859f89848
12181e43d1396218e79639dbee387852c85b93b2
refs/heads/master
2021-08-09T01:17:14.569048
2021-06-25T02:51:24
2021-06-25T02:51:24
130,201,324
0
0
Apache-2.0
2018-04-19T10:48:05
2018-04-19T10:48:05
null
UTF-8
Java
false
false
1,423
java
/* * Copyright 2018 JDCLOUD.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. * * Anti DDos Pro Instance APIs * Anti DDos Pro Instance APIs * * OpenAPI spec version: v1 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.ipanti.client; import com.jdcloud.sdk.client.JdcloudExecutor; import com.jdcloud.sdk.service.JdcloudResponse; import com.jdcloud.sdk.service.ipanti.model.DescribeCustomPagesResponse; /** * 查询自定义页面列表 */ class DescribeCustomPagesExecutor extends JdcloudExecutor { @Override public String method() { return "GET"; } @Override public String url() { return "/regions/{regionId}/instances/{instanceId}/customPages"; } @Override public Class<? extends JdcloudResponse> returnType() { return DescribeCustomPagesResponse.class; } }
[ "tancong@jd.com" ]
tancong@jd.com
6c6b39197611f2ec309a0701485a7d078a519487
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/security/server/command/GetSecurityRoleGroupChoicesCommand.java
fb9d716ecca9beda1e5bd6be737202c5809b2783
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
3,911
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // 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.echothree.control.user.security.server.command; import com.echothree.control.user.security.common.form.GetSecurityRoleGroupChoicesForm; import com.echothree.control.user.security.common.result.GetSecurityRoleGroupChoicesResult; import com.echothree.control.user.security.common.result.SecurityResultFactory; import com.echothree.model.control.party.common.PartyTypes; import com.echothree.model.control.security.common.SecurityRoleGroups; import com.echothree.model.control.security.common.SecurityRoles; import com.echothree.model.control.security.server.control.SecurityControl; import com.echothree.model.data.user.common.pk.UserVisitPK; import com.echothree.util.common.validation.FieldDefinition; import com.echothree.util.common.validation.FieldType; import com.echothree.util.common.command.BaseResult; import com.echothree.util.server.control.BaseSimpleCommand; import com.echothree.util.server.control.CommandSecurityDefinition; import com.echothree.util.server.control.PartyTypeDefinition; import com.echothree.util.server.control.SecurityRoleDefinition; import com.echothree.util.server.persistence.Session; import java.util.Arrays; import java.util.Collections; import java.util.List; public class GetSecurityRoleGroupChoicesCommand extends BaseSimpleCommand<GetSecurityRoleGroupChoicesForm> { private final static CommandSecurityDefinition COMMAND_SECURITY_DEFINITION; private final static List<FieldDefinition> FORM_FIELD_DEFINITIONS; static { COMMAND_SECURITY_DEFINITION = new CommandSecurityDefinition(Collections.unmodifiableList(Arrays.asList( new PartyTypeDefinition(PartyTypes.EMPLOYEE.name(), Collections.unmodifiableList(Arrays.asList( new SecurityRoleDefinition(SecurityRoleGroups.SecurityRoleGroup.name(), SecurityRoles.Choices.name()) ))) ))); FORM_FIELD_DEFINITIONS = Collections.unmodifiableList(Arrays.asList( new FieldDefinition("DefaultSecurityRoleGroupChoice", FieldType.ENTITY_NAME, false, null, null), new FieldDefinition("AllowNullChoice", FieldType.BOOLEAN, true, null, null) )); } /** Creates a new instance of GetSecurityRoleGroupChoicesCommand */ public GetSecurityRoleGroupChoicesCommand(UserVisitPK userVisitPK, GetSecurityRoleGroupChoicesForm form) { super(userVisitPK, form, COMMAND_SECURITY_DEFINITION, FORM_FIELD_DEFINITIONS, false); } @Override protected BaseResult execute() { var securityControl = Session.getModelController(SecurityControl.class); GetSecurityRoleGroupChoicesResult result = SecurityResultFactory.getGetSecurityRoleGroupChoicesResult(); String defaultSecurityRoleGroupChoice = form.getDefaultSecurityRoleGroupChoice(); boolean allowNullChoice = Boolean.parseBoolean(form.getAllowNullChoice()); result.setSecurityRoleGroupChoices(securityControl.getSecurityRoleGroupChoices(defaultSecurityRoleGroupChoice, getPreferredLanguage(), allowNullChoice)); return result; } }
[ "rich@echothree.com" ]
rich@echothree.com
7b662eaa4c17f4b9b50037fb2bd91ff35fde5e78
83284b69f682904fe692428e4339c03d1b229b76
/app/src/main/java/com/benben/yishanbang/ui/home/activity/QRCodeActivity.java
653fb8d0209de0560b7ab8af61bbd193f6690c86
[]
no_license
wanghkzzz/YiShanBang
cc749a7163f78a9dcb418d6876ce5c8aaa6b30ab
2777e818fd8375ff16e47b4d8110bea9bf798f7c
refs/heads/master
2020-08-03T15:22:18.702281
2019-09-30T07:30:37
2019-09-30T07:30:37
211,798,525
1
0
null
null
null
null
UTF-8
Java
false
false
5,448
java
package com.benben.yishanbang.ui.home.activity; import android.content.Intent; import android.os.Bundle; import android.os.Vibrator; import android.util.Log; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.benben.commoncore.utils.JSONUtils; import com.benben.commoncore.utils.LogUtils; import com.benben.commoncore.utils.StringUtils; import com.benben.yishanbang.MyApplication; import com.benben.yishanbang.R; import com.benben.yishanbang.base.BaseActivity; import com.benben.yishanbang.ui.mine.activity.WriteOffCardOrderDetailsActivity; import com.benben.yishanbang.ui.mine.activity.WriteOffTeaOrderDetailsActivity; import butterknife.BindView; import butterknife.OnClick; import cn.bingoogolapple.qrcode.core.QRCodeView; import cn.bingoogolapple.qrcode.zxing.ZXingView; /** * Created by lixiaofeng on 2018/11/21. */ public class QRCodeActivity extends BaseActivity implements QRCodeView.Delegate { @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.iv_back) ImageView ivBack; @BindView(R.id.zxingview) ZXingView zxingview; @Override protected int getLayoutId() { return R.layout.activity_qr_code; } @Override protected void initData() { zxingview.setDelegate(this); } @OnClick({R.id.iv_back}) public void onViewClicked(View view) { Intent intent = null; switch (view.getId()) { //返回 case R.id.iv_back: finish(); break; } } @Override protected void onStart() { super.onStart(); zxingview.startCamera(); // 打开后置摄像头开始预览,但是并未开始识别 // zxingview.startCamera(Camera.CameraInfo.CAMERA_FACING_FRONT); // 打开前置摄像头开始预览,但是并未开始识别 zxingview.startSpotAndShowRect(); // 显示扫描框,并且延迟0.1秒后开始识别 } @Override protected void onStop() { zxingview.stopCamera(); // 关闭摄像头预览,并且隐藏扫描框 super.onStop(); } @Override protected void onDestroy() { zxingview.onDestroy(); // 销毁二维码扫描控件 super.onDestroy(); } private void vibrate() { Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE); vibrator.vibrate(200); } @Override public void onScanQRCodeSuccess(String result) { LogUtils.e("TAG", "扫码结果:" + result); // vibrate(); if (StringUtils.isEmpty(result)) { toast("扫描错误,请重试"); return; } String orderType = JSONUtils.getNoteJson(result, "orderType"); if (StringUtils.isEmpty(orderType)) { //纸巾机 String number = JSONUtils.getNoteJson(result, "number"); Bundle bundle = new Bundle(); bundle.putString("number", number); MyApplication.openActivity(mContext, PageListActivity.class, bundle); finish(); return; } switch (orderType) { case "3"://奶茶 String foodCode = JSONUtils.getNoteJson(result, "foodCode"); String orderId = JSONUtils.getNoteJson(result, "orderId"); String userId = JSONUtils.getNoteJson(result, "userId"); Bundle teaBundle = new Bundle(); teaBundle.putString("foodCode", foodCode); teaBundle.putString("orderId", orderId); teaBundle.putString("userId", userId); MyApplication.openActivity(mContext, WriteOffTeaOrderDetailsActivity.class, teaBundle); finish(); break; case "0"://优惠卡 String cardId = JSONUtils.getNoteJson(result, "cardId"); String cardOrderId = JSONUtils.getNoteJson(result, "orderId"); String cardUserId = JSONUtils.getNoteJson(result, "userId"); Bundle cardBundle = new Bundle(); cardBundle.putString("cardId", cardId); cardBundle.putString("orderId", cardOrderId); cardBundle.putString("userId", cardUserId); MyApplication.openActivity(mContext, WriteOffCardOrderDetailsActivity.class, cardBundle); finish(); break; } } @Override public void onCameraAmbientBrightnessChanged(boolean isDark) { // 这里是通过修改提示文案来展示环境是否过暗的状态,接入方也可以根据 isDark 的值来实现其他交互效果 String tipText = zxingview.getScanBoxView().getTipText(); String ambientBrightnessTip = "\n环境过暗,请打开闪光灯"; if (isDark) { if (!tipText.contains(ambientBrightnessTip)) { zxingview.getScanBoxView().setTipText(tipText + ambientBrightnessTip); } } else { if (tipText.contains(ambientBrightnessTip)) { tipText = tipText.substring(0, tipText.indexOf(ambientBrightnessTip)); zxingview.getScanBoxView().setTipText(tipText); } } } @Override public void onScanQRCodeOpenCameraError() { Log.e("TAG", "打开相机出错"); } @Override protected int getStatusBarColor() { return R.color.qr_code_state; } }
[ "1157038440@qq.com" ]
1157038440@qq.com
82e400e8f94f16f681541eb31412abab46803b09
d65a33196a495aa0001b89e321d02fae23721eb6
/quickcall-common/quickcall-cmomon-third/src/main/java/com/honglu/quickcall/common/third/newrongyun/io/rong/example/group/GroupExample.java
a34fc0a14e2aeddab94c801991ac4a584fb0c258
[]
no_license
zihanbobo/Repository
5c168307848d2639fef7649d4121f37c498a2e7c
db9e91931899f5ef3e5af07722ecee0aa9fb1d02
refs/heads/master
2021-10-10T08:58:19.052522
2018-11-28T13:22:10
2018-11-28T13:22:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,709
java
package com.honglu.quickcall.common.third.newrongyun.io.rong.example.group; import com.honglu.quickcall.common.third.newrongyun.io.rong.RongCloud; import com.honglu.quickcall.common.third.newrongyun.io.rong.methods.group.Group; import com.honglu.quickcall.common.third.newrongyun.io.rong.models.Result; import com.honglu.quickcall.common.third.newrongyun.io.rong.models.group.GroupMember; import com.honglu.quickcall.common.third.newrongyun.io.rong.models.group.GroupModel; import com.honglu.quickcall.common.third.newrongyun.io.rong.models.group.UserGroup; import com.honglu.quickcall.common.third.newrongyun.io.rong.models.response.GroupUserQueryResult; /** * * 群组服务示例 * * @author RongCloud * * @version 3.0.0 */ public class GroupExample { /** * 此处替换成您的appKey */ private static final String appKey = "appKey"; /** * 此处替换成您的appSecret */ private static final String appSecret = "appSecret"; /** * 自定义api地址 */ private static final String api = "http://api.cn.ronghub.com"; /** * 本地调用测试 * * @param args * @throws Exception */ public static void main(String[] args) throws Exception { RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret); // 自定义 api 地址方式 // RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret,api); Group Group = rongCloud.group; /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#create * * 创建群组方法 * */ GroupMember[] members = { new GroupMember().setId("ghJiu7H1"), new GroupMember().setId("ghJiu7H2") }; GroupModel group = new GroupModel().setId("groupId").setMembers(members).setName("groupName"); Result groupCreateResult = (Result) Group.create(group); System.out.println("group create result: " + groupCreateResult.toString()); /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#sync * * 同步用户所属群组方法 */ GroupModel group1 = new GroupModel().setId("groupId1").setName("groupName1"); GroupModel group2 = new GroupModel().setId("groupId2").setName("groupName2"); GroupModel[] groups = { group1, group2 }; UserGroup user = new UserGroup().setId("jhkoi90jj").setGroups(groups); Result syncResult = (Result) Group.sync(user); System.out.println("group sync: " + syncResult.toString()); /** * * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#refresh * 刷新群组信息方法 */ // GroupMember[] members = {new GroupMember().setId("ghJiu7H1"),new // GroupMember().setId("ghJiu7H2")}; group = new GroupModel().setId("groupId").setName("groupName"); Result refreshResult = (Result) Group.update(group); System.out.println("refresh: " + refreshResult.toString()); /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#join * * 邀请用户加入群组 * */ group = new GroupModel().setId("hdiuj87jj").setMembers(members).setName("groupName"); Result groupInviteResult = (Result) rongCloud.group.invite(group); System.out.println("invite: " + groupInviteResult.toString()); /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#join * * 用户加入指定群组 * */ group = new GroupModel().setId("groupId").setMembers(members).setName("groupName"); Result groupJoinResult = (Result) Group.join(group); System.out.println("join: " + groupJoinResult.toString()); /** * API 文档: * http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#getMembers * * 查询群成员方法 * */ group = new GroupModel().setId("groupId"); GroupUserQueryResult getMemberesult = Group.get(group); System.out.println("group getMember: " + getMemberesult.toString()); /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#quit * * 退出群组 * */ group = new GroupModel().setId("groupId").setMembers(members).setName("groupName"); Result groupQuitResult = (Result) Group.quit(group); System.out.println("quit: " + groupQuitResult.toString()); /** * * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/group/group.html#dismiss * * 解散群组 * */ members = new GroupMember[] { new GroupMember().setId("ghJiu7H1") }; group = new GroupModel().setId("groupId").setMembers(members); Result groupDismissResult = (Result) Group.dismiss(group); System.out.println("dismiss: " + groupDismissResult.toString()); } }
[ "liyingtang@xiaoniu.com" ]
liyingtang@xiaoniu.com
9f6d80d89f6163a679d13c61e6502d24f2f75415
15d038d7904d0859bd6fe884cd02276a7bf6aab5
/2016/19.Memento/src/com/alg/dp/memento/solution1/Inventory.java
3a58206e49cb797c1a2b9a732249ab03c5946929
[]
no_license
DharmendraPrajapati/design-patterns
e9246b672d56d73fa915e7d5e35a4deed50760cc
3e2bc6b7ad5ac46884d40b7938c09484be2ee12f
refs/heads/master
2022-02-15T21:17:36.971028
2019-09-15T03:57:38
2019-09-15T03:57:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,182
java
package com.alg.dp.memento.solution1; import java.util.HashMap; public class Inventory { private HashMap<Integer, Movie> movies = new HashMap<Integer, Movie>(); public void addMovie(Movie movie) { movies.put(movie.getId(), movie); } public void sellMovie(int id) { Movie tmp = movies.get(id); if(tmp == null) { System.out.println("Movie does not exist"); return; } if(tmp.getCopies() == 0) { System.out.println("Not available"); return; } tmp.setCopies(tmp.getCopies()-1); } public void addCopy(int id, int ncopies) { Movie tmp = movies.get(id); if(tmp == null) { System.out.println("Movie does not exist"); return; } tmp.setCopies(tmp.getCopies()+ncopies); } public void changePrice(int id, float price) { Movie tmp = movies.get(id); if(tmp == null) { System.out.println("Movie does not exist"); return; } tmp.setPrice(price); } public int findCopies(int id) { Movie tmp = movies.get(id); if(tmp == null) { System.out.println("Movie does not exist"); return -1; } return tmp.getCopies(); } @Override public String toString() { return "Inventory [movies=" + movies + "]"; } }
[ "info@algorithmica.co.in" ]
info@algorithmica.co.in
f4b550598e2738e4aaf2ffdc66676e8a0797a002
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1022/src/main/java/module1022packageJava0/Foo587.java
2ca23cc2ff1d3d4277a884774fac4909bf539a71
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
296
java
package module1022packageJava0; import java.lang.Integer; public class Foo587 { Integer int0; public void foo0() { new module1022packageJava0.Foo586().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
f131aecf3cbd48dbd71d2e9edb0315365b8b75c3
3df2c0132487b6fff67fe2bcbf6dfa127d2cfb0b
/src/lectures/ui/extra/BMICalculator.java
a7ce336e7923c62311e3d09e5a3a46db12992e5c
[]
no_license
Dnam00/JavaTeaching
e899df112324c6b390d7f46f3113804a98152e9e
68647445ad774cbaabac9c154eb31b7bf8115a8b
refs/heads/master
2023-05-04T18:38:20.750596
2021-05-15T21:53:42
2021-05-15T21:53:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package lectures.ui.extra; public interface BMICalculator { public double calculateBMI(double aHeight, double aWeight); }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu
172ad3b45888416785710a3e347beb4168af2e47
ce7167cfa3001c470680010eab79fa9ed2582b8e
/mc_executor/src/main/java/com/xiangrikui/api/mc/executor/http/RequestManager.java
bc6fd599247f4bfa5c895f5bfd50f1ad8a9cda5c
[]
no_license
mendylee/message-center
ff0f2f6eaeeedc7a592260cf5fa57dc9aa0a7ce1
9635eaf8e22d625aad076a6093406925341c0ee0
refs/heads/master
2020-04-07T01:56:20.006583
2018-11-17T06:36:31
2018-11-17T06:36:31
157,957,775
0
0
null
null
null
null
UTF-8
Java
false
false
3,493
java
package com.xiangrikui.api.mc.executor.http; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.gson.Gson; import com.xiangrikui.api.mc.common.http.HTTP; import com.xiangrikui.api.mc.common.http.Request; import com.xiangrikui.api.mc.common.http.Response; import com.xrk.hws.http.monitor.support.TraceInfoVo; /** * * RequestManager: RequestManager.java. * * <br>========================== * <br> 公司:广州向日葵信息科技有限公司 * <br> 开发:yexx<yexiaoxiao@xiangrikui.com> * <br> 版本:1.0 * <br> 创建时间:2016年5月19日 下午3:12:58 * <br> JDK版本:1.8 * <br>========================== */ public class RequestManager { private static final Logger LOGGER = LoggerFactory.getLogger(RequestManager.class); private static final String DEFAULT_XRK_TRACE_ID = "xrk_trace_id"; private static final String DEFAULT_XRK_TRACE_PATH = "xrk_trace_path"; //请求超时时间 //默认为2秒 public static final int DEFAULT_REQUEST_TIMEOUT_SECOND = 2; private static int requestTimeoutSecond = DEFAULT_REQUEST_TIMEOUT_SECOND; private static Gson gson = new Gson(); /** * * 投递消息 * 将生产者的消息投递给消费者指定的callback_url * 使用http post方法 * 将消息以json格式附在http请求的body处 * * @param url callback_url * @param pushEntity 默认的通用推送实体 * @return */ public static boolean postMessage(String url, PushEntity pushEntity,String traceLogContent) { LOGGER.debug("prepare to post message, url: {}, message: {},traceLogContent: {}", url, pushEntity.toString(),traceLogContent); boolean ret = false; //url 有效性验证 //暂缺 Request request = new Request(url); String bodyStr; try { bodyStr = gson.toJson(pushEntity); } catch (Exception e) { LOGGER.error(String.format("fail to get json, url: %s, pushEntity: %s", url, pushEntity.toString()), e); return false; } byte[] body = bodyStr.getBytes(); request.setBody(body); Map<String, String> headers = new HashMap<String, String>(); headers.put("Content-Type", "application/json"); TraceInfoVo traceInfo = gson.fromJson(traceLogContent, TraceInfoVo.class); headers.put(DEFAULT_XRK_TRACE_ID, traceInfo.getTraceId()); headers.put(DEFAULT_XRK_TRACE_PATH, traceInfo.getTracePath()); request.setHeaders(headers); try { Response response = HTTP.POST(request, requestTimeoutSecond); if (response == null) { LOGGER.error("fail to request, response is null, url: {}, message: {}", url, bodyStr); } else { String content = response.getContent(); int statusCode = response.getStatusCode(); LOGGER.debug("get response successfully! url: {}, message: {}, content: {}, statusCode: {}", url, bodyStr, content, statusCode); if (statusCode > 300) { LOGGER.debug("httpCode is wrong, url: {}, message: {}, statusCode: {}", url, bodyStr, statusCode); } else { LOGGER.debug("post message successfully! url: {}, content: {}", url, content); ret = true; } } } catch (IOException e) { //IO异常 LOGGER.error(String.format("fail to request, url: %s, message: %s", url, bodyStr), e); } catch (Exception e) { //内部服务异常 LOGGER.error(String.format("fail to request, url: %s, message: %s", url, bodyStr), e); } return ret; } }
[ "yufuyong@xiangrikui.com" ]
yufuyong@xiangrikui.com
90ab29ae8255061eba899d32cd38d42cf6012243
5d00b27e4022698c2dc56ebbc63263f3c44eea83
/gen/com/ah/xml/be/config/IkePfsGroupValue.java
83c2e5ec7f9180b40371eb13ed3a0e9c0a57ea5c
[]
no_license
Aliing/WindManager
ac5b8927124f992e5736e34b1b5ebb4df566770a
f66959dcaecd74696ae8bc764371c9a2aa421f42
refs/heads/master
2020-12-27T23:57:43.988113
2014-07-28T17:58:46
2014-07-28T17:58:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.07.01 at 11:29:17 AM CST // package com.ah.xml.be.config; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ike-pfs-group-value. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ike-pfs-group-value"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="group1"/> * &lt;enumeration value="group2"/> * &lt;enumeration value="group5"/> * &lt;enumeration value="no-pfs"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "ike-pfs-group-value") @XmlEnum public enum IkePfsGroupValue { @XmlEnumValue("group1") GROUP_1("group1"), @XmlEnumValue("group2") GROUP_2("group2"), @XmlEnumValue("group5") GROUP_5("group5"), @XmlEnumValue("no-pfs") NO_PFS("no-pfs"); private final String value; IkePfsGroupValue(String v) { value = v; } public String value() { return value; } public static IkePfsGroupValue fromValue(String v) { for (IkePfsGroupValue c: IkePfsGroupValue.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "zjie@aerohive.com" ]
zjie@aerohive.com
0670dc8c974f487ebb4d0dcbf359bd0f1eb75914
52019a46c8f25534afa491a5f68bf5598e68510b
/core/remoting/src/main/java/org/nakedobjects/remoting/data/common/NullData.java
970fe4826c7cba70d41fc6274613718648f63752
[ "Apache-2.0" ]
permissive
JavaQualitasCorpus/nakedobjects-4.0.0
e765b4980994be681e5562584ebcf41e8086c69a
37ee250d4c8da969eac76749420064ca4c918e8e
refs/heads/master
2023-08-29T13:48:01.268876
2020-06-02T18:07:23
2020-06-02T18:07:23
167,005,009
0
1
Apache-2.0
2022-06-10T22:44:43
2019-01-22T14:08:50
Java
UTF-8
Java
false
false
189
java
package org.nakedobjects.remoting.data.common; import org.nakedobjects.remoting.data.Data; public interface NullData extends Data { } // Copyright (c) Naked Objects Group Ltd.
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
329abce30d882f73c339f0058030da64e3833e84
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator3964.java
f566d62c607c22768551a00ec63b29f9093f5402
[]
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
267
java
package syncregions; public class BoilerActuator3964 { public int execute(int temperatureDifference3964, boolean boilerStatus3964) { //sync _bfpnGUbFEeqXnfGWlV3964, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
db1d8f430aaf1093b7a498ee3931a1049d5baf76
83d56024094d15f64e07650dd2b606a38d7ec5f1
/Construccion/PROYECTO.SICC/FAC/ENTIDADES/src/es/indra/sicc/entidades/fac/ImpresoraVirtualLocal.java
58d7ade2a0360aaf89f0cea41b740da57d595653
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,405
java
package es.indra.sicc.entidades.fac; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="FAC_IMPRE_VIRTU") public class ImpresoraVirtualLocal implements Serializable { public ImpresoraVirtualLocal() {} public ImpresoraVirtualLocal(Long oid, Long pais, String codigoImpresora, String descripcion, Long tipo, Long statusActivo) { this.oid=oid; this.pais = pais; this.codigoImpresora = codigoImpresora; this.descripcion = descripcion; this.tipo = tipo; this.statusActivo = statusActivo; } public ImpresoraVirtualLocal(Long oid,Long pais, String codigoImpresora, String descripcion, Long tipo, Long statusActivo, String atributo_1) { this.oid=oid; this.pais = pais; this.codigoImpresora = codigoImpresora; this.descripcion = descripcion; this.tipo = tipo; this.statusActivo = statusActivo; this.atributo_1 = atributo_1; } @Id @Column(name="OID_IMPR") private Long oid; @Column(name="PAIS_OID_PAIS") private Long pais; @Column(name="COD_IMPR") private String codigoImpresora; @Column(name="DES_IMPR") private String descripcion; @Column(name="TIIM_OID_TIPO") private Long tipo; @Column(name="IND_ESTA_ACTI") private Long statusActivo; @Column(name="VAL_ATR1") private String atributo_1; public Long getOid() {return oid;} //public void setOid(Long oid){this.oid=oid;} public Long getPrimaryKey() {return oid;} public Long getPais() {return pais;} public void setPais(Long pais){this.pais=pais;} public String getCodigoImpresora() {return codigoImpresora;} public void setCodigoImpresora(String codigoImpresora){this.codigoImpresora=codigoImpresora;} public String getDescripcion() {return descripcion;} public void setDescripcion(String descripcion){this.descripcion=descripcion;} public Long getTipo() {return tipo;} public void setTipo(Long tipo){this.tipo=tipo;} public Long getStatusActivo() {return statusActivo;} public void setStatusActivo(Long statusActivo){this.statusActivo=statusActivo;} public String getAtributo_1() {return atributo_1;} public void setAtributo_1(String atributo_1){this.atributo_1=atributo_1;} }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
4823cbf99acaa5595040efa4ac9daf465225a6c8
0f1a73dc0329cead4fa60981c1c1eb141d758a5d
/kfs-parent/module/external/src/main/java/org/kuali/kfs/module/external/kc/KcConstants.java
55d99f3ae5127aec6764d435c41f1756e654157e
[]
no_license
r351574nc3/kfs-maven
20d9f1a65c6796e623c4845f6d68834c30732503
5f213604df361a874cdbba0de057d4cd5ea1da11
refs/heads/master
2016-09-06T15:07:01.034167
2012-06-01T07:40:46
2012-06-01T07:40:46
3,441,165
0
0
null
null
null
null
UTF-8
Java
false
false
4,213
java
/* * Copyright 2011 The Kuali Foundation. * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl2.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kuali.kfs.module.external.kc; import java.util.Arrays; import java.util.List; import javax.xml.namespace.QName; import org.kuali.rice.core.util.JSTLConstants; public class KcConstants extends JSTLConstants { public static final String KC_NAMESPACE_URI = "KC"; public static final String MAXIMUM_ACCOUNT_RESPONSIBILITY_ID = "MAXIMUM_ACCOUNT_RESPONSIBILITY_ID"; public static final String FEDERAL_SPONSOR_TYPE_CODES= "FEDERAL_SPONSOR_TYPE_CODES"; public static final String ACCOUNT_CREATE_DEFAULT_IDENTIFIER = "accountDefaultId"; public static final String WEBSERVICE_UNREACHABLE = "Access to the web service is unreachable: "; public static class AccountCreationDefaults { public static final String CHART_OF_ACCOUNT_CODE = "chartOfAccountsCode"; public static final String ACCOUNT_NUMBER = "accountNumber"; public static final String KcUnit = "kcUnit"; } public static class BudgetAdjustment { public static final String SOAP_SERVICE_NAME = "budgetAdjustmentServiceSOAP"; public static QName SERVICE = new QName("KFS", SOAP_SERVICE_NAME); } public static class BudgetCategory { public static final String SOAP_SERVICE_NAME = "budgetCategorySoapService"; public static final String SERVICE_PORT = "budgetCategoryServicePort"; public static final String SERVICE_NAME = "budgetCategoryService"; public static QName SERVICE = new QName(KC_NAMESPACE_URI, SOAP_SERVICE_NAME); public static final List <String> KC_ALLOWABLE_CRITERIA_PARAMETERS = Arrays.asList("budgetCategoryTypeCode","description","budgetCategoryCode"); } public static class Cfda { public static final String SOAP_SERVICE_NAME = "cfdaNumberSoapService"; public static final String SERVICE_PORT = "CfdaNumberServicePort"; public static final String SERVICE_NAME ="CfdaNumberService"; public static QName SERVICE = new QName(KC_NAMESPACE_URI, SOAP_SERVICE_NAME); public static final List <String> KC_ALLOWABLE_CRITERIA_PARAMETERS= Arrays.asList("cfdaNumber", "cfdaMaintenanceTypeId", "cfdaProgramTitleName"); } public static class Unit { public static final String SOAP_SERVICE_NAME = "institutionalUnitSoapService"; public static final String SERVICE_PORT = "institutionalUnitServicePort"; public static QName SERVICE = new QName(KC_NAMESPACE_URI, SOAP_SERVICE_NAME); public static final List <String> KC_ALLOWABLE_CRITERIA_PARAMETERS = Arrays.asList("unitName","unitNumber","parentUnitNumber","organizationId"); } public static class EffortReporting { public static final String SOAP_SERVICE_NAME = "effortReportingServiceSoapService"; public static final String SERVICE_PORT = "effortReportingServicePort"; public static final String SERVICE_NAME = "effortReportingService"; public static QName SERVICE = new QName(KC_NAMESPACE_URI, SOAP_SERVICE_NAME); } public static class AwardAccount { public static final String SOAP_SERVICE_NAME = "awardAccountSoapService"; public static final String SERVICE_PORT = "awardAccountServicePort"; public static final String SERVICE_NAME ="awardAccountService"; public static QName SERVICE = new QName(KC_NAMESPACE_URI, SOAP_SERVICE_NAME); public static final List <String> KC_ALLOWABLE_CRITERIA_PARAMETERS = Arrays.asList("accountNumber", "chartOfAccountsCode"); } }
[ "r351574nc3@gmail.com" ]
r351574nc3@gmail.com
7c6b099beed9ab02e8a278ec5773613b072a1288
bb11880f0b4ca6fad9e6cbd18b054a830048c6d2
/src/compiler/dyvil/tools/compiler/ast/bytecode/LookupSwitchInstruction.java
225f02976866dad4ad198ee01112572182d972a9
[ "BSD-3-Clause" ]
permissive
gitter-badger/Dyvil
177a227af243278865379a8de7a0ed08fa8d692a
3367b23b3020debb39766c1b38237f453bdfe318
refs/heads/master
2020-12-31T02:15:02.872371
2015-07-14T22:58:13
2015-07-14T22:58:13
39,107,128
0
0
null
2015-07-15T00:19:33
2015-07-15T00:19:33
null
UTF-8
Java
false
false
1,564
java
package dyvil.tools.compiler.ast.bytecode; import dyvil.tools.compiler.ast.statement.Label; import dyvil.tools.compiler.backend.MethodWriter; import dyvil.tools.compiler.backend.exception.BytecodeException; import dyvil.tools.compiler.config.Formatting; import dyvil.tools.compiler.lexer.marker.MarkerList; public class LookupSwitchInstruction implements IInstruction { private Label defaultHandler; private int[] keys; private Label[] handlers; public LookupSwitchInstruction(Label defaultHandler, int[] keys, Label[] handlers) { this.defaultHandler = defaultHandler; this.keys = keys; this.handlers = handlers; } @Override public void resolve(MarkerList markers, Bytecode bytecode) { } @Override public void write(MethodWriter writer) throws BytecodeException { int len = this.handlers.length; org.objectweb.asm.Label[] labels = new org.objectweb.asm.Label[len]; for (int i = 0; i < len; i++) { labels[i] = this.handlers[i].target; } writer.writeLookupSwitch(this.defaultHandler.target, this.keys, labels); } @Override public void toString(String prefix, StringBuilder buffer) { buffer.append("LOOKUPSWITCH ["); int len = Math.min(this.keys.length, this.handlers.length); String prefix1 = prefix + Formatting.Method.indent; for (int i = 0; i < len; i++) { buffer.append('\n').append(prefix1).append(this.keys[i]).append(": ").append(this.handlers[i]); } buffer.append('\n').append(prefix1).append("default: ").append(this.defaultHandler); buffer.append('\n').append(prefix).append(']'); } }
[ "clashsoft@hotmail.com" ]
clashsoft@hotmail.com
018c601c4205a5610743d012b66e67e2cff49aa5
1ee4241f3efbb785115903074d56bd29e0e39fe6
/ezcamerakit/src/main/java/com/glumes/ezcamerakit/helper/FlashModeHelper.java
52a8eafb4881eb5161126badf3ffd0d81136de64
[]
no_license
glumes/EzCameraKit
c58856bd9fb98f97431eb119b2c3cb839bef84fb
6846685bd48ae21cd6a7160cf405de3416e17cf7
refs/heads/master
2020-03-25T11:05:19.158564
2018-08-21T01:19:18
2018-08-21T01:19:18
143,718,593
4
2
null
null
null
null
UTF-8
Java
false
false
1,500
java
package com.glumes.ezcamerakit.helper; import android.hardware.Camera; import android.support.v4.util.SparseArrayCompat; import com.glumes.ezcamerakit.RequestOptions; import com.glumes.ezcamerakit.utils.Constants; import java.util.List; public class FlashModeHelper { private static final SparseArrayCompat<String> FLASH_MODES = new SparseArrayCompat<>(); static { FLASH_MODES.put(Constants.FLASH_OFF, Camera.Parameters.FLASH_MODE_OFF); FLASH_MODES.put(Constants.FLASH_ON, Camera.Parameters.FLASH_MODE_ON); FLASH_MODES.put(Constants.FLASH_TORCH, Camera.Parameters.FLASH_MODE_TORCH); FLASH_MODES.put(Constants.FLASH_AUTO, Camera.Parameters.FLASH_MODE_AUTO); FLASH_MODES.put(Constants.FLASH_RED_EYE, Camera.Parameters.FLASH_MODE_RED_EYE); } public static void setFlashMode(int flash, RequestOptions requestOptions, Camera.Parameters parameters) { requestOptions.mFlashMode = flash; List<String> modes = parameters.getSupportedFlashModes(); String mode = FLASH_MODES.get(flash); if (modes != null && modes.contains(mode)) { parameters.setFlashMode(mode); requestOptions.mFlashMode = flash; } String currentMode = FLASH_MODES.get(requestOptions.mFlashMode); if (modes == null || !modes.contains(currentMode)) { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); requestOptions.mFlashMode = Constants.FLASH_OFF; } } }
[ "zhaoying9402@gmail.com" ]
zhaoying9402@gmail.com
17ae899be51701ec3f353a4439ede00bdb0cffa3
d383eae25299467f33a15d606fdcf91e56fc3967
/xml/src/main/java/org/tipprunde/model/ws/openliga/package-info.java
137856d77cb507607aca33dd05cf81c0091525be
[]
no_license
thorsten-k/tipprunde
6dc11424064d867c6009b8359d9e862c22a8767c
4bbc99784e642f88e46b58ee1ae92b380a2c2c25
refs/heads/master
2023-04-30T07:31:59.169857
2023-04-19T11:52:53
2023-04-19T11:52:53
71,550,240
0
0
null
2021-08-22T06:12:09
2016-10-21T09:20:05
Java
UTF-8
Java
false
false
201
java
@javax.xml.bind.annotation.XmlSchema(namespace = "http://msiggi.de/Sportsdata/Webservices", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.tipprunde.model.ws.openliga;
[ "t.kisner@web.de" ]
t.kisner@web.de
a80b10c021fc263c5c10d496c814533b120ae785
e787c556a822380e6a9d1fe9dd162fac288684f3
/metadata/metadata-modeshape/src/main/java/com/thinkbiganalytics/metadata/modeshape/support/VersionableNodeInvocationHandler.java
44324c844976c1575cb5654c5cab8e79338e429d
[ "WTFPL", "CDDL-1.0", "MIT", "CC0-1.0", "EPL-1.0", "PostgreSQL", "BSD-3-Clause", "LGPL-2.1-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-protobuf", "OFL-1.1" ]
permissive
rohituppalapati/kylo-source
82bd8e788a14a33edcff8ac6306245c230e90665
cc794fb8a128a1bb6453e029ab7f6354e75c863e
refs/heads/master
2022-12-28T08:14:32.280826
2019-08-13T18:16:31
2019-08-13T18:16:31
200,886,840
0
0
Apache-2.0
2022-12-16T03:26:58
2019-08-06T16:23:27
Java
UTF-8
Java
false
false
6,977
java
package com.thinkbiganalytics.metadata.modeshape.support; /*- * #%L * kylo-metadata-modeshape * %% * Copyright (C) 2017 ThinkBig Analytics * %% * 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. * #L% */ import com.google.common.collect.Sets; import com.thinkbiganalytics.metadata.modeshape.JcrMetadataAccess; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.security.AccessControlException; import java.util.Arrays; import java.util.Objects; import java.util.Set; import javax.jcr.AccessDeniedException; import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.Property; import javax.jcr.PropertyIterator; import javax.jcr.RepositoryException; import javax.jcr.Value; public class VersionableNodeInvocationHandler implements InvocationHandler { private static final Set<String> PARENT_CHILD = Sets.newHashSet("getParent", "addNode", "getNode"); private static final Set<String> NODE_ITERATOR = Sets.newHashSet("getNodes", "merge", "getSharedSet"); private final Node versionable; public VersionableNodeInvocationHandler(Node node) { this.versionable = node; } /* (non-Javadoc) * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) */ @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { String methodName = method.getName(); if (methodName.startsWith("set")) { if (isValueChange(methodName, args)) { // If the setter value has changed then ensure checkout. ensureCheckout(); } else { // If the setter value has not changed then do nothing and return immediately. return null; } } else if (methodName.startsWith("add") || methodName.equals("remove")) { ensureCheckout(); } if (PARENT_CHILD.contains(methodName)) { return JcrVersionUtil.createAutoCheckoutProxy((Node) method.invoke(this.versionable, args)); } else if (NODE_ITERATOR.contains(methodName)) { return createNodeIterator((NodeIterator) method.invoke(this.versionable, args)); } else if (methodName.equals("getProperties")) { return createPropertyIterator((PropertyIterator) method.invoke(this.versionable, args)); } else if (methodName.equals("getProperty")) { return createProperty((Property) method.invoke(this.versionable, args)); } else { return method.invoke(this.versionable, args); } } catch (InvocationTargetException e) { throw e.getCause(); } } private boolean isValueChange(String methodName, Object[] args) throws RepositoryException { if (methodName.equals("setProperty")) { if (this.versionable.hasProperty((String) args[0])) { Property prop = this.versionable.getProperty((String) args[0]); if (prop.isMultiple()) { Value[] values = prop.getValues(); Object[] propValues = Arrays.stream(values).map(v -> { try { return JcrPropertyUtil.asValue(v, JcrMetadataAccess.getActiveSession()); } catch (AccessDeniedException e) { throw new AccessControlException("Unauthorized to access property: " + args[0]); } }).toArray(); Object[] argValues = (Object[]) args[1]; return !Arrays.equals(argValues, propValues); } else { Object value = JcrPropertyUtil.asValue(prop); return !Objects.equals(args[1], value); } } else { return true; } } else { return true; } } private void ensureCheckout() { JcrVersionUtil.ensureCheckoutNode(this.versionable); } private NodeIterator createNodeIterator(final NodeIterator itr) { return (NodeIterator) Proxy.newProxyInstance(NodeIterator.class.getClassLoader(), new Class<?>[]{NodeIterator.class}, new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (method.getName().equals("nextNode")) { return JcrVersionUtil.createAutoCheckoutProxy(itr.nextNode()); } else { return method.invoke(itr, args); } } catch (InvocationTargetException e) { throw e.getCause(); } } }); } private PropertyIterator createPropertyIterator(final PropertyIterator itr) { return (PropertyIterator) Proxy.newProxyInstance(PropertyIterator.class.getClassLoader(), new Class<?>[]{PropertyIterator.class}, new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (method.getName().equals("nextProperty")) { return createProperty(itr.nextProperty()); } else { return method.invoke(itr, args); } } catch (InvocationTargetException e) { throw e.getCause(); } } }); } private Property createProperty(final Property prop) { return (Property) Proxy.newProxyInstance(Property.class.getClassLoader(), new Class<?>[]{Property.class}, new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (method.getName().equals("setValue")) { ensureCheckout(); } return method.invoke(prop, args); } catch (InvocationTargetException e) { throw e.getCause(); } } }); } }
[ "rohituppalapati@Rohits-MacBook-Pro.local" ]
rohituppalapati@Rohits-MacBook-Pro.local
1c45e2e7b4415596789718e2caed7ec77b4e45b0
e50cf929d91c4af444e75221e1a7dcc85b67717b
/src/二刷冲冲冲/树/填充每个节点的下一个右侧节点指针.java
7b857477263db246b0f4e9c896090f970db68579
[]
no_license
xiaotao1234/leetcodeCoding
efa9362d9e1b82532d000873b435e003edbf2760
923f0d48fad636020189e8f4918c67fdf6c2a236
refs/heads/master
2023-01-23T11:39:09.409144
2020-12-07T14:48:42
2020-12-07T14:48:42
298,504,727
0
0
null
null
null
null
UTF-8
Java
false
false
1,403
java
package 二刷冲冲冲.树; /** * @author xt * @version 1.0 * @date 2020/9/28 22:59 */ public class 填充每个节点的下一个右侧节点指针 { class Node { public int val; public Node left; public Node right; public Node next; public Node() { } public Node(int _val) { val = _val; } public Node(int _val, Node _left, Node _right, Node _next) { val = _val; left = _left; right = _right; next = _next; } } ; public Node connect(Node root) { if (root == null) return null; get(root.left, root.right); return root; } public void get(Node leftNode, Node rightNode) { if (leftNode == null) return; leftNode.next = rightNode; get(leftNode.left, leftNode.right); get(leftNode.right, rightNode.left); get(rightNode.left, rightNode.right); } public Node connect1(Node root) {//下一层依靠上一层 get(root); return root; } public void get(Node root) { if (root == null) { return; } if (root.left != null) { root.left.next = root.right; root.right.next = root.next == null ? null : root.next.left; } get(root.left); get(root.right); } }
[ "1432049416@qq.com" ]
1432049416@qq.com
c20cd3f0f4b6c1a67f1792625059183d76b569df
18176792205946483b6026acbc5df34457063bb9
/src/com/javalearn/test/level22/lesson05/home01/TooShortStringFirstThreadException.java
4fdf2710c774926c41db7cfcbf27f478ce91adc6
[]
no_license
shev-denys/my-JavaRush-Homework
ee1779ba05d9093e5fa7c7043d5aa8ed75ffc8b8
2f9e577bc35331f8c4165986acd50f5aa6beee51
refs/heads/master
2021-01-17T07:40:09.827500
2016-07-14T09:10:49
2016-07-14T09:10:49
27,239,736
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package com.javalearn.test.level22.lesson05.home01; public class TooShortStringFirstThreadException extends RuntimeException { public TooShortStringFirstThreadException(Throwable cause) { super(cause); } }
[ "shev.denys@gmail.com" ]
shev.denys@gmail.com
a87efce7764f10310542833fbd200f998ebe62b7
733ccb606d48f6616c4c9510d6fa29aca45a6b6b
/src/main/java/cn/com/lzt/common/converter/CustomDateConverter.java
e31ae379669725876d577168e395d82b7f0b765f
[]
no_license
juanjuanmao0215/wxcms
740d066395f4fdc76c28bcd1076bab8f179e997c
0c1e678dbbdf229182218f83a95c006f7d93a776
refs/heads/master
2021-01-01T06:34:38.722093
2017-07-19T09:06:39
2017-07-19T09:06:39
97,455,316
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
package cn.com.lzt.common.converter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.core.convert.converter.Converter; public class CustomDateConverter implements Converter<String, Date> { @Override public Date convert(String datestr) { SimpleDateFormat sdformate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { return sdformate.parse(datestr); } catch (ParseException e) { // ignore } return null; } }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
7aeb84d918e25881233a83fe6b4d7cc21d2d2082
44f9beb2ff2b7cbc3e8cde41c4a8a69d6607e503
/backend/src/main/java/com/freedy/backend/entity/VisitorEntity.java
eba9947382906ef25a39e35e7259c50436ffdaa2
[ "Apache-2.0" ]
permissive
nanxin123/easy_blog
c215867e3d55860ff265b387f414fce79ec5a7eb
d90784850e96f1848a90e352419112e92dcbed95
refs/heads/master
2023-06-16T16:35:36.837479
2021-07-13T03:07:53
2021-07-13T03:07:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
package com.freedy.backend.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * 访客记录表 * * @author Freedy * @email 985948228@qq.com * @date 2021-04-26 22:36:03 */ @Data @ApiModel("Visitor实体类") @TableName("blog_visitor") public class VisitorEntity implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty("主键") @TableId(type = IdType.AUTO) private Long id; @ApiModelProperty("访客ip") private String ipAddress; @ApiModelProperty("访客地域") private String region; @ApiModelProperty("访问时间") private Long visitTime; @ApiModelProperty("访问时长") private Long visitDuration; }
[ "985948228@qq.com" ]
985948228@qq.com
a6aec275322ff17204bc504d7a2897d8cd9aa077
23ebd97273821ab497a27d5c5d5bbb8cff4cf77b
/src/main/java/com/lin/param/DeptParam.java
1b018b538313e02dba6c73906af581ca97e9dbb7
[]
no_license
LinZiYU1996/Spring-Spring-MVC-Mybatis
8c5d3b798357e592f7afc0dd08e97c76aadaa49b
b718046f9d6aefe044a85db36fd1a7c968c25ee7
refs/heads/master
2020-04-18T21:25:04.956225
2019-01-27T03:55:16
2019-01-27T03:55:16
167,764,828
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.lin.param; import lombok.Getter; import lombok.Setter; import lombok.ToString; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotBlank; import javax.validation.constraints.NotNull; /** * Created by linziyu on 2019/1/23. * 部门请求参数 */ @Getter @Setter @ToString public class DeptParam { private Integer id; @NotBlank(message = "部门名称不可以为空") @Length(max = 15, min = 2, message = "部门名称长度需要在2-15个字之间") private String name; private Integer parentId = 0; @NotNull(message = "展示顺序不可以为空") private Integer seq; @Length(max = 150, message = "备注的长度需要在150个字以内") private String remark; }
[ "2669093302@qq.com" ]
2669093302@qq.com
277a5b8550dc6faba94febc691fd2d63c425b9b5
d9ea3ae7b2c4e9a586e61aed23e6e997eaa38687
/17.JavaEE/DbUtil/src/com/qfedu/test/UserManagerTest.java
6816e49909d5022d0d55544b649875006247516c
[]
no_license
yuanhaocn/Fu-Zusheng-Java
6e5dcf9ef3d501102af7205bb81674f880352158
ab872bcfe36d985a651a5e12ecb6132ad4d2cb8e
refs/heads/master
2020-05-15T00:20:47.872967
2019-04-16T11:06:18
2019-04-16T11:06:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,180
java
package com.qfedu.test; import java.util.List; import org.junit.Test; import com.qfedu.daoImp.UserManagerImp; import com.qfedu.domain.User; public class UserManagerTest { @Test public void insertTest() { UserManagerImp userManagerImp = new UserManagerImp(); User user = new User(); user.setNumber("007"); user.setPassword("fzs"); userManagerImp.insertUser(user); } @Test public void updateTest() { UserManagerImp userManagerImp = new UserManagerImp(); User user = new User(); user.setNumber("007"); user.setPassword("fzs1393637533"); userManagerImp.updateUser(user); } @Test public void deleteTest() { UserManagerImp userManagerImp = new UserManagerImp(); User user = new User(); user.setNumber("007"); //user.setPassword("fzs1393637533"); userManagerImp.deleteUser(user); } @Test public void selectAllTest() { UserManagerImp userManagerImp = new UserManagerImp(); List<User> users = userManagerImp.selectAllUsers(); System.out.println(users); } @Test public void countUsersTest() { UserManagerImp userManagerImp = new UserManagerImp(); int countUsers = userManagerImp.countUsers(); System.out.println(countUsers); } }
[ "fuzusheng@gmail.com" ]
fuzusheng@gmail.com
fe9cd5c11be28d21fe1a0356b69493d18e6d6de9
c79740d884dc974429443296b399ae9ca61efc45
/FirstLineOfCode_Android/databasetest/src/main/java/com/bigfat/databasetest/MainActivity.java
cb08b95fa412d435156786bbb07db00a3cba573e
[ "Apache-2.0" ]
permissive
yueban/AndroidExercise
fe8feee8c89258e24560ef6484e356dd762fef46
9ff75adc009aadedba4d05850af8a7748afbb6e2
refs/heads/master
2023-01-23T01:53:58.213292
2023-01-17T09:00:16
2023-01-17T09:00:16
27,426,345
17
6
null
null
null
null
UTF-8
Java
false
false
5,689
java
package com.bigfat.databasetest; import android.app.Activity; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; public class MainActivity extends Activity implements View.OnClickListener { public static final String TAG = "MainActivity"; private MyDatabaseHelper dbHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); dbHelper = new MyDatabaseHelper(MainActivity.this, "BookStore.db", null, 3); Button createDatabase = (Button) findViewById(R.id.create_database); Button addData = (Button) findViewById(R.id.add_data); Button updateData = (Button) findViewById(R.id.update_data); Button deleteData = (Button) findViewById(R.id.delete_data); Button queryData = (Button) findViewById(R.id.query_data); Button replaceData = (Button) findViewById(R.id.replace_data); createDatabase.setOnClickListener(this); addData.setOnClickListener(this); updateData.setOnClickListener(this); deleteData.setOnClickListener(this); queryData.setOnClickListener(this); replaceData.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.create_database: dbHelper.getWritableDatabase(); break; case R.id.add_data: SQLiteDatabase dbAdd = dbHelper.getWritableDatabase(); ContentValues valuesAdd = new ContentValues(); valuesAdd.put("name", "The Da Vinci Code"); valuesAdd.put("author", "Dan Brown"); valuesAdd.put("pages", 454); valuesAdd.put("price", 16.96); dbAdd.insert("Book", null, valuesAdd); valuesAdd.clear(); valuesAdd.put("name", "The Lost Symbol"); valuesAdd.put("author", "Dan Brown"); valuesAdd.put("pages", 510); valuesAdd.put("price", 19.95); dbAdd.insert("Book", null, valuesAdd); break; case R.id.update_data: SQLiteDatabase dbUpdate = dbHelper.getWritableDatabase(); ContentValues valuesUpdate = new ContentValues(); valuesUpdate.put("price", 10.99); dbUpdate.update("Book", valuesUpdate, "name=?", new String[]{"The Da Vinci Code"}); break; case R.id.delete_data: SQLiteDatabase dbDelete = dbHelper.getWritableDatabase(); dbDelete.delete("Book", "pages > ?", new String[]{"500"}); break; case R.id.query_data: SQLiteDatabase dbQuery = dbHelper.getReadableDatabase(); Cursor cursor = dbQuery.query(null, null, null, null, null, null, null); if (cursor.moveToFirst()) { do { String name = cursor.getString(cursor.getColumnIndex("name")); String author = cursor.getString(cursor.getColumnIndex("author")); int pages = cursor.getInt(cursor.getColumnIndex("pages")); double price = cursor.getDouble(cursor.getColumnIndex("price")); Log.d(TAG, "book name is " + name); Log.d(TAG, "book author is " + author); Log.d(TAG, "book pages is " + pages); Log.d(TAG, "book price is " + price); } while (cursor.moveToNext()); } break; case R.id.replace_data: SQLiteDatabase dbReplace = dbHelper.getWritableDatabase(); dbReplace.beginTransaction(); try { dbReplace.delete("Book", null, null); // if (true) { // throw new NullPointerException(); // } ContentValues valuesReplace = new ContentValues(); valuesReplace.put("name", "Game of Thrones"); valuesReplace.put("author", "George Martin"); valuesReplace.put("pages", 720); valuesReplace.put("price", 20.85); dbReplace.insert("Book", null, valuesReplace); dbReplace.setTransactionSuccessful(); } catch (Exception e) { e.printStackTrace(); } finally { dbReplace.endTransaction(); } break; default: break; } } @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); } }
[ "fbzhh007@gmail.com" ]
fbzhh007@gmail.com
4cf6e04da035aa4d78b9a10a51e1d836a1fc2cb4
77b18c18b5d1815ae869bfe25fc180fa6a8db74c
/src/io/spring/part02/model/Battery.java
a40de97c785cc639c3b3d0336d62ed3f44034a1c
[]
no_license
tutkuince/SpringCoreTasks
afbe0f122b384b0f01ec7974b359025bbdd48497
4930dc76f9026b7425f146e99b71a0556758ca86
refs/heads/master
2020-03-22T07:38:44.069047
2018-07-16T09:47:29
2018-07-16T09:47:29
139,714,554
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package io.spring.part02.model; public class Battery extends Product { public boolean rechargeable; public Battery() { super(); } public Battery(String name, double price) { super(name, price); } public boolean isRechargeable() { return rechargeable; } public void setRechargeable(boolean rechargeable) { this.rechargeable = rechargeable; } }
[ "tutku.ince@outlook.com" ]
tutku.ince@outlook.com
7de1545a0eb01d5fd810ee6a829ffedef115557d
64ffa74d119ff4a4a9d76765fa0bd5413f499189
/src/cn/labsoft/labos/common/template/entity/LabTemplate.java
ca3e57b8429d0df9b01cd4c7929ba368e365e5c1
[]
no_license
zongweiyang/eLims
9d10c6929c242c67870781d571621609a7e70116
ba9d663153ace634fd987e07541022af0d33f19f
refs/heads/master
2021-01-13T01:31:05.609832
2015-07-19T03:44:49
2015-07-19T03:44:49
34,788,558
1
0
null
null
null
null
UTF-8
Java
false
false
1,316
java
package cn.labsoft.labos.common.template.entity; import javax.persistence.Entity; import javax.persistence.Table; import cn.labsoft.labos.framework.common.po.BasePo; /** * 页面管理Entity实体 * * @author Carl Yang * @since 8.0 * @version 8.0 * */ @Entity @Table(name = "lab_template") public class LabTemplate extends BasePo { private static final long serialVersionUID = -7955166761251127245L; private String type;//类型 private String name;//模板名称 private String remark;//备注 private String path; //文件路径 private String busId;//关联业务的ID private String objUrl;//对象的路径(cn.labsoft.....) public String getObjUrl() { return objUrl; } public void setObjUrl(String objUrl) { this.objUrl = objUrl; } public String getBusId() { return busId; } public void setBusId(String busId) { this.busId = busId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } }
[ "yzwok@sina.cn" ]
yzwok@sina.cn
553453f4b82c3a5c5adaa01f6883f3e7da532ee2
c95b26c2f7dd77f5e30e2d1cd1a45bc1d936c615
/azureus-core/src/main/java/com/aelitis/azureus/ui/UIFunctionsManager.java
32ec19b9506b60113d8f7bcf1e0fefbb51be634b
[]
no_license
ostigter/testproject3
b918764f5c7d4c10d3846411bd9270ca5ba2f4f2
2d2336ef19631148c83636c3e373f874b000a2bf
refs/heads/master
2023-07-27T08:35:59.212278
2023-02-22T09:10:45
2023-02-22T09:10:45
41,742,046
2
1
null
2023-07-07T22:07:12
2015-09-01T14:02:08
Java
UTF-8
Java
false
false
1,241
java
/* * Created on Jul 12, 2006 2:47:29 PM * Copyright (C) Azureus Software, Inc, 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. */ package com.aelitis.azureus.ui; /** * @author TuxPaper * @created Jul 12, 2006 * */ public class UIFunctionsManager { private static UIFunctions instance = null; public static UIFunctions getUIFunctions() { return instance; } public static void setUIFunctions(UIFunctions uiFunctions) { synchronized (UIFunctionsManager.class) { instance = uiFunctions; } } }
[ "oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b" ]
oscar.stigter@e0aef87a-ea4e-0410-81cd-4b1fdc67522b
32d5fb65389f61630f303bea96ff3ec723e81fb7
61a71e6fe096c8f7627753fb160e038a7bdeb9df
/src/main/java/com/bitplan/mediawiki/japi/jaxb/JaxbPersistenceApi.java
36982f4e6be40961c5eb6d830c3b587b04ffbf96
[ "Apache-2.0" ]
permissive
objecttrouve/Mediawiki-Japi
5fa9753fc892a761df9eb6066dd41371273da99f
eec2aae817dc9a917a992313469f7945104a0658
refs/heads/master
2020-04-28T23:55:04.641232
2019-03-14T18:01:05
2019-03-14T18:01:05
175,674,182
0
0
Apache-2.0
2019-03-14T18:02:30
2019-03-14T18:02:29
null
UTF-8
Java
false
false
1,374
java
/** * * This file is part of the https://github.com/WolfgangFahl/Mediawiki-Japi open source project * * Copyright 2015-2018 BITPlan GmbH https://github.com/BITPlan * * 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.bitplan.mediawiki.japi.jaxb; import javax.xml.bind.JAXBException; /** * gerneric Jaxb persistence interface converts T instances to xml or json * @author wf * */ public interface JaxbPersistenceApi<T> { /** * get my factory * @return the factory for T instances */ public JaxbFactoryApi<T> getFactory(); /** * convert me to json format * @return - a json representation of me * @throws JAXBException */ public String asJson() throws JAXBException; /** * convert me to xml format * @return - an xml representation of me * @throws JAXBException */ public String asXML() throws JAXBException; }
[ "wf@bitplan.com" ]
wf@bitplan.com
8b48b7bf0ab3b8bdced330ce68c44e1b7f2da141
67f9b0041cae5a7fb078e7f3b3394b4ffb60877b
/src/main/java/com/kian/service/dto/TagDTO.java
71c28a0f75b337dda7d2556680db08623c3893d8
[]
no_license
akrammol/paseo
168649c8f92202463eb6def3629d6bd5681bdbf1
030efdc793728c62e8f1b684bce2bad6d606c3a0
refs/heads/master
2020-05-21T18:36:56.313344
2019-05-13T13:22:27
2019-05-13T13:22:27
186,136,426
0
0
null
2019-05-13T13:22:28
2019-05-11T13:30:27
Java
UTF-8
Java
false
false
1,936
java
package com.kian.service.dto; import io.swagger.annotations.ApiModel; import java.io.Serializable; import java.util.Objects; import com.kian.domain.enumeration.TagType; /** * A DTO for the {@link com.kian.domain.Tag} entity. */ @ApiModel(description = "Tag entity.") public class TagDTO implements Serializable { private Long id; private TagType type; private String tagValue; private Long commentId; private Long postId; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public TagType getType() { return type; } public void setType(TagType type) { this.type = type; } public String getTagValue() { return tagValue; } public void setTagValue(String tagValue) { this.tagValue = tagValue; } public Long getCommentId() { return commentId; } public void setCommentId(Long commentId) { this.commentId = commentId; } public Long getPostId() { return postId; } public void setPostId(Long postId) { this.postId = postId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TagDTO tagDTO = (TagDTO) o; if (tagDTO.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), tagDTO.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "TagDTO{" + "id=" + getId() + ", type='" + getType() + "'" + ", tagValue='" + getTagValue() + "'" + ", comment=" + getCommentId() + ", post=" + getPostId() + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
bb0ea7736e05810d4f242d85b60290fba29647a8
2643bb86eb1c2a5b4d50c9fd87e19d881b04c760
/src/silver/_1978.java
d113ef0932b6d9b91cbcbd03cb723270e868df65
[]
no_license
kho903/JAVA_algorithms
fba8b45250d5110d84d61da91a063ed5952e2b83
676aadcbedbefa9229069b44b12dd2991181c03b
refs/heads/main
2023-08-02T10:34:02.748120
2021-10-10T09:22:49
2021-10-10T09:22:49
415,215,440
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package silver; import java.util.*; public class _1978 { public static boolean is_prime(int x) { if (x <= 1) return false; else if (x == 2) return true; for (int i = 2; i * i <= x; i++) { if (x % i == 0) return false; } return true; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; while (n-- > 0) { if (is_prime(sc.nextInt())) count++; } System.out.println(count); } }
[ "gmldnr2222@naver.com" ]
gmldnr2222@naver.com
8d9ccf8a4415391eda2652e1643b5331e1534f8e
830e6c5d2969c8cceeeaadf077b002ac02badd09
/kazuki-impl/src/main/java/io/kazuki/v0/store/index/query/QueryHelper.java
faa5314d8db28cf6c3e6df61eebf25fc4673b4ec
[]
no_license
cwilper/kazuki
4ea3b0e5c2f1c1ad81b3978a2d1eb48b05110f5b
d02c00f34f8af00de61a91ccc0ebc7cb59e81422
refs/heads/master
2021-01-18T08:43:44.046547
2014-06-10T08:51:58
2014-06-10T08:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,544
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 io.kazuki.v0.store.index.query; import java.util.ArrayList; import java.util.List; import org.antlr.runtime.ANTLRStringStream; import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.RecognitionException; import com.google.common.base.Throwables; public class QueryHelper { public static List<QueryTerm> parseQuery(String queryString) { QueryLexer lex = new QueryLexer(new ANTLRStringStream(queryString)); CommonTokenStream tokens = new CommonTokenStream(lex); QueryParser parser = new QueryParser(tokens); List<QueryTerm> query = new ArrayList<QueryTerm>(); try { parser.term_list(query); } catch (RecognitionException e) { throw Throwables.propagate(e); } return query; } }
[ "sunny.gleason@gmail.com" ]
sunny.gleason@gmail.com
ae03c7e8ec23f014776763781afd5dac8999bcbe
fabf8994f7787b42f0e62999999de3839cafb1f7
/src/test/java/om/belerweb/youkuapi/YoukuBeanAPITest.java
4414c7c9dbff624dc30ca0c3db2816fbe30e4ba0
[]
no_license
zero20151631/youku-api
7783a9a114d600031e80cb7683e48d97b79c430d
280e1ec4b6fa479c6dfa1c20184128add0529dda
refs/heads/master
2021-01-20T06:17:47.446413
2013-04-08T12:50:50
2013-04-08T12:50:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package om.belerweb.youkuapi; import org.junit.Assert; import org.junit.Test; import com.belerweb.youkuapi.YoukuBeanAPI; import com.belerweb.youkuapi.bean.VideoSearchResult; public class YoukuBeanAPITest { YoukuBeanAPI api = new YoukuBeanAPI(); @Test public void testSearchVideoByKeyword() throws Exception { VideoSearchResult result; try { api.searchVideoByKeyword(null, null, null, null, null, null, null, null, null, null); } catch (Exception e) { Assert.assertTrue(e instanceof RuntimeException); } result = api.searchVideoByKeyword(new String[] {"美国"}, 0, 0, null, null, null, null, null, null, null); Assert.assertNotNull(result); Assert.assertTrue(result.getPageNo() == 1); Assert.assertTrue(result.getPageSize() == 20); System.out.println(result); result = api.searchVideoByKeyword(new String[] {"美国"}, 1, 2, null, null, null, null, null, null, null); Assert.assertNotNull(result); Assert.assertTrue(result.getPageNo() == 1); Assert.assertTrue(result.getPageSize() == 2); System.out.println(result); result = api.searchVideoByKeyword(new String[] {"美国"}, 2, 5, null, null, null, null, null, null, null); Assert.assertNotNull(result); Assert.assertTrue(result.getPageNo() == 2); Assert.assertTrue(result.getPageSize() == 5); System.out.println(result); } @Test public void testSearchVideoByTag() throws Exception { VideoSearchResult result = api.searchVideoByTag(new String[] {"美国"}, 0, 0, null, null, null); Assert.assertNotNull(result); Assert.assertTrue(result.getPageNo() == 1); Assert.assertTrue(result.getPageSize() == 20); System.out.println(result); } }
[ "belerweb@gmail.com" ]
belerweb@gmail.com
a0d9cce020fafd5d064bb0a5dd25c3cc0880a8dd
88483bbcd6b6b3038233d0a7ebda6c493e4ef589
/Java/JavaSwing/src/com/gs/frame/MyFrame.java
c68d9d0c0c4abac05af9b7706f28098e70a82a18
[]
no_license
tjy1985001/Teaching
5760eab3cd3e6c4cd1332c80fcf8098c160a7deb
31e090c866493443b5a944c043fbfb2f1c90c372
refs/heads/master
2020-06-06T22:37:51.921889
2018-12-10T03:45:51
2018-12-10T03:45:51
null
0
0
null
null
null
null
GB18030
Java
false
false
1,436
java
package com.gs.frame; import java.awt.Color; import java.awt.Frame; import java.awt.Panel; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; //import java.awt.event.WindowListener; public class MyFrame extends Frame { public MyFrame() { setTitle("我的窗口"); // 设置标题 setSize(300, 200); // 设置窗口大小, 默认0, 0 setLocation(200, 200); setBackground(Color.BLUE); // 设置背景色 Panel panel = new Panel(); panel.setSize(100, 100); panel.setLocation(20, 80); panel.setBackground(Color.GREEN); Panel panel1 = new Panel(); panel1.setSize(50, 50); panel1.setLocation(20, 20); panel1.setBackground(Color.RED); panel.setLayout(null); // 给panel设置布局管理器 panel.add(panel1); // 把panel1面板对象添加到panel面板上 this.setLayout(null); // 给当前窗体对象设置布局管理器为null add(panel); // 把panel面板对象添加到当前frame窗口 setVisible(true); // 设置该窗口可见, 默认不可见 // 给当前窗体添加窗体监听器 addWindowListener(new WindowAdapter() { // 当窗体正在被关闭时,接收到此正在关闭事件,则在此时可以把整个程序退出 @Override public void windowClosing(WindowEvent e) { System.out.println("窗口正在关闭..."); System.exit(0); // dispose(); // 释放当前窗口所占用的屏幕资源 } }); } }
[ "847315251@qq.com" ]
847315251@qq.com
33aaeb63a03c3e9ad2bedb5d4cb3f1f86c06746f
29c9d7f947bdc85f58d1a3d2fe64b302a969496c
/codes/concurrent/src/main/java/io/github/dunwu/javacore/concurrent/chapter03/SynchronizedDemo02.java
c17bdff1359d821bae8c3d5156dc5d9032a8e7c0
[ "MIT" ]
permissive
zwkzwk/javacore
80a6c5058df45a8a22ce23cdeffbd2df16fc6238
b97ed0f44001d8c79855f68fc603eb5eedda8605
refs/heads/master
2020-06-06T20:14:13.709575
2019-08-26T08:08:35
2019-08-26T08:08:35
192,842,859
0
0
MIT
2019-08-26T08:08:37
2019-06-20T03:34:19
Java
UTF-8
Java
false
false
810
java
package io.github.dunwu.javacore.concurrent.chapter03; import io.github.dunwu.javacore.concurrent.annotation.ThreadSafe; /** * @author Zhang Peng * @date 2018/8/1 */ @ThreadSafe public class SynchronizedDemo02 implements Runnable { static int i = 0; public synchronized void increase() { i++; } @Override public void run() { for (int j = 0; j < 100000; j++) { increase(); } } public static void main(String[] args) throws InterruptedException { SynchronizedDemo02 instance = new SynchronizedDemo02(); Thread t1 = new Thread(instance); Thread t2 = new Thread(instance); t1.start(); t2.start(); t1.join(); t2.join(); System.out.println(i); } } // 输出结果: // 2000000
[ "forbreak@163.com" ]
forbreak@163.com
fcdf53db36e2038727743470abf01dfbd78d442d
311f1237e7498e7d1d195af5f4bcd49165afa63a
/sourcedata/camel-camel-1.4.0/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppComponent.java
a7ae97eb01645add9236e9311bdb8d8de829a0ed
[ "Apache-2.0", "LicenseRef-scancode-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
DXYyang/SDP
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
refs/heads/master
2023-01-11T02:29:36.328694
2019-11-02T09:38:34
2019-11-02T09:38:34
219,128,146
10
1
Apache-2.0
2023-01-02T21:53:42
2019-11-02T08:54:26
Java
UTF-8
Java
false
false
2,173
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.component.xmpp; import java.net.URI; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.impl.DefaultComponent; /** * @version $Revision:520964 $ */ public class XmppComponent extends DefaultComponent<XmppExchange> { public XmppComponent() { } public XmppComponent(CamelContext context) { super(context); } /** * Static builder method */ public static XmppComponent xmppComponent() { return new XmppComponent(); } @Override protected Endpoint<XmppExchange> createEndpoint(String uri, String remaining, Map parameters) throws Exception { XmppEndpoint endpoint = new XmppEndpoint(uri, this); URI u = new URI(uri); endpoint.setHost(u.getHost()); endpoint.setPort(u.getPort()); if (u.getUserInfo() != null) { endpoint.setUser(u.getUserInfo()); } String remainingPath = u.getPath(); if (remainingPath != null) { if (remainingPath.startsWith("/")) { remainingPath = remainingPath.substring(1); } // assume its a participant if (remainingPath.length() > 0) { endpoint.setParticipant(remainingPath); } } return endpoint; } }
[ "512463514@qq.com" ]
512463514@qq.com
ab4484182529cfbfdcccc4dac6c500efc3b30ce9
76584e835792b34b4e1b3ef94443c60823a1842b
/news/src/main/java/com/demo/news/es/IndexNews.java
2990fa03bf0ab42f5964f90a11b8d2b7883b403f
[]
no_license
1119878190/news
3aacf6dcb1da85010df49d2824811860183af30c
9c7bf01c406f487979a087f940422744f0cc2f53
refs/heads/main
2023-04-05T07:42:45.659271
2021-04-15T13:32:53
2021-04-15T13:32:53
358,269,082
0
1
null
null
null
null
UTF-8
Java
false
false
693
java
package com.demo.news.es; import com.demo.news.entity.News; import com.demo.news.service.NewsService; import com.demo.news.service.impl.ElasticSearchService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; @Component("esIndexNews") public class IndexNews implements Runnable { @Autowired private NewsService newsService; @Autowired private ElasticSearchService elasticSearchService; @Override public void run() { List<News> newsList = newsService.queryAllNews(); for (News news : newsList) { elasticSearchService.saveNews(news); } } }
[ "1119878190@qq.com" ]
1119878190@qq.com
df224bbe05874accb4427508c49dc1c4262846ec
f61891e610071d9a049ae1f59f315738f1d93500
/qa/src/org/apache/river/test/spec/lookupservice/test_set00/DefSrvcLeaseExpiration.java
a737dd7406f928678a0a53b8324493b4397aa4c9
[ "Apache-2.0", "CC-BY-SA-3.0", "MIT", "BSD-3-Clause" ]
permissive
pfirmstone/JGDMS
fd145a0f0fbcc848d0635a3ce78fae23fca5b0be
9d0d693e225286803a72d67ee750089f546b9956
refs/heads/trunk
2023-07-11T20:54:39.788096
2023-06-25T10:51:31
2023-06-25T10:51:31
49,324,039
26
4
Apache-2.0
2023-05-03T01:55:24
2016-01-09T12:47:11
HTML
UTF-8
Java
false
false
6,081
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.river.test.spec.lookupservice.test_set00; import org.apache.river.qa.harness.QAConfig; import org.apache.river.qa.harness.Test; import org.apache.river.qa.harness.TestException; import java.util.logging.Level; import org.apache.river.test.spec.lookupservice.QATestRegistrar; import org.apache.river.test.spec.lookupservice.QATestUtils; import net.jini.core.lookup.ServiceRegistrar; import net.jini.lookup.SafeServiceRegistrar; import net.jini.core.lookup.ServiceItem; import net.jini.core.lookup.ServiceRegistration; import net.jini.core.lookup.ServiceTemplate; import java.rmi.RemoteException; /** This class is used to test that any service item registered with the Lookup * service can no longer be successfully looked up after the service * item's lease has expired. * * @see org.apache.river.qa.harness.TestEnvironment * @see org.apache.river.test.spec.lookupservice.QATestRegistrar * @see org.apache.river.test.spec.lookupservice.QATestUtils */ public class DefSrvcLeaseExpiration extends QATestRegistrar { /** the expected number of matches when testing lookup by ID */ private static int EXPECTED_N_MATCHES = 1; /* lease duration to 1 minute */ private final static long DEFAULT_LEASEDURATION = 60000; private final static int DEFAULT_LOOP_COUNT = 5; private static int loopCount= DEFAULT_LOOP_COUNT; private static long leaseDuration = DEFAULT_LEASEDURATION; private static long leaseWaitTime = DEFAULT_LEASEDURATION *3/4; private static long lookupWaitTime = DEFAULT_LEASEDURATION /2; private ServiceItem[] srvcItems ; private ServiceRegistration[] srvcRegs ; private ServiceTemplate[] srvcIDTmpls; private ServiceRegistrar proxy; private int nInstances = 0; private long leaseStartTime; /** Performs actions necessary to prepare for execution of the * current QA test. * * Creates the lookup service. Loads and instantiates all service * classes. Registers each service class instance with a specified * lease duration. Retrieves the proxy to the lookup Registrar. * Creates an array of ServiceTemplates in which each element contains * the service ID of one of the registered service items. Establishes * an approximate service lease start time for each service item by * retrieving the current system time. */ public synchronized Test construct(QAConfig sysConfig) throws Exception { super.construct(sysConfig); logger.log(Level.FINE, "in setup() method."); nInstances = super.getNInstances(); srvcItems = super.createServiceItems(TEST_SRVC_CLASSES); srvcRegs = super.registerAll(leaseDuration); proxy = super.getProxy(); srvcIDTmpls = new ServiceTemplate[nInstances]; for(int i=0; i<srvcIDTmpls.length; i++) { srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(), null,null); } leaseStartTime = QATestUtils.getCurTime(); return this; } /** Executes the current QA test. * * Performs a simple lookup of each registered service item. * Verifies that the set of service items returned by the lookup * operation equals the expected set of service items. * Waits a specified amount of time so as to guarantee that each * service lease expires. * Performs both a simple and a match lookup of each registered service * item. * For each lookup performed, verifies that a null service, as well as * zero matches, are returned. */ /* The time-line diagram below shows the steps of this test: * * |-------------------------------------------------------| * : : ^ * |-------------------| : * 0 ^ 0.5 1 : * : : : * : : : * Lookup Lease Lookup * Expires */ public synchronized void run() throws Exception { logger.log(Level.FINE, "SrvcLeaseExpiration : in run() method."); logger.log(Level.FINE, "Performing lookup ..."); QATestUtils.doLookup(srvcItems, srvcIDTmpls, proxy ); logger.log(Level.FINE, "Waiting " + (leaseDuration*2) + " milliseconds for service leases to expire."); QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration*2, this); logger.log(Level.FINE, "Checking that no services can be found."); doLookupNoMatch(); } /* Perform both a simple and a match lookup using the ServiceTemplate * created during construct. Verifies that every simple lookup returns * a null object; and every match lookup returns zero matches. */ private void doLookupNoMatch() throws TestException, RemoteException { Object serviceObj = null; Object [] matches = null; for (int i=0; i<srvcIDTmpls.length; i++) { if(proxy.lookup(srvcIDTmpls[i]) != null) { throw new TestException("srvcIDTmpls["+i+"] != null"); } matches = ((SafeServiceRegistrar)proxy).lookUp(srvcIDTmpls[i],Integer.MAX_VALUE); if ( matches.length != 0) { throw new TestException("totalMatches != 0"); } } } }
[ "jini@zeus.net.au" ]
jini@zeus.net.au
e3386ea40d4299ab04632e7a83fd67f5330745d8
f965b65821d4a324e60fe828ca4e7a4fca52d758
/future-model/src/main/java/com/kangyonggan/app/future/model/dto/HistoriesResponse.java
0be5d112a0e3bd5ed7337b849132d8c52e27d9c3
[]
no_license
kangyonggan/future
7a03641d72b906a2c45cd9f70f82b266db451ba4
875dd5c947bdc54a51d4fe7d4c0e5b1fa5ff99b5
refs/heads/master
2021-01-02T09:46:06.189517
2018-03-19T03:40:57
2018-03-19T03:40:57
99,294,784
0
2
null
null
null
null
UTF-8
Java
false
false
296
java
package com.kangyonggan.app.future.model.dto; import com.kangyonggan.app.future.model.vo.History; import lombok.Data; import java.util.List; /** * @author kangyonggan * @since 9/11/17 */ @Data public class HistoriesResponse extends CommonResponse { private List<History> histories; }
[ "kangyonggan@gmail.com" ]
kangyonggan@gmail.com
bfedf32ffbd899665c72f3fc1f0d7535088df568
8896bfa97b8bd2b8a8cef3d3dc20b72d2103136c
/deeplearning4j-core/src/test/java/org/deeplearning4j/autoencoder/DeepAutoEncoderTest.java
f97cfc7b4c276941c6a15894294411444ace0b67
[]
no_license
zizaipai/java-deeplearning
d5efde4e48407009da460359c34fda17f19bd8f8
0b837c2e2fccc539355675f70890db26c37f3261
refs/heads/master
2021-01-16T20:51:43.026425
2014-06-11T23:54:35
2014-06-11T23:54:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,503
java
package org.deeplearning4j.autoencoder; import static org.junit.Assert.*; import org.deeplearning4j.datasets.DataSet; import org.deeplearning4j.datasets.fetchers.MnistDataFetcher; import org.deeplearning4j.dbn.DBN; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Created by agibsonccc on 5/11/14. */ public class DeepAutoEncoderTest { private static Logger log = LoggerFactory.getLogger(DeepAutoEncoderTest.class); @Test public void testWithMnist() throws Exception { MnistDataFetcher fetcher = new MnistDataFetcher(true); fetcher.fetch(20); DataSet data = fetcher.next(); data.filterAndStrip(new int[]{0, 1}); log.info("Training on " + data.numExamples()); DBN dbn = new DBN.Builder() .hiddenLayerSizes(new int[]{1000, 500, 250, 10}) .numberOfInputs(784) .numberOfOutPuts(2) .build(); dbn.pretrain(data.getFirst(),new Object[]{1,1e-1,1000}); DeepAutoEncoder encoder = new DeepAutoEncoder(dbn); assertEquals(encoder.getLayers()[0].getW().length,encoder.getOutputLayer().getW().length); assertEquals(encoder.getLayers()[1].getW().length,encoder.getLayers()[encoder.getLayers().length - 1].getW().length); assertEquals(encoder.getLayers()[2].getW().length,encoder.getLayers()[encoder.getLayers().length - 2].getW().length); encoder.finetune(data.getFirst(),1e-1,1000); } }
[ "agibson@clevercloudcomputing.com" ]
agibson@clevercloudcomputing.com
97e0ffc69ca3d997f4a8468df3a4f14c65dfbb4f
c7380d8838064dd6b107a35fded0b65e8b351bac
/src/main/java/com/chrisrm/idea/wizard/steps/MTWizardFinishPanel.java
04100af8b6ec5732c3b0f662b2baf649b90f70c5
[ "MIT" ]
permissive
raksit31667/material-theme-jetbrains
70bce3ffc71122bc31c8407ad8e8c8e06f162932
9b749c5c08edf2fac7fd59c55c4804ee5cce1864
refs/heads/master
2020-04-01T09:56:21.187728
2018-10-16T02:37:55
2018-10-16T02:37:55
153,095,981
0
0
MIT
2018-10-15T10:39:40
2018-10-15T10:39:40
null
UTF-8
Java
false
false
6,647
java
/* * The MIT License (MIT) * * Copyright (c) 2018 Chris Magnussen and Elior Boukhobza * * 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. * * */ /* * Created by JFormDesigner on Wed Jul 25 00:33:59 IDT 2018 */ package com.chrisrm.idea.wizard.steps; import com.intellij.ide.customize.AbstractCustomizeWizardStep; import com.intellij.ui.components.JBScrollPane; import com.intellij.ui.components.labels.LinkLabel; import net.miginfocom.swing.MigLayout; import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.ResourceBundle; /** * @author Elior Boukhobza */ public class MTWizardFinishPanel extends AbstractCustomizeWizardStep { public MTWizardFinishPanel() { initComponents(); } @Override protected String getTitle() { return "Finish"; } @Override protected String getHTMLHeader() { return null; } @Nullable @Override protected String getHTMLFooter() { return "You can always change your settings at Settings | Appearance | Material Theme"; } private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license final ResourceBundle bundle = ResourceBundle.getBundle("messages.MTWizardBundle"); scrollPane = new JBScrollPane(); content = new JPanel(); summary = new JTextArea(); summaryLabel = new JLabel(); docLink = new LinkLabel(); paypalLabel = new JLabel(); paypalLink = new LinkLabel(); label1 = new JLabel(); openCollLink = new LinkLabel(); vSpacer1 = new JPanel(null); summarySummary = new JLabel(); //======== this ======== setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); //======== scrollPane ======== { //======== content ======== { content.setBorder(null); content.setLayout(new MigLayout( "hidemode 3,align center top", // columns "[]", // rows "[62,top]para" + "[]0" + "[]para" + "[]para" + "[]" + "[]")); //---- summary ---- summary.setText(bundle.getString("MTWizardFinishPanel.summary.text")); summary.setFont(new Font("Roboto", summary.getFont().getStyle(), summary.getFont().getSize() + 3)); summary.setBackground(UIManager.getColor("Panel.background")); summary.setEditable(false); summary.setWrapStyleWord(true); content.add(summary, "cell 0 0"); //---- summaryLabel ---- summaryLabel.setText(bundle.getString("MTWizardFinishPanel.summaryLabel.text")); content.add(summaryLabel, "cell 0 1"); //---- docLink ---- docLink.setText(bundle.getString("MTWizardFinishPanel.docLink.text")); docLink.setIcon(null); content.add(docLink, "cell 0 1"); //---- paypalLabel ---- paypalLabel.setText(bundle.getString("MTWizardFinishPanel.paypalLabel.text")); content.add(paypalLabel, "cell 0 2"); //---- paypalLink ---- paypalLink.setText("Paypal"); paypalLink.setIcon(null); content.add(paypalLink, "cell 0 2"); //---- label1 ---- label1.setText("or"); content.add(label1, "cell 0 2"); //---- openCollLink ---- openCollLink.setText("OpenCollective"); openCollLink.setIcon(null); content.add(openCollLink, "cell 0 2"); content.add(vSpacer1, "cell 0 3"); //---- summarySummary ---- summarySummary.setText(bundle.getString("MTWizardFinishPanel.summarySummary.text")); summarySummary.setFont(summarySummary.getFont().deriveFont(summarySummary.getFont().getSize() + 5f)); content.add(summarySummary, "cell 0 4,alignx center,growx 0"); } scrollPane.setViewportView(content); } add(scrollPane); // JFormDesigner - End of component initialization //GEN-END:initComponents docLink.setListener((aSource, aLinkData) -> { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("https://www.material-theme.com")); } catch (final IOException | URISyntaxException e) { e.printStackTrace(); } } }, null); paypalLink.setListener((aSource, aLinkData) -> { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("https://paypal.me/mallowigi")); } catch (final IOException | URISyntaxException e) { e.printStackTrace(); } } }, null); openCollLink.setListener((aSource, aLinkData) -> { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("https://opencollective.com/material-theme-jetbrains")); } catch (final IOException | URISyntaxException e) { e.printStackTrace(); } } }, null); } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables // Generated using JFormDesigner non-commercial license private JBScrollPane scrollPane; private JPanel content; private JTextArea summary; private JLabel summaryLabel; private LinkLabel docLink; private JLabel paypalLabel; private LinkLabel paypalLink; private JLabel label1; private LinkLabel openCollLink; private JPanel vSpacer1; private JLabel summarySummary; // JFormDesigner - End of variables declaration //GEN-END:variables }
[ "heliosaian@gmail.com" ]
heliosaian@gmail.com
9447191c4325dd21ead7b61d1b4e84c4fbe3fc3c
92f6227f08e19bd2e1bf79738bf906b9ed134091
/chapter_009/securityfilter/src/main/java/ru/job4j/auth/AuthFilter.java
123817871de624f02c404e7d3fa78d91953d6c2b
[ "Apache-2.0" ]
permissive
kirillkrohmal/krohmal
b8af0e81b46081f53c8ff857609bb99785165f3f
12a8ce50caf76cf2c3b54a7fbaa2813fd3550a78
refs/heads/master
2023-06-23T17:27:56.513004
2023-06-13T07:05:56
2023-06-13T07:05:56
91,477,464
0
0
Apache-2.0
2023-02-22T08:20:14
2017-05-16T15:58:50
Java
UTF-8
Java
false
false
1,394
java
package ru.job4j.auth; import ru.job4j.model.User; import javax.servlet.*; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; public class AuthFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; if (httpServletRequest.getRequestURI().contains("/loginsecurity")) { filterChain.doFilter(servletRequest, servletResponse); } else { HttpSession httpSession = httpServletRequest.getSession(); synchronized (httpSession) { User user = (User)httpSession.getAttribute("user"); if (user == null) { ((HttpServletResponse) servletResponse).sendRedirect(String.format("%s/loginsecurity", httpServletRequest.getContextPath())); return; } filterChain.doFilter(servletRequest, servletResponse); } } } @Override public void destroy() { } }
[ "krohmal_kirill@mail.ru" ]
krohmal_kirill@mail.ru
80088e08a89d1dff8be285e929f5b3c2a0fdf7cc
f42ff86f7bac5ff99e4be64d1c2536ffee345378
/src/main/java/tony/sword_to_offer/_61_poker_cards.java
86eb0fcb5f634f913dfa24e3b8fe810e16329692
[]
no_license
tonybro233/leetcode-java-record
71c5cb565b71e0006386e20f1ac67698f6679c4e
7b861da5fa332999d415b2f31a95733959e78550
refs/heads/master
2023-03-09T21:22:45.840994
2022-12-13T15:12:19
2022-12-13T15:12:19
158,099,906
0
0
null
2020-10-14T08:32:45
2018-11-18T15:47:36
Java
UTF-8
Java
false
false
991
java
package tony.sword_to_offer; // 61. 扑克牌中的顺子 // 从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的。 // 2~10为数字本身,A为1,J为11,Q为12,K为13,而大、小王为 0 ,可以看成任意数字。A 不能视为 14。 // // 示例 1: // 输入: [1,2,3,4,5] // 输出: True // // 示例 2: // 输入: [0,0,1,2,5] // 输出: True import java.util.Arrays; public class _61_poker_cards { // 这他妈的大小王是癞子??? public boolean isStraight(int[] nums) { Arrays.sort(nums); int zeros = 0; for (int num : nums) { if (num != 0) { break; } else { zeros++; } } for (int i = zeros; i < nums.length - 1;i++) { if (nums[i] == nums[i + 1]) { return false; } } return nums[nums.length - 1] - nums[zeros] + 1 <= nums.length; } }
[ "x2040052@126.com" ]
x2040052@126.com
9d7aacc8cdea4cc3033892b888cad14293a1303a
d33574802593c6bb49d44c69fc51391f7dc054af
/ShipLinx/src/main/java/com/meritconinc/shiplinx/carrier/utils/GenericLabelGenerator.java
610e4b91b038ce0f5ad7fd0f05ee3f2817cc7327
[]
no_license
mouadaarab/solushipalertmanagement
96734a0ff238452531be7f4d12abac84b88de214
eb4cf67a7fbf54760edd99dc51efa12d74fa058e
refs/heads/master
2021-12-06T06:09:15.559467
2015-10-06T09:00:54
2015-10-06T09:00:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,237
java
package com.meritconinc.shiplinx.carrier.utils; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; import net.sf.jasperreports.engine.util.JRLoader; import org.apache.log4j.Logger; import com.lowagie.text.Chunk; import com.lowagie.text.Document; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.Paragraph; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.BaseFont; import com.lowagie.text.pdf.PdfContentByte; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfWriter; import com.meritconinc.shiplinx.model.Customer; import com.meritconinc.shiplinx.model.ShippingOrder; import com.meritconinc.shiplinx.utils.ShiplinxConstants; public abstract class GenericLabelGenerator{ private static Logger logger = Logger.getLogger(GenericLabelGenerator.class); protected static Font[] shipping_label_fonts = new Font[24]; protected static Font[] package_label_fonts = new Font[9]; static{ //fonts for shipping label shipping_label_fonts[0] = new Font(Font.HELVETICA, Font.DEFAULTSIZE-5, Font.NORMAL); shipping_label_fonts[1] = new Font(Font.HELVETICA, Font.DEFAULTSIZE-5, Font.ITALIC); shipping_label_fonts[2] = new Font(Font.HELVETICA, Font.DEFAULTSIZE-5, Font.BOLD); shipping_label_fonts[3] = new Font(Font.HELVETICA, Font.DEFAULTSIZE-2, Font.NORMAL); shipping_label_fonts[4] = new Font(Font.HELVETICA, Font.DEFAULTSIZE-2, Font.BOLD); shipping_label_fonts[5] = new Font(Font.HELVETICA, Font.DEFAULTSIZE+30, Font.BOLD); shipping_label_fonts[6] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.NORMAL); shipping_label_fonts[7] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.BOLD); shipping_label_fonts[8] = new Font(Font.HELVETICA, Font.DEFAULTSIZE+2, Font.BOLD); //fedex shipping_label_fonts[9] = new Font(Font.HELVETICA, 8, Font.NORMAL); shipping_label_fonts[10] = new Font(Font.HELVETICA, 8, Font.BOLD); shipping_label_fonts[11] = new Font(Font.HELVETICA, 10, Font.BOLD); shipping_label_fonts[12] = new Font(Font.HELVETICA, 14, Font.BOLD); shipping_label_fonts[13] = new Font(Font.HELVETICA, 16, Font.NORMAL); shipping_label_fonts[14] = new Font(Font.HELVETICA, 5, Font.NORMAL); shipping_label_fonts[15] = new Font(Font.HELVETICA, 7, Font.NORMAL); shipping_label_fonts[16] = new Font(Font.COURIER, 14, Font.NORMAL); shipping_label_fonts[17] = new Font(Font.HELVETICA, 6, Font.BOLD); shipping_label_fonts[18] = new Font(Font.HELVETICA, 14, Font.NORMAL); shipping_label_fonts[19] = new Font(Font.HELVETICA, 12, Font.NORMAL); shipping_label_fonts[20] = new Font(Font.COURIER, 20, Font.BOLD); shipping_label_fonts[21] = new Font(Font.HELVETICA, 12, Font.BOLD); shipping_label_fonts[22] = new Font(Font.HELVETICA, 30, Font.BOLD); shipping_label_fonts[23] = new Font(Font.HELVETICA, 20, Font.BOLD); //fonts for package label package_label_fonts[0] = new Font(Font.TIMES_ROMAN, 8, Font.NORMAL); package_label_fonts[1] = new Font(Font.TIMES_ROMAN, 8, Font.ITALIC); package_label_fonts[2] = new Font(Font.TIMES_ROMAN, 10, Font.BOLD); package_label_fonts[3] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.NORMAL); package_label_fonts[4] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD); package_label_fonts[5] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD); package_label_fonts[6] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.NORMAL); package_label_fonts[7] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD); package_label_fonts[8] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD); } public GenericLabelGenerator(){} public GenericLabelGenerator(int carrierId){ setCarrierId(carrierId); } public String labelHeader = null; public int carrierId; // protected Order order = null; // protected OutputStream outputStream = null; public abstract void setUp(); public abstract void generateShippingLabel(ShippingOrder o, OutputStream outputStream); public abstract void generateShippingLabel(ShippingOrder o, OutputStream outputStream, Document document, PdfWriter writer); public void generateGenericLabel(OutputStream outputStream, ShippingOrder order, Customer customer){ try{ InputStream stream = this.getClass().getClassLoader().getResourceAsStream("./jasperreports/CWSWayBill2.jasper"); if(stream==null) logger.error("Stream is NULL!"); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(stream); Map parameters = new HashMap(); // Franchise f = BusinessRequestSession.getFranchise(); // if(f==null) // logger.error("Franchise is NULL!"); // parameters.put("FRANCHISE", f); parameters.put("Order", order); JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(order.getPackages()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds); JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream); } catch(Exception e) { logger.error("Could not generate way bill label for order with id " + order.getId() + " and customer " + customer.getName(), e); e.printStackTrace(); //throw new PdfGenerationException(); } } public void generateGenericLabel(OutputStream outputStream, ShippingOrder order, Customer customer, Document document, PdfWriter writer){ try{ InputStream stream = this.getClass().getClassLoader().getResourceAsStream("./jasperreports/CWSWayBill2.jasper"); if(stream==null) logger.error("Stream is NULL!"); JasperReport jasperReport = (JasperReport)JRLoader.loadObject(stream); Map parameters = new HashMap(); // Franchise f = BusinessRequestSession.getFranchise(); // if(f==null) // logger.error("Franchise is NULL!"); // parameters.put("FRANCHISE", f); parameters.put("Order", order); JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(order.getPackages()); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds); JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream); } catch(Exception e) { logger.error("Could not generate way bill label for order with id " + order.getId() + " and customer " + customer.getName(), e); e.printStackTrace(); // throw new PdfGenerationException(); } } /** * @param carrierId The carrierId to set. */ public void setCarrierId(int carrier_id) { carrierId = carrier_id; } }
[ "harikrishnan.r@mitosistech.com" ]
harikrishnan.r@mitosistech.com
f8a71cb45f4216a6f460d9777fa7009229ee5877
a7454682c6413d11647e0eacc63704b5c3bc8ee4
/SAVOIR_MgmtServices/src/ca/gc/nrc/iit/savoir/model/registration/RegistrationTicket.java
4f462c8248fe6dc6f4a9a3a63a98fc3e6f05029f
[]
no_license
savoir2013/savoir
ffec9b38d2cd41cac689c776bb5c742d0d1dc65a
daa80b13475729ba1d490f8dd93d85553bca09aa
refs/heads/master
2021-01-22T09:47:18.370871
2013-01-29T21:26:46
2013-01-29T21:26:46
7,899,749
1
0
null
null
null
null
UTF-8
Java
false
false
1,876
java
// Licensed under Apache 2.0 // Copyright 2011, National Research Council of Canada // Property of Lakehead University package ca.gc.nrc.iit.savoir.model.registration; import ca.gc.nrc.iit.savoir.model.SavoirXml; import ca.gc.nrc.iit.savoir.model.profile.Widget; /** * Represents a service registration ticket, as defined in the "<b>Edge Service * Registration</b>" section of the SAVOIR message spec. * * @author Aaron Moss */ public class RegistrationTicket extends SavoirXml { /** Basic information about the service, and contact details for the * owner */ private ServiceInfo service; /** Transport-level parameters for communication with the device */ private NetworkInfo network; /** Specification to generate the device widget */ private Widget widget; /** Device-specific parameters required to manage the device */ private DeviceInfo device; public RegistrationTicket() {} //Java bean API public ServiceInfo getService() { return service; } public NetworkInfo getNetwork() { return network; } public Widget getWidget() { return widget; } public DeviceInfo getDevice() { return device; } public void setService(ServiceInfo service) { this.service = service; } public void setNetwork(NetworkInfo network) { this.network = network; } public void setWidget(Widget widget) { this.widget = widget; } public void setDevice(DeviceInfo device) { this.device = device; } //Fluent API public RegistrationTicket withService(ServiceInfo service) { this.service = service; return this; } public RegistrationTicket withNetwork(NetworkInfo network) { this.network = network; return this; } public RegistrationTicket withWidget(Widget widget) { this.widget = widget; return this; } public RegistrationTicket withDevice(DeviceInfo device) { this.device = device; return this; } }
[ "Justin.Hickey@nrc.gc.ca" ]
Justin.Hickey@nrc.gc.ca
d65e2a90f948e05690e4b878049f0e9a3a9f3099
a7995a853290193abbac8790572017cdeb227fe2
/src/ZTX/NO02/Main.java
c8786dbcf86b95493b6daa8b4f0c1f242d7e28a4
[]
no_license
JJFly-JOJO/LeetCode
c42775973f025f5d8c82ca1f0921f0de117ca6de
0c172a87ca4e0f23e68f388186c77f9e51370660
refs/heads/master
2023-07-09T20:47:22.363062
2021-08-11T16:57:06
2021-08-11T16:57:06
328,843,633
0
1
null
null
null
null
UTF-8
Java
false
false
734
java
package ZTX.NO02; import java.util.Scanner; /** * @author zzj * @version 1.0 * @date 2021/4/24 15:09 * @description */ public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int T = scanner.nextInt(); scanner.nextLine(); for (int i = 0; i < T; i++) { long n = scanner.nextLong(); long result = getResult(n); System.out.println(result); scanner.nextLine(); } } private static long getResult(long n) { long digit = 1L; long count = 0L; while (digit < n) { digit = digit << 1; count++; } return count + 1; } }
[ "13419232991@163.com" ]
13419232991@163.com
6deeaa13da913207de4c6644e650ec88bdfe0799
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/data-class_2_84/22.java
af73f742b12d8848248eb8ca8ba0389599f476b7
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
1,565
java
/** * Issue a grand total row at the bottom. * @return the suitable string */ protected String totalAllRows() { if (containsTotaledColumns) { List headerCells = tableModel.getHeaderCellList(); StringBuffer output = new StringBuffer(); int currentRow = getListIndex(); output.append(TagConstants.TAG_OPEN + TagConstants.TAGNAME_ROW + " class=\"grandtotal-row\"" + TagConstants.TAG_CLOSE); boolean first = true; for (Iterator iterator = headerCells.iterator(); iterator.hasNext(); ) { HeaderCell headerCell = (HeaderCell) iterator.next(); if (first) { output.append(getTotalsTdOpen(headerCell, getGrandTotalLabel())); output.append(getGrandTotalDescription()); first = false; } else if (headerCell.isTotaled()) { // a total if the column should be totaled Object total = getTotalForColumn(headerCell.getColumnNumber(), 0, currentRow); output.append(getTotalsTdOpen(headerCell, getGrandTotalSum())); output.append(formatTotal(headerCell, total)); } else { // blank, if it is not a totals column output.append(getTotalsTdOpen(headerCell, getGrandTotalNoSum())); } output.append(TagConstants.TAG_OPENCLOSING + TagConstants.TAGNAME_COLUMN + TagConstants.TAG_CLOSE); } output.append("\n</tr>\n"); return output.toString(); } else { return ""; } }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
db8c34a50ac8054562e09801eccf6776042e081b
bc614ca789e3b06674c853dcdbe67cf07c53b4fe
/MyBatisCascade/src/com/mybatis/cascade/mapper/MaleHealthFormMapper.java
0db78d3c096ca99c9c537b91dcb75592b0a0e75b
[]
no_license
reyhoo/web
53aca6b263781b6abd1e0a4bf44d867fd35945f0
f610a7cc410862387b3ac406883118fdb7df3f71
refs/heads/master
2021-01-25T08:01:08.790373
2019-05-04T03:06:17
2019-05-04T03:06:17
93,699,418
0
0
null
null
null
null
UTF-8
Java
false
false
183
java
package com.mybatis.cascade.mapper; import com.mybatis.cascade.pojo.MaleHealthForm; public interface MaleHealthFormMapper { MaleHealthForm getMaleHealthFormByEmpId(Long empId); }
[ "373561022@qq.com" ]
373561022@qq.com
5d1e8c4ce5e47147d0ec273b902974a48b266336
e88215712898c8faad7aa4b7b7278cbb3a47e162
/src/com/eoulu/controller/DownloadUSDContractServlet.java
63e8eb8d1a03618db6493a14fc93a25691037ac8
[]
no_license
LGDHuaOPER/HuaFEEng_Goose
f482fff96aaf8d1910b3ee11a181d8423c276b9b
318ca4377a0d37c9dcebb925456591ddf264e23d
refs/heads/master
2020-03-27T23:12:46.256068
2018-09-29T10:13:27
2018-09-29T10:13:27
147,301,655
2
1
null
null
null
null
UTF-8
Java
false
false
1,557
java
package com.eoulu.controller; import java.io.IOException; import java.net.URLDecoder; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.eoulu.service.LogInfoService; import com.eoulu.service.QuoteSystemService; import com.eoulu.service.impl.LogInfoServiceImpl; import com.eoulu.service.impl.QuoteSystemServiceImpl; import com.eoulu.syn.ExportContractPDF; import com.eoulu.util.ConventerToPDFUtil; import com.eoulu.util.Java2Word; @WebServlet("/DownloadUSDContract") public class DownloadUSDContractServlet extends HttpServlet{ private static final long serialVersionUID = 1L; public DownloadUSDContractServlet(){ super(); } @SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException { ExportContractPDF pdf = new ExportContractPDF(); String loadUrl = pdf.exportContractUSD(request); URLDecoder.decode(loadUrl, "UTF-8"); LogInfoService log = new LogInfoServiceImpl(); String JspInfo = "报价系统"; String description2 = "导出-EOULU美金合同"; log.insert(request, JspInfo, description2); resp.getWriter().write(loadUrl); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { } }
[ "LGD_HuaOPER@gmail.com" ]
LGD_HuaOPER@gmail.com
d4e84cf32fbfa4070a41a9371eb969bb833abcbb
22a190b756695fc8447caa1e5e32d5f9323d4e37
/安卓服务器/src/com/mobileserver/domain/Teacher.java
8121ecb082f62964705c086561b8f8183d4bbc5f
[]
no_license
wangjianlin1985/android_xuanti
e3fddda296e3985b4a197175f707c5fefc5a1a8d
d58f174bd851ace2b9ba7fca7514beeb6ff0c96f
refs/heads/master
2023-05-14T12:15:52.531435
2023-05-08T13:10:12
2023-05-08T13:10:12
199,395,437
0
0
null
null
null
null
GB18030
Java
false
false
2,412
java
package com.mobileserver.domain; public class Teacher { /*教师编号*/ private String teacherNumber; public String getTeacherNumber() { return teacherNumber; } public void setTeacherNumber(String teacherNumber) { this.teacherNumber = teacherNumber; } /*登录密码*/ private String password; public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } /*姓名*/ private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } /*性别*/ private String sex; public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } /*出生日期*/ private java.sql.Timestamp birthday; public java.sql.Timestamp getBirthday() { return birthday; } public void setBirthday(java.sql.Timestamp birthday) { this.birthday = birthday; } /*教师照片*/ private String photo; public String getPhoto() { return photo; } public void setPhoto(String photo) { this.photo = photo; } /*职称*/ private String professName; public String getProfessName() { return professName; } public void setProfessName(String professName) { this.professName = professName; } /*联系电话*/ private String telephone; public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } /*家庭地址*/ private String address; public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } /*入职日期*/ private java.sql.Timestamp inDate; public java.sql.Timestamp getInDate() { return inDate; } public void setInDate(java.sql.Timestamp inDate) { this.inDate = inDate; } /*教师简介*/ private String introduce; public String getIntroduce() { return introduce; } public void setIntroduce(String introduce) { this.introduce = introduce; } }
[ "287307421@qq.com" ]
287307421@qq.com
272e362b6fddeda213c3173d824b9d80b2dc40c1
8df30366e02eda0fdfc13171e9aa93e9c4180647
/spring-cloud-samples/finchley/weather/msa-weather-city-server/src/main/java/io/github/futurewl/scs/f/vo/City.java
a0b17968e3b54cd64a294c6f9f80edb5d90c2b3f
[]
no_license
FutureWL/spring-samples
d9ab92614b5d238d321101c5e2c09e1e2b989d24
718da85c5397e8441f69293b3aaaf47b7e05130a
refs/heads/master
2023-03-06T15:35:45.645062
2020-10-03T02:07:24
2020-10-03T02:07:24
160,497,481
1
0
null
null
null
null
UTF-8
Java
false
false
1,258
java
package io.github.futurewl.scs.f.vo; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; /** * 功能描述: * * @author weilai create by 2019-06-08:21:51 * @version 1.0 */ @XmlRootElement(name = "d") @XmlAccessorType(XmlAccessType.FIELD) public class City { @XmlAttribute(name = "d1") private String cityId; @XmlAttribute(name = "d2") private String cityName; @XmlAttribute(name = "d3") private String cityCode; @XmlAttribute(name = "d4") private String province; public String getCityId() { return cityId; } public void setCityId(String cityId) { this.cityId = cityId; } public String getCityName() { return cityName; } public void setCityName(String cityName) { this.cityName = cityName; } public String getCityCode() { return cityCode; } public void setCityCode(String cityCode) { this.cityCode = cityCode; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } }
[ "624263934@qq.com" ]
624263934@qq.com
cd30322c8140cada403275ff94c03e10028d31f4
bc703c071ea79671e4b963b94890ced311d34c76
/app/src/main/java/com/michen/olaxueyuan/ui/index/activity/TeacherInfoFragment.java
d5274b7707c82b7838a1da4dd26a1b3432950330
[]
no_license
uu993/OlaAcademy
7d4fddc01ebf8bd86b869bd7ee7760ff15099006
c9ce3d8b057441cc2b9f79b247094276470777e9
refs/heads/master
2020-04-03T22:05:52.096362
2017-12-05T02:21:46
2017-12-05T02:21:46
57,137,450
1
4
null
2016-11-17T14:28:54
2016-04-26T14:59:22
Java
UTF-8
Java
false
false
2,933
java
package com.michen.olaxueyuan.ui.index.activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import com.michen.olaxueyuan.protocol.manager.SERestManager; import com.michen.olaxueyuan.protocol.service.SETeacherService; import com.michen.olaxueyuan.R; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import retrofit.Callback; import retrofit.RetrofitError; import retrofit.client.Response; import retrofit.mime.TypedInput; /** * A simple {@link Fragment} subclass. */ public class TeacherInfoFragment extends Fragment { private WebView teacherView; private static final String ARG_ID = "id"; private String teacherHtml; public TeacherInfoFragment() { // Required empty public constructor } public static TeacherInfoFragment newInstance(String arg) { TeacherInfoFragment fragment = new TeacherInfoFragment(); Bundle bundle = new Bundle(); bundle.putString(ARG_ID, arg); fragment.setArguments(bundle); return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_teacher_info, container, false); teacherView = (WebView) rootView.findViewById(R.id.teacherInfo); initTeacherBasicInfo(); return rootView; } private void initTeacherBasicInfo() { SETeacherService teacherService = SERestManager.getInstance().create(SETeacherService.class); String id = getArguments().getString(ARG_ID); if (TextUtils.isEmpty(id)) { return; } teacherService.fetchTeacherInfoHtml(id, new Callback<Response>() { @Override public void success(Response response, Response response2) { TypedInput body = response.getBody(); try { BufferedReader reader = new BufferedReader(new InputStreamReader(body.in())); StringBuilder out = new StringBuilder(); String newLine = System.getProperty("line.separator"); String line; while ((line = reader.readLine()) != null) { out.append(line); out.append(newLine); } teacherHtml = out.toString(); teacherView.loadDataWithBaseURL(null, teacherHtml, "text/html", "UTF-8", null); } catch (IOException e) { e.printStackTrace(); } } @Override public void failure(RetrofitError error) { } }); } }
[ "forevertxp@gmail.com" ]
forevertxp@gmail.com