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
af0bcc2ced423946931bb252b8fdc7f10fbdef7d
3c49f0766779f1c4b5865b0a70f82ab790d9866a
/01trunk/xwoa/src/main/java/com/centit/oa/service/impl/EquipmentUsingManagerImpl.java
338532120320a8ed6616d7cac4c3cbab4850f3b8
[]
no_license
laoqianlaile/xwoa
bfa9e64ca01e9333efbc5602b41c1816f1fa746e
fe8a618ff9c0ddfcb8b51bc9d6786e2658b62fa1
refs/heads/master
2022-01-09T23:27:17.273124
2019-05-21T08:35:34
2019-05-21T08:35:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,113
java
package com.centit.oa.service.impl; import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.centit.core.service.BaseEntityManagerImpl; import com.centit.core.utils.PageDesc; import com.centit.oa.dao.EquipmentUsingDao; import com.centit.oa.po.EquipmentUsing; import com.centit.oa.service.EquipmentUsingManager; import com.centit.support.utils.DatetimeOpt; public class EquipmentUsingManagerImpl extends BaseEntityManagerImpl<EquipmentUsing> implements EquipmentUsingManager { private static final long serialVersionUID = 1L; public static final Log log = LogFactory .getLog(EquipmentUsingManager.class); // private static final SysOptLog sysOptLog = // SysOptLogFactoryImpl.getSysOptLog(); private EquipmentUsingDao equipmentUsingDao; public void setEquipmentUsingDao(EquipmentUsingDao baseDao) { this.equipmentUsingDao = baseDao; setBaseDao(this.equipmentUsingDao); } // 获取下一个固定资产编号 public Long genNextUseRequestId() { return equipmentUsingDao.getNextLongSequence("S_useRequestId"); } @Override public void saveObject(EquipmentUsing o) { if (null == (o.getUseRequestId())) { o.setUseRequestId(equipmentUsingDao .getNextLongSequence("S_useRequestId")); } super.saveObject(o); } @Override public List<EquipmentUsing> getEquipmentUsingList(String string, Long equipmentId, PageDesc pageDesc) { return equipmentUsingDao.listObjects(string, equipmentId, pageDesc); } @Override public List<EquipmentUsing> getEquipmentUsingList(Date beginTime, Date endTime, Long equipmentId) { String sql = "from EquipmentUsing where 1=1 and (" + "( planBeginTime >= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss')" + " and planBeginTime <=to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss') ) " + " or ( planEndTime >= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss') " + " and planEndTime <= to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss') ) " + " or ( planBeginTime <= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss') " + " and planEndTime >= to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss') ) " + " or ( beginTime >= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss') " + " and beginTime <= to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss') ) " + " or ( endTime >= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss') " + " and endTime <= to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss') ) " + "or ( beginTime <= to_date('" + DatetimeOpt.convertDatetimeToString(beginTime) + "','yyyy-MM-dd hh24:mi:ss') " + " and endTime >= to_date('" + DatetimeOpt.convertDatetimeToString(endTime) + "','yyyy-MM-dd hh24:mi:ss'))) " + " and equipmentId = " + equipmentId + " and equipmentState!='4' order by endTime , planBeginTime "; return equipmentUsingDao.listObjects(sql); } }
[ "1820244007@qq.com" ]
1820244007@qq.com
c1c05e5e5d5bc54785a89c730fa952139dc8e5fb
baf2f2758c4f7e6ba903a1a1fd2b37af1837191b
/funcpresenter-model/src/main/java/com/adayo/component/settings/bfpcontract/INetwork4GFuncPresenter.java
13fedcb5bf77b5c54c683f6e7bf77171110c0a55
[]
no_license
TangZhiDe/Setting-HN6W04A-aar
96142a6249e9331b5133777e232e53519a94e859
daa35eb98ea9703f831e70db4b05a5dd33f5a5e9
refs/heads/master
2020-05-31T15:13:54.535252
2019-07-11T07:41:30
2019-07-11T07:41:30
190,342,459
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
/** * Copyright (c) 2015 FORYOU GENERAL ELECTRONICS CO.,LTD. All Rights Reserved. */ package com.adayo.component.settings.bfpcontract; /** * @author damanz * @className IMainBFPContract * @date 2018-07-26. */ public interface INetwork4GFuncPresenter { void getMobileNetworkSwitch(); void setMobileNetworkSwitch(boolean state); void setDataRoamingSwitch(boolean state); void getDataRoamingSwitch(); void getNetworkOperator(); }
[ "=" ]
=
b62cf3d8ed6d06884b65dc58c444aabc36744059
63e36d35f51bea83017ec712179302a62608333e
/OnePlusCamera/com/amap/api/maps2d/model/k.java
24a6b30389e70c0e28bcb1b6fd26c079ebbc1ea4
[]
no_license
hiepgaf/oneplus_blobs_decompiled
672aa002fa670bdcba8fdf34113bc4b8e85f8294
e1ab1f2dd111f905ff1eee18b6a072606c01c518
refs/heads/master
2021-06-26T11:24:21.954070
2017-08-26T12:45:56
2017-08-26T12:45:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,773
java
package com.amap.api.maps2d.model; import android.os.Parcel; import android.os.Parcelable.Creator; class k implements Parcelable.Creator<TileOverlayOptions> { public TileOverlayOptions a(Parcel paramParcel) { boolean bool3 = false; int i = paramParcel.readInt(); TileProvider localTileProvider = (TileProvider)paramParcel.readValue(TileProvider.class.getClassLoader()); boolean bool1; int j; int k; String str; boolean bool2; if (paramParcel.readByte() == 0) { bool1 = false; float f = paramParcel.readFloat(); j = paramParcel.readInt(); k = paramParcel.readInt(); str = paramParcel.readString(); if (paramParcel.readByte() != 0) { break label133; } bool2 = false; label65: if (paramParcel.readByte() != 0) { break label139; } label72: paramParcel = new TileOverlayOptions(i, null, bool1, f); if (localTileProvider != null) { break label145; } } for (;;) { paramParcel.memCacheSize(j); paramParcel.diskCacheSize(k); paramParcel.diskCacheDir(str); paramParcel.memoryCacheEnabled(bool2); paramParcel.diskCacheEnabled(bool3); return paramParcel; bool1 = true; break; label133: bool2 = true; break label65; label139: bool3 = true; break label72; label145: paramParcel.tileProvider(localTileProvider); } } public TileOverlayOptions[] a(int paramInt) { return new TileOverlayOptions[paramInt]; } } /* Location: /Users/joshua/Desktop/system_framework/classes-dex2jar.jar!/com/amap/api/maps2d/model/k.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "joshuous@gmail.com" ]
joshuous@gmail.com
4172d4c43afc90c51d85bee0264ae00aed634c12
4d361cd1287745e1ba82a051b73ec693b022fb04
/jOOQ/src/main/java/org/jooq/SelectGroupByStep.java
f006d630df0d8e5b68c7da15724a873512c951d9
[ "Apache-2.0" ]
permissive
Vertabelo/jOOQ
db8619efea4b982983201c7d0e1d223421a4d715
e65f62d833286ea0689748e3be47dabe94a9f511
refs/heads/master
2021-01-18T09:34:29.600129
2014-11-07T15:32:33
2014-11-21T11:08:43
26,956,264
1
0
null
null
null
null
UTF-8
Java
false
false
4,111
java
/** * Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com) * All rights reserved. * * This work is dual-licensed * - under the Apache Software License 2.0 (the "ASL") * - under the jOOQ License and Maintenance Agreement (the "jOOQ License") * ============================================================================= * You may choose which license applies to you: * * - If you're using this work with Open Source databases, you may choose * either ASL or jOOQ License. * - If you're using this work with at least one commercial database, you must * choose jOOQ License * * For more information, please visit http://www.jooq.org/licenses * * Apache Software License 2.0: * ----------------------------------------------------------------------------- * 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. * * jOOQ License and Maintenance Agreement: * ----------------------------------------------------------------------------- * Data Geekery grants the Customer the non-exclusive, timely limited and * non-transferable license to install and use the Software under the terms of * the jOOQ License and Maintenance Agreement. * * This library is distributed with a LIMITED WARRANTY. See the jOOQ License * and Maintenance Agreement for more details: http://www.jooq.org/licensing */ package org.jooq; import java.util.Collection; /** * This type is used for the {@link Select}'s DSL API when selecting generic * {@link Record} types. * <p> * Example: <code><pre> * -- get all authors' first and last names, and the number * -- of books they've written in German, if they have written * -- more than five books in German in the last three years * -- (from 2011), and sort those authors by last names * -- limiting results to the second and third row * * SELECT T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME, COUNT(*) * FROM T_AUTHOR * JOIN T_BOOK ON T_AUTHOR.ID = T_BOOK.AUTHOR_ID * WHERE T_BOOK.LANGUAGE = 'DE' * AND T_BOOK.PUBLISHED > '2008-01-01' * GROUP BY T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME * HAVING COUNT(*) > 5 * ORDER BY T_AUTHOR.LAST_NAME ASC NULLS FIRST * LIMIT 2 * OFFSET 1 * FOR UPDATE * OF FIRST_NAME, LAST_NAME * NO WAIT * </pre></code> Its equivalent in jOOQ <code><pre> * create.select(TAuthor.FIRST_NAME, TAuthor.LAST_NAME, create.count()) * .from(T_AUTHOR) * .join(T_BOOK).on(TBook.AUTHOR_ID.equal(TAuthor.ID)) * .where(TBook.LANGUAGE.equal("DE")) * .and(TBook.PUBLISHED.greaterThan(parseDate('2008-01-01'))) * .groupBy(TAuthor.FIRST_NAME, TAuthor.LAST_NAME) * .having(create.count().greaterThan(5)) * .orderBy(TAuthor.LAST_NAME.asc().nullsFirst()) * .limit(2) * .offset(1) * .forUpdate() * .of(TAuthor.FIRST_NAME, TAuthor.LAST_NAME) * .noWait(); * </pre></code> Refer to the manual for more details * * @author Lukas Eder */ public interface SelectGroupByStep<R extends Record> extends SelectHavingStep<R> { /** * Add a <code>GROUP BY</code> clause to the query * <p> * Calling this with an empty argument list will result in an empty * <code>GROUP BY ()</code> clause being rendered. */ @Support SelectHavingStep<R> groupBy(GroupField... fields); /** * Add a <code>GROUP BY</code> clause to the query * <p> * Calling this with an empty argument list will result in an empty * <code>GROUP BY ()</code> clause being rendered. */ @Support SelectHavingStep<R> groupBy(Collection<? extends GroupField> fields); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
8b79a354474ec7e2f6a9b1802bfb466e634dc4e7
166f40955437dfa52ce1d71ced86d2efe42e4878
/trunk/itali_gestionale_web/src/com/italigestionaleweb/tree/CategoriaTreeNode.java
a11d1bf4dc9de46fd80ffff70e81f500792c58c6
[]
no_license
BGCX261/zk-my-project-svn-to-git
28fbb034c9982be0e1c07047f3628d674046f715
3081ff76216d10fc5cc4073b486edd3cadc9055d
refs/heads/master
2020-04-30T03:25:15.207147
2015-08-25T15:37:47
2015-08-25T15:37:47
41,486,725
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.italigestionaleweb.tree; import org.zkoss.zul.DefaultTreeNode; import com.italigestionale.bean.Categoria; public class CategoriaTreeNode extends DefaultTreeNode<Categoria> { /** * */ private static final long serialVersionUID = -2816686386369066882L; private boolean open = false; public CategoriaTreeNode(Categoria data, DefaultTreeNode<Categoria>[] children){ super(data, children); } public CategoriaTreeNode(Categoria data, DefaultTreeNode<Categoria>[] children, boolean open){ super(data, children); setOpen(open); } public CategoriaTreeNode(Categoria data){ super(data); } public boolean isOpen() { return open; } public void setOpen(boolean open) { this.open = open; } }
[ "you@example.com" ]
you@example.com
69421ddf92851e2471911e53b0bad05674ff926d
8ef2cecd392f43cc670ae8c6f149be6d71d737ba
/src/com/fridaylab/util/TimeSpan.java
e867ecb9784dd6163f4027bde3880a874deb9b09
[]
no_license
NBchitu/AngelEyes2
28e563380be6dcf5ba5398770d66ebeb924a033b
afea424b70597c7498e9c6da49bcc7b140a383f7
refs/heads/master
2021-01-16T18:30:51.913292
2015-02-15T07:30:00
2015-02-15T07:30:00
30,744,510
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.fridaylab.util; public final class TimeSpan { public static long a(long paramLong) { return (500000L + paramLong) / 1000000L; } } /* Location: C:\DISKD\fishfinder\apktool-install-windows-r05-ibot\classes_dex2jar.jar * Qualified Name: com.fridaylab.util.TimeSpan * JD-Core Version: 0.7.0.1 */
[ "bjtu2010@hotmail.com" ]
bjtu2010@hotmail.com
ee117cbe323148e65d0f451f1bca5b437c6d3e49
70e207ac63da49eddd761a6e3a901e693f4ec480
/net.certware.state.ui/xtend-gen/net/certware/state/ui/quickfix/StateAnalysisQuickfixProvider.java
0f97fb9725355c5118d6ea17ff8c97faf4a7ec8d
[ "Apache-2.0" ]
permissive
arindam7development/CertWare
43be650539963b1efef4ce4cad164f23185d094b
cbbfdb6012229444d3c0d7e64c08ac2a15081518
refs/heads/master
2020-05-29T11:38:08.794116
2016-03-29T13:56:37
2016-03-29T13:56:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
/** * generated by Xtext */ package net.certware.state.ui.quickfix; import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider; /** * Custom quickfixes. * * see http://www.eclipse.org/Xtext/documentation.html#quickfixes */ @SuppressWarnings("all") public class StateAnalysisQuickfixProvider extends DefaultQuickfixProvider { }
[ "mrb@certware.net" ]
mrb@certware.net
3d433abae88bb9453b8ca82b1b05d57c1c05d387
06ae0a6cb33ed769525f602342f1118bd307ee2e
/Java_23_BankWork02/src/com/biz/bank/exec/BankEx02.java
0b12b0562153336ea0fc1fe8c78e0a036b8ce0e5
[]
no_license
najongjine/JavaWorks
c19dd05f797f458a8f7ba06829d293ee99736fac
60dcadde56b2e40b108604f2e59f7404afc5c069
refs/heads/master
2020-08-07T20:29:35.349982
2019-11-04T07:41:36
2019-11-04T07:41:36
213,578,297
0
0
null
null
null
null
UTF-8
Java
false
false
1,219
java
package com.biz.bank.exec; import java.util.Scanner; import com.biz.bank.service.BankService; import com.biz.bank.service.BankServiceImpV1; public class BankEx02 { public static void main(String[] args) { // TODO Auto-generated method stub BankService bs=new BankServiceImpV1(); Scanner scanner=new Scanner(System.in); String bookFile="src/com/biz/bank/활빈당은행잔고원장"; try { while(true) { bs.readBook(bookFile);//무결성을 위한 반복적 읽기 System.out.println("==============================="); System.out.println("활빈당 종합 은행 V1"); System.out.println("=================================="); System.out.println("1.원장 리스트 2.계좌조회 3.입금 4.출금 0.종료"); System.out.println("-------------------------------------------------"); String strMenu=scanner.nextLine(); int intMenu=Integer.valueOf(strMenu); if(intMenu==0)break; else if(intMenu==1) { bs.bookList(); } else if(intMenu==2) { bs.viewACC(); } else if(intMenu==3) { bs.input(); } else if(intMenu==4) { bs.output(); } } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "najongjin3@hotmail.com" ]
najongjin3@hotmail.com
ce6862efce6bda236d633af9c04bf23cba1329c4
3abd77888f87b9a874ee9964593e60e01a9e20fb
/sim/EJS/Ejs/src/com/hexidec/ekit/action/ListAutomationAction.java
dc5f307a8ff40a5f2d5670802c4423fe45c594b7
[ "MIT" ]
permissive
joakimbits/Quflow-and-Perfeco-tools
7149dec3226c939cff10e8dbb6603fd4e936add0
70af4320ead955d22183cd78616c129a730a9d9c
refs/heads/master
2021-01-17T14:02:08.396445
2019-07-12T10:08:07
2019-07-12T10:08:07
1,663,824
2
1
null
null
null
null
UTF-8
Java
false
false
4,111
java
/* GNU Lesser General Public License ListAutomationAction Copyright (C) 2000 Howard Kistler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package com.hexidec.ekit.action; import java.awt.event.ActionEvent; import java.util.StringTokenizer; import javax.swing.JEditorPane; import javax.swing.text.BadLocationException; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.HTMLEditorKit; import com.hexidec.ekit.EkitCore; import com.hexidec.ekit.component.*; import com.hexidec.util.Translatrix; /** Class for automatically creating bulleted lists from selected text */ public class ListAutomationAction extends HTMLEditorKit.InsertHTMLTextAction { private static final long serialVersionUID = 1L; protected EkitCore parentEkit; private HTML.Tag baseTag; // private String sListType; private HTMLUtilities htmlUtilities; public ListAutomationAction(EkitCore ekit, String sLabel, HTML.Tag listType) { super(sLabel, "", listType, HTML.Tag.LI); parentEkit = ekit; baseTag = listType; htmlUtilities = new HTMLUtilities(ekit); } public void actionPerformed(ActionEvent ae) { try { JEditorPane jepEditor = (parentEkit.getTextPane()); String selTextBase = jepEditor.getSelectedText(); int textLength = -1; if(selTextBase != null) { textLength = selTextBase.length(); } if(selTextBase == null || textLength < 1) { int pos = parentEkit.getCaretPosition(); parentEkit.setCaretPosition(pos); if(ae.getActionCommand() != "newListPoint") { if(htmlUtilities.checkParentsTag(HTML.Tag.OL) || htmlUtilities.checkParentsTag(HTML.Tag.UL)) { new SimpleInfoDialog(parentEkit.getFrame(), Translatrix.getTranslationString("Error"), true, Translatrix.getTranslationString("ErrorNestedListsNotSupported")); return; } } String sListType = (baseTag == HTML.Tag.OL ? "ol" : "ul"); StringBuffer sbNew = new StringBuffer(); if(htmlUtilities.checkParentsTag(baseTag)) { sbNew.append("<li></li>"); insertHTML(parentEkit.getTextPane(), parentEkit.getExtendedHtmlDoc(), parentEkit.getTextPane().getCaretPosition(), sbNew.toString(), 0, 0, HTML.Tag.LI); } else { sbNew.append("<" + sListType + "><li></li></" + sListType + "><p>&nbsp;</p>"); insertHTML(parentEkit.getTextPane(), parentEkit.getExtendedHtmlDoc(), parentEkit.getTextPane().getCaretPosition(), sbNew.toString(), 0, 0, (sListType.equals("ol") ? HTML.Tag.OL : HTML.Tag.UL)); } parentEkit.refreshOnUpdate(); } else { String sListType = (baseTag == HTML.Tag.OL ? "ol" : "ul"); HTMLDocument htmlDoc = (HTMLDocument)(jepEditor.getDocument()); int iStart = jepEditor.getSelectionStart(); int iEnd = jepEditor.getSelectionEnd(); String selText = htmlDoc.getText(iStart, iEnd - iStart); StringBuffer sbNew = new StringBuffer(); String sToken = ((selText.indexOf("\r") > -1) ? "\r" : "\n"); StringTokenizer stTokenizer = new StringTokenizer(selText, sToken); sbNew.append("<" + sListType + ">"); while(stTokenizer.hasMoreTokens()) { sbNew.append("<li>"); sbNew.append(stTokenizer.nextToken()); sbNew.append("</li>"); } sbNew.append("</" + sListType + "><p>&nbsp;</p>"); htmlDoc.remove(iStart, iEnd - iStart); insertHTML(jepEditor, htmlDoc, iStart, sbNew.toString(), 1, 1, null); } } catch (BadLocationException ble) {} } }
[ "joakimbits@gmail.com" ]
joakimbits@gmail.com
9481c0e22f994be01cfcfe7fdc31cbf8c5d91918
798e3563930a7f5098a790d86cba09a53a9030bd
/src/com/uas/erp/controller/scm/SaleForeCastChangeController.java
b003235977fc16e9941ad831b5b5448410677b28
[]
no_license
dreamvalley/6.0.0
c5cabed6f34cab783df16de9ff6ddfc118b7c4fe
12ed81bf7a46a649711bcf654bf9bcafe70054c2
refs/heads/master
2022-02-17T02:31:57.439726
2018-07-25T02:52:27
2018-07-25T02:52:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,773
java
package com.uas.erp.controller.scm; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.uas.erp.core.BaseController; import com.uas.erp.service.scm.SaleForeCastChangeService; @Controller public class SaleForeCastChangeController extends BaseController { @Autowired private SaleForeCastChangeService saleForeCastChangeService; /** * 保存form和grid数据 * * @param formStore * form数据 * @param param * grid数据 */ @RequestMapping("/scm/sale/saveSaleForeCastChange.action") @ResponseBody public Map<String, Object> save(String caller, String formStore, String param) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.saveSaleForeCastChange(formStore, param, caller); modelMap.put("success", true); return modelMap; } /** * 删除 包括明细 */ @RequestMapping("/scm/sale/deleteSaleForeCastChange.action") @ResponseBody public Map<String, Object> deleteSaleForeCastChange(String caller, int id) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.deleteSaleForeCastChange(id, caller); modelMap.put("success", true); return modelMap; } /** * 修改form和grid数据 * * @param formStore * form数据 * @param param * grid数据 */ @RequestMapping("/scm/sale/updateSaleForeCastChange.action") @ResponseBody public Map<String, Object> update(String caller, String formStore, String param) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.updateSaleForeCastChangeById(formStore, param, caller); modelMap.put("success", true); return modelMap; } /** * 打印 */ @RequestMapping("/scm/sale/printSaleForeCastChange.action") @ResponseBody public Map<String, Object> printSaleForeCastChange(String caller, int id) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.printSaleForeCastChange(id, caller); modelMap.put("success", true); return modelMap; } /** * 提交 */ @RequestMapping("/scm/sale/submitSaleForeCastChange.action") @ResponseBody public Map<String, Object> submitSaleForeCastChange(String caller, int id) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.submitSaleForeCastChange(id, caller); modelMap.put("success", true); return modelMap; } /** * 反提交 */ @RequestMapping("/scm/sale/resSubmitSaleForeCastChange.action") @ResponseBody public Map<String, Object> resSubmitSaleForeCastChange(String caller, int id) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.resSubmitSaleForeCastChange(id, caller); modelMap.put("success", true); return modelMap; } /** * 审核 * * @throws UnknownHostException */ @RequestMapping("/scm/sale/auditSaleForeCastChange.action") @ResponseBody public ModelMap auditSaleForeCastChange(String caller, int id) { saleForeCastChangeService.auditSaleForeCastChange(id, caller); return success(); } /** * 反审核 */ @RequestMapping("/scm/sale/resAuditSaleForeCastChange.action") @ResponseBody public Map<String, Object> resAuditSaleForeCastChange(String caller, int id) { Map<String, Object> modelMap = new HashMap<String, Object>(); saleForeCastChangeService.resAuditSaleForeCastChange(id, caller); modelMap.put("success", true); return modelMap; } }
[ "812669424@qq.com" ]
812669424@qq.com
3d7720a377150f59c06e1ca4892b0c933ad86ad2
cf10d1426dfea9082121f4dbd5fbc3a911a70607
/ps-cashloan-business-cl/src/main/java/com/adpanshi/cashloan/business/cl/service/impl/CallSaasService.java
27c46e5656270d51a5b8d84bf58afcbfc51d398a
[]
no_license
wudongpo/ps-cashloan-business
8e1d9724fec9b25dd95998e7899486910438fde1
bbba3f3de808aaaab3e8e9d73cbf193d7ba548c9
refs/heads/master
2020-05-22T14:04:28.435113
2018-09-29T08:22:52
2018-09-29T08:22:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
package com.adpanshi.cashloan.business.cl.service.impl; import com.adpanshi.cashloan.business.rule.domain.SaasRespRecord; /*** ** @category 统一调用saas服务接口... ** @author qing.yunhui ** @email: qingyunhui@fentuan360.com ** @createTime: 2018年4月3日下午2:23:56 **/ public interface CallSaasService { /** * <p>把saas响应的数据进行封装</p> * @param userId * @param reqId * @param resId * @param taskId * @param code * @param msg * @param data * @return SaasRespRecord * */ SaasRespRecord getSaasRespRecord(Long userId, String reqId, String resId, String taskId, String code, String msg, String data, Integer type); }
[ "zhoushanwen8502@adpanshi.com" ]
zhoushanwen8502@adpanshi.com
3eb0a37c420fe72a0a2353eff9cadb7b01f3118d
5308297e063c59a065a025711ae62b0b7b015886
/SDK/src/com/skyworth/ui/skydata/LocalNameData.java
cba7b1811c0064d35bd7321a0c14164d4aa6ff9b
[]
no_license
bibiRe/AppStore
77ddde3261cabe9294ffb74714c00febd0ec7268
06f5e05050ad01753fd9e6a9f6ec251474e3c6f1
refs/heads/master
2020-12-29T01:54:54.175750
2014-02-12T07:30:44
2014-02-12T07:30:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,486
java
/** * Copyright (C) 2012 The SkyTvOS Project * * Version Date Author * ───────────────────────────────────── * 2012-11-23 admin * */ package com.skyworth.ui.skydata; import com.skyworth.defines.SkyModuleDefs; import com.skyworth.defines.SkyModuleDefs.SKY_SERVICE; import com.skyworth.framework.SkyData; /** * @ClassName LocalNameData * @Description TODO本机信息的Data * @author xiongwei * @date 2012-11-23 * @version TODO (write something) */ public class LocalNameData extends UIData { private String select_name = ""; private String cmd = ""; private String cmdparams = ""; private SKY_SERVICE cmdService = SKY_SERVICE.SKY_MODULE_UIVIEW_SERVICE; public LocalNameData() { super(UIDataTypeDef.TYPE_LOCALNAME_DATA); // TODO Auto-generated constructor stub } public LocalNameData(SkyData recdata) { super(recdata); // TODO Auto-generated constructor stub } @Override public SkyData toSkyData() { // TODO Auto-generated method stub SkyData data = new SkyData(); data.add("type", this.getType()); data.add("cmd", this.getCmd()); data.add("cmdservice", this.getService().toString()); data.add("cmdparams", this.getCmdparams()); data.add("selectname", this.getLocalName()); return data; } @Override public void deCodeSkyData(SkyData data) { // TODO Auto-generated method stub this.setCmd(data.getString("cmd"), data.getString("cmdparams"),SkyModuleDefs.SKY_SERVICE.valueOf(data.getString("cmdservice"))); this.setLocalNameText(data.getString("selectname")); } public void setCmd(String cmd, String cmdparams, SKY_SERVICE service) { if (cmd != null) { this.cmd = cmd; } this.cmdService = service; this.cmdparams = cmdparams; } public String getCmd() { return cmd; } public SKY_SERVICE getService() { return cmdService; } public String getCmdparams() { return cmdparams; } public void setLocalNameText(String name) { if(name!=null) { this.select_name = name; } } public String getLocalName() { return this.select_name; } }
[ "haotie1990@gmail.com" ]
haotie1990@gmail.com
01b9db90b20f1c783a1eca87fc6c4babdbed5772
7edeb82f23f2a107cd4948206aa15e86d5d71a44
/app/src/main/java/com/randomappsinc/pokemonlocations_pokemongo/Activities/MainActivity.java
208e2c9b99729fd07ef1497b9b4085a4ded2bc71
[]
no_license
vaginessa/Pokemon-Locations-for-Android
0654a96450d61d45f330b213d4dcdadc6acf6081
31e3a6b9a112f85aa9714b42d16326220422d25a
refs/heads/master
2021-01-22T12:44:20.687640
2016-07-20T04:59:22
2016-07-20T04:59:22
63,807,844
1
0
null
2016-07-20T19:17:31
2016-07-20T19:17:31
null
UTF-8
Java
false
false
5,430
java
package com.randomappsinc.pokemonlocations_pokemongo.Activities; import android.app.FragmentManager; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.FloatingActionButton; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.afollestad.materialdialogs.DialogAction; import com.afollestad.materialdialogs.MaterialDialog; import com.joanzapata.iconify.IconDrawable; import com.joanzapata.iconify.fonts.IoniconsIcons; import com.randomappsinc.pokemonlocations_pokemongo.Fragments.NavigationDrawerFragment; import com.randomappsinc.pokemonlocations_pokemongo.Fragments.SearchFragment; import com.randomappsinc.pokemonlocations_pokemongo.Persistence.PreferencesManager; import com.randomappsinc.pokemonlocations_pokemongo.R; import com.randomappsinc.pokemonlocations_pokemongo.Utils.UIUtils; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; import uk.co.deanwild.materialshowcaseview.MaterialShowcaseSequence; import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView; public class MainActivity extends AppCompatActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks { @Bind(R.id.parent) View parent; @Bind(R.id.drawer_layout) DrawerLayout drawerLayout; @Bind(R.id.add_pokemon_listing) FloatingActionButton addListing; private NavigationDrawerFragment navDrawerFragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Kill activity if it's not on top of the stack due to Samsung bug if (!isTaskRoot() && getIntent().hasCategory(Intent.CATEGORY_LAUNCHER) && getIntent().getAction() != null && getIntent().getAction().equals(Intent.ACTION_MAIN)) { finish(); return; } setContentView(R.layout.activity_main); ButterKnife.bind(this); addListing.setImageDrawable(new IconDrawable(this, IoniconsIcons.ion_ios_bookmarks).colorRes(R.color.white)); navDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager().findFragmentById(R.id.navigation_drawer); navDrawerFragment.setUp(R.id.navigation_drawer, drawerLayout); FragmentManager fragmentManager = getFragmentManager(); SearchFragment searchFragment = new SearchFragment(); fragmentManager.beginTransaction().replace(R.id.container, searchFragment).commit(); if (PreferencesManager.get().shouldShowShareTutorial()) { showTutorial(); } else if (PreferencesManager.get().shouldAskToRate()) { showPleaseRateDialog(); } } public void showTutorial() { MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this); MaterialShowcaseView addListExplanation = new MaterialShowcaseView.Builder(this) .setTarget(addListing) .setTitleText(R.string.welcome) .setDismissText(R.string.got_it) .setContentText(R.string.sharing_instructions) .withCircleShape() .build(); sequence.addSequenceItem(addListExplanation); sequence.start(); } @OnClick(R.id.add_pokemon_listing) public void addPokemonListing() { navDrawerFragment.closeDrawer(); startActivity(new Intent(this, AddListingActivity.class)); } @Override public void startActivityForResult(Intent intent, int requestCode) { UIUtils.hideKeyboard(this); super.startActivityForResult(intent, requestCode); overridePendingTransition(R.anim.slide_left_out, R.anim.slide_left_in); } @Override public void finish() { super.finish(); overridePendingTransition(R.anim.slide_right_out, R.anim.slide_right_in); } @Override public void onNavigationDrawerItemSelected(int position) { Intent intent = null; switch (position) { case 0: intent = new Intent(this, FavoritesActivity.class); break; case 1: intent = new Intent(this, PokeFindingsActivity.class); break; case 2: intent = new Intent(this, SettingsActivity.class); } startActivity(intent); } public void showSnackbar(String message) { UIUtils.showSnackbar(parent, message); } private void showPleaseRateDialog() { new MaterialDialog.Builder(this) .content(R.string.please_rate) .negativeText(R.string.no_im_good) .positiveText(R.string.will_rate) .onPositive(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { Uri uri = Uri.parse("market://details?id=" + getApplicationContext().getPackageName()); Intent intent = new Intent(Intent.ACTION_VIEW, uri); if (getPackageManager().queryIntentActivities(intent, 0).size() > 0) { startActivity(intent); } } }) .show(); } }
[ "chessnone@yahoo.com" ]
chessnone@yahoo.com
d0dfcf413221bc57373d8ccf298de02a6507c5d9
d280800ca4ec277f7f2cdabc459853a46bf87a7c
/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfiguration.java
04754aaa0c94149a3d753ff186d7457439519c73
[ "Apache-2.0" ]
permissive
qqqqqcjq/spring-boot-2.1.x
e5ca46d93eeb6a5d17ed97a0b565f6f5ed814dbb
238ffa349a961d292d859e6cc2360ad53b29dfd0
refs/heads/master
2023-03-12T12:50:11.619493
2021-03-01T05:32:52
2021-03-01T05:32:52
343,275,523
0
0
null
null
null
null
UTF-8
Java
false
false
4,599
java
/* * Copyright 2012-2019 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 org.springframework.boot.autoconfigure.mongo; import java.util.stream.Collectors; import javax.annotation.PreDestroy; import com.mongodb.MongoClientSettings; import com.mongodb.MongoClientSettings.Builder; import com.mongodb.connection.netty.NettyStreamFactoryFactory; import com.mongodb.reactivestreams.client.MongoClient; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import reactor.core.publisher.Flux; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.core.env.Environment; /** * {@link EnableAutoConfiguration Auto-configuration} for Reactive Mongo. * * @author Mark Paluch * @author Stephane Nicoll * @since 2.0.0 */ @Configuration @ConditionalOnClass({ MongoClient.class, Flux.class }) @EnableConfigurationProperties(MongoProperties.class) public class MongoReactiveAutoConfiguration { private final MongoClientSettings settings; private MongoClient mongo; public MongoReactiveAutoConfiguration(ObjectProvider<MongoClientSettings> settings) { this.settings = settings.getIfAvailable(); } @PreDestroy public void close() { if (this.mongo != null) { this.mongo.close(); } } @Bean @ConditionalOnMissingBean public MongoClient reactiveStreamsMongoClient(MongoProperties properties, Environment environment, ObjectProvider<MongoClientSettingsBuilderCustomizer> builderCustomizers) { ReactiveMongoClientFactory factory = new ReactiveMongoClientFactory(properties, environment, builderCustomizers.orderedStream().collect(Collectors.toList())); this.mongo = factory.createMongoClient(this.settings); return this.mongo; } @Configuration @ConditionalOnClass({ SocketChannel.class, NioEventLoopGroup.class }) static class NettyDriverConfiguration { @Bean @Order(Ordered.HIGHEST_PRECEDENCE) public NettyDriverMongoClientSettingsBuilderCustomizer nettyDriverCustomizer( ObjectProvider<MongoClientSettings> settings) { return new NettyDriverMongoClientSettingsBuilderCustomizer(settings); } private static final class NettyDriverMongoClientSettingsBuilderCustomizer implements MongoClientSettingsBuilderCustomizer, DisposableBean { private final ObjectProvider<MongoClientSettings> settings; private volatile EventLoopGroup eventLoopGroup; private NettyDriverMongoClientSettingsBuilderCustomizer(ObjectProvider<MongoClientSettings> settings) { this.settings = settings; } @Override public void customize(Builder builder) { if (!isStreamFactoryFactoryDefined(this.settings.getIfAvailable())) { NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(); this.eventLoopGroup = eventLoopGroup; builder.streamFactoryFactory( NettyStreamFactoryFactory.builder().eventLoopGroup(eventLoopGroup).build()); } } @Override public void destroy() { EventLoopGroup eventLoopGroup = this.eventLoopGroup; if (eventLoopGroup != null) { eventLoopGroup.shutdownGracefully().awaitUninterruptibly(); this.eventLoopGroup = null; } } private boolean isStreamFactoryFactoryDefined(MongoClientSettings settings) { return settings != null && settings.getStreamFactoryFactory() != null; } } } }
[ "caverspark@163.com" ]
caverspark@163.com
f48000a0d55c8e2828f7c9676de3f70285ac6b0e
8212d4f7e302cbd8735cb49759117cd2e8267684
/whois-commons/src/main/java/net/ripe/db/whois/common/iptree/Ipv4RouteEntry.java
f8bef91db7ad4bb5c24179323207abb8418ed9e0
[ "BSD-3-Clause" ]
permissive
zigri2612/whois
e05a087c1a20ff03176cab3634d2cca79e0fca4b
11f4f3505c04c9a32997794905d679e22fa0d60b
refs/heads/master
2021-01-23T23:56:05.558802
2015-12-21T04:05:56
2015-12-21T04:05:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package net.ripe.db.whois.common.iptree; import net.ripe.db.whois.common.domain.Ipv4Resource; import java.util.regex.Matcher; public class Ipv4RouteEntry extends RouteEntry<Ipv4Resource> { public Ipv4RouteEntry(final Ipv4Resource key, final int objectId, final String origin) { super(key, objectId, origin); } public static Ipv4RouteEntry parse(final String pkey, final int objectId) { final Matcher pkeyMatcher = parsePkey(pkey); final Ipv4Resource prefix = Ipv4Resource.parse(pkeyMatcher.group(1)); final String origin = pkeyMatcher.group(2).toUpperCase(); return new Ipv4RouteEntry(prefix, objectId, origin); } }
[ "agoston@ripe.net" ]
agoston@ripe.net
fe0b4b3252990963a00db4470878aa2fabcd2b02
7f519779336d3f2a356ed27b2d35d7b553f0417a
/quaerite-core/src/main/java/org/tallison/quaerite/core/queries/TermQuery.java
c7aad70ec16002a8df407ecdea98964fc23e71a4
[ "Apache-2.0" ]
permissive
tballison/quaerite
3020ab798d7fc5123f62189ed9bb93122c642d77
e7b2ec891f0da65ebfdf394bffbdf06c7fadf858
refs/heads/main
2022-10-26T23:52:42.253048
2022-10-03T15:06:47
2022-10-03T15:06:47
209,826,913
27
5
Apache-2.0
2021-12-13T16:18:42
2019-09-20T15:46:00
Java
UTF-8
Java
false
false
1,871
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.tallison.quaerite.core.queries; import java.util.Objects; public class TermQuery extends SingleStringQuery { final String field; public TermQuery(String field, String term) { super(term); this.field = field; } @Override public String getName() { return "term"; } @Override public TermQuery deepCopy() { TermQuery tq = new TermQuery(field, getQueryString()); tq.setQueryStringName(getQueryStringName()); return tq; } public String getField() { return field; } public String getTerm() { return getQueryString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TermQuery)) return false; TermQuery termQuery = (TermQuery) o; return Objects.equals(field, termQuery.field) && Objects.equals(getQueryString(), termQuery.getTerm()); } @Override public int hashCode() { return Objects.hash(field, getTerm()); } }
[ "tallison@apache.org" ]
tallison@apache.org
38739849d70aba9382ce5ba000e4624f5db1dba2
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/ui/friend/b.java
3f4112b33ffa222d3c144200d62150982eb1e9bf
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
7,165
java
package com.tencent.mm.ui.friend; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.CheckBox; import android.widget.TextView; import com.tencent.mm.R; import com.tencent.mm.a.o; import com.tencent.mm.modelfriend.af; import com.tencent.mm.protocal.c.ate; import com.tencent.mm.protocal.c.wh; import com.tencent.mm.sdk.platformtools.bh; import java.util.LinkedList; final class b extends BaseAdapter { private LinkedList<ate> hdX; private boolean[] ily; private final LayoutInflater nny; boolean zcA; LinkedList<wh> zcz; public b(LayoutInflater layoutInflater) { this.nny = layoutInflater; } public final void jf(int i) { if (i >= 0 && i < this.ily.length) { this.ily[i] = !this.ily[i]; super.notifyDataSetChanged(); } } public final void h(LinkedList<ate> linkedList, int i) { if (i < 0) { this.hdX = linkedList; } else { this.hdX = new LinkedList(); for (int i2 = 0; i2 < linkedList.size(); i2++) { if (i == ((ate) linkedList.get(i2)).wgF) { this.hdX.add(linkedList.get(i2)); } } } this.ily = new boolean[this.hdX.size()]; } public final String[] cwU() { int i = 0; int i2 = 0; for (boolean z : this.ily) { if (z) { i2++; } } String[] strArr = new String[i2]; int i3 = 0; while (i3 < this.hdX.size()) { if (this.ily[i3]) { int i4 = i + 1; strArr[i] = ((ate) this.hdX.get(i3)).ksU; i2 = i4; } else { i2 = i; } i3++; i = i2; } return strArr; } public final int getCount() { if (this.zcA) { if (this.zcz == null) { return 0; } return this.zcz.size(); } else if (this.hdX != null) { return this.hdX.size(); } else { return 0; } } public final Object getItem(int i) { if (this.zcA) { return this.zcz.get(i); } return this.hdX.get(i); } public final long getItemId(int i) { return 0; } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final View getView(int i, View view, ViewGroup viewGroup) { a aVar; a aVar2; if (this.zcA) { wh whVar = (wh) this.zcz.get(i); if (view == null || ((a) view.getTag()).type != 2) { view = this.nny.inflate(R.i.dlO, viewGroup, false); aVar = new a(); aVar.type = 2; aVar.lgz = (TextView) view.findViewById(R.h.cEq); view.setTag(aVar); aVar2 = aVar; } else { aVar2 = (a) view.getTag(); } aVar2.lgz.setText(whVar.wgG); } else { CharSequence charSequence; TextView textView; CharSequence charSequence2; String str; String[] split; ate com_tencent_mm_protocal_c_ate = (ate) this.hdX.get(i); if (view == null || ((a) view.getTag()).type != 1) { view = this.nny.inflate(R.i.dlN, viewGroup, false); aVar = new a(); aVar.type = 1; aVar.kEZ = (TextView) view.findViewById(R.h.cqq); aVar.zcB = (TextView) view.findViewById(R.h.cqo); aVar.ilA = (CheckBox) view.findViewById(R.h.cqr); aVar.ilz = (TextView) view.findViewById(R.h.cqg); view.setTag(aVar); aVar2 = aVar; } else { aVar2 = (a) view.getTag(); } if (af.OH().la(com_tencent_mm_protocal_c_ate.ksU)) { aVar2.ilz.setVisibility(0); } else { aVar2.ilz.setVisibility(8); } TextView textView2 = aVar2.kEZ; if (com_tencent_mm_protocal_c_ate != null) { charSequence = com_tencent_mm_protocal_c_ate.vXO; if (charSequence == null || charSequence.length() <= 0) { charSequence = com_tencent_mm_protocal_c_ate.kub; if (charSequence == null || charSequence.length() <= 0) { charSequence = new o(com_tencent_mm_protocal_c_ate.lOd).toString(); if (charSequence == null || charSequence.length() <= 0) { charSequence = com_tencent_mm_protocal_c_ate.vLN; if (charSequence != null) { } } } } textView2.setText(charSequence); textView = aVar2.zcB; if (com_tencent_mm_protocal_c_ate != null) { if (com_tencent_mm_protocal_c_ate.wsC == 0) { charSequence2 = com_tencent_mm_protocal_c_ate.ksU; } else if (com_tencent_mm_protocal_c_ate.wsC == 2) { charSequence2 = com_tencent_mm_protocal_c_ate.ksU; } else if (com_tencent_mm_protocal_c_ate.wsC == 1) { str = com_tencent_mm_protocal_c_ate.ksU; if (!bh.ov(str)) { split = str.split("@"); charSequence2 = (split != null || split.length < 2 || bh.ov(split[0])) ? "" : "@" + split[0]; } } textView.setText(charSequence2); aVar2.ilA.setChecked(this.ily[i]); } charSequence2 = ""; textView.setText(charSequence2); aVar2.ilA.setChecked(this.ily[i]); } charSequence = ""; textView2.setText(charSequence); textView = aVar2.zcB; if (com_tencent_mm_protocal_c_ate != null) { if (com_tencent_mm_protocal_c_ate.wsC == 0) { charSequence2 = com_tencent_mm_protocal_c_ate.ksU; } else if (com_tencent_mm_protocal_c_ate.wsC == 2) { charSequence2 = com_tencent_mm_protocal_c_ate.ksU; } else if (com_tencent_mm_protocal_c_ate.wsC == 1) { str = com_tencent_mm_protocal_c_ate.ksU; if (bh.ov(str)) { split = str.split("@"); if (split != null) { } } } textView.setText(charSequence2); aVar2.ilA.setChecked(this.ily[i]); } charSequence2 = ""; textView.setText(charSequence2); aVar2.ilA.setChecked(this.ily[i]); } return view; } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
0fbb7822ba5ea26c986805ac24a192a3b1dba291
e5af5bce5ae99a4210205704d29c22dadc1fd03d
/src/main/java/org/drip/sample/fundinghistorical/GBPShapePreserving1YForward.java
426ec1ad29a9750ada37e5b176e9b31f42543d06
[ "Apache-2.0" ]
permissive
idreamsfy/DRIP
7a5f969b1ca51f6cf957704ecb043d502c4c4bbc
f20cb7457efaadb7ff109fbcea0be0b9d9106230
refs/heads/master
2021-11-03T06:38:49.457972
2019-01-13T09:21:13
2019-01-13T09:21:13
100,677,021
0
0
Apache-2.0
2019-01-13T09:21:03
2017-08-18T05:43:52
Java
UTF-8
Java
false
false
7,016
java
package org.drip.sample.fundinghistorical; import java.util.Map; import org.drip.analytics.date.JulianDate; import org.drip.feed.loader.*; import org.drip.historical.state.FundingCurveMetrics; import org.drip.quant.common.FormatUtil; import org.drip.service.env.EnvManager; import org.drip.service.state.FundingCurveAPI; import org.drip.service.template.LatentMarketStateBuilder; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2017 Lakshmi Krishnamurthy * Copyright (C) 2016 Lakshmi Krishnamurthy * * This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model * libraries targeting analysts and developers * https://lakshmidrip.github.io/DRIP/ * * DRIP is composed of four main libraries: * * - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/ * - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/ * - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/ * - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/ * * - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options, * Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA * Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV * Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM * Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics. * * - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy * Incorporator, Holdings Constraint, and Transaction Costs. * * - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality. * * - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning. * * 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. */ /** * GBPShapePreserving1YForward Generates the Historical GBP Shape Preserving Funding Curve Native 1Y * Compounded Forward Rate. * * @author Lakshmi Krishnamurthy */ public class GBPShapePreserving1YForward { public static final void main ( final String[] astrArgs) throws Exception { EnvManager.InitEnv (""); String strCurrency = "GBP"; String strClosesLocation = "C:\\DRIP\\CreditAnalytics\\Daemons\\Transforms\\FundingStateMarks\\" + strCurrency + "ShapePreservingReconstitutor.csv"; String[] astrForTenor = new String[] { "1Y" }; String[] astrInTenor = new String[] { "1Y", "2Y", "3Y", "4Y", "5Y", "6Y", "7Y", "8Y", "9Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", }; String[] astrFixFloatMaturityTenor = new String[] { "1Y", "2Y", "3Y", "4Y", "5Y", "6Y", "7Y", "8Y", "9Y", "10Y", "11Y", "12Y", "15Y", "20Y", "25Y", "30Y", "40Y", "50Y" }; CSVGrid csvGrid = CSVParser.StringGrid ( strClosesLocation, true ); JulianDate[] adtClose = csvGrid.dateArrayAtColumn (0); double[] adblFixFloatQuote1Y = csvGrid.doubleArrayAtColumn (1); double[] adblFixFloatQuote2Y = csvGrid.doubleArrayAtColumn (2); double[] adblFixFloatQuote3Y = csvGrid.doubleArrayAtColumn (3); double[] adblFixFloatQuote4Y = csvGrid.doubleArrayAtColumn (4); double[] adblFixFloatQuote5Y = csvGrid.doubleArrayAtColumn (5); double[] adblFixFloatQuote6Y = csvGrid.doubleArrayAtColumn (6); double[] adblFixFloatQuote7Y = csvGrid.doubleArrayAtColumn (7); double[] adblFixFloatQuote8Y = csvGrid.doubleArrayAtColumn (8); double[] adblFixFloatQuote9Y = csvGrid.doubleArrayAtColumn (9); double[] adblFixFloatQuote10Y = csvGrid.doubleArrayAtColumn (10); double[] adblFixFloatQuote11Y = csvGrid.doubleArrayAtColumn (11); double[] adblFixFloatQuote12Y = csvGrid.doubleArrayAtColumn (12); double[] adblFixFloatQuote15Y = csvGrid.doubleArrayAtColumn (13); double[] adblFixFloatQuote20Y = csvGrid.doubleArrayAtColumn (14); double[] adblFixFloatQuote25Y = csvGrid.doubleArrayAtColumn (15); double[] adblFixFloatQuote30Y = csvGrid.doubleArrayAtColumn (16); double[] adblFixFloatQuote40Y = csvGrid.doubleArrayAtColumn (17); double[] adblFixFloatQuote50Y = csvGrid.doubleArrayAtColumn (18); int iNumClose = adtClose.length; JulianDate[] adtSpot = new JulianDate[iNumClose]; double[][] aadblFixFloatQuote = new double[iNumClose][18]; for (int i = 0; i < iNumClose; ++i) { adtSpot[i] = adtClose[i]; aadblFixFloatQuote[i][0] = adblFixFloatQuote1Y[i]; aadblFixFloatQuote[i][1] = adblFixFloatQuote2Y[i]; aadblFixFloatQuote[i][2] = adblFixFloatQuote3Y[i]; aadblFixFloatQuote[i][3] = adblFixFloatQuote4Y[i]; aadblFixFloatQuote[i][4] = adblFixFloatQuote5Y[i]; aadblFixFloatQuote[i][5] = adblFixFloatQuote6Y[i]; aadblFixFloatQuote[i][6] = adblFixFloatQuote7Y[i]; aadblFixFloatQuote[i][7] = adblFixFloatQuote8Y[i]; aadblFixFloatQuote[i][8] = adblFixFloatQuote9Y[i]; aadblFixFloatQuote[i][9] = adblFixFloatQuote10Y[i]; aadblFixFloatQuote[i][10] = adblFixFloatQuote11Y[i]; aadblFixFloatQuote[i][11] = adblFixFloatQuote12Y[i]; aadblFixFloatQuote[i][12] = adblFixFloatQuote15Y[i]; aadblFixFloatQuote[i][13] = adblFixFloatQuote20Y[i]; aadblFixFloatQuote[i][14] = adblFixFloatQuote25Y[i]; aadblFixFloatQuote[i][15] = adblFixFloatQuote30Y[i]; aadblFixFloatQuote[i][16] = adblFixFloatQuote40Y[i]; aadblFixFloatQuote[i][17] = adblFixFloatQuote50Y[i]; } String strDump = "Date"; for (String strInTenor : astrInTenor) { for (String strForTenor : astrForTenor) strDump += "," + strInTenor + strForTenor; } System.out.println (strDump); Map<JulianDate, FundingCurveMetrics> mapFCM = FundingCurveAPI.HorizonMetrics ( adtSpot, astrFixFloatMaturityTenor, aadblFixFloatQuote, astrInTenor, astrForTenor, strCurrency, LatentMarketStateBuilder.SHAPE_PRESERVING ); for (int i = 0; i < iNumClose; ++i) { FundingCurveMetrics fcm = mapFCM.get (adtSpot[i]); strDump = adtSpot[i].toString(); for (String strInTenor : astrInTenor) { for (String strForTenor : astrForTenor) strDump += "," + FormatUtil.FormatDouble ( fcm.nativeForwardRate ( strInTenor, strForTenor ), 1, 5, 100. ); } System.out.println (strDump); } } }
[ "lakshmi@synergicdesign.com" ]
lakshmi@synergicdesign.com
4bbd178c980baa74d45246ec3838a04fae6e2dff
3a69c55621ff5c7842b684d74e3203029fa0fcfd
/src/main/java/org/aanguita/jacuzzi/concurrency/LockMap.java
b5d1e7e03118016c4e8123a4d9b9e697727e1653
[ "MIT" ]
permissive
albertoanguita/jacuzzi
119b6174d6a259157f1bf58f2e6b373c9fe5d9e1
cf9b40f37c55b8c5bef548aa2e8fe22777fd8982
refs/heads/master
2020-04-15T00:23:34.073057
2018-04-02T07:05:36
2018-04-02T07:05:36
42,078,122
1
0
MIT
2018-02-01T09:29:01
2015-09-07T22:54:16
Java
UTF-8
Java
false
false
666
java
package org.aanguita.jacuzzi.concurrency; import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * @deprecated use ObjectMapPool * A generic map of re-entrant locks */ public class LockMap<T> { private final Map<T, Lock> locks; public LockMap() { locks = new HashMap<>(); } public synchronized Lock getLock(T index) { if (!locks.containsKey(index)) { locks.put(index, new ReentrantLock()); } return locks.get(index); } public synchronized void removeLock(T index) { locks.remove(index); } }
[ "alberto.anguita@gmail.com" ]
alberto.anguita@gmail.com
a995f7e825c9501a78e274de1ddb8b5671c16962
c06b04186855e4e0fe5e771239b31983d92bbdd7
/T1809-Java_Architect/01_Java_Beginner/01_Java300/010_Network/doc/Code/003_Net/246-250/Net_study03/src/com/sxt/chat01/MultiChat.java
de2b017d9147e3ebb357bf3d70f928d122e0defc
[ "MIT" ]
permissive
specter01wj/ShangXueTang_Course
0c6b8895c684891f72ee3f42c14ac3884d1b7db4
1de238c3385585f07e19815f680277672d2e1b9b
refs/heads/master
2020-04-05T16:46:57.934281
2019-04-17T06:12:26
2019-04-17T06:12:26
157,028,215
0
1
null
null
null
null
UTF-8
Java
false
false
1,094
java
package com.sxt.chat01; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; /** * 在线聊天室: 服务器 * 目标: 实现一个客户可以正常收发多条消息 * * @author 裴新 QQ:3401997271 * */ public class MultiChat { public static void main(String[] args) throws IOException { System.out.println("-----Server-----"); // 1、指定端口 使用ServerSocket创建服务器 ServerSocket server =new ServerSocket(8888); // 2、阻塞式等待连接 accept Socket client =server.accept(); System.out.println("一个客户端建立了连接"); DataInputStream dis =new DataInputStream(client.getInputStream()); DataOutputStream dos =new DataOutputStream(client.getOutputStream()); boolean isRunning = true; while(isRunning) { //3、接收消息 String msg =dis.readUTF(); //4、返回消息 dos.writeUTF(msg); //释放资源 dos.flush(); } dos.close(); dis.close(); client.close(); } }
[ "specter01wj@gmail.com" ]
specter01wj@gmail.com
51ca5a5bc4fc76b44f83a223fb9aae97fc04a9ee
7954b7da027a58509da4b5e394eb8bd579f320a0
/conveniadas/src/main/java/br/com/valid/bio/conveniadas/abis/service/transformers/response/AbstractBaseResponseTransformer.java
59e1201177d6b3fcb5f333d22fc93abd7867b0df
[ "Apache-2.0" ]
permissive
Einhart/projetos_legados
75fee02415f5d51728e524e6b58d80fce88dc6e2
5984efdd27db4a6c65d86b77e290253c722a67e3
refs/heads/master
2022-11-13T01:37:02.962729
2020-03-08T14:09:50
2020-03-08T14:09:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package br.com.valid.bio.conveniadas.abis.service.transformers.response; import br.com.valid.bio.conveniadas.abis.model.response.AbstractResponse; import br.com.valid.bio.conveniadas.model.RequestBase; import br.com.valid.bio.conveniadas.model.response.v2.ResponseData; public abstract class AbstractBaseResponseTransformer<U extends RequestBase , S extends AbstractResponse> extends ErrorResponseTransformer<U,S,ResponseData>{ @Override public ResponseData apply(U agreementRequest, S baseResponse) { ResponseData response = null; if (containErrors(baseResponse)) { response = crateResponseDataError(mountErrorMessage(baseResponse)); }else { response = populateSuccessfulResponse(agreementRequest , baseResponse); } return response; } abstract ResponseData populateSuccessfulResponse(U agreementRequest, S baseResponse); }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
0cce3ece579e01f56c035de66edc39375b24b5ac
535e5d97d44fd42fca2a6fc68b3b566046ffa6c2
/com/google/android/gms/tagmanager/zzn.java
b259a4439e2f664bb60f2bf064c58f3ad1c37b11
[]
no_license
eric-lanita/BigRoadTruckingLogbookApp_v21.0.12_source_from_JADX
47566c288bc89777184b73ef0eb199b61de39f82
fb84301d90ec083ce06c68a3828cf99d8855c007
refs/heads/master
2021-09-01T07:02:52.500068
2017-12-25T15:06:05
2017-12-25T15:06:05
115,346,008
0
3
null
null
null
null
UTF-8
Java
false
false
704
java
package com.google.android.gms.tagmanager; import com.google.android.gms.internal.zzaf; import com.google.android.gms.internal.zzag; import com.google.android.gms.internal.zzai.zza; import java.util.Map; class zzn extends zzal { private static final String f12778a = zzaf.CONSTANT.toString(); private static final String f12779b = zzag.VALUE.toString(); public zzn() { super(f12778a, f12779b); } public static String zzcaj() { return f12778a; } public static String zzcak() { return f12779b; } public zza zzav(Map<String, zza> map) { return (zza) map.get(f12779b); } public boolean zzcag() { return true; } }
[ "eric.lanita@gmail.com" ]
eric.lanita@gmail.com
686cee63bf35fe694aff003021fe8c4c813ca4c0
c75e6df08eb4065ab80fcc1dcc1cb38ac1256f72
/web/plugins/com.seekon.nextbi.pivot/src/com/tensegrity/wpalo/client/ui/mvc/modeller/ServerEditor.java
2ba91dd8a977e65cff44a9a5b2bc03cbf77ba0b2
[]
no_license
jerome-nexedi/nextbi
7b219c1ec64b21bebf4ccf77c730e15a8ad1c6de
0179b30bf6a86ae6a070434a3161d7935f166b42
refs/heads/master
2021-01-10T09:06:15.838199
2012-11-14T11:59:53
2012-11-14T11:59:53
36,644,370
0
0
null
null
null
null
UTF-8
Java
false
false
6,120
java
/* * * @file ServerEditor.java * * Copyright (C) 2006-2009 Tensegrity Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as published * by the Free Software Foundation at http://www.gnu.org/copyleft/gpl.html. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * If you are developing and distributing open source applications under the * GPL License, then you are free to use JPalo Modules under the GPL License. For OEMs, * ISVs, and VARs who distribute JPalo Modules with their products, and do not license * and distribute their source code under the GPL, Tensegrity provides a flexible * OEM Commercial License. * * @author Philipp Bouillon <Philipp.Bouillon@tensegrity-software.com> * * @version $Id: ServerEditor.java,v 1.14 2009/12/17 16:14:20 PhilippBouillon Exp $ * */ /* * (c) Tensegrity Software 2008 * All rights reserved */ package com.tensegrity.wpalo.client.ui.mvc.modeller; import com.extjs.gxt.ui.client.Style.HorizontalAlignment; import com.extjs.gxt.ui.client.Style.Orientation; import com.extjs.gxt.ui.client.Style.Scroll; import com.extjs.gxt.ui.client.widget.ContentPanel; import com.extjs.gxt.ui.client.widget.TabPanel; import com.extjs.gxt.ui.client.widget.form.FormPanel; import com.extjs.gxt.ui.client.widget.form.TextField; import com.extjs.gxt.ui.client.widget.layout.RowData; import com.extjs.gxt.ui.client.widget.layout.RowLayout; import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem; import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem; import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; import com.google.gwt.user.client.rpc.AsyncCallback; import com.tensegrity.palo.gwt.core.client.models.XObject; import com.tensegrity.palo.gwt.core.client.models.palo.XServer; import com.tensegrity.wpalo.client.ui.editor.CloseObserver; import com.tensegrity.wpalo.client.ui.editor.IEditor; import com.tensegrity.wpalo.client.ui.model.TreeNode; /** * <code>UserEditor</code> TODO DOCUMENT ME * * @version $Id: ServerEditor.java,v 1.14 2009/12/17 16:14:20 PhilippBouillon * Exp $ **/ public class ServerEditor implements IEditor { private ContentPanel content; // private Html header; private EditorTab[] tabs; private final TabPanel tabFolder; public ServerEditor() { // create content: content = new ContentPanel(); content.setBodyBorder(false); content.setHeaderVisible(false); content.setScrollMode(Scroll.AUTO); // content.setHeading("Properties"); content.setButtonAlign(HorizontalAlignment.RIGHT); // da toolbar ToolBar toolbar = new ToolBar(); TextToolItem save = new TextToolItem("Save", "icon-save"); toolbar.add(save); toolbar.add(new SeparatorToolItem()); content.setTopComponent(toolbar); tabFolder = new TabPanel(); tabFolder.setTabScroll(true); addTabs(tabFolder); RowLayout layout = new RowLayout(Orientation.VERTICAL); content.setLayout(layout); content.add(tabFolder, new RowData(1, 1)); } public void beforeClose(AsyncCallback<Boolean> cb) { cb.onSuccess(true); } public final void close(CloseObserver observer) { tabFolder.removeAll(); tabFolder.removeFromParent(); if (observer != null) observer.finishedClosed(); } public String getId() { // TODO Auto-generated method stub return null; } public ContentPanel getPanel() { return content; } public String getTitle() { return "Server Editor"; } public final void setInput(Object input) { if (input instanceof TreeNode) { XObject _input = ((TreeNode) input).getXObject(); for (EditorTab tab : tabs) tab.set(_input); } } private final void addTabs(TabPanel tabFolder) { tabs = new EditorTab[] { new ServerGeneralTab() }; for (EditorTab tab : tabs) tabFolder.add(tab); } public void doSave(AsyncCallback<Boolean> cb) { // TODO Auto-generated method stub } public Object getInput() { // TODO Auto-generated method stub return null; } public void markDirty() { // TODO Auto-generated method stub } public boolean isDirty() { return false; } public void selectFirstTab() { // TODO Auto-generated method stub } public void setTextCursor() { // TODO Auto-generated method stub } } class ServerGeneralTab extends EditorTab { // properties: private TextField<String> serverName; private TextField<String> lastname; private TextField<String> login; ServerGeneralTab() { setText("General"); setIconStyle("icon-server"); setClosable(false); setScrollMode(Scroll.AUTO); add(createPropertiesPanel()); } void set(XObject input) { if (input instanceof XServer) { XServer server = (XServer) input; serverName.setValue(server.getName()); // lastname.setValue(user.getLastname()); // login.setValue(user.getLogin()); } } private final ContentPanel createPropertiesPanel() { FormPanel panel = new FormPanel(); panel.setHeaderVisible(false); panel.setButtonAlign(HorizontalAlignment.RIGHT); panel.setStyleAttribute("padding", "20"); serverName = new TextField<String>(); serverName.setFieldLabel("Server Name"); serverName.setEmptyText("Please enter the server name"); serverName.setAllowBlank(false); serverName.setMinLength(1); panel.add(serverName); return panel; } }
[ "undyliu@126.com" ]
undyliu@126.com
7f53bd7e8802dfef586f6973357b042f8f0fe0e0
6f431761901823c73535593951e3f8eb491de6ef
/gmall-ums/src/main/java/com/zrq/gmall/ums/mapper/AdminMapper.java
9b275f682165e6ef5b3b5a4c15ce7d8197787aa1
[]
no_license
zrqHazard/gmall1
230d11a62d94e4be73f925a333b80f4442d6ce89
d1fd42551f26ddc525fcc03d4ab3bc4d20126097
refs/heads/master
2022-06-30T05:11:24.074380
2020-03-20T11:18:47
2020-03-20T11:18:47
247,693,604
0
0
null
2022-06-21T03:00:00
2020-03-16T12:13:48
Java
UTF-8
Java
false
false
290
java
package com.zrq.gmall.ums.mapper; import com.zrq.gmall.api.ums.entity.Admin; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * 后台用户表 Mapper 接口 * </p> * * @author zrq * @since 2020-03-12 */ public interface AdminMapper extends BaseMapper<Admin> { }
[ "zhangsan@itcast.cn" ]
zhangsan@itcast.cn
62aec5c3c92b25a5a578006053fabaa3bb35f7fb
fb5bfb5b4cf7a118cb858490953e69517d8060a4
/src/ch21/ex05/codea/CallableDemo.java
b44ac0fb86406ee4535a3d875605b94f61f64227
[]
no_license
v777779/jbook
573dd1e4e3847ed51c9b6b66d2b098bf8eb58af5
09fc56a27e9aed797327f01ea955bdf1815d0d54
refs/heads/master
2021-09-19T08:14:16.299382
2018-07-25T14:03:12
2018-07-25T14:03:12
86,017,001
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
package ch21.ex05.codea; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; /** * Vadim Voronov * Created: 28-Apr-17. * email: vadim.v.voronov@gmail.com */ public class CallableDemo { public static void check() { ExecutorService exec = Executors.newCachedThreadPool(); // создаем pool потоков List<Future<String>> results = new ArrayList<>(); for (int i = 0; i < 10; i++) { results.add(exec.submit(new TaskWithResult(i))); // входной параметр номер потока =id } // загнали все потоки в список <Future<T>> и они сразу пошли на выполнение for (Future<String> fs : results) { // прогоняем список try { System.out.println(fs.get()); // получить результат с блокировкой текущего потока if(fs.isDone()) { System.out.println(fs.get()); // получить результат если готов, иначе далее } } catch (InterruptedException e) { System.out.println(e); return; } catch (ExecutionException e) { System.out.println(e); }finally { exec.shutdown(); // закрыть poll потоков по любому } } } }
[ "vadim.v.voronov@gmail.com" ]
vadim.v.voronov@gmail.com
91cd2fa49c1237527f28d596ba8f63839402db59
3ebaee3a565d5e514e5d56b44ebcee249ec1c243
/assetBank 3.77 decomplied fixed/src/java/com/bright/framework/file/DefaultBeanWriter.java
8728e341a1d773d1bbcde48342d02ca78a89a237
[]
no_license
webchannel-dev/Java-Digital-Bank
89032eec70a1ef61eccbef6f775b683087bccd63
65d4de8f2c0ce48cb1d53130e295616772829679
refs/heads/master
2021-10-08T19:10:48.971587
2017-11-07T09:51:17
2017-11-07T09:51:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,172
java
/* */ package com.bright.framework.file; /* */ /* */ import com.bn2web.common.exception.Bn2Exception; /* */ import com.bright.framework.util.StringUtil; /* */ import java.io.BufferedWriter; /* */ import java.io.IOException; /* */ import java.io.Writer; /* */ import java.lang.reflect.InvocationTargetException; /* */ import java.lang.reflect.Method; /* */ import java.util.ArrayList; /* */ import java.util.Vector; /* */ import org.apache.commons.lang.StringUtils; /* */ /* */ public class DefaultBeanWriter /* */ implements BeanWriter /* */ { /* */ private static final String c_ksClassName = "DefaultFileFormatter"; /* 43 */ private BufferedWriter m_writer = null; /* 44 */ private FileFormat m_format = null; /* */ /* */ public DefaultBeanWriter(BufferedWriter a_fileWriter, FileFormat a_format) /* */ { /* 53 */ this.m_writer = a_fileWriter; /* 54 */ this.m_format = a_format; /* */ } /* */ /* */ protected Writer getWriter() /* */ { /* 59 */ return this.m_writer; /* */ } /* */ /* */ protected FileFormat getFormat() /* */ { /* 64 */ return this.m_format; /* */ } /* */ /* */ public void writeBeansWithPropertyHeader(Vector a_vec, BeanWrapper a_wrapper) /* */ throws Bn2Exception /* */ { /* 88 */ writeBeans(a_vec, a_wrapper, true); /* */ } /* */ /* */ public void writeBeans(Vector a_vec, BeanWrapper a_wrapper) /* */ throws Bn2Exception /* */ { /* 103 */ writeBeans(a_vec, a_wrapper, false); /* */ } /* */ /* */ public void writeBeans(Vector a_vec, BeanWrapper a_wrapper, boolean a_bWriteHeader) /* */ throws Bn2Exception /* */ { /* 122 */ String ksMethodName = "writeObjectsWithHeader"; /* 123 */ Object object = null; /* */ try /* */ { /* 127 */ Class cObjectType = null; /* */ /* 129 */ if (a_wrapper != null) /* */ { /* 131 */ cObjectType = a_wrapper.getClass(); /* */ } /* */ else /* */ { /* 136 */ cObjectType = a_vec.get(0).getClass(); /* */ } /* */ /* 140 */ Vector vecMethods = getStringGetters(cObjectType); /* 141 */ ArrayList vecExtraHeaders = getExtraHeaders(); /* */ /* 143 */ if (a_bWriteHeader) /* */ { /* 146 */ writePropertyNames(vecMethods, vecExtraHeaders); /* */ } /* */ /* 151 */ for (int i = 0; i < a_vec.size(); i++) /* */ { /* 154 */ this.m_writer.write(this.m_format.getRecordDelimiter()); /* */ /* 157 */ object = a_vec.get(i); /* */ /* 160 */ if (a_wrapper != null) /* */ { /* 162 */ a_wrapper.setObjectToWrap(object); /* 163 */ object = a_wrapper; /* */ } /* */ /* 167 */ ArrayList vecExtraValues = getExtraValues(object, vecExtraHeaders); /* 168 */ writePropertyValues(object, vecMethods, vecExtraValues); /* */ } /* */ } /* */ catch (IOException e) /* */ { /* 173 */ throw new Bn2Exception("DefaultFileFormatter.writeObjectsWithHeader - " + e.getMessage(), e); /* */ } /* */ catch (IllegalAccessException e) /* */ { /* 177 */ throw new Bn2Exception("DefaultFileFormatter.writeObjectsWithHeader - " + e.getMessage(), e); /* */ } /* */ catch (InvocationTargetException e) /* */ { /* 181 */ throw new Bn2Exception("DefaultFileFormatter.writeObjectsWithHeader - " + e + " calling method on " + object.getClass().getName() + " - " + e.getTargetException(), e.getTargetException()); /* */ } /* */ } /* */ /* */ protected void writePropertyNames(Vector<Method> a_vecMethods, ArrayList<String> a_extras) /* */ throws IOException /* */ { /* 203 */ Method method = null; /* */ /* 205 */ for (int i = 0; i < a_vecMethods.size(); i++) /* */ { /* 208 */ if (i > 0) /* */ { /* 210 */ this.m_writer.write(this.m_format.getFieldDelimiter()); /* */ } /* */ /* 214 */ method = (Method)a_vecMethods.get(i); /* */ /* 217 */ this.m_writer.write(getPropertyName(method)); /* */ } /* */ /* 221 */ if (a_extras != null) /* */ { /* 223 */ for (String header : a_extras) /* */ { /* 225 */ this.m_writer.write(this.m_format.getFieldDelimiter()); /* 226 */ this.m_writer.write(header); /* */ } /* */ } /* */ } /* */ /* */ protected void writePropertyValues(Object a_object, Vector a_vecMethods, ArrayList<String> a_extras) /* */ throws IOException, IllegalAccessException, InvocationTargetException /* */ { /* 246 */ Method method = null; /* 247 */ for (int i = 0; i < a_vecMethods.size(); i++) /* */ { /* 250 */ if (i > 0) /* */ { /* 252 */ this.m_writer.write(this.m_format.getFieldDelimiter()); /* */ } /* */ /* 256 */ method = (Method)a_vecMethods.get(i); /* */ /* 259 */ String sValue = (String)method.invoke(a_object, (Object[])null); /* */ /* 261 */ if (sValue == null) /* */ { /* 263 */ sValue = ""; /* */ } /* */ /* 266 */ sValue = getEscapedValue(sValue); /* */ /* 269 */ this.m_writer.write(sValue); /* */ } /* */ /* 273 */ if (a_extras != null) /* */ { /* 275 */ for (String sValue : a_extras) /* */ { /* 277 */ this.m_writer.write(this.m_format.getFieldDelimiter()); /* 278 */ this.m_writer.write(sValue); /* */ } /* */ } /* */ } /* */ /* */ protected String getEscapedValue(String sValue) /* */ { /* 292 */ sValue = StringUtil.replaceString(sValue, "\t", " "); /* */ /* 295 */ if (StringUtils.isNotEmpty(this.m_format.getLiteralDelimiter())) /* */ { /* 297 */ if ((sValue.indexOf('\n') >= 0) || (sValue.indexOf('\r') >= 0)) /* */ { /* 299 */ sValue = sValue.replaceAll(this.m_format.getLiteralDelimiter(), this.m_format.getLiteralDelimiterEscapedReplacement()); /* 300 */ sValue = this.m_format.getLiteralDelimiter() + sValue + this.m_format.getLiteralDelimiter(); /* */ } /* */ } /* 303 */ return sValue; /* */ } /* */ /* */ protected Vector<Method> getStringGetters(Class a_class) /* */ { /* 320 */ Vector vecMethods = new Vector(); /* */ /* 323 */ Method[] aMethods = a_class.getMethods(); /* */ /* 326 */ if (aMethods != null) /* */ { /* 328 */ for (int i = 0; i < aMethods.length; i++) /* */ { /* 331 */ if ((!aMethods[i].getReturnType().equals(String.class)) || (!aMethods[i].getName().substring(0, 3).equals("get")) || (aMethods[i].getParameterTypes().length != 0)) /* */ { /* */ continue; /* */ } /* 335 */ vecMethods.add(aMethods[i]); /* */ } /* */ /* */ } /* */ /* 341 */ return vecMethods; /* */ } /* */ /* */ protected ArrayList<String> getExtraHeaders() /* */ throws Bn2Exception /* */ { /* 354 */ return null; /* */ } /* */ /* */ protected ArrayList<String> getExtraValues(Object a_object, ArrayList<String> a_alExtraHeaders) /* */ throws Bn2Exception /* */ { /* 368 */ return null; /* */ } /* */ /* */ private String getPropertyName(Method a_method) /* */ { /* 383 */ String sPropertyName = null; /* 384 */ if (a_method.getName().length() > 3) /* */ { /* 387 */ sPropertyName = a_method.getName().substring(3, a_method.getName().length()); /* */ } /* */ /* 390 */ return sPropertyName; /* */ } /* */ } /* Location: C:\Users\mamatha\Desktop\com.zip * Qualified Name: com.bright.framework.file.DefaultBeanWriter * JD-Core Version: 0.6.0 */
[ "42003122+code7885@users.noreply.github.com" ]
42003122+code7885@users.noreply.github.com
731b35f349e78318e1f0dced5c5c47cea45395d9
6952304298d66aedb06b0db8687a3c2a8a250630
/JaydeStudy/src_algorithm/main/java/net/jayde/study/Als4Study/sort/selectSort/SelectSort.java
b1ecde07668d047489a653905fd970409e8b1643
[]
no_license
jaydezhou/JavaCS
fe16aa2a5d5505456d67f1b1be9f9af24b5997de
033d77c41c3f03bd1cd6d2f9ca7c9f5ece97a960
refs/heads/master
2022-12-20T20:23:52.412789
2019-12-20T09:07:03
2019-12-20T09:07:03
119,678,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,647
java
package net.jayde.study.Als4Study.sort.selectSort; import net.jayde.study.Als4Study.sort.AbstractSort; import net.jayde.study.Als4Study.test.PrepareData; import java.util.Comparator; import java.util.Date; public class SelectSort extends AbstractSort { public void sort(int range) { PrepareData prepareData = new PrepareData(); int[] datas = prepareData.getData(range); for (int i = 0; i < range; i++) { // System.out.println(datas[i]); } for (int i = 0; i < range - 1; i++) { int min = datas[i]; int pos = i; for (int j = i + 1; j < range; j++) { if (datas[j] < min) { min = datas[j]; pos = j; } } exch(datas, i, pos); } for (int i = 0; i < range; i++) { // System.out.println(datas[i]); } } public static void main(String[] args) { SelectSort selectSort = new SelectSort(); Date start = new Date(); selectSort.sort(100000); Date end = new Date(); long space = end.getTime() - start.getTime(); System.out.println("times:" + space / 1000f + "s"); } @Override public void sort(Comparable[] a) { } @Override public void sort(Comparable[] a, int lo, int hi) { } @Override public void sort(Object[] a, Comparator comparator) { } @Override public void sort(Object[] a, int lo, int hi, Comparator comparator) { } @Override public int[] indexSort(Comparable[] a) { return new int[0]; } }
[ "jayde@sohu.com" ]
jayde@sohu.com
796fc647de366ec006624bcdf9a7ff3407f24899
69811b3605a9830c74f54df374bbe61b0ce271ff
/rpcone-server/src/rpcone/server/RpconeServer.java
14bf2c7b320ae20a8c2ef3f3af56a77e881b87a9
[]
no_license
alitorabi1/WebServices
178d0c4420cd3222544bd82267f42039e96becb9
cdc8a6bae6fcbc5ebbf1f5ad6d9a3fa70a61bda2
refs/heads/master
2021-01-11T04:24:54.537357
2016-12-19T03:05:54
2016-12-19T03:05:54
71,164,898
0
0
null
null
null
null
UTF-8
Java
false
false
2,022
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package rpcone.server; import org.apache.xmlrpc.server.PropertyHandlerMapping; import org.apache.xmlrpc.server.XmlRpcServer; import org.apache.xmlrpc.server.XmlRpcServerConfigImpl; import org.apache.xmlrpc.webserver.WebServer; /** * * @author ipd */ public class RpconeServer { private static final int port = 8080; public static void main(String[] args) throws Exception { // Create web server and XML-RPC server connected to it WebServer webServer = new WebServer(port); XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer(); // tell XML-RPC server which classes contain methods to map PropertyHandlerMapping phm = new PropertyHandlerMapping(); /* Load handler definitions from a property file. * The property file might look like: * Calculator=org.apache.xmlrpc.demo.Calculator * org.apache.xmlrpc.demo.proxy.Adder=org.apache.xmlrpc.demo.proxy.AdderImpl */ /*phm.load(Thread.currentThread().getContextClassLoader(), "MyHandlers.properties");*/ /* You may also provide the handler classes directly, * like this: * phm.addHandler(org.apache.xmlrpc.demo.proxy.Adder.class.getName(), * org.apache.xmlrpc.demo.proxy.AdderImpl.class); */ phm.addHandler("Calculator", rpcone.server.Calculator.class); phm.addHandler("Echo", rpcone.server.Echo.class); xmlRpcServer.setHandlerMapping(phm); // Set some additional options XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlRpcServer.getConfig(); serverConfig.setEnabledForExtensions(true); serverConfig.setContentLengthOptional(false); // start web server and don't stop webServer.start(); } }
[ "alitorabi1@gmail.com" ]
alitorabi1@gmail.com
c2bda48098267229b86e5f5ca9d037a455a2f577
f2b70e4c2f38ff4a814650df12ee9cecd877c65a
/src/main/java/osm5/ns/yang/nfvo/nsr/rev170208/cloud/config/SshAuthorizedKey.java
3b9a68a9c5615fb65c3bdeea120f1cca0bd4a1c2
[ "Apache-2.0" ]
permissive
5GinFIRE/eu.5ginfire.nbi.osm5java
34f17f78930178bdf3b428db7a0e9b24982c7c2a
19b6a70cd39e5b0eddd1d0a63069532fa2a1cee0
refs/heads/master
2021-08-11T15:50:07.182421
2019-06-14T12:25:45
2019-06-14T12:25:45
182,989,539
0
0
Apache-2.0
2021-08-02T17:16:53
2019-04-23T10:15:57
Java
UTF-8
Java
false
false
1,557
java
package osm5.ns.yang.nfvo.nsr.rev170208.cloud.config; import java.lang.Override; import java.lang.String; import javax.annotation.Nullable; import org.opendaylight.yangtools.yang.binding.Augmentable; import org.opendaylight.yangtools.yang.binding.ChildOf; import org.opendaylight.yangtools.yang.binding.Identifiable; import org.opendaylight.yangtools.yang.common.QName; import osm5.ns.yang.nfvo.nsr.rev170208.$YangModuleInfoImpl; import osm5.ns.yang.nfvo.nsr.rev170208.CloudConfig; /** * List of authorized ssh keys as part of cloud-config * * <p> * This class represents the following YANG schema fragment defined in module <b>nsr</b> * <pre> * list ssh-authorized-key { * key key-pair-ref; * leaf key-pair-ref { * type string; * } * } * </pre>The schema path to identify an instance is * <i>nsr/cloud-config/ssh-authorized-key</i> * * <p>To create instances of this class use {@link SshAuthorizedKeyBuilder}. * @see SshAuthorizedKeyBuilder * @see SshAuthorizedKeyKey * */ public interface SshAuthorizedKey extends ChildOf<CloudConfig>, Augmentable<SshAuthorizedKey>, Identifiable<SshAuthorizedKeyKey> { public static final QName QNAME = $YangModuleInfoImpl.qnameOf("ssh-authorized-key"); /** * A reference to the key pair entry in the global key pair table * * * * @return <code>java.lang.String</code> <code>keyPairRef</code>, or <code>null</code> if not present */ @Nullable String getKeyPairRef(); @Override SshAuthorizedKeyKey key(); }
[ "ioannischatzis@gmail.com" ]
ioannischatzis@gmail.com
143903b68e49505ac306731b4c881217e82d4384
522db0ab1d3183efaf4be1f68b5f02895e65eb24
/thirdparty/junit/junit4demo/src/test/java/com/imooc/util/TaskTest1.java
95c76ef26a96688192cf96c28e53c372b65a9752
[ "Apache-2.0" ]
permissive
zkzong/java
036ab8c2312f1496f59ea551be8581b3a5e13808
9ace636f83234d204383d9b5f43dc86139552d93
refs/heads/master
2023-06-24T17:13:05.957929
2023-06-15T14:35:03
2023-06-15T14:35:03
190,161,389
0
1
Apache-2.0
2022-12-16T11:11:26
2019-06-04T08:31:44
Java
UTF-8
Java
false
false
171
java
package com.imooc.util; import org.junit.Test; public class TaskTest1 { @Test public void test() { System.out.println("this is TaskTest1..."); } }
[ "zongzhankui@hotmail.com" ]
zongzhankui@hotmail.com
cfaa0ca5cfb42f0cc928919863ffaacbde4c336f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14475-2-6-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/steps/SaveWikiMetaDataStep_ESTest_scaffolding.java
f2e5f0ecb33a746c18d4bd9d253493d11d200f1f
[]
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
475
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 18 23:11:03 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.internal.steps; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class SaveWikiMetaDataStep_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b8599a4089c7c77560231b2a28817e615f8e4657
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201411/ReservationDetailsErrorReason.java
c2b272b927b1b87ed9d8b912d8c9963431681585
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
4,960
java
package com.google.api.ads.dfp.jaxws.v201411; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ReservationDetailsError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ReservationDetailsError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="UNLIMITED_UNITS_BOUGHT_NOT_ALLOWED"/> * &lt;enumeration value="UNLIMITED_END_DATE_TIME_NOT_ALLOWED"/> * &lt;enumeration value="PERCENTAGE_UNITS_BOUGHT_TOO_HIGH"/> * &lt;enumeration value="DURATION_NOT_ALLOWED"/> * &lt;enumeration value="UNIT_TYPE_NOT_ALLOWED"/> * &lt;enumeration value="COST_TYPE_NOT_ALLOWED"/> * &lt;enumeration value="COST_TYPE_UNIT_TYPE_MISMATCH_NOT_ALLOWED"/> * &lt;enumeration value="LINE_ITEM_TYPE_NOT_ALLOWED"/> * &lt;enumeration value="NETWORK_REMNANT_ORDER_CANNOT_UPDATE_LINEITEM_TYPE"/> * &lt;enumeration value="BACKFILL_WEBPROPERTY_CODE_NOT_ALLOWED"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "ReservationDetailsError.Reason") @XmlEnum public enum ReservationDetailsErrorReason { /** * * There is no limit on the number of ads delivered for a line item when you * set {@link LineItem#duration} to be * {@link LineItemSummary.Duration#NONE}. This can only be set for line * items of type {@link LineItemType#PRICE_PRIORITY}. * * */ UNLIMITED_UNITS_BOUGHT_NOT_ALLOWED, /** * * {@link LineItem#unlimitedEndDateTime} can be set to true for only * line items of type {@link LineItemType#SPONSORSHIP}, * {@link LineItemType#NETWORK}, {@link LineItemType#PRICE_PRIORITY} and * {@link LineItemType#HOUSE}. * * */ UNLIMITED_END_DATE_TIME_NOT_ALLOWED, /** * * When {@link LineItem#lineItemType} is * {@link LineItemType#SPONSORSHIP}, then * {@link LineItem#unitsBought} represents the percentage of * available impressions reserved. That value cannot exceed 100. * * */ PERCENTAGE_UNITS_BOUGHT_TOO_HIGH, /** * * The line item type does not support the specified duration. See * {@link LineItemSummary.Duration} for allowed values. * * */ DURATION_NOT_ALLOWED, /** * * The {@link LineItem#unitType} is not allowed for the given * {@link LineItem#lineItemType}. See {@link UnitType} for allowed * values. * * */ UNIT_TYPE_NOT_ALLOWED, /** * * The {@link LineItem#costType} is not allowed for the * {@link LineItem#lineItemType}. See {@link CostType} for allowed * values. * * */ COST_TYPE_NOT_ALLOWED, /** * * When {@link LineItem#costType} is {@link CostType#CPM}, * {@link LineItem#unitType} must be {@link UnitType#IMPRESSIONS} * and when {@link LineItem#costType} is {@link CostType#CPC}, * {@link LineItem#unitType} must be {@link UnitType#CLICKS}. * * */ COST_TYPE_UNIT_TYPE_MISMATCH_NOT_ALLOWED, /** * * Inventory cannot be reserved for line items which are not of type * {@link LineItemType#SPONSORSHIP} or {@link LineItemType#STANDARD}. * * */ LINE_ITEM_TYPE_NOT_ALLOWED, /** * * Remnant line items from the Google Ad Manager cannot be changed to other * line item types once delivery begins. This restricition does not apply * for new line items created in Doubleclick For Publishers. * * */ NETWORK_REMNANT_ORDER_CANNOT_UPDATE_LINEITEM_TYPE, /** * * A dynamic allocation web property can only be set on a line item of type * AdSense or Ad Exchange. * * */ BACKFILL_WEBPROPERTY_CODE_NOT_ALLOWED, /** * * The value returned if the actual value is not exposed by the requested API version. * * */ UNKNOWN; public String value() { return name(); } public static ReservationDetailsErrorReason fromValue(String v) { return valueOf(v); } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
00720f239fe1330d1afd6e394e099632ffc5bc61
1f79408651b42713fc56d98971be2d1ce899ccb9
/platform/com.netifera.platform.net.packets/com.netifera.platform.net.daemon.sniffing/src/com/netifera/platform/net/internal/daemon/sniffing/StreamModuleContext.java
9494be163f6047462ede2f0109e74469cac141d3
[]
no_license
ne0ke718/netifera
1ef18e3f57310090941e3761e926742cc6f08bd7
17f1ea540973016925cb8a15caabc41da9a8f8f8
refs/heads/master
2021-05-26T18:23:54.276131
2010-03-10T06:46:52
2010-03-10T06:46:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.netifera.platform.net.internal.daemon.sniffing; import com.netifera.platform.net.daemon.sniffing.module.IStreamModuleContext; import com.netifera.platform.net.sniffing.stream.ISessionContext; import com.netifera.platform.net.sniffing.stream.ISessionKey; public class StreamModuleContext implements IStreamModuleContext { private final ISessionContext sessionContext; private final ISniffingModuleOutput output; private final long spaceId; StreamModuleContext(ISessionContext ctx, long spaceId, ISniffingModuleOutput output) { this.sessionContext = ctx; this.spaceId = spaceId; this.output = output; } public ISessionKey getKey() { return sessionContext.getKey(); } public void printOutput(String message) { output.printOutput(message); } public long getRealm() { final Object o = sessionContext.getSessionTag(); if(o == null || !(o instanceof Long)) return -1; return ((Long)o).longValue(); } public long getSpaceId() { return spaceId; } }
[ "bruce@netifera.com" ]
bruce@netifera.com
7068449023e149e23d1e7ece34b2b7756cd1f387
2783eebe81a17f5768b26007c7233b1f6d234694
/Cloud-Service/src/main/java/com/cloud/staff/demo/DesignPatterns/SimpleFactory/SimpleFactory.java
635b9943d05f48d93863dc56542759747db749e9
[]
no_license
zhao-staff-officer/Spring-Cloud
e1d742aff69ce195cff2b8bb0e11103ff089ba75
48cab76123e01c95d8c82347753d975de0a50272
refs/heads/master
2022-10-18T08:13:57.040870
2022-06-22T07:30:22
2022-06-22T07:30:22
166,742,808
9
4
null
2022-10-05T00:32:06
2019-01-21T03:30:29
Java
UTF-8
Java
false
false
420
java
package com.cloud.staff.demo.DesignPatterns.SimpleFactory; public class SimpleFactory { public static Product creatProduct(int type) { if(type==1) { return new ConcreteProduct(); }else { return new ConcreteProduct2(); } } public static void main(String[] args) { SimpleFactory simpleFactory=new SimpleFactory(); Product operInstance=SimpleFactory.creatProduct(2); operInstance.operation(); } }
[ "15196332744@163.com" ]
15196332744@163.com
038c2bb3604f15ec846f83861ce825423e7ce4f7
548d3c3458924c56215e46f265ed4713c55df744
/bukkit/src/main/java/ninja/bytecode/shuriken/bukkit/util/positions/ChunkPosition.java
5c7fa3a2eb54282a1040fd64693e750299591a43
[]
no_license
cyberpwnn/Shuriken
4964fe04d6a86e362651834f983fd40beca08f6c
af3ec709c822db0e5f3cb3380a7e580e006b00d3
refs/heads/master
2023-02-09T13:45:04.983659
2021-01-04T21:02:48
2021-01-04T21:02:48
197,869,024
0
0
null
2020-12-02T18:40:56
2019-07-20T02:27:54
Java
UTF-8
Java
false
false
762
java
package ninja.bytecode.shuriken.bukkit.util.positions; public class ChunkPosition { private int x; private int z; public ChunkPosition(int x, int z) { this.x = x; this.z = z; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getZ() { return z; } public void setZ(int z) { this.z = z; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + x; result = prime * result + z; return result; } @Override public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof ChunkPosition)) { return false; } ChunkPosition other = (ChunkPosition) obj; return x == other.x && z == other.z; } }
[ "danielmillst@gmail.com" ]
danielmillst@gmail.com
3c013fd79b33e423b1b22a8664be5d46ac118ee6
31bc4239d770a252271a6368325a834fc1da3b78
/Eclipse-AmazonPrim-Membership-Workspace/Testxml/src/Amazoneseriesdetail.java
90fce25a78a90deec7abc49452cde172a76c80cf
[]
no_license
rajeshmorya/Hibernate-project
31126fa369599d72455d28f43c134586bb72292a
1141955d186d26c00da04aa4c98b39c7eb337757
refs/heads/master
2020-12-12T08:46:56.999581
2020-01-15T14:01:27
2020-01-15T14:01:27
234,091,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,097
java
// default package // Generated Nov 26, 2019 1:35:49 PM by Hibernate Tools 4.0.1.Final /** * Amazoneseriesdetail generated by hbm2java */ public class Amazoneseriesdetail implements java.io.Serializable { private int amazoneSeriesid; private Aoks aoks; private String amazoneSeriesname; public Amazoneseriesdetail() { } public Amazoneseriesdetail(int amazoneSeriesid) { this.amazoneSeriesid = amazoneSeriesid; } public Amazoneseriesdetail(int amazoneSeriesid, Aoks aoks, String amazoneSeriesname) { this.amazoneSeriesid = amazoneSeriesid; this.aoks = aoks; this.amazoneSeriesname = amazoneSeriesname; } public int getAmazoneSeriesid() { return this.amazoneSeriesid; } public void setAmazoneSeriesid(int amazoneSeriesid) { this.amazoneSeriesid = amazoneSeriesid; } public Aoks getAoks() { return this.aoks; } public void setAoks(Aoks aoks) { this.aoks = aoks; } public String getAmazoneSeriesname() { return this.amazoneSeriesname; } public void setAmazoneSeriesname(String amazoneSeriesname) { this.amazoneSeriesname = amazoneSeriesname; } }
[ "rmorya1@gmail.com" ]
rmorya1@gmail.com
40904ca628b878ea13d1a064b59f533735eb25e9
6bec09f41986913fe04ee29a0cd905b2f2ed6804
/src/main/java/com/project/web/service/ITPayOrderService.java
028242a4ed8658bc35b4c144a6dce224d53a7c81
[]
no_license
renbf/dly_communal
b26598fc90fea98166e4715ccb8d1f511cb2d8cb
c6324fa6122695ee967bd8547edfac53592a24cf
refs/heads/master
2020-05-04T09:10:20.692216
2019-04-11T10:38:10
2019-04-11T10:38:10
178,763,021
0
0
null
null
null
null
UTF-8
Java
false
false
1,173
java
package com.project.web.service; import com.project.web.domain.TPayOrder; import java.util.List; /** * 支付 服务层 * * @author lws * @date 2019-03-15 */ public interface ITPayOrderService { /** * 查询支付信息 * * @param id 支付ID * @return 支付信息 */ public TPayOrder selectTPayOrderById(String id); /** * 查询交易金额 * * @param orderno 订单编号 * @return 订单信息 */ public TPayOrder selectTPayOrderByOrderNo(String orderno); /** * 查询支付列表 * * @param tPayOrder 支付信息 * @return 支付集合 */ public List<TPayOrder> selectTPayOrderList(TPayOrder tPayOrder); /** * 新增支付 * * @param tPayOrder 支付信息 * @return 结果 */ public int insertTPayOrder(TPayOrder tPayOrder); /** * 修改支付 * * @param tPayOrder 支付信息 * @return 结果 */ public int updateTPayOrder(TPayOrder tPayOrder); /** * 删除支付信息 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteTPayOrderByIds(String ids); }
[ "864378535@qq.com" ]
864378535@qq.com
9b864e4c646c55048adfe5484220e99b97021efa
22cd38be8bf986427361079a2f995f7f0c1edeab
/src/main/java/core/erp/trm/web/TRMA0070Controller.java
7ef7c9781fce71d4b1a03a4a969daaa3d94a5ef2
[]
no_license
shaorin62/MIS
97f51df344ab303c85acb2e7f90bb69944f85e0f
a188b02a73f668948246c133cd202fe091aa29c7
refs/heads/master
2021-04-05T23:46:52.422434
2018-03-09T06:41:04
2018-03-09T06:41:04
124,497,033
0
0
null
null
null
null
UTF-8
Java
false
false
2,045
java
package core.erp.trm.web; import java.util.Map; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import core.erp.trm.service.TRMA0070Service; import core.ifw.cmm.request.CoreRequest; import core.ifw.cmm.result.CoreResultData; /** * <pre> * TRMA0070Controller - 제예금명세서 프로그램 컨트롤러 클래스 * </pre> * * @author 황치웅 * @since 2017.01.05 * @version 1.0 * * <pre> * == Modification Information == * Date Modifier Comment * ==================================================== * 2017.01.05 황치웅 Initial Created. * ==================================================== * </pre> * * Copyright INBUS.(C) All right reserved. */ @Controller public class TRMA0070Controller { private static final Logger LOGGER = LoggerFactory.getLogger(TRMA0070Controller.class); @Resource(name="TRMA0070Service") private TRMA0070Service tRMA0070Service; /** * <pre> * 제예금명세서 조회 * </pre> * * @param coreRequest * @param model * @return * @throws Exception */ @RequestMapping(value="/core/erp/trm/TRMA0070_SEARCH00.do") @SuppressWarnings({ "rawtypes", "unchecked" }) public ModelAndView processSEARCH00(CoreRequest coreRequest, ModelMap model) throws Exception { ModelAndView mav = new ModelAndView("coreReturnView"); CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE()); try { Map searchVo = coreRequest.getMapVariableList(); coreResultData.setReturnDataMap((Map<String, Object>) tRMA0070Service.processSEARCH00(searchVo)); coreResultData.setResultMessageSuccessSelect(); } catch(Exception e) { LOGGER.error("processSEARCH00 : " + e.getMessage()); coreResultData.setResultMessageFailSelect(e); } mav.addObject("FORM_DATA", coreResultData); return mav; } }
[ "imosh@nate.com" ]
imosh@nate.com
8fe8fb19b3eeef83d6da60dccb88e3b2e5bc7d69
d6c041879c662f4882892648fd02e0673a57261c
/com/planet_ink/coffee_mud/Items/BasicTech/GenDeflectionShield.java
1dad44c136f0a00f534e6a50ca0bebfb07a5b549
[ "Apache-2.0" ]
permissive
linuxshout/CoffeeMud
15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6
a418aa8685046b08c6d970083e778efb76fd3716
refs/heads/master
2020-04-14T04:17:39.858690
2018-12-29T20:50:15
2018-12-29T20:50:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,669
java
package com.planet_ink.coffee_mud.Items.BasicTech; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.Technical.TechType; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2013-2018 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class GenDeflectionShield extends GenPersonalShield { @Override public String ID() { return "GenDeflectionShield"; } public GenDeflectionShield() { super(); setName("a deflection shield generator"); setDisplayText("a deflection shield generator sits here."); setDescription("The deflection shield generator is worn about the body and activated to use. It deflects all manner of weapon types. "); } @Override protected String fieldOnStr(final MOB viewerM) { return L((owner() instanceof MOB)? "A deflectant field of energy surrounds <O-NAME>.": "A deflectant field of energy surrounds <T-NAME>."); } @Override protected String fieldDeadStr(final MOB viewerM) { return L((owner() instanceof MOB)? "The deflection field around <O-NAME> flickers and dies out.": "The deflection field around <T-NAME> flickers and dies out."); } @Override protected boolean doShield(final MOB mob, final CMMsg msg, final double successFactor) { if(mob.location()!=null) { if(msg.tool() instanceof Weapon) { final String s="^F"+((Weapon)msg.tool()).hitString(0)+"^N"; if(s.indexOf("<DAMAGE> <T-HIM-HER>")>0) mob.location().show(msg.source(),msg.target(),msg.tool(),CMMsg.MSG_OK_VISUAL,CMStrings.replaceAll(s, "<DAMAGE>", L("it deflects off the shield around"))); else if(s.indexOf("<DAMAGES> <T-HIM-HER>")>0) mob.location().show(msg.source(),msg.target(),msg.tool(),CMMsg.MSG_OK_VISUAL,CMStrings.replaceAll(s, "<DAMAGES>", L("deflects off the shield around"))); else mob.location().show(mob,msg.source(),msg.tool(),CMMsg.MSG_OK_VISUAL,L("The field around <S-NAME> deflects the <O-NAMENOART> damage.")); } else mob.location().show(mob,msg.source(),msg.tool(),CMMsg.MSG_OK_VISUAL,L("The field around <S-NAME> deflects the <O-NAMENOART> damage.")); } return false; } @Override protected boolean doesShield(final MOB mob, final CMMsg msg, final double successFactor) { return activated() ?( (Math.random() >= successFactor) ) : false ; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
7ad7dff8bc25b422d0ebd46643b864ec57c37c72
92f10c41bad09bee05acbcb952095c31ba41c57b
/app/src/main/java/io/github/alula/ohmygod/MainActivity1225.java
72bef3d8f55e99ba5a5506b62504d4ef1fad3207
[]
no_license
alula/10000-activities
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
f7e8de658c3684035e566788693726f250170d98
refs/heads/master
2022-07-30T05:54:54.783531
2022-01-29T19:53:04
2022-01-29T19:53:04
453,501,018
16
0
null
null
null
null
UTF-8
Java
false
false
339
java
package io.github.alula.ohmygod; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity1225 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "6276139+alula@users.noreply.github.com" ]
6276139+alula@users.noreply.github.com
97e68ad21a61ed93bb8e8a8624b72bae56d7ec7a
d6038e6e3f98c9f66f6b4517d2bbf5d79e0542c4
/src/main/java/omid/springframework/converters/RecipeToRecipeCommand.java
e5a457da21389995c394f4eee5a99a42dfb9d378
[]
no_license
omid-joukar/spring5-mongo-reciep-app
5ec5f789fd5536ef9637bd98e8058a15d310f3db
237bb3eee8b12a55133fd8d042c8583a8e59789f
refs/heads/master
2023-03-02T01:34:42.902495
2021-02-14T14:43:29
2021-02-14T14:43:29
329,234,566
2
0
null
null
null
null
UTF-8
Java
false
false
2,343
java
package omid.springframework.converters; import omid.springframework.commands.RecipeCommand; import omid.springframework.domain.Category; import omid.springframework.domain.Recipe; import lombok.Synchronized; import org.springframework.core.convert.converter.Converter; import org.springframework.lang.Nullable; import org.springframework.stereotype.Component; /** * Created by jt on 6/21/17. */ @Component public class RecipeToRecipeCommand implements Converter<Recipe, RecipeCommand>{ private final CategoryToCategoryCommand categoryConveter; private final IngredientToIngredientCommand ingredientConverter; private final NotesToNotesCommand notesConverter; public RecipeToRecipeCommand(CategoryToCategoryCommand categoryConveter, IngredientToIngredientCommand ingredientConverter, NotesToNotesCommand notesConverter) { this.categoryConveter = categoryConveter; this.ingredientConverter = ingredientConverter; this.notesConverter = notesConverter; } @Synchronized @Nullable @Override public RecipeCommand convert(Recipe source) { if (source == null) { return null; } final RecipeCommand command = new RecipeCommand(); command.setId(source.getId()); command.setCookTime(source.getCookTime()); command.setPrepTime(source.getPrepTime()); command.setDescription(source.getDescription()); command.setDifficulty(source.getDifficulty()); command.setDirections(source.getDirections()); command.setServings(source.getServings()); command.setSource(source.getSource()); command.setUrl(source.getUrl()); command.setImage(source.getImage()); command.setNotes(notesConverter.convert(source.getNotes())); if (source.getCategories() != null && source.getCategories().size() > 0){ source.getCategories() .forEach((Category category) -> command.getCategories().add(categoryConveter.convert(category))); } if (source.getIngredients() != null && source.getIngredients().size() > 0){ source.getIngredients() .forEach(ingredient -> command.getIngredients().add(ingredientConverter.convert(ingredient))); } return command; } }
[ "joukaromid6@gmail.com" ]
joukaromid6@gmail.com
cbfbe3abe68f05a27326b0dddebbcd69691e869e
5c52ad5c2dbccc649fe27cb3749b3e12d9ad70a3
/src/main/java/com/zea7ot/lc/lvl2/lc0589/Node.java
e23f7a4b946ba15ac3678990e3b5d8c9a9486e85
[]
no_license
XizheSun0914/lc-java-zea7ot
c14c378a099a34cbfa1714820134b145f591a280
d548827ae2ba343904464cac1d3f40420d75c0ec
refs/heads/master
2022-11-25T03:09:56.218685
2020-07-20T22:47:04
2020-07-20T22:47:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package com.zea7ot.lc.lvl2.lc0589; import java.util.List; class Node { protected int val; protected List<Node> children; protected Node(int val){ this.val = val; } protected Node(int val, List<Node> children){ this.val = val; this.children = children; } }
[ "yanglyu.leon.7@gmail.com" ]
yanglyu.leon.7@gmail.com
a4685aa71a3ba665281918c3182323e769b02374
af13f96418a4184b00d88ac2fd328176eabd80e8
/src/main/java/com/creants/creants_2x/core/entities/variables/Variable.java
d2a139cf1e9341051762e9727567172b219a5134
[]
no_license
noobas1937/creants-2x-v1
4745ef45b5172fe97c6fa13bfde65c1bee257e8c
950ddd5fa7953f4808515204bae399f4fe65bbd5
refs/heads/master
2022-01-11T11:04:00.476411
2018-09-19T10:00:27
2018-09-19T10:00:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.creants.creants_2x.core.entities.variables; import com.creants.creants_2x.socket.gate.entities.IQAntArray; import com.creants.creants_2x.socket.gate.entities.IQAntObject; /** * @author LamHM * */ public interface Variable extends Cloneable { String getName(); VariableType getType(); Object getValue(); Boolean getBoolValue(); Integer getIntValue(); Double getDoubleValue(); String getStringValue(); IQAntObject getQAntObjectValue(); IQAntArray getQAntArrayValue(); boolean isNull(); IQAntArray toQAntArray(); }
[ "hamanhlam2005@gmail.com" ]
hamanhlam2005@gmail.com
378f64e8187f276cd9eb71036dfd37b9d941e085
f03fb9b2ae12857d351a3eab581b297d95ac05f2
/ardor3d-core/src/main/java/com/ardor3d/scenegraph/SceneIndexer.java
2c2a6da53e6ab1aa4e63866082fa40e6f956c897
[ "Zlib" ]
permissive
Renanse/Ardor3D
8db6cc198196bd682bb94ff8158b07f66a2c80f4
7df2f1d0ccae867663ef9b511a443dee029112b0
refs/heads/master
2023-07-09T03:46:14.553764
2023-07-04T16:42:46
2023-07-04T16:42:46
6,205,252
182
72
NOASSERTION
2023-06-01T15:20:56
2012-10-13T17:03:04
Java
UTF-8
Java
false
false
2,866
java
/** * Copyright (c) 2008-2021 Bird Dog Games, Inc. * * This file is part of Ardor3D. * * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <https://git.io/fjRmv>. */ package com.ardor3d.scenegraph; import java.util.ArrayList; import java.util.List; import com.ardor3d.bounding.BoundingVolume; import com.ardor3d.light.LightManager; import com.ardor3d.renderer.ContextManager; import com.ardor3d.renderer.RenderContext; import com.ardor3d.renderer.Renderable; import com.ardor3d.renderer.Renderer; import com.ardor3d.scenegraph.event.DirtyEventListener; import com.ardor3d.scenegraph.event.DirtyType; public class SceneIndexer implements DirtyEventListener, Renderable { protected List<Spatial> _rootIndex = new ArrayList<>(); protected LightManager _lightManager = new LightManager(); public static SceneIndexer getCurrent() { final RenderContext context = ContextManager.getCurrentContext(); if (context == null) { return null; } return context.getSceneIndexer(); } public LightManager getLightManager() { return _lightManager; } public void setLightManager(final LightManager manager) { _lightManager = manager; } public void onRender(final Renderer renderer) { if (_lightManager != null) { _lightManager.cleanLights(); _lightManager.renderShadowMaps(renderer, this); } } public void addSceneRoot(final Spatial spat) { spat.addListener(this); _rootIndex.add(spat); onSpatialAttached(spat); } public void removeSceneRoot(final Spatial spat) { spat.removeListener(this); _rootIndex.remove(spat); onSpatialRemoved(spat); } protected void onSpatialAttached(final Spatial spat) { if (_lightManager != null) { _lightManager.addLights(spat); } } protected void onSpatialRemoved(final Spatial spat) { if (_lightManager != null) { _lightManager.removeLights(spat); } } @Override public boolean spatialClean(final Spatial spatial, final DirtyType dirtyType) { // nothing to do here - we only care about dirty return false; } @Override public boolean spatialDirty(final Spatial caller, final DirtyType dirtyType) { if (dirtyType == DirtyType.Attached) { onSpatialAttached(caller); } else if (dirtyType == DirtyType.Detached) { onSpatialRemoved(caller); } return false; } @Override public boolean render(final Renderer renderer) { for (int i = _rootIndex.size(); --i >= 0;) { final var root = _rootIndex.get(i); root.draw(renderer); } return !_rootIndex.isEmpty(); } public BoundingVolume getRootBounds() { // FIXME - Need to generate a valid world bound here - ideally it would only include shadow casters return null; } }
[ "renanse@gmail.com" ]
renanse@gmail.com
5e7d5434959f8250cc45df1a133496025ca38a6b
2a920f5f42c588dad01740da5d8c3d9aecbc2a90
/src/org/deegree/model/filterencoding/capabilities/OperatorFactory110.java
7406cfa49b6b3dfc1d0b663708900f004d7ccc0a
[]
no_license
lat-lon/deegree2-rev30957
40b50297cd28243b09bfd05db051ea4cecc889e4
22aa8f8696e50c6e19c22adb505efb0f1fc805d8
refs/heads/master
2020-04-06T07:00:21.040695
2016-06-28T15:21:56
2016-06-28T15:21:56
12,290,316
0
0
null
2016-06-28T15:21:57
2013-08-22T06:49:45
Java
UTF-8
Java
false
false
5,464
java
// $HeadURL: // /deegreerepository/deegree/src/org/deegree/model/filterencoding/capabilities/OperatorFactory.java,v // 1.1 2005/03/04 16:33:07 mschneider Exp $ /*---------------------------------------------------------------------------- This file is part of deegree, http://deegree.org/ Copyright (C) 2001-2009 by: Department of Geography, University of Bonn and lat/lon GmbH This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact information: lat/lon GmbH Aennchenstr. 19, 53177 Bonn Germany http://lat-lon.de/ Department of Geography, University of Bonn Prof. Dr. Klaus Greve Postfach 1147, 53001 Bonn Germany http://www.geographie.uni-bonn.de/deegree/ e-mail: info@deegree.org ----------------------------------------------------------------------------*/ package org.deegree.model.filterencoding.capabilities; import org.deegree.framework.util.StringTools; import org.deegree.ogcwebservices.getcapabilities.UnknownOperatorNameException; /** * * * * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a> * @author last edited by: $Author: mschneider $ * * @version $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $ */ public class OperatorFactory110 { // comparison operators as defined in filterCapabilities.xsd (1.1.0) /** * */ public final static String LESS_THAN = "LessThan"; /** * */ public final static String GREATER_THAN = "GreaterThan"; /** * */ public final static String LESS_THAN_EQUAL_TO = "LessThanEqualTo"; /** * */ public final static String GREATER_THAN_EQUAL_TO = "GreaterThanEqualTo"; /** * */ public final static String EQUAL_TO = "EqualTo"; /** * */ public final static String NOT_EQUAL_TO = "NotEqualTo"; /** * */ public final static String LIKE = "Like"; /** * */ public final static String BETWEEN = "Between"; /** * */ public final static String NULL_CHECK = "NullCheck"; // spatial operators as defined in filterCapabilities.xsd (1.1.0) /** * */ public final static String BBOX = "BBOX"; /** * */ public final static String EQUALS = "Equals"; /** * */ public final static String DISJOINT = "Disjoint"; /** * */ public final static String INTERSECTS = "Intersects"; /** * */ public final static String TOUCHES = "Touches"; /** * */ public final static String CROSSES = "Crosses"; /** * */ public final static String WITHIN = "Within"; /** * */ public final static String CONTAINS = "Contains"; /** * */ public final static String OVERLAPS = "Overlaps"; /** * */ public final static String BEYOND = "Beyond"; /** * */ public final static String DWITHIN = "DWithin"; /** * * @param name * @return SpatialOperator for name * @throws UnknownOperatorNameException */ public static SpatialOperator createSpatialOperator( String name ) throws UnknownOperatorNameException { if ( name.equals( BBOX ) || name.equals( EQUALS ) || name.equals( DISJOINT ) || name.equals( INTERSECTS ) || name.equals( TOUCHES ) || name.equals( CROSSES ) || name.equals( WITHIN ) || name.equals( CONTAINS ) || name.equals( OVERLAPS ) || name.equals( BEYOND ) || name.equals( DWITHIN ) ) { return new SpatialOperator( name, null ); } String msg = StringTools.concat( 200, "'", name, "' is no valid spatial operator (according to filter ", "encoding specification 1.1.0.)." ); throw new UnknownOperatorNameException( msg ); } /** * * @param name * @return Operator for name * @throws UnknownOperatorNameException */ public static Operator createComparisonOperator( String name ) throws UnknownOperatorNameException { if ( name.equals( LESS_THAN ) || name.equals( GREATER_THAN ) || name.equals( LESS_THAN_EQUAL_TO ) || name.equals( EQUAL_TO ) || name.equals( LESS_THAN_EQUAL_TO ) || name.equals( GREATER_THAN_EQUAL_TO ) || name.equals( EQUAL_TO ) || name.equals( NOT_EQUAL_TO ) || name.equals( LIKE ) || name.equals( BETWEEN ) || name.equals( NULL_CHECK ) ) { return new Operator( name ); } String msg = StringTools.concat( 200, "'", name, "' is no valid comparison operator (according tofilter", " encoding specification 1.1.0.)." ); throw new UnknownOperatorNameException( msg ); } }
[ "erben@lat-lon.de" ]
erben@lat-lon.de
b86d805c34c149db29d3ca05a39dbe476d47e786
a0bd4eb9abcb4358e1614ddb10e064be504cd44c
/sourcecode/project/xmeeting/backend/fwkweb/src/main/java/com/founder/sipbus/syweb/codeprinciple/service/UtilCodePrincipleService.java
ba21024784f86083a621a8279d98c45ac2c971b8
[]
no_license
ljvblfz/x00001
543a7ec9f0b7d4f15e994f2cf27327f9809beb04
91ae562082352a895e9e153540c1f6a2a8aef143
refs/heads/master
2023-08-19T20:03:54.286131
2013-10-21T14:31:14
2013-10-21T14:31:14
47,921,116
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package com.founder.sipbus.syweb.codeprinciple.service; import java.util.ArrayList; import org.springframework.stereotype.Component; import com.founder.sipbus.syweb.codeprinciple.dao.UtilCodePrincipleDaoImpl; import com.founder.sipbus.syweb.codeprinciple.dao.UtilCodePrincipleDetailDaoImpl; import com.founder.sipbus.syweb.codeprinciple.po.UtilCodePrincipleDetail; @Component public class UtilCodePrincipleService { private UtilCodePrincipleDaoImpl utilCodePrincipleDao; private UtilCodePrincipleDetailDaoImpl utilCodePrincipleDetailDao; public UtilCodePrincipleDaoImpl getUtilCodePrincipleDao() { return utilCodePrincipleDao; } public void setUtilCodePrincipleDao( UtilCodePrincipleDaoImpl utilCodePrincipleDao) { this.utilCodePrincipleDao = utilCodePrincipleDao; } public UtilCodePrincipleDetailDaoImpl getUtilCodePrincipleDetailDao() { return utilCodePrincipleDetailDao; } public void setUtilCodePrincipleDetailDao(UtilCodePrincipleDetailDaoImpl utilCodePrincipleDetailDao) { this.utilCodePrincipleDetailDao = utilCodePrincipleDetailDao; } public void addAllUtilCodePrincipleDetail(ArrayList<UtilCodePrincipleDetail> details) { utilCodePrincipleDetailDao.addAll(details); } public void updateDetailByucpGuid(String id, ArrayList<UtilCodePrincipleDetail> details) { utilCodePrincipleDetailDao.deleteByucpGuid(id); for (UtilCodePrincipleDetail utilCodePrincipleDetail : details) { utilCodePrincipleDetail.setUcpGuid(id); } utilCodePrincipleDetailDao.addAll(details); } public void deleteUcpAndUcpd(String[] ids) { for (String string : ids) { utilCodePrincipleDao.delete(string); utilCodePrincipleDetailDao.deleteByucpGuid(string); } } }
[ "zivenlu@gmail.com" ]
zivenlu@gmail.com
90b867cb4ab2e4a71e153ddc63137d805ccc71cc
042342f9dc0e8662a1a7da671ab5dc9d82ccd835
/docs/src/main/resources/samples/shopping-cart/security/callbacks/src/main/java/com/acme/shoppingcart/security/pwcb/PWCBHandler.java
a857547a7095e436ee04c83c5e13f37b79c962db
[ "Apache-2.0" ]
permissive
ksdperera/developer-studio
6fe6d50a66e4fb73de3a4dbeef8d68b461da1ab6
9c0f601b91cc34dda036c660598a93c232260e08
refs/heads/developer-studio-3.8.0
2021-01-15T08:50:21.571267
2018-10-26T12:59:17
2018-10-26T12:59:17
39,486,894
0
1
Apache-2.0
2018-10-26T12:59:18
2015-07-22T05:13:13
Java
UTF-8
Java
false
false
1,395
java
package com.acme.shoppingcart.security.pwcb; import org.apache.ws.security.WSPasswordCallback; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import java.io.IOException; public class PWCBHandler implements CallbackHandler { public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { WSPasswordCallback pwcb = (WSPasswordCallback) callbacks[i]; String id = pwcb.getIdentifer(); int usage = pwcb.getUsage(); if (usage == WSPasswordCallback.USERNAME_TOKEN) { // Logic to get the password to build the username token if ("admin".equals(id)) { pwcb.setPassword("admin"); } } else if (usage == WSPasswordCallback.SIGNATURE || usage == WSPasswordCallback.DECRYPT) { // Logic to get the private key password for signture or decryption if ("wso2carbon".equals(id)) { pwcb.setPassword("wso2carbon"); } if ("service".equals(id)) { pwcb.setPassword("apache"); } } } } }
[ "harshana@wso2.com" ]
harshana@wso2.com
37cd83be159dd6ebe0177f677ad61cec3f8befdf
d9ba5fc43e53596c9cdc8295deef05a94215570d
/Payprocessor/payprocessor-trunk/payprocessor-facade/src/main/java/com/yeepay/g3/facade/payprocessor/dto/NcSmsRequestDTO.java
53b90b42e2cc703a1e02d5d15ee5691de673ad13
[]
no_license
P79N6A/11.9
2189ce53b5adbe629e477d9899e939d87387bcbc
a7dafcb0db716ec3184279f995ed4b5a06a0b92e
refs/heads/master
2021-09-28T02:09:07.464629
2018-11-13T10:01:31
2018-11-13T10:01:31
157,359,968
0
1
null
2018-11-13T10:10:55
2018-11-13T10:10:54
null
UTF-8
Java
false
false
1,470
java
package com.yeepay.g3.facade.payprocessor.dto; import java.io.Serializable; import javax.validation.constraints.NotNull; import com.yeepay.g3.facade.ncpay.enumtype.ReqSmsSendTypeEnum; /** * @author chronos. * @createDate 2016/11/8. */ public class NcSmsRequestDTO implements Serializable { /** * 支付订单号 */ @NotNull(message = "recordNo不能为空") private String recordNo; /** * 验证码类型 */ private ReqSmsSendTypeEnum smsSendType; /** * 需要补充的临时卡信息ID */ private Long tmpCardId; /** * 卡信息 */ private BankCardInfoDTO bankCardInfoDTO; public String getRecordNo() { return recordNo; } public void setRecordNo(String recordNo) { this.recordNo = recordNo; } public ReqSmsSendTypeEnum getSmsSendType() { return smsSendType; } public void setSmsSendType(ReqSmsSendTypeEnum smsSendType) { this.smsSendType = smsSendType; } public Long getTmpCardId() { return tmpCardId; } public void setTmpCardId(Long tmpCardId) { this.tmpCardId = tmpCardId; } public BankCardInfoDTO getBankCardInfoDTO() { return bankCardInfoDTO; } public void setBankCardInfoDTO(BankCardInfoDTO bankCardInfoDTO) { this.bankCardInfoDTO = bankCardInfoDTO; } @Override public String toString() { return "NcSmsRequestDTO{" + "recordNo='" + recordNo + '\'' + ", smsSendType=" + smsSendType + ", tmpCardId=" + tmpCardId + ", bankCardInfoDTO=" + bankCardInfoDTO + '}'; } }
[ "yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local" ]
yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local
c49718ed4b6a6377784a885f027e6f74f902ba19
3b5b12e29fb9865064a84a3a023bb65a3c31502b
/functionalj-core/src/main/java/functionalj/tuple/Tuple2.java
92d48eb339c555b80ce7fee403c7d46b62c0749a
[ "MIT" ]
permissive
zhangyi100/FunctionalJ
a75c744b47d28853d045ef976a2fb8a5e4cab64d
03208077b30a252857e18f6c546a2da5e78fcc61
refs/heads/master
2022-11-15T19:07:50.097818
2019-03-10T06:57:25
2019-03-10T06:57:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,388
java
// ============================================================================ // Copyright (c) 2017-2019 Nawapunth Manusitthipol (NawaMan - http://nawaman.net). // ---------------------------------------------------------------------------- // MIT License // // 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 functionalj.tuple; import static functionalj.function.Func.it; import java.lang.reflect.Array; import java.util.Map; import java.util.function.BiFunction; import java.util.function.Function; import functionalj.function.Absent; import functionalj.function.Func2; import functionalj.list.FuncList; import functionalj.map.FuncMap; import functionalj.map.ImmutableMap; import functionalj.pipeable.Pipeable; import lombok.val; @SuppressWarnings("javadoc") public interface Tuple2<T1, T2> extends Pipeable<Tuple2<T1, T2>> { public static <T1, T2> Tuple2<T1, T2> of(Map.Entry<? extends T1, ? extends T2> entry) { return (entry == null) ? new ImmutableTuple2<>(null, null) : new ImmutableTuple2<>(entry); } public static <T1, T2> Tuple2<T1, T2> of(T1 t1, T2 t2) { return new ImmutableTuple2<>(t1, t2); } public T1 _1(); public T2 _2(); @Override public default Tuple2<T1, T2> __data() { return this; } public default Tuple2<T2, T1> swap() { return Tuple.of(_2(), _1()); } public default ImmutableTuple2<T1, T2> toImmutableTuple() { return ImmutableTuple.of(this); } public default Object[] toArray() { val _1 = _1(); val _2 = _2(); return new Object[] { _1, _2 }; } public default <T> T[] toArray(Class<T> type) { val _1 = _1(); val _2 = _2(); val array = Array.newInstance(type, 2); Array.set(array, 0, _1); Array.set(array, 1, _2); @SuppressWarnings("unchecked") val toArray = (T[])array; return toArray; } public default FuncList<Object> toList() { val _1 = _1(); val _2 = _2(); return FuncList.of(_1, _2); } public default <K> FuncMap<K, Object> toMap(K k1, K k2) { val e1 = (k1 != null) ? ImmutableTuple.of(k1, (Object)_1()) : null; val e2 = (k2 != null) ? ImmutableTuple.of(k2, (Object)_2()) : null; return ImmutableMap.ofEntries(e1, e2); } //== Map == public default <NT1> Tuple2<NT1, T2> map1(Function<? super T1, NT1> mapper) { return map(mapper, it()); } public default <NT2> Tuple2<T1, NT2> map2(Function<? super T2, NT2> mapper) { return map(it(), mapper); } public default <NT1, NT2> Tuple2<NT1, NT2> map(BiFunction<? super T1, ? super T2, Tuple2<NT1, NT2>> mapper) { val _1 = _1(); val _2 = _2(); return mapper.apply(_1, _2); } public default <NT1, NT2> Tuple2<NT1, NT2> map( Function<? super T1, NT1> mapper1, Function<? super T2, NT2> mapper2) { return map(mapper1, mapper2, Tuple::of); } public default <NT1, NT2, T> T map( Function<? super T1, NT1> mapper1, Function<? super T2, NT2> mapper2, BiFunction<? super NT1, ? super NT2, T> mapper) { val _1 = _1(); val _2 = _2(); val n1 = mapper1.apply(_1); val n2 = mapper2.apply(_2); return mapper.apply(n1, n2); } public default <NT2> Tuple2<T1, NT2> map(Absent absent1, Function<? super T2, NT2> mapper2) { val _1 = _1(); val _2 = _2(); val n1 = _1; val n2 = mapper2.apply(_2); return Tuple.of(n1, n2); } public default <NT1> Tuple2<NT1, T2> map(Function<? super T1, NT1> mapper1, Absent absent2) { val _1 = _1(); val _2 = _2(); val n1 = mapper1.apply(_1); val n2 = _2; return Tuple.of(n1, n2); } //== Reduce == public default <TARGET> TARGET reduce(Func2<T1, T2, TARGET> reducer) { val _1 = _1(); val _2 = _2(); val target = reducer.apply(_1, _2); return target; } //== drop == public default T1 drop() { val _1 = _1(); return _1; } }
[ "nawa@nawaman.net" ]
nawa@nawaman.net
7915fbfc637c43e25dbd0eba7f1ee44be7e81b18
dec970ba3d51cb3015ea5e9a4795cdee5df26317
/modules/upms/src/main/java/com/qiqi/upms/model/UpmsUser.java
d9092a68ac8db75f8a984dd907781bf0643aa545
[]
no_license
qiqi513/ql-cloud
725036f1024a0c1301e8f2e8ff9dc3faa48354b7
d904ad9907de34c361e0e3a9a7b20db7e93bc02a
refs/heads/master
2020-04-05T19:28:37.893940
2018-11-12T02:52:05
2018-11-12T02:56:45
157,136,294
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
package com.qiqi.upms.model; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; /** * <p> * * </p> * * @author qiqi * @since 2018-10-08 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) public class UpmsUser implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "user_id", type = IdType.AUTO) private Integer userId; private String username; private String password; private String nickname; private String state; private String description; private Integer orgId; }
[ "admin@example.com" ]
admin@example.com
cd0fd9bd1101d83ab33b682cf684cdfa534688f3
b00e252866e5122532a67f4c3b4da69946f9ad28
/jbpm-flow/src/main/java/org/jbpm/process/core/timer/BusinessCalendar.java
57df333435f43158d18c7ce251a148abfe3efafe
[ "Apache-2.0" ]
permissive
hpaik/BPIM
4d55977359945e1ac23aa49b4faf969f15140110
0ffea0156c80ff967e10777d38ca5328d2d34e4a
refs/heads/master
2021-01-24T03:26:55.165253
2016-07-09T01:53:22
2016-07-09T01:53:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
/* * Copyright 2015 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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.jbpm.process.core.timer; import java.util.Date; /** * BusinessCalendar allows for defining custom definitions of working days, hours and holidays * to be taken under consideration when scheduling time based activities such as timers or deadlines. */ public interface BusinessCalendar { /** * Calculates given time expression into duration in milliseconds based on calendar configuration. * * @param timeExpression time expression that is supported by business calendar implementation. * @return duration expressed in milliseconds */ public long calculateBusinessTimeAsDuration(String timeExpression); /** * Calculates given time expression into target date based on calendar configuration. * @param timeExpression time expression that is supported by business calendar implementation. * @return date when given time expression will match in the future */ public Date calculateBusinessTimeAsDate(String timeExpression); }
[ "mswiders@redhat.com" ]
mswiders@redhat.com
114670cbb84561930aefc706877927ced4f30e55
9a6f5a64768b4882836fc67bd185568f58af19dd
/cdn/src/main/java/com/jdcloud/sdk/service/cdn/model/SetMonitorResponse.java
6560190d47a89a3914a9a99296e0c4ba83ea0fb6
[ "Apache-2.0" ]
permissive
zhangycjob/jdcloud-sdk-java
20362dd311465966f90984f8f1ddc775fcc0fbfa
662c7617574ddfcac5c769dc0c7cf3a7eedadcff
refs/heads/master
2020-09-05T15:34:30.767907
2019-11-22T04:11:57
2019-11-22T04:11:57
220,145,202
0
0
Apache-2.0
2019-11-07T03:38:43
2019-11-07T03:38:43
null
UTF-8
Java
false
false
1,083
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * JCloud Openapi For CDN * Openapi For JCLOUD cdn * * OpenAPI spec version: v1 * Contact: pid-cdn@jd.com * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.cdn.model; import com.jdcloud.sdk.service.JdcloudResponse; /** * 设置源站监控信息 */ public class SetMonitorResponse extends JdcloudResponse<SetMonitorResult> implements java.io.Serializable { private static final long serialVersionUID = 1L; }
[ "wangbibo@jd.com" ]
wangbibo@jd.com
d42e95e6e43ccb82080dfdfdbddbdab4da03a7da
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/plugin/freewifi/b.java
433027741dd49dcf2ac7e6ac4a4c7469f9aee469
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
6,975
java
package com.tencent.mm.plugin.freewifi; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiManager; import android.os.Looper; import com.tencent.mm.plugin.freewifi.model.d; import com.tencent.mm.sdk.platformtools.w; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public final class b { private WifiManager aPM; private Context context; public Condition fuI; private long hto = 15000; public Lock lQU; public boolean lQV = false; public boolean lQW = false; private BroadcastReceiver lQX; public String ssid; public b(String str, Context context) { this.ssid = str; this.lQU = new ReentrantLock(); this.fuI = this.lQU.newCondition(); this.aPM = (WifiManager) context.getSystemService("wifi"); this.context = context; } public final int avQ() { if (((ConnectivityManager) this.context.getSystemService("connectivity")).getNetworkInfo(1).isConnected() && this.ssid.equals(d.aww())) { return 0; } if (Thread.currentThread() == Looper.getMainLooper().getThread()) { throw new RuntimeException("ConnectNetworkHelper组件不能在主线程中运行。"); } this.lQX = new BroadcastReceiver(this) { final /* synthetic */ b lRa; { this.lRa = r1; } public final void onReceive(Context context, Intent intent) { NetworkInfo networkInfo; if (intent.getAction().equals("android.net.wifi.STATE_CHANGE")) { networkInfo = (NetworkInfo) intent.getParcelableExtra("networkInfo"); if (networkInfo != null) { w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "WifiManager.NETWORK_STATE_CHANGED_ACTION broadcastReceiver, targetssid=%s, Utils.getConnectedWifiSsid(TAG)=%s,networkInfo.isConnected()=%b, networkInfo.isConnectedOrConnecting()=%b, networkInfo.getExtraInfo()=%s, networkInfo.getType()=%d, networkInfo.toString()=%s", new Object[]{this.lRa.ssid, m.wA("MicroMsg.FreeWifi.ConnectNetworkHelper"), Boolean.valueOf(networkInfo.isConnected()), Boolean.valueOf(networkInfo.isConnectedOrConnecting()), networkInfo.getExtraInfo(), Integer.valueOf(networkInfo.getType()), networkInfo.toString()}); } if (networkInfo != null && networkInfo.isConnected() && networkInfo.getType() == 1 && this.lRa.ssid.equals(m.wy(networkInfo.getExtraInfo()))) { try { this.lRa.lQU.lock(); this.lRa.lQV = true; w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "WifiManager.NETWORK_STATE_CHANGED_ACTION broadcastreceiver signal connected state."); this.lRa.fuI.signalAll(); } finally { this.lRa.lQU.unlock(); } } } else if (intent.getAction().equals("android.net.conn.CONNECTIVITY_CHANGE")) { networkInfo = (NetworkInfo) intent.getParcelableExtra("networkInfo"); if (networkInfo != null) { w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "ConnectivityManager.CONNECTIVITY_ACTION broadcastReceiver, targetssid=%s, Utils.getConnectedWifiSsid(TAG)=%s,networkInfo.isConnected()=%b, networkInfo.isConnectedOrConnecting()=%b, networkInfo.getExtraInfo()=%s, networkInfo.getType()=%d, networkInfo.toString()=%s", new Object[]{this.lRa.ssid, m.wA("MicroMsg.FreeWifi.ConnectNetworkHelper"), Boolean.valueOf(networkInfo.isConnected()), Boolean.valueOf(networkInfo.isConnectedOrConnecting()), networkInfo.getExtraInfo(), Integer.valueOf(networkInfo.getType()), networkInfo.toString()}); } if (networkInfo != null && networkInfo.isConnected() && networkInfo.getType() == 1 && this.lRa.ssid.equals(m.wy(networkInfo.getExtraInfo()))) { try { this.lRa.lQU.lock(); this.lRa.lQW = true; w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "ConnectivityManager.CONNECTIVITY_ACTION broadcastreceiver signal connected state."); this.lRa.fuI.signalAll(); } finally { this.lRa.lQU.unlock(); } } } } }; try { int avR; this.lQU.lock(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction("android.net.wifi.STATE_CHANGE"); intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE"); this.context.registerReceiver(this.lQX, intentFilter); if (!this.aPM.isWifiEnabled()) { avR = new f(this.context).avR(); w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "enable ret = " + avR); if (avR != 0) { return avR; } } avR = d.wH(this.ssid); if (avR != 0) { avP(); avP(); this.lQU.unlock(); return avR; } boolean z = false; while (true) { if (!this.lQV || !this.lQW) { long currentTimeMillis = System.currentTimeMillis(); z = this.fuI.await(this.hto, TimeUnit.MILLISECONDS); if (!z) { break; } currentTimeMillis = System.currentTimeMillis() - currentTimeMillis; this.hto -= currentTimeMillis; w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "costMillis=" + currentTimeMillis + "; left timeout=" + this.hto); this.hto = this.hto > 0 ? this.hto : 3000; } else { break; } } if (!z) { return -16; } avP(); this.lQU.unlock(); return 0; } catch (InterruptedException e) { w.i("MicroMsg.FreeWifi.ConnectNetworkHelper", "desc=ConnectNetworkHelper encounter interrupted exception. msg=%s", new Object[]{e.getMessage()}); return -17; } finally { avP(); this.lQU.unlock(); } } private void avP() { try { this.context.unregisterReceiver(this.lQX); } catch (IllegalArgumentException e) { } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
8cb6e21c4aee78440ef002e2ecb177554e4192d7
cb3cd1a1b277209d66b7ef49342232a2c4ebf49c
/test/src/test/java/com/maiziyun/boss/test/jys/JysMngTest.java
a5852b6a8039d73284f674c09f09b2e2d52c7ec0
[]
no_license
ZuoShouShiJie/boss
29d41b26abcf185af831ab3d4e9f43bfc4948010
1023a9f61996226550b87883a38b17a727a9208c
refs/heads/master
2020-03-29T04:45:22.647923
2018-09-20T03:41:42
2018-09-20T03:41:47
149,546,642
0
0
null
null
null
null
UTF-8
Java
false
false
2,031
java
package com.maiziyun.boss.test.jys; import com.maiziyun.boss.facade.common.model.ResponseNewData; import com.maiziyun.boss.facade.jysmng.model.FundsRecordQueryRequest; import com.maiziyun.boss.facade.jysmng.service.JYSMngService; import com.solar.framework.core.base.BaseException; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import javax.annotation.Resource; /** * Created by admin on 2017/11/17. */ @ContextConfiguration(locations = {"classpath:spring/boss-test.xml"}) public class JysMngTest extends AbstractJUnit4SpringContextTests { private static Logger logger = LoggerFactory.getLogger(JysMngTest.class); @Resource(name = "boss.JYSMngService") private JYSMngService jysMngService; /** * 资金记录 第一步:查用户信息 */ @Test public void userInvestListQuery() { FundsRecordQueryRequest request = new FundsRecordQueryRequest(); request.setMobile("15102108563"); logger.info("接收请求{ }", request); ResponseNewData data = null; try { data = jysMngService.queryUserMsg(request); } catch (BaseException e) { logger.error("查用户信息异常", e); } catch (Exception e) { logger.error("查用户信息异常", e); } System.out.print(data); } /** * 资金记录 第二步:查资金记录 */ @Test public void fundsRecordQuery() { ResponseNewData data = null; try { FundsRecordQueryRequest request = new FundsRecordQueryRequest(); data = jysMngService.fundsRecordQuery(request); } catch (BaseException e) { logger.error("资金记录查询异常", e); } catch (Exception e) { logger.error("资金记录查询异常", e); } System.out.println(data); } }
[ "1079728294@qq.com" ]
1079728294@qq.com
ebaf9324b22913322c2beb14807fd6d4208b3131
40619e3443cee989d262011b16d0103058218806
/heavycenter/src/main/java/com/siweisoft/heavycenter/module/main/store/check/CheckUIOpe.java
2efeda99a9f3da02fe30285681c208579fd4b5b9
[]
no_license
summerviwox/ZX
227b75a2178bdfef9b97786af4f0fc7db7822591
fe5bbe8b11f90ac0b154324eef3542ea84784df0
refs/heads/master
2020-12-05T10:17:45.665391
2020-01-06T10:57:40
2020-01-06T10:57:40
232,078,243
0
1
null
null
null
null
UTF-8
Java
false
false
3,267
java
package com.siweisoft.heavycenter.module.main.store.check; //by summer on 2017-12-19. import android.content.Context; import android.support.v7.widget.LinearLayoutManager; import android.text.Editable; import android.view.View; import com.android.lib.base.adapter.AppsDataBindingAdapter; import com.android.lib.base.listener.BaseTextWather; import com.android.lib.base.listener.ViewListener; import com.android.lib.bean.AppViewHolder; import com.android.lib.util.NullUtil; import com.android.lib.util.StringUtil; import com.siweisoft.heavycenter.BR; import com.siweisoft.heavycenter.R; import com.siweisoft.heavycenter.base.AppUIOpe; import com.siweisoft.heavycenter.data.netd.mana.store.list.StoreDetail; import com.siweisoft.heavycenter.data.netd.mana.store.list.StoresResBean; import com.siweisoft.heavycenter.databinding.FragMainStoreCheckBinding; import com.siweisoft.heavycenter.databinding.FragManaStoreListBinding; import com.siweisoft.heavycenter.databinding.ItemMainStoreBinding; import com.siweisoft.heavycenter.databinding.ItemMainStoreCheckBinding; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.List; public class CheckUIOpe extends AppUIOpe<FragMainStoreCheckBinding>{ public void initRecycle(){ bind.recycle.setLayoutManager(new LinearLayoutManager(context)); } public void LoadListData(final StoresResBean o) { if(o==null || o.getResults()==null || o.getResults().size()==0){ getFrag().showTips("暂无数据"); bind.title.getRightIV2().setVisibility(View.GONE); return; } bind.title.getRightIV2().setVisibility(View.VISIBLE); getFrag().removeTips(); bind.recycle.setAdapter(new AppsDataBindingAdapter(context, R.layout.item_main_store_check, BR.item_main_store_check, o.getResults()){ int darkcolor = context.getResources().getColor(R.color.color_item_main_trans_dark); int lightcolor = context.getResources().getColor(R.color.color_item_main_trans_light); @Override public void onBindViewHolder(AppViewHolder holder, final int position) { super.onBindViewHolder(holder, position); final ItemMainStoreCheckBinding itemMainStoreCheckBinding = (ItemMainStoreCheckBinding) holder.viewDataBinding; itemMainStoreCheckBinding.tvCurrent.setText(StringUtil.getStr(o.getResults().get(position).getCurrentStock())+"t"); itemMainStoreCheckBinding.etInput.addTextChangedListener(new BaseTextWather(){ @Override public void afterTextChanged(Editable s) { super.afterTextChanged(s); String ss = s.toString(); if(NullUtil.isStrEmpty(ss.trim())){ ss= "0"; } itemMainStoreCheckBinding.tvAfter.setText(new BigDecimal(Float.parseFloat(ss.toString())- o.getResults().get(position).getCurrentStock()).setScale(1, RoundingMode.HALF_UP).toString()+"t"); o.getResults().get(position).setAfterAdjust(Float.parseFloat(ss.toString())); } }); } }); } }
[ "summernecro@gmail.com" ]
summernecro@gmail.com
6336d47282c2cf4f05fe03c167ef6b16d5c77422
1006d2754c0fd1383efa8247dea71383b43066c4
/core/api/src/main/java/io/novaordis/gld/api/store/KeyStoreFactory.java
29f79b05a64e28a01501ac4b72f0decefdffc8b9
[ "Apache-2.0" ]
permissive
ovidiuf/gld
b1658988cb35a604d8dbd1bf49d9a01822ee52ce
1366e9e8149704b71df4db85e29040afa0549f6f
refs/heads/master
2021-09-04T18:52:11.470159
2018-01-21T09:39:51
2018-01-21T09:39:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,933
java
/* * Copyright (c) 2016 Nova Ordis LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.novaordis.gld.api.store; import io.novaordis.gld.api.KeyStore; import io.novaordis.gld.api.configuration.StoreConfiguration; import io.novaordis.utilities.UserErrorException; import java.io.File; /** * @author Ovidiu Feodorov <ovidiu@novaordis.com> * @since 12/8/16 */ public class KeyStoreFactory { // Constants ------------------------------------------------------------------------------------------------------- // Static ---------------------------------------------------------------------------------------------------------- public static KeyStore build(StoreConfiguration sc) throws Exception { if (sc == null) { throw new IllegalArgumentException("null store configuration"); } String type = sc.getStoreType(); if (type == null) { throw new UserErrorException("missing key store type"); } // // manual look up - we may want to replace with reflection-based initialization // if (HierarchicalStore.STORY_TYPE_LABEL.equals(type)) { // // 'hierarchical' // // // do the logic of extracting the needed configuration here, it could probably be done in the // store instance itself // File directory = sc.getFile(HierarchicalStore.DIRECTORY_CONFIGURATION_LABEL); if (directory == null) { throw new UserErrorException( "missing \"" + HierarchicalStore.DIRECTORY_CONFIGURATION_LABEL + "\" hierarchical key store configuration element"); } return new HierarchicalStore(directory); } else { // // we interpret the store type as the fully qualified class name of the implementation and we attempt // to instantiate it via reflection // Object keyStore; try { Class c = Class.forName(type); keyStore = c.newInstance(); } catch(Exception e) { throw new UserErrorException("unknown key store type \"" + type + "\"", e); } if (!(keyStore instanceof KeyStore)) { throw new UserErrorException("\"" + type + "\" cannot be used to instantiate a KeyStore"); } return (KeyStore)keyStore; } } // Attributes ------------------------------------------------------------------------------------------------------ // Constructors ---------------------------------------------------------------------------------------------------- // Public ---------------------------------------------------------------------------------------------------------- // Package protected ----------------------------------------------------------------------------------------------- // Protected ------------------------------------------------------------------------------------------------------- // Private --------------------------------------------------------------------------------------------------------- // Inner classes --------------------------------------------------------------------------------------------------- }
[ "ovidiu@novaordis.com" ]
ovidiu@novaordis.com
40da5ce8dd2a29640b871882705a3f40475fb5a8
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1016748.java
f16d035e97618810ef53e319a1cedd994edabdf7
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
489
java
/** * While not converged, call <code>improveClustering</code> to modify the current predicted {@link Clustering}. * @param instances Instances to cluster. * @param iterations Maximum number of iterations. * @param initialClustering Initial clustering of the Instances. * @return The predicted {@link Clustering} */ public Clustering cluster(InstanceList instances,int iterations,Clustering initialClustering){ return clusterKBest(instances,iterations,initialClustering,1)[0]; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
ef5f81e89a57697b317382da90389a9d39ab0c96
2a19a0f364c37ee2c8d939082eaab89ab2a6b7d5
/src/main/java/com/lwxf/industry4/webapp/domain/dao/dispatch/DispatchBillDao.java
e0e15b3998a274840c1d43577e41a7992387df2f
[]
no_license
sxw5036/myGit
e0d26c3daefd2cd6295afb2d2570494f6fe52910
740a2478ff0c02e13dacaf4808d55bcd1453394c
refs/heads/master
2022-11-05T19:58:22.383724
2019-08-20T09:25:37
2019-08-20T09:25:37
186,972,200
0
0
null
2022-10-12T20:26:46
2019-05-16T07:10:14
Java
UTF-8
Java
false
false
2,061
java
package com.lwxf.industry4.webapp.domain.dao.dispatch; import java.util.List; import java.util.Map; import com.lwxf.industry4.webapp.common.model.PaginatedFilter; import com.lwxf.industry4.webapp.common.model.PaginatedList; import com.lwxf.industry4.webapp.domain.dao.base.BaseDao; import com.lwxf.industry4.webapp.domain.dto.dispatch.DispatchBillDto; import com.lwxf.industry4.webapp.domain.dto.dispatch.DispatchBillItemDto; import com.lwxf.industry4.webapp.domain.dto.dispatch.DispatchBillPlanItemDto; import com.lwxf.industry4.webapp.domain.dto.printTable.DispatchPrintTableDto; import com.lwxf.industry4.webapp.domain.dto.warehouse.FinishedStockDto; import com.lwxf.industry4.webapp.domain.entity.dispatch.DispatchBill; import com.lwxf.mybatis.annotation.IBatisSqlTarget; import com.lwxf.mybatis.utils.MapContext; /** * 功能: * * @author:panchenxiao(Mister_pan@126.com) * @created:2018-12-20 15:10:29 * @version:2018 V1.0 * @company:老屋新房 Created with IntelliJ IDEA */ @IBatisSqlTarget public interface DispatchBillDao extends BaseDao<DispatchBill, String> { PaginatedList<DispatchBillDto> selectByFilter(PaginatedFilter paginatedFilter); List<DispatchBillDto> findDispatchsByOrderId(String orderId); List<DispatchBillItemDto> findListByDispatchId(String id); List<DispatchBillItemDto> findItemListById(String id); DispatchBillDto findDispatchsBillById(String dispatchId); List<DispatchBillDto> findDispatchInfoForOrder(String orderId); int findYSHItemCount(String orderId); String findTimeByOrderId(String orderId); PaginatedList<DispatchBillPlanItemDto> findDispathcBillList(PaginatedFilter paginatedFilter); List<DispatchBill> findDispatchListByOrderId(String orderId); List<Map> findFactoryDispatchsByOrderId(String orderId); List<Map> findDispatchList(String resultOrderId); List<Map> findDispatchListByFinishedItemId(List itemids); List<FinishedStockDto> findFinishedItemTypeByDispatchId(String dispatchBillId, List itemids); DispatchPrintTableDto findDispatchPrintInfo(String id); }
[ "17838625030@163.com" ]
17838625030@163.com
db9944887bbe200a5c06f76aaefc5abb0bb809f7
d49cf6a0515e1d31fc2f27d3285dc6a2b85d8c43
/src/com/zzx/design/pattern/creational/abstractfactory/Video.java
ac905b24a53838bfa1b2faa12a97130a4328e275
[]
no_license
Zhang-Zexi/Design
36f5d306f9799ad634f1a8dccbe8fc8302d6fb7f
2870e132216a51285f04a91e2990f900c42503aa
refs/heads/master
2020-05-17T22:53:47.002645
2019-05-07T10:03:34
2019-05-07T10:03:34
184,015,184
0
0
null
null
null
null
UTF-8
Java
false
false
233
java
package com.zzx.design.pattern.creational.abstractfactory; /** * @ClassName Video * @Description * @Author zhangzx * @Date 2019/4/29 16:07 * Version 1.0 **/ public abstract class Video { public abstract void produce(); }
[ "zhangzx@allinfinance.com" ]
zhangzx@allinfinance.com
412b811b4ac4f5d58b8943e5bd901061d7fd4a70
3617e6fbda9d9db61d20cc6acbdf7c124af4e34f
/src/main/java/com/vasu/loom3/design1/kplain/KanniConversion.java
ae7b5be97e890a539839d44d2079dab62c68a9d7
[]
no_license
SrinivasSilks/DesignMixer
940560d43a20387f0cae59f80e7af52e03920667
2fe5dcbf3bff280c42faa9c721c2daca728076e9
refs/heads/master
2023-07-08T06:19:01.937400
2023-06-30T14:45:34
2023-06-30T14:45:34
126,555,308
0
0
null
null
null
null
UTF-8
Java
false
false
1,884
java
package com.vasu.loom3.design1.kplain; import com.varaprasadps.image.EmptyGenerator; import com.varaprasadps.image.LeftLayoutGenerator; import com.varaprasadps.image.PlainGenerator; import com.varaprasadps.image.VerticalFlipGenerator; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.List; import static com.vasu.loom3.TwoPlay.*; import static java.lang.String.format; public class KanniConversion { public static BufferedImage get(BufferedImage right, BufferedImage left, BufferedImage rani, BufferedImage jari) throws IOException { List<BufferedImage> brocades = new LinkedList<>(); brocades.add(rani(right, left, rani)); brocades.add(jari(getBorder(left), jari)); BufferedImage brocade = LeftLayoutGenerator.get(getBrocade(brocades)); displayPixels(brocade); saveBMP(brocade, format("z-vasu/out/3/design1/kplainanni-%s-%s.bmp", brocade.getWidth(), brocade.getHeight())); return brocade; } public static void main(final String[] args) throws IOException { BufferedImage right = ImageIO.read(new File("z-vasu/in/3/design1/border/border.bmp")); BufferedImage left = VerticalFlipGenerator.get(ImageIO.read(new File("z-vasu/in/3/design1/border/border.bmp"))); BufferedImage rani = EmptyGenerator.get(right.getWidth(), 720); BufferedImage jari = PlainGenerator.get(right.getWidth(), 720); get(right, left, rani, jari); } private static void displayPixels(BufferedImage fileOne) { System.out.println(format("Width : %s, Height : %s", fileOne.getWidth(), fileOne.getHeight())); } private static void saveBMP(final BufferedImage bi, final String path) throws IOException { ImageIO.write(bi, "bmp", new File(path)); } }
[ "poppu.vara@gmail.com" ]
poppu.vara@gmail.com
6e2b787e28212b58649469b2d3f9f415a57a3a51
0e6b9f9403cae53bb8e2f13d17868dd881be0816
/eil-project-dev/src/main/java/com/shencai/eil/login/entity/SystemBaseUser.java
678ec9147b58087bbe48299bee40ab24d895e482
[]
no_license
fujialong/eil-project
2f68c33e832a4ee9a3f367aaa6e9ed58ee77e042
01f7def3ef0c85f5c3187ad03a9b2da82c9aff09
refs/heads/master
2020-03-29T21:06:13.421701
2018-10-30T08:48:28
2018-10-30T08:48:28
148,478,029
0
0
null
null
null
null
UTF-8
Java
false
false
4,328
java
package com.shencai.eil.login.entity; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; /** * <p> * * </p> * * @author fujl * @since 2018-09-21 */ public class SystemBaseUser extends Model<SystemBaseUser> { private static final long serialVersionUID = 1L; private String id; @TableField("userId") private String userId; @TableField("userName") private String userName; private String password; private String tel; private String email; private String ticket; @TableField("userType") private String userType; @TableField("tenantId") private String tenantId; @TableField("busiStatus") private String busiStatus; private String remark; @TableField("createTime") private String createTime; @TableField("createBy") private String createBy; @TableField("editTime") private String editTime; @TableField("editBy") private String editBy; @TableField("deleteFlag") private String deleteFlag; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } 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 String getTel() { return tel; } public void setTel(String tel) { this.tel = tel; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getBusiStatus() { return busiStatus; } public void setBusiStatus(String busiStatus) { this.busiStatus = busiStatus; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getCreateBy() { return createBy; } public void setCreateBy(String createBy) { this.createBy = createBy; } public String getEditTime() { return editTime; } public void setEditTime(String editTime) { this.editTime = editTime; } public String getEditBy() { return editBy; } public void setEditBy(String editBy) { this.editBy = editBy; } public String getDeleteFlag() { return deleteFlag; } public void setDeleteFlag(String deleteFlag) { this.deleteFlag = deleteFlag; } public String getTicket() { return ticket; } public void setTicket(String ticket) { this.ticket = ticket; } @Override protected Serializable pkVal() { return this.id; } @Override public String toString() { return "SystemBaseUser{" + "id=" + id + ", userId=" + userId + ", userName=" + userName + ", password=" + password + ", tel=" + tel + ", email=" + email + ", userType=" + userType + ", tenantId=" + tenantId + ", busiStatus=" + busiStatus + ", remark=" + remark + ", ticket=" + ticket + ", createTime=" + createTime + ", createBy=" + createBy + ", editTime=" + editTime + ", editBy=" + editBy + ", deleteFlag=" + deleteFlag + "}"; } }
[ "fujl1991@sina.com" ]
fujl1991@sina.com
51e11f3a2f27cdc05373e39b37ef908adf62417d
19f8e8acbde7cea252aadeeff1e97747ff966774
/app/src/main/java/fm/qian/michael/widget/custom/AverageTabLayout.java
f7408acf5b7d466529d9c2d4f23f867fde4ad3aa
[]
no_license
lv1107748200/michoel
c34a1edaff2e88a3e739566f92abe81fee27407f
1241c8818bbd349e01aaf8689e7efd1fd786d9ed
refs/heads/master
2020-04-01T00:35:12.428403
2018-10-30T10:36:40
2018-10-30T10:36:40
152,703,464
1
0
null
null
null
null
UTF-8
Java
false
false
855
java
package fm.qian.michael.widget.custom; import android.content.Context; import android.support.annotation.ColorInt; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.widget.LinearLayout; /** * Created by 吕 on 2018/1/22. */ public class AverageTabLayout extends LinearLayout { public AverageTabLayout(Context context) { this(context,null); } public AverageTabLayout(Context context, @Nullable AttributeSet attrs) { this(context, attrs,0); } public AverageTabLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } public static class AverageTabData{ private @ColorInt int colorText; private @ColorInt int colorLine; private String text; } }
[ "18203887023@163.com" ]
18203887023@163.com
9ce2d9c0dfe4d1d207f358cff47b5f1167d571a8
2b3c19d9ad2c73bb3f87474923b5bfa357197f65
/tags/proj02(ingeleverd)/Score.java
99f0f2ac5c9fe86ecf8c15f155bea0063a3dff5e
[]
no_license
BGCX261/zombiecity-svn-to-git
1d7bec337add5c34dc01f50eb218a7f3eafb4798
043cf9a11bcd72f5aabcef6623d2599899b2b2bc
refs/heads/master
2021-01-21T12:40:40.380932
2015-08-25T15:21:50
2015-08-25T15:21:50
41,488,724
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
import java.util.*; import java.io.*; import java.io.Serializable; public class Score extends Highscore implements Serializable { private int score; private String naam; public int getScore() { return score; } public String getNaam() { return naam; } public Score(String naam, int score) { this.score = score; this.naam = naam; } }
[ "you@example.com" ]
you@example.com
7746d9f899717b7da65a381c75406aaf6b923635
968c005e34518600b76bc7ab37705fd538dcd5cf
/src/main/java/com/sensors/entities/RecipeRating.java
9d07b5d5b4166139e9c06dbd13a5e7d9436700d0
[]
no_license
SouhaibBenFarhat/E-DASH-SPRING-BOOT
61901e8ebb76992fc92f610ebbcd0f239ea1bdb9
ccf5932f13d486745149e5b21b27f1a069cfe859
refs/heads/master
2021-01-21T20:30:30.274648
2017-05-24T03:48:28
2017-05-24T03:48:28
92,246,871
0
2
null
null
null
null
UTF-8
Java
false
false
1,038
java
package com.sensors.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; @Entity public class RecipeRating { @Id @GeneratedValue private Long id; private Long value; @OneToOne private User user; @ManyToOne private Recipe recipe; public RecipeRating() { super(); // TODO Auto-generated constructor stub } public RecipeRating(Long id, Long value, User user, Recipe recipe) { super(); this.id = id; this.value = value; this.user = user; this.recipe = recipe; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getValue() { return value; } public void setValue(Long value) { this.value = value; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Recipe getRecipe() { return recipe; } public void setRecipe(Recipe recipe) { this.recipe = recipe; } }
[ "souhaib.benfarhat@esprit.tn" ]
souhaib.benfarhat@esprit.tn
310b6327c78945caaaffa9962371ceadddf9608b
55fcf753f8c699bea82165d6f2bd3f51ae4c8c42
/basex-core/src/main/java/org/basex/core/cmd/Info.java
e620014e13be97fc50417e068e3e103e535081ed
[ "BSD-3-Clause" ]
permissive
maxsg1/basex
4cb879641418c37ffc74ec3e1595e0217b0cd3a7
bba0d6c13964e189d8890e209aed0713a85e27e0
refs/heads/master
2020-12-25T21:22:50.233926
2015-04-23T14:32:01
2015-04-23T14:32:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,540
java
package org.basex.core.cmd; import static org.basex.core.Text.*; import java.io.*; import org.basex.core.*; import org.basex.core.locks.*; import org.basex.core.users.*; import org.basex.util.*; import org.basex.util.options.*; /** * Evaluates the 'info' command and returns general database information. * * @author BaseX Team 2005-15, BSD License * @author Christian Gruen */ public final class Info extends AInfo { /** * Default constructor. */ public Info() { super(false); } @Override protected boolean run() throws IOException { out.print(info(context)); return true; } @Override public void databases(final LockResult lr) { // No locks needed } /** * Creates a database information string. * @param context database context * @return info string */ public static String info(final Context context) { final TokenBuilder tb = new TokenBuilder(); tb.add(GENERAL_INFO + COL + NL); info(tb, VERSINFO, Prop.VERSION); final User user = context.user(); if(user.has(Perm.CREATE)) { Performance.gc(1); info(tb, USED_MEM, Performance.getMemory()); } if(user.has(Perm.ADMIN)) { final StaticOptions sopts = context.soptions; tb.add(NL + GLOBAL_OPTIONS + COL + NL); for(final Option<?> o : sopts) info(tb, o.name(), sopts.get(o)); } final MainOptions opts = context.options; tb.add(NL + LOCAL_OPTIONS + NL); for(final Option<?> o : opts) info(tb, o.name(), opts.get(o)); return tb.toString(); } }
[ "christian.gruen@gmail.com" ]
christian.gruen@gmail.com
94eafec4e57b1d219a92385a080f1cdbd7e5117d
53d6a07c1a7f7ce6f58135fefcbd0e0740b059a6
/Juitls/src/j/wu/utils/Log.java
9486fedfc272d52895befdeb3ab5e9ad35749376
[]
no_license
jx-admin/Code2
33dfa8d7a1acfa143d07309b6cf33a9ad7efef7f
c0ced8c812c0d44d82ebd50943af8b3381544ec7
refs/heads/master
2021-01-15T15:36:33.439310
2017-05-17T03:22:30
2017-05-17T03:22:30
43,429,217
8
4
null
null
null
null
UTF-8
Java
false
false
142
java
package j.wu.utils; public class Log extends Logger{ public static void d(String tag,String str){ System.out.println(tag+'\t'+str); } }
[ "jx.wang@holaverse.com" ]
jx.wang@holaverse.com
be5126dccebdc532770b04d5fd1290df1e862c70
5f6edf313639dbe464a1c9cbb62762b427786235
/crm/src/com/naswork/common/controller/HelpController.java
a2c2d4915cb597e81e5943bc46c23d486b359b4e
[]
no_license
magicgis/outfile
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
497635e2cd947811bf616304e9563e59f0ab4f56
refs/heads/master
2020-05-07T19:24:08.371572
2019-01-23T04:57:18
2019-01-23T04:57:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,094
java
/** * */ package com.naswork.common.controller; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.naswork.model.gy.GyHelp; import com.naswork.service.GyHelpService; import com.naswork.utils.EntityUtil; import com.naswork.utils.json.JsonUtils; import com.naswork.vo.JQGridMapVo; import com.naswork.vo.PageModel; import com.naswork.vo.ResultVo; /** * @since 2016年5月7日 下午3:11:49 * @author doudou<doudou@naswork.com> * @version v1.0 */ @Controller @RequestMapping(value = "/help") public class HelpController extends BaseController { @Resource private GyHelpService gyHelpService; /** * 系统帮助管理 * * @return * @since 2016年5月6日 下午12:00:56 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/list", method = RequestMethod.GET) public String helplist() { return "/help/list"; } /** * 系统帮助列表数据数据 * * @param request * @param response * @return * @since 2016年5月6日 下午12:01:47 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/list/data", method = RequestMethod.POST) public @ResponseBody JQGridMapVo helplistdata(HttpServletRequest request, HttpServletResponse response) { PageModel<GyHelp> page = getPage(request); JQGridMapVo jqgrid = new JQGridMapVo(); gyHelpService.searchPage(page, request.getParameter("searchString"), getSort(request)); if (page.getEntities().size() > 0) { jqgrid.setPage(page.getPageNo()); jqgrid.setRecords(page.getRecordCount()); jqgrid.setTotal(page.getPageCount()); List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); for (GyHelp help : page.getEntities()) { Map<String, Object> map = EntityUtil.entityToTableMap(help); mapList.add(map); } jqgrid.setRows(mapList); } else { jqgrid.setRecords(0); jqgrid.setTotal(0); jqgrid.setRows(new ArrayList<Map<String, Object>>()); } // 导出 if (StringUtils.isNotEmpty(request.getParameter("exportModel"))) { try { exportService.exportGridToXls("帮助列表", request.getParameter("exportModel"), jqgrid.getRows(), response); return null; } catch (Exception e) { logger.warn("导出数据出错!", e); } } return jqgrid; } /** * 新增页面 * * @return * @since 2016年5月6日 下午2:35:41 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/add", method = RequestMethod.GET) public String addHelp() { return "/help/add"; } /** * 保存帮助 * * @param gyHelp * @param request * @return * @throws Exception * @since 2016年5月6日 下午2:43:09 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/add", method = RequestMethod.POST) public @ResponseBody ResultVo addHelpFn(@ModelAttribute GyHelp gyHelp, HttpServletRequest request) throws Exception { boolean success = false; String message = ""; try { gyHelpService.add(gyHelp); success = true; message = "保存成功!"; } catch (Exception e) { e.printStackTrace(); success = false; message = "保存失败!"; } return new ResultVo(success, message); } /** * 修改页面 * * @return * @since 2016年5月6日 下午2:35:47 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/modify/{id}", method = RequestMethod.GET) public String modifyHelp(@PathVariable("id") String id, HttpServletRequest request) { GyHelp gyHelp = gyHelpService.findById(id); if (gyHelp != null) { request.setAttribute("gyHelp", JsonUtils.toJson(gyHelp)); } return "/help/modify"; } /** * 修改帮助 * * @param gyHelp * @param request * @return * @throws Exception * @since 2016年5月6日 下午2:44:56 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/modify", method = RequestMethod.POST) public @ResponseBody ResultVo modifyHelpFn(@ModelAttribute GyHelp gyHelp, HttpServletRequest request) throws Exception { boolean success = false; String message = ""; try { gyHelpService.modify(gyHelp); success = true; message = "修改成功!"; } catch (Exception e) { e.printStackTrace(); success = false; message = "修改失败!"; } return new ResultVo(success, message); } /** * 删除 * * @param id * @param request * @return * @throws Exception * @since 2016年5月6日 下午5:07:08 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/remove", method = RequestMethod.POST) public @ResponseBody ResultVo removeHelpFn(@RequestParam String id, HttpServletRequest request) throws Exception { boolean success = false; String message = ""; try { gyHelpService.remove(id); success = true; message = "删除成功!"; } catch (Exception e) { e.printStackTrace(); success = false; message = "删除失败!"; } return new ResultVo(success, message); } /** * 查看帮助 * * @return * @since 2016年5月7日 上午9:25:06 * @author doudou<doudou@naswork.com> * @version v1.0 */ @RequestMapping(value = "/view/{key}", method = RequestMethod.GET) public String viewHelp(@PathVariable String key, HttpServletRequest request) { GyHelp gyHelp = gyHelpService.findByCode(key); if (gyHelp != null) { request.setAttribute("gyHelp", gyHelp); } return "/help/detail"; } }
[ "942364283@qq.com" ]
942364283@qq.com
c6d4b0f0f8af76e0574d5dd1dbb6e28ca1048a07
b1bc6be0d323f93d6eb0507ac8b545401c1fedcc
/basicKnowledge/src/com/xdc/basic/api/apache/poi/business/checker/CourseRowObjChecker.java
ca72e4a1cf58cfb797c06fba2ff8b26d6cd39c88
[]
no_license
xdc0209/java-code
5a331ebcae979fe6b672b527e3b533f2bb42866c
9dc5c89d9a1f8d880afff34903d315c3ca8ddbb2
refs/heads/master
2021-01-17T01:28:31.707484
2019-04-16T18:51:47
2019-04-16T18:51:47
9,099,623
7
4
null
null
null
null
UTF-8
Java
false
false
449
java
package com.xdc.basic.api.apache.poi.business.checker; import com.xdc.basic.api.apache.poi.business.checker.result.CourseRowObjCheckResult; import com.xdc.basic.api.apache.poi.business.model.xls.CourseRowObj; public class CourseRowObjChecker { public static CourseRowObjCheckResult check(CourseRowObj courseRowObj) { // 本例只是演示,对student写具体业务逻辑,course和score就不写了 return null; } }
[ "xdc0209@qq.com" ]
xdc0209@qq.com
156f4c13c3c3d93bc7cdc08c639c8ec355c342ac
55c1a5177e649f62a058eb0dfc9e7ee2bf8e2caa
/app/src/main/java/com/meterial/demo/index/IndexableAdapter.java
013d8fe11a943d3d974ef2d18804338dbc91c6f9
[]
no_license
darrennight/MyMaterialDemo
62b7d0b5f557a306305960a21494ad2baf3faee9
1ed82afbe3b59dca57aaa65b8dbf066793c1c8f0
refs/heads/master
2022-11-05T02:13:03.589457
2022-10-20T10:22:21
2022-10-20T10:22:21
47,018,946
2
0
null
null
null
null
UTF-8
Java
false
false
4,769
java
package com.meterial.demo.index; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import com.meterial.demo.index.database.DataObservable; import com.meterial.demo.index.database.DataObserver; import java.util.List; public abstract class IndexableAdapter<T extends IndexableEntity> { static final int TYPE_ALL = 0; static final int TYPE_CLICK_TITLE = 1; static final int TYPE_CLICK_CONTENT = 2; static final int TYPE_LONG_CLICK_TITLE = 3; static final int TYPE_LONG_CLICK_CONTENT = 4; private final DataObservable mDataSetObservable = new DataObservable(); private List<T> mDatas; private IndexCallback<T> mCallback; private OnItemTitleClickListener mTitleClickListener; private OnItemContentClickListener mContentClickListener; private OnItemTitleLongClickListener mTitleLongClickListener; private OnItemContentLongClickListener mContentLongClickListener; public abstract RecyclerView.ViewHolder onCreateTitleViewHolder(ViewGroup parent); public abstract RecyclerView.ViewHolder onCreateContentViewHolder(ViewGroup parent); public abstract void onBindTitleViewHolder(RecyclerView.ViewHolder holder, String indexTitle); public abstract void onBindContentViewHolder(RecyclerView.ViewHolder holder, T entity); public void setDatas(List<T> datas) { setDatas(datas, null); } /** * @param callback Register a callback to be invoked when this datas is processed. */ public void setDatas(List<T> datas, IndexCallback<T> callback) { this.mCallback = callback; mDatas = datas; notifyInited(); } /** * set Index-ItemView click listener */ public void setOnItemTitleClickListener(OnItemTitleClickListener listener) { this.mTitleClickListener = listener; notifySetListener(TYPE_CLICK_TITLE); } /** * set Content-ItemView click listener */ public void setOnItemContentClickListener(OnItemContentClickListener<T> listener) { this.mContentClickListener = listener; notifySetListener(TYPE_CLICK_CONTENT); } /** * set Index-ItemView longClick listener */ public void setOnItemTitleLongClickListener(OnItemTitleLongClickListener listener) { this.mTitleLongClickListener = listener; notifySetListener(TYPE_LONG_CLICK_TITLE); } /** * set Content-ItemView longClick listener */ public void setOnItemContentLongClickListener(OnItemContentLongClickListener<T> listener) { this.mContentLongClickListener = listener; notifySetListener(TYPE_LONG_CLICK_CONTENT); } /** * Notifies the attached observers that the underlying data has been changed * and any View reflecting the data set should refresh itself. */ public void notifyDataSetChanged() { mDataSetObservable.notifyInited(); // mDataSetObservable.notifyChanged(); } private void notifyInited() { mDataSetObservable.notifyInited(); } private void notifySetListener(int type) { mDataSetObservable.notifySetListener(type); } public List<T> getItems() { return mDatas; } IndexCallback<T> getIndexCallback() { return mCallback; } OnItemTitleClickListener getOnItemTitleClickListener() { return mTitleClickListener; } OnItemTitleLongClickListener getOnItemTitleLongClickListener() { return mTitleLongClickListener; } OnItemContentClickListener getOnItemContentClickListener() { return mContentClickListener; } OnItemContentLongClickListener getOnItemContentLongClickListener() { return mContentLongClickListener; } void registerDataSetObserver(DataObserver observer) { mDataSetObservable.registerObserver(observer); } void unregisterDataSetObserver(DataObserver observer) { mDataSetObservable.unregisterObserver(observer); } public interface IndexCallback<T> { void onFinished(List<EntityWrapper<T>> datas); } public interface OnItemTitleClickListener { void onItemClick(View v, int currentPosition, String indexTitle); } public interface OnItemContentClickListener<T> { void onItemClick(View v, int originalPosition, int currentPosition, T entity); } public interface OnItemTitleLongClickListener { boolean onItemLongClick(View v, int currentPosition, String indexTitle); } public interface OnItemContentLongClickListener<T> { boolean onItemLongClick(View v, int originalPosition, int currentPosition, T entity); } }
[ "zenghao@breadtrip.com" ]
zenghao@breadtrip.com
9074e9986de2188a762cf8f80bd5072dcb6bee0e
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14263-89-29-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/web/Utils_ESTest.java
447cf77f1bf2becf0d72258d1b2845e7f2185a14
[]
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
534
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 05:21:29 UTC 2020 */ package com.xpn.xwiki.web; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Utils_ESTest extends Utils_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
744c25480a61a56e6d7e4497f15700b9239a8f0f
f38cc59518903e8ceef22f2153944279f0481134
/rift_lib/src/rift_extractor/classgen/classes/_999576.java
f8e50a5c498e0f2991923cf8ca33b1586e5ce96a
[]
no_license
imathrowback/riftools
8de04a5efc906a1ecadf7913a9747091ef6706ec
a9c4021783c1b89c701fa227100260b359ae563d
refs/heads/master
2023-03-31T10:45:49.780385
2023-03-24T07:46:59
2023-03-24T07:46:59
94,748,733
3
1
null
null
null
null
UTF-8
Java
false
false
212
java
package rift_extractor.classgen.classes; import org.imathrowback.datparser.CObject; import static rift_extractor.classgen.ClassUtils.*; import rift_extractor.classgen.ClassUtils; abstract public class _999576 {}
[ "imathrowback@nowhere.com" ]
imathrowback@nowhere.com
4a2407bf1a459d1e5a9ad30cee99b9dadcd78532
563127ded108cd08cd9bb1c29a053e58cad1d515
/src/main/java/com/redhat/jdgdemo/marshaller/AuthorMarshaller.java
acd987dbfd6f8d72a9c39684beccaf581202711e
[]
no_license
weimeilin79/chtpoc
da0f85bbafb9ca2431a05288231b308468a8370e
98563f8a34dcca7742d8a335c288caa5bebc7af0
refs/heads/master
2021-01-19T08:28:05.034783
2013-12-09T03:50:54
2013-12-09T03:50:54
14,978,721
0
1
null
null
null
null
UTF-8
Java
false
false
837
java
package com.redhat.jdgdemo.marshaller; import java.io.IOException; import org.infinispan.protostream.MessageMarshaller; import com.redhat.jdgdemo.model.Author; public class AuthorMarshaller implements MessageMarshaller<Author> { @Override public Class<? extends Author> getJavaClass() { return Author.class; } @Override public String getTypeName() { return "com.redhat.jdgdemo.model.Author"; } @Override public Author readFrom(ProtoStreamReader reader) throws IOException { String name = reader.readString("name"); String surname = reader.readString("surname"); return new Author(name,surname); } @Override public void writeTo(ProtoStreamWriter writer, Author author) throws IOException { writer.writeString("name", author.getName()); writer.writeString("surname", author.getSurname()); } }
[ "weimeilin@gmail.com" ]
weimeilin@gmail.com
138115c70f3c9633e105e64bad7f9abe03f026ad
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_764770e59086e6960bf71eca147506d3dfa3940c/BugJac461Test/2_764770e59086e6960bf71eca147506d3dfa3940c_BugJac461Test_s.java
2f8f030d825ac32b405937226a80099c77754394
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,106
java
/* * JacORB - a free Java ORB * * Copyright (C) 1997-2006 The JacORB project. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package org.jacorb.test.bugs.bugjac461; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Properties; import junit.framework.Test; import junit.framework.TestSuite; import org.jacorb.test.BasicServer; import org.jacorb.test.BasicServerHelper; import org.jacorb.test.common.ClientServerSetup; import org.jacorb.test.common.ClientServerTestCase; import org.jacorb.test.common.TestUtils; import org.jacorb.test.orb.BasicServerImpl; /** * @author Alphonse Bendt * @version $Id$ */ public class BugJac461Test extends ClientServerTestCase { private BasicServer server; private String line; public BugJac461Test(String name, ClientServerSetup setup) { super(name, setup); } public static Test suite() { if (TestUtils.isJ2ME()) { return new TestSuite(); } Properties props = new Properties(); props.setProperty("org.omg.PortableInterceptor.ORBInitializerClass.standard_init", "org.jacorb.orb.standardInterceptors.IORInterceptorInitializer"); props.setProperty("jacorb.codeset", "on"); props.setProperty("jacorb.native_char_codeset", "UTF8"); TestSuite suite = new TestSuite(BugJac461Test.class.getName()); ClientServerSetup setup = new ClientServerSetup(suite, BasicServerImpl.class.getName(), props, props); TestUtils.addToSuite(suite, setup, BugJac461Test.class); return setup; } protected void setUp() throws Exception { server = BasicServerHelper.narrow(setup.getServerObject()); //read japanese from file BufferedReader in = new BufferedReader( new InputStreamReader(getClass().getResourceAsStream("japanese_case4537.txt"), "Shift-JIS")); line = in.readLine(); assertNotNull(line); } protected void tearDown() throws Exception { server = null; } public void testBounceString() throws Exception { assertEquals(line, server.bounce_string(line)); } public void testBounceWString() throws Exception { assertEquals(line, server.bounce_wstring(line)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2e71123e1f978590dcdcc27e0a843f93d9aa38f3
554f2fd297e5c9ecebf2d77c02a7d0ed5a7f855a
/platform/lang-impl/testSources/com/intellij/largeFilesEditor/search/searchResultsPanel/RangeSearchDuplicateResultsTest.java
b6db89b0b3c6c534c4979dc66db5abfcda80a154
[ "Apache-2.0" ]
permissive
Munyola/intellij-community
36f232e3998358d325fd59278f3577bd6dbca82f
16f0fc6919af41a0084efad3afaf6b0b0a772a33
refs/heads/master
2020-07-23T02:41:33.959293
2019-09-09T19:17:40
2019-09-09T19:31:17
207,394,993
1
0
Apache-2.0
2019-09-09T20:23:24
2019-09-09T20:07:15
null
UTF-8
Java
false
false
5,485
java
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.largeFilesEditor.search.searchResultsPanel; import com.intellij.largeFilesEditor.editor.Page; import com.intellij.largeFilesEditor.search.SearchResult; import com.intellij.largeFilesEditor.search.actions.FindFurtherAction; import com.intellij.largeFilesEditor.search.actions.StopRangeSearchAction; import com.intellij.largeFilesEditor.search.searchTask.FileDataProviderForSearch; import com.intellij.largeFilesEditor.search.searchTask.SearchTaskOptions; import com.intellij.mock.MockVirtualFile; import com.intellij.openapi.actionSystem.ex.ActionUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.testFramework.LightPlatformTestCase; import org.junit.Assert; import java.util.Iterator; import java.util.List; public class RangeSearchDuplicateResultsTest extends LightPlatformTestCase { private static final String FILE_NAME = "testFileName.test"; private static final String EVERY_PAGE_TEXT = "aa"; private static final long PAGES_AMOUNT = 10; private static final long PAGE_NUMBER_TO_STOP = 6; private FileDataProviderForSearch myFileDataProviderForSearch; private RangeSearch myRangeSearch; private StopRangeSearchAction myStopRangeSearchAction; private FindFurtherAction myFindFurtherAction; volatile boolean myNeedToAbortSearch; volatile boolean isAllDoneAsExpected; public void test() { myFileDataProviderForSearch = new MyFileDataProviderForSearch(); myRangeSearch = new RangeSearch(new MockVirtualFile(FILE_NAME), getProject(), new MyRangeSearchCallback()); myStopRangeSearchAction = new StopRangeSearchAction(myRangeSearch); myFindFurtherAction = new FindFurtherAction(true, myRangeSearch); SearchTaskOptions options = new SearchTaskOptions(); options.setStringToFind("a"); myNeedToAbortSearch = true; myRangeSearch.addEdtRangeSearchEventsListener(new RangeSearch.EdtRangeSearchEventsListener() { @Override public void onSearchStopped() { onStopped(this); } @Override public void onSearchFinished() { Assert.fail("Was called onSearchFinished(), however shouldn't be"); } }); isAllDoneAsExpected = false; myRangeSearch.runNewSearch(options, myFileDataProviderForSearch); /* This line shouldn't be executed before onFinished() will be done. * See com.intellij.openapi.progress.impl.CoreProgressManager#run, * where in tests "task.isHeadless()" will be true. * This causes "strange" order of execution of EDT-tasks. */ if (!isAllDoneAsExpected) { Assert.fail("wrong order of tasks execution"); } } private void onStopped(RangeSearch.EdtRangeSearchEventsListener listener) { myNeedToAbortSearch = false; myRangeSearch.removeEdtRangeSearchEventsListener(listener); myRangeSearch.addEdtRangeSearchEventsListener(new RangeSearch.EdtRangeSearchEventsListener() { @Override public void onSearchStopped() { Assert.fail("Was called onSearchStopped(), however shouldn't be"); } @Override public void onSearchFinished() { onFinished(); } }); myFindFurtherAction.actionPerformed(ActionUtil.createEmptyEvent()); } private void onFinished() { List<SearchResult> results = myRangeSearch.getSearchResultsList(); Iterator<SearchResult> iterator = results.iterator(); SearchResult current = iterator.next(); while (iterator.hasNext()) { SearchResult previous = current; current = iterator.next(); boolean isRightOrder = previous.startPosition.pageNumber < current.startPosition.pageNumber || previous.startPosition.pageNumber == current.startPosition.pageNumber && previous.startPosition.symbolOffsetInPage < current.startPosition.symbolOffsetInPage; if (!isRightOrder) { StringBuilder message = new StringBuilder(); message.append(String.format("Order check is failed at ([%s] , [%s])", previous.toString(), current.toString())); message.append("\nAll search results:"); for (SearchResult result : results) { message.append("\n ").append(result.toString()); } Assert.fail(message.toString()); return; } } isAllDoneAsExpected = true; } private class MyRangeSearchCallback implements RangeSearchCallback { @Override public FileDataProviderForSearch getFileDataProviderForSearch(boolean createIfNotExists, Project project, VirtualFile virtualFile) { LOG.info("called getFileDataProviderForSearch"); return myFileDataProviderForSearch; } @Override public void showResultInEditor(SearchResult searchResult, Project project, VirtualFile virtualFile) { } } private class MyFileDataProviderForSearch implements FileDataProviderForSearch { @Override public long getPagesAmount() { return PAGES_AMOUNT; } @Override public Page getPage_wait(long pageNumber) { if (myNeedToAbortSearch && pageNumber == PAGE_NUMBER_TO_STOP) { myStopRangeSearchAction.actionPerformed(ActionUtil.createEmptyEvent()); } //sleep(100); return new Page(EVERY_PAGE_TEXT, pageNumber); } @Override public String getName() { return FILE_NAME; } } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
1130c1c4a399b41bc6b8b3fae53fee849dcb0c9d
25e99a0af5751865bce1702ee85cc5c080b0715c
/design_pattern/src/DPModel/src/dp/com/company/proxy/section5/IGamePlayer.java
d56e2f2b75668e3667011dcce7da046294762cd5
[]
no_license
jasonblog/note
215837f6a08d07abe3e3d2be2e1f183e14aa4a30
4471f95736c60969a718d854cab929f06726280a
refs/heads/master
2023-05-31T13:02:27.451743
2022-04-04T11:28:06
2022-04-04T11:28:06
35,311,001
130
67
null
2023-02-10T21:26:36
2015-05-09T02:04:40
C
UTF-8
Java
false
false
434
java
package com.company.proxy.section5; /** * @author cbf4Life cbf4life@126.com * I'm glad to share my knowledge with you all. * 游戏玩家 */ public interface IGamePlayer { //登录游戏 public void login(String user,String password); //杀怪,这是网络游戏的主要特色 public void killBoss(); //升级 public void upgrade(); //每个人都可以找一下自己的代理 public IGamePlayer getProxy(); }
[ "jason_yao" ]
jason_yao
5c78a5ab6a3419c521d3cc9534e3757da9380b17
a9c6648c8b69473566a2af60b4783ef9a974b4d6
/hk-security-example/src/main/java/com/hk/security/example/repository/jpa/UserRepository.java
9128d19c702c4e7a9035aff66528e60b77afcfd1
[]
no_license
huankai/hk-examples
6bba158a050b740aed5b2403f71f672110344e42
bf8e9abe7c9c30d8916458b6cf5b15ba929c865c
refs/heads/master
2022-10-18T20:40:55.928956
2020-04-01T15:33:41
2020-04-01T15:33:41
114,425,813
5
1
null
2022-10-05T00:02:20
2017-12-16T01:54:39
Java
UTF-8
Java
false
false
281
java
package com.hk.security.example.repository.jpa; import com.hk.core.data.jpa.repository.BaseJpaRepository; import com.hk.security.example.entity.User; /** * @author sjq-278 * @date 2018-12-17 15:04 */ public interface UserRepository extends BaseJpaRepository<User, String> { }
[ "huankai@139.com" ]
huankai@139.com
e7948fedd397aa084f77fe3fcfa839adcabc3bc7
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/33708/src_1.java
4d902987552a89632db1c6cb1e8c39837000c1fe
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,773
java
package org.eclipse.jdt.internal.core; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.core.resources.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.jdom.*; import org.eclipse.jdt.internal.core.jdom.DOMNode; /** * <p>This operation adds/replaces a package declaration in an existing compilation unit. * If the compilation unit already includes the specified package declaration, * it is not generated (it does not generate duplicates). * * <p>Required Attributes:<ul> * <li>Compilation unit element * <li>Package name * </ul> */ public class CreatePackageDeclarationOperation extends CreateElementInCUOperation { /** * The name of the package declaration being created */ protected String fName = null; /** * When executed, this operation will add a package declaration to the given compilation unit. */ public CreatePackageDeclarationOperation(String name, ICompilationUnit parentElement) { super(parentElement); fName= name; } /** * @see CreateTypeMemberOperation#generateElementDOM */ protected IDOMNode generateElementDOM() throws JavaModelException { IJavaElement[] children = getCompilationUnit().getChildren(); //look for an existing package declaration for (int i = 0; i < children.length; i++) { if (children[i].getElementType() == IJavaElement.PACKAGE_DECLARATION) { IPackageDeclaration pck = (IPackageDeclaration) children[i]; IDOMPackage pack = (IDOMPackage) ((JavaElement)pck).findNode(fCUDOM); if (!pack.getName().equals(fName)) { // get the insertion position before setting the name, as this makes it a detailed node // thus the start position is always 0 DOMNode node = (DOMNode)pack; fInsertionPosition = node.getStartPosition(); fReplacementLength = node.getEndPosition() - fInsertionPosition + 1; pack.setName(fName); fCreatedElement = (org.eclipse.jdt.internal.core.jdom.DOMNode)pack; } else { //equivalent package declaration already exists fCreationOccurred= false; } return null; } } IDOMPackage pack = (new DOMFactory()).createPackage(); pack.setName(fName); return pack; } /** * Creates and returns the handle for the element this operation created. */ protected IJavaElement generateResultHandle() { return getCompilationUnit().getPackageDeclaration(fName); } /** * @see CreateElementInCUOperation#getMainTaskName */ public String getMainTaskName(){ return Util.bind("operation.createPackageProgress"); //$NON-NLS-1$ } /** * Sets the correct position for new package declaration:<ul> * <li> before the first import * <li> if no imports, before the first type * <li> if no type - first thing in the CU * <li> */ protected void initializeDefaultPosition() { try { ICompilationUnit cu = getCompilationUnit(); IImportDeclaration[] imports = cu.getImports(); if (imports.length > 0) { createBefore(imports[0]); return; } IType[] types = cu.getTypes(); if (types.length > 0) { createBefore(types[0]); return; } } catch (JavaModelException npe) { } } /** * Possible failures: <ul> * <li>NO_ELEMENTS_TO_PROCESS - no compilation unit was supplied to the operation * <li>INVALID_NAME - a name supplied to the operation was not a valid * package declaration name. * </ul> * @see IJavaModelStatus * @see JavaNamingConventions */ public IJavaModelStatus verify() { IJavaModelStatus status = super.verify(); if (!status.isOK()) { return status; } if (!JavaConventions.validatePackageName(fName).isOK()) { return new JavaModelStatus(IJavaModelStatusConstants.INVALID_NAME, fName); } return JavaModelStatus.VERIFIED_OK; } }
[ "375833274@qq.com" ]
375833274@qq.com
15b908e4dbf307f4f83bc478bb2c4eb358adc965
5d2f845d1e3f08c65dbc0f0bcacfc20247e7445c
/rest-docs-api/src/main/java/hello/util/JacksonUtil.java
e2fb1d8d731b90ee0c245b92beb9a42ae0124713
[]
no_license
Freeongoo/spring-examples
15cf87912ddeb2a3de294375bbf404451f622e01
48ffdf267837f95e67bf1f702812b57647afbf5e
refs/heads/master
2022-01-28T21:33:53.275548
2021-03-29T14:07:20
2021-03-29T14:07:20
148,529,220
17
17
null
2022-01-21T23:22:14
2018-09-12T19:12:31
Java
UTF-8
Java
false
false
2,790
java
package hello.util; import java.io.IOException; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; public final class JacksonUtil { private JacksonUtil() {} public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); public static <T> T fromString(String string, Class<T> clazz) { try { return OBJECT_MAPPER.readValue(string, clazz); } catch (IOException e) { throw new IllegalArgumentException("The given string value: " + string + " cannot be transformed to Json object by class: " + clazz.getSimpleName(), e); } } public static void updateFromString(String string, Object objectForUpdate) { try { OBJECT_MAPPER.readerForUpdating(objectForUpdate).readValue(string); } catch (IOException e) { throw new IllegalArgumentException("The given string value: " + string + " cannot be transformed for object update: " + objectForUpdate, e); } } public static String toString(Object value) { try { return OBJECT_MAPPER.writeValueAsString(value); } catch (JsonProcessingException e) { throw new IllegalArgumentException("The given Json object value: " + value + " cannot be transformed to a String", e); } } public static String toStringWithoutNullFields(Object value) { ObjectMapper mapper = new ObjectMapper(); try { mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper.writeValueAsString(value); } catch (JsonProcessingException e) { throw new IllegalArgumentException("The given Json object value: " + value + " cannot be transformed to a String", e); } } public static JsonNode toJsonNode(String value) { try { return OBJECT_MAPPER.readTree(value); } catch (IOException e) { throw new IllegalArgumentException(e); } } @SuppressWarnings("unchecked") public static <T> T clone(T value) { return fromString(toString(value), (Class<T>) value.getClass()); } public static String prettyJson(String jsonStr) { try { Object json = OBJECT_MAPPER.readValue(jsonStr, Object.class); return OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(json); } catch (IOException e) { throw new IllegalArgumentException("Cannot beatify passed json string: " + jsonStr, e); } } }
[ "freeongoo@gmail.com" ]
freeongoo@gmail.com
47deb1f3229b578b84ee93dd295654129554264f
183d057ee3f1255551c9f2bc6080dfcc23262639
/app/src/main/java/com/cliffex/videomaker/videoeditor/introvd/template/sdk/slide/model/SlideModuleData.java
23b455ba80ee96bba00e1c99e88166f2fc74d74d
[]
no_license
datcoind/VideoMaker-1
5567ff713f771b19154ba463469b97d18d0164ec
bcd6697db53b1e76ee510e6e805e46b24a4834f4
refs/heads/master
2023-03-19T20:33:16.016544
2019-09-27T13:55:07
2019-09-27T13:55:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,259
java
package com.introvd.template.sdk.slide.model; public class SlideModuleData { private String desc; private int materialNum; private String title; public static class Builder { /* access modifiers changed from: private */ public String desc; /* access modifiers changed from: private */ public int materialNum; /* access modifiers changed from: private */ public String title; public SlideModuleData build() { return new SlideModuleData(this); } public Builder setDesc(String str) { this.desc = str; return this; } public Builder setMaterialNum(int i) { this.materialNum = i; return this; } public Builder setTitle(String str) { this.title = str; return this; } } public SlideModuleData(Builder builder) { this.title = builder.title; this.desc = builder.desc; this.materialNum = builder.materialNum; } public String getDesc() { return this.desc; } public int getMaterialNum() { return this.materialNum; } public String getTitle() { return this.title; } }
[ "bhagat.singh@cliffex.com" ]
bhagat.singh@cliffex.com
ec74e40da262cb72d0784adec178fd5c1a006484
e5d140d478725f8961cff4bdfb9bda771b763842
/agent/src/main/java/com/newrelic/com/google/gson/TypeAdapterFactory.java
89d8073447980b6dff0aa4f44d9b8fa51236b68e
[]
no_license
PioneerLab/NewRelicAndroidAgent
9383cfaaf3b1d1a06aaf5308d88cf0ea5e2eb7a2
e755cd65cca02ccd69097d6d128c578a29b7caef
refs/heads/master
2021-06-13T02:35:31.392170
2017-03-03T15:21:47
2017-03-03T15:21:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
// // Decompiled by Procyon v0.5.30 // package com.newrelic.com.google.gson; import com.newrelic.com.google.gson.reflect.TypeToken; public interface TypeAdapterFactory { <T> TypeAdapter<T> create(final Gson p0, final TypeToken<T> p1); }
[ "maohongbin01@baidu.com" ]
maohongbin01@baidu.com
d7cb47fc2b20cf27c99703726c83d2c19d27bf3f
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/midware/data/model/P3/DataWifiGetWifiFrequency.java
fce5741e188d34c15ed588910926b45585fdbafd
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
2,109
java
package dji.midware.data.model.P3; import android.support.annotation.Keep; import dji.fieldAnnotation.EXClassNullAway; import dji.midware.data.config.P3.CmdIdWifi; import dji.midware.data.config.P3.CmdSet; import dji.midware.data.config.P3.DataConfig; import dji.midware.data.config.P3.DeviceType; import dji.midware.data.manager.P3.DataBase; import dji.midware.data.packages.P3.SendPack; import dji.midware.interfaces.DJIDataCallBack; import dji.midware.interfaces.DJIDataSyncListener; @Keep @EXClassNullAway public class DataWifiGetWifiFrequency extends DataBase implements DJIDataSyncListener { private static DataWifiGetWifiFrequency instance; private boolean isFromLongan = false; public static synchronized DataWifiGetWifiFrequency getInstance() { DataWifiGetWifiFrequency dataWifiGetWifiFrequency; synchronized (DataWifiGetWifiFrequency.class) { if (instance == null) { instance = new DataWifiGetWifiFrequency(); } dataWifiGetWifiFrequency = instance; } return dataWifiGetWifiFrequency; } public DataWifiGetWifiFrequency setFromLongan(boolean isFromLongan2) { this.isFromLongan = isFromLongan2; return this; } public int getResult() { return ((Integer) get(0, 1, Integer.class)).intValue(); } public void start(DJIDataCallBack callBack) { SendPack pack = new SendPack(); pack.senderType = DeviceType.APP.value(); if (this.isFromLongan) { pack.receiverType = DeviceType.WIFI_G.value(); } else { pack.receiverType = DeviceType.WIFI.value(); } pack.cmdType = DataConfig.CMDTYPE.REQUEST.value(); pack.isNeedAck = DataConfig.NEEDACK.YES.value(); pack.encryptType = DataConfig.EncryptType.NO.value(); pack.cmdSet = CmdSet.WIFI.value(); pack.cmdId = CmdIdWifi.CmdIdType.GetWifiFrequency.value(); pack.data = getSendData(); start(pack, callBack); } /* access modifiers changed from: protected */ public void doPack() { } }
[ "michael@districtrace.com" ]
michael@districtrace.com
8731922bf3b17f45525db635f47a962b31f1fa7e
6b23d8ae464de075ad006c204bd7e946971b0570
/WEB-INF/plugin/webmail/src/jp/groupsession/v2/wml/wml160kn/Wml160knUserDataModel.java
138e84de15e9f354824067133b70d0413ce88e49
[]
no_license
kosuke8/gsession
a259c71857ed36811bd8eeac19c456aa8f96c61e
edd22517a22d1fb2c9339fc7f2a52e4122fc1992
refs/heads/master
2021-08-20T05:43:09.431268
2017-11-28T07:10:08
2017-11-28T07:10:08
112,293,459
0
0
null
null
null
null
UTF-8
Java
false
false
2,197
java
package jp.groupsession.v2.wml.wml160kn; /** * <br>[機 能] WEBメール アカウントの使用者(ユーザ or グループ)、代理人に関する情報を格納するModelクラス * <br>[解 説] * <br>[備 考] * * @author JTS */ public class Wml160knUserDataModel { /** ユーザSID */ private int usrSid__ = 0; /** ユーザ名 姓 */ private String usiSei__ = null; /** ユーザ名 名 */ private String usiMei__ = null; /** グループSID */ private int grpSid__ = 0; /** グループ名 */ private String grpName__ = null; /** * <p>usrSid を取得します。 * @return usrSid */ public int getUsrSid() { return usrSid__; } /** * <p>usrSid をセットします。 * @param usrSid usrSid */ public void setUsrSid(int usrSid) { usrSid__ = usrSid; } /** * <p>usiSei を取得します。 * @return usiSei */ public String getUsiSei() { return usiSei__; } /** * <p>usiSei をセットします。 * @param usiSei usiSei */ public void setUsiSei(String usiSei) { usiSei__ = usiSei; } /** * <p>usiMei を取得します。 * @return usiMei */ public String getUsiMei() { return usiMei__; } /** * <p>usiMei をセットします。 * @param usiMei usiMei */ public void setUsiMei(String usiMei) { usiMei__ = usiMei; } /** * <p>grpSid を取得します。 * @return grpSid */ public int getGrpSid() { return grpSid__; } /** * <p>grpSid をセットします。 * @param grpSid grpSid */ public void setGrpSid(int grpSid) { grpSid__ = grpSid; } /** * <p>grpName を取得します。 * @return grpName */ public String getGrpName() { return grpName__; } /** * <p>grpName をセットします。 * @param grpName grpName */ public void setGrpName(String grpName) { grpName__ = grpName; } }
[ "PK140601-29@PK140601-29" ]
PK140601-29@PK140601-29
10ebdccf9cdd217fcf1c0df6adddaa9e0fdaf706
66b96cbf26682eb51e6893a45d773481c5118b67
/rds-20140815/java/src/main/java/com/aliyun/rds20140815/models/CloneDBInstanceResponse.java
90d857f6bfab24ccdc010645bfea4117661917dc
[ "Apache-2.0" ]
permissive
atptro/alibabacloud-sdk
4c104535fe77b94a4d5536028874f492d86aa794
65d4a000e4f4059b58ca1bc3d032853aedef4f3f
refs/heads/master
2022-10-17T21:45:07.475716
2020-06-18T07:37:05
2020-06-18T07:37:05
273,171,083
0
0
NOASSERTION
2020-06-18T07:29:22
2020-06-18T07:29:21
null
UTF-8
Java
false
false
856
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.rds20140815.models; import com.aliyun.tea.*; public class CloneDBInstanceResponse extends TeaModel { @NameInMap("RequestId") @Validation(required = true) public String requestId; @NameInMap("DBInstanceId") @Validation(required = true) public String DBInstanceId; @NameInMap("OrderId") @Validation(required = true) public String orderId; @NameInMap("ConnectionString") @Validation(required = true) public String connectionString; @NameInMap("Port") @Validation(required = true) public String port; public static CloneDBInstanceResponse build(java.util.Map<String, ?> map) throws Exception { CloneDBInstanceResponse self = new CloneDBInstanceResponse(); return TeaModel.build(map, self); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
94d413aea8a10914308afb2c2b6f7059c68938a3
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/otaliastudios/cameraview/filter/MultiFilter.java
deca60eec52ab7146cbe8134722cc64bce32cf92
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
7,879
java
package com.otaliastudios.cameraview.filter; import android.opengl.GLES20; import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import com.otaliastudios.cameraview.size.Size; import com.otaliastudios.opengl.core.Egloo; import com.otaliastudios.opengl.program.GlProgram; import com.otaliastudios.opengl.program.GlTextureProgram; import com.otaliastudios.opengl.texture.GlFramebuffer; import com.otaliastudios.opengl.texture.GlTexture; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; public class MultiFilter implements Filter, OneParameterFilter, TwoParameterFilter { @VisibleForTesting public final List<Filter> a; @VisibleForTesting public final Map<Filter, a> b; public final Object c; public Size d; public float e; public float f; @VisibleForTesting public static class a { @VisibleForTesting public boolean a = false; @VisibleForTesting public boolean b = false; public boolean c = false; @VisibleForTesting public Size d = null; public int e = -1; public GlFramebuffer f = null; public GlTexture g = null; } public MultiFilter(@NonNull Filter... filterArr) { this(Arrays.asList(filterArr)); } public final void a(@NonNull Filter filter, boolean z) { a aVar = this.b.get(filter); if (z) { aVar.c = false; return; } if (aVar.c) { c(filter); aVar.c = false; } if (!aVar.b) { aVar.b = true; aVar.g = new GlTexture(33984, 3553, aVar.d.getWidth(), aVar.d.getHeight()); GlFramebuffer glFramebuffer = new GlFramebuffer(); aVar.f = glFramebuffer; glFramebuffer.attach(aVar.g); } } public void addFilter(@NonNull Filter filter) { if (filter instanceof MultiFilter) { for (Filter filter2 : ((MultiFilter) filter).a) { addFilter(filter2); } return; } synchronized (this.c) { if (!this.a.contains(filter)) { this.a.add(filter); this.b.put(filter, new a()); } } } public final void b(@NonNull Filter filter, boolean z) { String str; a aVar = this.b.get(filter); if (!aVar.a) { aVar.a = true; if (z) { str = filter.getFragmentShader(); } else { str = filter.getFragmentShader().replace("samplerExternalOES ", "sampler2D "); } int create = GlProgram.create(filter.getVertexShader(), str); aVar.e = create; filter.onCreate(create); } } public final void c(@NonNull Filter filter) { a aVar = this.b.get(filter); if (aVar.b) { aVar.b = false; aVar.f.release(); aVar.f = null; aVar.g.release(); aVar.g = null; } } @Override // com.otaliastudios.cameraview.filter.Filter @NonNull public Filter copy() { MultiFilter multiFilter; synchronized (this.c) { multiFilter = new MultiFilter(new Filter[0]); Size size = this.d; if (size != null) { multiFilter.setSize(size.getWidth(), this.d.getHeight()); } for (Filter filter : this.a) { multiFilter.addFilter(filter.copy()); } } return multiFilter; } public final void d(@NonNull Filter filter) { a aVar = this.b.get(filter); Size size = this.d; if (size != null && !size.equals(aVar.d)) { Size size2 = this.d; aVar.d = size2; aVar.c = true; filter.setSize(size2.getWidth(), this.d.getHeight()); } } @Override // com.otaliastudios.cameraview.filter.Filter public void draw(long j, @NonNull float[] fArr) { synchronized (this.c) { int i = 0; while (i < this.a.size()) { boolean z = true; boolean z2 = i == 0; if (i != this.a.size() - 1) { z = false; } Filter filter = this.a.get(i); a aVar = this.b.get(filter); d(filter); b(filter, z2); a(filter, z); GLES20.glUseProgram(aVar.e); if (!z) { aVar.f.bind(); GLES20.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); } else { GLES20.glBindFramebuffer(36160, 0); } if (z2) { filter.draw(j, fArr); } else { filter.draw(j, Egloo.IDENTITY_MATRIX); } if (!z) { aVar.g.bind(); } else { GLES20.glBindTexture(3553, 0); GLES20.glActiveTexture(33984); } GLES20.glUseProgram(0); i++; } } } @Override // com.otaliastudios.cameraview.filter.Filter @NonNull public String getFragmentShader() { return GlTextureProgram.SIMPLE_FRAGMENT_SHADER; } @Override // com.otaliastudios.cameraview.filter.OneParameterFilter public float getParameter1() { return this.e; } @Override // com.otaliastudios.cameraview.filter.TwoParameterFilter public float getParameter2() { return this.f; } @Override // com.otaliastudios.cameraview.filter.Filter @NonNull public String getVertexShader() { return GlTextureProgram.SIMPLE_VERTEX_SHADER; } @Override // com.otaliastudios.cameraview.filter.Filter public void onCreate(int i) { } @Override // com.otaliastudios.cameraview.filter.Filter public void onDestroy() { synchronized (this.c) { for (Filter filter : this.a) { c(filter); a aVar = this.b.get(filter); if (aVar.a) { aVar.a = false; filter.onDestroy(); GLES20.glDeleteProgram(aVar.e); aVar.e = -1; } } } } @Override // com.otaliastudios.cameraview.filter.OneParameterFilter public void setParameter1(float f2) { this.e = f2; synchronized (this.c) { for (Filter filter : this.a) { if (filter instanceof OneParameterFilter) { ((OneParameterFilter) filter).setParameter1(f2); } } } } @Override // com.otaliastudios.cameraview.filter.TwoParameterFilter public void setParameter2(float f2) { this.f = f2; synchronized (this.c) { for (Filter filter : this.a) { if (filter instanceof TwoParameterFilter) { ((TwoParameterFilter) filter).setParameter2(f2); } } } } @Override // com.otaliastudios.cameraview.filter.Filter public void setSize(int i, int i2) { this.d = new Size(i, i2); synchronized (this.c) { for (Filter filter : this.a) { d(filter); } } } public MultiFilter(@NonNull Collection<Filter> collection) { this.a = new ArrayList(); this.b = new HashMap(); this.c = new Object(); this.d = null; this.e = 0.0f; this.f = 0.0f; for (Filter filter : collection) { addFilter(filter); } } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
fc3c0f63e9f367e54dd0ea907d755042c6945f1b
e7ca3a996490d264bbf7e10818558e8249956eda
/aliyun-java-sdk-dds/src/main/java/com/aliyuncs/dds/model/v20151201/DescribeShardingNetworkAddressRequest.java
ad5407a533974c0fee2d238f4dd3ecec5315dd6e
[ "Apache-2.0" ]
permissive
AndyYHL/aliyun-openapi-java-sdk
6f0e73f11f040568fa03294de2bf9a1796767996
15927689c66962bdcabef0b9fc54a919d4d6c494
refs/heads/master
2020-03-26T23:18:49.532887
2018-08-21T04:12:23
2018-08-21T04:12:23
145,530,169
1
0
null
2018-08-21T08:14:14
2018-08-21T08:14:13
null
UTF-8
Java
false
false
3,337
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 com.aliyuncs.dds.model.v20151201; import com.aliyuncs.RpcAcsRequest; /** * @author auto create * @version */ public class DescribeShardingNetworkAddressRequest extends RpcAcsRequest<DescribeShardingNetworkAddressResponse> { public DescribeShardingNetworkAddressRequest() { super("Dds", "2015-12-01", "DescribeShardingNetworkAddress", "dds"); } private Long resourceOwnerId; private String securityToken; private String resourceOwnerAccount; private String ownerAccount; private String dBInstanceId; private Long ownerId; private String nodeId; public Long getResourceOwnerId() { return this.resourceOwnerId; } public void setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; if(resourceOwnerId != null){ putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); } } public String getSecurityToken() { return this.securityToken; } public void setSecurityToken(String securityToken) { this.securityToken = securityToken; if(securityToken != null){ putQueryParameter("SecurityToken", securityToken); } } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; if(resourceOwnerAccount != null){ putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); } } public String getOwnerAccount() { return this.ownerAccount; } public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; if(ownerAccount != null){ putQueryParameter("OwnerAccount", ownerAccount); } } public String getDBInstanceId() { return this.dBInstanceId; } public void setDBInstanceId(String dBInstanceId) { this.dBInstanceId = dBInstanceId; if(dBInstanceId != null){ putQueryParameter("DBInstanceId", dBInstanceId); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } public String getNodeId() { return this.nodeId; } public void setNodeId(String nodeId) { this.nodeId = nodeId; if(nodeId != null){ putQueryParameter("NodeId", nodeId); } } @Override public Class<DescribeShardingNetworkAddressResponse> getResponseClass() { return DescribeShardingNetworkAddressResponse.class; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
b4c2c2ddbdbbc2d9208934162eb72d88a3a30254
f07946e772638403c47cc3e865fd8a5e976c0ce6
/basic/src/Permutations_And_Combinations.java
b838cbdee7e4595e9b28f6d9539f24722e8b56d4
[]
no_license
yuan-fei/Coding
2faf4f87c72694d56ac082778cfc81c6ff8ec793
2c64b53c5ec1926002d6e4236c4a41a676aa9472
refs/heads/master
2023-07-23T07:32:33.776398
2023-07-21T15:34:25
2023-07-21T15:34:25
113,255,839
0
0
null
null
null
null
UTF-8
Java
false
false
4,468
java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; public class Permutations_And_Combinations { public static void main(String[] args) { List<List<Integer>> combinationResult = getSubsets(new int[] { 1, 2, 3, 4, 5 }, 2); combinationResult = getAllSubsets(new int[] { 1, 2, 3, 3, 3 }); System.out.println(combinationResult); combinationResult = getAllUniqueSubsets(new int[] { 1, 3, 2, 3, 3 }); System.out.println(combinationResult); List<List<Integer>> permutationResult = getFullPermutations(new int[] { 1, 2, 3 }); System.out.println(permutationResult); permutationResult = getUniqueFullPermutations(new int[] { 1, 2, 2 }); System.out.println(permutationResult); } public static List<List<Integer>> getFullPermutations(int[] source) { List<List<Integer>> result = new ArrayList<List<Integer>>(); _getFullPermutations(result, source, 0); return result; } private static void _getFullPermutations(List<List<Integer>> result, int[] source, int pos) { if (pos == source.length) { result.add(Arrays.stream(source).boxed().collect(Collectors.toList())); } for (int i = pos; i < source.length; i++) { // in place swap is used instead of the alternative storage // (currentSet) swap(source, pos, i); _getFullPermutations(result, source, pos + 1); swap(source, i, pos); } } public static List<List<Integer>> getUniqueFullPermutations(int[] source) { List<List<Integer>> result = new ArrayList<List<Integer>>(); _getUniqueFullPermutations(result, source, 0); return result; } private static boolean shouldSwap(int[] source, int pos, int i) { // if we swapped a element with the same value before, then a duplicate would // occur for (int j = pos; j < i; j++) { if (source[j] == source[i]) { return false; } } return true; } private static void _getUniqueFullPermutations(List<List<Integer>> result, int[] source, int pos) { if (pos == source.length) { result.add(Arrays.stream(source).boxed().collect(Collectors.toList())); } for (int i = pos; i < source.length; i++) { // in place swap is used instead of the alternative storage // (currentSet) if (shouldSwap(source, pos, i)) { swap(source, pos, i); _getUniqueFullPermutations(result, source, pos + 1); swap(source, i, pos); } } } private static void swap(int[] arr, int i, int j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } /* C(n, m) = C(n-1, m-1) + C(n-2, m-1) + ... C(m-1, m-1) */ public static List<List<Integer>> getSubsets(int[] source, int count) { List<List<Integer>> result = new ArrayList<List<Integer>>(); _getSubsets(result, new ArrayList<Integer>(), source, 0, count); return result; } private static void _getSubsets(List<List<Integer>> result, List<Integer> currentSet, int[] source, int pos, int count) { if (count == 0) { result.add(new ArrayList<Integer>(currentSet)); } for (int i = pos; i < source.length; i++) { currentSet.add(source[i]); _getSubsets(result, currentSet, source, i + 1, count - 1); currentSet.remove(currentSet.size() - 1); } } public static List<List<Integer>> getAllSubsets(int[] source) { List<List<Integer>> result = new ArrayList<List<Integer>>(); _getAllSubsets(result, new ArrayList<Integer>(), source, 0); return result; } private static void _getAllSubsets(List<List<Integer>> result, List<Integer> currentSet, int[] source, int pos) { result.add(new ArrayList<Integer>(currentSet)); for (int i = pos; i < source.length; i++) { currentSet.add(source[i]); _getAllSubsets(result, currentSet, source, i + 1); currentSet.remove(currentSet.size() - 1); } } public static List<List<Integer>> getAllUniqueSubsets(int[] source) { // sort to make duplicates adjacent Arrays.sort(source); List<List<Integer>> result = new ArrayList<List<Integer>>(); _getAllUniqueSubsets(result, new ArrayList<Integer>(), source, 0); return result; } private static void _getAllUniqueSubsets(List<List<Integer>> result, List<Integer> currentSet, int[] source, int pos) { result.add(new ArrayList<Integer>(currentSet)); for (int i = pos; i < source.length; i++) { // skip duplicate elements if (i > pos && source[i] == source[i - 1]) { continue; } currentSet.add(source[i]); _getAllUniqueSubsets(result, currentSet, source, i + 1); currentSet.remove(currentSet.size() - 1); } } }
[ "yuanfei_1984@hotmail.com" ]
yuanfei_1984@hotmail.com
89e0d592e43eac88843ad4de6628011009c50663
491a31a85b42aa3acda4e3333209c4a5d6c2bdd4
/ProteusParser/src/com/infoscient/proteus/modelica/parser/OMComponentClause.java
7500d0bf45324a13ce274844ff3ea2e8aae7d93f
[]
no_license
samzys/DataScience
9ed070441bceaa422ceeec7062d3ce50bdf9076c
a7a88bb42dea78c4c63b7780e5b623eb2f2a8f21
refs/heads/master
2021-01-01T16:50:25.949185
2018-07-16T04:57:25
2018-07-16T04:57:25
34,148,182
0
0
null
null
null
null
UTF-8
Java
false
false
1,822
java
/* Generated By:JJTree: Do not edit this line. OMComponentClause.java */ package com.infoscient.proteus.modelica.parser; import com.infoscient.proteus.types.StringType; public class OMComponentClause extends SimpleNode { public OMTypePrefix typePrefix; @StringType(name = "TypeName", category = CATEGORY_CODE) public String typeName; public OMSubscript[] arraySubscripts; public OMComponentList componentList; public OMComponentClause(int id) { super(id); } public OMComponentClause(ModelicaParser p, int id) { super(p, id); } /** Accept the visitor. * */ public Object jjtAccept(ModelicaParserVisitor visitor, Object data) { return visitor.visit(this, data); } public String toCode() { StringBuilder sb = new StringBuilder(); sb.append(typePrefix.toCode()); sb.append(typeName + " "); if (arraySubscripts != null) { sb.append("["); int i = 0; for (OMSubscript s : arraySubscripts) { if (i > 0) { sb.append(", "); } sb.append(s.toCode()); } sb.append("] "); } sb.append(componentList.toCode()); return sb.toString(); } // // public OMComponentClause copy() { // OMComponentClause copy = new OMComponentClause(parser, id); // copy.typePrefix = typePrefix.copy(); // copy.typeName = typeName; // if (arraySubscripts != null) { // copy.arraySubscripts = new OMSubscript[arraySubscripts.length]; // for (int i = 0; i < arraySubscripts.length; i++) { // copy.arraySubscripts[i] = arraySubscripts[i].copy(); // } // } // copy.componentList = componentList.copy(); // return copy; // } public OMComponentList getComponentList() { return componentList; } public void setComponentList(OMComponentList componentList) { this.componentList = componentList; } }
[ "sam.zyshan@gmail.com" ]
sam.zyshan@gmail.com
ca3c8fc2ec5c294d0dd05a366400c5b98d4fb53f
8972246c8068a07d1c4ead7b4e4926bb42ac7342
/src/main/java/com/spring/mongodb/springbootmongodb/entity/Review.java
42793227ef7e13239470024297faed14e8e73ff3
[]
no_license
dickanirwansyah/mongo-db
6b3cb67ad9799da030205f18ea7c47c6773059e5
4b70ac244b86afc8955c8481293d6d7dd341231f
refs/heads/master
2020-03-11T06:23:54.559312
2018-04-17T01:54:00
2018-04-17T01:54:00
129,828,754
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package com.spring.mongodb.springbootmongodb.entity; import org.springframework.data.mongodb.core.mapping.Document; import java.util.List; @Document(collection = "review") public class Review { private String username; private int rating; private boolean approved; protected Review(){} public Review(String username, int rating, boolean approved){ this.username = username; this.rating = rating; this.approved = approved; } public String getUsername(){ return username; } public int getRating(){ return rating; } public boolean isApproved(){ return approved; } }
[ "dickanirwansyah@gmail.com" ]
dickanirwansyah@gmail.com
ea4662c7a456a32ab1e1dffc40e49eb07a118624
b82465e0855d40dc6ff72726159217882690d0ef
/simple/src/main/java/org/me/DemoServlet.java
82bb3f7f21d133bb1bf96eb6b83cb3b4cb6d2636
[]
no_license
davidmoten/jetty-demo
0d2d27cc53a6224bc71e55b285482cad2b9a810f
3aefd620e110d7fb6a80848c726882bc5f4a61e9
refs/heads/master
2023-07-22T06:17:14.607813
2023-07-13T09:40:38
2023-07-13T09:41:28
8,475,077
1
2
null
2023-09-14T09:49:22
2013-02-28T08:34:53
JavaScript
UTF-8
Java
false
false
709
java
package org.me; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") @WebServlet(value="/sayHello") public class DemoServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String name = req.getParameter("name"); resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); out.println("<html><p>Hello <b>" + name + "</b>!</p></html>"); } }
[ "davidmoten@gmail.com" ]
davidmoten@gmail.com
c9f747b82395c419c3bf0349a20ff27264f884d3
2e59950c3a0e32c9748c1e3303d5530f6e9b67ca
/ThinkSnsBase/src/main/java/com/thinksns/sociax/thinksnsbase/activity/widget/GlideRoundTransform.java
0dd868e4a34478522c2e31cb36bd6f4d273fee72
[]
no_license
xiaozhugua/Myhuarenb
a27e87451c792a76ade79fc29d7050997ac2bdf6
9a81815ce90a7b4e5c22ff99fb8fc5e13844d326
refs/heads/master
2021-01-23T02:05:42.432793
2017-05-31T04:05:42
2017-05-31T04:05:42
92,902,840
0
1
null
null
null
null
UTF-8
Java
false
false
1,678
java
package com.thinksns.sociax.thinksnsbase.activity.widget; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.RectF; import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; public class GlideRoundTransform extends BitmapTransformation { private static float radius = 0f; public GlideRoundTransform(Context context) { this(context, 4); } public GlideRoundTransform(Context context, int dp) { super(context); this.radius = Resources.getSystem().getDisplayMetrics().density * dp; } @Override protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { return roundCrop(pool, toTransform); } private static Bitmap roundCrop(BitmapPool pool, Bitmap source) { if (source == null) return null; Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); if (result == null) { result = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); } Canvas canvas = new Canvas(result); Paint paint = new Paint(); paint.setShader(new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); paint.setAntiAlias(true); RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight()); canvas.drawRoundRect(rectF, radius, radius, paint); return result; } @Override public String getId() { return getClass().getName() + Math.round(radius); } }
[ "1343012815@qq.com" ]
1343012815@qq.com
ed69faca2440cb4bc6e9fd8dc761a6a78f1d0026
80a6b8d1efa66efbb94f0df684eedb81a5cc552c
/assertj-core/src/test/java/org/assertj/core/api/map/MapAssert_containsValue_Test.java
d29392bfdb3051ff27415d04ae31a554d1bbb89d
[ "Apache-2.0" ]
permissive
AlHasan89/System_Re-engineering
43f232e90f65adc940af3bfa2b4d584d25ce076c
b80e6d372d038fd246f946e41590e07afddfc6d7
refs/heads/master
2020-03-27T05:08:26.156072
2019-01-06T17:54:59
2019-01-06T17:54:59
145,996,692
0
1
Apache-2.0
2019-01-06T17:55:00
2018-08-24T13:43:31
Java
UTF-8
Java
false
false
1,228
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2017 the original author or authors. */ package org.assertj.core.api.map; import org.assertj.core.api.MapAssert; import org.assertj.core.api.MapAssertBaseTest; import static org.mockito.Mockito.verify; /** * Tests for <code>{@link MapAssert#containsValue(Object)}</code>. * * @author Nicolas François */ public class MapAssert_containsValue_Test extends MapAssertBaseTest { @Override protected MapAssert<Object, Object> invoke_api_method() { return assertions.containsValue("key1"); } @Override protected void verify_internal_effects() { verify(maps).assertContainsValue(getInfo(assertions), getActual(assertions), "key1"); } }
[ "nw91@le.ac.uk" ]
nw91@le.ac.uk
92a25f5a94a70e6922fe092c2b6c34d49ac76fa7
d6c2c75aea1d4d4b63acb4347cc932735c9654c5
/src/org/apache/xerces/util/SynchronizedSymbolTable.java
00f6772ed823e813067ca048615926030801ba4c
[ "Apache-2.0", "W3C-19980720", "W3C", "LicenseRef-scancode-public-domain", "SAX-PD", "ICU" ]
permissive
codelibs/xerces
e79359caca25ac2fc4c2d7e07271b5c93e164892
2d413d847de87d1147ccd57ea31f6ec6d5f84661
refs/heads/master
2023-03-22T04:37:48.407893
2020-08-06T01:43:00
2020-08-06T01:43:00
196,992,774
2
1
null
null
null
null
UTF-8
Java
false
false
4,024
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.xerces.util; /** * Synchronized symbol table. * * This class moved into the util package since it's needed by multiple * other classes (CachingParserPool, XMLGrammarCachingConfiguration). * * @author Andy Clark, IBM * @version $Id: SynchronizedSymbolTable.java 447241 2006-09-18 05:12:57Z mrglavas $ */ public final class SynchronizedSymbolTable extends SymbolTable { // // Data // /** Main symbol table. */ protected SymbolTable fSymbolTable; // // Constructors // /** Constructs a synchronized symbol table. */ public SynchronizedSymbolTable(SymbolTable symbolTable) { fSymbolTable = symbolTable; } // <init>(SymbolTable) // construct synchronized symbol table of default size public SynchronizedSymbolTable() { fSymbolTable = new SymbolTable(); } // init() // construct synchronized symbol table of given size public SynchronizedSymbolTable(int size) { fSymbolTable = new SymbolTable(size); } // init(int) // // SymbolTable methods // /** * Adds the specified symbol to the symbol table and returns a * reference to the unique symbol. If the symbol already exists, * the previous symbol reference is returned instead, in order * guarantee that symbol references remain unique. * * @param symbol The new symbol. */ public String addSymbol(String symbol) { synchronized (fSymbolTable) { return fSymbolTable.addSymbol(symbol); } } // addSymbol(String) /** * Adds the specified symbol to the symbol table and returns a * reference to the unique symbol. If the symbol already exists, * the previous symbol reference is returned instead, in order * guarantee that symbol references remain unique. * * @param buffer The buffer containing the new symbol. * @param offset The offset into the buffer of the new symbol. * @param length The length of the new symbol in the buffer. */ public String addSymbol(char[] buffer, int offset, int length) { synchronized (fSymbolTable) { return fSymbolTable.addSymbol(buffer, offset, length); } } // addSymbol(char[],int,int):String /** * Returns true if the symbol table already contains the specified * symbol. * * @param symbol The symbol to look for. */ public boolean containsSymbol(String symbol) { synchronized (fSymbolTable) { return fSymbolTable.containsSymbol(symbol); } } // containsSymbol(String):boolean /** * Returns true if the symbol table already contains the specified * symbol. * * @param buffer The buffer containing the symbol to look for. * @param offset The offset into the buffer. * @param length The length of the symbol in the buffer. */ public boolean containsSymbol(char[] buffer, int offset, int length) { synchronized (fSymbolTable) { return fSymbolTable.containsSymbol(buffer, offset, length); } } // containsSymbol(char[],int,int):boolean } // class SynchronizedSymbolTable
[ "shinsuke@apache.org" ]
shinsuke@apache.org
30af4b689ebb695aab25145e3756c6e91a0cbdc9
ab9ef3010a4a6f4fa059bb9fb2516cb0c7205bf4
/gulimall-cart/src/main/java/com/syong/gulimall/cart/service/impl/CartServiceImpl.java
33e3992a765a79561d25ad58b5fb06c54bfff396
[ "Apache-2.0" ]
permissive
ChangGeZheLi/gulimall
4ce5163beca92c81b1d5198cd222d26d60d4bed6
d5a3d5c85dcfb69890be8d38a968ee9657a1dede
refs/heads/main
2023-05-30T17:07:25.709294
2021-06-26T02:17:41
2021-06-26T02:17:41
356,811,879
0
0
null
null
null
null
UTF-8
Java
false
false
8,589
java
package com.syong.gulimall.cart.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.syong.common.utils.R; import com.syong.gulimall.cart.feign.ProductFeignService; import com.syong.gulimall.cart.interceptor.CartInterceptor; import com.syong.gulimall.cart.service.CartService; import com.syong.gulimall.cart.to.UserInfoTo; import com.syong.gulimall.cart.vo.Cart; import com.syong.gulimall.cart.vo.CartItem; import com.syong.gulimall.cart.vo.SkuInfoVo; import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.BoundHashOperations; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import javax.annotation.Resource; import java.math.BigDecimal; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.ThreadPoolExecutor; import java.util.stream.Collectors; /** * @Description: */ @Service @Slf4j public class CartServiceImpl implements CartService { @Resource private StringRedisTemplate stringRedisTemplate; @Resource private ProductFeignService productFeignService; @Resource private ThreadPoolExecutor executor; private static final String CART_PREFIX = "gulimall:cart:"; @Override public CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException { BoundHashOperations<String, Object, Object> cartOps = getCartOps(); String key = (String) cartOps.get(skuId.toString()); if (StringUtils.isEmpty(key)){ //如果redis中没有该购物项,才要把数据存入 //需要进行远程调用,使用异步编排方式 CartItem cartItem = new CartItem(); CompletableFuture<Void> getSkuInfo = CompletableFuture.runAsync(() -> { //商品添加到购物车 R skuInfo = productFeignService.getSkuInfo(skuId); SkuInfoVo data = skuInfo.getData("skuInfo", new TypeReference<SkuInfoVo>() { }); cartItem.setCheck(true); cartItem.setCount(num); cartItem.setImage(data.getSkuDefaultImg()); cartItem.setPrice(data.getPrice()); cartItem.setSkuId(skuId); cartItem.setTitle(data.getSkuTitle()); }, executor); //远程查询sku的组合信息 CompletableFuture<Void> getSkuSaleAttr = CompletableFuture.runAsync(() -> { List<String> skuSaleAttrValues = productFeignService.getSkuSaleAttrValues(skuId); cartItem.setSkuAttr(skuSaleAttrValues); }, executor); //等两个方法都完成,往redis中存数据 CompletableFuture.allOf(getSkuInfo,getSkuSaleAttr).get(); String s = JSON.toJSONString(cartItem); cartOps.put(skuId.toString(),s); return cartItem; }else{ //购物车已经有该商品了,只需要改变数量 CartItem cartItem = JSON.parseObject(key, CartItem.class); cartItem.setCount(cartItem.getCount() + num); cartOps.put(skuId.toString(),JSON.toJSONString(cartItem)); return cartItem; } } /** * 获取购物车中的某个购物项 **/ @Override public CartItem getCartItem(Long skuId) { BoundHashOperations<String, Object, Object> cartOps = getCartOps(); String str = (String) cartOps.get(skuId.toString()); CartItem cartItem = JSON.parseObject(str, CartItem.class); return cartItem; } /** * 获取整个购物车 **/ @Override public Cart getCart() throws ExecutionException, InterruptedException { Cart cart = new Cart(); UserInfoTo userInfoTo = CartInterceptor.threadLocal.get(); //判断是否登录 if (userInfoTo.getUserId()!=null){ //登录了 String cartKey =CART_PREFIX + userInfoTo.getUserId(); //判断临时购物车中是否有数据,有就进行购物车合并 List<CartItem> tempCartItems = getCartItems(CART_PREFIX + userInfoTo.getUserKey()); if (tempCartItems!=null){ //合并购物车 for (CartItem item : tempCartItems) { addToCart(item.getSkuId(),item.getCount()); } //合并完成之后,需要清除临时购物车 clearCart(CART_PREFIX+userInfoTo.getUserKey()); } //获取登录后的购物车,包含临时购物车数据 List<CartItem> cartItems = getCartItems(CART_PREFIX + userInfoTo.getUserId()); cart.setItems(cartItems); }else { //没登陆 String cartKey =CART_PREFIX + userInfoTo.getUserKey(); //获取临时购物车中的所有购物项 List<CartItem> cartItems = getCartItems(cartKey); cart.setItems(cartItems); } return cart; } /** * 清空购物车 **/ @Override public void clearCart(String cartKey) { stringRedisTemplate.delete(cartKey); } /** * 勾选购物项 **/ @Override public void checkItem(Long skuId, Integer check) { BoundHashOperations<String, Object, Object> cartOps = getCartOps(); CartItem cartItem = getCartItem(skuId); cartItem.setCheck(check==1); String str = JSON.toJSONString(cartItem); cartOps.put(skuId.toString(),str); } /** * 修改指定购物项数量 **/ @Override public void countItem(Long skuId, Integer num) { CartItem cartItem = getCartItem(skuId); cartItem.setCount(num); BoundHashOperations<String, Object, Object> cartOps = getCartOps(); cartOps.put(skuId.toString(),JSON.toJSONString(cartItem)); } /** * 删除购物项 **/ @Override public void deleteItem(Long skuId) { BoundHashOperations<String, Object, Object> cartOps = getCartOps(); cartOps.delete(skuId.toString()); } /** * 返回所有选中的购物项 **/ @Override public List<CartItem> getCurrentUserCartItems() { UserInfoTo userInfoTo = CartInterceptor.threadLocal.get(); if (userInfoTo.getUserId() == null){ return null; }else { String cartKey = CART_PREFIX+userInfoTo.getUserId(); List<CartItem> cartItems = getCartItems(cartKey); //获取所有被选中的购物项,并且查询到最细腻价格 List<CartItem> collect = cartItems.stream().filter(CartItem::getCheck).map(item -> { R r = productFeignService.getPrice(item.getSkuId()); String data = (String) r.get("data"); item.setPrice(new BigDecimal(data)); return item; }).collect(Collectors.toList()); return collect; } } /** * 获取到需要操作的购物车 **/ private BoundHashOperations<String, Object, Object> getCartOps() { //判断拦截器拦截数据,决定key值 UserInfoTo userInfoTo = CartInterceptor.threadLocal.get(); String cartKey = ""; if (userInfoTo.getUserId() != null){ //用户登录 cartKey = CART_PREFIX + userInfoTo.getUserId(); }else { //用户没登陆,使用临时user-key cartKey = CART_PREFIX + userInfoTo.getUserKey(); } //绑定key,operations所有操作都是针对该key BoundHashOperations<String, Object, Object> operations = stringRedisTemplate.boundHashOps(cartKey); return operations; } /** * 获取购物车中的购物项 **/ private List<CartItem> getCartItems(String cartKey){ BoundHashOperations<String, Object, Object> hashOps = stringRedisTemplate.boundHashOps(cartKey); //拿到所有的购物项 List<Object> values = hashOps.values(); if (values!=null && values.size()>0){ List<CartItem> collect = values.stream().map(item -> { String str = (String) item; CartItem cartItem = JSON.parseObject(str, CartItem.class); return cartItem; }).collect(Collectors.toList()); return collect; } return null; } }
[ "admin" ]
admin
ecf98c750140e83dc4a0a0dc5acca16342d51bb9
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/2933/GiantControllerTest.java
3ccafbef2d866929be81721d6fa7dd87f83b78f6
[]
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
3,888
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.model.view.controller; import org.junit.jupiter.api.Test; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyZeroInteractions; /** * Date: 12/20/15 - 2:19 PM * * @author Jeroen Meulemeester */ public class GiantControllerTest { /** * Verify if the controller passes the health level through to the model and vice versa */ @Test public void testSetHealth() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); for (final Health health : Health.values()) { controller.setHealth(health); verify(model).setHealth(health); verifyZeroInteractions(view); } controller.getHealth(); verify(model).getHealth(); verifyNoMoreInteractions(model, view); } /** * Verify if the controller passes the fatigue level through to the model and vice versa */ @Test public void testSetFatigue() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); for (final Fatigue fatigue : Fatigue.values()) { controller.setFatigue(fatigue); verify(model).setFatigue(fatigue); verifyZeroInteractions(view); } controller.getFatigue(); verify(model).getFatigue(); verifyNoMoreInteractions(model, view); } /** * Verify if the controller passes the nourishment level through to the model and vice versa */ @Test public void testSetNourishment() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); for (final Nourishment nourishment : Nourishment.values()) { controller.setNourishment(nourishment); verify(model).setNourishment(nourishment); verifyZeroInteractions(view); } controller.getNourishment(); verify(model).getNourishment(); verifyNoMoreInteractions(model, view); } @Test public void testUpdateView() { final GiantModel model = mock(GiantModel.class); final GiantView view = mock(GiantView.class); final GiantController controller = new GiantController(model, view); verifyZeroInteractions(model, view); controller.updateView(); verify(view).displayGiant(model); verifyNoMoreInteractions(model, view); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
f8abcf3773a9d6286ea1e42b5af957c5cc9bbc6a
460805f5ce256852e96da8a02dadc4a220313901
/original-java/com/xiaomi/mistatistic/sdk/network/e.java
42a5720fd6aff7ca409447a64b5ff144d87a1141
[]
no_license
Mi-Walkie-Talkie-by-Darkhorse/Mi-Walkie-Talkie-Plus
bab78cd8cea85af901d1bab6dc9f68f673727419
d47857800bb3a9f1deae5b4b6c6a3c44c1a78748
refs/heads/2.9.34-plus
2023-05-29T20:00:38.390971
2022-02-22T11:03:47
2022-02-22T11:03:47
221,777,793
49
10
null
2019-12-13T12:13:29
2019-11-14T20:07:47
Smali
UTF-8
Java
false
false
2,626
java
package com.xiaomi.mistatistic.sdk.network; import java.io.IOException; import java.io.InputStream; /* compiled from: MIInputStream */ final class e extends InputStream { private InputStream a; private c b; private d c; private int d = 0; public e(c cVar, InputStream inputStream) { this.b = cVar; this.a = inputStream; } public e(d dVar, InputStream inputStream) { this.c = dVar; this.a = inputStream; } public int available() throws IOException { try { return this.a.available(); } catch (IOException e) { a(e); throw e; } } public void close() throws IOException { if (this.b != null) { this.b.a(); } if (this.c != null) { this.c.a(); } try { this.a.close(); } catch (IOException e) { a(e); throw e; } } public void mark(int i) { this.a.mark(i); } public boolean markSupported() { return this.a.markSupported(); } public int read() throws IOException { try { int read = this.a.read(); if (read != -1) { this.d++; } return read; } catch (IOException e) { a(e); throw e; } } public int read(byte[] bArr) throws IOException { try { int read = this.a.read(bArr); if (read != -1) { this.d += read; } return read; } catch (IOException e) { a(e); throw e; } } public int read(byte[] bArr, int i, int i2) throws IOException { try { int read = this.a.read(bArr, i, i2); if (read != -1) { this.d += read; } return read; } catch (IOException e) { a(e); throw e; } } public synchronized void reset() throws IOException { try { this.a.reset(); } catch (IOException e) { a(e); throw e; } } public long skip(long j) throws IOException { try { return this.a.skip(j); } catch (IOException e) { a(e); throw e; } } private void a(Exception exc) { if (this.b != null) { this.b.a(exc); } if (this.c != null) { this.c.a(exc); } } public int a() { return this.d; } }
[ "Mi-Walkie-Talkie-by-Darkhorse@der-ball-ist-rund.net" ]
Mi-Walkie-Talkie-by-Darkhorse@der-ball-ist-rund.net
db90aaa04180dc61ddd4a593620586c846445580
ecc56a5ed3c9b492a5e3331ebceb44d17c458fd2
/Backup/Assist_Auto/src/main/java/com/gaConnecte/assistAuto/daos/VilleRepository.java
47c959cf0ec6ff020b6328de640a0fa7471cd29d
[]
no_license
amirensit/angular2-springBoot
67366e9ed1e673478aeda31eb976a3362bd3be08
5e60b80455ad61159b6ee5da23e11a2084366548
refs/heads/master
2021-01-01T17:59:17.020890
2017-07-26T16:45:42
2017-07-26T16:45:42
98,213,182
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package com.gaConnecte.assistAuto.daos; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import com.gaConnecte.assistAuto.entities.Gouvernorat; import com.gaConnecte.assistAuto.entities.Marque; import com.gaConnecte.assistAuto.entities.Ville; public interface VilleRepository extends JpaRepository<Ville, Long> { @Query("select p from Ville p where p.gouvernorat.id_gouvernorat= :x") public List<Ville> getIdVilleByGouvernorat(@Param("x") Long x); }
[ "you@example.com" ]
you@example.com
b6f1e6ad2c1bd30c6aa797db85d656569822caff
52081696c148f78a840be42c5a6a3bd539cbab13
/src/main/java/com/cjkj/insurance/entity/other/ReqCreateTaskB.java
3add85247b24992d25d43ceffd98b7ef9eaa3b41
[]
no_license
XDFHTY/insurance
bdad3b3d0291b0c1fd7af637bc6760dcd6019b3b
aff6ba4df66a5a42816c1918f159e3d165c1fbb1
refs/heads/master
2020-03-16T21:28:50.511529
2018-08-01T11:01:23
2018-08-01T11:01:23
132,997,057
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package com.cjkj.insurance.entity.other; import com.cjkj.insurance.entity.CarInfo; import com.cjkj.insurance.entity.CarOwner; import com.cjkj.insurance.entity.InsureInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; /** * B接口创建报价请求数据 */ @Data @NoArgsConstructor @AllArgsConstructor public class ReqCreateTaskB { /** * 投保地区代码(市级代码)", //例如广州市440100 */ private String insureAreaCode; /** * 渠道用户ID", //从渠道进来的第三方用户的一个标识 */ private String channelUserId; /** * 备注 */ private String remark; /** * 车辆信息 */ private CarInfo carInfo; /** * 车主信息 */ private CarOwner carOwner; /** * 投保人信息 */ private CarOwner applicant; /** * 被保人信息 */ private CarOwner insured; /** * 索赔权益人 */ private CarOwner beneficiary; /** * 险种信息 */ private InsureInfo insureInfo; /** * 供应商id集合 */ private List<Providers> providers; }
[ "a1668281642@gmail.com" ]
a1668281642@gmail.com
0a9bd747fd3d4374c92fc963d1cd5fadbd6507d1
57fc72a521e91b9ba55b6e6ed77fb6f781e99d7c
/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/valuesets/ContractTermTypeEnumFactory.java
bf3f8944617172f9a86b491e80473450b814d0a4
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
lcamilo15/hapi-fhir
e273eabc29b855722d2fe2b14cd99a9bae0f49ef
61cb60b293688fc392eedb9c040ddab6723c7516
refs/heads/master
2020-04-06T05:47:46.462855
2015-07-18T22:44:46
2015-07-18T22:44:46
38,947,880
0
0
null
2015-07-12T02:45:21
2015-07-12T02:45:20
null
UTF-8
Java
false
false
2,478
java
package org.hl7.fhir.instance.model.valuesets; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Tue, Jul 14, 2015 17:35-0400 for FHIR v0.5.0 import org.hl7.fhir.instance.model.EnumFactory; public class ContractTermTypeEnumFactory implements EnumFactory<ContractTermType> { public ContractTermType fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("OralHealth".equals(codeString)) return ContractTermType.ORALHEALTH; if ("Vision".equals(codeString)) return ContractTermType.VISION; throw new IllegalArgumentException("Unknown ContractTermType code '"+codeString+"'"); } public String toCode(ContractTermType code) { if (code == ContractTermType.ORALHEALTH) return "OralHealth"; if (code == ContractTermType.VISION) return "Vision"; return "?"; } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
36af83b3ba8a589162f61d8209ee677e065ceefc
cadc02c9408bcd9b6ac1e11fb5f1bdbffaa53d6a
/com/javarush/test/level28/lesson08/task02/Solution.java
94a090db4eb028ecbdae747e69774ce6b695a511
[]
no_license
sustav86/javaRush
bc79c3c9f54d8710a94eea0a7f1ff224db378b0d
c46c02c495e645c06353312843155a76631b6512
refs/heads/master
2020-07-30T21:29:21.948015
2017-03-06T05:24:01
2017-03-06T05:24:01
73,619,440
0
0
null
null
null
null
UTF-8
Java
false
false
2,763
java
package com.javarush.test.level28.lesson08.task02; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /* Знакомство с ThreadPoolExecutor 1. В методе main создай очередь LinkedBlockingQueue<Runnable> 2. В цикле добавь в очередь 10 тасок Runnable. 3. У каждой таски в методе run вызови метод doExpensiveOperation с порядковым номером таски начиная с 1, см. пример вывода 4. Создай объект ThreadPoolExecutor со следующими параметрами: - основное количество трэдов (ядро) = 3 - максимальное количество трэдов = 5 - время удержания трэда живым после завершения работы = 1000 - тайм-юнит - миллисекунды - созданная в п.1. очередь с тасками 5. Запусти все трэды, которые входят в основное кол-во трэдов - ядро), используй метод prestartAllCoreThreads 6. Запрети добавление новых тасок на исполнение в пул (метод shutdown) 7. Дай экзэкьютору 5 секунд на завершение всех тасок (метод awaitTermination и параметр TimeUnit.SECONDS) Не должно быть комментариев кроме приведенного output example */ public class Solution { public static void main(String[] args) throws InterruptedException { //Add your code here LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<>(); for (int i = 1; i <= 10; i++) { final int count = i; queue.put(new Runnable() { @Override public void run() { doExpensiveOperation(count); } }); } ThreadPoolExecutor service = new ThreadPoolExecutor(3, 5, 1000, TimeUnit.MILLISECONDS, queue); service.prestartAllCoreThreads(); service.shutdown(); service.awaitTermination(5, TimeUnit.SECONDS); /* output example pool-1-thread-2, localId=2 pool-1-thread-3, localId=3 pool-1-thread-1, localId=1 pool-1-thread-3, localId=5 pool-1-thread-2, localId=4 pool-1-thread-3, localId=7 pool-1-thread-1, localId=6 pool-1-thread-3, localId=9 pool-1-thread-2, localId=8 pool-1-thread-1, localId=10 */ } private static void doExpensiveOperation(int localId) { System.out.println(Thread.currentThread().getName() + ", localId=" + localId); } }
[ "sustav86@gmail.com" ]
sustav86@gmail.com
e23206decf23a392e48be9726c1e07796776b000
5fcf342593f4f3d21edfda416947962b8f0add73
/app/src/main/java/com/corporate/contus_Corporate/restclient/CommentsPollRestClient.java
f4a87ad9eb22782da8bbddea34870cbedfc57bb6
[]
no_license
nikks-tu/IT_MYPOLLBOOK_CORPORATE_MOBILE
3bb6093444c69f66cfd98a44ef9feff9a501c439
c08aefcb6ac53c10508c351cd52acd62b21a61b6
refs/heads/master
2022-04-18T19:06:53.987156
2020-04-20T14:12:34
2020-04-20T14:12:34
257,301,778
0
0
null
null
null
null
UTF-8
Java
false
false
2,086
java
/** * @category TeasorTrailor * @package com.contus.restclient * @version 1.0 * @author Contus Team <developers@contus.in> * @copyright Copyright (C) 2015 Contus. All rights reserved. * @license http://www.apache.org/licenses/LICENSE-2.0 */ package com.corporate.contus_Corporate.restclient; import com.corporate.contus_Corporate.apiinterface.CommentsApiInterface; import com.corporate.contus_Corporate.app.Constants; import com.squareup.okhttp.OkHttpClient; import java.util.concurrent.TimeUnit; import retrofit.RestAdapter; import retrofit.client.OkClient; /** * Created by user on 9/24/2015. */ public class CommentsPollRestClient { private static CommentsApiInterface sWelcomeApiInterface; /** The s settings api interface. */ private static String root = Constants.LIVE_BASE_URL+"api/v1"; /** The root. */ static { setupRestClient(); } /** * Instantiates a new settings rest client. */ private CommentsPollRestClient() { } /** * Gets the. * * @return the settings api interface */ public static CommentsApiInterface getInstance() { return sWelcomeApiInterface; } /** * Setup rest client. */ private static void setupRestClient() { //HTTP is the way modern applications network. It’s how we exchange data & media. // Doing HTTP efficiently makes your stuff load faster and saves bandwidth. OkHttpClient okHttp = new OkHttpClient(); //set connect time out okHttp.setConnectTimeout(180, TimeUnit.SECONDS); //The REST adapter allows your store to communicate with an HTTP server by transmitting JSON via XHR. // Most Ember.js apps that consume a JSON API should use the REST adapter. RestAdapter.Builder builder = new RestAdapter.Builder().setEndpoint(root).setLogLevel(RestAdapter.LogLevel.FULL).setClient(new OkClient(okHttp)); RestAdapter restAdapter = builder.build(); //create the rest adapter sWelcomeApiInterface = restAdapter.create(CommentsApiInterface.class); } }
[ "nikita@vishwakarma7@gmail.com" ]
nikita@vishwakarma7@gmail.com