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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16e1ab6675dcbb738a8f0728650d005644f7efe2
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/app/p1011ad/IAdPreloadWebView.java
|
6e455ac8b5d3e763712b5351abebb5d855434fcf
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
package com.zhihu.android.app.p1011ad;
import com.zhihu.android.base.widget.ZHWebView;
/* renamed from: com.zhihu.android.app.ad.b */
/* compiled from: IAdPreloadWebView */
public interface IAdPreloadWebView<T extends ZHWebView> {
/* renamed from: a */
void mo64084a();
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
dafb6c63494a4a2ecdf1b0843d990e67664701a4
|
84875513efcf4846a3e3add9aa6aa320082e3762
|
/app/src/main/java/nerdvana/com/pointofsales/api_requests/BackupDatabaseRequest.java
|
5cf1731d36119ab07f84d43ff340c67877817ef8
|
[] |
no_license
|
dionedavellorera/PointOfSales
|
7f3836293c13a6f00eaa9944a4c88a729ebba903
|
a412714a14e20b72df3769d8d96bab87f285e9cb
|
refs/heads/master
| 2021-07-09T09:14:07.252082
| 2020-07-28T11:21:54
| 2020-07-28T11:21:54
| 164,046,007
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 820
|
java
|
package nerdvana.com.pointofsales.api_requests;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import nerdvana.com.pointofsales.ApplicationConstants;
import nerdvana.com.pointofsales.GsonHelper;
import nerdvana.com.pointofsales.model.PostedPaymentsModel;
public class BackupDatabaseRequest extends BaseRequest {
private Map<String, String> mapValue;
public BackupDatabaseRequest() {
mapValue = new HashMap<>();
mapValue.put("user_id", userId);
mapValue.put("pos_id", machineNumber);
mapValue.put("branch_id", branchId);
mapValue.put("branch_code", branchCode);
mapValue.put("tax", tax);
mapValue.put(ApplicationConstants.POS_TO_ID, toId);
}
public Map<String, String> getMapValue() {
return mapValue;
}
}
|
[
"dionedavellorera@gmail.com"
] |
dionedavellorera@gmail.com
|
46811d706c63fb8443f10240c73fed4b5aa635cd
|
59e6dc1030446132fb451bd711d51afe0c222210
|
/components/identity/org.wso2.carbon.identity.entitlement/4.2.0/src/main/java/org/wso2/carbon/identity/entitlement/cache/DecisionInvalidationCache.java
|
b3ff1f954435b6ecb4a776244a02af830685933f
|
[] |
no_license
|
Alsan/turing-chunk07
|
2f7470b72cc50a567241252e0bd4f27adc987d6e
|
e9e947718e3844c07361797bd52d3d1391d9fb5e
|
refs/heads/master
| 2020-05-26T06:20:24.554039
| 2014-02-07T12:02:53
| 2014-02-07T12:02:53
| 38,284,349
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,227
|
java
|
/*
* Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.wso2.carbon.identity.entitlement.cache;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.identity.entitlement.PDPConstants;
/**
*
*/
public class DecisionInvalidationCache extends EntitlementBaseCache<IdentityCacheKey, IdentityCacheEntry>{
private static DecisionInvalidationCache decisionInvalidationCache = null;
private static Log log = LogFactory.getLog(DecisionInvalidationCache.class);
private static final Object lock = new Object();
private int myHashCode;
private DecisionInvalidationCache() {
super(PDPConstants.PDP_DECISION_INVALIDATION_CACHE);
}
/**
* Gets a new instance of EntitlementPolicyInvalidationCache.
*
* @return A new instance of EntitlementPolicyInvalidationCache.
*/
public static DecisionInvalidationCache getInstance() {
if(decisionInvalidationCache == null){
synchronized (lock){
if(decisionInvalidationCache == null){
decisionInvalidationCache = new DecisionInvalidationCache();
}
}
}
return decisionInvalidationCache;
}
public void invalidateCache(){
int tenantId = CarbonContext.getCurrentContext().getTenantId();
IdentityCacheKey cacheKey = new IdentityCacheKey(tenantId, "");
int valueToCache = myHashCode + 1;
IdentityCacheEntry cacheEntry = new IdentityCacheEntry(valueToCache);
addToCache(cacheKey, cacheEntry);
if(log.isDebugEnabled()){
log.debug("My Hash code of Decision cache is : " + myHashCode);
log.debug("Adding Shared Hash of Decision cache : " + valueToCache);
}
}
public boolean isInvalidate(){
int hashCode;
int tenantId = CarbonContext.getCurrentContext().getTenantId();
IdentityCacheKey cacheKey = new IdentityCacheKey(tenantId, "");
Object entry = getValueFromCache(cacheKey);
if(entry != null){
IdentityCacheEntry cacheEntry = (IdentityCacheEntry) entry;
hashCode = cacheEntry.getHashEntry();
if(log.isDebugEnabled()){
log.debug("My Hash code of Decision cache is : " + myHashCode);
log.debug("Shared Hash code of Decision cache is : " + hashCode);
}
if(hashCode > myHashCode){
myHashCode = hashCode;
return true;
}
}
return false;
}
}
|
[
"malaka@wso2.com"
] |
malaka@wso2.com
|
d95775df930d06eacac465133663fc297e34429a
|
9b01ffa3db998c4bca312fd28aa977f370c212e4
|
/app/src/streamB/java/com/loki/singlemoduleapp/stub/SampleClass2139.java
|
ee9828fc3ba33a02cda7ec45eda2b55ad3eed51f
|
[] |
no_license
|
SergiiGrechukha/SingleModuleApp
|
932488a197cb0936785caf0e73f592ceaa842f46
|
b7fefea9f83fd55dbbb96b506c931cc530a4818a
|
refs/heads/master
| 2022-05-13T17:15:21.445747
| 2017-07-30T09:55:36
| 2017-07-30T09:56:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package stub;
public class SampleClass2139 {
private SampleClass2140 sampleClass;
public SampleClass2139(){
sampleClass = new SampleClass2140();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
ec0144cebb3cd09b7c615f9ac35d391ccc03cb58
|
f87bf7001040cf7720ca74507ea894cd2bc45104
|
/experiments/commons-primitives/intstack/org.apache.commons.collections.primitives.IntStack.pop()/initial_scenario/InitialScenario.java
|
f191ffc7418a4bb5cad02c4c87a13c5dc3c98438
|
[] |
no_license
|
andreamattavelli/sbes-experiments
|
a1e55bbfa3ce64e8a62b2a7f8d0e52b174af22f8
|
7f49095dafe523368cf019f30855daa914476e86
|
refs/heads/master
| 2021-03-24T13:16:56.955325
| 2017-03-18T11:55:28
| 2017-03-18T11:55:28
| 62,624,376
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 702
|
java
|
/*
* File contenente lo scenario iniziale, generato manualmente
*
*/
package org.apache.commons.collections.primitives;
import static org.junit.Assert.*;
import org.junit.Test;
import org.apache.commons.collections.primitives.IntStack;
public class InitialScenario{
@Test
public void test0() throws Throwable {
//Lo scenario iniziale rappresenta l'uso generale di un metodo
//Non uso la classe astratta, ma quella concreta
IntStack stack0 = new IntStack();
Integer int0 = new Integer(12);
Integer int1 = new Integer(25);
Integer int2 = new Integer(4);
int add0 = stack0.push(int0);
int add1 = stack0.push(int1);
int add2 = stack0.push(int2);
int pop0 = stack0.pop();
}
}
|
[
"andreamattavelli@gmail.com"
] |
andreamattavelli@gmail.com
|
4a3bac304d53c7ec50d370347801aaa50023fbe3
|
79a39e0a51ad5c5eaebae6d52dec0cbdc9de7cdb
|
/src/main/java/com/grgbanking/electric/service/IRoleOrganizationService.java
|
4281d706be1fa154a0a1f7f0de32c476bc886be1
|
[] |
no_license
|
heshengyx/electric-skeleton
|
b1b0a57f0dd25aafa4a40fd32c8161492d948295
|
aee76ef814c0cf4871332537fee4fefa571b594f
|
refs/heads/master
| 2020-01-23T21:49:56.142103
| 2016-12-15T08:13:17
| 2016-12-15T08:13:17
| 74,740,395
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,002
|
java
|
package com.grgbanking.electric.service;
import java.util.List;
import com.grgbanking.electric.entity.RoleOrganization;
import com.grgbanking.electric.param.RoleOrganizationQueryParam;
import com.grgbanking.electric.page.IPage;
import com.grgbanking.electric.data.RoleOrganizationData;
public interface IRoleOrganizationService {
/**
* 新增
* @param roleOrganization
*/
void save(RoleOrganization roleOrganization);
/**
* 批量新增
* @param roleOrganizations
* @return
*/
void saveBatch(List<RoleOrganization> roleOrganizations);
/**
* 批量新增
* @param data
* @return
*/
void saveBatchData(RoleOrganizationData data);
/**
* 修改
* @param RoleOrganization
*/
void update(RoleOrganization roleOrganization);
/**
* 根据ID删除
* @param id
*/
void deleteById(String id);
/**
* 多条件删除
* @param roleOrganization
*/
void delete(RoleOrganization roleOrganization);
/**
* 根据ID批量删除
* @param id
*/
void deleteByIds(List<String> ids);
/**
* 根据ID查找
* @param id
* @return
*/
RoleOrganization getById(String id);
/**
* 多条件查找
* @param roleOrganization
* @return
*/
RoleOrganization getData(RoleOrganization roleOrganization);
/**
* 保存或修改
* @param roleOrganization
*/
void saveOrUpdate(RoleOrganization roleOrganization);
/**
* 查询分页
* @param param
* @return
*/
IPage<RoleOrganization> query(RoleOrganizationQueryParam param);
/**
* 查询全部
* @param param
* @return
*/
List<RoleOrganization> queryAll(RoleOrganizationQueryParam param);
/**
* 根据用户ID查找机构ID
* @param userId
* @return
*/
List<RoleOrganization> queryByUserId(String userId);
}
|
[
"heshengyx@163.com"
] |
heshengyx@163.com
|
4184e30184168b88dadae596497ecb8b6d30a984
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/csplugins/trunk/toronto/yuedong/multi_renderer/impl/psi-mi-impl/impl/src/main/java/org/cytoscape/psi_mi/internal/plugin/PsiMiNetworkWriterFactory.java
|
30bc4b9c38197066ee45e13552219cc166d66d54
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package org.cytoscape.psi_mi.internal.plugin;
import java.io.OutputStream;
import org.cytoscape.io.CyFileFilter;
import org.cytoscape.io.write.CyNetworkViewWriterFactory;
import org.cytoscape.io.write.CyWriter;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.view.model.CyNetworkView;
public class PsiMiNetworkWriterFactory implements CyNetworkViewWriterFactory {
private final SchemaVersion version;
private final CyFileFilter filter;
private OutputStream os;
private CyNetwork network;
public PsiMiNetworkWriterFactory(SchemaVersion version, CyFileFilter filter) {
this.version = version;
this.filter = filter;
}
@Override
public void setOutputStream(OutputStream os) {
this.os = os;
}
@Override
public CyWriter getWriterTask() {
return new PsiMiWriter(os, network, version);
}
@Override
public CyFileFilter getFileFilter() {
return filter;
}
@Override
public void setNetwork(CyNetwork network) {
this.network = network;
}
@Override
public void setNetworkView(CyNetworkView view) {
this.network = view.getModel();
}
}
|
[
"jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
jm@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
5e9b4fce7b640c10036967697d13a344112885f7
|
f56f7dfe684e448f72c32dd4d56dc81dd494dd35
|
/thrift/compiler/test/fixtures/java-swift-annotation/gen-swift/test/fixtures/annotation/MyAnnotationServiceReactiveBlockingWrapper.java
|
34f0921bd6c4a6c9b9be29bb0d8ba8c6bedb905a
|
[
"Apache-2.0"
] |
permissive
|
CHJoanna/fbthrift
|
088145e079078ab09d321d101c6cc50c128838b7
|
bb1dd6ba08f2fadacb801f968eee50493ab4e801
|
refs/heads/master
| 2023-03-23T13:20:38.916692
| 2021-03-26T18:45:03
| 2021-03-26T18:46:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package test.fixtures.annotation;
import java.util.*;
public class MyAnnotationServiceReactiveBlockingWrapper
implements MyAnnotationService {
private final MyAnnotationService.Reactive _delegate;
public MyAnnotationServiceReactiveBlockingWrapper(MyAnnotationService.Reactive _delegate) {
this._delegate = _delegate;
}
@java.lang.Override
public void close() {
_delegate.close();
}
@java.lang.Override
public void ping() throws org.apache.thrift.TException {
_delegate.ping().block();
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
8b84c0ecaa54e7383b9a16fcebe5582eba647309
|
b494660c34135527b4443b9d79819fd75db5079b
|
/Mobilink/src/com/mobilink/app/activities/MobilinkCompareDetailsActivity.java
|
cc1885fe7b7db4cf4e0b3b54b54e0e976113b012
|
[] |
no_license
|
palash051/R-D
|
3ed47f9ac41685165a4730bda950e247492febdf
|
2bc1126409e6012be927557b20824d860ac624c9
|
refs/heads/master
| 2021-01-16T21:04:00.291049
| 2016-08-04T05:40:22
| 2016-08-04T05:40:22
| 64,904,130
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,551
|
java
|
package com.mobilink.app.activities;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;
import com.androidquery.AQuery;
import com.androidquery.callback.ImageOptions;
import com.mobilink.app.R;
import com.mobilink.app.utils.CommonTask;
import com.mobilink.app.utils.CommonURL;
import com.mobilink.app.utils.CommonValues;
public class MobilinkCompareDetailsActivity extends Activity {
WebView wvIndividual;
public static String selectedUsers;
public static String selectedOperatorNames;
ImageView ivOperatorName;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mobilink_individual_compare_details);
wvIndividual = (WebView) findViewById(R.id.wvIndividual);
ivOperatorName= (ImageView) findViewById(R.id.ivOperatorName);
}
@Override
protected void onResume() {
super.onResume();
if (!CommonTask.isOnline(this)) {
CommonTask.showMessage(this,"Network connection error.\nPlease check your internet connection.");
return;
}
((TextView)findViewById(R.id.tvDetailsHeader)).setText(CommonValues.getInstance().SelectedGraphItem);
((TextView)findViewById(R.id.tvDetailsOperatorNames)).setText(selectedOperatorNames.length()>50?selectedOperatorNames.substring(0,50)+"...":selectedOperatorNames);
AQuery aq = new AQuery(ivOperatorName);
ImageOptions imgOptions = CommonValues.getInstance().defaultImageOptions;
imgOptions.ratio = 0;
imgOptions.targetWidth = 200;
aq.id(ivOperatorName).image(CommonURL.getInstance().getImageServer+ CommonValues.getInstance().SelectedCompany.CompanyLogo,
imgOptions);
showGraph();
}
private void showGraph() {
wvIndividual.getSettings().setBuiltInZoomControls(true);
String URL ="";
selectedUsers=CommonValues.getInstance().SelectedCompany.CompanyID+","+selectedUsers;
if(MobilinkOperatorCompareActivity.ReportType.equals("Finance")){
URL = "http://120.146.188.232:9050/KPICompareFinance.aspx?reqd="
+ selectedUsers + "|"
+ CommonValues.getInstance().SelectedGraphItem;
}else{
URL = "http://120.146.188.232:9050/CompareNetworkKPI.aspx?reqd="
+ selectedUsers + "|"
+ CommonValues.getInstance().SelectedGraphItem;
}
wvIndividual.getSettings().setJavaScriptEnabled(true);
wvIndividual.getSettings().setLoadWithOverviewMode(true);
wvIndividual.getSettings().setUseWideViewPort(true);
wvIndividual.loadUrl(URL);
}
}
|
[
"md.jahirul.islam.bhuiyan.2014@gmail.com"
] |
md.jahirul.islam.bhuiyan.2014@gmail.com
|
1f89ee0fdabfc3c18dd5f4245c1aceeb79df9916
|
bc1f31b8effa207a3de819b4278b60536b6dfc84
|
/com/sun/javafx/webkit/prism/PrismGraphicsManager.java
|
f0d2e09e7eb77044902f24bec8874e2146da4fb0
|
[] |
no_license
|
ran-yu/entitySummarization
|
77d3529fb97d343dfb97b1079bee893c071e2bfa
|
538e128638bea2ce4ce1fca21434f84445dc080b
|
refs/heads/master
| 2020-04-06T04:08:48.810313
| 2016-11-10T13:30:38
| 2016-11-10T13:30:38
| 59,417,627
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,590
|
java
|
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.javafx.webkit.prism;
import com.sun.glass.ui.Screen;
import com.sun.media.jfxmedia.MediaManager;
import com.sun.prism.Graphics;
import com.sun.webkit.perf.WCFontPerfLogger;
import com.sun.webkit.perf.WCGraphicsPerfLogger;
import com.sun.webkit.graphics.*;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
public final class PrismGraphicsManager extends WCGraphicsManager {
private float highestPixelScale;
{
for (Screen s : Screen.getScreens()) {
highestPixelScale = Math.max(s.getScale(), highestPixelScale);
}
}
@Override protected WCImageDecoder getImageDecoder() {
return new WCImageDecoderImpl();
}
@Override public WCRenderQueue createRenderQueue(WCRectangle clip,
boolean opaque)
{
return new WCRenderQueueImpl(clip, opaque);
}
@Override protected WCRenderQueue createBufferedContextRQ(WCImage image) {
WCGraphicsContext g = new WCBufferedContext((PrismImage) image);
WCRenderQueue rq = new WCRenderQueueImpl(
WCGraphicsPerfLogger.isEnabled()
? new WCGraphicsPerfLogger(g) : g);
image.setRQ(rq);
return rq;
}
@Override protected WCFont getWCFont(String name, boolean bold, boolean italic, float size)
{
WCFont f = WCFontImpl.getFont(name, bold, italic, size);
return WCFontPerfLogger.isEnabled() && (f != null) ? new WCFontPerfLogger(f) : f;
}
@Override
protected WCFontCustomPlatformData createFontCustomPlatformData(
InputStream inputStream) throws IOException
{
return new WCFontCustomPlatformDataImpl(inputStream);
}
@Override
public WCGraphicsContext createGraphicsContext(Object platG) {
WCGraphicsContext g = new WCGraphicsPrismContext((Graphics)platG);
return WCGraphicsPerfLogger.isEnabled() ? new WCGraphicsPerfLogger(g) : g;
}
@Override public WCPageBackBuffer createPageBackBuffer() {
return new WCPageBackBufferImpl(highestPixelScale);
}
@Override
protected WCPath createWCPath() {
return new WCPathImpl();
}
@Override
protected WCPath createWCPath(WCPath path) {
return new WCPathImpl((WCPathImpl)path);
}
@Override
protected WCImage createWCImage(int w, int h) {
return new WCImageImpl(w, h);
}
@Override
protected WCImage createRTImage(int w, int h) {
return new RTImage(w, h, highestPixelScale);
}
@Override public WCImage getIconImage(String iconURL) {
return null;
}
@Override public Object toPlatformImage(WCImage image) {
return ((WCImageImpl) image).getImage();
}
@Override
protected WCImageFrame createFrame(int w, int h, ByteBuffer bytes) {
int[] data = new int[bytes.capacity() / 4];
bytes.order(ByteOrder.nativeOrder());
bytes.asIntBuffer().get(data);
final WCImageImpl wimg = new WCImageImpl(data, w, h);
return new WCImageFrame() {
public WCImage getFrame() { return wimg; }
};
}
@Override
protected WCTransform createTransform(double m00, double m10, double m01,
double m11, double m02, double m12)
{
return new WCTransform(m00, m10, m01, m11, m02, m12);
}
@Override
protected String[] getSupportedMediaTypes() {
String[] types = MediaManager.getSupportedContentTypes();
// RT-19949: disable FLV support (workaround for youtube):
// if browser reports support for video/x-flv, youtube player sets
// media source to FLV (H264+AAC) stream and does not switch to MP4 on error
int len = types.length;
for (int i=0; i<len; i++) {
if ("video/x-flv".compareToIgnoreCase(types[i]) == 0) {
System.arraycopy(types, i+1, types, i, len-(i+1));
len--;
}
}
if (len < types.length) {
String[] trimmedArray = new String[len];
System.arraycopy(types, 0, trimmedArray, 0, len);
types = trimmedArray;
}
return types;
}
@Override
protected WCMediaPlayer createMediaPlayer() {
return new WCMediaPlayerImpl();
}
}
|
[
"ranyu.zh@gmail.com"
] |
ranyu.zh@gmail.com
|
2f72648ab22a76951e44866a9ca794cf56791b28
|
636aacb4f61407eab882bd9be37b78c69f22a5f7
|
/src/test/java/RestPractice/Full_Cycle_Test.java
|
e27c11cc51d79868891a6947e3b23fae1e85a48d
|
[] |
no_license
|
fuysal/JDBCandAPI
|
2586fc93975e4172b9ee414eaf9e7b590cbdca9f
|
a4185a501c4ef55cd2211d3083ab19a331299988
|
refs/heads/master
| 2022-11-29T08:08:59.968684
| 2019-09-18T01:27:18
| 2019-09-18T01:27:18
| 207,938,280
| 0
| 0
| null | 2022-07-15T20:30:17
| 2019-09-12T01:26:15
|
Java
|
UTF-8
|
Java
| false
| false
| 3,014
|
java
|
package RestPractice;
import com.github.javafaker.Faker;
import io.restassured.http.ContentType;
import org.junit.Test;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
public class Full_Cycle_Test extends TestBase{
@Test
public void getSpartanAndDelete_Test(){
// calling utility to create new data
int spartanID = createRandomSpartan();
System.out.println(spartanID);
// updating the data using put request
given()
.log().all()
.pathParam("id",spartanID)
.body(new Spartan("Zeynep","Female",1231231231)).
when()
.put("/spartans/{id}",spartanID).
then()
.log().all()
.statusCode(204)
;
// verifying the updated data using get request
given()
.log().all().
//.pathParam("id",spartanID).
when()
.get("/spartans/{id}",spartanID). // another way to pass --> path pathParam
then()
.assertThat()
.and()
.statusCode(200)
.and()
.body("id",is(spartanID))
.body("name",is("Zeynep"))
.body("gender",is("Female"))
.body("phone",hasToString("1231231231"))
.and()
.header("content-type",is("application/json;charset=UTF-8"))
;
// deleting the data after verification
given()
.log().all().
when()
.delete("/spartans/"+spartanID).
then()
.log().all()
.statusCode(204)
// do not provide json path for empty body
.body(blankOrNullString())
;
// making sure the deleted data does not exists
given()
.log().all().
when()
.get("/spartans/"+spartanID).
then()
.statusCode(404)
;
}
/*
This method is creating random Spartan data by using Post request
It use faker to get random name , gender , phone number
eventually return the id of new resource created in the server
*/
public int createRandomSpartan(){
Faker faker = new Faker();
int randomIndex = faker.number().numberBetween(0,2);
String[] genders = {"Male","Female"};
String randomGender = genders[randomIndex];
Spartan spartan = new Spartan(faker.name().firstName(),
randomGender,
Long.parseLong(faker.number().digits(11) ) );
return given()
.log().all()
.contentType(ContentType.JSON)
.body(spartan).
when()
.post("/spartans")
.prettyPeek()
.jsonPath()
.getInt("data.id") ;
}
}
|
[
"github@cybertekschool.com"
] |
github@cybertekschool.com
|
8bd2f5e8ffb8ec7b133e249debabdf4cb47d6a70
|
cc05c50eda3a20d1b4e331b9723ce3c82dd0bdd4
|
/plh.pkix.core/plh.pkix.core.utils/src/main/java/org/adorsys/plh/pkix/core/utils/contact/ContactListener.java
|
e2ee0de299ac63c80ff92be5d1eefb1a4db9155b
|
[] |
no_license
|
francis-pouatcha/plh.pkix
|
584d0eba3c8161050feca727de6ed18325974d52
|
f047072c3856a0e0c81e7e3c1c174f5976fcb0a0
|
refs/heads/master
| 2021-03-27T10:55:17.027400
| 2014-06-03T05:14:11
| 2014-06-03T05:14:11
| 11,222,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
package org.adorsys.plh.pkix.core.utils.contact;
import org.bouncycastle.cert.X509CertificateHolder;
public interface ContactListener {
public void contactAdded(X509CertificateHolder certHolder);
public void issuedCertificateImported(X509CertificateHolder certHolder);
}
|
[
"francis.pouatcha@adorsys.com"
] |
francis.pouatcha@adorsys.com
|
a3e0d0ac14297c7199e62eaa7d9e275b2c1ce788
|
77ab252244005f80fbfc33f8e931a41e65e83e5a
|
/spring-boot-samples/spring-boot-sample-secure-oauth2-actuator/src/test/java/sample/secure/oauth2/actuator/SampleSecureOAuth2ActuatorApplicationTests.java
|
55338463c4ec526d845509ffa5fa60df1470543b
|
[
"Apache-2.0",
"Noweb"
] |
permissive
|
llsydn/spring-boot
|
d4401969d8ca51937bda7736fabea82944417c39
|
b88906cf98c4aa307952d27696897b2d4384b7e8
|
refs/heads/master
| 2023-01-03T12:14:42.767063
| 2019-09-26T08:53:10
| 2019-09-26T08:53:10
| 171,982,414
| 2
| 1
|
Apache-2.0
| 2022-12-27T14:50:56
| 2019-02-22T02:44:30
|
Java
|
UTF-8
|
Java
| false
| false
| 3,221
|
java
|
/*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.secure.oauth2.actuator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.FilterChainProxy;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.util.Base64Utils;
import org.springframework.web.context.WebApplicationContext;
import static org.hamcrest.CoreMatchers.containsString;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;
/**
* Series of automated integration tests to verify proper behavior of auto-configured,
* OAuth2-secured system
*
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class SampleSecureOAuth2ActuatorApplicationTests {
@Autowired
private WebApplicationContext context;
@Autowired
private FilterChainProxy filterChain;
private MockMvc mvc;
@Before
public void setUp() {
this.mvc = webAppContextSetup(this.context).addFilters(this.filterChain).build();
SecurityContextHolder.clearContext();
}
@Test
public void homePageSecuredByDefault() throws Exception {
this.mvc.perform(get("/")).andExpect(status().isUnauthorized())
.andExpect(header().string("WWW-Authenticate", containsString("Bearer")))
.andDo(print());
}
@Test
public void healthAvailable() throws Exception {
this.mvc.perform(get("/health")).andExpect(status().isOk()).andDo(print());
}
@Test
public void envSecuredWithBasic() throws Exception {
this.mvc.perform(get("/env")).andExpect(status().isUnauthorized())
.andExpect(header().string("WWW-Authenticate", containsString("Basic")))
.andDo(print());
}
@Test
public void envWithPassword() throws Exception {
this.mvc.perform(get("/env").header("Authorization",
"Basic " + Base64Utils.encodeToString("user:password".getBytes())))
.andExpect(status().isOk()).andDo(print());
}
}
|
[
"1091391667@qq.com"
] |
1091391667@qq.com
|
2c2fc4aa5c17e0703561936d0bb7578c632c53de
|
1b8de4feb0bddc44683cb80195f8cd59eb55aa5a
|
/janus-daemon/src/main/java/org/xujin/janus/daemon/JanusDaemonServer.java
|
a092890d2507412946820c8a452fbe2d960d481f
|
[] |
no_license
|
hetaoo/Janus
|
465bb506f30cee0b2df93c1299d98b1669bcb7fa
|
6c409d8944016c537c3c24848717e92926e2cea5
|
refs/heads/master
| 2023-02-05T09:10:19.210416
| 2020-12-31T03:27:44
| 2020-12-31T03:27:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,678
|
java
|
package org.xujin.janus.daemon;
import com.google.gson.Gson;
import org.xujin.janus.client.cmo.ChangeOnlineCmd;
import org.xujin.janus.client.cmo.ConfigChangeCmd;
import org.xujin.janus.client.cmo.RouteChangeCmd;
import org.xujin.janus.client.cmo.SendFileCmd;
import org.xujin.janus.config.admin.processer.ConfigChangeProcessor;
import org.xujin.janus.config.admin.processer.RouteChangeProcessor;
import org.xujin.janus.config.admin.processer.SendFileProcessor;
import org.xujin.janus.daemon.admin.processor.OnlineProcessor;
import org.xujin.janus.damon.JanusCmdServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
/**
* @author xujin
*/
public class JanusDaemonServer {
private static Logger logger = LoggerFactory.getLogger(JanusDaemonServer.class);
public static void start(int port) {
logger.info("start janus damon server ");
JanusCmdServer janusCmdServer = new JanusCmdServer();
Map janusServerProcessorMap = new HashMap(4);
logger.info("init processor map");
janusServerProcessorMap.put(SendFileCmd.method, new SendFileProcessor());
janusServerProcessorMap.put(ChangeOnlineCmd.method, new OnlineProcessor());
janusServerProcessorMap.put(ConfigChangeCmd.method, new ConfigChangeProcessor());
janusServerProcessorMap.put(RouteChangeCmd.method, new RouteChangeProcessor());
logger.info("damon server port:{},processorMap:{}", port, new Gson().toJson(janusServerProcessorMap));
janusCmdServer.init(port, janusServerProcessorMap);
janusCmdServer.start();
logger.info("janus damon server end!");
}
}
|
[
"Software_King@qq.com"
] |
Software_King@qq.com
|
56a974d62b0fe197e8b817f0f95d0187a9aca588
|
c7b70bfc62c76c6ee4c2c3dab1414c47f6af1754
|
/client/src/Class204.java
|
6c4e67b6222cfb4d11417f7892fbb9769e6c3ce6
|
[] |
no_license
|
EnlistedGhost/MorrowRealm-v718
|
4459bb58f5ceb4dca8e4ef5ee7dcd55e57951a6b
|
8608210d1a3a3bd4374200ffe938fc56d071b554
|
refs/heads/master
| 2020-06-01T21:26:28.610346
| 2019-06-24T18:48:29
| 2019-06-24T18:48:29
| 190,932,255
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,040
|
java
|
/* Class204 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
import java.awt.Canvas;
public class Class204 {
public static GraphicsToolkit method1911(Canvas canvas, Interface_ma interface_ma, CacheIndex class243, int i) {
GraphicsToolkit class_ra;
try {
boolean bool = Class_ra_Sub3.method5421();
if (!bool)
throw new RuntimeException("");
if (!Class85.method955(-739351876).method265("jagdx", 65483240))
throw new RuntimeException("");
class_ra = Class_ra_Sub3_Sub2.method5545(canvas, interface_ma, class243, Integer.valueOf(i));
} catch (RuntimeException runtimeexception) {
throw runtimeexception;
} catch (Throwable throwable) {
throw new RuntimeException("");
}
return class_ra;
}
public static GraphicsToolkit method1912(Canvas canvas, Interface_ma interface_ma, CacheIndex class243, int i) {
GraphicsToolkit class_ra;
try {
boolean bool = Class_ra_Sub3.method5421();
if (!bool)
throw new RuntimeException("");
if (!Class85.method955(-765516167).method265("jagdx", -1570923611))
throw new RuntimeException("");
class_ra = Class_ra_Sub3_Sub2.method5545(canvas, interface_ma, class243, Integer.valueOf(i));
} catch (RuntimeException runtimeexception) {
throw runtimeexception;
} catch (Throwable throwable) {
throw new RuntimeException("");
}
return class_ra;
}
Class204() throws Throwable {
throw new Error();
}
public static GraphicsToolkit method1913(Canvas canvas, Interface_ma interface_ma, CacheIndex class243, int i) {
GraphicsToolkit class_ra;
try {
boolean bool = Class_ra_Sub3.method5421();
if (!bool)
throw new RuntimeException("");
if (!Class85.method955(1227056345).method265("jagdx", 1326863059))
throw new RuntimeException("");
class_ra = Class_ra_Sub3_Sub2.method5545(canvas, interface_ma, class243, Integer.valueOf(i));
} catch (RuntimeException runtimeexception) {
throw runtimeexception;
} catch (Throwable throwable) {
throw new RuntimeException("");
}
return class_ra;
}
}
|
[
"enlisted.ghost@gmail.com"
] |
enlisted.ghost@gmail.com
|
32c2f3fa03f4643c8efce82c692e9a00ab6ed27d
|
834a3fd2cbadcefb32b0e2164ef7eebe87ab51e2
|
/maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/support/kerberos/RemoteKerberosService.java
|
efcab950e675d54f170f5b771c74bb75c78d82de
|
[
"Apache-2.0",
"CDDL-1.0",
"CPL-1.0",
"Zlib",
"EPL-1.0",
"bzip2-1.0.6",
"LicenseRef-scancode-unknown-license-reference",
"LZMA-exception"
] |
permissive
|
0xcaffebabe/MaxKey
|
697cbd4febf56f300352e1f4ebf75179656249bc
|
3f9e4960c7d3b641c69d08e7f17ad640bc49ebce
|
refs/heads/master
| 2023-07-01T10:25:26.712364
| 2021-08-03T01:49:56
| 2021-08-03T01:49:56
| 361,351,320
| 0
| 0
|
Apache-2.0
| 2021-04-28T08:02:02
| 2021-04-25T06:41:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,873
|
java
|
/*
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
*
* 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.maxkey.authn.support.kerberos;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.maxkey.util.JsonUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RemoteKerberosService implements KerberosService{
private static Logger _logger = LoggerFactory.getLogger(RemoteKerberosService.class);
List<KerberosProxy> kerberosProxys;
public List<KerberosProxy> getKerberosProxys() {
return kerberosProxys;
}
public void setKerberosProxys(List<KerberosProxy> kerberosProxys) {
this.kerberosProxys = kerberosProxys;
}
public String buildKerberosProxys(){
List<Map<String,String>>userDomainUrlList=new ArrayList<Map<String,String>>();
for (KerberosProxy kerberosProxy :kerberosProxys){
Map<String,String> userDomainUrl =new HashMap<String,String>();
userDomainUrl.put("userDomain", kerberosProxy.getUserdomain());
userDomainUrl.put("redirectUri", kerberosProxy.getRedirectUri());
userDomainUrlList.add(userDomainUrl);
}
_logger.debug(""+userDomainUrlList);
String userDomainUrlJson=JsonUtils.object2Json(userDomainUrlList);
_logger.debug("userDomain Url Json "+userDomainUrlJson);
return userDomainUrlJson;
}
}
|
[
"shimingxy@163.com"
] |
shimingxy@163.com
|
b0c47b6fc457a461c141236a7b5897ed67e0e04a
|
2201d0417ee47b70ce4f80c114519c52dbe98e6c
|
/src/com/geekdigging/chapter17/memento/Caretaker.java
|
c34e5c0c1eea71dd2d7e58f6cf720babe7170a74
|
[] |
no_license
|
meteor1993/design-patterns-learning
|
edd9e89efc52f546c937736025ab1c165dd2fcfe
|
dcbc9e99617349da119a191acb88ac87a2b016b4
|
refs/heads/master
| 2023-02-07T15:20:07.028469
| 2020-12-31T15:58:33
| 2020-12-31T15:58:33
| 305,451,337
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 303
|
java
|
package com.geekdigging.chapter17.memento;
/**
* 备忘录管理员
*/
public class Caretaker {
// 备忘录对象
private Memento memento;
public Memento getMemento() {
return memento;
}
public void setMemento(Memento memento) {
this.memento = memento;
}
}
|
[
"inwsy@hotmail.com"
] |
inwsy@hotmail.com
|
635089a1b3636c33788fa7b75304f1a28e51ab03
|
701eb586c5712ae32c99cc4c0fff2b83e0d7a1f1
|
/AliyunRecorder/record_demo/src/main/java/com/aliyun/demo/recorder/faceunity/FaceUnityManager.java
|
011db293381e9da1aece69e4756446d4f98df34c
|
[] |
no_license
|
ljw124/ZhaoYuNet
|
cdf00f5aca2a6241f20fd9d88ac9501ac9708ce9
|
66867c1c60f205ebcdb7cc045ea6d5f6a3a64fa7
|
refs/heads/master
| 2020-06-12T04:37:33.359999
| 2019-06-28T06:06:58
| 2019-06-28T06:06:58
| 194,196,241
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,924
|
java
|
package com.aliyun.demo.recorder.faceunity;
import android.content.Context;
import android.hardware.Camera;
import android.util.Log;
import com.faceunity.wrapper.faceunity;
import java.io.IOException;
import java.io.InputStream;
/**
* FaceUnify管理类,支持高级美颜(美白,磨皮,红润调整),美型(脸型,大眼,瘦脸)
*
* @author Mulberry
* create on 2018/7/11.
*/
public class FaceUnityManager {
private static final String TAG = "FaceUnityManager";
static FaceUnityManager faceUnityManager = null;
/**
* 美颜道具
*/
private int mFaceBeautyItem = 0;
/**
* 美白
*/
private float mFaceBeautyColorLevel = 0.2f;
/**
* 磨皮
*/
private float mFaceBeautyBlurLevel = 6.0f;
/**
* 精准磨皮,传0和1的值是指是否开启精准磨皮
*/
private float mFaceBeautyALLBlurLevel = 0.0f;
/**
* 红润
*/
private float mFaceBeautyRedLevel = 0.5f;
/**
* 瘦脸
*/
private float mFaceBeautyCheekThin = 1.0f;
/**
* 大眼
*/
private float mFaceBeautyEnlargeEye = 0.5f;
/**
* 美型,脸型选择,有0,1,2,3值可选
*/
private int mFaceShape = 3;
/**
* 美型程度 0-1的值
*/
private float mFaceShapeLevel = 0.5f;
public FaceUnityManager() {
}
public static FaceUnityManager getInstance() {
if (faceUnityManager != null) {
return faceUnityManager;
}
synchronized (FaceUnityManager.class) {
faceUnityManager = new FaceUnityManager();
return faceUnityManager;
}
}
/**
* faceUnity SDK初始化,
*
* @param context
*/
public boolean setUp(Context context) {
InputStream inputStream = null;
try {
inputStream = context.getAssets().open("v3.bundle");
byte[] v3data = new byte[inputStream.available()];
int len = inputStream.read(v3data);
inputStream.close();
/**
* SDK初始化
*/
faceunity.fuSetup(v3data, null, authpack.A());
Log.e(TAG, "fuSetup v3 len " + len);
Log.e(TAG, "fuGetVersion:" + faceunity.fuGetVersion());
return true;
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
/**
* 创建美颜相关
*
* @param context
* @return
*/
public boolean createBeautyItem(Context context) {
InputStream inputStream = null;
/**
* 美颜初始化
*/
try {
inputStream = context.getAssets().open("face_beautification.bundle");
byte[] itemData = new byte[inputStream.available()];
int len = inputStream.read(itemData);
Log.e(TAG, "beautification len " + len);
inputStream.close();
mFaceBeautyItem = faceunity.fuCreateItemFromPackage(itemData);
return true;
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
/**
* @param cameraNV21Byte cameraNV21原始数据
* @param fuImgNV21Bytes 为用来人脸识别的图像内存数据
* @param cameraTextureId 为用来绘制的texture id
* @param cameraWidth 摄像头采集数据的宽
* @param cameraHeight 摄像头采集数据的高
* @param frameId 为当前帧数序号,重新初始化后需要从0开始
* @param currentCameraType
*/
public int draw(byte[] cameraNV21Byte, byte[] fuImgNV21Bytes, int cameraTextureId, int cameraWidth, int cameraHeight, int frameId, int currentCameraType) {
if (mFaceBeautyColorLevel == 0 &&
mFaceBeautyBlurLevel == 0 &&
mFaceBeautyRedLevel == 0 &&
mFaceBeautyCheekThin == 0 &&
mFaceBeautyEnlargeEye == 0) {
return cameraTextureId;
}
faceunity.fuItemSetParam(mFaceBeautyItem, "color_level", mFaceBeautyColorLevel);
faceunity.fuItemSetParam(mFaceBeautyItem, "blur_level", mFaceBeautyBlurLevel);
faceunity.fuItemSetParam(mFaceBeautyItem, "skin_detect", mFaceBeautyALLBlurLevel);
faceunity.fuItemSetParam(mFaceBeautyItem, "cheek_thinning", mFaceBeautyCheekThin);
faceunity.fuItemSetParam(mFaceBeautyItem, "eye_enlarging", mFaceBeautyEnlargeEye);
faceunity.fuItemSetParam(mFaceBeautyItem, "face_shape", mFaceShape);
faceunity.fuItemSetParam(mFaceBeautyItem, "face_shape_level", mFaceShapeLevel);
faceunity.fuItemSetParam(mFaceBeautyItem, "red_level", mFaceBeautyRedLevel);
faceunity.fuItemSetParam(mFaceBeautyItem, "eye_bright", 0f);
Log.e(TAG, "fuGetSystemError:" + faceunity.fuGetSystemError());
Log.e(TAG, "fuGetSystemError:" + faceunity.fuGetSystemErrorString(faceunity.fuGetSystemError()));
boolean isOESTexture = true; //Tip: camera texture类型是默认的是OES的,和texture 2D不同
int flags = isOESTexture ? faceunity.FU_ADM_FLAG_EXTERNAL_OES_TEXTURE : 0;
boolean isNeedReadBack = false; //是否需要写回,如果是,则入参的byte[]会被修改为带有fu特效的;支持写回自定义大小的内存数组中,即readback custom img
flags = isNeedReadBack ? flags | faceunity.FU_ADM_FLAG_ENABLE_READBACK : flags;
if (isNeedReadBack) {
if (fuImgNV21Bytes == null) {
fuImgNV21Bytes = new byte[cameraNV21Byte.length];
}
System.arraycopy(cameraNV21Byte, 0, fuImgNV21Bytes, 0, cameraNV21Byte.length);
} else {
fuImgNV21Bytes = cameraNV21Byte;
}
flags |= currentCameraType == Camera.CameraInfo.CAMERA_FACING_FRONT ? 0 : faceunity.FU_ADM_FLAG_FLIP_X;
/*
* 这里拿到fu处理过后的texture,可以对这个texture做后续操作,如硬编、预览。
*/
return faceunity.fuDualInputToTexture(fuImgNV21Bytes, cameraTextureId, flags,
cameraWidth, cameraHeight, frameId, new int[]{mFaceBeautyItem});
}
/**
* 美白
*
* @param mFaceBeautyColorLevel
*/
public void setFaceBeautyColorLevel(float mFaceBeautyColorLevel) {
this.mFaceBeautyColorLevel = mFaceBeautyColorLevel;
}
/**
* 磨皮
*
* @param mFaceBeautyBlurLevel
*/
public void setFaceBeautyBlurLevel(float mFaceBeautyBlurLevel) {
this.mFaceBeautyBlurLevel = mFaceBeautyBlurLevel;
}
/**
* 精准磨皮
*
* @param mFaceBeautyALLBlurLevel
*/
public void setFaceBeautyALLBlurLevel(float mFaceBeautyALLBlurLevel) {
this.mFaceBeautyALLBlurLevel = mFaceBeautyALLBlurLevel;
}
/**
* 瘦脸
*
* @return
*/
public void setFaceBeautyCheekThin(float mFaceBeautyCheekThin) {
this.mFaceBeautyCheekThin = mFaceBeautyCheekThin;
}
/**
* 大眼
*
* @param mFaceBeautyEnlargeEye
*/
public void setFaceBeautyEnlargeEye(float mFaceBeautyEnlargeEye) {
this.mFaceBeautyEnlargeEye = mFaceBeautyEnlargeEye;
}
/**
* 红润
*
* @return
*/
public void setFaceBeautyRedLevel(float mFaceBeautyRedLevel) {
this.mFaceBeautyRedLevel = mFaceBeautyRedLevel;
}
/**
* 美型,脸型选择
*
* @param mFaceShape
*/
public void setFaceShape(int mFaceShape) {
this.mFaceShape = mFaceShape;
}
/**
* 美型程度
*
* @param mFaceShapeLevel 0-1的值
*/
public void setFaceShapeLevel(float mFaceShapeLevel) {
this.mFaceShapeLevel = mFaceShapeLevel;
}
public void release() {
faceunity.fuDestroyAllItems();
faceunity.fuDone();
faceunity.fuOnDeviceLost();
}
}
|
[
"929377025@qq.com"
] |
929377025@qq.com
|
af40ecfd25fc045d724a2ffd8665beb5cc35e7b0
|
883b7801d828a0994cae7367a7097000f2d2e06a
|
/python/experiments/projects/spark-root-laurelin/real_error_dataset/1/1/ROOTFile.java
|
d824cef5fb029b00a9bd4bc5c5b7369ebaa98faf
|
[] |
no_license
|
pombredanne/styler
|
9c423917619912789289fe2f8982d9c0b331654b
|
f3d752d2785c2ab76bacbe5793bd8306ac7961a1
|
refs/heads/master
| 2023-07-08T05:55:18.284539
| 2020-11-06T05:09:47
| 2020-11-06T05:09:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,570
|
java
|
/**
* Handles low-level loading C-struct type things and (optionally compressed)
* byte ranges from low level I/O
*/
package edu.vanderbilt.accre.laurelin.root_proxy;
import java.io.IOException;
import java.nio.ByteBuffer;
import edu.vanderbilt.accre.laurelin.root_proxy.IOProfile.Event;
import edu.vanderbilt.accre.laurelin.root_proxy.IOProfile.FileProfiler;
public class ROOTFile {
public class FileBackedBuf implements BackingBuf {
ROOTFile fh;
protected FileBackedBuf(ROOTFile fh) {
this.fh = fh;
}
@Override
public ByteBuffer read(long off, long len) throws IOException {
return fh.read(off, len);
}
@Override
public boolean hasLimit() throws IOException {
return true;
}
@Override
public long getLimit() throws IOException {
return fh.getLimit();
}
@Override
public BackingBuf duplicate() {
return new FileBackedBuf(fh);
}
}
private FileInterface fh;
private FileProfiler profile;
/* Hide constructor */
private ROOTFile(String path) {
profile = IOProfile.getInstance().beginProfile(path);
}
public static ROOTFile getInputFile(String path) throws IOException {
ROOTFile rf = new ROOTFile(path);
rf.fh = IOFactory.openForRead(path);
return rf;
}
public long getLimit() throws IOException {
return fh.getLimit();
}
/*
* To enable correct caching, any ByteByte buffers that get passed to
* users must be copies of the internal ByteBuffers we have. Otherwise
* we couldn't change the contents without breaking the users
*/
private ByteBuffer readUnsafe(long offset, long l) throws IOException {
/*
* This bytebuffer can be a copy of the internal cache
*/
ByteBuffer ret;
try (Event time = profile.startOp(offset, (int)l)) {
ret = fh.read(offset, l);
} catch (Exception e) {
throw new IOException(e);
}
return ret;
}
public ByteBuffer read(long offset, long len) throws IOException {
/*
* TODO:
* This bytebuffer must be a completely new and unlinked buffer, so
* copy the internal array to a new one to make sure there's nothing
* tying them together
*/
return readUnsafe(offset, len);
}
public Cursor getCursor(long off) {
return new Cursor(new FileBackedBuf(this), off);
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
e24998469707759dbb635ba4bac39f3ac56a2f06
|
e4da97ab81ec813fbecade1ad1fc4f346aed35e6
|
/src/core/ref-impl/channel-manager/src/main/java/org/ogema/channelmanager/impl/ChannelEventListenerContainer.java
|
79108bf1d0f1aace81e0b350eb42a00d40a17800
|
[
"Apache-2.0"
] |
permissive
|
JoKoo619/ogema
|
49ae2afbdfed4141e1e2c9c4375b0788219ea6ed
|
21e3d6827e416893461e9e8a8b80c01d75d135f9
|
refs/heads/public
| 2020-12-11T09:30:27.575002
| 2015-11-27T09:42:42
| 2015-11-27T09:42:42
| 49,029,409
| 0
| 1
| null | 2016-01-04T23:23:52
| 2016-01-04T23:23:48
| null |
UTF-8
|
Java
| false
| false
| 2,194
|
java
|
/**
* This file is part of OGEMA.
*
* OGEMA is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3
* as published by the Free Software Foundation.
*
* OGEMA 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 OGEMA. If not, see <http://www.gnu.org/licenses/>.
*/
package org.ogema.channelmanager.impl;
import java.util.LinkedList;
import java.util.List;
import org.ogema.core.channelmanager.ChannelEventListener;
import org.ogema.core.channelmanager.driverspi.SampledValueContainer;
public class ChannelEventListenerContainer {
private final ChannelEventListener listener;
private List<SampledValueContainer> channels = null;
private List<SampledValueContainer> changedChannels = null;
public ChannelEventListenerContainer(ChannelEventListener listener) {
this.listener = listener;
this.channels = new LinkedList<SampledValueContainer>();
}
public void addChannel(SampledValueContainer channel) {
boolean alreadyAdded = false;
for (SampledValueContainer c : channels) {
if (c.equals(channel)) {
alreadyAdded = true;
}
}
if (!alreadyAdded) {
this.channels.add(channel);
}
}
public void removeChannel(SampledValueContainer channel) {
this.channels.remove(channel);
}
public void resetChangedChannels() {
this.changedChannels = new LinkedList<SampledValueContainer>();
}
public void addChangedChannel(SampledValueContainer channel) {
boolean alreadyAdded = false;
for (SampledValueContainer c : changedChannels) {
if (c.equals(channel)) {
alreadyAdded = true;
}
}
if (!alreadyAdded) {
this.changedChannels.add(channel);
}
}
public List<SampledValueContainer> getChannels() {
return this.channels;
}
public List<SampledValueContainer> getChangedChannels() {
return this.changedChannels;
}
public ChannelEventListener getListener() {
return this.listener;
}
}
|
[
"jan.lapp@iwes.fraunhofer.de"
] |
jan.lapp@iwes.fraunhofer.de
|
6f704af766877d6047e64994c9c2624488317e47
|
88d3adf0d054afabe2bc16dc27d9e73adf2e7c61
|
/htmlparser/src/test/java/org/vietspider/browser/login/GmailLogin.java
|
9c811c02e3ee59927c846acf918f7994379c3ddc
|
[
"Apache-2.0"
] |
permissive
|
nntoan/vietspider
|
5afc8d53653a1bb3fc2e20fb12a918ecf31fdcdc
|
79d563afea3abd93f7fdff5bcecb5bac2162d622
|
refs/heads/master
| 2021-01-10T06:23:20.588974
| 2020-05-06T09:44:32
| 2020-05-06T09:44:32
| 54,641,132
| 0
| 2
| null | 2020-05-06T07:52:29
| 2016-03-24T12:45:02
|
Java
|
UTF-8
|
Java
| false
| false
| 3,240
|
java
|
/***************************************************************************
* Copyright 2001-2008 The VietSpider All rights reserved. *
**************************************************************************/
package org.vietspider.browser.login;
import java.io.File;
import java.net.URL;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.cookie.Cookie;
import org.apache.http.impl.client.DefaultHttpClient;
import org.vietspider.browser.HttpSessionUtils;
import org.vietspider.common.io.DataWriter;
import org.vietspider.net.client.HttpMethodHandler;
import org.vietspider.net.client.WebClient;
/**
* Author : Nhu Dinh Thuan
* nhudinhthuan@yahoo.com
* Nov 2, 2008
*/
public class GmailLogin {
public static void main(String[] args) throws Exception {
WebClient webClient = new WebClient();
String homepage = "http://mail.google.com/";
webClient.setURL(homepage, new URL(homepage));
HttpHost httpHost = webClient.createHttpHost(homepage);
HttpGet httpGet = webClient.createGetMethod(homepage, "http://www.google.com");
HttpResponse response = webClient.execute(httpHost, httpGet);
HttpEntity entity = response.getEntity();
System.out.println("Login form get: " + response.getStatusLine());
if (entity != null) entity.consumeContent();
System.out.println("Initial set of cookies:");
DefaultHttpClient httpClient = (DefaultHttpClient) webClient.getHttpClient();
List<Cookie> cookies = httpClient.getCookieStore().getCookies();
if (cookies.isEmpty()) {
System.out.println("None");
} else {
for (int i = 0; i < cookies.size(); i++) {
System.out.println("- " + cookies.get(i).toString());
}
}
HttpMethodHandler handler = new HttpMethodHandler(webClient);
HttpSessionUtils httpSession = new HttpSessionUtils(handler, "ERROR");
StringBuilder builder = new StringBuilder("https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1k96igf4806cy<mpl=default<mplcache=2");
builder.append('\n').append("username:password");
httpSession.login(builder.toString(), "utf-8", new URL(homepage), homepage);
httpGet = webClient.createGetMethod("http://mail.google.com/mail/", "http://gmail.com");
response = webClient.execute(httpHost, httpGet);
entity = response.getEntity();
HttpMethodHandler httpResponseReader = new HttpMethodHandler(webClient);
byte [] bytes = httpResponseReader.readBody(response);
org.vietspider.common.io.RWData.getInstance().save(new File("google_mail.html"), bytes);
System.out.println("Login form get: " + response.getStatusLine());
if (entity != null) entity.consumeContent();
System.out.println("Post logon cookies:");
cookies = httpClient.getCookieStore().getCookies();
if (cookies.isEmpty()) {
System.out.println("None");
} else {
for (int i = 0; i < cookies.size(); i++) {
System.out.println("- " + cookies.get(i).toString());
}
}
}
}
|
[
"nntoan@users.noreply.github.com"
] |
nntoan@users.noreply.github.com
|
29d69d4b9fe660159b818b25d0eca3f8ffea631f
|
d412d1d81a13680158150260ab3881b6eb04001b
|
/service/src/main/java/com/clueride/dao/util/MemberUtilMain.java
|
ce939bb49899e5978260a6133f00620d00ecc2fd
|
[
"Apache-2.0"
] |
permissive
|
jettmarks/clueRide-angular
|
ab783f39c698ab80e11d4c4ea9e92958131cc722
|
0685d4edd76ecac889269bc7fb5fbdb40c193176
|
refs/heads/master
| 2022-12-21T09:43:55.447425
| 2019-12-30T02:27:54
| 2019-12-30T02:27:54
| 40,831,785
| 1
| 0
|
NOASSERTION
| 2022-11-24T07:12:37
| 2015-08-16T17:59:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,937
|
java
|
/*
* Copyright 2017 Jett Marks
*
* 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.
*
* Created by jett on 8/15/17.
*/
package com.clueride.dao.util;
import java.io.IOException;
import java.util.List;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.clueride.domain.account.member.Member;
import com.clueride.domain.account.member.MemberStore;
import com.clueride.infrastructure.Jpa;
import com.clueride.infrastructure.Json;
import com.clueride.infrastructure.ServiceGuiceModule;
/**
* Moves records from one Store to another.
*/
public class MemberUtilMain {
public static void main(String[] args) {
Injector injector = Guice.createInjector(new ServiceGuiceModule());
MemberStore memberStoreJson = injector.getInstance(
Key.get(
MemberStore.class,
Json.class
)
);
MemberStore memberStoreJpa = injector.getInstance(
Key.get(
MemberStore.class,
Jpa.class
)
);
List<Member.Builder> members = memberStoreJson.getAllMembers();
for (Member.Builder member : members) {
try {
memberStoreJpa.addNew(member.build());
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
"jettmarks@gmail.com"
] |
jettmarks@gmail.com
|
376a364a764572bd9f5314704ce313c64f08579a
|
6c53b2b97e7d6873709ae1106e929bbe181a9379
|
/src/java/com/eviware/soapui/impl/wsdl/panels/teststeps/PropertiesStepPanelBuilder.java
|
da8083569541c2e50b90b4c0b844f7136693b204
|
[] |
no_license
|
stallewar/soapui-
|
ca7824f4c4bc268b9a7798383f4f2a141d38214b
|
0464f7826945709032964af67906e7d6e61b698a
|
refs/heads/master
| 2023-03-19T05:23:56.746903
| 2011-07-12T08:29:36
| 2011-07-12T08:29:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,036
|
java
|
/*
* soapUI, copyright (C) 2004-2011 eviware.com
*
* soapUI is free software; you can redistribute it and/or modify it under the
* terms of version 2.1 of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*
* soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details at gnu.org.
*/
package com.eviware.soapui.impl.wsdl.panels.teststeps;
import javax.swing.JPanel;
import com.eviware.soapui.impl.EmptyPanelBuilder;
import com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep;
import com.eviware.soapui.support.components.JPropertiesTable;
import com.eviware.soapui.ui.desktop.DesktopPanel;
/**
* PanelBuilder for WsdlPropertiesTestStep
*
* @author Ole.Matzura
*/
public class PropertiesStepPanelBuilder extends EmptyPanelBuilder<WsdlPropertiesTestStep>
{
public PropertiesStepPanelBuilder()
{
}
public DesktopPanel buildDesktopPanel( WsdlPropertiesTestStep testStep )
{
return new PropertiesStepDesktopPanel( testStep );
}
public boolean hasDesktopPanel()
{
return true;
}
public JPanel buildOverviewPanel( WsdlPropertiesTestStep testStep )
{
JPropertiesTable<WsdlPropertiesTestStep> table = new JPropertiesTable<WsdlPropertiesTestStep>(
"PropertiesStep Properties" );
table.addProperty( "Name", "name", true );
table.addProperty( "Description", "description", true );
table.addProperty( "Create Missing on Load", "createMissingOnLoad", JPropertiesTable.BOOLEAN_OPTIONS );
table.addProperty( "Save before Load", "saveFirst", JPropertiesTable.BOOLEAN_OPTIONS );
table.addProperty( "Discard Values on Save", "discardValuesOnSave", JPropertiesTable.BOOLEAN_OPTIONS );
table.setPropertyObject( testStep );
return table;
}
public boolean hasOverviewPanel()
{
return true;
}
}
|
[
"oysteigi@bluebear.(none)"
] |
oysteigi@bluebear.(none)
|
4db526e516294c3e2917ce607d3b287f8cd8092b
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/yauaa/learning/6363/NumberRangeVisitor.java
|
9f562dd0929bb3825248e33a7a004447c4b99961
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,767
|
java
|
/*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* 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
*
* https://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 nl.basjes.parse.useragent.analyze;
import nl.basjes.parse.useragent.parser.UserAgentTreeWalkerBaseVisitor;
import org.antlr.v4.runtime.ParserRuleContext;
import java.util.HashMap;
import java.util.Map;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeAllContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeEmptyContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeOpenStartToEndContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeSingleValueContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeStartToEndContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.NumberRangeStartToOpenEndContext;
import static nl.basjes.parse.useragent.parser.UserAgentTreeWalkerParser.StepDownContext;
public final class NumberRangeVisitor extends UserAgentTreeWalkerBaseVisitor<NumberRangeList> {
private static final Integer DEFAULT_MIN = 1;
private static final Integer DEFAULT_MAX = 10;
private static final Map<String, Integer> MAX_RANGE = new HashMap<>();
static {
// Hardcoded maximum values because of the parsing rules
MAX_RANGE.put("agent", 1);
MAX_RANGE.put("name", 1);
MAX_RANGE.put("key", 1);
// Did statistics on over 200K real useragents from 2015.
// These are the maximum values from that test set (+ a little margin)
MAX_RANGE.put("value", 2); // Max was 2
MAX_RANGE.put("version", 5); // Max was 4
MAX_RANGE.put("comments", 2); // Max was 2
MAX_RANGE.put("entry", 20); // Max was much higher
MAX_RANGE.put("product", 10); // Max was much higher
MAX_RANGE.put("email", 2);
MAX_RANGE.put("keyvalue", 3);
MAX_RANGE.put("text", 8);
MAX_RANGE.put("url", 3);
MAX_RANGE.put("uuid", 4);
}
private NumberRangeVisitor() {
}
private static Integer getMaxRange(NumberRangeContext ctx) {
ParserRuleContext parent = ctx.getParent();
String name = ((StepDownContext) parent).name.getText();
Integer maxRange = MAX_RANGE.get(name);
if (maxRange == null) {
return DEFAULT_MAX;
}
return maxRange;
}
static final NumberRangeVisitor NUMBER_RANGE_VISITOR = new NumberRangeVisitor();
public static NumberRangeList getList(NumberRangeContext ctx) {
return NUMBER_RANGE_VISITOR.visit(ctx);
}
@Override
public NumberRangeList visitNumberRangeStartToEnd(NumberRangeStartToEndContext ctx) {
return new NumberRangeList(
Integer.parseInt(ctx.rangeStart.getText()),
Integer.parseInt(ctx.rangeEnd.getText()));
}
@Override
public NumberRangeList visitNumberRangeOpenStartToEnd(NumberRangeOpenStartToEndContext ctx) {
return new NumberRangeList(
1,
Integer.parseInt(ctx.rangeEnd.getText()));
}
@Override
public NumberRangeList visitNumberRangeStartToOpenEnd(NumberRangeStartToOpenEndContext ctx) {
return new NumberRangeList(
Integer.parseInt(ctx.rangeStart.getText()),
getMaxRange(ctx));
}
@Override
public NumberRangeList visitNumberRangeSingleValue(NumberRangeSingleValueContext ctx) {
int value = Integer.parseInt(ctx.count.getText());
return new NumberRangeList(value, value);
}
@Override
public NumberRangeList visitNumberRangeAll(NumberRangeAllContext ctx) {
return new NumberRangeList(DEFAULT_MIN, getMaxRange(ctx));
}
@Override
public NumberRangeList visitNumberRangeEmpty(NumberRangeEmptyContext ctx) {
return new NumberRangeList(DEFAULT_MIN, getMaxRange(ctx));
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
f7addc4ef0b67d66a2be2d091ad200cc76f7037a
|
da9bfd2d883aa134897b5680403545d1f097991c
|
/easyreport-engine/src/main/java/com/easytoolsoft/easyreport/engine/dbpool/DBCP2DataSourcePool.java
|
0840478eaf754034d4e76baf1a3d9fbf793c8eed
|
[
"Apache-2.0"
] |
permissive
|
xianrendzw/EasyReport
|
3d18b4ccd0026b2ec9475993b110565b2f950e18
|
b89cc231d469de91450ad9a2412c25b249333267
|
refs/heads/master
| 2023-03-16T03:58:45.761628
| 2023-03-12T14:21:03
| 2023-03-12T14:21:03
| 24,318,090
| 1,803
| 845
|
Apache-2.0
| 2020-02-07T03:58:04
| 2014-09-22T07:07:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,621
|
java
|
package com.easytoolsoft.easyreport.engine.dbpool;
import javax.sql.DataSource;
import com.easytoolsoft.easyreport.engine.data.ReportDataSource;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.dbcp2.BasicDataSource;
/**
* c3p0数据源连接池包装类
* <a href="http://www.mchange.com/projects/c3p0/#quickstart>c3po</a>
*
* @author tomdeng
*/
public class DBCP2DataSourcePool implements DataSourcePoolWrapper {
@Override
public DataSource wrap(final ReportDataSource rptDs) {
try {
final BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(rptDs.getDriverClass());
dataSource.setUrl(rptDs.getJdbcUrl());
dataSource.setUsername(rptDs.getUser());
dataSource.setPassword(rptDs.getPassword());
dataSource.setInitialSize(MapUtils.getInteger(rptDs.getOptions(), "initialSize", 3));
dataSource.setMaxIdle(MapUtils.getInteger(rptDs.getOptions(), "maxIdle", 20));
dataSource.setMinIdle(MapUtils.getInteger(rptDs.getOptions(), "minIdle", 1));
dataSource.setLogAbandoned(MapUtils.getBoolean(rptDs.getOptions(), "logAbandoned", true));
dataSource.setRemoveAbandonedTimeout(
MapUtils.getInteger(rptDs.getOptions(), "removeAbandonedTimeout", 180));
dataSource.setMaxWaitMillis(MapUtils.getInteger(rptDs.getOptions(), "maxWait", 1000));
return dataSource;
} catch (final Exception ex) {
throw new RuntimeException("C3p0DataSourcePool Create Error", ex);
}
}
}
|
[
"14068728@qq.com"
] |
14068728@qq.com
|
2c181676e3cc8dd5bed7d5470b4b387f04a7e3d1
|
857870ba40281e9f60a4955fa6325be10c086895
|
/base-platform-msg/micro/src/main/java/com/taiji/base/msg/entity/MsgNoticeRecord.java
|
e6c927c9e91478d17475afd69b68d959de1daf68
|
[] |
no_license
|
Qiang8/nmyj-micro
|
f22f6dba0a30128c4dca3ef1ab41c84ec2f8eb08
|
0be5efe946c25a36902c1abfa52e4ce619523228
|
refs/heads/master
| 2020-05-02T19:08:54.473917
| 2019-03-28T08:05:00
| 2019-03-28T08:05:00
| 178,150,820
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,278
|
java
|
package com.taiji.base.msg.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.taiji.micro.common.entity.IdEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.time.LocalDateTime;
/**
* <p>Title:MsgNoticeRecord.java</p >
* <p>Description: </p >
* <p>Copyright: 公共服务与应急管理战略业务本部 Copyright(c)2018</p >
* <p>Date:2018/10/29 15:44</p >
*
* @author scl (suncla@mail.taiji.com.cn)
* @version 1.0
*/
@DynamicInsert
@DynamicUpdate
@SelectBeforeUpdate
@Entity
@Table(name = "MSG_NOTICE_RECORD")
public class MsgNoticeRecord extends IdEntity<String> {
/**
* 消息Id
*/
@Getter
@Setter
@ManyToOne(targetEntity = MsgNotice.class)
@JoinColumn(name = "NOTICE_ID", referencedColumnName = "id")
private MsgNotice msgNotice;
/**
* 接收者
*/
@Length(max = 36, message = "接收者receiverId字段最大长度36")
@Getter
@Setter
private String receiverId;
/**
* 接收者名称
*/
@Length(max = 200, message = "接收者名称 receiveName字段最大长度200")
@Getter
@Setter
private String receiverName;
/**
* 接收人单位编码
*/
@Length(max = 36, message = "接收人单位编码deptId字段最大长度36")
@Getter
@Setter
private String deptId;
/**
* 接收人单位名称
*/
@Length(max = 200, message = "接收人单位名称 deptName字段最大长度200")
@Getter
@Setter
private String deptName;
/**
* 已读标志 0 未读 1 已读
*/
@Length(max = 1, message = "已读标志 readFlag字段最大长度1")
@Getter
@Setter
private String readFlag;
/**
* 读取时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
@JsonDeserialize(
using = LocalDateTimeDeserializer.class
)
@JsonSerialize(
using = LocalDateTimeSerializer.class
)
@Getter
@Setter
private LocalDateTime readTime;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
@JsonDeserialize(
using = LocalDateTimeDeserializer.class
)
@JsonSerialize(
using = LocalDateTimeSerializer.class
)
@CreatedDate
@Getter
@Setter
private LocalDateTime createTime;
}
|
[
"18222693676@163.com"
] |
18222693676@163.com
|
6240224d4eea32cb53924cbe7c15865f29a99434
|
906d021c489890695b79a6556014fe3e2a9344fc
|
/src/M1/ServerDetail/SecurityManager.java
|
6c29da9035f1f366c4ef027e50399d56e5efda32
|
[] |
no_license
|
ferchouche/NouveauHADL
|
6585c5d3aea7e252bda07dfba5f8d35020903b0a
|
d928d4d41089f5ea5b538b0a63f3da9de459ab88
|
refs/heads/master
| 2021-06-12T06:18:00.595806
| 2016-11-27T12:17:25
| 2016-11-27T12:17:25
| 74,882,814
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,329
|
java
|
package M1.ServerDetail;
import M1.Interface.PortComposantFourni;
import M1.Interface.PortComposantRequis;
import M1.Serveur.ServeurDetail;
import M2.Composant.ComposantConcret;
import M2.Interface.Interface;
import M2.Interface.PortComposant;
import M2.ObjectArchi.ObjetArchitectural;
import java.util.HashMap;
/**
* Created by Abdeldjallil on 11/11/2016.
*/
public class SecurityManager extends ComposantConcret {
ServeurDetail sd;
HashMap<Integer, Integer> permissions;
private String tempRequete;
public SecurityManager(ServeurDetail sd) {
super("Security Manager");
this.portsRequis.add(new PortComposantRequis(this, "security_auth_Requis"));
this.portsRequis.add(new PortComposantRequis(this, "check_query_Requis"));
this.portsFournis.add(new PortComposantFourni(this, "security_auth_Fourni"));
this.portsFournis.add(new PortComposantFourni(this, "check_query_Fourni"));
this.permissions = new HashMap<>();
this.sd = sd;
initPermission();
}
private void initPermission() {
permissions.put(1967, 1);
permissions.put(987, 0);
permissions.put(3987, 2);
}
public PortComposantFourni getFourni(int i) {
return (PortComposantFourni)portsFournis.get(i); // without cast, function returning M2 PortComposantFourni
}
public PortComposantRequis getRequis(int i){
return (PortComposantRequis)portsRequis.get(i); // without cast, function returning M2 PortComposantRequis
}
public void notifierSystem(Interface notifieur){
sd.notification(notifieur, this);
// System.out.printf(notifieur.getName().toString());
}
public void traiter(PortComposant pc, String requete){
String[] parsed = requete.split("\\|");
if (pc.getName() == "security_auth_Requis") {
if (parsed.length == 3 || parsed.length == 4) {
// port de la DataBase
try {
if (permissions.get(Integer.parseInt(parsed[0])) != null) {
StringBuilder requeteOnly = new StringBuilder();
for (Integer i = 1; i < parsed.length; i++) {
requeteOnly.append(parsed[i]);
if (i < parsed.length + 1)
requeteOnly.append("|");
}
this.tempRequete = requeteOnly.toString();
Integer permLevel = permissions.get(Integer.parseInt(parsed[0]));
if (parsed[1].equals("GET")) {
if (permLevel > 0) {
portsFournis.get(1).setInformation(tempRequete); // prot de la db
} else {
this.portsFournis.get(0).setInformation("permission insuffisante");
}
} else if (parsed[1].equals("SET")) {
if (permLevel > 1) {
portsFournis.get(1).setInformation(tempRequete); // prot de la db
} else {
this.portsFournis.get(0).setInformation("permission insuffisante");
}
} else {
this.portsFournis.get(0).setInformation("Requete mal formee");
}
}
else
portsFournis.get(0).setInformation("Client n'existe pas dans la bdd"); //port du connection manager
} catch (Exception e) {
portsFournis.get(0).setInformation("requete invalide"); //port du connection manager
}
}else{
this.portsFournis.get(0).setInformation("Error");
}
}
else {
if (requete.equals("valide")) {
// port du connection mannager
this.portsFournis.get(0).setInformation(tempRequete);
} else {
this.portsFournis.get(0).setInformation("Requete mal formee");
}
}
}
}
|
[
"abdeldjallil_ferchouche@hotmail.com"
] |
abdeldjallil_ferchouche@hotmail.com
|
4d09072bf1ffa1949c361f0a88088264bf7f816b
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/iec/src/main/java/com/huaweicloud/sdk/iec/v1/model/Route.java
|
60e23d9b48706da7d8be55a9cfa700ecfa7a8050
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 6,210
|
java
|
package com.huaweicloud.sdk.iec.v1.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* 路由对象
*/
public class Route {
/**
* 路由的类型 取值范围: 1)ecs:弹性云服务器 2)vip:虚拟IP 3)local:系统路由,不可修改和删除
*/
public static final class TypeEnum {
/**
* Enum ECS for value: "ecs"
*/
public static final TypeEnum ECS = new TypeEnum("ecs");
/**
* Enum VIP for value: "vip"
*/
public static final TypeEnum VIP = new TypeEnum("vip");
/**
* Enum LOCAL for value: "local"
*/
public static final TypeEnum LOCAL = new TypeEnum("local");
private static final Map<String, TypeEnum> STATIC_FIELDS = createStaticFields();
private static Map<String, TypeEnum> createStaticFields() {
Map<String, TypeEnum> map = new HashMap<>();
map.put("ecs", ECS);
map.put("vip", VIP);
map.put("local", LOCAL);
return Collections.unmodifiableMap(map);
}
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value)).orElse(new TypeEnum(value));
}
public static TypeEnum valueOf(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value))
.orElseThrow(() -> new IllegalArgumentException("Unexpected value '" + value + "'"));
}
@Override
public boolean equals(Object obj) {
if (obj instanceof TypeEnum) {
return this.value.equals(((TypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private TypeEnum type;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "destination")
private String destination;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "nexthop")
private String nexthop;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "description")
private String description;
public Route withType(TypeEnum type) {
this.type = type;
return this;
}
/**
* 路由的类型 取值范围: 1)ecs:弹性云服务器 2)vip:虚拟IP 3)local:系统路由,不可修改和删除
* @return type
*/
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public Route withDestination(String destination) {
this.destination = destination;
return this;
}
/**
* 路由的目的网段 约束:合法的CIDR格式
* @return destination
*/
public String getDestination() {
return destination;
}
public void setDestination(String destination) {
this.destination = destination;
}
public Route withNexthop(String nexthop) {
this.nexthop = nexthop;
return this;
}
/**
* 路由下一跳对象的ID 取值范围: 1)当type为ecs时,传入ecs实例ID; 2)当type为vip时,取值为vip对应的IP地址;
* @return nexthop
*/
public String getNexthop() {
return nexthop;
}
public void setNexthop(String nexthop) {
this.nexthop = nexthop;
}
public Route withDescription(String description) {
this.description = description;
return this;
}
/**
* 路由的描述信息 取值范围:0-255个字符,不能包含“<”和“>”
* @return description
*/
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
Route that = (Route) obj;
return Objects.equals(this.type, that.type) && Objects.equals(this.destination, that.destination)
&& Objects.equals(this.nexthop, that.nexthop) && Objects.equals(this.description, that.description);
}
@Override
public int hashCode() {
return Objects.hash(type, destination, nexthop, description);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Route {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
sb.append(" nexthop: ").append(toIndentedString(nexthop)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
02ef721b8f2c49bb0d1beb5e7de98eec7bb42667
|
09a1155785a66cdbd0c18dc01a16e185c872b14e
|
/src/main/java/dbfexample/dbflute/exentity/SysTable.java
|
e4d7e4149e9b60d1f42a7f7210bbd41bb6d3a7f9
|
[] |
no_license
|
mikeshimura/java-dbflute-example
|
7403966f89aa18d37d521e58fc60289474036452
|
5274d88e26159879b540d266eb31ff201dcbaa9c
|
refs/heads/master
| 2016-09-06T14:59:53.300807
| 2015-07-12T00:39:04
| 2015-07-12T00:39:04
| 38,715,101
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 431
|
java
|
package dbfexample.dbflute.exentity;
import dbfexample.dbflute.bsentity.BsSysTable;
/**
* The entity of sys_table.
* <p>
* You can implement your original methods here.
* This class remains when re-generating.
* </p>
* @author DBFlute(AutoGenerator)
*/
public class SysTable extends BsSysTable {
/** The serial version UID for object serialization. (Default) */
private static final long serialVersionUID = 1L;
}
|
[
"mikeshimura@gmail.com"
] |
mikeshimura@gmail.com
|
89cbc237652d0c54e2b76aa7d74f573e106196d7
|
ac6fe0f82231b44f64451ac3e78513d9392061d8
|
/core/model/src/main/java/com/xianglin/core/model/vo/ActPlantHomePageVo.java
|
97c3502be46393e33b7f797dc58439398bfc2ef9
|
[] |
no_license
|
heke183/act
|
015ef0d0dd57f53afefe41d88f810a9cb0e59b8e
|
2378cf1056b672a898a3c7c8fd1e540fd8ee0a42
|
refs/heads/master
| 2020-04-15T11:00:33.035873
| 2019-01-09T05:46:07
| 2019-01-09T05:46:07
| 164,609,667
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,223
|
java
|
package com.xianglin.core.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author jiang yong tao
* @date 2018/8/15 9:08
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户主页信息")
public class ActPlantHomePageVo {
@ApiModelProperty(value = "海报信息")
private String userPoster;
@ApiModelProperty(value = "是否弹窗")
private Boolean actOfTips;
@ApiModelProperty(value = "该用户所有的爱心值列表")
private List<ActPlantLvVo> actPlantLvVos;
@ApiModelProperty(value = "用户爱心值")
private Integer userLv;
@ApiModelProperty(value = "用户是否参与了活动")
private Boolean userJoin;
@ApiModelProperty(value = "用户头像")
private String userHeadImg;
@ApiModelProperty(value = "活动的code")
private String actCode;
@ApiModelProperty("轮播消息列表")
private List<ActPlantNoticeVo> actPlantNoticeVoList;
@ApiModelProperty("是否显示大转盘入口")
private String isDisplay;
}
|
[
"wangleitom@126.com"
] |
wangleitom@126.com
|
2c2409bace8eaad82576c41893c457191ff5de32
|
5979994b215fabe125cd756559ef2166c7df7519
|
/aimir-fep/src/main/java/com/aimir/fep/protocol/fmp/frame/service/entry/pppEntry.java
|
63b77626ca6f4fad0dad164db3d4b9c6655e0e6c
|
[] |
no_license
|
TechTinkerer42/Haiti
|
91c45cb1b784c9afc61bf60d43e1d5623aeba888
|
debaea96056d1d4611b79bd846af8f7484b93e6e
|
refs/heads/master
| 2023-04-28T23:39:43.176592
| 2021-05-03T10:49:42
| 2021-05-03T10:49:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,355
|
java
|
package com.aimir.fep.protocol.fmp.frame.service.entry;
import javax.xml.bind.annotation.XmlTransient;
import com.aimir.fep.protocol.fmp.datatype.*;
import com.aimir.fep.protocol.fmp.frame.service.Entry;
/**
* pppEntry
* generated by MIB Tool, Do not modify
*
* @author Y.S Kim (sorimo@nuritelecom.com)
* @version $Rev: 1 $, $Date: 2005-11-21 15:59:15 +0900 $,
*/
public class pppEntry extends Entry {
public OCTET pppProvider =
new OCTET(16);
public OCTET pppUser =
new OCTET(16);
public OCTET pppPassword =
new OCTET(16);
@XmlTransient
public OCTET getPppProvider()
{
return this.pppProvider;
}
public void setPppProvider(OCTET pppProvider)
{
this.pppProvider=pppProvider;
}
@XmlTransient
public OCTET getPppUser()
{
return this.pppUser;
}
public void setPppUser(OCTET pppUser)
{
this.pppUser=pppUser;
}
@XmlTransient
public OCTET getPppPassword()
{
return this.pppPassword;
}
public void setPppPassword(OCTET pppPassword)
{
this.pppPassword=pppPassword;
}
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append("CLASS["+this.getClass().getName()+"]\n");
sb.append("pppProvider: " + pppProvider + "\n");
sb.append("pppUser: " + pppUser + "\n");
sb.append("pppPassword: " + pppPassword + "\n");
return sb.toString();
}
}
|
[
"marsr0913@nuritelecom.com"
] |
marsr0913@nuritelecom.com
|
90b9104b1e01ba4a991578897bee23403e0ec0b4
|
83d56024094d15f64e07650dd2b606a38d7ec5f1
|
/sicc_druida/fuentes/java/MaeTipoPrefeLPStartUpCreate.java
|
70029c17f1d33fab3f16b017a3678093d1e5e73e
|
[] |
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
| 1,033
|
java
|
/*
INDRA/CAR/mmg
$Id: MaeTipoPrefeLPStartUpCreate.java,v 1.1 2009/12/03 18:40:52 pecbazalar Exp $
DESC
*/
import es.indra.druida.belcorp.MMGDruidaBase;
// Definicion de la clase
public class MaeTipoPrefeLPStartUpCreate extends MMGDruidaBase{
public void inicio() throws Exception {
//No tiene asociado xml ya que simpelmente redirecciona
}
public void ejecucion() throws Exception {
conectorAction("MaeTipoPrefeLPStartUp");
conectorActionParametro(PARAMETRO_GENERICO_ACCION, "create");
conectorActionParametro(PARAMETRO_GENERICO_ORIGEN, "menu");
conectorActionParametro("idFuncion",
conectorParametro("idFuncion") == null?"": conectorParametro("idFuncion"));
conectorActionParametro(PARAMETRO_MENU_FROM_MENU,
conectorParametro(PARAMETRO_MENU_FROM_MENU) == null?"": conectorParametro(PARAMETRO_MENU_FROM_MENU));
conectorActionParametro(PARAMETRO_MENU_CDOS_IDIOMA,
conectorParametro(PARAMETRO_MENU_CDOS_IDIOMA) == null? "": conectorParametro(PARAMETRO_MENU_CDOS_IDIOMA));
rastreo();
}
}
|
[
"hp.vega@hotmail.com"
] |
hp.vega@hotmail.com
|
98f0bc5eff8526534199c7afc088cf8e5783054e
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava12/Foo956Test.java
|
e2ada1aa593673758003391f6af98b061bea561d
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava12;
import org.junit.Test;
public class Foo956Test {
@Test
public void testFoo0() {
new Foo956().foo0();
}
@Test
public void testFoo1() {
new Foo956().foo1();
}
@Test
public void testFoo2() {
new Foo956().foo2();
}
@Test
public void testFoo3() {
new Foo956().foo3();
}
@Test
public void testFoo4() {
new Foo956().foo4();
}
@Test
public void testFoo5() {
new Foo956().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
20d1f640284c3fb916da1a6c71d4a81088a342b2
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/bumptech/glide/load/resource/transcode/C9165b.java
|
60c3b76f453fe340c7cc215c80dc666eb0412ec9
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 829
|
java
|
package com.bumptech.glide.load.resource.transcode;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import com.bumptech.glide.load.C9011f;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.resource.bitmap.C9136t;
import com.bumptech.glide.p301o.C9216j;
/* renamed from: com.bumptech.glide.load.resource.transcode.b */
public class C9165b implements ResourceTranscoder<Bitmap, BitmapDrawable> {
/* renamed from: a */
private final Resources f23795a;
public C9165b(Resources resources) {
C9216j.m22083a(resources);
this.f23795a = resources;
}
public Resource<BitmapDrawable> transcode(Resource<Bitmap> resource, C9011f fVar) {
return C9136t.m21874a(this.f23795a, resource);
}
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
2801a348ecf0b49d5c6d0abeffe984f3e0e273d8
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a199/A199556Test.java
|
26d185dc8bb407b7856316e85b2c1e8e32c3ab39
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a199;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A199556Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
3a6d4fb6e01ffb43bb6ab0a775cdab1e22185df8
|
6e39449e9c287f21124d421595f0174402de11e4
|
/Session11/src/ObjectCounter.java
|
402d320b5e55270d154099c182291a5d0119eaed
|
[] |
no_license
|
ishantk/AuriJavaAug19
|
32b57a229153073bb19c6149c5295bcf38a33113
|
f19da5c62d0ddad0eb245250d7b03b41116cb52c
|
refs/heads/master
| 2020-06-29T19:36:51.807157
| 2019-09-24T10:10:15
| 2019-09-24T10:10:15
| 200,605,481
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
class Student{
static void showNumberOfStudents(){
//System.out.println(">> Number of Students are: "+);
}
}
public class ObjectCounter {
public static void main(String[] args) {
Student s1 = new Student();
Student s2 = new Student();
Student s3 = new Student();
Student s4 = new Student();
Student s5 = s3;
Student s6 = s1;
Student s7 = new Student();
Student.showNumberOfStudents(); // >> Number of Students are: 5
}
}
|
[
"er.ishant@gmail.com"
] |
er.ishant@gmail.com
|
0e3641022ca3750ef331db3adaed7c6e5851efd5
|
bcf367a2cb81ccc065db3981c41a3c6264c3fed7
|
/zigbee-api/src/main/java/org/bubblecloud/zigbee/network/zcl/protocol/command/door/lock/UnlockDoorResponseCommand.java
|
bc74a8aff5790e34f1d146886c416c1c1fb87568
|
[
"Apache-2.0"
] |
permissive
|
geog-opensource/zigbee4java
|
1507a7ce3f678e88fc85fb7c0e54464b19647126
|
705c411ce2f4a9127f30059bc077237740ec4183
|
refs/heads/master
| 2022-11-29T21:44:29.008282
| 2022-11-28T21:02:09
| 2022-11-28T21:02:09
| 61,035,898
| 0
| 0
|
Apache-2.0
| 2022-11-28T21:02:10
| 2016-06-13T12:50:09
|
Java
|
UTF-8
|
Java
| false
| false
| 1,906
|
java
|
package org.bubblecloud.zigbee.network.zcl.protocol.command.door.lock;
import org.bubblecloud.zigbee.network.zcl.ZclCommandMessage;
import org.bubblecloud.zigbee.network.zcl.ZclCommand;
import org.bubblecloud.zigbee.network.zcl.protocol.ZclCommandType;
import org.bubblecloud.zigbee.network.zcl.protocol.ZclFieldType;
/**
* Code generated Unlock Door Response Command value object class.
*/
public class UnlockDoorResponseCommand extends ZclCommand {
/**
* Status command message field.
*/
private Integer status;
/**
* Default constructor setting the command type field.
*/
public UnlockDoorResponseCommand() {
this.setType(ZclCommandType.UNLOCK_DOOR_RESPONSE_COMMAND);
}
/**
* Constructor copying field values from command message.
* @param message the command message
*/
public UnlockDoorResponseCommand(final ZclCommandMessage message) {
super(message);
this.status = (Integer) message.getFields().get(ZclFieldType.UNLOCK_DOOR_RESPONSE_COMMAND_STATUS);
}
@Override
public ZclCommandMessage toCommandMessage() {
final ZclCommandMessage message = super.toCommandMessage();
message.getFields().put(ZclFieldType.UNLOCK_DOOR_RESPONSE_COMMAND_STATUS,status);
return message;
}
/**
* Gets Status.
* @return the Status
*/
public Integer getStatus() {
return status;
}
/**
* Sets Status.
* @param status the Status
*/
public void setStatus(final Integer status) {
this.status = status;
}
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
builder.append(super.toString());
builder.append(", ");
builder.append("status");
builder.append('=');
builder.append(status);
return builder.toString();
}
}
|
[
"tommi.s.e.laukkanen@gmail.com"
] |
tommi.s.e.laukkanen@gmail.com
|
85615edf4a51572a7009fbf874f0bd8771144b9c
|
783e121b901897bd87e8ec0a7dd5d56f35ccb504
|
/app/src/main/java/com/jmed/condominapp/database/DatabaseManager_Point.java
|
4210a8c0764cdd89f5a01d235bd24579962736f2
|
[
"Apache-2.0"
] |
permissive
|
JMedinilla/CondominApp
|
60d6056a2421926451b2703fa7bc73bd9ab453aa
|
7cf39d4f352357cd4c53cd604467f703cb665e67
|
refs/heads/master
| 2021-06-14T15:29:51.611698
| 2017-02-23T23:20:20
| 2017-02-23T23:20:20
| 72,205,986
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 678
|
java
|
package com.jmed.condominapp.database;
import com.jmed.condominapp.pojos.Pojo_Point;
class DatabaseManager_Point {
private static DatabaseManager_Point instance;
public static DatabaseManager_Point getInstance() {
if (instance == null) {
instance = new DatabaseManager_Point();
}
return instance;
}
public void getPoints(int meeting) {
//
}
public Pojo_Point getPoint(String id) {
return null;
}
public void addPoint(Pojo_Point point) {
//
}
public void updatePoint(Pojo_Point point) {
//
}
public void deletePoint(Pojo_Point point) {
//
}
}
|
[
"javimedinilla@gmail.com"
] |
javimedinilla@gmail.com
|
55072da52fc67607f7ebc77a3a4128b71acce11e
|
f617d7ed61f4d0632827ea792fdf773e9e87d6d9
|
/ch12/ex12-42.OrderSearch.java
|
bcc609be73abf5e87c85086b4689a16c16125762
|
[] |
no_license
|
freebz/JPA-Programming
|
e796f3d3868913775068f31d86020ded8ddd737e
|
a52637cba47fa46dfdab9330361d1f8f4bfe5866
|
refs/heads/master
| 2020-09-15T09:24:35.035143
| 2019-11-22T12:09:56
| 2019-11-22T12:09:56
| 223,409,858
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
// 예제 12.42 검색 객체가 Specification 생성하도록 추가
package jpabook.jpashop.domain;
import org.springframework.data.jpa.domain.Specifications;
import static jpabook.jpashop.domain.OrderSpec.memberNameLike;
import static jpabook.jpashop.domain.OrderSpec.orderStatusEq;
import static org.springframework.data.jpa.domain.Specifications.where;
public class OrderSearch {
private String memberName; //회원명
private OrderStatus orderStatus;//주문 상태
//...Getter, Setter
//추가
public Specifications<Order> toSpecification() {
return where(memberNameLike(memberName))
.and(orderStatusEq(orderStatus));
}
}
|
[
"freebz@hananet.net"
] |
freebz@hananet.net
|
033236e894fa9ce66a6e8ad58af45450e21af7fe
|
8534ea766585cfbd6986fd845e59a68877ecb15b
|
/com/slideme/sam/manager/view/p064a/C1946q.java
|
c34cc9f42827df47d343431de84b1715903bcc6e
|
[] |
no_license
|
Shanzid01/NanoTouch
|
d7af94f2de686f76c2934b9777a92b9949b48e10
|
6d51a44ff8f719f36b880dd8d1112b31ba75bfb4
|
refs/heads/master
| 2020-04-26T17:39:53.196133
| 2019-03-04T10:23:51
| 2019-03-04T10:23:51
| 173,720,526
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 433
|
java
|
package com.slideme.sam.manager.view.p064a;
import android.view.View;
import android.view.View.OnClickListener;
/* compiled from: ScreenshotGalleryAdapter */
class C1946q implements OnClickListener {
final /* synthetic */ C1945p f3589a;
C1946q(C1945p c1945p) {
this.f3589a = c1945p;
}
public void onClick(View view) {
this.f3589a.f3583b.startActivity(this.f3589a.f3582a.getVideoIntent());
}
}
|
[
"shanzid.shaiham@gmail.com"
] |
shanzid.shaiham@gmail.com
|
e4b5958135f1d2f3907ea66eb860eb134d64d0a7
|
719786b440bda077e4105a1c14a51a2751bca45d
|
/src/main/java/com.javarush.glushko/level27/lesson02/task02/Solution.java
|
406a7cca26f1ad122b863d8d43c20c775ef49427
|
[] |
no_license
|
dase1243/JavaRush
|
e486e6b135d0ac2ccc615c9b475290fad3bd7f9e
|
48553f8e5c7c34b9a568c99ae6b14c1358d5858e
|
refs/heads/master
| 2021-10-11T11:29:35.327809
| 2019-01-25T09:09:30
| 2019-01-25T09:09:30
| 74,195,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
package com.javarush.glushko.level27.lesson02.task02;
/* Нужный оператор
Вставьте в код единственную строчку - оператор (не break), чтобы выводился треугольник из букв S
*/
public class Solution {
public static void main(String args[]) {
label:
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
if (j > i) {
System.out.println();
continue label;
}
System.out.print("S");
}
}
}
}
|
[
"dreiglushko@gmail.com"
] |
dreiglushko@gmail.com
|
5875612858072af2350d846a9ce3fbdd6cb383f6
|
87c3c335023681d1c906892f96f3a868b3a6ee8e
|
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/ClusterDasAamHostInfo.java
|
fbb9c51c251a31728e8268ece8ff83772dec9537
|
[
"Apache-2.0"
] |
permissive
|
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
|
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
|
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
|
refs/heads/master
| 2023-08-09T08:37:27.937439
| 2020-04-30T06:15:26
| 2020-04-30T06:15:26
| 144,329,090
| 0
| 1
|
Apache-2.0
| 2020-04-07T07:27:53
| 2018-08-10T20:24:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,383
|
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: 2019.06.12 at 09:16:35 AM EDT
//
package com.vmware.vim25;
/**
*
*/
@SuppressWarnings("all")
public class ClusterDasAamHostInfo
extends ClusterDasHostInfo
{
private final static ClusterDasAamNodeState[] NULL_HOST_DAS_STATE_ARRAY = new ClusterDasAamNodeState[ 0 ] ;
public ClusterDasAamNodeState[] hostDasState;
private final static String[] NULL_PRIMARY_HOSTS_ARRAY = new String[ 0 ] ;
public String[] primaryHosts;
public ClusterDasAamNodeState[] getHostDasState() {
if ((hostDasState) == null) {
return (NULL_HOST_DAS_STATE_ARRAY);
}
return hostDasState;
}
public void setHostDasState(ClusterDasAamNodeState[] hostDasState) {
this.hostDasState = hostDasState;
}
public String[] getPrimaryHosts() {
if ((primaryHosts) == null) {
return (NULL_PRIMARY_HOSTS_ARRAY);
}
return primaryHosts;
}
public void setPrimaryHosts(String[] primaryHosts) {
this.primaryHosts = primaryHosts;
}
}
|
[
"anuanusha471@gmail.com"
] |
anuanusha471@gmail.com
|
a470c18bc1a8dd249696ca717050116509030ce2
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes77-dex2jar/com/google/android/gms/internal/ads/zziz.java
|
7b4b0adae93773271e9b2bbd6302c809c97206eb
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,644
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.ads;
import java.io.IOException;
public final class zziz extends zzbfc<zziz>
{
private Integer zzanu;
private zziw zzapn;
private zzis zzapo;
public zziz() {
this.zzanu = null;
this.zzapn = null;
this.zzapo = null;
this.zzebk = null;
this.zzebt = -1;
}
private final zziz zzw(final zzbez zzbez) throws IOException {
Label_0057:
while (true) {
final int zzabk = zzbez.zzabk();
switch (zzabk) {
default: {
if (!super.zza(zzbez, zzabk)) {
break Label_0057;
}
continue;
}
case 0: {
break Label_0057;
}
case 8: {
final int position = zzbez.getPosition();
try {
this.zzanu = zzia.zzd(zzbez.zzacc());
}
catch (IllegalArgumentException ex) {
zzbez.zzdc(position);
this.zza(zzbez, zzabk);
}
continue;
}
case 18: {
if (this.zzapn == null) {
this.zzapn = new zziw();
}
zzbez.zza((zzbfi)this.zzapn);
continue;
}
case 26: {
if (this.zzapo == null) {
this.zzapo = new zzis();
}
zzbez.zza((zzbfi)this.zzapo);
continue;
}
}
}
return this;
}
public final void zza(final zzbfa zzbfa) throws IOException {
if (this.zzanu != null) {
zzbfa.zzm(1, (int)this.zzanu);
}
if (this.zzapn != null) {
zzbfa.zza(2, (zzbfi)this.zzapn);
}
if (this.zzapo != null) {
zzbfa.zza(3, (zzbfi)this.zzapo);
}
super.zza(zzbfa);
}
protected final int zzr() {
int zzr;
final int n = zzr = super.zzr();
if (this.zzanu != null) {
zzr = n + zzbfa.zzq(1, (int)this.zzanu);
}
int n2 = zzr;
if (this.zzapn != null) {
n2 = zzr + zzbfa.zzb(2, (zzbfi)this.zzapn);
}
int n3 = n2;
if (this.zzapo != null) {
n3 = n2 + zzbfa.zzb(3, (zzbfi)this.zzapo);
}
return n3;
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
78fd849b94df31a25bda35d6ebc078a5a6ad2890
|
66220fbb2b7d99755860cecb02d2e02f946e0f23
|
/src/net/sourceforge/plantuml/eps/PostScriptCommandLineTo.java
|
20b901c3b1e0cfbac1247e49dc6627aaa2ebaf65
|
[
"MIT"
] |
permissive
|
isabella232/plantuml-mit
|
27e7c73143241cb13b577203673e3882292e686e
|
63b2bdb853174c170f304bc56f97294969a87774
|
refs/heads/master
| 2022-11-09T00:41:48.471405
| 2020-06-28T12:42:10
| 2020-06-28T12:42:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: https://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* Licensed under The MIT License (Massachusetts Institute of Technology License)
*
* See http://opensource.org/licenses/MIT
*
* 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.
*
*
* Original Author: Arnaud Roques
*/
package net.sourceforge.plantuml.eps;
public class PostScriptCommandLineTo implements PostScriptCommand {
private final double x;
private final double y;
public PostScriptCommandLineTo(double x, double y) {
this.x = x;
this.y = y;
}
public String toPostString() {
return EpsGraphics.format(x) + " " + EpsGraphics.format(y) + " rlineto";
}
}
|
[
"plantuml@gmail.com"
] |
plantuml@gmail.com
|
ef3d4717c8f908422cf047df90e392d51821b98a
|
eebf046f3861f1f6e928aa1af785f45367a1cb99
|
/app/src/main/java/android/support/p001v4/util/CircularArray.java
|
29d73f092a8ad9f3818dee3ebc5fce84b6bcfe62
|
[] |
no_license
|
AndroidTVDeveloper/TVLauncher-Sony
|
5cbff163627993f3c55ec40cdfa949cbafad2ae6
|
abe3b6fa43b006b76dcd13677cae2afd07fae108
|
refs/heads/master
| 2021-02-07T03:55:25.371409
| 2020-02-29T15:00:56
| 2020-02-29T15:00:56
| 243,980,541
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,101
|
java
|
package android.support.p001v4.util;
/* renamed from: android.support.v4.util.CircularArray */
public final class CircularArray<E> {
private int mCapacityBitmask;
private E[] mElements;
private int mHead;
private int mTail;
private void doubleCapacity() {
E[] eArr = this.mElements;
int n = eArr.length;
int i = this.mHead;
int r = n - i;
int newCapacity = n << 1;
if (newCapacity >= 0) {
E[] eArr2 = new Object[newCapacity];
System.arraycopy(eArr, i, eArr2, 0, r);
System.arraycopy(this.mElements, 0, eArr2, r, this.mHead);
this.mElements = (Object[]) eArr2;
this.mHead = 0;
this.mTail = n;
this.mCapacityBitmask = newCapacity - 1;
return;
}
throw new RuntimeException("Max array capacity exceeded");
}
public CircularArray() {
this(8);
}
public CircularArray(int minCapacity) {
int arrayCapacity;
if (minCapacity < 1) {
throw new IllegalArgumentException("capacity must be >= 1");
} else if (minCapacity <= 1073741824) {
if (Integer.bitCount(minCapacity) != 1) {
arrayCapacity = Integer.highestOneBit(minCapacity - 1) << 1;
} else {
arrayCapacity = minCapacity;
}
this.mCapacityBitmask = arrayCapacity - 1;
this.mElements = (Object[]) new Object[arrayCapacity];
} else {
throw new IllegalArgumentException("capacity must be <= 2^30");
}
}
public void addFirst(E e) {
this.mHead = (this.mHead - 1) & this.mCapacityBitmask;
E[] eArr = this.mElements;
int i = this.mHead;
eArr[i] = e;
if (i == this.mTail) {
doubleCapacity();
}
}
public void addLast(E e) {
E[] eArr = this.mElements;
int i = this.mTail;
eArr[i] = e;
this.mTail = this.mCapacityBitmask & (i + 1);
if (this.mTail == this.mHead) {
doubleCapacity();
}
}
public E popFirst() {
int i = this.mHead;
if (i != this.mTail) {
E[] eArr = this.mElements;
E result = eArr[i];
eArr[i] = null;
this.mHead = (i + 1) & this.mCapacityBitmask;
return result;
}
throw new ArrayIndexOutOfBoundsException();
}
public E popLast() {
int i = this.mHead;
int i2 = this.mTail;
if (i != i2) {
int t = this.mCapacityBitmask & (i2 - 1);
E[] eArr = this.mElements;
E result = eArr[t];
eArr[t] = null;
this.mTail = t;
return result;
}
throw new ArrayIndexOutOfBoundsException();
}
public void clear() {
removeFromStart(size());
}
public void removeFromStart(int numOfElements) {
if (numOfElements > 0) {
if (numOfElements <= size()) {
int end = this.mElements.length;
int i = this.mHead;
if (numOfElements < end - i) {
end = i + numOfElements;
}
for (int i2 = this.mHead; i2 < end; i2++) {
this.mElements[i2] = null;
}
int i3 = this.mHead;
int removed = end - i3;
int numOfElements2 = numOfElements - removed;
this.mHead = (i3 + removed) & this.mCapacityBitmask;
if (numOfElements2 > 0) {
for (int i4 = 0; i4 < numOfElements2; i4++) {
this.mElements[i4] = null;
}
this.mHead = numOfElements2;
return;
}
return;
}
throw new ArrayIndexOutOfBoundsException();
}
}
/* JADX INFO: Multiple debug info for r1v3 int: [D('i' int), D('removed' int)] */
public void removeFromEnd(int numOfElements) {
int i;
if (numOfElements > 0) {
if (numOfElements <= size()) {
int start = 0;
int i2 = this.mTail;
if (numOfElements < i2) {
start = i2 - numOfElements;
}
int i3 = start;
while (true) {
i = this.mTail;
if (i3 >= i) {
break;
}
this.mElements[i3] = null;
i3++;
}
int removed = i - start;
int numOfElements2 = numOfElements - removed;
this.mTail = i - removed;
if (numOfElements2 > 0) {
this.mTail = this.mElements.length;
int newTail = this.mTail - numOfElements2;
for (int i4 = newTail; i4 < this.mTail; i4++) {
this.mElements[i4] = null;
}
this.mTail = newTail;
return;
}
return;
}
throw new ArrayIndexOutOfBoundsException();
}
}
public E getFirst() {
int i = this.mHead;
if (i != this.mTail) {
return this.mElements[i];
}
throw new ArrayIndexOutOfBoundsException();
}
public E getLast() {
int i = this.mHead;
int i2 = this.mTail;
if (i != i2) {
return this.mElements[(i2 - 1) & this.mCapacityBitmask];
}
throw new ArrayIndexOutOfBoundsException();
}
public E get(int n) {
if (n >= 0 && n < size()) {
return this.mElements[(this.mHead + n) & this.mCapacityBitmask];
}
throw new ArrayIndexOutOfBoundsException();
}
public int size() {
return (this.mTail - this.mHead) & this.mCapacityBitmask;
}
public boolean isEmpty() {
return this.mHead == this.mTail;
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
6257dc27f8c72acbff070e8d13f5eda2a3dfd65d
|
f20e1ecf2d473e93805b7967a771be0c57b4d836
|
/src/main/java/task17_transportation_optional/storage/Storage.java
|
67c57f63cfab04eb9dc76ba7b2140b3479796290
|
[] |
no_license
|
Tadashimi/EpamTasks
|
154fee6f1e322a4d4326678e45af3c611151c7b1
|
b3c9774ea9273614b5504ffc4085ed9493643832
|
refs/heads/master
| 2023-07-20T01:51:44.709725
| 2023-04-09T19:37:34
| 2023-04-09T19:37:34
| 225,715,328
| 1
| 0
| null | 2023-07-07T21:58:36
| 2019-12-03T21:03:51
|
Java
|
UTF-8
|
Java
| false
| false
| 3,241
|
java
|
package task17_transportation_optional.storage;
import task17_transportation_optional.cargo.domain.Cargo;
import task17_transportation_optional.carrier.domain.Carrier;
import task17_transportation_optional.transportation.domain.Transportation;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class Storage implements Serializable {
private static final long serialVersionUID = 100L;
transient private static final int ARRAY_CAPACITY = 10;
public static Cargo[] cargoArray = new Cargo[ARRAY_CAPACITY];
public static int cargoIndex = 0;
public static List<Cargo> cargoCollection = new ArrayList<>();
public static Carrier[] carrierArray = new Carrier[ARRAY_CAPACITY];
public static int carrierIndex = 0;
public static List<Carrier> carrierCollection = new ArrayList<>();
public static Transportation[] transportationArray = new Transportation[ARRAY_CAPACITY];
public static int transportationIndex = 0;
public static List<Transportation> transportationCollection = new ArrayList<>();
public static void serializeStatic(ObjectOutputStream objectOutputStream) throws IOException {
serializeCargoes(objectOutputStream);
serializeCarriers(objectOutputStream);
serializeTransportations(objectOutputStream);
}
public static void deserializeStatic(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
deserializeCargoes(objectInputStream);
deserializeCarriers(objectInputStream);
deserializeTransportations(objectInputStream);
}
private static void serializeCargoes(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.writeObject(cargoArray);
objectOutputStream.writeObject(cargoCollection);
}
private static void serializeCarriers(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.writeObject(carrierArray);
objectOutputStream.writeObject(carrierCollection);
}
private static void serializeTransportations(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.writeObject(transportationArray);
objectOutputStream.writeObject(transportationCollection);
}
private static void deserializeCargoes(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
cargoArray = (Cargo[]) objectInputStream.readObject();
cargoCollection = (List<Cargo>) objectInputStream.readObject();
}
private static void deserializeCarriers(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
carrierArray = (Carrier[]) objectInputStream.readObject();
carrierCollection = (List<Carrier>) objectInputStream.readObject();
}
private static void deserializeTransportations(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
transportationArray = (Transportation[]) objectInputStream.readObject();
transportationCollection = (List<Transportation>) objectInputStream.readObject();
}
}
|
[
"tadashimi777@gmail.com"
] |
tadashimi777@gmail.com
|
a33f03ff22ccfeb4833184e4c9c742ad3b3fd4e6
|
7df40f6ea2209b7d48979465fd8081ec2ad198cc
|
/TOOLS/server/org/flywaydb/core/internal/util/StringUtils.java
|
01d60af258bf841222d03db57f4a5cbb78214d8d
|
[
"IJG"
] |
permissive
|
warchiefmarkus/WurmServerModLauncher-0.43
|
d513810045c7f9aebbf2ec3ee38fc94ccdadd6db
|
3e9d624577178cd4a5c159e8f61a1dd33d9463f6
|
refs/heads/master
| 2021-09-27T10:11:56.037815
| 2021-09-19T16:23:45
| 2021-09-19T16:23:45
| 252,689,028
| 0
| 0
| null | 2021-09-19T16:53:10
| 2020-04-03T09:33:50
|
Java
|
UTF-8
|
Java
| false
| false
| 7,758
|
java
|
/* */ package org.flywaydb.core.internal.util;
/* */
/* */ import java.util.Collection;
/* */ import java.util.Iterator;
/* */ import java.util.regex.Matcher;
/* */ import java.util.regex.Pattern;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class StringUtils
/* */ {
/* */ public static String trimOrPad(String str, int length) {
/* 42 */ return trimOrPad(str, length, ' ');
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String trimOrPad(String str, int length, char padChar) {
/* */ String result;
/* 55 */ if (str == null) {
/* 56 */ result = "";
/* */ } else {
/* 58 */ result = str;
/* */ }
/* */
/* 61 */ if (result.length() > length) {
/* 62 */ return result.substring(0, length);
/* */ }
/* */
/* 65 */ while (result.length() < length) {
/* 66 */ result = result + padChar;
/* */ }
/* 68 */ return result;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNumeric(String str) {
/* 90 */ return (str != null && str.matches("\\d*"));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String collapseWhitespace(String str) {
/* 100 */ return str.replaceAll("\\s+", " ");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String left(String str, int count) {
/* 112 */ if (str == null) {
/* 113 */ return null;
/* */ }
/* */
/* 116 */ if (str.length() < count) {
/* 117 */ return str;
/* */ }
/* */
/* 120 */ return str.substring(0, count);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String replaceAll(String str, String originalToken, String replacementToken) {
/* 132 */ return str.replaceAll(Pattern.quote(originalToken), Matcher.quoteReplacement(replacementToken));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean hasLength(String str) {
/* 142 */ return (str != null && str.length() > 0);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String arrayToCommaDelimitedString(Object[] strings) {
/* 152 */ if (strings == null) {
/* 153 */ return "";
/* */ }
/* */
/* 156 */ StringBuilder builder = new StringBuilder();
/* 157 */ for (int i = 0; i < strings.length; i++) {
/* 158 */ if (i > 0) {
/* 159 */ builder.append(",");
/* */ }
/* 161 */ builder.append(String.valueOf(strings[i]));
/* */ }
/* 163 */ return builder.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean hasText(String s) {
/* 173 */ return (s != null && s.trim().length() > 0);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String[] tokenizeToStringArray(String str, String delimiters) {
/* 184 */ if (str == null) {
/* 185 */ return null;
/* */ }
/* 187 */ String[] tokens = str.split("[" + delimiters + "]");
/* 188 */ for (int i = 0; i < tokens.length; i++) {
/* 189 */ tokens[i] = tokens[i].trim();
/* */ }
/* 191 */ return tokens;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static int countOccurrencesOf(String str, String token) {
/* 202 */ if (str == null || token == null || str.length() == 0 || token.length() == 0) {
/* 203 */ return 0;
/* */ }
/* 205 */ int count = 0;
/* 206 */ int pos = 0;
/* */ int idx;
/* 208 */ while ((idx = str.indexOf(token, pos)) != -1) {
/* 209 */ count++;
/* 210 */ pos = idx + token.length();
/* */ }
/* 212 */ return count;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String replace(String inString, String oldPattern, String newPattern) {
/* 225 */ if (!hasLength(inString) || !hasLength(oldPattern) || newPattern == null) {
/* 226 */ return inString;
/* */ }
/* 228 */ StringBuilder sb = new StringBuilder();
/* 229 */ int pos = 0;
/* 230 */ int index = inString.indexOf(oldPattern);
/* */
/* 232 */ int patLen = oldPattern.length();
/* 233 */ while (index >= 0) {
/* 234 */ sb.append(inString.substring(pos, index));
/* 235 */ sb.append(newPattern);
/* 236 */ pos = index + patLen;
/* 237 */ index = inString.indexOf(oldPattern, pos);
/* */ }
/* 239 */ sb.append(inString.substring(pos));
/* */
/* 241 */ return sb.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String collectionToCommaDelimitedString(Collection<?> collection) {
/* 252 */ return collectionToDelimitedString(collection, ", ");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String collectionToDelimitedString(Collection<?> collection, String delimiter) {
/* 264 */ if (collection == null) {
/* 265 */ return "";
/* */ }
/* 267 */ StringBuilder sb = new StringBuilder();
/* 268 */ Iterator<?> it = collection.iterator();
/* 269 */ while (it.hasNext()) {
/* 270 */ sb.append(it.next());
/* 271 */ if (it.hasNext()) {
/* 272 */ sb.append(delimiter);
/* */ }
/* */ }
/* 275 */ return sb.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String trimLeadingWhitespace(String str) {
/* 286 */ if (!hasLength(str)) {
/* 287 */ return str;
/* */ }
/* 289 */ StringBuilder buf = new StringBuilder(str);
/* 290 */ while (buf.length() > 0 && Character.isWhitespace(buf.charAt(0))) {
/* 291 */ buf.deleteCharAt(0);
/* */ }
/* 293 */ return buf.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String trimTrailingWhitespace(String str) {
/* 304 */ if (!hasLength(str)) {
/* 305 */ return str;
/* */ }
/* 307 */ StringBuilder buf = new StringBuilder(str);
/* 308 */ while (buf.length() > 0 && Character.isWhitespace(buf.charAt(buf.length() - 1))) {
/* 309 */ buf.deleteCharAt(buf.length() - 1);
/* */ }
/* 311 */ return buf.toString();
/* */ }
/* */ }
/* Location: C:\Users\leo\Desktop\server.jar!\org\flywaydb\core\interna\\util\StringUtils.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"warchiefmarkus@gmail.com"
] |
warchiefmarkus@gmail.com
|
1d46007b0f2f2d906e2b6bbc9b7b97076eabecd5
|
1931aa0e243dcdfc5a485c3281402319535d3f8c
|
/src/qspiderjavaprogrampractise/ArraySet.java
|
1399f1b2ebcba7bd7f587dc85b5fe5784806908d
|
[] |
no_license
|
preetishIbankG99/MindQMisc
|
01975136742b2ee95bb1286a113b30156d774739
|
b120fafefbe5c695648953e04b67792a99447817
|
refs/heads/master
| 2023-04-13T18:22:51.294937
| 2021-05-01T13:42:26
| 2021-05-01T13:42:26
| 363,422,169
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,334
|
java
|
package qspiderjavaprogrampractise;
public class ArraySet {
// You cannot remove the vales but you can assign a new value which can also be a default value of the type of the array.If it is an int array you can set default value to 0
// double array default value 0.0 than
// non premitive array default value null.
public static void main(String[] args) {
// int[]arr={12,23,20,43,21};
// {
// for(int i=0;i<arr.length;i++){
// //setting array value to 0
// arr[i]=0;
// //to remove or set third element value
// //arr[2]=0;
// }
// for (int i:arr)
// System.out.println(i);
//to print even array
// int arr[]= {10,20,30,40,50,60};
// for (int i=0;i<arr.length;i+=2)
// {
//
// System.out.print(arr[i]);
// System.out.println();
// }
// System.out.println();
// for(int i=1;i<arr.length;i+=2)
// {
// System.out.print(arr[i]);
// System.out.println();
// }
// int count=1;
// for(int i=1;i<=3;i++){
// for(int j=1;j<=3;j++)
// {
//
// System.out.print(" "+count++);
// }
// System.out.println();}
//Print the string char by Char
String str="abcd";
int length=str.length();
for(int i=0;i<length;i++){
System.out.println(str.charAt(i));
}
}
}
|
[
"shubhamsethiabc87@gmail.com"
] |
shubhamsethiabc87@gmail.com
|
109e9044a0f56bc05eee0f6a27f0994b0cf588ea
|
5067d13ba6abc9aea2a03927b9f7468e73095273
|
/src/com/dcms/cms/dao/main/impl/CmsLogDaoImpl.java
|
deadac9405c8119f42790634f19b113e4a3b5e03
|
[] |
no_license
|
dailinyi/dcmsv5-postgreSQL
|
ced164536a7c0fe99c53446f1d499de3bff8f3a4
|
09985b1519533090f4d67dd1ee410a37242d93b4
|
refs/heads/master
| 2021-01-01T05:51:51.135571
| 2015-02-02T15:18:11
| 2015-02-02T15:18:11
| 30,084,495
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,256
|
java
|
package com.dcms.cms.dao.main.impl;
import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;
import com.dcms.cms.dao.main.CmsLogDao;
import com.dcms.cms.entity.main.CmsLog;
import com.dcms.common.hibernate3.Finder;
import com.dcms.common.hibernate3.HibernateBaseDao;
import com.dcms.common.page.Pagination;
@Repository
public class CmsLogDaoImpl extends HibernateBaseDao<CmsLog, Integer> implements
CmsLogDao {
public Pagination getPage(Integer category, Integer siteId, Integer userId,
String title, String ip, int pageNo, int pageSize) {
Finder f = Finder.create("from CmsLog bean where 1=1");
if (category != null) {
f.append(" and bean.category=:category");
f.setParam("category", category);
}
if (siteId != null) {
f.append(" and bean.site.id=:siteId");
f.setParam("siteId", siteId);
}
if (userId != null) {
f.append(" and bean.user.id=:userId");
f.setParam("userId", userId);
}
if (StringUtils.isNotBlank(title)) {
f.append(" and bean.title like :title");
f.setParam("title", "%" + title + "%");
}
if (StringUtils.isNotBlank(ip)) {
f.append(" and bean.ip like :ip");
f.setParam("ip", ip + "%");
}
f.append(" order by bean.id desc");
return find(f, pageNo, pageSize);
}
public CmsLog findById(Integer id) {
CmsLog entity = get(id);
return entity;
}
public CmsLog save(CmsLog bean) {
getSession().save(bean);
return bean;
}
public CmsLog deleteById(Integer id) {
CmsLog entity = super.get(id);
if (entity != null) {
getSession().delete(entity);
}
return entity;
}
public int deleteBatch(Integer category, Integer siteId, Date before) {
Finder f = Finder.create("delete CmsLog bean where 1=1");
if (category != null) {
f.append(" and bean.category=:category");
f.setParam("category", category);
}
if (siteId != null) {
f.append(" and bean.site.id=:siteId");
f.setParam("siteId", siteId);
}
if (before != null) {
f.append(" and bean.time<=:before");
f.setParam("before", before);
}
Query q = f.createQuery(getSession());
return q.executeUpdate();
}
@Override
protected Class<CmsLog> getEntityClass() {
return CmsLog.class;
}
}
|
[
"dailinyi@rd.tuan800.com"
] |
dailinyi@rd.tuan800.com
|
2b7d27534ebf8695b8716aaa7cd83ae656f7facc
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14319-2-28-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/api/Document_ESTest_scaffolding.java
|
101305f4d9e7df0b3b23b190fd8896f5a38fe319
|
[] |
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
| 430
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Apr 02 22:33:56 UTC 2020
*/
package com.xpn.xwiki.api;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Document_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
87b1d96ce5bb0dcb12a7f258e6f4ee6c77f2edde
|
590ab79666d13a128538adb639c9d4695761bafe
|
/root-business-api/src/main/java/org/cyk/system/root/business/api/userinterface/UserInterfaceComponentEventNameBusiness.java
|
b1cbe5772a5709f6c23c78e8de93cc9d786d28d0
|
[] |
no_license
|
devlopper/org.cyk.system.root
|
53c1844665cd9caed3429ef19f63bd9c33d42a63
|
b3e0bf2d730555412564f32a1b174835d8a53c89
|
refs/heads/master
| 2021-01-24T12:31:10.691363
| 2018-05-21T21:10:26
| 2018-05-21T21:10:26
| 16,188,519
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
package org.cyk.system.root.business.api.userinterface;
import org.cyk.system.root.business.api.AbstractEnumerationBusiness;
import org.cyk.system.root.model.userinterface.UserInterfaceComponentEventName;
public interface UserInterfaceComponentEventNameBusiness extends AbstractEnumerationBusiness<UserInterfaceComponentEventName> {
}
|
[
"kycdev@gmail.com"
] |
kycdev@gmail.com
|
6c07b06a318e6d8c5408dc30e7c26dcdba1ce5c3
|
56fe53e612720292dc30927072e6f76c2eea6567
|
/onvifcxf/src/org/onvif/ver10/schema/FindRecordingResultList.java
|
bd4f01245e7f7b890dd908fad7e0e5e56ff28170
|
[] |
no_license
|
guishijin/onvif4java
|
f0223e63cda3a7fcd44e49340eaae1d7e5354ad0
|
9b15dba80f193ee4ba952aad377dda89a9952343
|
refs/heads/master
| 2020-04-08T03:22:51.810275
| 2019-10-23T11:16:46
| 2019-10-23T11:16:46
| 124,234,334
| 1
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,751
|
java
|
package org.onvif.ver10.schema;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>FindRecordingResultList complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="FindRecordingResultList">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SearchState" type="{http://www.onvif.org/ver10/schema}SearchState"/>
* <element name="RecordingInformation" type="{http://www.onvif.org/ver10/schema}RecordingInformation" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FindRecordingResultList", propOrder = {
"searchState",
"recordingInformation"
})
public class FindRecordingResultList {
@XmlElement(name = "SearchState", required = true)
protected SearchState searchState;
@XmlElement(name = "RecordingInformation")
protected List<RecordingInformation> recordingInformation;
/**
* 获取searchState属性的值。
*
* @return
* possible object is
* {@link SearchState }
*
*/
public SearchState getSearchState() {
return searchState;
}
/**
* 设置searchState属性的值。
*
* @param value
* allowed object is
* {@link SearchState }
*
*/
public void setSearchState(SearchState value) {
this.searchState = value;
}
/**
* Gets the value of the recordingInformation 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 recordingInformation property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRecordingInformation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RecordingInformation }
*
*
*/
public List<RecordingInformation> getRecordingInformation() {
if (recordingInformation == null) {
recordingInformation = new ArrayList<RecordingInformation>();
}
return this.recordingInformation;
}
}
|
[
"420188751@qq.com"
] |
420188751@qq.com
|
96e7d2097fbe1c3ec1b4c7f6c0c7edfbcba589f7
|
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
|
/jun_java_plugins/jun_util/src_utils/常用类/basic/CommandArgs.java
|
ac4d0b90846b3bf5479dfcd22cb69de21af736ee
|
[] |
no_license
|
wujun728/jun_java_plugin
|
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
|
e031bc451c817c6d665707852308fc3b31f47cb2
|
refs/heads/master
| 2023-09-04T08:23:52.095971
| 2023-08-18T06:54:29
| 2023-08-18T06:54:29
| 62,047,478
| 117
| 42
| null | 2023-08-21T16:02:15
| 2016-06-27T10:23:58
|
Java
|
GB18030
|
Java
| false
| false
| 1,219
|
java
|
package book.basic;
public class CommandArgs {
/**
* 遇到错误时,打印错误信息,并退出程序
* @param errmsg 错误信息
*/
public static void error(String errmsg) {
System.err.println(errmsg);
System.exit(1);
}
public static void main(String[] args) {
//命令行下的帮助信息
String usageMsg = "Usage: CommandArgs [options]\n"
+ "Where [options] are:\n"
+ " -help 显示帮助信息\n"
+ " -n <name> 设置参数的名字\n"
+ " -v <value> 设置参数的值\n";
String name = null;
String value = null;
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-n")) {
if ((i + 1) == args.length) {
error("Error: -n requires an argument.");
}
name = args[++i];
} else if (args[i].equals("-v")){
if ((i + 1) == args.length) {
error("Error: -v requires an argument.");
}
value = args[++i];
} else if (args[i].equalsIgnoreCase("-help")) {
System.out.println(usageMsg);
System.exit(0);
} else {
error("Error: argument not recognized: " + args[i]);
}
}
System.out.println("[命令行解析结果] name: " + name + "; value: " + value);
}
}
|
[
"wujun728@163.com"
] |
wujun728@163.com
|
b192655e0c6e31edac734a512a1f26e6f62ff0fb
|
4b7aa0d9a95a6efc6e0a01b5e4f8a97eaa43584a
|
/src/main/java/ru/job4j/chat/controller/PersonController.java
|
8c9779f53d4c041f11959d94dbc8c0280d83738c
|
[
"Apache-2.0"
] |
permissive
|
IvanPJF/job4j_chat
|
32463d935166735839253f87599f352609b513a2
|
ff1f4a726172121bbf86600426a3473897ddfa87
|
refs/heads/master
| 2022-12-19T06:44:46.076511
| 2020-09-29T13:23:43
| 2020-09-29T13:23:43
| 298,314,760
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,025
|
java
|
package ru.job4j.chat.controller;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
import ru.job4j.chat.model.Person;
import ru.job4j.chat.service.PersonService;
import java.util.Collection;
@RestController
@RequestMapping("/person")
public class PersonController {
private final PersonService service;
private final BCryptPasswordEncoder encoder;
public PersonController(PersonService service, BCryptPasswordEncoder encoder) {
this.service = service;
this.encoder = encoder;
}
@GetMapping
public ResponseEntity<Collection<Person>> findAll() {
return new ResponseEntity<>(
service.findAll(),
HttpStatus.OK
);
}
@GetMapping("/{id}")
public ResponseEntity<Person> findById(@PathVariable("id") Integer id) {
var person = service.findById(Person.of(id));
return new ResponseEntity<>(
person.orElse(new Person()),
person.isPresent() ? HttpStatus.OK : HttpStatus.NOT_FOUND
);
}
@PostMapping
public ResponseEntity<Person> create(@RequestBody Person person) {
return new ResponseEntity<>(
service.save(person),
HttpStatus.CREATED
);
}
@PutMapping
public ResponseEntity<Void> update(@RequestBody Person person) {
service.save(person);
return ResponseEntity.ok().build();
}
@DeleteMapping("/{id}")
public ResponseEntity<Void> delete(@PathVariable("id") Integer id) {
service.delete(Person.of(id));
return ResponseEntity.ok().build();
}
@PostMapping("/sign-up")
public ResponseEntity<Void> signUp(@RequestBody Person person) {
person.setPassword(encoder.encode(person.getPassword()));
service.save(person);
return ResponseEntity.ok().build();
}
}
|
[
"teaching-light@yandex.ru"
] |
teaching-light@yandex.ru
|
aac3335a59ef023f1f7aef47715da3d6017484f4
|
148c70aef9be6b85e15ccf88fc10e4cb25b56979
|
/Comprobante/src/ec/gob/sri/comprobantes/modelo/InfoTributaria.java
|
bcfdbe2109700cd59dfa06b1c6f67d1e922238d7
|
[] |
no_license
|
navidaro/facturacion-electronica-web-svn-to-git
|
8c8bc4fade2c10bdb037bbf481b1697590521917
|
177532421502ad13c902fcaa75e8515055cc4d26
|
refs/heads/master
| 2023-03-17T15:02:05.517717
| 2015-12-28T14:19:20
| 2015-12-28T14:19:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,052
|
java
|
/* 1: */ package ec.gob.sri.comprobantes.modelo;
/* 2: */
/* 3: */ import javax.xml.bind.annotation.XmlAccessType;
/* 4: */ import javax.xml.bind.annotation.XmlAccessorType;
/* 5: */ import javax.xml.bind.annotation.XmlElement;
/* 6: */ import javax.xml.bind.annotation.XmlType;
/* 7: */
/* 8: */ @XmlAccessorType(XmlAccessType.FIELD)
/* 9: */ @XmlType(name="infoTributaria", propOrder={"ambiente", "tipoEmision", "razonSocial", "nombreComercial", "ruc", "claveAcceso", "codDoc", "estab", "ptoEmi", "secuencial", "dirMatriz"})
/* 10: */ public class InfoTributaria
/* 11: */ {
/* 12: */ @XmlElement(required=true)
/* 13: */ protected String ambiente;
/* 14: */ @XmlElement(required=true)
/* 15: */ protected String tipoEmision;
/* 16: */ @XmlElement(required=true)
/* 17: */ protected String razonSocial;
/* 18: */ protected String nombreComercial;
/* 19: */ @XmlElement(required=true)
/* 20: */ protected String ruc;
/* 21: */ @XmlElement(required=true)
/* 22: */ protected String claveAcceso;
/* 23: */ @XmlElement(required=true)
/* 24: */ protected String codDoc;
/* 25: */ @XmlElement(required=true)
/* 26: */ protected String estab;
/* 27: */ @XmlElement(required=true)
/* 28: */ protected String ptoEmi;
/* 29: */ @XmlElement(required=true)
/* 30: */ protected String secuencial;
/* 31: */ @XmlElement(required=true)
/* 32: */ protected String dirMatriz;
/* 33: */
/* 34: */ public String getAmbiente()
/* 35: */ {
/* 36: 95 */ return this.ambiente;
/* 37: */ }
/* 38: */
/* 39: */ public void setAmbiente(String value)
/* 40: */ {
/* 41:107 */ this.ambiente = value;
/* 42: */ }
/* 43: */
/* 44: */ public String getTipoEmision()
/* 45: */ {
/* 46:119 */ return this.tipoEmision;
/* 47: */ }
/* 48: */
/* 49: */ public void setTipoEmision(String value)
/* 50: */ {
/* 51:131 */ this.tipoEmision = value;
/* 52: */ }
/* 53: */
/* 54: */ public String getRazonSocial()
/* 55: */ {
/* 56:143 */ return this.razonSocial;
/* 57: */ }
/* 58: */
/* 59: */ public void setRazonSocial(String value)
/* 60: */ {
/* 61:155 */ this.razonSocial = value;
/* 62: */ }
/* 63: */
/* 64: */ public String getNombreComercial()
/* 65: */ {
/* 66:167 */ return this.nombreComercial;
/* 67: */ }
/* 68: */
/* 69: */ public void setNombreComercial(String value)
/* 70: */ {
/* 71:179 */ this.nombreComercial = value;
/* 72: */ }
/* 73: */
/* 74: */ public String getRuc()
/* 75: */ {
/* 76:191 */ return this.ruc;
/* 77: */ }
/* 78: */
/* 79: */ public void setRuc(String value)
/* 80: */ {
/* 81:203 */ this.ruc = value;
/* 82: */ }
/* 83: */
/* 84: */ public String getClaveAcceso()
/* 85: */ {
/* 86:215 */ return this.claveAcceso;
/* 87: */ }
/* 88: */
/* 89: */ public void setClaveAcceso(String value)
/* 90: */ {
/* 91:227 */ this.claveAcceso = value;
/* 92: */ }
/* 93: */
/* 94: */ public String getCodDoc()
/* 95: */ {
/* 96:239 */ return this.codDoc;
/* 97: */ }
/* 98: */
/* 99: */ public void setCodDoc(String value)
/* 100: */ {
/* 101:251 */ this.codDoc = value;
/* 102: */ }
/* 103: */
/* 104: */ public String getEstab()
/* 105: */ {
/* 106:263 */ return this.estab;
/* 107: */ }
/* 108: */
/* 109: */ public void setEstab(String value)
/* 110: */ {
/* 111:275 */ this.estab = value;
/* 112: */ }
/* 113: */
/* 114: */ public String getPtoEmi()
/* 115: */ {
/* 116:287 */ return this.ptoEmi;
/* 117: */ }
/* 118: */
/* 119: */ public void setPtoEmi(String value)
/* 120: */ {
/* 121:299 */ this.ptoEmi = value;
/* 122: */ }
/* 123: */
/* 124: */ public String getSecuencial()
/* 125: */ {
/* 126:311 */ return this.secuencial;
/* 127: */ }
/* 128: */
/* 129: */ public void setSecuencial(String value)
/* 130: */ {
/* 131:323 */ this.secuencial = value;
/* 132: */ }
/* 133: */
/* 134: */ public String getDirMatriz()
/* 135: */ {
/* 136:335 */ return this.dirMatriz;
/* 137: */ }
/* 138: */
/* 139: */ public void setDirMatriz(String value)
/* 140: */ {
/* 141:347 */ this.dirMatriz = value;
/* 142: */ }
/* 143: */ }
/* Location: C:\Facturacion Electronica\ComprobantesDesktop.jar
* Qualified Name: ec.gob.sri.comprobantes.modelo.InfoTributaria
* JD-Core Version: 0.7.0.1
*/
|
[
"you@example.com"
] |
you@example.com
|
07dc2eb2a4632e964a324b32255ae4bfc4664d75
|
5124c83de0ce2ebd73b7a4edd1dc6edfc3523af5
|
/Aurora-2.6/me/memeszz/aurora/util/math/MathUtil.java
|
e177946162355aba720f9bac81f69a9c76bcb08f
|
[] |
no_license
|
Sixtieth/rip-aurora
|
44306d2b97f7c14e805724dac7afd2f36af0caeb
|
30665f17ea09f4995569de887fd14d9ff942b36b
|
refs/heads/master
| 2022-11-26T15:28:27.287942
| 2020-08-08T22:04:45
| 2020-08-08T22:04:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,306
|
java
|
package me.memeszz.aurora.util.math;
import java.math.RoundingMode;
import java.math.BigDecimal;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
public final class MathUtil
{
public static double degToRad(final double deg) {
return deg * 0.01745329238474369;
}
public static float[] calcAngle(final Vec3d from, final Vec3d to) {
final double difX = to.x - from.x;
final double difY = (to.y - from.y) * -1.0;
final double difZ = to.z - from.z;
final double dist = MathHelper.sqrt(difX * difX + difZ * difZ);
return new float[] { (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(difZ, difX)) - 90.0), (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(difY, dist))) };
}
public static double[] directionSpeed(final double speed) {
final Minecraft mc = Minecraft.getMinecraft();
float forward = mc.player.movementInput.moveForward;
float side = mc.player.movementInput.moveStrafe;
float yaw = mc.player.prevRotationYaw + (mc.player.rotationYaw - mc.player.prevRotationYaw) * mc.getRenderPartialTicks();
if (forward != 0.0f) {
if (side > 0.0f) {
yaw += ((forward > 0.0f) ? -45 : 45);
}
else if (side < 0.0f) {
yaw += ((forward > 0.0f) ? 45 : -45);
}
side = 0.0f;
if (forward > 0.0f) {
forward = 1.0f;
}
else if (forward < 0.0f) {
forward = -1.0f;
}
}
final double sin = Math.sin(Math.toRadians(yaw + 90.0f));
final double cos = Math.cos(Math.toRadians(yaw + 90.0f));
final double posX = forward * speed * cos + side * speed * sin;
final double posZ = forward * speed * sin - side * speed * cos;
return new double[] { posX, posZ };
}
public static double round(final double value, final int places) {
if (places < 0) {
return value;
}
return new BigDecimal(value).setScale(places, RoundingMode.HALF_UP).doubleValue();
}
public static float clamp(float val, final float min, final float max) {
if (val <= min) {
val = min;
}
if (val >= max) {
val = max;
}
return val;
}
public static double map(double value, final double a, final double b, final double c, final double d) {
value = (value - a) / (b - a);
return c + value * (d - c);
}
public static double[] directionSpeedNoForward(final double speed) {
final Minecraft mc = Minecraft.getMinecraft();
float forward = 1.0f;
if (mc.gameSettings.keyBindLeft.isPressed() || mc.gameSettings.keyBindRight.isPressed() || mc.gameSettings.keyBindBack.isPressed() || mc.gameSettings.keyBindForward.isPressed()) {
forward = mc.player.movementInput.moveForward;
}
float side = mc.player.movementInput.moveStrafe;
float yaw = mc.player.prevRotationYaw + (mc.player.rotationYaw - mc.player.prevRotationYaw) * mc.getRenderPartialTicks();
if (forward != 0.0f) {
if (side > 0.0f) {
yaw += ((forward > 0.0f) ? -45 : 45);
}
else if (side < 0.0f) {
yaw += ((forward > 0.0f) ? 45 : -45);
}
side = 0.0f;
if (forward > 0.0f) {
forward = 1.0f;
}
else if (forward < 0.0f) {
forward = -1.0f;
}
}
final double sin = Math.sin(Math.toRadians(yaw + 90.0f));
final double cos = Math.cos(Math.toRadians(yaw + 90.0f));
final double posX = forward * speed * cos + side * speed * sin;
final double posZ = forward * speed * sin - side * speed * cos;
return new double[] { posX, posZ };
}
public static double getDistance(final Vec3d pos, final double x, final double y, final double z) {
final double deltaX = pos.x - x;
final double deltaY = pos.y - y;
final double deltaZ = pos.z - z;
return MathHelper.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);
}
}
|
[
"adadadw123@gmail.com"
] |
adadadw123@gmail.com
|
355fd65a1720f42e8dbd2cf7bc52376c0547474d
|
db6a62063aedac14128797b2869e9e0db38ef109
|
/src/test/java/io/github/jhipster/application/config/timezone/HibernateTimeZoneIT.java
|
27ce05696bb24bf03d2e9add7113ff9cba777176
|
[] |
no_license
|
sadanand119/first-microservice-app
|
c509eb0b12350e5f8aaecf712a3d745a9d6bcf7d
|
80cbe4733b71390f25c1d43fcd35a7430c4f4e4b
|
refs/heads/master
| 2022-12-23T20:57:18.163240
| 2019-09-09T05:05:07
| 2019-09-09T05:05:07
| 207,227,932
| 0
| 0
| null | 2022-12-16T05:03:26
| 2019-09-09T05:05:00
|
Java
|
UTF-8
|
Java
| false
| false
| 6,926
|
java
|
package io.github.jhipster.application.config.timezone;
import io.github.jhipster.application.FirstmicroserviceappApp;
import io.github.jhipster.application.repository.timezone.DateTimeWrapper;
import io.github.jhipster.application.repository.timezone.DateTimeWrapperRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.transaction.annotation.Transactional;
import java.time.*;
import java.time.format.DateTimeFormatter;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for the UTC Hibernate configuration.
*/
@SpringBootTest(classes = FirstmicroserviceappApp.class)
public class HibernateTimeZoneIT {
@Autowired
private DateTimeWrapperRepository dateTimeWrapperRepository;
@Autowired
private JdbcTemplate jdbcTemplate;
private DateTimeWrapper dateTimeWrapper;
private DateTimeFormatter dateTimeFormatter;
private DateTimeFormatter timeFormatter;
private DateTimeFormatter dateFormatter;
@BeforeEach
public void setup() {
dateTimeWrapper = new DateTimeWrapper();
dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z"));
dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0"));
dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00"));
dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00"));
dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10"));
dateTimeFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd HH:mm:ss.S")
.withZone(ZoneId.of("UTC"));
timeFormatter = DateTimeFormatter
.ofPattern("HH:mm:ss")
.withZone(ZoneId.of("UTC"));
dateFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd");
}
@Test
@Transactional
public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("instant", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant());
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDateTime()
.atZone(ZoneId.systemDefault())
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getZonedDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetTime()
.toLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDate()
.format(dateFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
private String generateSqlRequest(String fieldName, long id) {
return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id);
}
private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) {
while (sqlRowSet.next()) {
String dbValue = sqlRowSet.getString(1);
assertThat(dbValue).isNotNull();
assertThat(dbValue).isEqualTo(expectedValue);
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
c9c7bec77cf8b3893daf4e2e27822dd52d71a9ad
|
6d943c9f546854a99ae27784d582955830993cee
|
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201911/DaiAuthenticationKeyAction.java
|
fae422fec8417536c5601657531317c495488a20
|
[
"Apache-2.0"
] |
permissive
|
MinYoungKim1997/googleads-java-lib
|
02da3d3f1de3edf388a3f2d3669a86fe1087231c
|
16968056a0c2a9ea1676b378ab7cbfe1395de71b
|
refs/heads/master
| 2021-03-25T15:24:24.446692
| 2020-03-16T06:36:10
| 2020-03-16T06:36:10
| 247,628,741
| 0
| 0
|
Apache-2.0
| 2020-03-16T06:36:35
| 2020-03-16T06:36:34
| null |
UTF-8
|
Java
| false
| false
| 3,298
|
java
|
// Copyright 2019 Google 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.
/**
* DaiAuthenticationKeyAction.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.admanager.axis.v201911;
/**
* Represents the actions that can be performed on {@link DaiAuthenticationKey}
* objects.
*/
public abstract class DaiAuthenticationKeyAction implements java.io.Serializable {
public DaiAuthenticationKeyAction() {
}
@Override
public String toString() {
return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
.omitNullValues()
.toString();
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof DaiAuthenticationKeyAction)) return false;
DaiAuthenticationKeyAction other = (DaiAuthenticationKeyAction) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true;
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(DaiAuthenticationKeyAction.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201911", "DaiAuthenticationKeyAction"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"christopherseeley@users.noreply.github.com"
] |
christopherseeley@users.noreply.github.com
|
043e8da8a30db62a5182dfdbfec1f84ede55adfe
|
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
|
/EtCallcenter/src/et/bo/sys/role/service/impl/RoleServiceImpl.java
|
ce96887690eb07ce4d6083c53282e43bcb87def7
|
[] |
no_license
|
sensui74/legacy-project
|
4502d094edbf8964f6bb9805be88f869bae8e588
|
ff8156ae963a5c61575ff34612c908c4ccfc219b
|
refs/heads/master
| 2020-03-17T06:28:16.650878
| 2016-01-08T03:46:00
| 2016-01-08T03:46:00
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 3,564
|
java
|
package et.bo.sys.role.service.impl;
import java.util.ArrayList;
import java.util.List;
import et.bo.sys.role.service.RoleService;
import et.po.SysRole;
import excellence.common.key.KeyService;
import excellence.common.page.PageInfo;
import excellence.framework.base.dao.BaseDAO;
import excellence.framework.base.dto.IBaseDTO;
import excellence.framework.base.dto.impl.DynaBeanDTO;
public class RoleServiceImpl implements RoleService {
int num = 0;
private BaseDAO dao=null;
private KeyService ks = null;
public boolean addRoleInfo(IBaseDTO dto) {
// TODO Auto-generated method stub
boolean flag=false;
RoleSearch roleSearch = new RoleSearch();
int result = dao.findEntitySize(roleSearch.seachRoleExist(dto));
if(result!=0)
{
return flag;
}
dao.saveEntity(createRoleInfo(dto));
flag=true;
return flag;
}
//Ìí¼Ó
private SysRole createRoleInfo(IBaseDTO dto){
SysRole sysRole=new SysRole();
sysRole.setId(ks.getNext("SYS_ROLE"));
sysRole.setName(dto.get("name")==null?"":dto.get("name").toString());
sysRole.setDeleteMark(dto.get("delMark")==null?"":dto.get("delMark").toString());
sysRole.setRemark(dto.get("remark")==null?"":dto.get("remark").toString());
sysRole.setIsSys("0");
return sysRole;
}
public boolean updateRoleInfo(IBaseDTO dto) {
// TODO Auto-generated method stub
boolean flag = false;
dao.saveEntity(updateSysRoleInfo(dto));
flag = true;
return flag;
}
private SysRole updateSysRoleInfo(IBaseDTO dto){
SysRole sysRole = (SysRole)dao.loadEntity(SysRole.class, dto.get("id").toString());
// sysRole.setId(dto.get("id").toString());
sysRole.setName(dto.get("name")==null?"":dto.get("name").toString());
sysRole.setDeleteMark(dto.get("delMark")==null?"":dto.get("delMark").toString());
sysRole.setRemark(dto.get("remark")==null?"":dto.get("remark").toString());
return sysRole;
}
public boolean deleteRoleInfo(IBaseDTO dto) {
// TODO Auto-generated method stub
boolean flag = false;
SysRole sysRole = (SysRole)dao.loadEntity(SysRole.class,dto.get("id").toString());
if(sysRole.getIsSys().equals("1")){
return flag;
}
sysRole.setDeleteMark("y".toUpperCase());
dao.updateEntity(sysRole);
flag = true;
return flag;
}
public int getRoleSize() {
// TODO Auto-generated method stub
return num;
}
public List findRoleInfo(IBaseDTO dto, PageInfo pi) {
// TODO Auto-generated method stub
List l = new ArrayList();
RoleSearch roleSearch = new RoleSearch();
Object[] result = (Object[])dao.findEntity(roleSearch.searchRoleOperInfo(dto,pi));
int s = dao.findEntitySize(roleSearch.searchRoleOperInfo(dto,pi));
num = s;
for(int i=0,size=result.length;i<size;i++){
SysRole sysRole = (SysRole)result[i];
DynaBeanDTO dbd = new DynaBeanDTO();
dbd.set("id",sysRole.getId());
dbd.set("name",sysRole.getName());
dbd.set("delMark",sysRole.getDeleteMark());
dbd.set("remark",sysRole.getRemark());
l.add(dbd);
}
return l;
}
public IBaseDTO getRoleInfo(String id) {
// TODO Auto-generated method stub
IBaseDTO dto = new DynaBeanDTO();
SysRole sysRole = (SysRole)dao.loadEntity(SysRole.class,id);
dto.set("id",sysRole.getId());
dto.set("name",sysRole.getName());
dto.set("delMark",sysRole.getDeleteMark());
dto.set("remark",sysRole.getRemark());
return dto;
}
public BaseDAO getDao() {
return dao;
}
public void setDao(BaseDAO dao) {
this.dao = dao;
}
public KeyService getKs() {
return ks;
}
public void setKs(KeyService ks) {
this.ks = ks;
}
}
|
[
"wow_fei@163.com"
] |
wow_fei@163.com
|
e3b94d273c1c798590a0ed6d98fec04215b71abb
|
7ced4b8259a5d171413847e3e072226c7a5ee3d2
|
/Workspace/InterviewBit/Graph/clone-graph.java
|
57990e4878ff50d4b315e3d7fd45d4ffa11bed6d
|
[] |
no_license
|
tanishq9/Data-Structures-and-Algorithms
|
8d4df6c8a964066988bcf5af68f21387a132cd4d
|
f6f5dec38d5e2d207fb29ad4716a83553924077a
|
refs/heads/master
| 2022-12-13T03:57:39.447650
| 2020-09-05T13:16:55
| 2020-09-05T13:16:55
| 119,425,479
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,686
|
java
|
/**
* Definition for undirected graph.
* class UndirectedGraphNode {
* int label;
* List<UndirectedGraphNode> neighbors;
* UndirectedGraphNode(int x) { label = x; neighbors = new ArrayList<UndirectedGraphNode>(); }
* };
*/
public class Solution {
void dfs(UndirectedGraphNode node,boolean[] vis,HashMap<UndirectedGraphNode,UndirectedGraphNode> map){
if(vis[node.label]){
return;
}
vis[node.label]=true;
for(int i=0;i<node.neighbors.size();i++){
UndirectedGraphNode ngr=node.neighbors.get(i);
// make an entry in map for old node and new node if needed
map.putIfAbsent(node,new UndirectedGraphNode(node.label));
// populate children's list of new node using old node's children
map.putIfAbsent(ngr,new UndirectedGraphNode(ngr.label));
map.get(node).neighbors.add(map.get(ngr));
// call dfs for its children (old node)
dfs(ngr,vis,map);
}
}
public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) {
// handling empty graph case
if(node==null){
return null;
}
// handling no neighbors case
if(node.neighbors.size()==0){
return new UndirectedGraphNode(node.label);
}
// similar approach to linked list cloning
// maintain a map for old node and new node
// use dfs to populate the map and assign children on the go
HashMap<UndirectedGraphNode,UndirectedGraphNode> map=new HashMap<>();
boolean[] vis=new boolean[100000001];
dfs(node,vis,map);
return map.get(node);
}
}
|
[
"tanishqsaluja18@gmail.com"
] |
tanishqsaluja18@gmail.com
|
6613752d073605d7d8429b1eb4b0ce4bc750dddc
|
1cf61dcef49200ba4d96e25c1cfdd59c3ad981db
|
/app/src/main/java/pe/com/ricindigus/generadorinei/componentes/componente_ciiu/modelo/SQLCiiu.java
|
4cc8324c6d38ec5a3b3a901578b66a01bc130484
|
[] |
no_license
|
jucela/GeneradorINEIV2
|
7c088fcdcd5ca6c754000129a11cf3f56a45f0bf
|
72cda0f0c4e1c2720de1d9d5004855e2d25493a9
|
refs/heads/master
| 2020-03-22T20:49:33.796875
| 2018-06-06T20:36:24
| 2018-06-06T20:36:24
| 140,633,970
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,256
|
java
|
package pe.com.ricindigus.generadorinei.componentes.componente_ciiu.modelo;
/**
* Created by dmorales on 19/04/2018.
*/
public class SQLCiiu {
public static final String tablaPCiius = "pciius";
public static final String tablaSPCiius = "spciius";
//COLUMNAS CIIU
public static final String PCIIU_ID = "ID";
public static final String PCIIU_MODULO = "MODULO";
public static final String PCIIU_NUMERO = "NUMERO";
public static final String PCIIU_PREGUNTA = "PREGUNTA";
//COLUMNAS SUBPREGUNTAS CIIU
public static final String SPCIIU_ID = "ID";
public static final String SPCIIU_ID_PREGUNTA = "ID_PREGUNTA";
public static final String SPCIIU_SUBPREGUNTA = "SUBPREGUNTA";
public static final String SPCIIU_VARACT = "VARACT";
public static final String SPCIIU_VARCIIU = "VARCIIU";
public static final String SPCIIU_VARCK = "VARCK";
public static final String SQL_CREATE_TABLA_CIIU =
"CREATE TABLE " + tablaPCiius + "(" +
PCIIU_ID + " TEXT PRIMARY KEY," +
PCIIU_MODULO + " TEXT," +
PCIIU_NUMERO + " TEXT," +
PCIIU_PREGUNTA + " TEXT" + ");"
;
public static final String SQL_CREATE_TABLA_SPCIIU =
"CREATE TABLE " + tablaSPCiius + "(" +
SPCIIU_ID + " TEXT PRIMARY KEY," +
SPCIIU_ID_PREGUNTA + " TEXT," +
SPCIIU_SUBPREGUNTA + " TEXT," +
SPCIIU_VARACT + " TEXT," +
SPCIIU_VARCIIU + " TEXT," +
SPCIIU_VARCK + " TEXT" + ");"
;
public static final String SQL_DELETE_CIIU = "DROP TABLE " + tablaPCiius;
public static final String SQL_DELETE_SPCIIU = "DROP TABLE " + tablaSPCiius;
//WHERE
public static final String WHERE_CLAUSE_ID = "ID=?";
public static final String WHERE_CLAUSE_ID_PREGUNTA = "ID_PREGUNTA=?";
public static final String[] ALL_COLUMNS_CIIU = {
PCIIU_ID, PCIIU_MODULO, PCIIU_NUMERO, PCIIU_PREGUNTA
};
public static final String[] ALL_COLUMNS_SPCIIU = {
SPCIIU_ID , SPCIIU_ID_PREGUNTA , SPCIIU_SUBPREGUNTA ,
SPCIIU_VARACT , SPCIIU_VARCIIU , SPCIIU_VARCK
};
}
|
[
"ricindigus@gmail.com"
] |
ricindigus@gmail.com
|
e590669c446fb44153c5fa9eb14825ad1744091d
|
e0ce65ca68416abe67d41f340e13d7d7dcec8e0f
|
/src/main/java/org/trypticon/luceneupgrader/lucene6/internal/lucene/store/TrackingDirectoryWrapper.java
|
c9a6ee16ef0ac798822d2f5df4f9de15a309f118
|
[
"Apache-2.0"
] |
permissive
|
arandomgal/lucene-one-stop-index-upgrader
|
943264c22e6cadfef13116f41766f7d5fb2d3a7c
|
4c8b35dcda9e57f0507de48d8519e9c31cb8efb6
|
refs/heads/main
| 2023-06-07T04:18:20.805332
| 2021-07-05T22:28:46
| 2021-07-05T22:28:46
| 383,277,257
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,436
|
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.trypticon.luceneupgrader.lucene6.internal.lucene.store;
import java.io.IOException;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public final class TrackingDirectoryWrapper extends FilterDirectory {
private final Set<String> createdFileNames = Collections.synchronizedSet(new HashSet<String>());
public TrackingDirectoryWrapper(Directory in) {
super(in);
}
@Override
public void deleteFile(String name) throws IOException {
in.deleteFile(name);
createdFileNames.remove(name);
}
@Override
public IndexOutput createOutput(String name, IOContext context) throws IOException {
IndexOutput output = in.createOutput(name, context);
createdFileNames.add(name);
return output;
}
@Override
public IndexOutput createTempOutput(String prefix, String suffix, IOContext context)
throws IOException {
IndexOutput tempOutput = in.createTempOutput(prefix, suffix, context);
createdFileNames.add(tempOutput.getName());
return tempOutput;
}
@Override
public void copyFrom(Directory from, String src, String dest, IOContext context) throws IOException {
in.copyFrom(from, src, dest, context);
createdFileNames.add(dest);
}
@Override
public void rename(String source, String dest) throws IOException {
in.rename(source, dest);
synchronized (createdFileNames) {
createdFileNames.add(dest);
createdFileNames.remove(source);
}
}
public Set<String> getCreatedFiles() {
return new HashSet<>(createdFileNames);
}
public void clearCreatedFiles() {
createdFileNames.clear();
}
}
|
[
"ying.andrews@gmail.com"
] |
ying.andrews@gmail.com
|
85757d3b6ab31ade0cd617205f0adbae1b14bc18
|
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
|
/corpus/class/sling/647.java
|
3d5432680d84b8de769671a6402483e3b7feb73b
|
[
"MIT"
] |
permissive
|
masud-technope/ACER-Replication-Package-ASE2017
|
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
|
cb7318a729eb1403004d451a164c851af2d81f7a
|
refs/heads/master
| 2021-06-21T02:19:43.602864
| 2021-02-13T20:44:09
| 2021-02-13T20:44:09
| 187,748,164
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,738
|
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.sling.query.iterator;
import java.util.Iterator;
import java.util.ListIterator;
import org.apache.sling.query.api.Predicate;
import org.apache.sling.query.api.internal.TreeProvider;
import org.apache.sling.query.util.IteratorUtils;
import org.apache.sling.query.util.LazyList;
public class SiblingsIterator<T> extends AbstractIterator<T> {
private final Predicate<T> until;
private final ListIterator<T> siblings;
private final Type type;
private final TreeProvider<T> provider;
private boolean finished;
public SiblingsIterator(Predicate<T> until, T resource, Type type, TreeProvider<T> provider) {
this.provider = provider;
this.until = until;
this.siblings = getRewindedIterator(resource, type);
this.finished = false;
this.type = type;
}
@Override
protected T getElement() {
if (finished) {
return null;
}
while (type.canAdvance(siblings)) {
T resource = type.advance(siblings);
if (until != null && until.accepts(resource)) {
finished = true;
return null;
}
if (until == null) {
finished = true;
}
return resource;
}
return null;
}
private ListIterator<T> getRewindedIterator(T resource, Type type) {
String resourceName = provider.getName(resource);
T parent = provider.getParent(resource);
Iterator<T> iterator;
if (parent == null) {
iterator = IteratorUtils.singleElementIterator(resource);
} else {
iterator = provider.listChildren(parent);
}
ListIterator<T> listIterator = new LazyList<T>(iterator).listIterator();
while (listIterator.hasNext()) {
T sibling = listIterator.next();
if (provider.getName(sibling).equals(resourceName)) {
break;
}
}
if (type == Type.PREV) {
listIterator.previous();
}
return listIterator;
}
public enum Type implements {
NEXT() {
@Override
public boolean canAdvance(ListIterator<?> iterator) {
return iterator.hasNext();
}
@Override
public <T> T advance(ListIterator<T> iterator) {
return iterator.next();
}
}
, PREV() {
@Override
public boolean canAdvance(ListIterator<?> iterator) {
return iterator.hasPrevious();
}
@Override
public <T> T advance(ListIterator<T> iterator) {
return iterator.previous();
}
}
;
public abstract boolean canAdvance(ListIterator<?> iterator);
public abstract <T> T advance(ListIterator<T> iterator);
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
814e05fb4eede190a238fa865f20ab253579566e
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/3/org/apache/commons/math3/ode/events/EventState_reinitializeBegin_167.java
|
7dab2637ef007259d1efb490ab2e5aae8d72002e
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
org apach common math3 od event
handl state link event handler eventhandl
event handler integr step
time integr propos step event handler
switch function check handl state
handler integr step refer
state end preced step inform
decid handler trigger event
propos step
version
event state eventst
reiniti begin step
param interpol valid current step
except max count exceed except maxcountexceededexcept interpol
number function evalu exceed
reiniti begin reinitializebegin step interpol stepinterpol interpol
max count exceed except maxcountexceededexcept
interpol previou time getprevioustim
interpol set interpol time setinterpolatedtim
handler complet state getcompletest interpol
excerpt math issu
od solver setup event handler eventhandl stop
trigger integr stop
expect behavior user restart
solver state reach event
configur expect event trigger
time integr fail start stuck
previou event bug math fairli
gener event occur start step
extrem rare interv start
sign slightli step begin forc ignor
epsilon fast math fastmath max solver absolut accuraci getabsoluteaccuraci
fast math fastmath ab solver rel accuraci getrelativeaccuraci
start tstart epsilon
interpol set interpol time setinterpolatedtim start tstart
handler start tstart complet state getcompletest interpol
posit g0posit
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
40692b83cb277148fb095f4d920d16aa50d94c59
|
4004e5d493e6672426d6fb490e1e4dba8b451025
|
/src/main/java/io/lettuce/core/models/role/RedisInstance.java
|
ca2f09f9984d2ad6e242f81c498db0dee77303db
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
omer-cilingir/lettuce-core
|
d02b83fe7a9d98e7c1e6fcdd93fcae81a3aed7c7
|
a1476caecd86438b0853a38049668433c4375cc2
|
refs/heads/main
| 2022-12-20T05:25:45.746200
| 2020-10-06T13:26:06
| 2020-10-06T13:26:06
| 301,725,989
| 1
| 0
|
Apache-2.0
| 2020-10-06T12:54:26
| 2020-10-06T12:54:25
| null |
UTF-8
|
Java
| false
| false
| 2,075
|
java
|
/*
* Copyright 2011-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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.lettuce.core.models.role;
/**
* Represents a redis instance according to the {@code ROLE} output.
*
* @author Mark Paluch
* @since 3.0
*/
public interface RedisInstance {
/**
*
* @return Redis instance role, see {@link io.lettuce.core.models.role.RedisInstance.Role}
*/
Role getRole();
/**
* Possible Redis instance roles.
*/
enum Role {
@Deprecated
MASTER {
@Override
public boolean isUpstream() {
return true;
}
},
@Deprecated
SLAVE {
@Override
public boolean isReplica() {
return true;
}
},
UPSTREAM {
@Override
public boolean isUpstream() {
return true;
}
},
REPLICA {
@Override
public boolean isReplica() {
return true;
}
},
SENTINEL;
/**
* @return {@code true} if the role indicates that the role is a replication source.
* @since 6.0
*/
public boolean isUpstream() {
return false;
}
/**
* @return {@code true} if the role indicates that the role is a replicated node (replica).
* @since 6.0
*/
public boolean isReplica() {
return false;
}
}
}
|
[
"mpaluch@paluch.biz"
] |
mpaluch@paluch.biz
|
705b7c9c4fdb6760f4479587e144fd5776ba9670
|
dbf23f95f1a93f9954472a3e2ea86015d3f02a6f
|
/src/SOLID/DependencyInversion/Raw/IDatabaseHandler.java
|
487631043e58f64ad2af3d9080e2077f94d135d0
|
[] |
no_license
|
DevShivansh/Design-Pattern
|
2dac04100ee0eb7bffd96340248a6b270f0f8bde
|
f140dad33a41f7fea6bd5aba182273c659b96a20
|
refs/heads/master
| 2022-02-15T20:22:12.838771
| 2019-07-30T22:54:24
| 2019-07-30T22:54:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 128
|
java
|
package SOLID.DependencyInversion.Raw;
interface IDatabaseHandler {
public void connect();
public void disconnect();
}
|
[
"nikhil.agrwl07@gmail.com"
] |
nikhil.agrwl07@gmail.com
|
fb6ca6230fa39700badd4439b544b1739b0bea7d
|
11f003a542e33df5338c45362cbec561403d30b2
|
/src/main/java/sb/app/camel/routes/HealthPlanRoutes.java
|
8711b80f024103a1755c93ca7b442ebde4117199
|
[] |
no_license
|
espre05/starter-sboot-camel
|
f46b19d120210c4f33d5fd96d1a1df5b3c66d4d1
|
dbe4ee5425ea3d5776e9cf8d050ad0714010b9b8
|
refs/heads/master
| 2021-05-07T20:05:52.550133
| 2018-02-18T00:53:30
| 2018-02-18T00:53:30
| 108,941,210
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 431
|
java
|
package sb.app.camel.routes;
import org.apache.camel.builder.RouteBuilder;
import sb.app.beans.StringTransformer;
public class HealthPlanRoutes extends RouteBuilder {
@Override
public void configure() throws Exception {
from("direct:firstRoute")
.routeId("process-householdHealth")
.log("Camel body: ${body}") //for reach 3 secs?
.to("stream:out"); //send to system out
}
}
|
[
"espre05@gmail.com"
] |
espre05@gmail.com
|
1b2f3bde76d6e4a868c879356713d6494d2dbfa6
|
ed156cef30009c47189efa11aab952289b421929
|
/jdbcfxdeneme/src/com/hacidoganilbars/dao/FilmlerDao.java
|
717613662e77ba2c7b7ee6c79b5b4425d64d2e66
|
[] |
no_license
|
hacidoganilbars/javaFX
|
0eeb30ac6e8513c539f0535493442636f8741a2c
|
778a75d7d883c09dc3033cac1aff39e930b5b926
|
refs/heads/master
| 2020-03-08T23:23:37.521091
| 2018-04-06T19:45:58
| 2018-04-06T19:45:58
| 128,462,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,156
|
java
|
package com.hacidoganilbars.dao;
import com.hacidoganilbars.entity.Filmler;
import java.sql.*;
import java.util.ArrayList;
public class FilmlerDao {
public ArrayList<Filmler> butunFilmleriGetir(){
ArrayList<Filmler> filmler=new ArrayList<Filmler>();
try {
Class.forName("com.mysql.jdbc.Driver");
try {
Connection conn= DriverManager.getConnection("jdbc:mysql://localhost/sinema","root","8124782.Aa");
String SQL="SELECT * FROM film";
Statement statement=conn.createStatement();
ResultSet resultSet= statement.executeQuery(SQL);
Filmler film=null;
while(resultSet.next()){
film=new Filmler(resultSet.getInt("id"),resultSet.getString("isim"),resultSet.getInt("sene"));
filmler.add(film);
}
} catch (SQLException e) {
e.printStackTrace();
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return filmler;
}
}
|
[
"hd.ilbars@hotmail.com"
] |
hd.ilbars@hotmail.com
|
6ff23acffdafa88f01dce93aaa035824ef28a947
|
6ea0ae09f56d1490e81010b86f30912a707e9146
|
/platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleBuilder.java
|
24d37f64903527df7eac4848da85a77de4f067f3
|
[
"Apache-2.0"
] |
permissive
|
bwrsandman/intellij-community
|
b576d9a3926098a9cb962c78d90c28b3ad530a4c
|
d915b2ea003cb46bc82f37d38ec9cc64d2f4cdf1
|
refs/heads/master
| 2021-01-18T01:04:48.968077
| 2014-02-17T14:07:14
| 2014-02-17T14:07:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,479
|
java
|
package com.intellij.execution.console;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.lang.Language;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Conditions;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
public class LanguageConsoleBuilder {
private final LanguageConsoleImpl myConsole;
private LanguageConsoleView myConsoleView;
private Condition<LanguageConsoleImpl> myExecutionEnabled = Conditions.alwaysTrue();
@Nullable
private GutterContentProvider myGutterProvider;
public LanguageConsoleBuilder(@NotNull LanguageConsoleView consoleView) {
myConsole = consoleView.getConsole();
myConsoleView = consoleView;
}
public LanguageConsoleBuilder(@NotNull Project project, @NotNull Language language) {
myConsole = new LanguageConsoleImpl(project, language.getDisplayName() + " Console", language, false);
}
public LanguageConsoleBuilder processHandler(@NotNull ProcessHandler processHandler) {
myExecutionEnabled = new ProcessBackedExecutionEnabledCondition(processHandler);
return this;
}
public LanguageConsoleBuilder executionEnabled(@NotNull Condition<LanguageConsoleImpl> condition) {
myExecutionEnabled = condition;
return this;
}
public LanguageConsoleBuilder initActions(@NotNull BaseConsoleExecuteActionHandler executeActionHandler, @NotNull String historyType) {
ensureConsoleViewCreated();
ConsoleExecuteAction action = new ConsoleExecuteAction(myConsoleView, executeActionHandler, ConsoleExecuteAction.CONSOLE_EXECUTE_ACTION_ID, myExecutionEnabled);
action.registerCustomShortcutSet(action.getShortcutSet(), myConsole.getConsoleEditor().getComponent());
new ConsoleHistoryController(historyType, null, myConsole, executeActionHandler.getConsoleHistoryModel()).install();
return this;
}
public LanguageConsoleBuilder historyAnnotation(@Nullable GutterContentProvider provider) {
myGutterProvider = provider;
return this;
}
private void ensureConsoleViewCreated() {
if (myConsoleView == null) {
myConsoleView = new LanguageConsoleViewImpl(myConsole, true);
}
}
public LanguageConsoleView build() {
myConsole.setShowSeparatorLine(false);
myConsole.initComponents();
if (myGutterProvider != null) {
// todo consider to fix platform
myConsole.getConsoleEditor().getSettings().setAdditionalLinesCount(1);
EditorEx editor = myConsole.getHistoryViewer();
JScrollPane scrollPane = editor.getScrollPane();
JPanel panel = new JPanel(new BorderLayout());
panel.add(scrollPane.getViewport().getView(), BorderLayout.CENTER);
panel.add(new ConsoleGutterComponent(editor, myGutterProvider, myConsole), BorderLayout.LINE_END);
scrollPane.setViewportView(panel);
}
ensureConsoleViewCreated();
return myConsoleView;
}
public static class ProcessBackedExecutionEnabledCondition implements Condition<LanguageConsoleImpl> {
private final ProcessHandler myProcessHandler;
public ProcessBackedExecutionEnabledCondition(ProcessHandler myProcessHandler) {
this.myProcessHandler = myProcessHandler;
}
@Override
public boolean value(LanguageConsoleImpl console) {
return !myProcessHandler.isProcessTerminated();
}
}
}
|
[
"vladimir.krivosheev@jetbrains.com"
] |
vladimir.krivosheev@jetbrains.com
|
3f224a74d9d15ece36c304c6259b63194f652229
|
5f783378eb66481617346c3ea9aa8df20c683b0a
|
/src/main/java/com/netsuite/suitetalk/proxy/v2018_1/transactions/purchases/VendorPaymentApplyList.java
|
5a5f986a3a720bd5fa19f35c61c509a8bdf3da69
|
[] |
no_license
|
djXplosivo/suitetalk-axis-proxy
|
b9bd506bcb43e4254439baf3a46c7ef688c7e57f
|
0ffba614f117962f9de2867a0677ec8494a2605a
|
refs/heads/master
| 2020-03-28T02:49:27.612364
| 2018-09-06T02:36:05
| 2018-09-06T02:36:05
| 147,599,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,285
|
java
|
package com.netsuite.suitetalk.proxy.v2018_1.transactions.purchases;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.Arrays;
import javax.xml.namespace.QName;
import org.apache.axis.description.AttributeDesc;
import org.apache.axis.description.ElementDesc;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.Serializer;
import org.apache.axis.encoding.ser.BeanDeserializer;
import org.apache.axis.encoding.ser.BeanSerializer;
public class VendorPaymentApplyList implements Serializable {
private VendorPaymentApply[] apply;
private boolean replaceAll;
private Object __equalsCalc = null;
private boolean __hashCodeCalc = false;
private static TypeDesc typeDesc = new TypeDesc(VendorPaymentApplyList.class, true);
public VendorPaymentApplyList() {
super();
}
public VendorPaymentApplyList(VendorPaymentApply[] apply, boolean replaceAll) {
super();
this.apply = apply;
this.replaceAll = replaceAll;
}
public VendorPaymentApply[] getApply() {
return this.apply;
}
public void setApply(VendorPaymentApply[] apply) {
this.apply = apply;
}
public VendorPaymentApply getApply(int i) {
return this.apply[i];
}
public void setApply(int i, VendorPaymentApply _value) {
this.apply[i] = _value;
}
public boolean isReplaceAll() {
return this.replaceAll;
}
public void setReplaceAll(boolean replaceAll) {
this.replaceAll = replaceAll;
}
public synchronized boolean equals(Object obj) {
if (!(obj instanceof VendorPaymentApplyList)) {
return false;
} else {
VendorPaymentApplyList other = (VendorPaymentApplyList)obj;
if (obj == null) {
return false;
} else if (this == obj) {
return true;
} else if (this.__equalsCalc != null) {
return this.__equalsCalc == obj;
} else {
this.__equalsCalc = obj;
boolean _equals = (this.apply == null && other.getApply() == null || this.apply != null && Arrays.equals(this.apply, other.getApply())) && this.replaceAll == other.isReplaceAll();
this.__equalsCalc = null;
return _equals;
}
}
}
public synchronized int hashCode() {
if (this.__hashCodeCalc) {
return 0;
} else {
this.__hashCodeCalc = true;
int _hashCode = 1;
if (this.getApply() != null) {
for(int i = 0; i < Array.getLength(this.getApply()); ++i) {
Object obj = Array.get(this.getApply(), i);
if (obj != null && !obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
_hashCode += (this.isReplaceAll() ? Boolean.TRUE : Boolean.FALSE).hashCode();
this.__hashCodeCalc = false;
return _hashCode;
}
}
public static TypeDesc getTypeDesc() {
return typeDesc;
}
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
return new BeanSerializer(_javaType, _xmlType, typeDesc);
}
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
return new BeanDeserializer(_javaType, _xmlType, typeDesc);
}
static {
typeDesc.setXmlType(new QName("urn:purchases_2018_1.transactions.webservices.netsuite.com", "VendorPaymentApplyList"));
AttributeDesc attrField = new AttributeDesc();
attrField.setFieldName("replaceAll");
attrField.setXmlName(new QName("", "replaceAll"));
attrField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
typeDesc.addFieldDesc(attrField);
ElementDesc elemField = new ElementDesc();
elemField.setFieldName("apply");
elemField.setXmlName(new QName("urn:purchases_2018_1.transactions.webservices.netsuite.com", "apply"));
elemField.setXmlType(new QName("urn:purchases_2018_1.transactions.webservices.netsuite.com", "VendorPaymentApply"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setMaxOccursUnbounded(true);
typeDesc.addFieldDesc(elemField);
}
}
|
[
"ccolon@git.eandjmedia.com"
] |
ccolon@git.eandjmedia.com
|
ecf1e6f7f60bda27cea157eec59a7b31d45721ec
|
5f7149583cbe2e556b8bd4677f3654ed810b2c03
|
/gen/net/masterthought/dlanguage/psi/impl/DLanguageRelOperatorImpl.java
|
3958f9ef6db1ed7cf4dee40ea61561a04c594bfa
|
[] |
no_license
|
FrankLIKE/DLanguage
|
73426dc1d845e7eb65e2dc8aa7728f3aa7eaa293
|
9e8dda435e5b8d07c422bd30b330e535cbcdf1ae
|
refs/heads/master
| 2021-01-22T03:08:30.845571
| 2014-12-17T20:52:54
| 2014-12-17T20:52:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 2,162
|
java
|
// This is a generated file. Not intended for manual editing.
package net.masterthought.dlanguage.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static net.masterthought.dlanguage.psi.DLanguageTypes.*;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import net.masterthought.dlanguage.psi.*;
public class DLanguageRelOperatorImpl extends ASTWrapperPsiElement implements DLanguageRelOperator {
public DLanguageRelOperatorImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof DLanguageVisitor) ((DLanguageVisitor)visitor).visitRelOperator(this);
else super.accept(visitor);
}
@Override
@Nullable
public PsiElement getGreater() {
return findChildByType(GREATER);
}
@Override
@Nullable
public PsiElement getGreaterEqual() {
return findChildByType(GREATEREQUAL);
}
@Override
@Nullable
public PsiElement getLess() {
return findChildByType(LESS);
}
@Override
@Nullable
public PsiElement getLessEqual() {
return findChildByType(LESSEQUAL);
}
@Override
@Nullable
public PsiElement getLessEqualGreater() {
return findChildByType(LESSEQUALGREATER);
}
@Override
@Nullable
public PsiElement getLessOrGreater() {
return findChildByType(LESSORGREATER);
}
@Override
@Nullable
public PsiElement getNotGreater() {
return findChildByType(NOTGREATER);
}
@Override
@Nullable
public PsiElement getNotGreaterEqual() {
return findChildByType(NOTGREATEREQUAL);
}
@Override
@Nullable
public PsiElement getNotLess() {
return findChildByType(NOTLESS);
}
@Override
@Nullable
public PsiElement getNotLessEqual() {
return findChildByType(NOTLESSEQUAL);
}
@Override
@Nullable
public PsiElement getNotLessEqualGreater() {
return findChildByType(NOTLESSEQUALGREATER);
}
@Override
@Nullable
public PsiElement getUnordered() {
return findChildByType(UNORDERED);
}
}
|
[
"kingsleyhendrickse@me.com"
] |
kingsleyhendrickse@me.com
|
1102a3a68602a9bab3f66f160e2a37c0f6ebe910
|
15b9398ae5452f2009f51081aa85c93b4326b67a
|
/ReinforcementLearning/src/main/java/vahy/api/model/observation/AbstractObservationAggregator.java
|
cfa95853a761f783012cb286b7731e76c17c9882
|
[] |
no_license
|
xschneid/MasterThesis
|
3340110fde6fa980559a02d52a36310a42720b71
|
ba96d4163126313161bfca009a568476aac93f2d
|
refs/heads/master
| 2021-03-13T12:22:31.403876
| 2021-01-11T00:40:00
| 2021-01-11T00:40:00
| 246,680,933
| 0
| 0
| null | 2020-03-19T15:35:11
| 2020-03-11T21:12:06
| null |
UTF-8
|
Java
| false
| false
| 1,163
|
java
|
package vahy.api.model.observation;
import vahy.api.model.Action;
import java.util.Queue;
public abstract class AbstractObservationAggregator<
TAction extends Action<TAction>,
TObservation extends Observation,
TObservationAggregation extends ObservationAggregation>
implements ObservationAggregator<TAction, TObservation, TObservationAggregation> {
private final int aggregationQueueSize;
protected AbstractObservationAggregator(int aggregationQueueSize) {
this.aggregationQueueSize = aggregationQueueSize;
}
protected <T> boolean isQueueFull(Queue<T> queue) {
if(queue.size() > aggregationQueueSize) {
throw new IllegalStateException("Queue size [{" + queue.size() + "}] should not exceed aggregationQueueSize [{" + aggregationQueueSize + "}]");
}
return queue.size() == aggregationQueueSize;
}
protected <T> void reduceQueueSize(Queue<T> queue) {
if(queue.size() > aggregationQueueSize) {
while(queue.size() != aggregationQueueSize) {
queue.remove();
}
}
}
public abstract boolean isAggregationReady();
}
|
[
"snurkabill@gmail.com"
] |
snurkabill@gmail.com
|
286cd5b52b9bf71275cc83cccf3bfa00c7d07617
|
1ffcbf3ed7d1d4f8d435916756abd6e5ed329f64
|
/src/main/java/com/topie/common/tools/captcha/renderer/AbstractTextRenderer.java
|
120563791dc4f762e0c56d3df798fcf6a1bfd292
|
[] |
no_license
|
topie/animal-disease
|
17324d04281d77acd87c7595fe1e7649c5a2e296
|
7523292e1b3618d87d48dedaf731c9a36ced060c
|
refs/heads/master
| 2022-09-17T20:55:48.225141
| 2020-03-23T10:21:00
| 2020-03-23T10:21:00
| 81,817,110
| 1
| 1
| null | 2022-09-01T22:25:04
| 2017-02-13T11:18:45
|
FreeMarker
|
UTF-8
|
Java
| false
| false
| 3,808
|
java
|
/*
* Copyright (c) 2009 Piotr Piastucki
*
* This file is part of Patchca CAPTCHA library.
*
* Patchca is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Patchca is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Patchca. If not, see <http://www.gnu.org/licenses/>.
*/
package com.topie.common.tools.captcha.renderer;
import com.topie.common.tools.captcha.color.ColorFactory;
import com.topie.common.tools.captcha.font.FontFactory;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
public abstract class AbstractTextRenderer implements TextRenderer {
protected int leftMargin;
protected int rightMargin;
protected int topMargin;
protected int bottomMargin;
protected abstract void arrangeCharacters(int width, int height, TextString ts);
public AbstractTextRenderer() {
leftMargin = rightMargin = 5;
topMargin = bottomMargin = 5;
}
@Override
public void setLeftMargin(int leftMargin) {
this.leftMargin = leftMargin;
}
@Override
public void setRightMargin(int rightMargin) {
this.rightMargin = rightMargin;
}
@Override
public void setTopMargin(int topMargin) {
this.topMargin = topMargin;
}
@Override
public void setBottomMargin(int bottomMargin) {
this.bottomMargin = bottomMargin;
}
@Override
public void draw(String text, BufferedImage canvas, FontFactory fontFactory, ColorFactory colorFactory) {
Graphics2D g = (Graphics2D) canvas.getGraphics();
TextString ts = convertToCharacters(text, g, fontFactory, colorFactory);
arrangeCharacters(canvas.getWidth(), canvas.getHeight(), ts);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
for (TextCharacter tc : ts.getCharacters()) {
g.setColor(tc.getColor());
g.drawString(tc.iterator(), (float) tc.getX(), (float) tc.getY());
}
}
protected TextString convertToCharacters(String text, Graphics2D g, FontFactory fontFactory, ColorFactory colorFactory) {
TextString characters = new TextString();
FontRenderContext frc = g.getFontRenderContext();
double lastx = 0;
for (int i = 0; i < text.length(); i++) {
Font font = fontFactory.getFont(i);
char c = text.charAt(i);
FontMetrics fm = g.getFontMetrics(font);
Rectangle2D bounds = font.getStringBounds(String.valueOf(c), frc);
TextCharacter tc = new TextCharacter();
tc.setCharacter(c);
tc.setFont(font);
tc.setWidth(fm.charWidth(c));
tc.setHeight(fm.getAscent() + fm.getDescent());
tc.setAscent(fm.getAscent());
tc.setDescent(fm.getDescent());
tc.setX(lastx);
tc.setY(0);
tc.setFont(font);
tc.setColor(colorFactory.getColor(i));
lastx += bounds.getWidth();
characters.addCharacter(tc);
}
return characters;
}
}
|
[
"597160667@qq.com"
] |
597160667@qq.com
|
30d248f3f7e7c42c261951388f2fa5511e6f5b2c
|
2feda664019e45d01aed28adfe52e405b9fce431
|
/src/com/leetcode_cn/medium/BulbSwitcher.java
|
43773e0fa527529ebd5e43a01f6385d2fd4985dd
|
[] |
no_license
|
Folgerjun/leetcode-cn
|
0b8c7c86cfbdbcb9b738c4e6ef67f7fe42bcb398
|
bb46ac96417969d48000f7628e810893648cf9b4
|
refs/heads/master
| 2021-06-05T04:20:54.295001
| 2020-06-12T02:51:49
| 2020-06-12T02:51:49
| 142,521,732
| 11
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,236
|
java
|
package com.leetcode_cn.medium;
/*******************灯泡开关******************/
/**
* 初始时有 n 个灯泡关闭。 第 1 轮,你打开所有的灯泡。 第 2 轮,每两个灯泡你关闭一次。 第 3
* 轮,每三个灯泡切换一次开关(如果关闭则开启,如果开启则关闭)。第 i 轮,每 i 个灯泡切换一次开关。 对于第 n 轮,你只切换最后一个灯泡的开关。 找出
* n 轮后有多少个亮着的灯泡。
*
* 示例:
*
* 输入: 3 输出: 1
*
* 解释:
*
* 初始时, 灯泡状态 [关闭, 关闭, 关闭].
*
* 第一轮后, 灯泡状态 [开启, 开启, 开启].
*
* 第二轮后, 灯泡状态 [开启, 关闭, 开启].
*
* 第三轮后, 灯泡状态 [开启, 关闭, 关闭].
*
* 你应该返回 1,因为只有一个灯泡还亮着。
*
* @author ffj
*
*/
public class BulbSwitcher {
public static void main(String[] args) {
System.out.println(new BulbSwitcher().bulbSwitch(5));
}
/**
* 详细解析
* :https://leetcode.com/problems/bulb-switcher/discuss/77112/Share-my-o(1)-solution-with-explanation
*
* @param n
* @return
*/
public int bulbSwitch(int n) {
return (int) Math.sqrt(n); // 算术平方根
}
}
|
[
"ffj0721@163.com"
] |
ffj0721@163.com
|
4579473502d8842367e13d65a70cc44b284e8748
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Camel/555_1.java
|
2a112366e2bee59a08b54fe10529743348cce8e7
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 350
|
java
|
//,temp,sample_7413.java,2,10,temp,sample_7417.java,2,10
//,3
public class xxx {
public static InputStream resolveResourceAsInputStream(ClassResolver classResolver, String uri) throws IOException {
if (uri.startsWith("file:")) {
uri = ObjectHelper.after(uri, "file:");
uri = tryDecodeUri(uri);
log.info("loading resource from file system");
}
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
83aae891d664a84cf6d71356e159b8775aafdff3
|
28fd09b1c4e21f425239f959c02eaccf01d934d9
|
/lib-core/src/main/java/com/gzq/lib_core/base/GlobalConfig.java
|
6ada79167f455ec79d942b48a45f10fde08fd481
|
[
"Apache-2.0"
] |
permissive
|
guozhiqiang123/AndroidCore
|
28fa1a6778fcbeda2d20e0b1cebf93ca129b12f8
|
6da52c2a56408322ceba67d22a3ee36fa3475741
|
refs/heads/master
| 2020-04-13T18:55:05.683097
| 2019-04-17T14:13:29
| 2019-04-17T14:13:29
| 163,388,232
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,002
|
java
|
package com.gzq.lib_core.base;
import android.text.TextUtils;
import com.gzq.lib_core.base.config.CrashManagerConfig;
import com.gzq.lib_core.base.config.GsonConfig;
import com.gzq.lib_core.base.config.OkhttpConfig;
import com.gzq.lib_core.base.config.RetrofitConfig;
import com.gzq.lib_core.base.config.RoomDatabaseConfig;
import com.gzq.lib_core.base.config.SessionManagerConfig;
import com.gzq.lib_core.http.cache.CacheMode;
import me.jessyan.autosize.unit.Subunits;
public final class GlobalConfig {
private String baseUrl;
private boolean canMock;
private String roomName;
private int designWidth;
private int designHeight;
private boolean isSupportDP;
private boolean isSupportSP;
private Subunits subunits;
/**
* 默认Room进行网络缓存
*/
private boolean isRoomCache;
private String cacheMode;
private int cacheSecond;
private GsonConfig gsonConfig;
private OkhttpConfig okhttpConfig;
private RetrofitConfig retrofitConfig;
private RoomDatabaseConfig roomDatabaseConfig;
private SessionManagerConfig sessionManagerConfig;
private CrashManagerConfig crashManagerConfig;
public String getBaseUrl() {
return baseUrl;
}
public boolean isCanMock() {
return canMock;
}
public String getRoomName() {
return roomName;
}
public int getDesignWidth() {
return designWidth;
}
public int getDesignHeight() {
return designHeight;
}
public boolean isSupportDP() {
return isSupportDP;
}
public boolean isSupportSP() {
return isSupportSP;
}
public Subunits getSubunits() {
return subunits;
}
public boolean isRoomCache() {
return isRoomCache;
}
public String getCacheMode() {
return cacheMode;
}
public int getGlobalCacheSecond() {
return cacheSecond;
}
public GsonConfig getGsonConfig() {
return gsonConfig;
}
public OkhttpConfig getOkhttpConfig() {
return okhttpConfig;
}
public RetrofitConfig getRetrofitConfig() {
return retrofitConfig;
}
public RoomDatabaseConfig getRoomDatabaseConfig() {
return roomDatabaseConfig;
}
public SessionManagerConfig getSessionManagerConfig() {
return sessionManagerConfig;
}
public CrashManagerConfig getCrashManagerConfig() {
return crashManagerConfig;
}
public GlobalConfig(Builder builder) {
this.baseUrl = builder.baseUrl;
this.canMock = builder.canMock;
this.roomName = builder.roomName;
this.designWidth = builder.designWidth;
this.designHeight = builder.designHeight;
this.isSupportSP = builder.isSupportSP;
this.isSupportDP = builder.isSupportDP;
this.subunits = builder.subunits;
this.isRoomCache = builder.isRoomCache;
this.cacheMode = builder.cacheMode;
this.cacheSecond = builder.cacheSecond;
this.gsonConfig = builder.gsonConfig;
this.okhttpConfig = builder.okhttpConfig;
this.retrofitConfig = builder.retrofitConfig;
this.roomDatabaseConfig = builder.roomDatabaseConfig;
this.sessionManagerConfig = builder.sessionManagerConfig;
this.crashManagerConfig = builder.crashManagerConfig;
}
public static Builder builder() {
return new Builder();
}
public static final class Builder {
private String baseUrl;
private boolean canMock;
private String roomName;
private int designWidth;
private int designHeight;
private boolean isSupportDP;
private boolean isSupportSP;
private Subunits subunits;
private boolean isRoomCache;
private String cacheMode = CacheMode.NO_CACHE;
private int cacheSecond = -1;
private GsonConfig gsonConfig;
private OkhttpConfig okhttpConfig;
private RetrofitConfig retrofitConfig;
private RoomDatabaseConfig roomDatabaseConfig;
private SessionManagerConfig sessionManagerConfig;
private CrashManagerConfig crashManagerConfig;
private Builder() {
}
public Builder baseurl(String baseUrl) {//基础url
if (TextUtils.isEmpty(baseUrl)) {
throw new IllegalArgumentException("BaseUrl can not be empty");
}
this.baseUrl = baseUrl;
return this;
}
public Builder canMock(boolean canMock) {
this.canMock = canMock;
return this;
}
public Builder roomName(String roomName) {
if (TextUtils.isEmpty(roomName)) {
throw new IllegalArgumentException("RoomDatabase name can not be empty");
}
this.roomName = roomName;
return this;
}
public Builder designWidth(int width) {
this.designWidth = width;
return this;
}
public Builder designHeight(int height) {
this.designHeight = height;
return this;
}
public Builder autoSize(boolean isSupportSP, boolean isSupportDP, Subunits subunits) {
this.isSupportSP = isSupportSP;
this.isSupportDP = isSupportDP;
this.subunits = subunits;
return this;
}
public Builder roomCache(boolean isRoomCache, String cacheMode, int cacheSecond) {
this.cacheSecond = cacheSecond;
if (isRoomCache) {
this.isRoomCache = true;
this.cacheMode = cacheMode;
} else {
this.isRoomCache = false;
this.cacheMode = CacheMode.DEFAULT;
}
return this;
}
public Builder gsonConfiguration(GsonConfig gsonConfiguration) {
this.gsonConfig = gsonConfiguration;
return this;
}
public Builder okhttpConfiguration(OkhttpConfig okhttpConfiguration) {
this.okhttpConfig = okhttpConfiguration;
return this;
}
public Builder retrofitConfiguration(RetrofitConfig retrofitConfiguration) {
this.retrofitConfig = retrofitConfiguration;
return this;
}
public Builder roomDatabaseConfiguration(RoomDatabaseConfig roomDatabaseConfiguration) {
this.roomDatabaseConfig = roomDatabaseConfiguration;
return this;
}
public Builder sessionManagerConfiguration(SessionManagerConfig sessionManagerConfiguration) {
this.sessionManagerConfig = sessionManagerConfiguration;
return this;
}
public Builder crashManagerConfiguration(CrashManagerConfig crashManagerConfiguration) {
this.crashManagerConfig = crashManagerConfiguration;
return this;
}
GlobalConfig build() {
return new GlobalConfig(this);
}
}
}
|
[
"774550196@qq.com"
] |
774550196@qq.com
|
beb7424025e445d41b6b30a748b16d092d509d21
|
fe0b6d0d4c14965808a4b38aa91d0c5cef1f69f6
|
/languages/elevator/org.tetrabox.example.xelevator.scenario/src/org/tetrabox/example/xelevator/scenario/xelevatorscenario/XElevatorProperty/impl/ButtonContainerPropertyImpl.java
|
be1f55ac4aa497e982a58d8ae19e30a3bb0b5a95
|
[] |
no_license
|
tetrabox/examples-behavioral-interface
|
f05b9bf1d3a8414ffc5eef3560f72f3719e09f28
|
3a5df4b8ec4ed13a39712269487f07d09479ec99
|
refs/heads/master
| 2020-12-02T16:23:03.869890
| 2019-10-22T08:59:20
| 2019-10-22T08:59:20
| 96,529,344
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,509
|
java
|
/**
*/
package org.tetrabox.example.xelevator.scenario.xelevatorscenario.XElevatorProperty.impl;
import fr.inria.diverse.event.commons.model.property.ContainerReferenceProperty;
import fr.inria.diverse.event.commons.model.property.PropertyPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.tetrabox.example.xelevator.elevator.Button;
import org.tetrabox.example.xelevator.elevator.Floor;
import org.tetrabox.example.xelevator.scenario.xelevatorscenario.XElevatorProperty.ButtonContainerProperty;
import org.tetrabox.example.xelevator.scenario.xelevatorscenario.XElevatorProperty.FloorProperty;
import org.tetrabox.example.xelevator.scenario.xelevatorscenario.XElevatorProperty.XElevatorPropertyPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Button Container Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.tetrabox.example.xelevator.scenario.xelevatorscenario.XElevatorProperty.impl.ButtonContainerPropertyImpl#getProperty <em>Property</em>}</li>
* </ul>
*
* @generated
*/
public class ButtonContainerPropertyImpl extends ButtonPropertyImpl<Button> implements ButtonContainerProperty {
/**
* The cached value of the '{@link #getProperty() <em>Property</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperty()
* @generated
* @ordered
*/
protected FloorProperty<Floor> property;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ButtonContainerPropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return XElevatorPropertyPackage.Literals.BUTTON_CONTAINER_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FloorProperty<Floor> getProperty() {
return property;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetProperty(FloorProperty<Floor> newProperty, NotificationChain msgs) {
FloorProperty<Floor> oldProperty = property;
property = newProperty;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY, oldProperty, newProperty);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setProperty(FloorProperty<Floor> newProperty) {
if (newProperty != property) {
NotificationChain msgs = null;
if (property != null)
msgs = ((InternalEObject)property).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY, null, msgs);
if (newProperty != null)
msgs = ((InternalEObject)newProperty).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY, null, msgs);
msgs = basicSetProperty(newProperty, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY, newProperty, newProperty));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EStructuralFeature getFeature() {
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY:
return basicSetProperty(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY:
return getProperty();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY:
setProperty((FloorProperty<Floor>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY:
setProperty((FloorProperty<Floor>)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY:
return property != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == ContainerReferenceProperty.class) {
switch (derivedFeatureID) {
case XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY: return PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY;
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == ContainerReferenceProperty.class) {
switch (baseFeatureID) {
case PropertyPackage.CONTAINER_REFERENCE_PROPERTY__PROPERTY: return XElevatorPropertyPackage.BUTTON_CONTAINER_PROPERTY__PROPERTY;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //ButtonContainerPropertyImpl
|
[
"dorian.leroy@irisa.fr"
] |
dorian.leroy@irisa.fr
|
0da377981436c8efba03084f6e5413a4a52295d6
|
d5ac2cecdffc617a59591b16c9ae3156b0a31275
|
/org.carewebframework.web.test/src/test/java/org/carewebframework/web/test/CWFTest.java
|
f561de8ce5ba8bb8aed781434e47732e7b280d30
|
[
"LicenseRef-scancode-fujion-exception-to-apache-2.0",
"Apache-2.0"
] |
permissive
|
taylordeatri/carewebframework-web
|
07bd0405c13c5b6e4479c495d1dc84b4cca0ffcd
|
baac0332053a0ceb62e5b06b9cc5ba66db989ab6
|
refs/heads/master
| 2020-12-03T00:29:17.267381
| 2017-06-30T19:59:00
| 2017-06-30T19:59:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,378
|
java
|
package org.carewebframework.web.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import java.util.List;
import org.carewebframework.web.annotation.ComponentDefinition;
import org.carewebframework.web.client.ExecutionContext;
import org.carewebframework.web.component.BaseComponent;
import org.carewebframework.web.component.Page;
import org.carewebframework.web.component.Treenode;
import org.carewebframework.web.component.Treeview;
import org.carewebframework.web.page.PageDefinition;
import org.carewebframework.web.page.PageElement;
import org.carewebframework.web.page.PageUtil;
import org.junit.Test;
public class CWFTest extends MockTest {
private PageDefinition getPageDefinition(String file) {
String path = "file://" + ExecutionContext.getSession().getServletContext().getRealPath(file);
return PageUtil.getPageDefinition(path);
}
private List<BaseComponent> createPage(String file, BaseComponent parent) {
PageDefinition pagedef = getPageDefinition(file);
return PageUtil.createPage(pagedef, parent);
}
@Test
public void testParser() {
PageDefinition pagedef = getPageDefinition("test.cwf");
PageElement pgele = pagedef.getRootElement().getChildren().iterator().next();
Page page = ExecutionContext.getPage();
ComponentDefinition cmpdef = pgele.getDefinition();
assertEquals("page", cmpdef.getTag());
assertEquals(Page.class, cmpdef.getComponentClass());
assertEquals("page", pgele.getAttributes().get("name"));
List<BaseComponent> roots = PageUtil.createPage(pagedef, page, null);
assertEquals(1, roots.size());
BaseComponent root = roots.get(0);
assertSame(page, root);
assertEquals("page", page.getName());
assertEquals("The Page Title", page.getTitle());
}
private final String[] nodes = { "1.1", "2.1", "3.1", "2.2", "1.2", "1.3", "2.1", "3.1", "2.2" };
@Test
public void testTreeview() {
Treeview tv = (Treeview) createPage("treeview.cwf", null).get(0);
// Test the node iterator
int index = 0;
for (Treenode node : tv) {
assertEquals(nodes[index++], node.getLabel());
}
assertEquals(nodes.length, index);
}
}
|
[
"dkmartin@regenstrief.org"
] |
dkmartin@regenstrief.org
|
01b073ee3056b9bd6a745a28362aaa6e42b93afd
|
3144772be9d90dfc72346b6dec053730c804273d
|
/src/main/java/sul/protocol/bedrock160/types/Overload.java
|
e2ebe61f8555e0566a18f87d1f25c3ba90bcb209
|
[
"MIT"
] |
permissive
|
sel-utils/java
|
be42f04044674afd77808ae324515358995ba854
|
9b9cc88dfc6e871ceb7eddb3d7c6585756fe1e07
|
refs/heads/master
| 2021-01-23T05:57:03.737951
| 2018-02-05T12:12:02
| 2018-02-05T12:12:02
| 86,325,412
| 3
| 1
| null | 2017-06-14T20:36:36
| 2017-03-27T11:06:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
/*
* This file was automatically generated by sel-utils and
* released under the MIT License.
*
* License: https://github.com/sel-project/sel-utils/blob/master/LICENSE
* Repository: https://github.com/sel-project/sel-utils
* Generated from https://github.com/sel-project/sel-utils/blob/master/xml/protocol/bedrock160.xml
*/
package sul.protocol.bedrock160.types;
import java.util.Arrays;
import sul.utils.*;
public class Overload extends Stream {
public sul.protocol.bedrock160.types.Parameter[] parameters = new sul.protocol.bedrock160.types.Parameter[0];
public Overload() {}
public Overload(sul.protocol.bedrock160.types.Parameter[] parameters) {
this.parameters = parameters;
}
@Override
public int length() {
int length=Buffer.varuintLength(parameters.length); for(sul.protocol.bedrock160.types.Parameter cfy1dvc:parameters){ length+=cfy1dvc.length(); } return length;
}
@Override
public byte[] encode() {
this._buffer = new byte[this.length()];
this.writeVaruint((int)parameters.length); for(sul.protocol.bedrock160.types.Parameter cfy1dvc:parameters){ this.writeBytes(cfy1dvc.encode()); }
return this.getBuffer();
}
@Override
public void decode(byte[] buffer) {
this._buffer = buffer;
int bbcfzrcm=this.readVaruint(); parameters=new sul.protocol.bedrock160.types.Parameter[bbcfzrcm]; for(int cfy1dvc=0;cfy1dvc<parameters.length;cfy1dvc++){ parameters[cfy1dvc]=new sul.protocol.bedrock160.types.Parameter(); parameters[cfy1dvc]._index=this._index; parameters[cfy1dvc].decode(this._buffer); this._index=parameters[cfy1dvc]._index; }
}
@Override
public String toString() {
return "Overload(parameters: " + Arrays.deepToString(this.parameters) + ")";
}
}
|
[
"selutils@mail.com"
] |
selutils@mail.com
|
a57fd92be3e1c9cea8011c4932966795ee9ed760
|
55fd75151de7e7afb7118fe3cc0d49dff329645e
|
/src/minecraft/net/minecraft/client/renderer/entity/RenderBoat.java
|
9e07e854b67d6abf95d14628a4196500baea5813
|
[] |
no_license
|
DraconisIra/MFBridge
|
ded956980905328a2d728c8f8f083e10d6638706
|
fa77fe09f2872b7feae52fb814e1920c98d10e91
|
refs/heads/master
| 2021-01-23T04:49:08.935654
| 2017-01-30T04:39:40
| 2017-01-30T04:39:40
| 80,393,957
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,877
|
java
|
package net.minecraft.client.renderer.entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBoat;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RenderBoat extends Render
{
private static final ResourceLocation boatTextures = new ResourceLocation("textures/entity/boat.png");
/** instance of ModelBoat for rendering */
protected ModelBase modelBoat;
public RenderBoat()
{
this.shadowSize = 0.5F;
this.modelBoat = new ModelBoat();
}
/**
* The render method used in RenderBoat that renders the boat model.
*/
public void renderBoat(EntityBoat par1EntityBoat, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F);
float f2 = (float)par1EntityBoat.getTimeSinceHit() - par9;
float f3 = par1EntityBoat.getDamageTaken() - par9;
if (f3 < 0.0F)
{
f3 = 0.0F;
}
if (f2 > 0.0F)
{
GL11.glRotatef(MathHelper.sin(f2) * f2 * f3 / 10.0F * (float)par1EntityBoat.getForwardDirection(), 1.0F, 0.0F, 0.0F);
}
float f4 = 0.75F;
GL11.glScalef(f4, f4, f4);
GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4);
this.bindEntityTexture(par1EntityBoat);
GL11.glScalef(-1.0F, -1.0F, 1.0F);
this.modelBoat.render(par1EntityBoat, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
protected ResourceLocation getBoatTextures(EntityBoat par1EntityBoat)
{
return boatTextures;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return this.getBoatTextures((EntityBoat)par1Entity);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
this.renderBoat((EntityBoat)par1Entity, par2, par4, par6, par8, par9);
}
}
|
[
"mikal_500@yahoo.com.au"
] |
mikal_500@yahoo.com.au
|
75e19c799ed60c4e6f0236394daf5d1504d06b89
|
add66f062ba1143c97335233e346bcc33d901d98
|
/src/day26_ForEach/WarmUp.java
|
58e776636b9848df19061cc66dfb1e8e59e04d11
|
[] |
no_license
|
hakanorak21/Summer2019JavaPractice
|
e42a6fbfe81abf87bd0581ad0a4d323415f4ec1b
|
319a959f891ff870de1e1e718b0521deb22c2753
|
refs/heads/master
| 2020-07-22T10:57:49.812355
| 2020-05-25T18:46:51
| 2020-05-25T18:46:51
| 207,175,176
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,999
|
java
|
package day26_ForEach;
import java.util.Arrays;
import java.util.TreeSet;
public class WarmUp {
/**
Write a program that can check if two Strings are build out of same letters
Ex:
if str1 = "aabbbc"; str2 ="cab";
output: true
if str1 ="abcd"; str2 ="abc";
output: false
*/
public static void main(String[] args) {
// First, with string methods
String a = "aabbbcdd";
String b = "cabbbccaa";
// Removing duplicates of String a
String a1 = "";
for (int j = 0; j < a.length(); j++) {
//for (int i = 0; i < a.length(); i++) {
if(!a1.contains(a.substring(j, j+1))) {
a1 += a.substring(j, j+1);
// }
}
}
System.out.println(a1);
// Removing duplicates of String b
String b1 = "";
for (int j = 0; j < b.length(); j++) {
//for (int i = 0; i < b.length(); i++) {
if(!b1.contains(b.substring(j, j+1))) {
b1 += b.substring(j, j+1);
//}
}
}
System.out.println(b1);
System.out.println();
// Comparing a1 and b1
// "abcd" "cab"
char[] ch1 = a1.toCharArray();
System.out.println(Arrays.toString(ch1));
char[] ch2 = b1.toCharArray();
System.out.println(Arrays.toString(ch2));
System.out.println();
Arrays.sort(ch1);
Arrays.sort(ch2);
//System.out.println("=========================");
System.out.println(Arrays.toString(ch1));
System.out.println(Arrays.toString(ch2));
System.out.println();
String str1 = Arrays.toString(ch1);
String str2 = Arrays.toString(ch2);
if (str1.equals(str2))
System.out.println(true);
else
System.out.println(false);
System.out.println();
// Short solution with methods
String Str1 = "aabbbcdd";
String Str2 = "cabbbccaa";
Str1 = new TreeSet<String>(Arrays.asList(Str1.split(""))).toString();
Str2 = new TreeSet<String>(Arrays.asList(Str2.split(""))).toString();
System.out.println(Str1.equals(Str2));
}
}
|
[
"hakanorak21@yahoo.com"
] |
hakanorak21@yahoo.com
|
bcc6610f63947acc9b4c9553fc8e906ced2e50c5
|
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
|
/app-meipai/src/main/java/e/c/d/j/k.java
|
d95cfdd256df9951b3d0373ca26f27b2750b0827
|
[] |
no_license
|
cvdnn/PanoramaApp
|
86f8cf36d285af08ba15fb32348423af7f0b7465
|
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
|
refs/heads/master
| 2023-03-03T11:15:40.350476
| 2021-01-29T09:14:06
| 2021-01-29T09:14:06
| 332,968,433
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 448
|
java
|
package e.c.d.j;
import e.c.d.d.f.b.Notifier;
import e.c.d.f.d.d;
import e.c.d.m.b.q0;
/* compiled from: lambda */
public final /* synthetic */ class k implements Notifier {
/* renamed from: a reason: collision with root package name */
private final /* synthetic */ d f6290a;
public /* synthetic */ k(d dVar) {
this.f6290a = dVar;
}
public final void a(Object obj) {
q0.a(q0.this, this.f6290a, 0);
}
}
|
[
"cvvdnn@gmail.com"
] |
cvvdnn@gmail.com
|
236acbfb8b013a848065ba1b90da5c7141e8356e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_f4316eea0206d598059be7a7e91d7a4624e5f926/NButton/31_f4316eea0206d598059be7a7e91d7a4624e5f926_NButton_t.java
|
caa4315c00a6b246b790d55a96cd36a25071c35e
|
[] |
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,092
|
java
|
package nodebox.client;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
/**
* A custom button that uses an icon and shadowed text.
*/
public class NButton extends JComponent implements MouseListener {
public static final int BUTTON_HEIGHT = 21;
public static final int IMAGE_TEXT_MARGIN = 3;
public static final int TEXT_BASELINE = 14;
public static Image checkOn, checkOff;
static {
try {
checkOn = ImageIO.read(new File("res/check-on.png"));
checkOff = ImageIO.read(new File("res/check-off.png"));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public static enum Mode {
PUSH, CHECK
}
private String text;
private Image normalImage, checkedImage;
private Object actionObject;
private Method actionMethod;
private Mode mode;
private boolean armed = false;
private boolean pressed = false;
private boolean checked = false;
/**
* Create a push button.
*
* @param text the button label
* @param imageFile the button image
*/
public NButton(String text, String imageFile) {
this(Mode.PUSH, text, imageFile, null);
}
public NButton(String text, Image image) {
init(Mode.PUSH, text, image, null);
}
/**
* Create a check button.
*
* @param text the button label
* @param normalImage the image to show when unchecked
* @param checkedImage the image to show when checked
*/
public NButton(String text, String normalImage, String checkedImage) {
this(Mode.CHECK, text, normalImage, checkedImage);
}
public NButton(Mode mode, String text) {
if (mode != Mode.CHECK)
throw new AssertionError("Only use Mode.CHECK.");
init(mode, text, checkOff, checkOn);
}
private NButton(Mode mode, String text, String normalImage, String checkedImage) {
Image normal, checked = null;
try {
normal = ImageIO.read(new File(normalImage));
if (checkedImage != null)
checked = ImageIO.read(new File(checkedImage));
} catch (IOException e) {
throw new IllegalArgumentException("Cannot load image.", e);
}
init(mode, text, normal, checked);
}
private void init(Mode mode, String text, Image normalImage, Image checkedImage) {
this.mode = mode;
this.text = text;
this.normalImage = normalImage;
this.checkedImage = checkedImage;
int width = measureWidth();
Dimension d = new Dimension(width, BUTTON_HEIGHT);
setSize(d);
setPreferredSize(d);
setMinimumSize(d);
setMaximumSize(d);
addMouseListener(this);
}
private int measureWidth() {
// To measure text we need a graphics context. Create an image and use its' graphics context.
BufferedImage tmp = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = tmp.createGraphics();
int width = normalImage.getWidth(null);
width += IMAGE_TEXT_MARGIN;
width += (int) g2.getFontMetrics().stringWidth(text);
width += 1; // Anti-aliasing can take up an extra pixel.
return width;
}
/**
* Set the method that will be called when the button is pressed.
*
* @param obj the instance
* @param methodName the name of the method on the instance. The method should not take any arguments.
*/
public void setActionMethod(Object obj, String methodName) {
actionObject = obj;
try {
actionMethod = obj.getClass().getMethod(methodName);
} catch (NullPointerException e) {
throw new IllegalArgumentException("Ojbect or method name cannot be null.");
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException("Cannot find method " + methodName + " on object " + actionObject);
}
}
public Mode getMode() {
return mode;
}
public boolean isChecked() {
return checked;
}
public void setChecked(boolean v) {
if (v == checked) return;
checked = v;
repaint();
}
@Override
protected void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
if (checked) {
g2.drawImage(checkedImage, 0, 0, null);
} else {
g2.drawImage(normalImage, 0, 0, null);
}
int w = normalImage.getWidth(null);
g2.setFont(Theme.SMALL_BOLD_FONT);
if (armed) {
g2.setColor(Theme.TEXT_ARMED_COLOR);
} else {
g2.setColor(Theme.TEXT_NORMAL_COLOR);
}
SwingUtils.drawShadowText(g2, text, w + IMAGE_TEXT_MARGIN, TEXT_BASELINE);
}
public void mouseClicked(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {
pressed = true;
armed = true;
repaint();
}
public void mouseReleased(MouseEvent e) {
pressed = false;
if (armed) {
armed = false;
if (mode == Mode.CHECK)
checked = !checked;
try {
actionMethod.invoke(actionObject);
} catch (Exception e1) {
throw new RuntimeException("Could not invoke method " + actionMethod + " on object " + actionObject);
}
repaint();
}
}
public void mouseEntered(MouseEvent e) {
if (pressed) {
armed = true;
repaint();
}
}
public void mouseExited(MouseEvent e) {
armed = false;
repaint();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4825d07f8074397c297d6778e053cf7ec5161782
|
1b6ecad3272337928f5819bfc8683eeee1f19d89
|
/tags/ehcache-core-2.4.1/src/main/java/net/sf/ehcache/search/expression/ComparableValue.java
|
833ad3f2e9c590e300a6225a8d877d57e5a7a195
|
[] |
no_license
|
MatthewRBruce/ehcache
|
77540643da5ca20b6fd5638221f4410a1baefe02
|
4365fc6cc87516344e95688c368d6a3d2cebbe5a
|
refs/heads/master
| 2020-12-27T18:55:00.785157
| 2015-01-21T07:11:38
| 2015-01-21T07:11:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,641
|
java
|
/**
* Copyright 2003-2010 Terracotta, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.sf.ehcache.search.expression;
import java.util.Comparator;
import java.util.Map;
import net.sf.ehcache.Element;
import net.sf.ehcache.search.SearchException;
import net.sf.ehcache.search.attribute.AttributeExtractor;
import net.sf.ehcache.search.attribute.AttributeType;
/**
* Abstract base class for criteria involving {@link java.lang.Comparable} values
*
* @author teck
*/
public abstract class ComparableValue extends BaseCriteria {
private static final Comparator<String> LUCENE_STRING_COMPARATOR = new LuceneCaseAgnosticStringComparator();
private final String attributeName;
private final AttributeType type;
/**
* Constructor
*
* @param attributeName attribute name
* @param value comparable value (used to infer type)
*/
public ComparableValue(String attributeName, Object value) {
this(attributeName, AttributeType.typeFor(attributeName, value));
}
/**
* Constructor
*
* @param attributeName attribute name
* @param type the expeceted type for values evaluated by this criteria
*/
public ComparableValue(String attributeName, AttributeType type) {
this.attributeName = attributeName;
this.type = type;
if (!this.type.isComparable()) {
throw new SearchException("Illegal (non-comparable) type for comparsion (" + type + ")");
}
}
/**
* Attribute name.
*
* @return name
*/
public String getAttributeName() {
return attributeName;
}
/**
* Attribute type.
*
* @return type
*/
public AttributeType getType() {
return type;
}
/**
* {@inheritDoc}
*/
public boolean execute(Element e, Map<String, AttributeExtractor> attributeExtractors) {
Object attrValue = attributeExtractors.get(getAttributeName()).attributeFor(e);
if (attrValue == null) {
return false;
} else {
AttributeType attrType = AttributeType.typeFor(getAttributeName(), attrValue);
if (!getType().equals(attrType)) {
throw new SearchException("Expecting attribute of type " + getType().name() + " but was " + attrType.name());
}
if (getType().equals(AttributeType.STRING)) {
return executeComparableString((Comparable) attrValue);
} else {
return executeComparable((Comparable) attrValue);
}
}
}
/**
* Execute this criteria for the given {@link Comparable} attribute value
*
* @param attributeValue Comparable attribute value
* @return true if criteria is met
*/
protected abstract boolean executeComparable(Comparable attributeValue);
/**
* Execute this criteria for the given {@link Comparable} strin type attribute value
*
* @param attributeValue Comparable attribute value
* @return true if criteria is met
*/
protected abstract boolean executeComparableString(Comparable attributeValue);
/**
* Perform a Lucene compatible case insensitive string comparison.
*
* @param s1 first string
* @param s2 second string
* @return the comparison result
*/
protected static int luceneStringCompare(String s1, String s2) {
return LUCENE_STRING_COMPARATOR.compare(s1, s2);
}
/**
* A Lucene compatible case insensitive string comparator.
*/
private static class LuceneCaseAgnosticStringComparator implements Comparator<String> {
public int compare(String s1, String s2) {
int n1 = s1.length();
int n2 = s2.length();
for (int i = 0; i < n1 && i < n2; i++) {
char c1 = s1.charAt(i);
char c2 = s2.charAt(i);
if (c1 != c2) {
c1 = Character.toLowerCase(c1);
c2 = Character.toLowerCase(c2);
if (c1 != c2) { return c1 - c2; }
}
}
return n1 - n2;
}
}
}
|
[
"hhuynh@b9324663-ca0f-0410-8574-be9b3887307d"
] |
hhuynh@b9324663-ca0f-0410-8574-be9b3887307d
|
5ebe9714c4ec62787d0219b6129552e36f31acc8
|
fcdebb4236c35d0b1ac0b2b178983261282877bd
|
/Superuser/src/com/koushikdutta/superuser/util/SoftReferenceHashTable.java
|
090a15edf42707a689877d4954087fc6b5e034fb
|
[
"Apache-2.0"
] |
permissive
|
frknkrc44/Superuser
|
a6cd91a49023a365a1d684e36697881c00682165
|
f91751436f926285e10bd0cf6c187fc3b9549153
|
refs/heads/master
| 2022-11-10T04:04:11.519440
| 2020-06-23T23:46:37
| 2020-06-24T00:08:56
| 274,500,672
| 3
| 0
|
NOASSERTION
| 2020-06-23T20:18:32
| 2020-06-23T20:18:31
| null |
UTF-8
|
Java
| false
| false
| 1,441
|
java
|
/*
* Copyright (C) 2013 Koushik Dutta (@koush)
*
* 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.koushikdutta.superuser.util;
import java.lang.ref.SoftReference;
import java.util.Hashtable;
public class SoftReferenceHashTable<K,V> {
Hashtable<K, SoftReference<V>> mTable = new Hashtable<K, SoftReference<V>>();
public V put(K key, V value) {
SoftReference<V> old = mTable.put(key, new SoftReference<V>(value));
if (old == null)
return null;
return old.get();
}
public V get(K key) {
SoftReference<V> val = mTable.get(key);
if (val == null)
return null;
V ret = val.get();
if (ret == null)
mTable.remove(key);
return ret;
}
public V remove(K k) {
SoftReference<V> v = mTable.remove(k);
if (v == null)
return null;
return v.get();
}
}
|
[
"koushd@gmail.com"
] |
koushd@gmail.com
|
c68843e9e25eaae6f7ba3f5543d34e32227f7b0e
|
c18d1250daaaf5a98390afe2774dd50d29f1b9f1
|
/src/com/xj/bean/CommentsStatistics.java
|
b7205e55f75cd332c08e09eb31c1aac6ad157f55
|
[] |
no_license
|
kakahezuile/manageweb
|
42ba89a7915edd85d55894cef5e1fc8eee92f75e
|
3674ca13f8cf32fa510eec65206f64efec37fb52
|
refs/heads/master
| 2022-12-23T23:29:57.373832
| 2019-08-26T16:32:40
| 2019-08-26T16:32:40
| 201,966,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package com.xj.bean;
public class CommentsStatistics {
private Integer badComments;
private Integer commentsNum;
private Integer shopId;
private Integer complaintsNum;
private String shopName;
private String score;
public Integer getBadComments() {
return badComments;
}
public void setBadComments(Integer badComments) {
this.badComments = badComments;
}
public Integer getCommentsNum() {
return commentsNum;
}
public void setCommentsNum(Integer commentsNum) {
this.commentsNum = commentsNum;
}
public Integer getShopId() {
return shopId;
}
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
public Integer getComplaintsNum() {
return complaintsNum;
}
public void setComplaintsNum(Integer complaintsNum) {
this.complaintsNum = complaintsNum;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
}
|
[
"SFSF"
] |
SFSF
|
4a361dc9cc49a7580dae693d35e61c4685ee5f2e
|
a45fd0840d238002a254068d8463a75fd905de09
|
/servlet stuff/bookstore/src/com/bookstore/controller/web/LogoutController.java
|
83e562526e8f749fe6411f79622f5db7218df97c
|
[] |
no_license
|
rgupta00/servlet-jsp-ymsli
|
60319ae32850e2d5d9b38aa6f23930d234d7030c
|
b539a409a38003648fffc94b1ab912a62ae2cc5c
|
refs/heads/master
| 2023-02-28T19:10:07.714321
| 2021-02-08T10:18:37
| 2021-02-08T10:18:37
| 335,473,290
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 775
|
java
|
package com.bookstore.controller.web;
import java.io.IOException;
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 javax.servlet.http.HttpSession;
@WebServlet("/LogoutController")
public class LogoutController extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession httpSession=request.getSession(false);
if(httpSession!=null) {
httpSession.invalidate();
}
response.sendRedirect("login.jsp?message=logout successfully!");
}
}
|
[
"rgupta.mtech@gmail.com"
] |
rgupta.mtech@gmail.com
|
ff2ecd8c5cfe7e1ba76aef296886bf0feb026991
|
eae6fb036cb14222207903f48e8329e1eae1cf94
|
/Core/src/main/java/prompto/store/IStorable.java
|
0b39ddee5b1988eeb1ec240433fb502505842e2c
|
[] |
no_license
|
balqeesawawde/prompto-java
|
0cd765d3d3a7e2d530efef6208037b2e0c5e018f
|
9991ed6c3f47050ad882d87bee0840fbe8754976
|
refs/heads/master
| 2023-03-13T06:37:53.919759
| 2021-03-06T16:49:15
| 2021-03-06T16:49:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 698
|
java
|
package prompto.store;
import java.util.function.Consumer;
import java.util.function.Supplier;
import prompto.error.PromptoError;
public interface IStorable {
void setDbId(Object dbId);
Object getOrCreateDbId();
void clear();
boolean isDirty();
void setCategories(String[] categories) throws PromptoError;
String[] getCategories();
void setData(String name, Object value) throws PromptoError;
@FunctionalInterface
public static interface IDbIdProvider extends Supplier<Object> {}
@FunctionalInterface
public static interface IDbIdListener extends Consumer<Object> {}
public static interface IDbIdFactory extends IDbIdProvider, IDbIdListener {
boolean isUpdate();
}
}
|
[
"eric.vergnaud@wanadoo.fr"
] |
eric.vergnaud@wanadoo.fr
|
127dbba42893b66af3427c9052f8f8b29b01ebe9
|
b9b6c15155a17703d7add9b9badcbeb5f9f61aae
|
/COBieToolkit/src/org/erdc/cobie/toolkit/CobieToolkitSettings.java
|
336fe3296fd3b5cc47477224b2ce9d399926125d
|
[] |
no_license
|
webdada/COBie-plugins
|
abf0a091d7a6ac59a7af86cbbd1d75f974049b82
|
4dc4b75f9026f47887258eeb67117188e3654668
|
refs/heads/master
| 2020-12-29T00:29:18.828171
| 2015-04-23T08:43:18
| 2015-04-23T08:43:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,750
|
java
|
package org.erdc.cobie.toolkit;
/******************************************************************************
* Copyright (C) 2009-2012 BIMserver.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class CobieToolkitSettings {
private boolean autoConnect;
private String address;
private int port;
private String username;
private String password;
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean isAutoConnect() {
return autoConnect;
}
public void setAutoConnect(boolean autoConnect) {
this.autoConnect = autoConnect;
}
}
|
[
"chrisbogen@gmail.com"
] |
chrisbogen@gmail.com
|
9398d30b162823213b96753d810fb2f9cc778146
|
6925337bc74e9f80527859651b9771cf33bc7d99
|
/input/code-fracz-645/sources/Class00000253Better.java
|
b68a8ab4375d098b2beb43b9acc681bf5c0b9d06
|
[] |
no_license
|
fracz/code-quality-tensorflow
|
a58bb043aa0a6438d7813b0398d12c998d70ab49
|
50dac5459faf44f1b7fa8321692a8c7c44f0d23c
|
refs/heads/master
| 2018-11-14T15:28:03.838106
| 2018-09-07T11:09:28
| 2018-09-07T11:09:28
| 110,887,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 294
|
java
|
// original filename: 00019505.txt
// after
public class Class00000253Better {
@Override
public BaseKeyframeAnimation<?, PointF> createAnimation() {
if (!hasAnimation()) {
return new StaticKeyframeAnimation<>(initialPoint);
}
return new PathKeyframeAnimation(keyframes);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
5b313a3989873defdc47c987464905b3594ca6d9
|
2f5431aa126774936d18a4bd7cf5bb9cf0eb0856
|
/demos/src/main/java/com/guigarage/demos/itunes/ui/ImageTableCell.java
|
9c13601ad73d658f2334ef8ca602d85f47a805c7
|
[] |
no_license
|
omatei01/javafx-collection
|
5d9313294993be09dee917333f882d9d1a59fb13
|
124fd5672653d41bad91b0d2f68288f5f39a15c0
|
refs/heads/master
| 2021-01-23T09:35:32.452053
| 2015-07-09T08:55:58
| 2015-07-09T08:55:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,125
|
java
|
package com.guigarage.demos.itunes.ui;
import com.guigarage.demos.itunes.data.Album;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.scene.control.TableCell;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;import java.lang.Exception;import java.lang.Override;import java.lang.String;
public class ImageTableCell extends TableCell<Album, String> {
public ImageTableCell() {
final ImageView view = new ImageView();
setGraphic(view);
setPadding(Insets.EMPTY);
view.fitWidthProperty().bind(widthProperty());
view.setPreserveRatio(true);
view.setSmooth(true);
itemProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observableValue,
String oldValue, String newValue) {
try {
if (newValue != null) {
view.setImage(new Image(newValue, true));
} else {
view.setImage(null);
}
} catch (Exception e) {
view.setImage(null);
e.printStackTrace();
}
}
});
}
}
|
[
"hendrik.ebbers@web.de"
] |
hendrik.ebbers@web.de
|
45cde0862a809b29f5abfc2e3f91a16614aa0ced
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/byp/b/b$a.java
|
e3b13c16e2f970c1e414cffa9c0ec8de0932a2fb
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 453
|
java
|
package com.tencent.mm.plugin.byp.b;
import kotlin.Metadata;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/byp/cgi/CgiBypSendEmoij$Companion;", "", "()V", "TAG", "", "isDebug", "", "()Z", "plugin-byp_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class b$a {}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.plugin.byp.b.b.a
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
609c29c1628699eeee870dbec5e0d46ccbb15887
|
3b0463fcba499466005be7c31a4c47ff31fdd8f3
|
/app/src/main/java/com/hjy/sports/student/homemodule/corporeity/diet/fragment/HealthyFoodFragment.java
|
d5d182895d43bd0652b1eacd60133df842f9bd8b
|
[] |
no_license
|
ggzaigl1/SportsUnion
|
ff9369ee6d67c5cedbaed7f53cc6a486d14154a7
|
4648850e41585d5bc614e910d5af754fb0c8c30b
|
refs/heads/master
| 2020-04-23T13:49:23.698335
| 2019-02-18T03:54:02
| 2019-02-18T03:54:02
| 171,210,776
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,676
|
java
|
package com.hjy.sports.student.homemodule.corporeity.diet.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.fy.baselibrary.base.BaseFragment;
import com.fy.baselibrary.entity.NewHeathyFoodBean;
import com.fy.baselibrary.retrofit.NetCallBack;
import com.fy.baselibrary.retrofit.RxHelper;
import com.fy.baselibrary.utils.ConstantUtils;
import com.fy.baselibrary.utils.L;
import com.fy.baselibrary.utils.SpfUtils;
import com.hjy.sports.R;
import com.hjy.sports.student.homemodule.corporeity.diet.DietListActivity;
import com.hjy.sports.student.homemodule.corporeity.diet.adapter.NewHealthyFoodAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadmoreListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import butterknife.BindView;
/**
* 健康食材 Fragment
* Created by Stefan on 2018/1/25.
*/
public class HealthyFoodFragment extends BaseFragment {
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
@BindView(R.id.refreshLayout)
SmartRefreshLayout mRefreshLayout;
//HealthyFoodAdapter adapter;
NewHealthyFoodAdapter adapter;
private int diagnosticId;
private int mPageNo = 1;
private List<String> dummyData;
@Override
protected int getContentLayout() {
return R.layout.fragment_healthyfood;
}
@Override
protected void baseInit() {
super.baseInit();
initRefresh();
setDummyData();
DietListActivity activity = (DietListActivity) getActivity();
diagnosticId = activity.getDiagnosticId();
recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
//adapter=new HealthyFoodAdapter(getActivity(),new ArrayList<>());
adapter=new NewHealthyFoodAdapter(getActivity(),new ArrayList<>());
recyclerView.setAdapter(adapter);
}
private void getlistToApp(int pageNo) {
int id = SpfUtils.getSpfSaveInt("studentId");
Map<String, Object> param = new HashMap<>();
param.put("token", ConstantUtils.token);
param.put("studentid", id);
//param.put("diagnosticPrescriptionId", diagnosticId);
param.put("pageNo", pageNo);
param.put("pageSize", 10);
// param.put("type", 3);
mConnService.getlistToApp(param).compose(RxHelper.handleResult())
.doOnSubscribe(disposable -> mCompositeDisposable.add(disposable))
.subscribe(new NetCallBack<NewHeathyFoodBean>() {
@Override
protected void onSuccess(NewHeathyFoodBean healthyFoodBean) {
L.d("参数: ",param.toString());
if (healthyFoodBean != null) {
//当前页
mPageNo=healthyFoodBean.getPageNo();
adapter.setmDatas(healthyFoodBean.getRows());
adapter.notifyDataSetChanged();
if(mRefreshLayout!=null) {
mRefreshLayout.finishRefresh();
}
}
}
@Override
protected void updataLayout(int flag) {
}
});
// new NetRequest.Builder().create()
// .requestDate(mConnService.getHealthyFoodApp(param).compose(RxHelper.handleResult()),
// new NetCallBack<HealthyFoodBean>() {
// @Override
// protected void onSuccess(HealthyFoodBean healthyFoodBean) {
// L.d("参数: ",param.toString());
// if (healthyFoodBean != null) {
// //当前页
// mPageNo=healthyFoodBean.getPageNo();
// //adapter.setmDatas(healthyFoodBean.getRows());
// adapter.notifyDataSetChanged();
// if(mRefreshLayout!=null) {
// mRefreshLayout.finishRefresh();
// }
// }
// }
//
// @Override
// public void updataLayout(int flag) {
// if(mRefreshLayout!=null){
// mRefreshLayout.finishRefresh();
// }
// }
// });
}
private void initRefresh() {
mRefreshLayout.setOnRefreshLoadmoreListener(new OnRefreshLoadmoreListener() {
@Override
public void onRefresh(RefreshLayout refreshlayout) {
refreshlayout.finishRefresh();
getlistToApp(1);
}
@Override
public void onLoadmore(RefreshLayout refreshlayout) {
refreshlayout.finishLoadmore();
// mPageNo += 1;
// getlistToApp(mPageNo);
}
});
}
@Override
public void onResume() {
super.onResume();
getlistToApp(1);
}
private void setDummyData() {
dummyData = new ArrayList();
for (int i=0;i<5;i++){
dummyData.add("");
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
6e2b861a3c185748a85addd35058128ee753e45e
|
9757b9287eaac2478fd93c4a5ff1272250c54ab2
|
/org.schema/src/main/java/org/schema/IProductModel.java
|
5b4c462d3b82f2d6f14119e9a41d5520b288f4dd
|
[] |
no_license
|
schwichti/astro
|
2d24e0310967cde7b5b2d19f2abf4405288f07a9
|
ac550bf483579d78dc2cedba1d5b8fbf8f1cf22e
|
refs/heads/master
| 2021-05-05T15:15:39.769858
| 2018-11-26T20:28:21
| 2018-11-26T20:28:21
| 117,298,133
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package org.schema;
/**
* A datasheet or vendor specification of a product (in the sense of a prototypical description).
*/
public interface IProductModel extends IProduct{
/**
* A pointer from a newer variant of a product to its previous, often discontinued predecessor.
*
*/
public ProductModel getSuccessorOf() throws ClassCastException;
public void setSuccessorOf(ProductModel value) throws ClassCastException;
/**
* A pointer to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive.
*
*/
public ProductModel getIsVariantOf() throws ClassCastException;
public void setIsVariantOf(ProductModel value) throws ClassCastException;
/**
* A pointer from a previous, often discontinued variant of the product to its newer variant.
*
*/
public ProductModel getPredecessorOf() throws ClassCastException;
public void setPredecessorOf(ProductModel value) throws ClassCastException;
}
|
[
"schwicht@mail.upb.de"
] |
schwicht@mail.upb.de
|
10bcfe7e0ae2da87e274d757b14b38c8b6018d55
|
2cc67891e3229e0c366fee5db27616c141394c28
|
/src/main/java/gpms/dataModel/UserAccount.java
|
9df9601696ee62fab9dcd201497e47166282c20f
|
[] |
no_license
|
dianxiangxu/GPMS-NGAC
|
4dc8447b8abba07f5599fa205014a28bfad851c9
|
d16105bdb5e97de038b58e4734381287843a4ff1
|
refs/heads/master
| 2023-03-03T13:44:03.995341
| 2022-05-12T22:14:51
| 2022-05-12T22:14:51
| 173,990,511
| 2
| 2
| null | 2023-02-22T05:14:23
| 2019-03-05T17:25:38
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,511
|
java
|
package gpms.dataModel;
import gpms.dao.UserAccountDAO;
import gpms.utils.PasswordHash;
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.Date;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;
import org.mongodb.morphia.annotations.Property;
import org.mongodb.morphia.utils.IndexDirection;
@Entity(value = UserAccountDAO.COLLECTION_NAME, noClassnameStored = true)
public class UserAccount extends BaseEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Property("username")
@Indexed(value = IndexDirection.ASC, name = "userNameIndex", unique = true)
private String userName = new String();
@Property("password")
private String password = new String();
@Property("deleted")
private boolean deleted = false;
@Property("active")
private boolean active = false;
@Property("admin")
private boolean admin = false;
@Property("added on")
private Date addedOn = new Date();
public UserAccount() {
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
try {
this.password = PasswordHash.createHash(password);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeySpecException e) {
e.printStackTrace();
}
}
public boolean isDeleted() {
return deleted;
}
public void setDeleted(boolean deleted) {
this.deleted = deleted;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public boolean isAdmin() {
return admin;
}
public void setAdmin(boolean admin) {
this.admin = admin;
}
public Date getAddedOn() {
return addedOn;
}
public void setAddedOn(Date addedOn) {
this.addedOn = addedOn;
}
@Override
public String toString() {
return "UserAccount [userName=" + userName + ", password=" + password
+ ", deleted=" + deleted + ", active=" + active + ", admin="
+ admin + ", addedOn=" + addedOn + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (active ? 1231 : 1237);
result = prime * result + ((addedOn == null) ? 0 : addedOn.hashCode());
result = prime * result + (admin ? 1231 : 1237);
result = prime * result + (deleted ? 1231 : 1237);
result = prime * result
+ ((password == null) ? 0 : password.hashCode());
result = prime * result
+ ((userName == null) ? 0 : userName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
UserAccount other = (UserAccount) obj;
if (active != other.active)
return false;
if (addedOn == null) {
if (other.addedOn != null)
return false;
} else if (!addedOn.equals(other.addedOn))
return false;
if (admin != other.admin)
return false;
if (deleted != other.deleted)
return false;
if (password == null) {
if (other.password != null)
return false;
} else if (!password.equals(other.password))
return false;
if (userName == null) {
if (other.userName != null)
return false;
} else if (!userName.equals(other.userName))
return false;
return true;
}
}
|
[
"dubrovenski.v@gmail.com"
] |
dubrovenski.v@gmail.com
|
ed9c5498933080df2e0316ef659eb4179cd1e697
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/java-design-patterns/learning/5891/MongoBankTest.java
|
08aab24458f4825e707a5a86480200cf92ae1447
|
[] |
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
| 2,548
|
java
|
/**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.hexagonal.banking;
import com.iluwatar.hexagonal.mongo.MongoConnectionPropertiesLoader;
import com.mongodb.MongoClient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Tests for Mongo banking adapter
*/
@Disabled
class MongoBankTest {
private static final String TEST_DB = "lotteryDBTest";
private static final String TEST_ACCOUNTS_COLLECTION = "testAccounts";
private MongoBank mongoBank;
@BeforeEach
void init() {
MongoConnectionPropertiesLoader.load();
MongoClient mongoClient = new MongoClient(System.getProperty("mongo-host"),
Integer.parseInt(System.getProperty("mongo-port")));
mongoClient.dropDatabase(TEST_DB);
mongoClient.close();
mongoBank = new MongoBank(TEST_DB, TEST_ACCOUNTS_COLLECTION);
}
@Test
void testSetup() {
assertEquals(0, mongoBank.getAccountsCollection().count());
}
@Test
void testFundTransfers() {
assertEquals(0, mongoBank.getFunds("000-000"));
mongoBank.setFunds("000-000", 10);
assertEquals(10, mongoBank.getFunds("000-000"));
assertEquals(0, mongoBank.getFunds("111-111"));
mongoBank.transferFunds(9, "000-000", "111-111");
assertEquals(1, mongoBank.getFunds("000-000"));
assertEquals(9, mongoBank.getFunds("111-111"));
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
0fbfba0e50b2fe283e1af68327789bf70c4de0bf
|
3968ca1004311ac416b71056afa2ded1b14c0ae6
|
/btnguyen-eis/trunk/src/org/ddth/eis/controller/staff/SkillInventoryController.java
|
7397e7ff9de53fee6abe4dcdbd5d1ba665ed30f6
|
[] |
no_license
|
btnguyen2k/btnguyen2k-personal
|
bba1f758536761ac14fce33f4eab838d28026e0d
|
5f18afccdc0289a1f954d7bfac5ba6f683c5256d
|
refs/heads/master
| 2021-01-10T12:55:07.650077
| 2012-11-17T14:42:39
| 2012-11-17T14:42:39
| 36,510,741
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,128
|
java
|
package org.ddth.eis.controller.staff;
import java.util.Collection;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.ddth.daf.UserProfile;
import org.ddth.daf.UserProfile.Id;
import org.ddth.daf.utils.DafException;
import org.ddth.eis.EisConstants;
import org.ddth.eis.bo.skillinventory.SkillCategory;
import org.ddth.eis.bo.skillinventory.SkillDataManager;
import org.ddth.eis.bo.skillinventory.SkillInventory;
import org.ddth.eis.bo.skillinventory.SkillItem;
import org.ddth.eis.controller.BaseFormController;
import org.ddth.eis.controller.IRequireAuthenticationController;
import org.ddth.eis.controller.IRequireAuthorizationController;
import org.ddth.fileupload.SubmittedForm;
import org.ddth.fileupload.impl.SubmittedFormImpl;
import org.ddth.panda.daf.DafDataManager;
import org.ddth.panda.daf.DafUser;
import org.ddth.panda.daf.DafUserProfile;
public class SkillInventoryController extends BaseFormController implements
IRequireAuthenticationController, IRequireAuthorizationController {
private final static String FORM_NAME = "frmSkillInventory";
private final static String VIEW_NAME = EisConstants.MODULE_STAFF + "."
+ EisConstants.ACTION_STAFF_SKILL_INVENTORY;
private final static String MODEL_PAGE_SKILL_CATEGORIES = "skillCategories";
private final static String MODEL_PAGE_MY_SKILL_INVENTORIES = "mySkillInventories";
private final static String FORM_FIELD_SKILL_ITEM_LEVEL = "skillItem_level";
private final static String FORM_FIELD_SKILL_ITEM_NUM_MONTHS_EXP = "skillItem_numMonthsExp";
/**
* {@inheritDoc}
*/
@Override
protected String getFormSubmissionSuccessfulViewName() {
return VIEW_NAME;
}
/**
* {@inheritDoc}
*/
@Override
protected String getViewName() {
return VIEW_NAME;
}
/**
* {@inheritDoc}
*/
public SubmittedForm initAssociatedForm() {
SubmittedForm form = new SubmittedFormImpl(FORM_NAME);
form.setAction("");
return form;
}
/**
* {@inheritDoc}
*/
protected void modelPageContent(Map<String, Object> modelPage) {
super.modelPageContent(modelPage);
SkillDataManager sdm = getBean(EisConstants.BEAN_BO_SKILL_MANAGER, SkillDataManager.class);
Collection<? extends SkillCategory> skillCategories = sdm.getAllSkillCategories();
modelPage.put(MODEL_PAGE_SKILL_CATEGORIES, skillCategories);
DafUser user = getCurrentUser();
Collection<? extends SkillInventory> mySkillInventories = sdm.getSkillInventories(user);
modelPage.put(MODEL_PAGE_MY_SKILL_INVENTORIES, mySkillInventories);
}
/**
* {@inheritDoc}
*/
public void populateSubmittedForm(SubmittedForm form, HttpServletRequest request) {
SkillDataManager sdm = getBean(EisConstants.BEAN_BO_SKILL_MANAGER, SkillDataManager.class);
Collection<? extends SkillCategory> skillCategories = sdm.getAllSkillCategories();
for ( SkillCategory skillCategory : skillCategories ) {
for ( SkillItem skillItem : skillCategory.getSkillItems() ) {
String fieldName = FORM_FIELD_SKILL_ITEM_LEVEL + "_" + skillItem.getId();
Object fieldValue = request.getParameter(fieldName);
if ( fieldValue != null ) {
form.setAttribute(fieldName, fieldValue);
}
fieldName = FORM_FIELD_SKILL_ITEM_NUM_MONTHS_EXP + "_" + skillItem.getId();
fieldValue = request.getParameter(fieldName);
if ( fieldValue != null ) {
form.setAttribute(fieldName, fieldValue);
}
}
}
}
/**
* {@inheritDoc}
*/
public boolean processFormSubmission(SubmittedForm form) {
SkillDataManager sdm = getBean(EisConstants.BEAN_BO_SKILL_MANAGER, SkillDataManager.class);
DafUser user = getCurrentUser();
Collection<? extends SkillInventory> mySkillInventories = sdm.getSkillInventories(user);
for ( SkillInventory skillInventory : mySkillInventories ) {
sdm.deleteSkillInventory(skillInventory);
}
Collection<? extends SkillCategory> skillCategories = sdm.getAllSkillCategories();
for ( SkillCategory skillCategory : skillCategories ) {
for ( SkillItem skillItem : skillCategory.getSkillItems() ) {
String fieldName = FORM_FIELD_SKILL_ITEM_LEVEL + "_" + skillItem.getId();
int fieldValue = form.getAttributeAsInt(fieldName);
if ( 1 <= fieldValue && fieldValue <= 9 ) {
SkillInventory skillInventory = new SkillInventory();
skillInventory.setSkillItem(skillItem);
skillInventory.setUser(user);
skillInventory.setLevel(fieldValue);
fieldName = FORM_FIELD_SKILL_ITEM_NUM_MONTHS_EXP + "_" + skillItem.getId();
fieldValue = form.getAttributeAsInt(fieldName);
skillInventory.setNumMonthsExp(fieldValue);
sdm.createSkillInventory(skillInventory);
}
}
}
DafDataManager dafDm = getBean(EisConstants.BEAN_BO_DAF_MANAGER, DafDataManager.class);
UserProfile.Id userProfileId = new Id(user.getId(), EisConstants.APP_DOMAIN,
EisConstants.UPK_KEY_LAST_SKILL_UPDATE_TIMESTAMP);
try {
DafUserProfile userProfile = dafDm.getUserProfile(userProfileId);
if ( userProfile == null ) {
userProfile = new DafUserProfile(userProfileId, null);
dafDm.createUserProfile(userProfile);
}
userProfile.setValue(System.currentTimeMillis() / 1000);
dafDm.updateUserProfile(userProfile);
} catch ( DafException e ) {
throw new RuntimeException(e);
}
return true;
}
}
|
[
"btnguyen2k@gmail.com"
] |
btnguyen2k@gmail.com
|
d03cd8690293d0be39b8eecfdbfcafe62ca1d21b
|
0b90c8d863f81cac34e9ec84037e8c441cae94aa
|
/spring-boot-shiro-session/src/main/java/com/springboot/controller/SessionController.java
|
6e60e961c80a1daab65300928fcd608a553df26c
|
[
"Apache-2.0"
] |
permissive
|
yiminyangguang520/shiro-sample
|
754a4ab15fab06533be6cce4640cfddb8571a6d7
|
2309424461d213764c84a39454d1397cf1e97015
|
refs/heads/master
| 2022-12-28T00:58:36.645575
| 2020-04-17T00:59:17
| 2020-04-17T00:59:52
| 140,244,097
| 1
| 1
|
Apache-2.0
| 2022-11-24T10:17:58
| 2018-07-09T06:58:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
package com.springboot.controller;
import com.springboot.pojo.ResponseBo;
import com.springboot.pojo.UserOnline;
import com.springboot.service.SessionService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author min
*/
@Controller
@RequestMapping("/online")
public class SessionController {
@Autowired
SessionService sessionService;
@RequestMapping("index")
public String online() {
return "online";
}
@ResponseBody
@RequestMapping("list")
public List<UserOnline> list() {
return sessionService.list();
}
@ResponseBody
@RequestMapping("forceLogout")
public ResponseBo forceLogout(String id) {
try {
sessionService.forceLogout(id);
return ResponseBo.ok();
} catch (Exception e) {
e.printStackTrace();
return ResponseBo.error("踢出用户失败");
}
}
}
|
[
"litz-a@glodon.com"
] |
litz-a@glodon.com
|
d5ef18f9dd10a623bfb186965b94c0eb31e0a468
|
0883f6754826a93a290f18327ae9387687863f54
|
/CompositePatternDemo/src/v2/Image2D.java
|
ccccb0f178f69f8c5e9423d1884393625131f1b7
|
[] |
no_license
|
csupomona-cs356/code-samples-fall2020
|
c1a46aa761f7fdeaf484259c5e4983e7a742b16f
|
c956fb7b71aaddc830826b2eedf7e110c358c3c5
|
refs/heads/main
| 2023-01-08T01:47:21.107538
| 2020-10-22T21:16:03
| 2020-10-22T21:16:03
| 306,460,319
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 301
|
java
|
package v2;
public class Image2D implements Widget {
private String imageUrl;
public void render() {
System.out.println("Download the image and render it.");
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
}
|
[
"yu.sun.cs@gmail.com"
] |
yu.sun.cs@gmail.com
|
a2cf3c2ca74d00f682b2569d8a648f606a3b2912
|
e2c48e041d2983164cf04bc49d37f3bc7324f2d3
|
/Java/src/_0773_Sliding_Puzzle/Solution.java
|
6a7567c2334a552192634062622d74ffce2a1cf5
|
[] |
no_license
|
ToLoveToFeel/LeetCode
|
17aff7f9b36615ccebe386545440f921d8fdf740
|
de7a893fc625ff30122899969f761ed5f8df8b12
|
refs/heads/master
| 2023-07-12T07:35:09.410016
| 2021-08-23T02:33:00
| 2021-08-23T02:33:00
| 230,863,299
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,541
|
java
|
package _0773_Sliding_Puzzle;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Queue;
public class Solution {
// 时间复杂度:O(n!)
private static final int[][] dirs = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}}; // 某个点的四个方向,上右下左
public int slidingPuzzle(int[][] board) {
Queue<String> q = new LinkedList<>();
HashMap<String, Integer> dist = new HashMap<>(); // 记录到达 String 需要的步骤,不存在在visited里代表没访问到
String start = boardToString(board);
if (start.equals("123450")) return 0;
q.add(start);
dist.put(start, 0);
while (!q.isEmpty()) {
String t = q.remove();
ArrayList<String> nexts = getNexts(t);
for (String next : nexts)
if (!dist.containsKey(next)) {
q.add(next);
dist.put(next, dist.get(t) + 1);
if (next.equals("123450")) return dist.get(next);
}
}
return -1;
}
private ArrayList<String> getNexts(String s) {
ArrayList<String> res = new ArrayList<>();
int[][] cur = stringToBoard(s);
int zero;
for (zero = 0; zero < 6; zero++)
if (0 == cur[zero / 3][zero % 3])
break;
int x = zero / 3, y = zero % 3;
for (int d = 0; d < 4; d++) {
int a = x + dirs[d][0], b = y + dirs[d][1];
if (a >= 0 && a < 2 && b >= 0 && b < 3) {
swap(cur, x, y, a, b);
res.add(boardToString(cur));
swap(cur, x, y, a, b);
}
}
return res;
}
private String boardToString(int[][] board) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 2; i++)
for (int j = 0; j < 3; j++)
sb.append(board[i][j]);
return sb.toString();
}
private int[][] stringToBoard(String s) {
int[][] res = new int[2][3];
for (int i = 0; i < s.length(); i++) res[i / 3][i % 3] = s.charAt(i) - '0';
return res;
}
private void swap(int[][] board, int x, int y, int newX, int newY) {
int t = board[x][y];
board[x][y] = board[newX][newY];
board[newX][newY] = t;
}
public static void main(String[] args) {
int[][] board = {{4, 1, 2}, {5, 0, 3}};
System.out.println((new Solution()).slidingPuzzle(board)); // 5
}
}
|
[
"1137247975@qq.com"
] |
1137247975@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.