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
c62a5e2840b8c0105b277a5c611dc84bd263636f
1f1b0abab5d4f89c971629a957e83a85093786f7
/data/oldversion/ant-rel-1.4/proposal/mutant/src/main/org/apache/ant/core/execution/Converter.java
11cc0d7c984dc973beb5d5f09a34bb9610efcdc2
[]
no_license
yueyuep/CIA
c16e577478bac0c0307dde5aa3cd0a4b4248650d
7851d4fa8d4ce96d7cfae4705068510d75cb8814
refs/heads/master
2023-04-16T05:00:44.956767
2021-04-28T09:42:30
2021-04-28T09:42:30
327,919,224
1
0
null
null
null
null
UTF-8
Java
false
false
2,929
java
/* * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Ant", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.ant.core.execution; /** * Convert between a string and a data type * * @author <a href="mailto:conor@apache.org">Conor MacNeill</a> */ public interface Converter { /** * Convert a string from the value given to an instance of the given type. */ Object convert(String value, Class type) throws ConversionException; }
[ "1195083604@qq.com" ]
1195083604@qq.com
ad2c6f6fcbc6e30489af63ebc49799fe295ac052
4f5206a53996357320b5fa10ec8111b2fea02bad
/errai-common/src/main/java/org/jboss/errai/common/client/types/UnsatisfiedForwardLookup.java
b70c46d6b72c92477c9323a165b4514585c546ab
[]
no_license
misqu23/errai
a59a73d5559065b82d561ac67db2247d484be61f
1da0d7011e37b63b324e368f14e5df3fdfa3b269
refs/heads/master
2021-01-16T18:44:07.114659
2010-09-30T09:33:43
2010-09-30T09:33:43
948,364
1
0
null
null
null
null
UTF-8
Java
false
false
951
java
package org.jboss.errai.common.client.types; /** * @author Mike Brock <cbrock@redhat.com> */ public final class UnsatisfiedForwardLookup { private final String id; private String path; private Object key; private Object val; private DeferredBinder binder; public UnsatisfiedForwardLookup(String id) { this.id = id; } public String getId() { return id; } public void setPath(String path) { this.path = path; } public String getPath() { return path; } public Object getKey() { return key; } public void setKey(Object key) { this.key = key; } public Object getVal() { return val; } public void setVal(Object val) { this.val = val; } public DeferredBinder getBinder() { return binder; } public void setBinder(DeferredBinder binder) { this.binder = binder; } }
[ "brockm@gmail.com" ]
brockm@gmail.com
6b7d239b4a6b42778cd0a7d53fa12d1fc93083fe
c42531b0f0e976dd2b11528504e349d5501249ae
/Corrstown/MHSystems/app/src/main/java/com/mh/systems/corrstown/web/models/UnjoinItems.java
c70dd4f7ba29ce40e1303436d2b8a301bd1df12b
[ "MIT" ]
permissive
Karan-nassa/MHSystems
4267cc6939de7a0ff5577c22b88081595446e09e
a0e20f40864137fff91784687eaf68e5ec3f842c
refs/heads/master
2021-08-20T05:59:06.864788
2017-11-28T08:02:39
2017-11-28T08:02:39
112,189,266
0
0
null
null
null
null
UTF-8
Java
false
false
1,241
java
package com.mh.systems.corrstown.web.models; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class UnjoinItems { @SerializedName("Message") @Expose private String Message; @SerializedName("Result") @Expose private Integer Result; @SerializedName("CompEligiblePlayersData") @Expose private String Data; /** * * @return * The message */ public String getMessage() { return Message; } /** * * @param Message * The Message */ public void setMessage(String Message) { this.Message = Message; } /** * * @return * The Result */ public Integer getResult() { return Result; } /** * * @param result * The Result */ public void setResult(Integer result) { this.Result = Result; } /** * * @return * The CompEligiblePlayersData */ public String getData() { return Data; } /** * * @param Data * The CompEligiblePlayersData */ public void setData(String data) { this.Data = Data; } }
[ "karan@ucreate.co.in" ]
karan@ucreate.co.in
76e95b5e13b6b4a37443b03dab49c64de7dcdf53
6fdbda3581b61669f25078a6a4e603c8c1b7ef27
/src/main/java/org/softcits/pc/mgt/interceptor/AuthIntercepter.java
3587f7e809dfaa492aa6dd75cb040d8e936867af
[]
no_license
juno1985/softcits-pc-mgt
072965718eac515c9ba43b22b51565bc902057bd
4bccba7586655662284b5a6ea173c924342da920
refs/heads/master
2020-03-12T08:27:02.858620
2018-06-17T01:59:29
2018-06-17T01:59:29
130,527,732
0
0
null
null
null
null
UTF-8
Java
false
false
3,028
java
package org.softcits.pc.mgt.interceptor; import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.softcits.pc.mgt.auth.AuthUtil; import org.softcits.pc.mgt.common.CookieUtils; import org.softcits.pc.mgt.common.SoftcitsJsonUtil; import org.softcits.pc.mgt.model.MbgUser; import org.softcits.pc.mgt.service.MgtUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import com.alibaba.druid.util.StringUtils; @Component public class AuthIntercepter extends HandlerInterceptorAdapter { @Value("${COOKIE_AUTH_KEY}") private String COOKIE_AUTH_KEY; @Autowired private MgtUserService mgtUserService; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { //取token String token = CookieUtils.getCookieValue(request, COOKIE_AUTH_KEY); //判断是否为空 //未登录情况 if(StringUtils.isEmpty(token)) { //如果token没取到即未登录 response.sendRedirect("/mgt/login"); return false; } else { String userJson = mgtUserService.getUserByToken(token); //cookie中有token,但是redis里没有 //可能是session过期或伪造的token if(StringUtils.isEmpty(userJson)) { response.sendRedirect("/login"); return false; } //登录认证通过,进一步判断权限 return authBasedOnRole(userJson, handler); } } @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { // TODO Auto-generated method stub super.postHandle(request, response, handler, modelAndView); } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { // TODO Auto-generated method stub super.afterCompletion(request, response, handler, ex); } @Override public void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { // TODO Auto-generated method stub super.afterConcurrentHandlingStarted(request, response, handler); } public Boolean authBasedOnRole(String userJson, Object handler) { MbgUser user = SoftcitsJsonUtil.jsonToPojo(userJson, MbgUser.class); Integer roleId = user.getRoleId(); Set<String> actions = AuthUtil.allAuths.get(roleId.toString()); HandlerMethod hm = (HandlerMethod)handler; String reqMethod = hm.getBean().getClass().getName()+"."+hm.getMethod().getName(); //判断是否在允许访问方法集合中存在 if(!actions.isEmpty() && actions.contains(reqMethod)) { return true; } return false; } }
[ "wangzhen_tju@126.com" ]
wangzhen_tju@126.com
a41854f024c70234078e1b69d45dbcbc6e7ed5e9
66da63e21caacd856ffbebbe38dc72fc8bee026c
/app/src/main/java/com/example/android_instructor/proyectomateria/MainActivity.java
8bf21e329eaf14afa02754b5a57b1a969bb807be
[]
no_license
andres-vasquez/AND401-proyecto
d6395005d90eb411abcc3364361375121b2a684c
7423581b789bc2b72a867878c0449025e94e5f9c
refs/heads/master
2021-05-08T07:37:37.937404
2017-12-05T01:06:43
2017-12-05T01:06:43
106,885,499
0
0
null
null
null
null
UTF-8
Java
false
false
5,965
java
package com.example.android_instructor.proyectomateria; import android.content.Context; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.ListView; import android.widget.Toast; import com.firebase.ui.auth.AuthUI; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.messaging.FirebaseMessaging; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class MainActivity extends AppCompatActivity { private static final String LOG = MainActivity.class.getSimpleName(); private Context context; private ListaListViewAdapter adapter; private Button btnLogout; private ListView listaListView; private List<Producto> listaProductos; private int id =5; private static final int RC_SIGN_IN = 101; private FirebaseAuth firebaseAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); context=this; listaListView = (ListView)findViewById(R.id.listaListView); btnLogout = (Button)findViewById(R.id.btnLogout); //inicializa la lista listaProductos = new ArrayList<>(); listaProductos.add(new Producto(1,R.drawable.leche,"Leche",5)); listaProductos.add(new Producto(2,R.drawable.pan,"Pan",0.5)); listaProductos.add(new Producto(3,R.drawable.chocolate,"Chocolate",10)); listaProductos.add(new Producto(4,R.drawable.cocacola,"Coca Cola",11.5)); adapter = new ListaListViewAdapter(context,listaProductos); listaListView.setAdapter(adapter); listaListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { Producto producto = listaProductos.get(position); producto.setPrecio(9.99); adapter.notifyDataSetChanged(); Toast.makeText(context,producto.getNombre(),Toast.LENGTH_SHORT).show(); } }); //Agregar boton Button agregarButton = new Button(context); agregarButton.setText("+ Agregar"); agregarButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { agregarProducto(); } }); listaListView.addHeaderView(agregarButton); btnLogout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(firebaseAuth.getCurrentUser()!=null){ firebaseAuth.signOut(); } } }); firebaseAuth = FirebaseAuth.getInstance(); if(firebaseAuth.getCurrentUser()==null){ solicitarlogin(); } else { iniciarAcciones(); mostrarDatosUsuario(); } } private void solicitarlogin(){ startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setLogo(R.drawable.chocolate) .setAvailableProviders( Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(), new AuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build() //new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build() //new AuthUI.IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build())) )).build(), RC_SIGN_IN); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode == RC_SIGN_IN){ firebaseAuth = FirebaseAuth.getInstance(); if(firebaseAuth.getCurrentUser()!=null){ iniciarAcciones(); mostrarDatosUsuario(); } } } private void mostrarDatosUsuario(){ Toast.makeText(context, "Bienvenid@: "+firebaseAuth.getCurrentUser().getDisplayName() ,Toast.LENGTH_LONG).show(); String email=firebaseAuth.getCurrentUser().getEmail(); String photoUrl = firebaseAuth.getCurrentUser().getPhotoUrl().toString(); Log.e("EMAIL",email); Log.e("PHOTO",""+photoUrl); } private void agregarProducto(){ Producto producto = new Producto(5,R.mipmap.ic_launcher,"Dinamico"+id,10*id); FirebaseController.enviarProductos(producto); //listaProductos.add(producto); //adapter.notifyDataSetChanged(); id++; } private void iniciarAcciones(){ String token=FirebaseInstanceId.getInstance().getToken(); FirebaseMessaging.getInstance().subscribeToTopic("tekhne"); Log.e("Token",token); //Todo iniciar acciones new FirebaseController(new FirebaseController.DataChanges() { @Override public void onDataChanged(List<Producto> lstProductosRecibidos){ listaProductos.clear(); listaProductos.addAll(lstProductosRecibidos); adapter.notifyDataSetChanged(); } }).recibidProductos(); } private void iniciarSesion(){ //Todo iniciar sesion } private void cerrarSesion() { //Todo cerrar sesion } }
[ "andres.vasquez.a@hotmail.com" ]
andres.vasquez.a@hotmail.com
2abd9e0c95ab26c4715f380d2db276a356fe59b7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_bef23f97f05632fda8468988d1bf916ded3e0479/F5Activity/3_bef23f97f05632fda8468988d1bf916ded3e0479_F5Activity_t.java
8a9ca6d3953bdb88d09f91f5b96ed3c6870ce77c
[]
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
2,045
java
package com.flow5.framework; import org.xmlpull.v1.XmlPullParser; import android.os.Bundle; import com.phonegap.*; import com.phonegap.api.LOG; public class F5Activity extends DroidGap { public void onCreate(Bundle savedInstanceState, final int configId) { LOG.setLogLevel("VERBOSE"); super.onCreate(savedInstanceState); final F5Activity activity = this; final MDNSResolver resolver = new MDNSResolver(this); new Thread(new Runnable() { @Override public void run() { String devservhostname = "unknown.local"; String appName = "unknown"; XmlPullParser xpp = getApplicationContext().getResources().getXml(configId); try { while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) { if (xpp.getEventType() == XmlPullParser.START_TAG) { if (xpp.getName().equals("devservhost")) { LOG.d("F5", xpp.getName()); devservhostname = xpp.getAttributeValue(null, "name"); } if (xpp.getName().equals("app")) { LOG.d("F5", xpp.getName()); appName = xpp.getAttributeValue(null, "name"); } } xpp.next(); } } catch (Exception e) { LOG.d("F5", e.getMessage()); } final String address = resolver.resolve(devservhostname); final String app = appName; activity.runOnUiThread(new Runnable() { @Override public void run() { String url = "http://" + address + ":8008/generate?app=" + app + "&native=true&inline=true&debug=true&compress=true&platform=android&mobile=true"; // url = ("file:///android_asset/index.html"); LOG.d("F5", url); activity.loadUrl(url); } }); } }).start(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
11a1625ff06ba3c47892c716195f293c1b7e524c
6dd5f5bb63a54e36aab43f9dcafafd88b468b03a
/scfs-domain/src/main/java/com/scfs/domain/fi/dto/resp/VoucherResDto.java
6c83bd2f128be9587774fca78040e883e3a9d40f
[]
no_license
qm1083824922/scfs
ce9cef8c1c06563dcddb7c133c5dac567b622581
bd2f12615653658b06915fee6a2cdb8a3d393d81
refs/heads/master
2022-12-22T20:09:54.936706
2019-07-07T09:41:23
2019-07-07T09:41:23
195,634,196
6
5
null
2022-12-16T06:33:52
2019-07-07T09:41:15
HTML
UTF-8
Java
false
false
4,336
java
package com.scfs.domain.fi.dto.resp; import java.math.BigDecimal; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; import com.scfs.common.consts.BusUrlConsts; import com.scfs.common.consts.OperateConsts; import com.scfs.domain.CodeValue; import com.scfs.domain.base.entity.BaseEntity; /** * <pre> * * File: QueryVoucherResDto.java * Description: * TODO * Date, Who, * 2016年10月22日 Administrator * * </pre> */ @SuppressWarnings("serial") public class VoucherResDto extends BaseEntity { private String accountBookName; private String busiUnitName; private String voucherWord; private String voucherSummary; private String voucherNo; private BigDecimal debitAmount; private BigDecimal creditAmount; private String billTypeName; private String billNo; private String stateName; private Integer attachmentNumber; private Integer voucherLineNumber; //分录数量 @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") private Date voucherDate; /**操作集合*/ private List<CodeValue> opertaList; public static class Operate{ public static Map<String,String> operMap = new HashMap<String,String>(); static { operMap.put(OperateConsts.DELETE, BusUrlConsts.DELETE_VOUCHER); operMap.put(OperateConsts.DETAIL, BusUrlConsts.DETAIL_VOUCHER_DETAIL); operMap.put(OperateConsts.EDIT, BusUrlConsts.EDIT_VOUCHER_DETAIL); operMap.put(OperateConsts.SUBMIT, BusUrlConsts.SUBMIT_VOUCHER); operMap.put(OperateConsts.PRINT, BusUrlConsts.PRINT_VOUCHER); } } public String getAccountBookName() { return accountBookName; } public void setAccountBookName(String accountBookName) { this.accountBookName = accountBookName; } public String getBusiUnitName() { return busiUnitName; } public void setBusiUnitName(String busiUnitName) { this.busiUnitName = busiUnitName; } public String getVoucherSummary() { return voucherSummary; } public void setVoucherSummary(String voucherSummary) { this.voucherSummary = voucherSummary; } public String getVoucherNo() { return voucherNo; } public void setVoucherNo(String voucherNo) { this.voucherNo = voucherNo; } public BigDecimal getDebitAmount() { return debitAmount; } public void setDebitAmount(BigDecimal debitAmount) { this.debitAmount = debitAmount; } public BigDecimal getCreditAmount() { return creditAmount; } public void setCreditAmount(BigDecimal creditAmount) { this.creditAmount = creditAmount; } public String getBillTypeName() { return billTypeName; } public void setBillTypeName(String billTypeName) { this.billTypeName = billTypeName; } public Integer getAttachmentNumber() { return attachmentNumber; } public void setAttachmentNumber(Integer attachmentNumber) { this.attachmentNumber = attachmentNumber; } public String getBillNo() { return billNo; } public void setBillNo(String billNo) { this.billNo = billNo; } public List<CodeValue> getOpertaList() { return opertaList; } public void setOpertaList(List<CodeValue> opertaList) { this.opertaList = opertaList; } public String getVoucherWord() { return voucherWord; } public void setVoucherWord(String voucherWord) { this.voucherWord = voucherWord; } public String getStateName() { return stateName; } public void setStateName(String stateName) { this.stateName = stateName; } public Integer getVoucherLineNumber() { return voucherLineNumber; } public void setVoucherLineNumber(Integer voucherLineNumber) { this.voucherLineNumber = voucherLineNumber; } public Date getVoucherDate() { return voucherDate; } public void setVoucherDate(Date voucherDate) { this.voucherDate = voucherDate; } }
[ "1083824922@qq.com" ]
1083824922@qq.com
bfc154bff7fcc7741bdcefb0655b8928d87dee6a
03752e89867c8b85c6d5b3635c772c9280818563
/src/main/java/com/porterhead/filter/jersey/JerseyCrossOriginResourceSharingFilter.java
73dac9f40115064de7d479b15e36849ee0251823
[]
no_license
hnccho/oauth2-provider-maven
105c0be7bbff04f85a1d5e305696456fce1f34db
e83ccf203fbb4d41b7f32f73e56e985f5caab23c
refs/heads/master
2016-09-05T16:40:44.928197
2015-06-09T12:45:55
2015-06-09T12:45:55
37,120,087
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
/* * This filter provides CORS support allowing resources to be requested from other domains * This is important if your client and your server do not reside on the same server or are running on different ports */ package com.porterhead.filter.jersey; import com.porterhead.filter.BaseCORSFilter; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerResponseContext; import javax.ws.rs.container.ContainerResponseFilter; import java.io.IOException; @Component public class JerseyCrossOriginResourceSharingFilter extends BaseCORSFilter implements ContainerResponseFilter { @Value("${cors.allowed.origins}") String allowedOriginsString; public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { if(requestContext.getHeaders().containsKey("Origin")) { String origin = requestContext.getHeaders().getFirst("Origin"); if(getAllowedOrigins(allowedOriginsString).contains(origin)) { responseContext.getHeaders().add("Access-Control-Allow-Origin", origin); responseContext.getHeaders().add("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS"); responseContext.getHeaders().add("Access-Control-Allow-Headers", "X-HTTP-Method-Override, Content-Type, x-requested-with, Authorization"); responseContext.getHeaders().add("Access-Control-Max-Age", "3600"); } } } }
[ "hnccho@hanafos.com" ]
hnccho@hanafos.com
3b3b366bfebc8c57e5ebee61c7f06c13d18d7ffa
3a24d428506109c3d4f0db5c71b785742a33bc44
/nio/src/main/java/com/github/thorbenkuck/keller/nio/files/NativeDirectoryWatcherFactory.java
8eea3eb787036dfd63f31d96aa67316f52e61940
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
ThorbenKuck/Keller
2ec3ed34f716c3e8a0e13e4b118764921b96a7fa
1abe6548717b0a7da1e3752e4861eaad98a7ccda
refs/heads/master
2021-03-19T08:17:52.077024
2019-07-31T15:58:09
2019-07-31T15:58:09
89,494,621
0
0
Apache-2.0
2020-10-13T03:42:18
2017-04-26T15:05:34
Java
UTF-8
Java
false
false
1,126
java
package com.github.thorbenkuck.keller.nio.files; import java.nio.file.Path; import java.util.concurrent.ExecutorService; import java.util.function.Consumer; final class NativeDirectoryWatcherFactory implements DirectoryWatcherFactory { private final NativeDirectoryWatcher watcher = new NativeDirectoryWatcher(); @Override public final DirectoryWatcherFactory setExecutorService(ExecutorService executorService) { watcher.setExecutorService(executorService); return this; } @Override public final DirectoryWatcherFactory ifNewFile(Consumer<Path> consumer) { watcher.onNewFile(consumer); return this; } @Override public final DirectoryWatcherFactory ifUpdatedFile(Consumer<Path> consumer) { watcher.onModifiedFile(consumer); return this; } @Override public final DirectoryWatcherFactory ifDeletedFile(Consumer<Path> consumer) { watcher.onDeletedFile(consumer); return this; } @Override public final DirectoryWatcherFactory addFileHandler(FileHandler handler) { watcher.addFileHandler(handler); return this; } @Override public final DirectoryWatcher get() { return watcher; } }
[ "thorben.kuck@gmail.com" ]
thorben.kuck@gmail.com
e7102191419216af798c256c9900818be431b49d
5ab026c6a6213e3301b127c9a9456533a694129b
/code/java/1.4.0/opc-ua-java-stack-1.02/src/org/opcfoundation/ua/encoding/EncoderContext.java
7a7c9e3522565fc2d9e160d143bcb6e859be57ac
[ "Apache-2.0" ]
permissive
wuzhaojie/opcua-training
2071ef1390feb76f1657baa9afa0137fec3bbc48
f9c595fda501778acc1f531cfb5e1a27e192f68d
refs/heads/master
2021-12-26T10:57:55.525000
2021-08-04T15:15:43
2021-08-04T15:15:43
226,808,478
3
0
null
2021-06-04T02:21:48
2019-12-09T07:14:59
Java
UTF-8
Java
false
false
6,540
java
/* ======================================================================== * Copyright (c) 2005-2013 The OPC Foundation, Inc. All rights reserved. * * OPC Reciprocal Community License ("RCL") Version 1.00 * * Unless explicitly acquired and licensed from Licensor under another * license, the contents of this file are subject to the Reciprocal * Community License ("RCL") Version 1.00, or subsequent versions as * allowed by the RCL, and You may not copy or use this file in either * source code or executable form, except in compliance with the terms and * conditions of the RCL. * * All software distributed under the RCL is provided strictly on an * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, * AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RCL for specific * language governing rights and limitations under the RCL. * * The complete license agreement can be found here: * http://opcfoundation.org/License/RCL/1.00/ * ======================================================================*/ package org.opcfoundation.ua.encoding; import java.lang.reflect.Array; import java.util.Arrays; import org.opcfoundation.ua.builtintypes.ExpandedNodeId; import org.opcfoundation.ua.builtintypes.ExtensionObject; import org.opcfoundation.ua.builtintypes.NodeId; import org.opcfoundation.ua.builtintypes.Structure; import org.opcfoundation.ua.common.NamespaceTable; import org.opcfoundation.ua.common.ServerTable; import org.opcfoundation.ua.common.ServiceResultException; import org.opcfoundation.ua.encoding.binary.IEncodeableSerializer; import org.opcfoundation.ua.utils.StackUtils; /** * * */ public class EncoderContext { private static EncoderContext defaultInstance = new EncoderContext(NamespaceTable.getDefaultInstance(), null, StackUtils.getDefaultSerializer()); public static EncoderContext getDefaultInstance() { return defaultInstance ; } public Object decode(ExtensionObject[] values) throws DecodingException { return decode(values, null); } public Object decode(ExtensionObject[] values, NamespaceTable namespaceTable) throws DecodingException { Object value; int n = values.length; Structure[] newValue = new Structure[n]; for (int i = 0; i < n; i++) { ExtensionObject obj = values[i]; if (obj != null) newValue[i] = obj.decode(this, namespaceTable); } value = newValue; if (n > 0) { Class<? extends Structure> valueClass = null; for (int i = 0; i < n; i++) if (newValue[i] != null) { Class<? extends Structure> newClass = newValue[i] .getClass(); if (valueClass == null) valueClass = newClass; else if (!newClass.isAssignableFrom(valueClass)) if (valueClass.isAssignableFrom(newClass)) valueClass = newClass; else { valueClass = null; break; } } if (valueClass != null) value = Arrays.copyOf(newValue, n, ((Structure[]) Array .newInstance(valueClass, 0)).getClass()); } return value; } public NamespaceTable namespaceTable; public ServerTable serverTable; public IEncodeableSerializer encodeableSerializer; public int maxMessageSize = 4*1024*1024*1024; // 0 = norestriction public int maxStringLength = 0; //UnsignedShort.MAX_VALUE.intValue(); public int maxByteStringLength = 0; //UnsignedShort.MAX_VALUE.intValue() * 16; public int maxArrayLength = 0; //UnsignedShort.MAX_VALUE.intValue(); public EncoderContext(NamespaceTable namespaceTable, ServerTable serverTable, IEncodeableSerializer encodeableSerializer, int maxMessageSize) { this.encodeableSerializer = encodeableSerializer; this.namespaceTable = namespaceTable; this.serverTable = serverTable; this.maxMessageSize = maxMessageSize; } public EncoderContext(NamespaceTable namespaceTable, ServerTable serverTable, IEncodeableSerializer encodeableSerializer) { this.encodeableSerializer = encodeableSerializer; this.namespaceTable = namespaceTable; this.serverTable = serverTable; } public int getMaxMessageSize() { return maxMessageSize; } public void setMaxMessageSize(int encodeMessageMaxSize) { this.maxMessageSize = encodeMessageMaxSize; } public NamespaceTable getNamespaceTable() { return namespaceTable; } public void setNamespaceTable(NamespaceTable namespaceTable) { this.namespaceTable = namespaceTable; } public NodeId getEncodeableNodeId(Class<? extends IEncodeable> clazz, EncodeType type) throws ServiceResultException { return namespaceTable.toNodeId(encodeableSerializer.getNodeId(clazz, type)); } public ServerTable getServerTable() { return serverTable; } public void setServerTable(ServerTable serverTable) { this.serverTable = serverTable; } public IEncodeableSerializer getEncodeableSerializer() { return encodeableSerializer; } public Class<? extends IEncodeable> getEncodeableClass(NodeId id) { return encodeableSerializer.getClass(namespaceTable.toExpandedNodeId(id)); } public void setEncodeableSerializer(IEncodeableSerializer encodeableSerializer) { this.encodeableSerializer = encodeableSerializer; } public NodeId toNodeId(ExpandedNodeId id) throws EncodingException { try { return namespaceTable.toNodeId(id); } catch (ServiceResultException e) { throw new EncodingException("Could not get namespace index for given id"); } } public int getMaxStringLength() { return maxStringLength; } public void setMaxStringLength(int maxStringLength) { this.maxStringLength = maxStringLength; } public int getMaxByteStringLength() { return maxByteStringLength; } public void setMaxByteStringLength(int maxByteStringLength) { this.maxByteStringLength = maxByteStringLength; } public int getMaxArrayLength() { return maxArrayLength; } public void setMaxArrayLength(int maxArrayLength) { this.maxArrayLength = maxArrayLength; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(" namespaceTable = "+namespaceTable + "\n"); sb.append(" serverTable = "+serverTable + "\n"); sb.append(" maxMessageSize = "+maxMessageSize + "\n"); sb.append(" maxStringLength = "+maxStringLength + "\n"); sb.append(" maxByteStringLength = "+maxByteStringLength + "\n"); sb.append(" maxArrayLength = "+maxArrayLength + "\n"); return sb.toString(); } }
[ "wuzj@sunwayland.com.cn" ]
wuzj@sunwayland.com.cn
e1fd66b39aafaae7f0cc1b8547b0bf2ef1daa0ea
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1183/src/main/java/module1183packageJava0/Foo1746.java
322684f7ae217f90906d9b5b44d4555307f17892
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
378
java
package module1183packageJava0; import java.lang.Integer; public class Foo1746 { Integer int0; public void foo0() { new module1183packageJava0.Foo1745().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
281ad70ffe51ac9923ec53697f2cb8d3d8e8d546
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-proxy/index-proxy/src/main/java/com/aspire/mirror/indexproxy/basicdatasync/MonitorTemplateDataListSync.java
00d7e54c7d51b6ee23cc2ffb55c34947d0f02693
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,000
java
package com.aspire.mirror.indexproxy.basicdatasync; import java.util.List; import org.apache.commons.lang3.tuple.Pair; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import com.aspire.mirror.indexproxy.basicdatasync.client.BasicDataSyncResponse; import com.aspire.mirror.indexproxy.basicdatasync.client.IBasicDataSyncClient; import com.aspire.mirror.indexproxy.client.ClientServiceBuilder; import com.aspire.mirror.indexproxy.domain.MonitorTemplateRecord; /** * 模版数据同步 * Project Name:index-proxy * File Name:TemplateDataListSync.java * Package Name:com.aspire.mirror.indexproxy.basicdatasync * ClassName: TemplateDataListSync <br/> * date: 2018年8月14日 下午6:09:11 <br/> * * @author pengguihua * @since JDK 1.6 */ @Component class MonitorTemplateDataListSync extends AbstractBasicDataListSync<MonitorTemplateRecord> { @Value("${basicDataSync.url}") private String syncUrl; // @Autowired // private IBasicDataSyncClient client; @Override public String getSyncItemIdentity() { return "monitor_template"; } @Override protected Pair<Integer, List<MonitorTemplateRecord>> fetchsyncItemDataList0() { IBasicDataSyncClient client = ClientServiceBuilder.buildClientService(IBasicDataSyncClient.class, syncUrl); BasicDataSyncResponse<MonitorTemplateRecord> syncDataResult = client.syncMonitorTemplateList(super.getStartSyncSeq(), super.proxyIdentityConfig.getId()); return Pair.of(syncDataResult.getLastSyncSeq(), syncDataResult.getItemDataList()); } @Override protected void processUpdateBasicData(MonitorTemplateRecord dataItem) { super.basicDataBiz.saveMonitorTemplate(dataItem); } @Override protected void processRemoveBasicData(MonitorTemplateRecord dataItem) { super.basicDataBiz.removeMonitorTemplate(dataItem.getTemplateId()); } }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
48c98718f743e86184bfb0edbccbdfb5cdc565d7
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
/spring-aop-perf-tests/src/main/java/coas/perf/TargetClass250/Advice47.java
91eab39f48d114788ba8b61d4ba4d53d8b9f71be
[]
no_license
pmaslankowski/java-contracts
28b1a3878f68fdd759d88b341c8831716533d682
46518bb9a83050956e631faa55fcdf426589830f
refs/heads/master
2021-03-07T13:15:28.120769
2020-09-07T20:06:31
2020-09-07T20:06:31
246,267,189
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package coas.perf.TargetClass250; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import coas.perf.TargetClass250.Subject250; @Aspect @Component("Advice_250_47") public class Advice47 { private int counter = 0; @Around("execution(* Subject250.*(..))") public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable { int res = (int) joinPoint.proceed(); for (int i=0; i < 1000; i++) { if (res % 2 == 0) { res /= 2; } else { res = 2 * res + 1; } } return res; } }
[ "pmaslankowski@gmail.com" ]
pmaslankowski@gmail.com
2e93edf8890620369808ce7ef46894a92fe9b744
9cfe61ed093a4ba0f253dc52db11f337cdf034a8
/app/src/main/java/com/ifeell/app/aboutball/community/model/CommunityRecommendModel.java
4e354feae4a8bdf08933c9ef7a762b4240b21725
[]
no_license
Hu12037102/AboutBall
1e3cd39e7ad152508398c23fb577135e0a2ea830
27d0e7d34a6545946df39b13ebda5ada76eed6cd
refs/heads/master
2021-05-23T08:23:18.840879
2019-10-22T14:28:58
2019-10-22T14:28:58
253,191,665
0
0
null
null
null
null
UTF-8
Java
false
false
1,378
java
package com.ifeell.app.aboutball.community.model; import com.ifeell.app.aboutball.base.BaseObserver; import com.ifeell.app.aboutball.commonality.model.LoginOrShareModel; import com.ifeell.app.aboutball.community.CommunityService; import com.ifeell.app.aboutball.community.bean.ResultCommunityDataBean; import com.ifeell.app.aboutball.community.bean.ResultRecommendHotBean; import java.util.List; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; /** * 作者: 胡庆岭 * 创建时间: 2019/3/19 13:55 * 更新时间: 2019/3/19 13:55 * 描述:社区-推荐model */ public class CommunityRecommendModel extends LoginOrShareModel{ public void loadHeadData(BaseObserver<List<ResultRecommendHotBean>> observer) { mRetrofitManger.create(CommunityService.class) .loadHotTopic() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(observer); } public void loadData(int pageNum, int pageSize, BaseObserver<List<ResultCommunityDataBean>>observer) { mRetrofitManger.create(CommunityService.class) .loadRecommendData(pageNum,pageSize) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(observer); } }
[ "1203747102@qq.com" ]
1203747102@qq.com
fc0167d6f1e65acb572cce1e461614c3c2b2270d
3d7485f7866ff56a3e29c5f4f0c48a3ce3541db4
/src/test/java/com/vtence/molecule/decoration/HtmlPageSelectorTest.java
b764d73729bb8918822c3be8abdd92f92d028bab
[]
no_license
bodyjar/molecule
1276a579d3cf64769eb069daee73ab23ee002ac2
3951c40d4b91cdc998791eb208208467e877779a
refs/heads/master
2021-01-15T22:33:17.146801
2013-03-13T19:39:11
2013-03-13T19:39:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,558
java
package com.vtence.molecule.decoration; import org.junit.Test; import com.vtence.molecule.HttpStatus; import com.vtence.molecule.Response; import java.io.IOException; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static com.vtence.molecule.support.MockResponse.aResponse; public class HtmlPageSelectorTest { Selector selector = new HtmlPageSelector(); @Test public void selectsContentOfTypeTextHtmlWhenResponseIsOk() throws IOException { Response response = aResponse(). withContentType("text/html; charset=iso-8859-1"). withStatus(HttpStatus.OK); assertThat("content selection", selector.select(response), equalTo(true)); } @Test public void doesNotSelectContentIfNotHtml() throws IOException { Response response = aResponse(). withContentType("text/plain"). withStatus(HttpStatus.OK); assertThat("content selection", selector.select(response), equalTo(false)); } @Test public void doesNotSelectContentWhenStatusNotOK() throws IOException { Response response = aResponse().withStatus(HttpStatus.SEE_OTHER); assertThat("content selection", selector.select(response), equalTo(false)); } @Test public void doesNotSelectResponseWithoutContentType() throws IOException { Response response = aResponse().withStatus(HttpStatus.OK); assertThat("content selection", selector.select(response), equalTo(false)); } }
[ "vtence@gmail.com" ]
vtence@gmail.com
d1bc1899d92a5632c3d8b073a223b5e89083ca83
75df6276134f5c1687885619b02491f8ac30da6c
/design-patterns/src/main/java/org/bhoopendra/designpatterns/ocp/non/ocp/ProductFilter.java
f4f02c3e7af781b96ca04cb5ed48e25fbbee10d0
[]
no_license
bhokumar/design-analysis
86a552511943ac3e9cfa353b44ab19c4e3339fb4
4c88f78bfb67be10ad35e4a17b391ca2266fd342
refs/heads/master
2021-06-12T11:30:01.950163
2021-04-24T17:36:14
2021-04-24T17:36:14
179,528,994
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
package org.bhoopendra.designpatterns.ocp.non.ocp; import org.bhoopendra.designpatterns.ocp.Color; import org.bhoopendra.designpatterns.ocp.Product; import org.bhoopendra.designpatterns.ocp.Size; import java.util.List; import java.util.stream.Stream; public class ProductFilter { public Stream<Product> filterByColor(List<Product> products, Color color) { return products.stream().filter(product -> product.getColor() == color); } public Stream<Product> filterBySize(List<Product> products, Size size) { return products.stream().filter(product -> product.getSize() == size); } public Stream<Product> filterBySizeAndColor(List<Product> products, Size size, Color color) { return products.stream().filter(product -> product.getSize() == size && product.getColor() == color); } }
[ "bhoopendra.akgec@gmail.com" ]
bhoopendra.akgec@gmail.com
6a08f0fbad65a51c52bcb278d35254382cd4183f
9eed90c9d739165e8d45df39673f3df740b23aca
/ShoppingCartBackEnd/src/main/java/com/niit/shoppingcartbackend/daoimpl/CategoryDAOImpl.java
03562cf408ee155606d3918fcb3792d917020a6a
[]
no_license
DTDemo2017/repo2
d50add067937ff5455b35186835a2a197d285714
0e1fa016f9349fcc6e23b7df15bf00cbdba39392
refs/heads/master
2021-01-19T11:57:34.223810
2017-10-13T18:02:01
2017-10-13T18:02:01
82,272,528
0
0
null
null
null
null
UTF-8
Java
false
false
2,477
java
package com.niit.shoppingcartbackend.daoimpl; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.niit.shoppingcartbackend.dao.CategoryDAO; import com.niit.shoppingcartbackend.domain.Category; @Repository("categoryDAO") @Transactional public class CategoryDAOImpl implements CategoryDAO { @Autowired private SessionFactory sessionFactory; public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public CategoryDAOImpl(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } //written user defined constructor with one parameter i.e. sessionFactory CategoryDAOImpl(){} private Session getCurrentSession() { return sessionFactory.getCurrentSession(); } public boolean save(Category category) { try{ getCurrentSession().save(category); } catch(Exception ex){ ex.printStackTrace(); return false; } return true; } public boolean update(Category category) { try{ getCurrentSession().update(category); } catch(Exception ex){ ex.printStackTrace(); return false; } return true; } public boolean delete(String categoryid) { try{ getCurrentSession().delete(getCategoryByCategoryID(categoryid)); } catch(Exception ex){ ex.printStackTrace(); return false; } return true; } public boolean validate(String categoryid, String categoryname) { Query query= sessionFactory.getCurrentSession().createQuery("from Category where categoryid= ? and categoryname= ?"); query.setString(0, categoryid); query.setString(1, categoryname); query.uniqueResult(); if (query.uniqueResult() ==null) { return false; } else { return true; } } public List<Category> list() { return getCurrentSession().createQuery("from Category").list(); } public Category getCategoryByCategoryID(String categoryid) { return(Category)getCurrentSession().get(Category.class, categoryid); //select * from category where categoryid= ? } public Category getCategoryByCategoryName(String categoryname) { return(Category)getCurrentSession().createQuery("from Category where categoryname= ?") .setString(0, categoryname).uniqueResult(); } }
[ "=" ]
=
4e1af31f7b73408fb46ab7ce3900f397c5927bd0
2dd25ff091a63f53d70cb07ce11dbc10345c0dbc
/ilbars-039-numbers-sortnumber/src/com/doganilbars/main/SortNumber2.java
be5848d3c17e4b86b3473b37bac3e7dc9909b6f5
[]
no_license
hacidoganilbars/basic-java
0b1d71f67fd34408e0cf545d7152ef2854c618df
7eddcadab50d212d75c0019bee72e444b6445bda
refs/heads/master
2020-03-16T05:19:55.418605
2018-05-08T23:14:58
2018-05-08T23:14:58
132,530,386
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.doganilbars.main; import java.util.Scanner; //sort the given number in desceding order, without using data structures public class SortNumber2 { public static void main(String[] args) { int number; int temp; int result = 0; Scanner scan = new Scanner(System.in); System.out.print("Enter a number: "); number = scan.nextInt(); temp = number; for (int i = 9; i >= 1; i--) { number = temp; while (number > 0) { int rem = number % 10; if (rem == i) { result = (result * 10) + rem; } number = number / 10; } } System.out.println("After sorting the number is " + result); scan.close(); } }
[ "hd.ilbars@hotmail.com" ]
hd.ilbars@hotmail.com
60ffca283935076bb38f22344211f71dc6db8b16
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/order/p480ui/p1009a/C24802j.java
51b4b1be10cb6aec8b0bcaa404219347b97014f9
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,081
java
package com.tencent.p177mm.plugin.order.p480ui.p1009a; import android.content.Context; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import android.widget.TextView; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.C25738R; import com.tencent.p177mm.p208bz.C1338a; import com.tencent.p177mm.p612ui.base.preference.Preference; import com.tencent.p177mm.plugin.order.model.MallOrderDetailObject.HelpCenter; import com.tencent.p177mm.sdk.platformtools.C5046bo; import java.util.LinkedList; import java.util.List; /* renamed from: com.tencent.mm.plugin.order.ui.a.j */ public final class C24802j extends Preference { OnClickListener mOnClickListener = null; private View mView = null; List<HelpCenter> pbM = new LinkedList(); String peR; OnClickListener peS = null; public C24802j(Context context) { super(context); AppMethodBeat.m2504i(43924); setLayoutResource(2130970055); AppMethodBeat.m2505o(43924); } public final View getView(View view, ViewGroup viewGroup) { AppMethodBeat.m2504i(43925); if (this.mView == null) { this.mView = onCreateView(viewGroup); } onBindView(this.mView); View view2 = this.mView; AppMethodBeat.m2505o(43925); return view2; } public final void onBindView(View view) { AppMethodBeat.m2504i(43926); super.onBindView(view); LinearLayout linearLayout = (LinearLayout) view.findViewById(2131825842); linearLayout.removeAllViews(); if (this.pbM == null) { AppMethodBeat.m2505o(43926); return; } int size; int i; if (C5046bo.isNullOrNil(this.peR) || this.peS == null) { size = this.pbM.size() - 1; } else { size = this.pbM.size(); } if (size == 0) { i = -1; } else { i = size; } int i2 = 0; for (int i3 = 0; i3 < this.pbM.size(); i3++) { HelpCenter helpCenter = (HelpCenter) this.pbM.get(i3); TextView textView = new TextView(this.mContext); textView.setTextColor(this.mContext.getResources().getColor(C25738R.color.f11782h4)); textView.setTextSize(0, (float) C1338a.m2856al(this.mContext, C25738R.dimen.f9980m5)); textView.setIncludeFontPadding(false); textView.setText(helpCenter.name); textView.setTag(helpCenter); textView.setGravity(17); textView.setOnClickListener(this.mOnClickListener); if (i2 == i) { textView.setTextColor(this.mContext.getResources().getColor(C25738R.color.f12069r8)); } linearLayout.addView(textView, new LayoutParams(0, -2, 1.0f)); if (i2 < i) { View view2 = new View(this.mContext); view2.setBackgroundColor(this.mContext.getResources().getColor(C25738R.color.a04)); linearLayout.addView(view2, new LayoutParams(C1338a.m2856al(this.mContext, C25738R.dimen.f9795fv), -1)); } i2++; } if (!(C5046bo.isNullOrNil(this.peR) || this.peS == null)) { TextView textView2 = new TextView(this.mContext); textView2.setTextColor(this.mContext.getResources().getColor(C25738R.color.f11782h4)); textView2.setTextSize(0, (float) C1338a.m2856al(this.mContext, C25738R.dimen.f9980m5)); textView2.setIncludeFontPadding(false); textView2.setText(this.peR); textView2.setGravity(17); textView2.setOnClickListener(this.peS); if (i2 == i) { textView2.setTextColor(this.mContext.getResources().getColor(C25738R.color.f12069r8)); } linearLayout.addView(textView2, new LayoutParams(0, -2, 1.0f)); } AppMethodBeat.m2505o(43926); } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
3caa51401de5a748a73a462f2f4c33b7e812367f
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201808/TargetingValue.java
78acc1bdd54c6b0718110b879d6b63aa6f409a77
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
5,195
java
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * TargetingValue.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.admanager.axis.v201808; /** * Contains a {@link Targeting} value. * * <p><b>This object is experimental! <code>TargetingValue</code> * is an experimental, innovative, * and rapidly changing new feature for Ad Manager. Unfortunately, * being on the bleeding edge means * that we may make backwards-incompatible changes to <code>TargetingValue</code>. * We will inform * the community when this feature is no longer experimental.</b> */ public class TargetingValue extends com.google.api.ads.admanager.axis.v201808.ObjectValue implements java.io.Serializable { /* The {@code Targeting} value. */ private com.google.api.ads.admanager.axis.v201808.Targeting value; public TargetingValue() { } public TargetingValue( com.google.api.ads.admanager.axis.v201808.Targeting value) { this.value = value; } @Override public String toString() { return com.google.common.base.MoreObjects.toStringHelper(this.getClass()) .omitNullValues() .add("value", getValue()) .toString(); } /** * Gets the value value for this TargetingValue. * * @return value * The {@code Targeting} value. */ public com.google.api.ads.admanager.axis.v201808.Targeting getValue() { return value; } /** * Sets the value value for this TargetingValue. * * @param value * The {@code Targeting} value. */ public void setValue(com.google.api.ads.admanager.axis.v201808.Targeting value) { this.value = value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof TargetingValue)) return false; TargetingValue other = (TargetingValue) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.value==null && other.getValue()==null) || (this.value!=null && this.value.equals(other.getValue()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getValue() != null) { _hashCode += getValue().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TargetingValue.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201808", "TargetingValue")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("value"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201808", "value")); elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201808", "Targeting")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
a6069d1bb579afb4bc0fad106d0b6441467e27fd
848c563ddecdefdb4e6d91dfb9651c67ddcbee78
/tangminet/topaiebiz-transaction/src/main/java/com/topaiebiz/trade/order/core/order/handler/common/MemberLoadHandler.java
890cc4842ad6e95a97af471980979230b1feb84f
[]
no_license
liveqmock/tangxIdea
264481ca7e087d5d8cf23854fb677b0c1376c188
7e780c538434638a79d50e33f45ab0be3ae90625
refs/heads/master
2020-04-04T14:44:18.241241
2018-06-29T14:51:49
2018-06-29T14:51:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,315
java
package com.topaiebiz.trade.order.core.order.handler.common; import com.nebulapaas.web.exception.GlobalException; import com.topaiebiz.member.dto.member.MemberDto; import com.topaiebiz.trade.order.core.order.context.BuyerContext; import com.topaiebiz.trade.order.core.order.handler.OrderSubmitContext; import com.topaiebiz.trade.order.core.order.handler.OrderSubmitHandler; import com.topaiebiz.trade.order.exception.PaymentExceptionEnum; import com.topaiebiz.trade.order.facade.MemberServiceFacade; import com.topaiebiz.trade.order.po.common.BuyerBO; import com.topaiebiz.trade.order.po.ordersubmit.OrderRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /*** * @author yfeng * @date 2018-01-19 14:44 */ @Component("orderMemberLoadHandler") public class MemberLoadHandler implements OrderSubmitHandler { @Autowired private MemberServiceFacade memberServiceFacade; @Override public void handle(OrderSubmitContext submitContext, OrderRequest orderRequest) { BuyerBO buyer = BuyerContext.get(); MemberDto memberDto = memberServiceFacade.getMember(buyer.getMemberId()); if (memberDto.isAccountLock()) { throw new GlobalException(PaymentExceptionEnum.ACCOUNT_LOCK_ERROR); } } }
[ "207542948@qq.com" ]
207542948@qq.com
22df4f26d95848cc90e7d88a3311e2e124626775
887730617f9235df7fc02c7fc718d83ad626ea6a
/Model/src/main/java/com/darkedges/oim/collection/ICredentials.java
ff07741de9c66c5854a05e74700826b1adae43ed
[]
no_license
nirving/OIMForgottenPassword
2ebe75bf08b3e7fb0263bedce788082693bdf4fe
10dea3babdfc50236a8cb7cc2fe5c82cbbf7ff48
refs/heads/master
2016-08-03T00:48:38.889748
2014-11-26T10:22:27
2014-11-26T10:22:48
27,169,468
1
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.darkedges.oim.collection; import java.util.Collection; import local.darkedges.oim.schemas.Answer; import com.darkedges.oim.model.ICredentialQuestion; public interface ICredentials { Collection<ICredentialQuestion> getQuestions(String uid); boolean compareAnswer(Answer answer); }
[ "nirving@darkedges.com" ]
nirving@darkedges.com
a86310d40e97f482a6d5864dd3491fd940bed58f
132d8473c1f942640a21c6121aadd483ccedcda2
/feature/src/main/java/android/js/com/myapplication/feature/pullrefresh/PullRefreshActivity.java
283d56f507a4d8c60918ec9f01ecdf256776ff33
[]
no_license
xiexlp/MyApplication
55e16a0b0ae8d760938a4907efef998191d1a9f2
349d6a6040be74b36188cca1f540b674720c9a90
refs/heads/master
2020-06-23T10:12:53.245826
2019-07-24T08:40:59
2019-07-24T08:40:59
198,592,993
0
0
null
null
null
null
UTF-8
Java
false
false
5,223
java
package android.js.com.myapplication.feature.pullrefresh; import android.content.Intent; import android.js.com.myapplication.feature.R; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class PullRefreshActivity extends AppCompatActivity implements View.OnClickListener { private Button pullRefreshListViewButton; private Button pullRefreshGridViewButton; private Button pullRefreshFragmentViewButton; private Button pullRefreshViewpagerViewButton; private Button pullRefreshViewpager2ViewButton; private Button pullRefreshWebviewViewButton; private Button pullRefreshWebviewViewButton2; private Button pullRefreshScrollViewButton; private TextView titleView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pull_refresh); findViews(); titleView= findViewById(R.id.titleView); titleView.setText("测试pull to refresh"); } /** * Find the Views in the layout<br /> * <br /> * Auto-created on 2019-02-03 19:08:03 by Android Layout Finder * (http://www.buzzingandroid.com/tools/android-layout-finder) */ private void findViews() { pullRefreshListViewButton = (Button)findViewById( R.id.pull_refresh_list_view_button ); pullRefreshGridViewButton = (Button)findViewById( R.id.pull_refresh_grid_view_button ); pullRefreshFragmentViewButton = (Button)findViewById( R.id.pull_refresh_fragment_view_button ); pullRefreshViewpagerViewButton = (Button)findViewById( R.id.pull_refresh_viewpager_view_button ); pullRefreshViewpager2ViewButton = (Button)findViewById( R.id.pull_refresh_viewpager2_view_button ); pullRefreshWebviewViewButton = (Button)findViewById( R.id.pull_refresh_webview_view_button ); pullRefreshWebviewViewButton2=(Button) findViewById(R.id.pull_refresh_webview_view2_button); pullRefreshScrollViewButton =(Button)findViewById(R.id.pull_refresh_scroll_view_button); pullRefreshListViewButton.setOnClickListener( this ); pullRefreshGridViewButton.setOnClickListener( this ); pullRefreshFragmentViewButton.setOnClickListener( this ); pullRefreshViewpagerViewButton.setOnClickListener( this ); pullRefreshViewpager2ViewButton.setOnClickListener( this ); pullRefreshWebviewViewButton.setOnClickListener( this ); pullRefreshWebviewViewButton2.setOnClickListener(this); pullRefreshScrollViewButton.setOnClickListener(this); } /** * Handle button click events<br /> * <br /> * Auto-created on 2019-02-03 19:08:03 by Android Layout Finder * (http://www.buzzingandroid.com/tools/android-layout-finder) */ @Override public void onClick(View v) { if ( v == pullRefreshListViewButton ) { System.out.println("list view pull refresh 拉动刷新"); // Handle clicks for pullRefreshListViewButton startActivity(new Intent(this,PullToRefreshListActivity.class)); } else if ( v == pullRefreshGridViewButton ) { System.out.println("grid view pull refresh 拉动刷新"); startActivity(new Intent(this,PullToRefreshGridActivity.class)); // Handle clicks for pullRefreshGridViewButton } else if ( v == pullRefreshFragmentViewButton ) { System.out.println("fragment view pull refresh 拉动刷新"); startActivity(new Intent(this,PullToRefreshListFragmentActivity.class)); // Handle clicks for pullRefreshFragmentViewButton } else if ( v == pullRefreshViewpagerViewButton ) { System.out.println("list view in viewpager pull refresh 拉动刷新"); startActivity(new Intent(this,PullToRefreshListInViewPagerActivity.class)); // Handle clicks for pullRefreshViewpagerViewButton } else if ( v == pullRefreshViewpager2ViewButton ) { startActivity(new Intent(this,PullToRefreshViewPagerActivity.class)); System.out.println("viewpager2 view pull refresh 拉动刷新"); // Handle clicks for pullRefreshViewpager2ViewButton } else if ( v == pullRefreshWebviewViewButton ) { startActivity(new Intent(this,PullToRefreshWebViewActivity.class)); System.out.println("pull refresh webview pull refresh 拉动刷新"); // Handle clicks for pullRefreshWebviewViewButton }else if ( v == pullRefreshWebviewViewButton2 ) { startActivity(new Intent(this,PullToRefreshWebView2Activity.class)); System.out.println("pull refresh webview pull refresh 拉动刷新2"); // Handle clicks for pullRefreshWebviewViewButton }else if ( v == pullRefreshScrollViewButton ) { startActivity(new Intent(this,PullToRefreshScrollViewActivity.class)); System.out.println("pull refresh scroll view pull refresh 拉动刷新"); // Handle clicks for pullRefreshWebviewViewButton } } }
[ "pkuping@foxmail.com" ]
pkuping@foxmail.com
5489de0872ff293ccf5b95b6af915aa8f25d7f9a
4652102ea0f77e0caff90b2de076a0023638c950
/subjects_newpre/SMTPProcessor_h/instrumented/com/example/smtp/SocketException.java
ce59cd285c9801f2e55e03b3325b53b9f604845b
[]
no_license
j-godoy/epa-benchmark
678716b8f4a7ba31569500a9474ced47ad6e8a8d
e5cc4958cf927366afffe0d8741c86caf14cfceb
refs/heads/master
2021-07-05T16:14:02.902363
2020-06-18T00:51:35
2020-06-18T00:51:35
154,675,619
0
0
null
null
null
null
UTF-8
Java
false
false
130
java
package com.example.smtp; public class SocketException extends Exception { private static final long serialVersionUID = 1L; }
[ "j.godoy277@gmail.com" ]
j.godoy277@gmail.com
427e759170a64f2bab1d7a7d5eac4a076d9cba49
939bc9b579671de84fb6b5bd047db57b3d186aca
/java.xml/com/sun/org/apache/bcel/internal/generic/ClassElementValueGen.java
42c2da3671c7c1c5b33d6741f2c3bfd13454792c
[]
no_license
lc274534565/jdk11-rm
509702ceacfe54deca4f688b389d836eb5021a17
1658e7d9e173f34313d2e5766f4f7feef67736e8
refs/heads/main
2023-01-24T07:11:16.084577
2020-11-16T14:21:37
2020-11-16T14:21:37
313,315,578
1
1
null
null
null
null
UTF-8
Java
false
false
3,363
java
/* * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.org.apache.bcel.internal.generic; import java.io.DataOutputStream; import java.io.IOException; import com.sun.org.apache.bcel.internal.classfile.ClassElementValue; import com.sun.org.apache.bcel.internal.classfile.ConstantUtf8; import com.sun.org.apache.bcel.internal.classfile.ElementValue; /** * @since 6.0 */ public class ClassElementValueGen extends ElementValueGen { // For primitive types and string type, this points to the value entry in // the cpool // For 'class' this points to the class entry in the cpool private int idx; protected ClassElementValueGen(final int typeIdx, final ConstantPoolGen cpool) { super(ElementValueGen.CLASS, cpool); this.idx = typeIdx; } public ClassElementValueGen(final ObjectType t, final ConstantPoolGen cpool) { super(ElementValueGen.CLASS, cpool); // this.idx = cpool.addClass(t); idx = cpool.addUtf8(t.getSignature()); } /** * Return immutable variant of this ClassElementValueGen */ @Override public ElementValue getElementValue() { return new ClassElementValue(super.getElementValueType(), idx, getConstantPool().getConstantPool()); } public ClassElementValueGen(final ClassElementValue value, final ConstantPoolGen cpool, final boolean copyPoolEntries) { super(CLASS, cpool); if (copyPoolEntries) { // idx = cpool.addClass(value.getClassString()); idx = cpool.addUtf8(value.getClassString()); } else { idx = value.getIndex(); } } public int getIndex() { return idx; } public String getClassString() { final ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(idx); return cu8.getBytes(); // ConstantClass c = (ConstantClass)getConstantPool().getConstant(idx); // ConstantUtf8 utf8 = // (ConstantUtf8)getConstantPool().getConstant(c.getNameIndex()); // return utf8.getBytes(); } @Override public String stringifyValue() { return getClassString(); } @Override public void dump(final DataOutputStream dos) throws IOException { dos.writeByte(super.getElementValueType()); // u1 kind of value dos.writeShort(idx); } }
[ "274534565@qq.com" ]
274534565@qq.com
813dd305bcfdf5bcc42d0463ba98d4b0f118d68a
a4af858a84079e290c8e86a3924fd4d07cb16852
/src/it/eng/de4idsa/datex2/ConstructionWorks.java
722f3dd651c21f9bef7c8d793b23a8665c17668c
[]
no_license
Engineering-Research-and-Development/de4idsa
f9bcafbb9bc344007841c733bbe27330f79bc75e
774724097f9dff886d5e7ccd2243e2d03bd5c212
refs/heads/master
2022-12-10T21:14:11.479449
2019-06-20T13:59:36
2019-06-20T13:59:36
191,128,982
1
0
null
2022-11-16T12:21:21
2019-06-10T08:35:15
Java
UTF-8
Java
false
false
2,818
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.11.30 at 10:48:06 AM GMT // package it.eng.de4idsa.datex2; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * Roadworks involving the construction of new infrastructure. * * <p>Java class for ConstructionWorks complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ConstructionWorks"> * &lt;complexContent> * &lt;extension base="{http://datex2.eu/schema/2/2_0}Roadworks"> * &lt;sequence> * &lt;element name="constructionWorkType" type="{http://datex2.eu/schema/2/2_0}ConstructionWorkTypeEnum" minOccurs="0"/> * &lt;element name="constructionWorksExtension" type="{http://datex2.eu/schema/2/2_0}_ExtensionType" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ConstructionWorks", propOrder = { "constructionWorkType", "constructionWorksExtension" }) public class ConstructionWorks extends Roadworks { protected ConstructionWorkTypeEnum constructionWorkType; protected ExtensionType constructionWorksExtension; /** * Gets the value of the constructionWorkType property. * * @return * possible object is * {@link ConstructionWorkTypeEnum } * */ public ConstructionWorkTypeEnum getConstructionWorkType() { return constructionWorkType; } /** * Sets the value of the constructionWorkType property. * * @param value * allowed object is * {@link ConstructionWorkTypeEnum } * */ public void setConstructionWorkType(ConstructionWorkTypeEnum value) { this.constructionWorkType = value; } /** * Gets the value of the constructionWorksExtension property. * * @return * possible object is * {@link ExtensionType } * */ public ExtensionType getConstructionWorksExtension() { return constructionWorksExtension; } /** * Sets the value of the constructionWorksExtension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setConstructionWorksExtension(ExtensionType value) { this.constructionWorksExtension = value; } }
[ "gabriele.deluca@hotmail.com" ]
gabriele.deluca@hotmail.com
37f980cbce26ec153d5e6b289613a406cc71faa5
0b5c095e1c9906f8f38674571522973175af0b0c
/business/uc/crm-biz/src/main/java/study/daydayup/wolf/business/uc/crm/biz/customer/info/api/india/BankCardServiceImpl.java
b863a39ceb425f90b4624e0a0ad510e6e1b71360
[ "MIT" ]
permissive
hunshikan/wolf
4c6fc584bea94ce994ff5a11a1a22ad5468dc52a
1435c3bd0c05f4ec477f97922a9a85ef69c42433
refs/heads/master
2022-04-16T03:54:03.051696
2020-04-09T15:50:48
2020-04-09T15:50:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,406
java
package study.daydayup.wolf.business.uc.crm.biz.customer.info.api.india; import lombok.NonNull; import study.daydayup.wolf.business.uc.api.crm.customer.info.entity.india.BankCard; import study.daydayup.wolf.business.uc.api.crm.customer.info.service.india.BankCardService; import study.daydayup.wolf.business.uc.crm.biz.customer.info.converter.india.BankCardConverter; import study.daydayup.wolf.business.uc.crm.biz.customer.info.dal.dao.BankCardDAO; import study.daydayup.wolf.business.uc.crm.biz.customer.info.dal.dataobject.BankCardDO; import study.daydayup.wolf.framework.rpc.Result; import study.daydayup.wolf.framework.rpc.RpcService; import javax.annotation.Resource; /** * study.daydayup.wolf.business.uc.crm.biz.customer.info.api.india * * @author Wingle * @since 2020/3/22 9:12 下午 **/ @RpcService(protocol = "dubbo") public class BankCardServiceImpl implements BankCardService { @Resource private BankCardDAO dao; @Override public Result<BankCard> find(@NonNull Long accountId, @NonNull Long orgId) { BankCardDO cardDO = dao.selectByAccountIdAndOrgId(accountId, orgId); BankCard card = BankCardConverter.toModel(cardDO); return Result.ok(card); } @Override public Result<Integer> add(BankCard bankCard) { return null; } @Override public Result<Integer> modify(BankCard bankCard) { return null; } }
[ "winglechen@gmail.com" ]
winglechen@gmail.com
0b5c801e863e0f0ecde9f6dbb8109224dfefdf75
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE369_Divide_by_Zero/s02/CWE369_Divide_by_Zero__float_random_modulo_68b.java
ef7b52217f1de88d376fdfdd9eb4c4d479517b71
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
1,856
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_by_Zero__float_random_modulo_68b.java Label Definition File: CWE369_Divide_by_Zero__float.label.xml Template File: sources-sinks-68b.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: random Set data to a random value between 0.0f (inclusive) and 1.0f (exclusive) * GoodSource: A hardcoded non-zero number (two) * Sinks: modulo * GoodSink: Check for zero before modulo * BadSink : Modulo by a value that may be zero * Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package * * */ package testcases.CWE369_Divide_by_Zero.s02; import testcasesupport.*; public class CWE369_Divide_by_Zero__float_random_modulo_68b { public void badSink() throws Throwable { float data = CWE369_Divide_by_Zero__float_random_modulo_68a.data; /* POTENTIAL FLAW: Possibly modulo by zero */ int result = (int)(100.0 % data); IO.writeLine(result); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink() throws Throwable { float data = CWE369_Divide_by_Zero__float_random_modulo_68a.data; /* POTENTIAL FLAW: Possibly modulo by zero */ int result = (int)(100.0 % data); IO.writeLine(result); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink() throws Throwable { float data = CWE369_Divide_by_Zero__float_random_modulo_68a.data; /* FIX: Check for value of or near zero before modulo */ if (Math.abs(data) > 0.000001) { int result = (int)(100.0 % data); IO.writeLine(result); } else { IO.writeLine("This would result in a modulo by zero"); } } }
[ "you@example.com" ]
you@example.com
e422a9bb8cf4b148f688fd648b566c2554e2ac33
469f8b253edec12c875525d195f1a21523d4786c
/src/main/java/org/slyrack/telegrambots/annotations/Controller.java
f60b114e7ccd4cd9c09efdc306b25971b8890f5e
[]
no_license
slyrack0/jTelegramBotFramework
e2bcaa30b51a52b26f4cef9200fd3f515eedfef1
5918fbbf2b03bfe455dcc2ded4dad1e6d45b5774
refs/heads/master
2023-08-18T07:46:11.235202
2021-08-17T20:21:09
2021-08-17T20:21:09
390,620,563
12
2
null
2023-05-22T05:35:57
2021-07-29T06:13:33
Java
UTF-8
Java
false
false
453
java
package org.slyrack.telegrambots.annotations; import org.springframework.stereotype.Component; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Empty annotation to mark Controller class, which can have Command handlers */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) @Component public @interface Controller { }
[ "you@example.com" ]
you@example.com
120a1f384f4d739bf3a891d05c327486b83019f3
a19ae382fcc6a3aa6bff756c7c52dff23b775a94
/plugin/src/net/groboclown/idea/p4ic/v2/server/connection/ServerConnectedController.java
4a19e587c3808e5688e1f102bc1731af5e0fa8b4
[ "Apache-2.0" ]
permissive
ivlo11/p4ic4idea
2077043ad2cdd6c29fe59c3b1c272b5f6c226d7e
fad018dcffefd1454e070d638cab28b2d52c38f4
refs/heads/master
2021-01-13T09:21:27.991701
2016-09-14T19:42:29
2016-09-14T19:42:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,470
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.groboclown.idea.p4ic.v2.server.connection; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; /** * Maintains the state of the server connection */ public interface ServerConnectedController { boolean isWorkingOnline(); boolean isWorkingOffline(); boolean isAutoOffline(); boolean isValid(); /** * Tell the server connection to go offline. */ void disconnect(); /** * Ask the server connection to go online. The implementation may immediately * attempt to reconnect, or it may just set a status flag to "online", and perform * the actual connection attempt later. * * @param project the project attempting to connect, so that errors can be reported to * the active project. */ void connect(@NotNull Project project); }
[ "matt@groboclown.net" ]
matt@groboclown.net
20e5b4ae29e219cdce87f02829acc8a8f0302e35
27cda5e6fb5da7ae2dea91450ca1082bcaa55424
/Source/Java/VistaImagingDataSourceProvider/main/src/java/gov/va/med/imaging/vistaimagingdatasource/dicom/importer/OrderingLocationDAO.java
a5efac3e2814e879be97c1247377ea48db2f72da
[ "Apache-2.0" ]
permissive
VHAINNOVATIONS/Telepathology
85552f179d58624e658b0b266ce83e905480acf2
989c06ccc602b0282c58c4af3455c5e0a33c8593
refs/heads/master
2021-01-01T19:15:40.693105
2015-11-16T22:39:23
2015-11-16T22:39:23
32,991,526
3
9
null
null
null
null
UTF-8
Java
false
false
2,883
java
/** * Package: MAG - VistA Imaging WARNING: Per VHA Directive 2004-038, this routine should not be modified. Date Created: Nov, 2009 Site Name: Washington OI Field Office, Silver Spring, MD Developer: vhaiswlouthj Description: DICOM Study cache manager. Maintains the cache of study instances and expires old studies after 15 minutes. ;; +--------------------------------------------------------------------+ ;; Property of the US Government. ;; No permission to copy or redistribute this software is given. ;; Use of unreleased versions of this software requires the user ;; to execute a written test agreement with the VistA Imaging ;; Development Office of the Department of Veterans Affairs, ;; telephone (301) 734-0100. ;; ;; The Food and Drug Administration classifies this software as ;; a Class II medical device. As such, it may not be changed ;; in any way. Modifications to this software may result in an ;; adulterated medical device under 21CFR820, the use of which ;; is considered to be a violation of US Federal Statutes. ;; +--------------------------------------------------------------------+ */ package gov.va.med.imaging.vistaimagingdatasource.dicom.importer; import gov.va.med.imaging.core.interfaces.exceptions.MethodException; import gov.va.med.imaging.exchange.business.WorkItem; import gov.va.med.imaging.exchange.business.dicom.importer.OrderingLocation; import gov.va.med.imaging.exchange.business.dicom.importer.Procedure; import gov.va.med.imaging.url.vista.StringUtils; import gov.va.med.imaging.url.vista.VistaQuery; import gov.va.med.imaging.vistaimagingdatasource.common.VistaSessionFactory; import java.util.ArrayList; import java.util.List; public class OrderingLocationDAO extends BaseImporterDAO<OrderingLocation> { private static String FIND_ALL = "MAG DICOM GET HOSP LOCATION"; // // Constructor // public OrderingLocationDAO(){} public OrderingLocationDAO(VistaSessionFactory sessionFactory) { this.setSessionFactory(sessionFactory); } @Override public VistaQuery generateFindAllQuery() throws MethodException { VistaQuery vm = new VistaQuery(FIND_ALL); return vm; } @Override public List<OrderingLocation> translateFindAll(String result) { // Create the OrderingLocation list List<OrderingLocation> locations = new ArrayList<OrderingLocation>(); // Split the result into lines String[] lines = StringUtils.Split(result, LINE_SEPARATOR); // Populate the list, starting with line 1 (if it exists). Line 0 gives the record count. for (int i=1; i<lines.length; i++) { String[] fields = StringUtils.Split(lines[i], StringUtils.CARET); locations.add(new OrderingLocation(Integer.parseInt(fields[0]), fields[1])); } return locations; } }
[ "ctitton@vitelnet.com" ]
ctitton@vitelnet.com
5f66265f602577d12d36912489e4385acb030109
f2ec2fe9831467491c0890a395ba2bd6b889e8a3
/src/main/java/ac/za/service/impl/course/ModuleServiceImpl.java
8613d956b05e045755409748f14f311de2bd8d40
[]
no_license
215062264/LMS_App_Project
5e3dbaed1fc0e74e4193d96cf4d62313acf97b58
1cc59d05f41e6dad350593966f2f72843e6229cf
refs/heads/master
2021-06-28T14:20:39.404358
2021-04-03T08:39:53
2021-04-03T08:39:53
216,410,126
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
package ac.za.service.impl.course; import ac.za.domain.course.Module; import ac.za.repository.repoInterface.course.ModuleRepository; import ac.za.service.serviceInterface.course.ModuleService; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service("moduleService") public class ModuleServiceImpl implements ModuleService { private ModuleRepository repository; public ModuleServiceImpl(ModuleRepository repository){this.repository = repository;} @Override public Module save(Module module) { return repository.save(module); } @Override public Module findById(Integer id) { Optional<Module> optional = repository.findById(id); if (optional.isPresent()) { return optional.get(); } return null; } @Override public Module create(Module module) { module = this.repository.save(module); return module; } @Override public Module read(Integer s) { return this.repository.findById(s).orElse(null);} @Override public Module update(Module module) { return this.repository.save(module); } @Override public void delete(Integer s) { this.repository.deleteById(s); } @Override public List<Module> getAll() { return this.repository.findAll(); } }
[ "Kylejosias6@gmail.com" ]
Kylejosias6@gmail.com
8f342f13b6503f3a3df164a706773e16ba1691a2
529c55c46e24375646c64ab7967d14a2078cb6b5
/src/main/java/com/vnayak/myapp/config/Constants.java
49b6e74dd9ae9892329a7cbbdee8d3fe1598c906
[]
no_license
qtpvarun/SimpleSpringBootReactJs
b338ea164e08d0baaa7a0d3279334dcd885c768e
ee384bbde430398792c98369289db80a5bf0ab4f
refs/heads/master
2022-12-23T09:56:50.475569
2019-10-01T15:18:43
2019-10-01T15:18:43
212,129,364
0
0
null
2022-12-16T05:05:54
2019-10-01T15:18:29
Java
UTF-8
Java
false
false
421
java
package com.vnayak.myapp.config; /** * Application constants. */ public final class Constants { // Regex for acceptable logins public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; public static final String SYSTEM_ACCOUNT = "system"; public static final String DEFAULT_LANGUAGE = "en"; public static final String ANONYMOUS_USER = "anonymoususer"; private Constants() { } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1c1993a098606f26cc68eb19219968a656efe950
3182dd5e2cb4c93c562293816203038d5e4c9708
/src/java/com/scandit/datacapture/core/internal/sdk/ocr/NativeExternalOcrBackendHelper.java
20ad6c0005b72e95bad01c7fcd5b831b6008fca3
[]
no_license
mrauer/TAC-Verif
46f1fdc06475fef6d217f48a2ee6a6ffc8ec3e4f
5231854f94008729fb1be67992ffafd2ae8908a3
refs/heads/master
2023-07-16T22:25:33.181442
2021-08-29T16:00:37
2021-08-29T16:00:37
401,082,799
3
0
null
null
null
null
UTF-8
Java
false
false
773
java
/* * Decompiled with CFR 0.0. * * Could not load the following classes: * com.scandit.datacapture.core.internal.sdk.ocr.NativeExternalOcrBackendHelper$CppProxy * java.lang.Object */ package com.scandit.datacapture.core.internal.sdk.ocr; import com.scandit.datacapture.core.common.geometry.Rect; import com.scandit.datacapture.core.internal.sdk.ocr.NativeExternalOcrBackendHelper; import com.scandit.datacapture.internal.sdk.annotations.DjinniGenerated; /* * Exception performing whole class analysis ignored. */ @DjinniGenerated public abstract class NativeExternalOcrBackendHelper { public NativeExternalOcrBackendHelper() { } public static Rect adjustRoi(Rect rect, float f2) { return CppProxy.adjustRoi((Rect)rect, (float)f2); } }
[ "maxime.rauer@gmail.com" ]
maxime.rauer@gmail.com
ac10150da1e54c3aa73b2d05513de95886d65011
9c6e63eb1796bbf4c37d93fca941fb67b4cd4741
/trunk/tarah2/src/main/java/com/honmansoft/dba/DBA.java
865fb95c4e7f1f1a830d2555239b9d60b4f5ecc4
[]
no_license
BGCX261/zizw-svn-to-git
ffc6636d8e0d91b24f124ba3d16c61af10d7441c
c8d068af7a36396ce707dc035b15330c77b02f2a
refs/heads/master
2016-09-05T13:11:22.053860
2015-08-25T15:51:45
2015-08-25T15:51:45
41,585,036
0
0
null
null
null
null
UTF-8
Java
false
false
1,052
java
package com.honmansoft.dba; import java.sql.Connection; import java.sql.SQLException; public interface DBA { // void createDatabase(Connection conn, String database, String username, String password) throws SQLException; void dropDatabase(Connection conn, String database) throws SQLException; boolean isDatabaseExist(Connection conn, String database) throws SQLException; // void createTable(Connection conn, String database, String table, Column[] cols) throws SQLException; void dropTable(Connection conn, String database, String table) throws SQLException; boolean isTableExist(Connection conn, String database, String table) throws SQLException; // void addColumn(Connection conn, String database, String table, Column column) throws SQLException; void removeColumn(Connection conn, String database, String table, String column) throws SQLException; boolean isColumnExist(Connection conn, String database, String table, String column) throws SQLException; }
[ "you@example.com" ]
you@example.com
41bb813f0a3977545d65c8f3a557cb794985fe08
a8c4ace42198faf611066ba66539ade12aef7297
/im/src/com/hex/bigdata/udsp/im/provider/model/MetadataCol.java
11f7fa4001f1d698c340ab5bac544b725a567843
[]
no_license
hjtoday/boracay
366eb84f35407ff04556d8333ded04fe926ac265
728cc65ab1737da76f67765450bb9d62d510467c
refs/heads/udsp-2.0.0-tzb
2021-06-29T04:58:42.503658
2017-09-18T09:26:32
2017-09-18T09:26:32
102,310,561
0
0
null
2017-09-10T14:58:49
2017-09-04T02:30:22
Java
UTF-8
Java
false
false
2,047
java
package com.hex.bigdata.udsp.im.provider.model; import com.hex.bigdata.udsp.common.constant.DataType; import org.apache.commons.lang3.StringUtils; /** * Created by JunjieM on 2017-9-5. */ public class MetadataCol { private Short seq; private String name; private String describe; private DataType type; private String length; private String note; private boolean indexed; // 索引 private boolean primary; // 主键 private boolean stored; // 存储 public Short getSeq() { if (seq == null) throw new IllegalArgumentException("seq不能为空"); return seq; } public void setSeq(Short seq) { this.seq = seq; } public String getName() { if (StringUtils.isBlank(name)) throw new IllegalArgumentException("name不能为空"); return name; } public void setName(String name) { this.name = name; } public String getDescribe() { return describe; } public void setDescribe(String describe) { this.describe = describe; } public DataType getType() { if (type == null) throw new IllegalArgumentException("type不能为空"); return type; } public void setType(DataType type) { this.type = type; } public String getLength() { return length; } public void setLength(String length) { this.length = length; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public boolean isIndexed() { return indexed; } public void setIndexed(boolean indexed) { this.indexed = indexed; } public boolean isPrimary() { return primary; } public void setPrimary(boolean primary) { this.primary = primary; } public boolean isStored() { return stored; } public void setStored(boolean stored) { this.stored = stored; } }
[ "junjie.miao@goupwith.com" ]
junjie.miao@goupwith.com
aa959eedc29101429d0cec94914f49878f14015c
8f611f9814576625e14b69638ce546a3e4b060ac
/src/main/java/com/controller/UserController.java
01e7a376faaf158affbdebace805fe29c30899a4
[]
no_license
Marat2/crud
bf916b6901f7081a29f3ec7d9701a81680fc5a72
80809cb9470545ebeede4817436923679c55db61
refs/heads/master
2023-03-02T16:50:00.403834
2021-02-15T18:10:00
2021-02-15T18:10:00
320,342,551
0
0
null
null
null
null
UTF-8
Java
false
false
1,898
java
package com.controller; import com.domain.User; import com.service.UserService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import java.util.List; @Controller public class UserController { private UserService userService; private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired public UserController(UserService userService) { this.userService = userService; } @RequestMapping("/") public String getIndex(ModelMap model){ List<User> users = userService.listUsers(); logger.info("Number of users : "+users.toString()); model.addAttribute("users",users); return "index"; } @RequestMapping("/add") public String addUser(){ return "add"; } @PostMapping(path = "/save",consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE}) public String saveUser(User user){ System.out.println("eteetet" +user.toString()); userService.add(user); return "redirect:/"; } @RequestMapping("/edit") public String editUser(@RequestParam Long id,ModelMap model){ User user = userService.userById(id); model.addAttribute("user",user); return "edit"; } @PostMapping(path = "/update",consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE}) public String updateUser(User user){ System.out.println("eteetet" +user.toString()); userService.update(user.getId(),user); return "redirect:/"; } @RequestMapping("/delete") public String deleteUser(@RequestParam Long id){ userService.delete(id); return "redirect:/"; } }
[ "you@example.com" ]
you@example.com
08fa71ae58090940cae1810efb3b15492286bcbe
b3a02d5f1f60cd584fbb6da1b823899607693f63
/05_JAVA_Advanced/10_ObjectsClassesCollections_ex/src/ex02_MaximumElement.java
faabae229ff93a323a095a1cc53115e9bb6693bd
[ "MIT" ]
permissive
akkirilov/SoftUniProject
20bf0543c9aaa0a33364daabfddd5f4c3e400ba2
709d2d1981c1bb6f1d652fe4101c1693f5afa376
refs/heads/master
2021-07-11T02:53:18.108275
2018-12-04T20:14:19
2018-12-04T20:14:19
79,428,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Deque; public class ex02_MaximumElement { public static void main(String[] args) throws IOException { Deque<Integer> seq = new ArrayDeque<>(); BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in)); Integer n = Integer.parseInt(bfr.readLine()); for (int i = 0; i < n; i++) { int[] tokens = Arrays.stream(bfr.readLine().split("\\s+")).mapToInt(Integer::parseInt).toArray(); switch (tokens[0]) { case 1: seq.push(tokens[1]); break; case 2: seq.pop(); break; case 3: System.out.println(getMaxElement(seq)); break; default: break; } } bfr.close(); } private static Integer getMaxElement(Deque<Integer> seq) { return new ArrayList<>(seq) .stream() .max((a, b) -> a.compareTo(b)) .orElse(null); } }
[ "akkirilov@mail.bg" ]
akkirilov@mail.bg
c12b47a53ff75b48d120ac239d1046187ede976c
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_fernflower/com/google/common/collect/FilteredEntryMultimap$AsMap.java
7e42a9937e25660fc8c968f28979e04c50676941
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,652
java
package com.google.common.collect; import com.google.common.collect.FilteredEntryMultimap; import com.google.common.collect.FilteredEntryMultimap$AsMap$1EntrySetImpl; import com.google.common.collect.FilteredEntryMultimap$AsMap$1KeySetImpl; import com.google.common.collect.FilteredEntryMultimap$AsMap$1ValuesImpl; import com.google.common.collect.FilteredEntryMultimap$ValuePredicate; import com.google.common.collect.Lists; import com.google.common.collect.Maps$ViewCachingAbstractMap; import com.google.common.collect.SetMultimap; import com.google.common.collect.Sets; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Set; import javax.annotation.Nullable; class FilteredEntryMultimap$AsMap extends Maps$ViewCachingAbstractMap { // $FF: synthetic field final FilteredEntryMultimap this$0; FilteredEntryMultimap$AsMap(FilteredEntryMultimap var1) { this.this$0 = var1; } public boolean containsKey(@Nullable Object var1) { return this.get(var1) != null; } public void clear() { this.this$0.clear(); } public Collection get(@Nullable Object var1) { Collection var2 = (Collection)this.this$0.unfiltered.asMap().get(var1); if(var2 == null) { return null; } else { var2 = FilteredEntryMultimap.filterCollection(var2, new FilteredEntryMultimap$ValuePredicate(this.this$0, var1)); return var2.isEmpty()?null:var2; } } public Collection remove(@Nullable Object var1) { Collection var2 = (Collection)this.this$0.unfiltered.asMap().get(var1); if(var2 == null) { return null; } else { Object var3 = var1; ArrayList var4 = Lists.newArrayList(); Iterator var5 = var2.iterator(); while(var5.hasNext()) { Object var6 = var5.next(); if(FilteredEntryMultimap.access$000(this.this$0, var3, var6)) { var5.remove(); var4.add(var6); } } if(var4.isEmpty()) { return null; } else if(this.this$0.unfiltered instanceof SetMultimap) { return Collections.unmodifiableSet(Sets.newLinkedHashSet((Iterable)var4)); } else { return Collections.unmodifiableList(var4); } } } Set createKeySet() { return new FilteredEntryMultimap$AsMap$1KeySetImpl(this); } Set createEntrySet() { return new FilteredEntryMultimap$AsMap$1EntrySetImpl(this); } Collection createValues() { return new FilteredEntryMultimap$AsMap$1ValuesImpl(this); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
e3667d4b3d98d458f051d9cc145dea38b287f88d
47f2c2a8cbd9bc2b28c4254e77e5a7b099faaa1f
/record-builder-test/src/main/java/io/soabase/recordbuilder/test/ExceptionDetails.java
8e33c303b1b1e590d1a6e0685a3ed8bf3b1a1683
[ "Apache-2.0" ]
permissive
thiago-amm/record-builder
0378d2dff3b6a7d86cc2319b79c78b5afb187fe1
3b8c3ff9e3108e3c08a4bdbb9fe9d57442b97eed
refs/heads/master
2023-08-31T04:35:43.124755
2021-10-20T04:24:38
2021-10-21T18:00:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,118
java
/** * Copyright 2019 Jordan 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. */ package io.soabase.recordbuilder.test; import io.soabase.recordbuilder.core.RecordBuilder; import javax.lang.model.type.ErrorType; import java.util.List; @RecordBuilder public record ExceptionDetails( String internalMessage, String endUserMessage, String httpStatus, ErrorType errorType, List<String> jsonProblems, Throwable cause ) { @Override public List<String> jsonProblems() { if (jsonProblems == null) { return List.of(); } return jsonProblems; } }
[ "jordan@jordanzimmerman.com" ]
jordan@jordanzimmerman.com
54c971e7af2bfc5f748caec6daa0a80d83adbfe1
6e966225b3b05b07dc6208abc2cf27c4041db38a
/src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSItemMinecart.java
28d61b350e6c9541595c6695af99a06de20d18d2
[ "Apache-2.0" ]
permissive
Vilsol/NMSWrapper
a73a2c88fe43384139fefe4ce2b0586ac6421539
4736cca94f5a668e219a78ef9ae4746137358e6e
refs/heads/master
2021-01-10T14:34:41.673024
2016-04-11T13:02:21
2016-04-11T13:02:22
51,975,408
1
0
null
null
null
null
UTF-8
Java
false
false
1,353
java
package me.vilsol.nmswrapper.wraps.unparsed; import me.vilsol.nmswrapper.*; import me.vilsol.nmswrapper.reflections.*; import me.vilsol.nmswrapper.wraps.*; @ReflectiveClass(name = "ItemMinecart") public class NMSItemMinecart extends NMSItem { public NMSItemMinecart(Object nmsObject){ super(nmsObject); } public NMSItemMinecart(NMSEnumMinecartType enumMinecartType){ super("ItemMinecart", new Object[]{NMSEnumMinecartType.class}, new Object[]{enumMinecartType}); } /** * @see net.minecraft.server.v1_9_R1.ItemMinecart#interactWith(net.minecraft.server.v1_9_R1.ItemStack, net.minecraft.server.v1_9_R1.EntityHuman, net.minecraft.server.v1_9_R1.World, net.minecraft.server.v1_9_R1.BlockPosition, net.minecraft.server.v1_9_R1.EnumDirection, float, float, float) */ @ReflectiveMethod(name = "interactWith", types = {NMSItemStack.class, NMSEntityHuman.class, NMSWorld.class, NMSBlockPosition.class, NMSEnumDirection.class, float.class, float.class, float.class}) public boolean interactWith(NMSItemStack itemStack, NMSEntityHuman entityHuman, NMSWorld world, NMSBlockPosition blockPosition, NMSEnumDirection enumDirection, float f, float f1, float f2){ return (boolean) NMSWrapper.getInstance().exec(nmsObject, itemStack, entityHuman, world, blockPosition, enumDirection, f, f1, f2); } }
[ "vilsol2000@gmail.com" ]
vilsol2000@gmail.com
c5350ebe75db8d3cb370973c89e1cf3923d118ca
7dfda9db0b5eca9091c84e3cf4a0497858cac1cb
/src/test/org/apache/hadoop/io/file/tfile/RandomDistribution.java
4c999e1059539338f454a5efa30a6096d764b738
[ "LicenseRef-scancode-unknown", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
smiley0907/purnacache
bc7364a9fa292f7606671cb494c3896d74156c13
0370c725d061a7fb460f7088b3cf4c8c47916d3b
refs/heads/master
2020-03-25T19:31:13.053441
2020-02-07T00:56:27
2020-02-07T00:56:27
144,087,062
0
0
Apache-2.0
2018-08-09T01:40:37
2018-08-09T01:40:37
null
UTF-8
Java
false
false
6,206
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.apache.hadoop.io.file.tfile; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Random; /** * A class that generates random numbers that follow some distribution. */ public class RandomDistribution { /** * Interface for discrete (integer) random distributions. */ public static interface DiscreteRNG { /** * Get the next random number * * @return the next random number. */ public int nextInt(); } /** * P(i)=1/(max-min) */ public static final class Flat implements DiscreteRNG { private final Random random; private final int min; private final int max; /** * Generate random integers from min (inclusive) to max (exclusive) * following even distribution. * * @param random * The basic random number generator. * @param min * Minimum integer * @param max * maximum integer (exclusive). * */ public Flat(Random random, int min, int max) { if (min >= max) { throw new IllegalArgumentException("Invalid range"); } this.random = random; this.min = min; this.max = max; } /** * @see DiscreteRNG#nextInt() */ @Override public int nextInt() { return random.nextInt(max - min) + min; } } /** * Zipf distribution. The ratio of the probabilities of integer i and j is * defined as follows: * * P(i)/P(j)=((j-min+1)/(i-min+1))^sigma. */ public static final class Zipf implements DiscreteRNG { private static final double DEFAULT_EPSILON = 0.001; private final Random random; private final ArrayList<Integer> k; private final ArrayList<Double> v; /** * Constructor * * @param r * The random number generator. * @param min * minimum integer (inclusvie) * @param max * maximum integer (exclusive) * @param sigma * parameter sigma. (sigma > 1.0) */ public Zipf(Random r, int min, int max, double sigma) { this(r, min, max, sigma, DEFAULT_EPSILON); } /** * Constructor. * * @param r * The random number generator. * @param min * minimum integer (inclusvie) * @param max * maximum integer (exclusive) * @param sigma * parameter sigma. (sigma > 1.0) * @param epsilon * Allowable error percentage (0 < epsilon < 1.0). */ public Zipf(Random r, int min, int max, double sigma, double epsilon) { if ((max <= min) || (sigma <= 1) || (epsilon <= 0) || (epsilon >= 0.5)) { throw new IllegalArgumentException("Invalid arguments"); } random = r; k = new ArrayList<Integer>(); v = new ArrayList<Double>(); double sum = 0; int last = -1; for (int i = min; i < max; ++i) { sum += Math.exp(-sigma * Math.log(i - min + 1)); if ((last == -1) || i * (1 - epsilon) > last) { k.add(i); v.add(sum); last = i; } } if (last != max - 1) { k.add(max - 1); v.add(sum); } v.set(v.size() - 1, 1.0); for (int i = v.size() - 2; i >= 0; --i) { v.set(i, v.get(i) / sum); } } /** * @see DiscreteRNG#nextInt() */ @Override public int nextInt() { double d = random.nextDouble(); int idx = Collections.binarySearch(v, d); if (idx > 0) { ++idx; } else { idx = -(idx + 1); } if (idx >= v.size()) { idx = v.size() - 1; } if (idx == 0) { return k.get(0); } int ceiling = k.get(idx); int lower = k.get(idx - 1); return ceiling - random.nextInt(ceiling - lower); } } /** * Binomial distribution. * * P(k)=select(n, k)*p^k*(1-p)^(n-k) (k = 0, 1, ..., n) * * P(k)=select(max-min-1, k-min)*p^(k-min)*(1-p)^(k-min)*(1-p)^(max-k-1) */ public static final class Binomial implements DiscreteRNG { private final Random random; private final int min; private final int n; private final double[] v; private static double select(int n, int k) { double ret = 1.0; for (int i = k + 1; i <= n; ++i) { ret *= (double) i / (i - k); } return ret; } private static double power(double p, int k) { return Math.exp(k * Math.log(p)); } /** * Generate random integers from min (inclusive) to max (exclusive) * following Binomial distribution. * * @param random * The basic random number generator. * @param min * Minimum integer * @param max * maximum integer (exclusive). * @param p * parameter. * */ public Binomial(Random random, int min, int max, double p) { if (min >= max) { throw new IllegalArgumentException("Invalid range"); } this.random = random; this.min = min; this.n = max - min - 1; if (n > 0) { v = new double[n + 1]; double sum = 0.0; for (int i = 0; i <= n; ++i) { sum += select(n, i) * power(p, i) * power(1 - p, n - i); v[i] = sum; } for (int i = 0; i <= n; ++i) { v[i] /= sum; } } else { v = null; } } /** * @see DiscreteRNG#nextInt() */ @Override public int nextInt() { if (v == null) { return min; } double d = random.nextDouble(); int idx = Arrays.binarySearch(v, d); if (idx > 0) { ++idx; } else { idx = -(idx + 1); } if (idx >= v.length) { idx = v.length - 1; } return idx + min; } } }
[ "raghavendra.pra.yelisetty@hpe.com" ]
raghavendra.pra.yelisetty@hpe.com
cd53c2f1d1492399b2933c3351d7383228a27d66
5173401b07057d0a873500f9b2fdc791c107652a
/SiaSoft/src/pt/inescporto/template/client/design/TmplJButtonDetailDelete.java
eed34de5dec6a3654cf9c6bbf51bf4e36df0b7f2
[]
no_license
pedrocleto/Java
3d273f08414f9f4135855900840ca01cae64988e
b144bd57bd8c55b2b24452284b72754a518dd9e3
refs/heads/master
2021-01-01T16:31:29.972484
2013-08-10T09:49:34
2013-08-10T09:49:34
12,018,789
1
0
null
null
null
null
UTF-8
Java
false
false
2,503
java
package pt.inescporto.template.client.design; import javax.swing.*; import pt.inescporto.template.client.event.TemplateEvent; import pt.inescporto.template.client.util.TmplFormModes; import pt.inescporto.template.client.util.TmplPerms; public class TmplJButtonDetailDelete extends TmplJButton { public TmplJButtonDetailDelete() { super(); setText("delete"); setIcon(new ImageIcon(TmplJButtonInsert.class.getResource("icons/delete.png"))); setToolTipText(TmplResourceSingleton.getString("button.tooltip.delete")); setActionCommand("DELETE"); setBorderPainted(false); setOpaque(false); setFocusable(false); } public TmplJButtonDetailDelete( Action a ) { super( a ); setActionCommand("DELETE"); } public TmplJButtonDetailDelete( Icon icon ) { super( icon ); setText(TmplResourceSingleton.getString("button.detail.label.delete")); setToolTipText(TmplResourceSingleton.getString("button.detail.tooltip.delete")); setActionCommand("DELETE"); } public TmplJButtonDetailDelete( String text ) { super( text ); setActionCommand("DELETE"); } public TmplJButtonDetailDelete( String text, Icon icon ) { super( text, icon ); setActionCommand("DELETE"); } public void tmplMode(TemplateEvent e) { // Disabling due to permissions if ((int)(formPerms & TmplPerms.PERM_DELETE) == 0) { setEnabled(false); return; } if (e.getMode() == TmplFormModes.MODE_SELECT) { setEnabled(true); return; } if (e.getMode() == TmplFormModes.MODE_LOCK) { if (fwParent != null && e.getSource() == fwParent && e.getModeForLocking() != TmplFormModes.MODE_DELETE && e.getModeForLocking() != TmplFormModes.MODE_INSERT && e.getModeForLocking() != TmplFormModes.MODE_UPDATE && e.getModeForLocking() != TmplFormModes.MODE_DELETE) setEnabled(true); else setEnabled(false); return; } setEnabled(false); } public void tmplPermissions(TemplateEvent e) { super.tmplPermissions(e); // form permissions formPerms = e.getPermission(); if (e.getMode() == TmplFormModes.MODE_SELECT && (int)(formPerms & TmplPerms.PERM_DELETE) != 0) setEnabled(true); else setEnabled(false); // field permissions if (fieldPermName != null && e.getPermissionForField(fieldPermName) != -1) fieldPerms = e.getPermissionForField(fieldPermName); } }
[ "pedrovsky@gmail.com" ]
pedrovsky@gmail.com
f3a884893231f88bc6177c04899b50c325e20abb
8e555bc3fa12263de5085ce6e7d037b62131c1ee
/samples/imgur/src/main/java/com/bumptech/glide/samples/imgur/MainActivity.java
baff6d9d521ae2a32a84526845aceb54fa2b4721
[ "BSD-2-Clause-Views", "Xfig", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
FY6/glide
3797c8b461005fabc8c23e722dbf75a20bb89108
70e0ee01ac0a0ace196be2b045b683b6459327ea
refs/heads/master
2020-05-16T23:47:35.413093
2019-05-31T01:52:49
2019-05-31T01:52:49
183,376,563
1
0
null
2019-04-25T07:05:54
2019-04-25T07:05:54
null
UTF-8
Java
false
false
3,997
java
package com.bumptech.glide.samples.imgur; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView.ViewHolder; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bumptech.glide.samples.imgur.api.Image; import dagger.android.AndroidInjection; import java.util.Collections; import java.util.List; import javax.inject.Inject; import javax.inject.Named; import rx.Observable; import rx.Observer; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Displays images and GIFs from Imgur in a scrollable list of cards. */ public final class MainActivity extends AppCompatActivity { @Inject @Named("hotViralImages") Observable<List<Image>> fetchImagesObservable; private ImgurImageAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { AndroidInjection.inject(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view); // // recyclerView.setHasFixedSize(true); // LinearLayoutManager layoutManager = new LinearLayoutManager(this); // recyclerView.setLayoutManager(layoutManager); // adapter = new ImgurImageAdapter(); // recyclerView.setAdapter(adapter); // // fetchImagesObservable // .subscribeOn(Schedulers.newThread()) // .observeOn(AndroidSchedulers.mainThread()) // .subscribe(new Observer<List<Image>>() { // @Override // public void onCompleted() { } // // @Override // public void onError(Throwable e) { } // // @Override // public void onNext(List<Image> images) { // adapter.setData(images); // } // }); ImageView iv = findViewById(R.id.mIv); Glide.with(this).load("http://118.31.36.55/staticD:/opt/uploadimg/20190424123932208.jpg") .into(iv); } @Override protected void onDestroy() { super.onDestroy(); fetchImagesObservable.unsubscribeOn(AndroidSchedulers.mainThread()); } private final class ImgurImageAdapter extends RecyclerView.Adapter<ViewHolder> { private List<Image> images = Collections.emptyList(); public void setData(@NonNull List<Image> images) { this.images = images; notifyDataSetChanged(); } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new ViewHolder(LayoutInflater.from(parent.getContext()) .inflate(R.layout.image_card, parent, false)); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { ViewHolder vh = (ViewHolder) holder; Image image = images.get(position); vh.title.setText( TextUtils.isEmpty(image.title) ? image.description : image.title); ImgurGlide.with(vh.imageView) .load(image.link) .into(vh.imageView); } @Override public int getItemCount() { return images.size(); } private final class ViewHolder extends RecyclerView.ViewHolder { private final ImageView imageView; private final TextView title; ViewHolder(View itemView) { super(itemView); imageView = (ImageView) itemView.findViewById(R.id.image); title = (TextView) itemView.findViewById(R.id.title); } } } }
[ "f_y_wang6@163.com" ]
f_y_wang6@163.com
53a03b6499f92616d8d702609405b03ab0acc767
dc0e271669780a11284b9626919846a51b00d54c
/model/com/hys/exam/dao/remote/ExamExaminationDAO.java
49cb4776be543c7cf309ab6a0b8ac863cd68b022
[ "Apache-2.0" ]
permissive
1224500506/NCME-Admin
4a4b8e62f85b352dee0a96f096748b04fbf1b67e
e4f0969938ed6d9c076a9d647681dd56a1bf2679
refs/heads/master
2021-04-24T19:28:33.899711
2018-01-15T01:54:21
2018-01-15T01:54:21
117,482,274
1
1
null
null
null
null
UTF-8
Java
false
false
2,525
java
package com.hys.exam.dao.remote; import java.sql.SQLException; import java.util.List; import com.hys.exam.model.ExamExamination; import com.hys.exam.queryObj.ExamExaminationQuery; /** * * 标题:考试支撑平台 * * 作者:Tony 2011-3-11 * * 描述: * * 说明: */ public interface ExamExaminationDAO { /** * 增加考场 * @param ExamExamination exam * @return 考场ID */ public Long addExamination(String key,ExamExamination exam) throws SQLException; /** * 批量删除考场 * @param Long id * @return */ public void deleteExamination(String key,List<Long> id) throws SQLException; /** * 修改考场含考场试卷 * @param ExamExamination exam */ public void updateExaminationById(String key,ExamExamination exam) throws SQLException; /** * 获取考场信息和考场试卷 * @param id * @return */ public ExamExamination getExamExaminationById(String key,Long id) throws SQLException; /** * * FunName:getExaminationList * Description: 查询考试列表 * @param examExaminationQuery 考试查询对象 * @return: List<ExamExamination> * @Create Time: 2010-1-20 下午02:33:50 */ public List<ExamExamination> getExaminationList(String key,ExamExaminationQuery examExaminationQuery) throws SQLException; /** * * FunName:getExaminationListSize * Description: 查询考试列表总条数 * @param examExaminationQuery 考试查询对象 * @return: int * @Create Time: 2010-1-20 下午02:33:53 */ public int getExaminationListSize(String key,ExamExaminationQuery examExaminationQuery) throws SQLException; //********************************************************************************* /** * 通过考试分类取考试列表 * @param examTypeId 考试分类ID * @return 考试列表 List<ExamExamination> */ public List<ExamExamination> getExaminationListByExamTypeId(String key,Long examTypeId) throws SQLException; /** * 通过考试ID 数组取考试列表 * @param query * @return */ public List<ExamExamination> getExaminationListByIds(String key,ExamExaminationQuery query) throws SQLException; /** * 通过考试ID 数组取size * @param query * @return */ public int getExaminationListByIdsSize(String key,ExamExaminationQuery query) throws SQLException; /** * 通过考试ID 修改考试分类 * @param typeId 分类ID * @param id 考试ID */ public void updateExaminationTypeByExamId(String key,Long typeId,Long id) throws SQLException; }
[ "weeho@DESKTOP-71D9DPN" ]
weeho@DESKTOP-71D9DPN
619a27d44f3287b87d46f686eee24f36789b8e97
99b367cf4e0482833533fde335bc2246a44d7be1
/src/com/thinkingInJava/chapter21/concurrency/Tester.java
de53e531863b282f24f8f748c201431bdaeaf90f
[]
no_license
zhangrongzhao/ThinkingInJava
c2f93bc4a4b38bd3a9276adf5f8b7fe41374a536
ceb345ae6ec477886212da8bebb043210333569d
refs/heads/master
2020-03-14T23:01:42.035528
2018-12-20T03:50:18
2018-12-20T03:50:18
131,834,762
0
0
null
null
null
null
UTF-8
Java
false
false
2,441
java
package com.thinkingInJava.chapter21.concurrency; import com.thinkingInJava.util.Generated; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public abstract class Tester<C> { static int testReps=10; static int testCycles=1000; static int containerSize=1000; abstract C containerInitializer(); abstract void startReadersAndWriters(); C testContainer; String testId; int nReaders; int nWriters; volatile long readResult=0; volatile long readTime=0; volatile long writeTime=0; CountDownLatch endLatch; static ExecutorService exec=Executors.newCachedThreadPool(); Integer[] writeData; Tester(String testId,int nReaders,int nWriters){ this.testId=testId+" "+nReaders+"r "+nWriters+"w"; this.nReaders=nReaders; this.nWriters=nWriters; //writeData=Generated.array(Integer.class,new RandomGenerator.Integer(),containerSize); for(int i=0;i<testReps;i++){ runTest(); readTime=0; writeTime=0; } } void runTest(){ endLatch=new CountDownLatch(nReaders+nWriters); testContainer=containerInitializer(); startReadersAndWriters(); try{ endLatch.await(); }catch(InterruptedException e){ System.out.println("endLatch interrupted"); } System.out.printf("%-27s %14d %14d\n",testId,readTime,writeTime); if(readTime!=0&&writeTime!=0){ System.out.printf("%-27s %14d\n","readTime+writeTime=",readTime+writeTime); } } abstract class TestTask implements Runnable{ abstract void test(); abstract void putResults(); long duration; public void run(){ long startTime=System.nanoTime(); test(); duration=System.nanoTime()-startTime; synchronized (Tester.this){ putResults(); } endLatch.countDown(); } } public static void initMain(String[] args){ if(args.length>0){ testReps=new Integer(args[0]); } if(args.length>1){ testCycles=new Integer(args[1]); } if(args.length>2){ containerSize=new Integer(args[2]); } System.out.printf("%-27s %14s %14s\n","Type","ReadTime","Write time"); } }
[ "rongzhao.zhang@allcure.cn" ]
rongzhao.zhang@allcure.cn
6cd1ab5c3e34a0ea6df461d79bc5fabe98e7f50d
d7fe2596a70f915e35fb6f8dc4fbc080eb1390c5
/src/main/java/org/elasticsearch/common/lucene/search/function/BoostScoreFunction.java
99b2bcbdbed52b31cc56ef03ac6feebe86812598
[ "Apache-2.0" ]
permissive
Oneiroi/elasticsearch
009f93d477ef75e196674edcb5bdc755b254c7b0
d66f401ce6b0ac6baa0d461f12ca3d002407b49d
refs/heads/master
2022-09-13T12:51:35.270084
2012-06-18T20:45:17
2012-06-19T02:13:47
4,712,532
0
0
Apache-2.0
2022-09-09T18:17:56
2012-06-19T10:58:24
Java
UTF-8
Java
false
false
2,471
java
/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch 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.elasticsearch.common.lucene.search.function; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Explanation; /** * */ public class BoostScoreFunction implements ScoreFunction { private final float boost; public BoostScoreFunction(float boost) { this.boost = boost; } public float getBoost() { return boost; } @Override public void setNextReader(IndexReader reader) { // nothing to do here... } @Override public float score(int docId, float subQueryScore) { return subQueryScore * boost; } @Override public float factor(int docId) { return boost; } @Override public Explanation explainScore(int docId, Explanation subQueryExpl) { Explanation exp = new Explanation(boost * subQueryExpl.getValue(), "static boost function: product of:"); exp.addDetail(subQueryExpl); exp.addDetail(new Explanation(boost, "boostFactor")); return exp; } @Override public Explanation explainFactor(int docId) { return new Explanation(boost, "boostFactor"); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BoostScoreFunction that = (BoostScoreFunction) o; if (Float.compare(that.boost, boost) != 0) return false; return true; } @Override public int hashCode() { return (boost != +0.0f ? Float.floatToIntBits(boost) : 0); } @Override public String toString() { return "boost[" + boost + "]"; } }
[ "kimchy@gmail.com" ]
kimchy@gmail.com
8820aaa0464eef9769f08618891532f6fd69d2d3
d3f73641f5353b4a5e9c65a2ef9cbb9844621595
/src/com/stx/servlet/GetSessionServlet.java
a9ea28797cea5cd40ca84fa4c59bd0247794c2c8
[]
no_license
408992065/fitness
42e11b7ee0bcb09a0483a0f0cb7048bb9b3c70a3
97fbc7ec9158390a4883ee510c8fd86fe174b83e
refs/heads/master
2022-09-10T02:45:51.941157
2020-06-02T05:01:28
2020-06-02T05:01:28
268,692,172
0
0
null
null
null
null
UTF-8
Java
false
false
1,821
java
package com.stx.servlet; import java.io.IOException; import java.io.Writer; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.google.gson.Gson; import com.stx.dao.WeChatService; /** * Servlet implementation class GetSessionServlet */ @WebServlet("/getsession") public class GetSessionServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public GetSessionServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 转成json数据 String appid = request.getParameter("appid"); String secret = request.getParameter("appsecret"); String js_code = request.getParameter("code"); WeChatService getOpenId = new WeChatService(); String openId = getOpenId.GetOpenID(appid, secret, js_code); Map<String, String> result = new HashMap<String, String>(); result.put("openId", openId); result.put("msg", "后台已收到"); String json = new Gson().toJson(result); // 返回值给微信小程序 Writer out = response.getWriter(); out.write(json); out.flush(); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "you@example.com" ]
you@example.com
7a0b2bd13ee69ec85344056e0d359b08efa50e58
36a1e72a62c261a1ab8cba4a5f2ce8842834b836
/app/src/main/java/com/orientdata/lookforcustomers/base/BaseView.java
ba43a80865e0258e667cee279926d6453a4715ef
[]
no_license
chenkexu/android2.0-20180227
e2176d25d8c114beee3942a5e2904977401354ca
6bbbcf876dbc0cf19d243bc74e5afbd38d8e8185
refs/heads/master
2021-04-12T09:49:25.059455
2018-07-21T09:45:31
2018-07-21T09:45:31
126,502,456
2
0
null
null
null
null
UTF-8
Java
false
false
245
java
package com.orientdata.lookforcustomers.base; /** * Created by wy on 2017/10/25. */ public interface BaseView { /** * 显示进度条 */ void showLoading(); /** * 隐藏进度条 */ void hideLoading(); }
[ "953571793@qq.com" ]
953571793@qq.com
be4449d4611f07b47d018575c191377eea98c094
3b84ee2fa50146859154b336147ccb6b7b0d8641
/FlipdogSpellChecker/com/millennialmedia/android/BridgeMMCalendar.java
c760bda8fa1e11f991cf95194180da86a36da5ff
[]
no_license
DarthYogurt/Dragonbreath
5ac8883b75480a9a778f6b30d98c518b3544375d
72f3e53cde17aacff812dce67f89b87d0b427a0e
refs/heads/master
2016-08-03T16:43:36.614188
2013-11-12T00:11:29
2013-11-12T00:11:29
14,119,806
0
1
null
null
null
null
UTF-8
Java
false
false
432
java
package com.millennialmedia.android; import java.util.HashMap; class BridgeMMCalendar extends MMJSObject { public MMJSResponse addEvent(HashMap<String, String> paramHashMap) { return MMJSResponse.responseWithError("Not supported"); } } /* Location: C:\Programming\Android2Java\FlipdogSpellchecker_dex2jar.jar * Qualified Name: com.millennialmedia.android.BridgeMMCalendar * JD-Core Version: 0.6.2 */
[ "deric.walintukan@gmail.com" ]
deric.walintukan@gmail.com
a4897e4c0633416a5d663a3e2078995ebe8bcad1
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/com/google/android/gms/internal/zzbam.java
67463e711623074a5b61e05fa211a3f59a91f48d
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
656
java
package com.google.android.gms.internal; import com.google.android.gms.auth.api.signin.GoogleSignInAccount; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.Status; import com.google.android.gms.internal.zzbap.zza; public class zzbam extends zza { public void zza(ConnectionResult connectionResult, zzbak com_google_android_gms_internal_zzbak) { } public void zza(Status status, GoogleSignInAccount googleSignInAccount) { } public void zzb(zzbaw com_google_android_gms_internal_zzbaw) { } public void zzbL(Status status) { } public void zzbM(Status status) { } }
[ "swasen@cisco.com" ]
swasen@cisco.com
924991e2e150d0146d534feb8c7baca77b406b3a
6960f3b8c06f31b75a76f1a743416723e03b61fb
/Chapter Sixteen/src/exercises/ListTest.java
339e54b82dd0c063b3c28bff9049b7a91f6305c3
[]
no_license
teevyne/java-codes-and-examples
9db26b5149266fd5f67396dcc9ac5d0596cdb8a6
d41dac3c424c56eb0419266bdf8361a127468a79
refs/heads/master
2022-11-12T16:51:37.078491
2020-06-25T13:48:16
2020-06-25T13:48:16
274,659,578
0
0
null
null
null
null
UTF-8
Java
false
false
2,131
java
package exercises; import java.util.List; import java.util.LinkedList; import java.util.ListIterator; public class ListTest { public static void main(String[] args) { //add colors elements to list1 String[] colors = { "black", "yellow", "blue", "violet", "silver" }; List<String> list1 = new LinkedList<>(); for (String color : colors) { list1.add(color); } // add colors elements to list2 String[] colors2 = { "gold", "white", "brown", "blue", "gray", "silver" }; List<String> list2 = new LinkedList<>(); for (String color : colors2) { list2.add(color); } list1.addAll(list2); // concatenate lists list2 = null; // release resources printList(list1); // print list1 elements convertToUppercaseStrings(list1); // convert to uppercase string printList(list1); // print list1 elements System.out.printf("%nDeleting elements 4 to 6..."); removeItems(list1, 4, 7); // remove items 4-6 from list printList(list1); // print list1 elements printReversedList(list1); // print list in reverse order } // output List contents private static void printList(List<String> list) { System.out.printf("%nlist:%n"); for (String color : list) System.out.printf("%s ", color); System.out.println(); } // locate String objects and convert to uppercase private static void convertToUppercaseStrings(List<String> list) { ListIterator<String> iterator = list.listIterator(); while (iterator.hasNext()) { String color = iterator.next(); // get item iterator.set(color.toUpperCase()); // convert to upper case } } // obtain sublist and use clear method to delete sublist items private static void removeItems(List<String> list, int start, int end) { list.subList(start, end).clear(); // remove items } // print reversed list private static void printReversedList(List<String> list) { ListIterator<String> iterator = list.listIterator(list.size()); System.out.printf("%nReversed List:%n"); // print list in reverse order while (iterator.hasPrevious()) { System.out.printf("%s ", iterator.previous()); } } }
[ "ayemobolatolulope@gmail.com" ]
ayemobolatolulope@gmail.com
5ec6cc2c587c1a4422cd8fe0f7fefa61024ea6d0
0f782acc35a009fa7298a65a2785b6ffccaa901e
/src/designPatterns/behavioral/command/FileIOJob.java
3cf00a639b9d7250aab27bbd7756bb9a53db8567
[]
no_license
RossHS/MyWorkbook
071bd0eb81108ab615badbf4916b8b77cba908b1
65e2cd70058da4648d94858d3f0311a3dff00805
refs/heads/master
2022-11-23T20:45:07.900110
2020-07-23T10:42:20
2020-07-23T10:42:20
281,899,478
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
package designPatterns.behavioral.command; /** * @author Ross Khapilov * @version 1.0 05.07.2019 */ public class FileIOJob implements Job { private FileIO fileIO; public void setFileIO(FileIO fileIO) { this.fileIO = fileIO; } @Override public void run() { System.out.println("Job ID: " + Thread.currentThread().getId() + " executing fileIO jobs."); if (fileIO != null) fileIO.execute(); try { Thread.sleep(1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }
[ "rossxpanteley@gmail.com" ]
rossxpanteley@gmail.com
73e7e224ca7477d256a1ad9870d41275a7374ff5
b4252cd1c9942474ca1a17cd906196d264f4d60e
/src/com/cartmatic/estore/core/decorator/AuditInfoTblColumnDecorator.java
c6fce63b9f73ce351d6c5ba767b7f79db8b3c31b
[]
no_license
1649865412/StoreAdminOne
5acb273becf848f5007320bff720924cb1fd5faf
70bc2fb098eafb436c8860cdf9a58e63ee61510b
refs/heads/master
2021-01-02T22:58:16.554900
2015-06-26T05:54:52
2015-06-26T05:54:52
38,096,515
0
3
null
null
null
null
UTF-8
Java
false
false
1,072
java
/* * Created on Dec 29, 2004 * */ package com.cartmatic.estore.core.decorator; import org.displaytag.decorator.DisplaytagColumnDecorator; import org.displaytag.exception.DecoratorException; import org.displaytag.properties.MediaTypeEnum; import com.cartmatic.estore.core.util.I18nUtil; /** * */ public class AuditInfoTblColumnDecorator implements DisplaytagColumnDecorator { public Object decorate(java.lang.Object columnValue, javax.servlet.jsp.PageContext pageContext, MediaTypeEnum media) throws DecoratorException { if (columnValue == null || "".equals(columnValue)) { return ""; } String strValue = I18nUtil.getInstance().evalMessage( columnValue.toString()); // generate html code StringBuilder htmlBuf = new StringBuilder(); htmlBuf.append("<span title=\"").append(strValue).append("\">"); if (strValue.length() > 64) { htmlBuf.append(strValue.substring(0, 64)).append("..."); } else { htmlBuf.append(strValue); } htmlBuf.append("</span>"); return htmlBuf.toString(); } }
[ "1649865412@qq.com" ]
1649865412@qq.com
0a7529fa70059c90690c719104feae619277e41e
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.1/bj/javax/xml/xquery/XQItem.java
55c0446946d4b24b3c165668a31b71af4d4119c1
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
WINDOWS-1252
Java
false
false
891
java
/* * Copyright © 2003, 2004, 2005, 2006, 2007 Oracle. All rights reserved. */ package javax.xml.xquery; /** * This interface represents an item in the XDM. */ public interface XQItem extends XQItemAccessor { /** * Close the item and release all the resources associated with this item. * No method other than the <code>isClosed</code> or <code>close</code> method * may be called once the item is closed. * Calling close on an <code>XQItem</code> object that is already closed has * no effect. * * @exception XQException if there is an error during closing the item */ public void close() throws XQException; /** * Checks if the item is closed. * * @return <code>boolean</code> <code>true</code> if the item * is in a closed state, <code>false</code> otherwise */ public boolean isClosed(); }
[ "mike@saxonica.com" ]
mike@saxonica.com
ffdeba07dd905fe170d80ff2c82416b9f8765595
cacec52e5653ab773d35d7f1b4f4f660580d7826
/web-admin/src/main/java/com/alipay/api/response/AlipayOpenAuthIndustryPlatformCreateTokenResponse.java
ea1f1b547e94e57e3b456902b1bcb94c1f3b446f
[]
no_license
liuyuhua1984/GameAdminWeb
6d830e7ad1551ac1803abd12e9359c6bfd5965ec
c590fd88d768c8231e2160bf7415996b0027ac98
refs/heads/master
2021-08-28T13:40:50.540862
2017-12-12T10:20:06
2017-12-12T10:20:06
106,268,614
0
2
null
null
null
null
UTF-8
Java
false
false
1,051
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.auth.industry.platform.create.token response. * * @author auto create * @since 1.0, 2016-05-13 18:02:26 */ public class AlipayOpenAuthIndustryPlatformCreateTokenResponse extends AlipayResponse { private static final long serialVersionUID = 7444591623512987136L; /** * 授权码 */ @ApiField("auth_code") private String authCode; /** * appid */ @ApiField("requst_app_id") private String requstAppId; /** * scope */ @ApiField("scope") private String scope; public void setAuthCode(String authCode) { this.authCode = authCode; } public String getAuthCode( ) { return this.authCode; } public void setRequstAppId(String requstAppId) { this.requstAppId = requstAppId; } public String getRequstAppId( ) { return this.requstAppId; } public void setScope(String scope) { this.scope = scope; } public String getScope( ) { return this.scope; } }
[ "lyh@163.com" ]
lyh@163.com
c0b8eb0726513cddd0331ef6bb4c6d7b53787cef
927c39133ebfe2b7f45127f224053303cae17d15
/src/it/csi/mddtools/typedef/provider/FeatureItemProvider.java
e365de6ba35f444d445aee7a8da7610527c57a47
[]
no_license
csipiemonte/servicegen
00cab5564e2668ecf3e4f26feb5b12aa4a3d7b59
3b4b4d6e539ef4466133abcfc5942ae30a9301af
refs/heads/master
2020-08-29T12:23:47.418369
2019-08-13T16:27:20
2019-08-13T16:27:20
218,028,862
0
0
null
null
null
null
UTF-8
Java
false
false
7,540
java
/** * <copyright> * (C) Copyright 2011 CSI-PIEMONTE; * Concesso in licenza a norma dell'EUPL, esclusivamente versione 1.1; * Non e' possibile utilizzare l'opera salvo nel rispetto della Licenza. * E' possibile ottenere una copia della Licenza al seguente indirizzo: * * http://www.eupl.it/opensource/eupl-1-1 * * Salvo diversamente indicato dalla legge applicabile o concordato per * iscritto, il software distribuito secondo i termini della Licenza e' * distribuito "TAL QUALE", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, * esplicite o implicite. * Si veda la Licenza per la lingua specifica che disciplina le autorizzazioni * e le limitazioni secondo i termini della Licenza. * </copyright> * * $Id$ */ package it.csi.mddtools.typedef.provider; import it.csi.mddtools.servicegen.genutils.EditUtils; import it.csi.mddtools.typedef.Feature; import it.csi.mddtools.typedef.TypedefFactory; import it.csi.mddtools.typedef.TypedefPackage; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; /** * This is the item provider adapter for a {@link it.csi.mddtools.typedef.Feature} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class FeatureItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FeatureItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addNamePropertyDescriptor(object); addTypePropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Feature_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Feature_name_feature", "_UI_Feature_type"), TypedefPackage.Literals.FEATURE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This adds a property descriptor for the Type feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Feature_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Feature_type_feature", "_UI_Feature_type"), TypedefPackage.Literals.FEATURE__TYPE, true, false, true, null, null, null)); } /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(TypedefPackage.Literals.FEATURE__DOCUMENTATION); } return childrenFeatures; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { // Check the type of the specified child object and return the proper feature to use for // adding (see {@link AddCommand}) it as a child. return super.getChildFeature(object, child); } /** * This returns Feature.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/Feature")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ @Override public String getText(Object object) { String label = ""; Feature f = (Feature)object; label+=(f.getType()!=null ? EditUtils.formatTypeLabel(f.getType()): "<???>"); label += ": "+ (f.getName()!=null ? f.getName(): "<???>"); return label == null || label.length() == 0 ? getString("_UI_Feature_type") : getString("_UI_Feature_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Feature.class)) { case TypedefPackage.FEATURE__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case TypedefPackage.FEATURE__DOCUMENTATION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (TypedefPackage.Literals.FEATURE__DOCUMENTATION, TypedefFactory.eINSTANCE.createTDDocumentation())); } /** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public ResourceLocator getResourceLocator() { return Typedef_metamodelEditPlugin.INSTANCE; } }
[ "mauro.antonaci@csi.it" ]
mauro.antonaci@csi.it
5ebe43075e9f6558f73b5b52cf0275f48cea7664
1c3efc6e953032c4a72db38fbda8d3a046f6a39c
/bitcamp-java-project/src28_homework/main/java/bitcamp/java106/pms/controller/calculator/CalculatorController.java
2e1cceec1b6fe5b17d9360bb135dae5a10390632
[]
no_license
Roktar/Bitcamp
0ec49a91b45e686f6fb22be5523b5fa4b1799071
c297eeff409bce686c3e404f36a36bcaab0cd7d0
refs/heads/master
2021-03-27T11:13:15.320024
2018-08-10T07:35:34
2018-08-10T07:35:34
122,951,923
0
0
null
null
null
null
UTF-8
Java
false
false
1,133
java
package bitcamp.java106.pms.controller.calculator; import java.util.Scanner; import bitcamp.java106.pms.annotation.Component; import bitcamp.java106.pms.controller.Controller; //@Component("calc") public class CalculatorController implements Controller { Scanner keyScan; public CalculatorController(Scanner keyScan) { this.keyScan = keyScan; } public void service(String menu, String option) { System.out.print("식을 입력하십시오 : "); int a = keyScan.nextInt(); String op = keyScan.next(); int b = keyScan.nextInt(); switch(op) { case "+" : System.out.printf("%d %s %d = %d", a, op, b, a+b); break; case "-" : System.out.printf("%d %s %d = %d", a, op, b, a-b); break; case "/" : System.out.printf("%d %s %d = %d", a, op, b, (float)a/b); break; case "*" : System.out.printf("%d %s %d = %d", a, op, b, a*b); break; default : System.out.println("잘못된 연산자입니다."); } } }
[ "outofsight_@naver.com" ]
outofsight_@naver.com
5b8d6bb21977ebe732d6fafe3e6377bffbe0d8a2
bcffc472c5cd6bf2ecf7da955d36a4ca690c5f7b
/opensrp-rest-services/src/main/java/org/opensrp/rest/register/dto/ElcoDTO.java
d5821658a1e9b4308302a9de41b0083e24747639
[ "Apache-2.0" ]
permissive
proshantokuet/data-coorection
be9b10a645848332d61ee0c60bb7b7d1c1a38d24
88f5653d606b06001776a0530be0c6c62c9f805f
refs/heads/master
2021-07-17T04:56:24.705209
2017-10-23T11:28:58
2017-10-23T11:28:58
107,864,026
0
0
null
null
null
null
UTF-8
Java
false
false
1,529
java
package org.opensrp.rest.register.dto; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.codehaus.jackson.annotate.JsonProperty; public class ElcoDTO { @JsonProperty("TODAY") private String TODAY; @JsonProperty("FWWOMDIVISION") private String FWWOMDIVISION; @JsonProperty("FWWOMDISTRICT") private String FWWOMDISTRICT; @JsonProperty("FWWOMUPAZILLA") private String FWWOMUPAZILLA; @JsonProperty("FWWOMUNION") private String FWWOMUNION; @JsonProperty("WomanREGDATE") private String WomanREGDATE; @JsonProperty("FWWOMFNAME") private String FWWOMFNAME; @JsonProperty("FWWOMNID") private String FWWOMNID; @JsonProperty("FWHUSNAME") private String FWHUSNAME; @JsonProperty("FWWOMBID") private String FWWOMBID; @JsonProperty("GOBHHID") private String GOBHHID; @JsonProperty("PROVIDERID") private String PROVIDERID; @JsonProperty("JiVitAHHID") private String JiVitAHHID; @JsonProperty("SUBMISSIONDATE") private String SUBMISSIONDATE; @JsonProperty("type") private String type; @JsonProperty private String id; public ElcoDTO() { } @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, "id", "revision"); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this, "id", "revision"); } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
[ "proshanto@mpower-social.com" ]
proshanto@mpower-social.com
3cbcd4fcae806ee63ea9db13efa32b2ba8a28f63
b3672b53c6f5ab9e7881d658ad5d3f5b2626b0d2
/osp/matrix/tool/src/java/org/theospi/portfolio/matrix/control/EditScaffoldingCellConfirmationController.java
8bee3f7eeeb8d89cd29d9dd187a5d96e892a1107
[]
no_license
sakai-mirror/ctools
e4aee1fe53efc631cb27de7f968172557457b758
6e6ddc05e0208a680e61299a42e3b374494239bc
refs/heads/master
2016-09-06T09:36:31.829901
2008-10-03T13:43:35
2008-10-03T13:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,045
java
/********************************************************************************** * $URL:https://source.sakaiproject.org/svn/osp/trunk/matrix/tool/src/java/org/theospi/portfolio/matrix/control/EditScaffoldingCellConfirmationController.java $ * $Id:EditScaffoldingCellConfirmationController.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $ *********************************************************************************** * * Copyright (c) 2005, 2006, 2007 The Sakai Foundation. * * Licensed under the Educational Community License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl1.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **********************************************************************************/ package org.theospi.portfolio.matrix.control; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.sakaiproject.metaobj.shared.model.Id; import org.sakaiproject.metaobj.utils.mvc.intf.Controller; import org.sakaiproject.metaobj.utils.mvc.intf.FormController; import org.sakaiproject.metaobj.utils.mvc.intf.LoadObjectController; import org.springframework.validation.Errors; import org.springframework.web.servlet.ModelAndView; import org.theospi.portfolio.matrix.model.ScaffoldingCell; public class EditScaffoldingCellConfirmationController extends BaseScaffoldingCellController implements Controller, FormController, LoadObjectController { protected final Log logger = LogFactory.getLog(getClass()); public ModelAndView handleRequest(Object requestModel, Map request, Map session, Map application, Errors errors) { ScaffoldingCell scaffoldingCell = (ScaffoldingCell) requestModel; String viewName = "success"; Id id = scaffoldingCell.getId(); Map model = new HashMap(); model.put("scaffoldingCell_id", id); String cancel = (String) request.get("cancel"); String next = (String) request.get("continue"); if (cancel != null) { viewName = "cancel"; } else if (next != null) { saveScaffoldingCell(request, scaffoldingCell); model.put("scaffolding_id", scaffoldingCell.getScaffolding() .getId()); if (getTaggingManager().isTaggable()) { session.remove(PROVIDERS_PARAM); } } session.remove(EditedScaffoldingStorage.STORED_SCAFFOLDING_FLAG); session .remove(EditedScaffoldingStorage.EDITED_SCAFFOLDING_STORAGE_SESSION_KEY); return new ModelAndView(viewName, model); } public Map referenceData(Map request, Object command, Errors errors) { Map model = new HashMap(); model.put("label", "Scaffolding Cell"); return model; } }
[ "botimer@umich.edu@66ffb92e-73f9-0310-93c1-f5514f145a0a" ]
botimer@umich.edu@66ffb92e-73f9-0310-93c1-f5514f145a0a
9c62faacd3768c3402106a1e251e8d5e984f8ffa
e07542af0c00f6f4110aa15ef18c40f8972d2442
/src/main/scala/extracells/models/IStateMapperRegister.java
f0447e89f885ee32c7f2fe35687a54dc25e88150
[ "MIT" ]
permissive
ExtraCells/ExtraCells2
787379ad6759c6e5657de54b5fbfb792834b7ffd
b1d03907d911909aaa3b176a7cc90eac0c1467dc
refs/heads/rv6-1.12
2023-05-29T17:02:23.074299
2022-01-25T00:54:11
2022-01-25T00:54:11
16,664,802
126
155
MIT
2022-01-25T01:03:11
2014-02-09T11:00:03
Java
UTF-8
Java
false
false
224
java
package extracells.models; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public interface IStateMapperRegister { @SideOnly(Side.CLIENT) void registerStateMapper(); }
[ "nedelosk@gmail.com" ]
nedelosk@gmail.com
c5e6a644c26dd001f56ece6a346807db776fa46d
eb5af3e0f13a059749b179c988c4c2f5815feb0f
/springboot_k15/mymall/src/main/java/com/woniu/mymall/service/MymallService.java
447f23ac46f44a03a700ac516cc6b2c0513fe8c8
[]
no_license
xiakai007/wokniuxcode
ae686753da5ec3dd607b0246ec45fb11cf6b8968
d9918fb349bc982f0ee9d3ea3bf7537e11d062a2
refs/heads/master
2023-04-13T02:54:15.675440
2021-05-02T05:09:47
2021-05-02T05:09:47
363,570,147
0
0
null
null
null
null
UTF-8
Java
false
false
182
java
package com.woniu.mymall.service; import com.woniu.mymall.entity.pojo.Mymall; import java.util.List; public interface MymallService { public List<Mymall> selectMymallAll(); }
[ "980385778@qq.com" ]
980385778@qq.com
76dd2d7696a8a8ea84c75aadcf34ba52ffd2a12c
1e04f21363e7e65fdd5a728b696eeac62629ef4a
/examen-tema2/src/test/java/com/salesianostriana/dam/DemoApplicationTests.java
85d35aeb92f954e270c45946e4ce8127791e23cc
[]
no_license
lmlopezmagana/ad-psp-examen-tema2-2021
888696cd89d409ec6c678e5cdded9e8b12d881a7
17ab8a38e72904ff09a1d81bd86afdc4ca63984f
refs/heads/main
2023-08-27T16:05:49.732188
2021-11-09T19:40:12
2021-11-09T19:40:12
426,361,481
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
package com.salesianostriana.dam; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DemoApplicationTests { @Test void contextLoads() { } }
[ "luismi.lopez@salesianos.edu" ]
luismi.lopez@salesianos.edu
1b40de7d0b68cf5aea581c83dbfa8b5043621296
878fee61f7ac665e5d6a2f0fe0050ba610f5e37d
/app/src/main/java/com/example/hbeulibrary/fragments/SearchFragment.java
f5a7d141cb5c50a5bc24f01b292716c46878a84b
[ "Apache-2.0" ]
permissive
TingAmeng/HbeuLibrary
9a53cd1ea0758cf6bb1a8f2b24f46d7a34e8a97b
0803e71933392b422ef1c6e81c72c6565d9c82f7
refs/heads/master
2020-05-07T08:59:50.607944
2019-04-09T12:00:07
2019-04-09T12:00:07
180,356,566
1
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package com.example.hbeulibrary.fragments; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import com.example.hbeulibrary.Adapter.BookAdapter; import com.example.hbeulibrary.DB.Book; import com.example.hbeulibrary.DB.InitDB; import com.example.hbeulibrary.R; import com.example.hbeulibrary.Util.ItemDivider; import org.litepal.LitePal; import java.util.ArrayList; import java.util.List; public class SearchFragment extends Fragment { private List<Book> bookList = LitePal.findAll(Book.class); private RecyclerView searchRecyclerView; private BookAdapter adapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_search,container,false); //initBooks(); LinearLayoutManager layoutManager = new LinearLayoutManager(view.getContext()); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); searchRecyclerView = (RecyclerView) view.findViewById(R.id.search_recycler_view); searchRecyclerView.setLayoutManager(layoutManager); //设置分隔线 searchRecyclerView.addItemDecoration(new ItemDivider() .setDividerWith(1).setDividerColor(R.color.colorPrimary)); adapter = new BookAdapter(bookList); searchRecyclerView.setAdapter(adapter); return view; } }
[ "tony@gmail.com" ]
tony@gmail.com
1a3875a6f96cb996f6a23ee93cceabac1048f38e
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/ui/widget/textview/a$3.java
f680b5ed4ba190792a205292e1549943a5b9a34a
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.tencent.mm.ui.widget.textview; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; class a$3 implements OnTouchListener { final /* synthetic */ a uPp; a$3(a aVar) { this.uPp = aVar; } public final boolean onTouch(View view, MotionEvent motionEvent) { this.uPp.uPf = (int) motionEvent.getX(); this.uPp.uPg = (int) motionEvent.getY(); return false; } }
[ "707194831@qq.com" ]
707194831@qq.com
5bdc6b105cedb1adc9f31022c489025f034aa9b6
1f1352a19528084b924988c56ef68ae9ce40aac0
/dorado/dorado-registry/dorado-registry-zookeeper/src/test/java/com/meituan/dorado/registry/zookeeper/util/ZooKeeperNodeInfoTest.java
c5454bd01029f2c7272e0349ec98a21dc167646a
[ "Apache-2.0" ]
permissive
jcanchen/octo-rpc
6c1c2febee4df31cf8b984ab2ecae76b78d1c463
3423af57f7007e98073e70fdf09c64764eb6bcb1
refs/heads/master
2020-04-17T08:10:14.026762
2018-12-20T06:49:46
2018-12-28T10:17:17
166,401,020
1
0
null
2019-01-18T12:22:51
2019-01-18T12:22:51
null
UTF-8
Java
false
false
1,998
java
/* * Copyright 2018 Meituan Dianping. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.meituan.dorado.registry.zookeeper.util; import com.meituan.dorado.registry.meta.Provider; import com.meituan.dorado.registry.meta.SubscribeInfo; import com.meituan.dorado.registry.zookeeper.RegistryTest; import org.junit.Assert; import org.junit.Test; import java.io.IOException; public class ZooKeeperNodeInfoTest extends RegistryTest { @Test public void testNodeInfo() { try { String nodeJson = ZooKeeperNodeInfo.genNodeData(genRegistryInfo()); Provider provider = ZooKeeperNodeInfo.genProvider(nodeJson, genSubscribeInfo()); Assert.assertEquals(9001, provider.getPort()); nodeJson = ZooKeeperNodeInfo.genNodeData(genRegistryInfo()); provider = ZooKeeperNodeInfo.genProvider(nodeJson, genDiffServiceNameSubscribeInfo()); Assert.assertNull(provider); } catch (IOException e) { Assert.fail(); } } public SubscribeInfo genDiffServiceNameSubscribeInfo() { SubscribeInfo mnsSubscribeInfo = new SubscribeInfo(); mnsSubscribeInfo.setLocalAppkey("com.meituan.octo.dorado.client"); mnsSubscribeInfo.setRemoteAppkey("com.meituan.octo.dorado.server"); mnsSubscribeInfo.setServiceName("com.meituan.mtthrift.test.Hello"); mnsSubscribeInfo.setProtocol("thrift"); return mnsSubscribeInfo; } }
[ "huixiangbo@meituan.com" ]
huixiangbo@meituan.com
fafc767e542bb92e205ca4bd5912831c25659ac3
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-16b-2-15-FEMO-WeightedSum:TestLen:CallDiversity/org/mockito/internal/MockitoCore_ESTest_scaffolding.java
31a11c141a5ee5ca9270eb1fc8d418aa5dd48557
[]
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
5,050
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 09:44:19 UTC 2020 */ package org.mockito.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class MockitoCore_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.mockito.internal.MockitoCore"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MockitoCore_ESTest_scaffolding.class.getClassLoader() , "org.mockito.cglib.proxy.Callback", "org.mockito.configuration.AnnotationEngine", "org.mockito.exceptions.misusing.UnfinishedVerificationException", "org.mockito.exceptions.Reporter", "org.mockito.exceptions.verification.VerificationInOrderFailure", "org.mockito.configuration.DefaultMockitoConfiguration", "org.mockito.exceptions.misusing.NullInsteadOfMockException", "org.mockito.stubbing.VoidMethodStubbable", "org.mockito.internal.util.StringJoiner", "org.mockito.exceptions.misusing.NotAMockException", "org.mockito.internal.progress.MockingProgress", "org.mockito.internal.util.MockitoLogger", "org.mockito.exceptions.misusing.MissingMethodInvocationException", "org.mockito.exceptions.verification.SmartNullPointerException", "org.mockito.exceptions.verification.TooLittleActualInvocations", "org.mockito.internal.progress.MockingProgressImpl", "org.mockito.internal.configuration.GlobalConfiguration", "org.mockito.stubbing.DeprecatedOngoingStubbing", "org.mockito.cglib.proxy.MethodInterceptor", "org.mockito.internal.reporting.PrintingFriendlyInvocation", "org.mockito.exceptions.verification.TooManyActualInvocations", "org.mockito.exceptions.verification.ArgumentsAreDifferent", "org.mockito.exceptions.misusing.MockitoConfigurationException", "org.mockito.internal.progress.IOngoingStubbing", "org.hamcrest.SelfDescribing", "org.mockito.configuration.MockitoConfiguration", "org.mockito.exceptions.misusing.InvalidUseOfMatchersException", "org.mockito.internal.invocation.Invocation", "org.mockito.exceptions.misusing.UnfinishedStubbingException", "org.mockito.internal.debugging.DebuggingInfo", "org.mockito.exceptions.verification.NoInteractionsWanted", "org.mockito.internal.MockitoCore", "org.mockito.exceptions.PrintableInvocation", "org.mockito.internal.configuration.ClassPathLoader", "org.mockito.exceptions.base.MockitoException", "org.mockito.stubbing.Stubber", "org.mockito.internal.exceptions.base.ConditionalStackTraceFilter", "org.mockito.stubbing.Answer", "org.mockito.internal.exceptions.base.StackTraceFilter", "org.mockito.invocation.InvocationOnMock", "org.mockito.internal.progress.ArgumentMatcherStorageImpl", "org.mockito.exceptions.verification.WantedButNotInvoked", "org.mockito.internal.progress.ThreadSafeMockingProgress", "org.mockito.internal.verification.api.VerificationMode", "org.mockito.configuration.IMockitoConfiguration", "org.mockito.InOrder", "org.mockito.internal.MockitoInvocationHandler", "org.mockito.exceptions.misusing.WrongTypeOfReturnValue", "org.mockito.MockSettings", "org.mockito.stubbing.OngoingStubbing", "org.mockito.internal.progress.ArgumentMatcherStorage", "org.mockito.exceptions.base.MockitoAssertionError", "org.mockito.internal.util.MockUtil", "org.mockito.exceptions.verification.NeverWantedButInvoked", "org.mockito.internal.util.CreationValidator", "org.hamcrest.Matcher" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a0b04a4b2def6e17fa6aebe3121ffe6ba1958d4e
7eb4b516532041c1498ae48575cd59223dfebbd3
/it/java/java NIO server_client 고성능 비동기식 서버만들기 자바/maso 2th source/Maso 2th Client/com/l2fprod/gui/plaf/skin/impl/gtk/GtkImage.java
58adbf066cc21b0a0d6f3a2675a177c32f0c8546
[]
no_license
visualkhh/book-visualkhh
0823dacee2c05da724eb438f0b85b7b14287ad14
0ca375bdfa907b000282e64952140ece9f61881e
refs/heads/master
2023-04-13T13:49:39.846518
2023-04-11T11:31:04
2023-04-11T11:31:04
40,951,125
0
1
null
2022-12-16T05:42:20
2015-08-18T04:42:28
Java
UTF-8
Java
false
false
2,038
java
package com.l2fprod.gui.plaf.skin.impl.gtk; import java.awt.Image; import java.net.URL; import javax.swing.tree.TreeNode; import java.util.Enumeration; import com.l2fprod.gui.plaf.skin.SkinUtils; /** * * @author $Author: l2fprod $ * @version $Revision: 1.2 $, $Date: 2000/09/29 22:35:56 $ */ public class GtkImage extends GtkProps implements TreeNode { GtkStyle style; Image preloaded; public GtkImage() { } public void setPreview(Image image) { preloaded = image; } public Image getPreview(int w, int h) throws Exception { if (preloaded == null) { preloaded = getImage(style.getParser().getDirectory()); if (preloaded != null) preloaded = preloaded.getScaledInstance(w, h, 0); } return preloaded; } public String getFilename() { String filename = (String)getProperty("file"); if (filename != null) return filename; filename = (String)getProperty("overlay_file"); return filename; } public Image getImage(URL skinDirectory) throws Exception { Image im = null; im = getImage(skinDirectory, "file"); if (im == null) im = getImage(skinDirectory, "overlay_file"); return im; } public Image getOverlayImage(URL skinDirectory) throws Exception { return getImage(skinDirectory, "overlay_file"); } public Image getImage(URL skinDirectory, String prop) throws Exception { String filename = (String)getProperty(prop); if (filename == null) return null; return SkinUtils.loadImage(new URL(skinDirectory, filename)); } public Enumeration children() { throw new Error("Not implemented"); } public boolean getAllowsChildren() { return false; } public TreeNode getChildAt(int childIndex) { return null; } public int getChildCount() { return 0; } public int getIndex(TreeNode node) { return -1; } public TreeNode getParent() { return style; } public boolean isLeaf() { return false; } public String toString() { return getProperty("function") + ""; } }
[ "visualkhh@gmail.com" ]
visualkhh@gmail.com
0040fced324ed93d964bd412b1456c27fa246f13
723cf379d4f5003337100548db3121081fe08504
/javax/swing/plaf/multi/MultiComboBoxUI.java
8d1f215d1f5d303ca0f0593f20005971611c8931
[]
no_license
zxlooong/jdk13120
719b53375da0a5a49cf74efb42345653ccd1e9c1
f8bcd92167a3bf8dd9b1a77009d96d0f5653b825
refs/heads/master
2016-09-06T18:11:53.353084
2013-12-06T16:09:41
2013-12-06T16:09:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,256
java
/* * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.swing.plaf.multi; import java.util.Vector; import javax.swing.plaf.ComboBoxUI; import javax.swing.JComboBox; import javax.swing.plaf.ComponentUI; import javax.swing.JComponent; import java.awt.Graphics; import java.awt.Dimension; import javax.accessibility.Accessible; /** * MultiComboBoxUI implementation * * <p>This file was automatically generated by AutoMulti. * * @version 1.29 02/06/02 11:06:06 * @author Otto Multey */ public class MultiComboBoxUI extends ComboBoxUI { /** * The Vector containing the real UI's. This is populated * in the call to createUI, and can be obtained by calling * getUIs. The first element is guaranteed to the real UI * obtained from the default look and feel. */ protected Vector uis = new Vector(); //////////////////// // Common UI methods //////////////////// /** * Return the list of UI's associated with this multiplexing UI. This * allows processing of the UI's by an application aware of multiplexing * UI's on components. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } //////////////////// // ComboBoxUI methods //////////////////// /** * Call setPopupVisible on each UI handled by this MultiUI. */ public void setPopupVisible(JComboBox a, boolean b) { for (int i = 0; i < uis.size(); i++) { ((ComboBoxUI) (uis.elementAt(i))).setPopupVisible(a,b); } } /** * Call isPopupVisible on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public boolean isPopupVisible(JComboBox a) { boolean returnValue = ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a); for (int i = 1; i < uis.size(); i++) { ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a); } return returnValue; } /** * Call isFocusTraversable on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public boolean isFocusTraversable(JComboBox a) { boolean returnValue = ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a); for (int i = 1; i < uis.size(); i++) { ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a); } return returnValue; } //////////////////// // ComponentUI methods //////////////////// /** * Call installUI on each UI handled by this MultiUI. */ public void installUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } } /** * Call uninstallUI on each UI handled by this MultiUI. */ public void uninstallUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).uninstallUI(a); } } /** * Call paint on each UI handled by this MultiUI. */ public void paint(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).paint(a,b); } } /** * Call update on each UI handled by this MultiUI. */ public void update(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).update(a,b); } } /** * Call getPreferredSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getPreferredSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a); } return returnValue; } /** * Call getMinimumSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getMinimumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a); } return returnValue; } /** * Call getMaximumSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getMaximumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a); } return returnValue; } /** * Call contains on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public boolean contains(JComponent a, int b, int c) { boolean returnValue = ((ComponentUI) (uis.elementAt(0))).contains(a,b,c); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).contains(a,b,c); } return returnValue; } /** * Return a multiplexing UI instance if any of the auxiliary * LookAndFeels support this UI. Otherwise, just return a * UI obtained using the normal methods. */ public static ComponentUI createUI(JComponent a) { ComponentUI mui = new MultiComboBoxUI(); return MultiLookAndFeel.createUIs(mui, ((MultiComboBoxUI) mui).uis, a); } /** * Call getAccessibleChildrenCount on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public int getAccessibleChildrenCount(JComponent a) { int returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a); } return returnValue; } /** * Call getAccessibleChild on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Accessible getAccessibleChild(JComponent a, int b) { Accessible returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChild(a,b); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChild(a,b); } return returnValue; } }
[ "zxlooong@gmail.com" ]
zxlooong@gmail.com
5104e1e5a5012ac5d78724a1e0aa5896a8d777fe
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project42/src/test/java/org/gradle/test/performance42_3/Test42_263.java
72f381ebac2431e1fd73f2e59e30aa35003b008c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance42_3; import static org.junit.Assert.*; public class Test42_263 { private final Production42_263 production = new Production42_263("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
3f27f90a2e235d5a69df7cf32a96ded6ebdb8d3f
5e3634529f6aa28c4930c780feeeb6ef84e39c19
/src/main/java/com/ptit/demo/service/EmailAlreadyUsedException.java
7a8378cc6da3a198911fd8f9995d1fdaf3ea5386
[]
no_license
shinnoo/book-store
5869b951e52ce24f17803f75d8ebaf428088b105
675a027fc32eadf597e499cbcddd2291b7c79bcc
refs/heads/main
2023-03-23T21:45:20.468614
2021-03-23T01:28:12
2021-03-23T01:28:12
350,542,161
0
0
null
2021-03-23T01:29:14
2021-03-23T01:27:53
Java
UTF-8
Java
false
false
244
java
package com.ptit.demo.service; public class EmailAlreadyUsedException extends RuntimeException { private static final long serialVersionUID = 1L; public EmailAlreadyUsedException() { super("Email is already in use!"); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e08d45195d2260f431090488907c8dbec38e2661
0fddaec8e389712107e99fb40a32903809416d7d
/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/struct/DBSDataManipulatorExt.java
ee49f3a4b332533777c321dc880b5478cab93514
[ "EPL-1.0", "Apache-2.0", "LGPL-2.0-or-later" ]
permissive
kai-morich/dbeaver
83dce3057f510fe110380300c7eb51e5d5b5de21
0694ed136ddf089a5a01a0ceebd6e67585a7b2ee
refs/heads/devel
2022-02-19T00:07:03.733415
2022-02-11T14:35:37
2022-02-11T14:35:37
255,131,238
4
0
Apache-2.0
2020-04-12T17:08:35
2020-04-12T17:08:34
null
UTF-8
Java
false
false
1,622
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2022 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jkiss.dbeaver.model.struct; import org.jkiss.code.NotNull; import org.jkiss.dbeaver.model.exec.DBCException; import org.jkiss.dbeaver.model.exec.DBCExecutionSource; import org.jkiss.dbeaver.model.exec.DBCSession; import org.jkiss.dbeaver.model.struct.rdb.DBSManipulationType; /** * Data manipulator extensions. * Extends data manipulator and provides away to execute some actions before and after data manipulations. */ public interface DBSDataManipulatorExt extends DBSDataManipulator { void beforeDataChange( @NotNull DBCSession session, @NotNull DBSManipulationType type, @NotNull DBSAttributeBase[] attributes, @NotNull DBCExecutionSource source) throws DBCException; void afterDataChange( @NotNull DBCSession session, @NotNull DBSManipulationType type, @NotNull DBSAttributeBase[] attributes, @NotNull DBCExecutionSource source) throws DBCException; }
[ "serge@jkiss.org" ]
serge@jkiss.org
91f49178807a01440a81ca238266a53800fb6f7c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_0a64b7917314cf51e92220d0bf066c2eff44a5e7/Client/17_0a64b7917314cf51e92220d0bf066c2eff44a5e7_Client_s.java
a700f57a621fd01fe18e35be6bbcd85fb0294026
[]
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
5,034
java
/** * File: Client.java * Original Author: Dan Brown <dan.brown@answers.com> * Copyright 2012 Answers.com */ package com.likethecolor.alchemy.api; import com.likethecolor.alchemy.api.call.AbstractCall; import com.likethecolor.alchemy.api.entity.Response; import com.likethecolor.alchemy.api.params.Params; import com.likethecolor.alchemy.api.validator.ApiKeyValidator; import com.likethecolor.alchemy.api.validator.OutputStatusValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; public class Client { private static final Logger LOGGER = LoggerFactory.getLogger(Client.class); private static final String API_KEY = "apikey"; private static final String HEADER_CONTENT_LENGTH = "Content-Length"; private static final String DEFAULT_URL = "http://access.alchemyapi.com/calls/"; private String apiKey; private String requestUri = DEFAULT_URL; public Client() throws IOException { } public Client(final String apiKey) throws IOException { setAPIKey(apiKey); } public void setAPIKey(final String apiKey) { ApiKeyValidator.validate(apiKey); LOGGER.debug("api key: " + apiKey); this.apiKey = apiKey.trim(); } public Response call(final AbstractCall call) throws IOException { final Params params = call.getParams(); call.getCallType().setValuesOnParams(params); final String callName = call.getCallType().getPrefix() + call.getName(); final String callPrefix = call.getCallType().getType(); String jsonString; if(Constants.CALL_TYPE_URL.equals(call.getCallType().getType())) { jsonString = get(callName, callPrefix, params); } else { jsonString = post(callName, callPrefix, params); } LOGGER.debug("json string: " + jsonString); return call.parse(jsonString); } private String get(final String callName, String callPrefix, Params params) throws IOException { String jsonString = null; StringBuilder uri = new StringBuilder() .append(requestUri).append(callPrefix).append('/').append(callName) .append('?').append(API_KEY).append("=").append(this.apiKey) .append(params.toString()); LOGGER.debug("GET: uri: " + uri); HttpURLConnection handle = null; try { URL url = new URL(uri.toString()); handle = (HttpURLConnection) url.openConnection(); handle.setDoOutput(true); jsonString = doRequest(handle); } finally { if(handle != null) { handle.disconnect(); } } return jsonString; } private String post(final String callName, String callType, Params params) throws MalformedURLException { String jsonString = null; URL url = new URL(requestUri + callType + "/" + callName); StringBuilder data = new StringBuilder() .append(API_KEY).append("=").append(apiKey) .append(params.toString()); LOGGER.debug("POST: url: " + url); LOGGER.debug("POST: data: " + data.toString()); LOGGER.debug("POST: " + HEADER_CONTENT_LENGTH + ": " + data.length()); DataOutputStream dataOutputStream = null; HttpURLConnection handle = null; try { handle = (HttpURLConnection) url.openConnection(); handle.setDoOutput(true); handle.addRequestProperty(HEADER_CONTENT_LENGTH, Integer.toString(data.length())); dataOutputStream = new DataOutputStream(handle.getOutputStream()); dataOutputStream.write(data.toString().getBytes()); jsonString = doRequest(handle); } catch(IOException e) { e.printStackTrace(); } finally { if(dataOutputStream != null) { try { dataOutputStream.close(); } catch(IOException e) { // ignore } } if(handle != null) { handle.disconnect(); } } return jsonString; } private String doRequest(HttpURLConnection handle) throws IOException { if(handle == null) { return null; } StringBuilder builder = new StringBuilder(); BufferedReader bufferedReader = null; DataInputStream dataInputStream; try { String line; dataInputStream = new DataInputStream(handle.getInputStream()); bufferedReader = new BufferedReader(new InputStreamReader(dataInputStream)); while((line = bufferedReader.readLine()) != null) { builder.append(line.trim()); } } finally { if(bufferedReader != null) { try { bufferedReader.close(); } catch(IOException e) { // ignore } } } OutputStatusValidator.validate(builder.toString()); return builder.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
83565af193e90b6e2dd9bebbd411b1affe98f3b6
089f5b62746c7f18b14aeb283b8b5ab5bd9b91be
/src/main/java/com/milorad/config/OAuth2TokenServicesConfiguration.java
b7b54fea920a300166fdfc986155507e8c82365d
[]
no_license
mstzl/workflowTest
76296c58f774aed60da253299e39e20ccdd393a8
2c6beb8aa1953c5a0040bdab997e583da92c0c27
refs/heads/master
2020-05-18T08:53:25.308365
2019-04-30T18:05:59
2019-04-30T18:05:59
184,309,104
0
0
null
null
null
null
UTF-8
Java
false
false
967
java
package com.milorad.config; import org.springframework.boot.autoconfigure.security.oauth2.resource.AuthoritiesExtractor; import org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.milorad.security.oauth2.SimpleAuthoritiesExtractor; import com.milorad.security.oauth2.SimplePrincipalExtractor; @Configuration public class OAuth2TokenServicesConfiguration { private static final String OAUTH2_PRINCIPAL_ATTRIBUTE = "preferred_username"; private static final String OAUTH2_AUTHORITIES_ATTRIBUTE = "roles"; @Bean public PrincipalExtractor principalExtractor() { return new SimplePrincipalExtractor(OAUTH2_PRINCIPAL_ATTRIBUTE); } @Bean public AuthoritiesExtractor authoritiesExtractor() { return new SimpleAuthoritiesExtractor(OAUTH2_AUTHORITIES_ATTRIBUTE); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5a328fa459e3b00bcf3e450be23507430de03d11
e3162d976b3a665717b9a75c503281e501ec1b1a
/src/main/java/com/alipay/api/domain/AlipayCommerceIotMdeviceprodTradeBatchqueryModel.java
1d01ce8cd4e4671d09db7542e1da8250c8502aec
[ "Apache-2.0" ]
permissive
sunandy3/alipay-sdk-java-all
16b14f3729864d74846585796a28d858c40decf8
30e6af80cffc0d2392133457925dc5e9ee44cbac
refs/heads/master
2020-07-30T14:07:34.040692
2019-09-20T09:35:20
2019-09-20T09:35:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,352
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 根据交易流水号查询设备信息 * * @author auto create * @since 1.0, 2019-08-21 19:51:19 */ public class AlipayCommerceIotMdeviceprodTradeBatchqueryModel extends AlipayObject { private static final long serialVersionUID = 7729817723183584981L; /** * 真实设备sn */ @ApiField("device_sn") private String deviceSn; /** * 物料id */ @ApiField("item_id") private String itemId; /** * 供应商id */ @ApiField("supplier_sn") private String supplierSn; /** * 交易流水号,优先级最高,如果传入则根据流水号查询 */ @ApiField("trade_no") private String tradeNo; public String getDeviceSn() { return this.deviceSn; } public void setDeviceSn(String deviceSn) { this.deviceSn = deviceSn; } public String getItemId() { return this.itemId; } public void setItemId(String itemId) { this.itemId = itemId; } public String getSupplierSn() { return this.supplierSn; } public void setSupplierSn(String supplierSn) { this.supplierSn = supplierSn; } public String getTradeNo() { return this.tradeNo; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
79a32f17684d98b14e7528330b7cdedb4e099f1f
045699573f75c253513115887e04f29f1e23e432
/src/main/java/cn/jpush/api/schedule/ScheduleResult.java
d620c7841dde7ede0da840cc8041b668cdb36e40
[]
no_license
zhuobinchan/popoteam_server_v1.0
61b46d716d3257f3110ab79ec7da04c7c6d4d8e3
f4dd97f76e8d5192a54a3eafc06cd79c280155a9
refs/heads/master
2021-01-21T23:04:51.632776
2017-06-23T05:48:15
2017-06-23T05:48:15
95,187,326
1
1
null
null
null
null
UTF-8
Java
false
false
748
java
package cn.jpush.api.schedule; import cn.jpush.api.common.resp.BaseResult; import com.google.gson.JsonObject; import com.google.gson.annotations.Expose; public class ScheduleResult extends BaseResult{ private static final long serialVersionUID = 995450157929190757L; @Expose String schedule_id; @Expose String name; @Expose Boolean enabled; @Expose JsonObject trigger; @Expose JsonObject push; public String getSchedule_id() { return schedule_id; } public String getName() { return name; } public Boolean getEnabled() { return enabled; } public JsonObject getTrigger() { return trigger; } public JsonObject getPush() { return push; } }
[ "bin1095256592@qq.com" ]
bin1095256592@qq.com
e40c5708cdcf37fa7895a240581ed150c7f02f12
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/batch/common/form/DeleteBatchTypeDescriptionForm.java
3bdfd3250b7ce312e45295c5eb766d51978fe07a
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,061
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.control.user.batch.common.form; import com.echothree.control.user.batch.common.spec.BatchTypeDescriptionSpec; public interface DeleteBatchTypeDescriptionForm extends BatchTypeDescriptionSpec { // Nothing additional beyond BatchTypeDescriptionSpec }
[ "rich@echothree.com" ]
rich@echothree.com
65344b70ef09d9aef811812b3ff973c0d993a19c
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.pde.ui/2430.java
c5fbe05e724bc3e841681f9cae872960dcf5c2be
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,087
java
/******************************************************************************* * Copyright (c) 2006, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.pde.ui.launcher; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.pde.internal.ui.*; import org.eclipse.pde.internal.ui.launcher.*; import org.eclipse.pde.launching.IPDELauncherConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.PlatformUI; /** * A launch configuration tab that customizes the list of bundles to launch with, * their start level and their auto-start attributes. * <p> * This class may be instantiated, but it is not intended to be subclassed by clients. * </p> * @since 3.3 * * @noextend This class is not intended to be subclassed by clients. */ public class BundlesTab extends AbstractLauncherTab { private Image fImage; private BlockAdapter fBlock; OSGiFrameworkBlock fFrameworkBlock; private static final int PLUGIN_SELECTION = 1; private static final int FEATURE_SELECTION = 2; /** * Constructor to create a new bundle tab */ public BundlesTab() { fImage = PDEPluginImages.DESC_PLUGINS_FRAGMENTS.createImage(); fBlock = new BlockAdapter(new OSGiBundleBlock(this), new FeatureBlock(this)); fFrameworkBlock = new OSGiFrameworkBlock(this, fBlock); } /** * Dispose images * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose() */ @Override public void dispose() { fBlock.dispose(); fImage.dispose(); super.dispose(); } @Override public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(2, false)); fFrameworkBlock.createControl(composite); fBlock.createControl(composite, 2, 5); setControl(composite); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.LAUNCHER_ADVANCED); } @Override public void initializeFrom(ILaunchConfiguration config) { try { int index = PLUGIN_SELECTION; if (config.getAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false)) { index = FEATURE_SELECTION; } else { index = PLUGIN_SELECTION; } fBlock.setActiveBlock(index); fFrameworkBlock.initializeFrom(config); fBlock.initializeFrom(config); } catch (CoreException e) { PDEPlugin.log(e); } } @Override public void setDefaults(ILaunchConfigurationWorkingCopy config) { fBlock.setDefaults(config); } @Override public void performApply(ILaunchConfigurationWorkingCopy config) { fFrameworkBlock.performApply(config); fBlock.performApply(config); } @Override public String getName() { return PDEUIMessages.BundlesTab_title; } @Override public Image getImage() { return fImage; } @Override public void activated(ILaunchConfigurationWorkingCopy config) { } @Override public void validateTab() { } @Override public String getId() { return IPDELauncherConstants.TAB_BUNDLES_ID; } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
6fb636dca4d40cd837e2a7d285da2b16e208f97e
0976b0ca0ba6a5ae34f93b7fa8d2db2f4251c7bf
/Dart/gen/com/jetbrains/lang/dart/psi/impl/DartOnMixinsImpl.java
9a5a862ce8abbcb29aa1a5a313a3f3c9172a55fd
[ "Apache-2.0" ]
permissive
wenshaofeng/intellij-plugins
1357447d5ef4409a24bfc0fa1c742217a24e61c5
51140f347ba16efdd8d8911a866b7af815dcad16
refs/heads/master
2020-04-01T19:25:10.301852
2018-10-17T17:53:34
2018-10-17T17:54:02
153,552,624
1
0
null
2018-10-18T02:36:10
2018-10-18T02:36:10
null
UTF-8
Java
false
false
1,150
java
// Copyright 2000-2018 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. // This is a generated file. Not intended for manual editing. package com.jetbrains.lang.dart.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static com.jetbrains.lang.dart.DartTokenTypes.*; import com.jetbrains.lang.dart.psi.*; import com.jetbrains.lang.dart.util.DartPsiImplUtil; public class DartOnMixinsImpl extends DartPsiCompositeElementImpl implements DartOnMixins { public DartOnMixinsImpl(@NotNull ASTNode node) { super(node); } public void accept(@NotNull DartVisitor visitor) { visitor.visitOnMixins(this); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof DartVisitor) accept((DartVisitor)visitor); else super.accept(visitor); } @Override @Nullable public DartTypeList getTypeList() { return findChildByClass(DartTypeList.class); } }
[ "alexander.doroshko@jetbrains.com" ]
alexander.doroshko@jetbrains.com
b7a727d2bf97934cc8952b960433503c83b8afec
2e53b1e78ceb2014acb99dfbdd4e5af671da7971
/app/src/main/java/com/meiku/dev/bean/MkPayOrderGroup.java
bd814855f9c7060cc2ac5bb7e5e68be890445c38
[]
no_license
hs5240leihuang/MrrckApplication
7960cb2278a1a8098c5bc908b3c5d7b241869c5d
aef126d4876e3e45b0984c1b829c38aa326ba598
refs/heads/master
2021-01-12T02:47:13.236711
2017-01-05T11:13:11
2017-01-05T11:14:05
78,102,342
0
0
null
null
null
null
UTF-8
Java
false
false
4,462
java
package com.meiku.dev.bean; import java.io.Serializable; import java.math.BigDecimal; /** * 版权所有:2016-美库网 * 项目名称:mrrck-web * * 类描述:支付系统订单管理(组订单 主表) * 类名称:com.mrrck.db.entity.MkPayOrderGroup * 创建人:曙光 * 创建时间:2016-9-15 上午09:41:40 * @version V1.0 */ public class MkPayOrderGroup implements Serializable { /**自增编号*/ private Integer id; /**用户编号*/ private Integer userId; /**业务类型 跟子表有个字段不重复 这个是按照模块划分 *0 充值模块 1找产品模块 2找装修模块 **/ private Integer workType; /**通知的手机号码(冗余数据)*/ private String phone; /**冗余子表数据*/ private String orderName; /**冗余子表数据*/ private String orderContent; /**千分位\r \r\n-5000:交易失败\r \r\n-4000:系统取消\r\r\n-3000:卖家取消\r \r\n-2000:买家取消\r \r\n1000:创建 初始化状态\r \r\n2000:交易完成\r \r\r\n百分位\r \r\n100:已支付\r\n200:已退款 \r \r\n十分位\r \r\n10:已发货\r \r \r\n个分位\r \r\n1:买家已评论\r \r\n2:卖家已评论\r \r\n3:双方已评论*/ private Integer orderStatus; /**总订单价格*/ private Float orderAllAmount; /**订单组编号*/ private String orderGroupNumber; /**(三方订单编号,用于历史记录三方交互查询)支付平台交易号*/ private String ortherOrderNumber; /**(支付方式 0美库余额 ,1支付宝,2微信 )*/ private Integer payType; /**支付时间*/ private String payTime; /**ip地址*/ private String ipAddrss; /**业务冗余文件地址*/ private String workFileUrl; /**(userId 自己 表示系统操作,如果是别人记录userId)*/ private Integer createByUserId; /**创建时间*/ private String createDate; /**更新时间*/ private String updateDate; /**0 正常 1 删除*/ private Integer delStatus; public Integer getWorkType() { return workType; } public void setWorkType(Integer workType) { this.workType = workType; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getOrderGroupNumber() { return orderGroupNumber; } public void setOrderGroupNumber(String orderGroupNumber) { this.orderGroupNumber = orderGroupNumber; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getOrderName() { return orderName; } public void setOrderName(String orderName) { this.orderName = orderName; } public String getOrderContent() { return orderContent; } public void setOrderContent(String orderContent) { this.orderContent = orderContent; } public Integer getOrderStatus() { return orderStatus; } public void setOrderStatus(Integer orderStatus) { this.orderStatus = orderStatus; } public String getOrtherOrderNumber() { return ortherOrderNumber; } public void setOrtherOrderNumber(String ortherOrderNumber) { this.ortherOrderNumber = ortherOrderNumber; } public Integer getPayType() { return payType; } public void setPayType(Integer payType) { this.payType = payType; } public String getPayTime() { return payTime; } public void setPayTime(String payTime) { this.payTime = payTime; } public String getIpAddrss() { return ipAddrss; } public void setIpAddrss(String ipAddrss) { this.ipAddrss = ipAddrss; } public Integer getCreateByUserId() { return createByUserId; } public void setCreateByUserId(Integer createByUserId) { this.createByUserId = createByUserId; } public String getCreateDate() { return createDate; } public void setCreateDate(String createDate) { this.createDate = createDate; } public String getUpdateDate() { return updateDate; } public void setUpdateDate(String updateDate) { this.updateDate = updateDate; } public Integer getDelStatus() { return delStatus; } public void setDelStatus(Integer delStatus) { this.delStatus = delStatus; } public String getWorkFileUrl() { return workFileUrl; } public void setWorkFileUrl(String workFileUrl) { this.workFileUrl = workFileUrl; } public Float getOrderAllAmount() { return orderAllAmount; } public void setOrderAllAmount(Float orderAllAmount) { this.orderAllAmount = orderAllAmount; } }
[ "837851174@qq.com" ]
837851174@qq.com
5f8deb72561162181953ee30ba0eb9174a378901
f66e9ce73c8dfcab523e680b59bb1e55f5ebe5d1
/leetcode精刷250/src/_231_PowerofTwo.java
e3027077270bcb350a2622daf98cd3de11a8fdf9
[]
no_license
kqiu10/LeetcodeSolutionJava
b8ca84df4e7ada2ad6be3bf1a34b19054ebb3b60
f4609cc2c1fc9d1c21180bc1162bc1a538c4c6e5
refs/heads/master
2023-05-31T07:19:51.896361
2021-06-19T20:44:57
2021-06-19T20:44:57
280,535,038
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
package src; /** * Date: 11/23/20 * Question Description Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2x. */ /** * Description: TODO * Time complexity:O(1); * Space complexity: O(1); */ public class _231_PowerofTwo { public boolean isPowerOfTwo(int n) { return (n > 0 && (n & (n - 1)) == 0); } }
[ "qiukan97@gmail.com" ]
qiukan97@gmail.com
4d63994d367d1b8e397f708a4b2654133a854e08
edfb96e4f1344eda26e3640c22c4422e610a78d1
/src/Recursion/ReverseStringWithRecursion.java
60bf6449f3cd8a8c2565e4e76eaea83346b343ab
[]
no_license
Orlando-Houston/Data-structure-master
10a72f204b9d64c22b689a6b29ee2ea57cf329b4
cd33d6518798fb820141c824bdc99ab3ba03bec4
refs/heads/master
2022-11-13T21:40:24.179950
2020-07-03T23:09:50
2020-07-03T23:09:50
276,977,819
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package Recursion; public class ReverseStringWithRecursion { public static void main(String[] args) { String str = "Welcome to Data Structure course"; String reversed = reverseString(str); System.out.println("The reversed string is: " + reversed); } public static String reverseString(String str) { if (str.isEmpty()) return str; //Calling Function Recursively return reverseString(str.substring(1)) + str.charAt(0); } }
[ "a.ozder@outlook.com" ]
a.ozder@outlook.com
a482de084bf1d0573d42a4f72c02f7c86ecb3b4f
3c2866bf5d9b5d4b1093a762d732fc8296139886
/src/main/java/org/elasticsearch/transport/support/TransportStreams.java
bcff6c71759c97c0e92524ea5ea305e66940f546
[ "Apache-2.0" ]
permissive
oopos/elasticsearch
06eb2b74f294b5f6a30f463c19837fa162f155cd
8d1e04a973a1d104251fead938c9f85f36ba6694
refs/heads/master
2021-01-15T17:46:43.396014
2012-07-05T23:01:18
2012-07-05T23:01:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,380
java
/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch 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.elasticsearch.transport.support; import org.elasticsearch.common.compress.CompressorFactory; import org.elasticsearch.common.io.stream.CachedStreamOutput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.transport.TransportRequestOptions; import org.elasticsearch.transport.TransportResponseOptions; import java.io.IOException; /** * */ public class TransportStreams { public static final int HEADER_SIZE = 4 + 8 + 1; public static final byte[] HEADER_PLACEHOLDER = new byte[HEADER_SIZE]; public static void writeHeader(byte[] data, int dataLength, long requestId, byte status) { writeInt(data, 0, dataLength - 4); // no need for the header, already there writeLong(data, 4, requestId); data[12] = status; } // same as writeLong in StreamOutput private static void writeLong(byte[] buffer, int offset, long value) { buffer[offset++] = ((byte) (value >> 56)); buffer[offset++] = ((byte) (value >> 48)); buffer[offset++] = ((byte) (value >> 40)); buffer[offset++] = ((byte) (value >> 32)); buffer[offset++] = ((byte) (value >> 24)); buffer[offset++] = ((byte) (value >> 16)); buffer[offset++] = ((byte) (value >> 8)); buffer[offset] = ((byte) (value)); } // same as writeInt in StreamOutput private static void writeInt(byte[] buffer, int offset, int value) { buffer[offset++] = ((byte) (value >> 24)); buffer[offset++] = ((byte) (value >> 16)); buffer[offset++] = ((byte) (value >> 8)); buffer[offset] = ((byte) (value)); } private static final byte STATUS_REQRES = 1 << 0; private static final byte STATUS_ERROR = 1 << 1; private static final byte STATUS_COMPRESS = 1 << 2; public static boolean statusIsRequest(byte value) { return (value & STATUS_REQRES) == 0; } public static byte statusSetRequest(byte value) { value &= ~STATUS_REQRES; return value; } public static byte statusSetResponse(byte value) { value |= STATUS_REQRES; return value; } public static boolean statusIsError(byte value) { return (value & STATUS_ERROR) != 0; } public static byte statusSetError(byte value) { value |= STATUS_ERROR; return value; } public static boolean statusIsCompress(byte value) { return (value & STATUS_COMPRESS) != 0; } public static byte statusSetCompress(byte value) { value |= STATUS_COMPRESS; return value; } public static void buildRequest(CachedStreamOutput.Entry cachedEntry, final long requestId, final String action, final Streamable message, TransportRequestOptions options) throws IOException { byte status = 0; status = TransportStreams.statusSetRequest(status); if (options.compress()) { status = TransportStreams.statusSetCompress(status); cachedEntry.bytes().write(HEADER_PLACEHOLDER); StreamOutput stream = cachedEntry.handles(CompressorFactory.defaultCompressor()); stream.writeUTF(action); message.writeTo(stream); stream.close(); } else { StreamOutput stream = cachedEntry.handles(); cachedEntry.bytes().write(HEADER_PLACEHOLDER); stream.writeUTF(action); message.writeTo(stream); stream.close(); } TransportStreams.writeHeader(cachedEntry.bytes().underlyingBytes(), cachedEntry.bytes().size(), requestId, status); } public static void buildResponse(CachedStreamOutput.Entry cachedEntry, final long requestId, Streamable message, TransportResponseOptions options) throws IOException { byte status = 0; status = TransportStreams.statusSetResponse(status); if (options.compress()) { status = TransportStreams.statusSetCompress(status); cachedEntry.bytes().write(HEADER_PLACEHOLDER); StreamOutput stream = cachedEntry.handles(CompressorFactory.defaultCompressor()); message.writeTo(stream); stream.close(); } else { StreamOutput stream = cachedEntry.handles(); cachedEntry.bytes().write(HEADER_PLACEHOLDER); message.writeTo(stream); stream.close(); } TransportStreams.writeHeader(cachedEntry.bytes().underlyingBytes(), cachedEntry.bytes().size(), requestId, status); } }
[ "kimchy@gmail.com" ]
kimchy@gmail.com
c5af93596e97e7164d9cf92e205b243ebf6fca23
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-with-gradle-20191031-2200/src/main/java/kr/co/popone/fitts/feature/event/EventShopWebActivity$onCreate$3.java
eb656e19d0f27b27f38ff06baa0415ee7e4606f7
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
603
java
package kr.co.popone.fitts.feature.event; import android.view.View; import android.view.View.OnClickListener; import kr.co.popone.fitts.C0001R$anim; final class EventShopWebActivity$onCreate$3 implements OnClickListener { final /* synthetic */ EventShopWebActivity this$0; EventShopWebActivity$onCreate$3(EventShopWebActivity eventShopWebActivity) { this.this$0 = eventShopWebActivity; } public final void onClick(View view) { this.this$0.finish(); this.this$0.overridePendingTransition(C0001R$anim.fade_in, C0001R$anim.slide_down); } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
c71036d7ba1ee8c0441e23064cf1a2b588c2a41a
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
b05d270bcf33d7a0217da89fce62db6bfa9970a1
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
4,122
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.component.bean; import java.util.Map; import org.apache.camel.CamelExecutionException; import org.apache.camel.ContextTestSupport; import org.apache.camel.ExpressionEvaluationException; import org.apache.camel.TestSupport; import org.apache.camel.TypeConversionException; import org.junit.Assert; import org.junit.Test; /** * */ public class BeanParameterInvalidValueTest extends ContextTestSupport { @Test public void testBeanParameterInvalidValueA() throws Exception { getMockEndpoint("mock:result").expectedMessageCount(0); try { template.sendBody("direct:a", "World"); Assert.fail("Should have thrown exception"); } catch (CamelExecutionException e) { TypeConversionException cause = TestSupport.assertIsInstanceOf(TypeConversionException.class, e.getCause().getCause()); Assert.assertEquals(String.class, cause.getFromType()); Assert.assertEquals(int.class, cause.getToType()); Assert.assertEquals("A", cause.getValue()); } assertMockEndpointsSatisfied(); } @Test public void testBeanParameterInvalidValueB() throws Exception { getMockEndpoint("mock:result").expectedMessageCount(0); try { template.sendBody("direct:b", "World"); Assert.fail("Should have thrown exception"); } catch (CamelExecutionException e) { TypeConversionException cause = TestSupport.assertIsInstanceOf(TypeConversionException.class, e.getCause().getCause()); Assert.assertEquals(String.class, cause.getFromType()); Assert.assertEquals(int.class, cause.getToType()); Assert.assertEquals("true", cause.getValue()); } assertMockEndpointsSatisfied(); } @Test public void testBeanParameterNullC() throws Exception { // should be an empty string getMockEndpoint("mock:result").expectedBodiesReceived(""); template.sendBody("direct:c", "World"); assertMockEndpointsSatisfied(); } @Test public void testBeanParameterInvalidValueD() throws Exception { getMockEndpoint("mock:result").expectedMessageCount(0); try { template.sendBody("direct:d", "World"); Assert.fail("Should have thrown exception"); } catch (CamelExecutionException e) { ExpressionEvaluationException cause = TestSupport.assertIsInstanceOf(ExpressionEvaluationException.class, e.getCause()); Assert.assertTrue(cause.getCause().getMessage().startsWith("Unknown function: xxx at location 0")); } assertMockEndpointsSatisfied(); } public static class MyBean { public String echo(String body, int times) { if (body == null) { // use an empty string for no body return ""; } if (times > 0) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < times; i++) { sb.append(body); } return sb.toString(); } return body; } public String heads(String body, Map<?, ?> headers) { return ((headers.get("hello")) + " ") + body; } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
92fb3f41c817ec214305401d5ed622c947a35dcf
dc0beecadd0404435e6fea1a49f2014f85b4c004
/src/net/ion/framework/res/Message.java
36eb5b3c28e373969495e7594765686c196a291a
[]
no_license
bleujin/ionframework
6295ef747429b6d80b52c5372f54ad0aff461f43
bf1c5c5a2d46985a81114a9578adfb5823887350
refs/heads/master
2022-11-20T10:53:20.831425
2016-10-10T07:14:41
2016-10-10T07:14:41
1,971,241
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package net.ion.framework.res; public class Message { private String key; private String value; public void setKey(String key) { this.key = key; } public String getKey() { return this.key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
90e19c31cd7baee5a82b381da6fcd43737830640
377e5e05fb9c6c8ed90ad9980565c00605f2542b
/.gitignore/bin/ext-content/bmecat/src/de/hybris/platform/bmecat/parser/taglistener/SimpleValueTagListener.java
cf3d50160045f833947c42b369bc6c9c59e056ad
[]
no_license
automaticinfotech/HybrisProject
c22b13db7863e1e80ccc29774f43e5c32e41e519
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
refs/heads/master
2021-07-20T18:41:04.727081
2017-10-30T13:24:11
2017-10-30T13:24:11
108,957,448
0
0
null
null
null
null
UTF-8
Java
false
false
1,762
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. * * */ package de.hybris.platform.bmecat.parser.taglistener; import de.hybris.bootstrap.xml.TagListener; import de.hybris.platform.bmecat.parser.BMECatObjectProcessor; import java.util.HashMap; import java.util.Map; /** * Parses the &lt;SimpleValue&gt; tag * * */ public abstract class SimpleValueTagListener extends DefaultBMECatTagListener { public final static String UNSPECIFIED_TYPE = "unspecified"; private final String tagName; private final boolean typed; public SimpleValueTagListener(final TagListener parent, final String tagName) { this(parent, tagName, false); } public SimpleValueTagListener(final TagListener parent, final String tagName, final boolean typed) { super(parent); if (tagName == null) { throw new IllegalArgumentException("TagName can not be null!"); } this.tagName = tagName; this.typed = typed; } public String getTagName() { return tagName; } /** * @return Returns the typed. */ public boolean isTyped() { return typed; } public abstract Object getValue(); @Override public Object processEndElement(final BMECatObjectProcessor processor) { if (isTyped()) { final Map values = new HashMap(); //TODO: hack! values.put(getAttribute("type") == null ? UNSPECIFIED_TYPE : getAttribute("type"), getValue()); return values; } else { return getValue(); } } }
[ "santosh.kshirsagar@automaticinfotech.com" ]
santosh.kshirsagar@automaticinfotech.com
347bc32f2a337d82174489020487aa87455a86b7
610c710ce76b653a9ed65bf2e911cd42d3b877c6
/backend/src/main/java/edu/cad/study/curriculum/CurriculumRepositoryWrapper.java
d80a7ed0e819957b926cb2ed668f7091682b3f67
[]
no_license
buhaiovos/documentation2
a9c61268218e385f04531ae790eee87f0d6b28fe
b67e540233154d80cb76386a98f64ceb92f6fb4b
refs/heads/master
2023-04-28T00:20:26.008031
2021-06-24T13:57:19
2021-06-24T13:57:19
141,030,701
0
0
null
2023-04-26T10:56:17
2018-07-15T13:45:52
Java
UTF-8
Java
false
false
826
java
package edu.cad.study.curriculum; import edu.cad.entities.Curriculum; import edu.cad.study.YearAwareRepositoryWrapper; import edu.cad.year.YearProvider; import org.springframework.stereotype.Component; import java.util.List; @Component public class CurriculumRepositoryWrapper extends YearAwareRepositoryWrapper<Curriculum, Integer> { private static final String CURRICULUM = "curriculum"; private CurriculumRepository repo; private YearProvider yearProvider; public CurriculumRepositoryWrapper(CurriculumRepository repo, YearProvider yearProvider) { super(repo, yearProvider); this.repo = repo; this.yearProvider = yearProvider; } @Override public List<Curriculum> findAll() { return repo.findAllByTypeAndYear(CURRICULUM, yearProvider.getCurrent()); } }
[ "oleksandr.buhaiov@gmail.com" ]
oleksandr.buhaiov@gmail.com
a29c43ec752f66eaf9831fcd212091f10ed49405
42590d6f000fe2a0826c52137c602c4834b41df0
/src/com/cn/control/xiaoshouframe/guketuihuo/KeHuChaZhaoSureAction.java
2c8669d48d91657d55ec3b499e5b40cbed1badae
[]
no_license
Orangeletbear/supsellMS
74090b4fbfb018e76e80a6b61bc265f0a4ef3496
d16765ee4e44783f1d67257fd96453f32722a2d3
refs/heads/master
2020-06-07T17:39:35.485413
2019-06-21T08:50:19
2019-06-21T08:50:19
193,064,428
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package com.cn.control.xiaoshouframe.guketuihuo; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JTable; import com.cn.control.xiaoshouframe.xiaoshoudanjuchaxun.ChaZhaoKeHuButtonAction; import com.cn.view.xiaoshouJFrame.guketuihuo.dialog.GaoJiChaXun; import com.cn.view.xiaoshouJFrame.xiaoshoudanjuchaxun.AllKeHuDialog; import com.cn.view.xiaoshouJFrame.xiaoshoudanjuchaxun.ChaZhaoDialog; public class KeHuChaZhaoSureAction implements ActionListener { private AllKeHuDialog dialog; private static ChaZhaoDialog mainDialog = ChaZhaoKeHuButtonAction.getDialog(); public KeHuChaZhaoSureAction(AllKeHuDialog dialog){ this.dialog = dialog; } public void actionPerformed(ActionEvent e) { JTable table = dialog.getKeHuTable(); int row = table.getSelectedRow(); String keHuName = (String) table.getValueAt(row, 1); mainDialog.getKeHuName().setText(keHuName); dialog.dispose(); } }
[ "1471755989@qq.com" ]
1471755989@qq.com
280073fce838905b36ca83e4751fcee7df83f737
7b4fd58090aa7013137ba2734d7f256b812861e1
/src/Ellias/rm/com/tencent/tmassistantsdk/selfUpdateSDK/h.java
1e0f9ed582c395e570928b1bbe86e4cdbec1e846
[]
no_license
daihuabin/Ellias
e37798a6a2e63454f80de512319ece885b6a2237
fd010991a5677e6aa104b927b82fc3d6da801887
refs/heads/master
2023-03-16T21:12:33.908495
2020-02-10T15:42:22
2020-02-10T15:42:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
java
package com.tencent.tmassistantsdk.selfUpdateSDK; import android.os.Handler; import com.tencent.tmassistantsdk.c.b; import com.tencent.tmassistantsdk.c.c; import com.tencent.tmassistantsdk.g.l; import com.tencent.tmassistantsdk.protocol.jce.UpdateInfoLog; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Iterator; class h implements b { h(TMSelfUpdateSDK paramTMSelfUpdateSDK) { } public void a(c paramc) { this.a.onStateChanged(2, -16, "SelfUpdate DwonloadSDKServiceInvalid!"); } public void a(c paramc, String paramString1, int paramInt1, int paramInt2, String paramString2) { l.b("SelfUpdateSDK", "mClientSDKListener.OnDownloadSDKTaskStateChanged,clientKey:" + paramc + ",state:" + paramInt1 + ",url:" + paramString1); if (paramInt1 == 2) this.a.onStateChanged(1, 0, "SelfUpdate DownloadSDKTaskState_DOWNLOADING!"); do { return; if (paramInt1 != 4) continue; UpdateInfoLog localUpdateInfoLog = com.tencent.tmassistantsdk.d.i.g().a(this.a.hostPackageName, this.a.mAppId); localUpdateInfoLog.updateType = this.a.updateType; localUpdateInfoLog.actionCode = 102; localUpdateInfoLog.yybExistFlag = 0; com.tencent.tmassistantsdk.d.i.g().a(localUpdateInfoLog); this.a.mSDKHandler.post(new i(this, paramString1, paramInt1)); return; } while (paramInt1 != 5); this.a.onStateChanged(2, -17, "mClientSDKListener,OnDownloadSDKTaskStateChanged,DownloadSDKTaskState_FAILED!"); } public void a(c paramc, String paramString, long paramLong1, long paramLong2) { Iterator localIterator = this.a.mWeakListenerArrayList.iterator(); while (localIterator.hasNext()) { ITMSelfUpdateSDKListener localITMSelfUpdateSDKListener = (ITMSelfUpdateSDKListener)((WeakReference)localIterator.next()).get(); if (localITMSelfUpdateSDKListener == null) l.b("SelfUpdateSDK", "OnDownloadSDKTaskProgressChanged listener = null"); localITMSelfUpdateSDKListener.OnDownloadAppProgressChanged(paramLong1, paramLong2); } } } /* Location: D:\rm_src\classes_dex2jar\ * Qualified Name: com.tencent.tmassistantsdk.selfUpdateSDK.h * JD-Core Version: 0.6.0 */
[ "sevarsti@sina.com" ]
sevarsti@sina.com
354f8f22be556ad03680cb8f053ebbc2c975442c
164fa61cfbc89a8e3e22f5c102d1d62f9046dea3
/src/cn/codercheng/source/java/io/BufferedWriter.java
39b34a85a21ee704b291bf237844fbc1917012c8
[]
no_license
codeChengWenY/JavaSourceLearn
1426723baceeb0db57d0533f2d74f186809a93f8
d36d2f98527d3abc9985f34c78a5f776e6cf60ed
refs/heads/master
2022-12-05T06:52:26.969508
2020-08-14T06:36:43
2020-08-14T06:36:43
287,459,086
0
0
null
null
null
null
UTF-8
Java
false
false
8,153
java
/* * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.io; /** * Writes text to a character-output stream, buffering characters so as to * provide for the efficient writing of single characters, arrays, and strings. * * <p> The buffer size may be specified, or the default size may be accepted. * The default is large enough for most purposes. * * <p> A newLine() method is provided, which uses the platform's own notion of * line separator as defined by the system property <tt>line.separator</tt>. * Not all platforms use the newline character ('\n') to terminate lines. * Calling this method to terminate each output line is therefore preferred to * writing a newline character directly. * * <p> In general, a Writer sends its output immediately to the underlying * character or byte stream. Unless prompt output is required, it is advisable * to wrap a BufferedWriter around any Writer whose write() operations may be * costly, such as FileWriters and OutputStreamWriters. For example, * * <pre> * PrintWriter out * = new PrintWriter(new BufferedWriter(new FileWriter("foo.out"))); * </pre> * * will buffer the PrintWriter's output to the file. Without buffering, each * invocation of a print() method would cause characters to be converted into * bytes that would then be written immediately to the file, which can be very * inefficient. * * @see PrintWriter * @see FileWriter * @see OutputStreamWriter * @see java.nio.file.Files#newBufferedWriter * * @author Mark Reinhold * @since JDK1.1 */ public class BufferedWriter extends Writer { private Writer out; private char cb[]; private int nChars, nextChar; private static int defaultCharBufferSize = 8192; /** * Line separator string. This is the value of the line.separator * property at the moment that the stream was created. */ private String lineSeparator; /** * Creates a buffered character-output stream that uses a default-sized * output buffer. * * @param out A Writer */ public BufferedWriter(Writer out) { this(out, defaultCharBufferSize); } /** * Creates a new buffered character-output stream that uses an output * buffer of the given size. * * @param out A Writer * @param sz Output-buffer size, a positive integer * * @exception IllegalArgumentException If {@code sz <= 0} */ public BufferedWriter(Writer out, int sz) { super(out); if (sz <= 0) throw new IllegalArgumentException("Buffer size <= 0"); this.out = out; cb = new char[sz]; nChars = sz; nextChar = 0; lineSeparator = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("line.separator")); } /** Checks to make sure that the stream has not been closed */ private void ensureOpen() throws IOException { if (out == null) throw new IOException("Stream closed"); } /** * Flushes the output buffer to the underlying character stream, without * flushing the stream itself. This method is non-private only so that it * may be invoked by PrintStream. */ void flushBuffer() throws IOException { synchronized (lock) { ensureOpen(); if (nextChar == 0) return; out.write(cb, 0, nextChar); nextChar = 0; } } /** * Writes a single character. * * @exception IOException If an I/O error occurs */ public void write(int c) throws IOException { synchronized (lock) { ensureOpen(); if (nextChar >= nChars) flushBuffer(); cb[nextChar++] = (char) c; } } /** * Our own little min method, to avoid loading java.lang.Math if we've run * out of file descriptors and we're trying to print a stack trace. */ private int min(int a, int b) { if (a < b) return a; return b; } /** * Writes a portion of an array of characters. * * <p> Ordinarily this method stores characters from the given array into * this stream's buffer, flushing the buffer to the underlying stream as * needed. If the requested length is at least as large as the buffer, * however, then this method will flush the buffer and write the characters * directly to the underlying stream. Thus redundant * <code>BufferedWriter</code>s will not copy data unnecessarily. * * @param cbuf A character array * @param off Offset from which to start reading characters * @param len Number of characters to write * * @exception IOException If an I/O error occurs */ public void write(char cbuf[], int off, int len) throws IOException { synchronized (lock) { ensureOpen(); if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return; } if (len >= nChars) { /* If the request length exceeds the size of the output buffer, flush the buffer and then write the data directly. In this way buffered streams will cascade harmlessly. */ flushBuffer(); out.write(cbuf, off, len); return; } int b = off, t = off + len; while (b < t) { int d = min(nChars - nextChar, t - b); System.arraycopy(cbuf, b, cb, nextChar, d); b += d; nextChar += d; if (nextChar >= nChars) flushBuffer(); } } } /** * Writes a portion of a string. * * <p> If the value of the <tt>len</tt> parameter is negative then no * characters are written. This is contrary to the specification of this * method in the {@linkplain java.io.Writer#write(java.lang.String,int,int) * superclass}, which requires that an {@link IndexOutOfBoundsException} be * thrown. * * @param s string to be written * @param off Offset from which to start reading characters * @param len Number of characters to be written * * @exception IOException If an I/O error occurs */ public void write(String s, int off, int len) throws IOException { synchronized (lock) { ensureOpen(); int b = off, t = off + len; while (b < t) { int d = min(nChars - nextChar, t - b); s.getChars(b, b + d, cb, nextChar); b += d; nextChar += d; if (nextChar >= nChars) flushBuffer(); } } } /** * Writes a line separator. The line separator string is defined by the * system property <tt>line.separator</tt>, and is not necessarily a single * newline ('\n') character. * * @exception IOException If an I/O error occurs */ public void newLine() throws IOException { write(lineSeparator); } /** * Flushes the stream. * * @exception IOException If an I/O error occurs */ public void flush() throws IOException { synchronized (lock) { flushBuffer(); out.flush(); } } @SuppressWarnings("try") public void close() throws IOException { synchronized (lock) { if (out == null) { return; } try (Writer w = out) { flushBuffer(); } finally { out = null; cb = null; } } } }
[ "1042732167@qq.com" ]
1042732167@qq.com
4b3988e6776a1048564b002496f6bc74cb9f3058
d8d2e5b940bfa0d2667228a32a7a2778d3d523af
/mycellar-java/mycellar-interfaces/mycellar-interface-client-web/src/main/java/fr/peralta/mycellar/interfaces/client/web/components/stock/multiple/CellarMultiplePanel.java
dada18cdf16f9d3cdc2c1c6f9c8bbc6a2f250531
[]
no_license
framiere/mycellar
1143cc284c3b096d38f8c357355cc5a610de52ee
e206a8971f7b0988cf55aa70faba338b71634e99
refs/heads/master
2021-01-18T05:49:38.152662
2012-12-23T07:03:29
2012-12-23T07:03:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,033
java
/* * Copyright 2011, MyCellar * * This file is part of MyCellar. * * MyCellar is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * MyCellar 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 MyCellar. If not, see <http://www.gnu.org/licenses/>. */ package fr.peralta.mycellar.interfaces.client.web.components.stock.multiple; import java.util.Map; import org.apache.wicket.model.IModel; import org.apache.wicket.spring.injection.annot.SpringBean; import fr.peralta.mycellar.domain.shared.repository.CountEnum; import fr.peralta.mycellar.domain.shared.repository.SearchForm; import fr.peralta.mycellar.domain.stock.Cellar; import fr.peralta.mycellar.interfaces.client.web.components.shared.multiple.MultiplePanel; import fr.peralta.mycellar.interfaces.facades.stock.StockServiceFacade; /** * @author speralta */ public class CellarMultiplePanel extends MultiplePanel<Cellar> { private static final long serialVersionUID = 201109272049L; @SpringBean private StockServiceFacade stockServiceFacade; private final IModel<SearchForm> searchFormModel; private final CountEnum count; /** * @param id * @param searchFormModel * @param count */ public CellarMultiplePanel(String id, IModel<SearchForm> searchFormModel, CountEnum count) { super(id); this.searchFormModel = searchFormModel; this.count = count; } /** * {@inheritDoc} */ @Override protected Map<Cellar, Long> getData() { return stockServiceFacade.getCellars(searchFormModel.getObject(), count); } }
[ "sebastien@peralta.fr" ]
sebastien@peralta.fr
f67ee48f75c9acb0a3faacb8f1e93af5d59ccb51
e08314b8c22df72cf3aa9e089624fc511ff0d808
/src/selfdefine/com/ces/component/tcszzflda/action/TcszzfldaController.java
2f344c7bcdcdcc919cdccf4f0ff2b46d40e45b35
[]
no_license
quxiongwei/qhzyc
46acd4f6ba41ab3b39968071aa114b24212cd375
4b44839639c033ea77685b98e65813bfb269b89d
refs/heads/master
2020-12-02T06:38:21.581621
2017-07-12T02:06:10
2017-07-12T02:06:10
96,864,946
0
3
null
null
null
null
UTF-8
Java
false
false
763
java
package com.ces.component.tcszzflda.action; import com.ces.component.trace.dao.TraceShowModuleDao; import com.ces.component.tcszzflda.service.TcszzfldaService; import com.ces.component.trace.action.base.TraceShowModuleDefineServiceDaoController; import com.ces.xarch.core.entity.StringIDEntity; public class TcszzfldaController extends TraceShowModuleDefineServiceDaoController<StringIDEntity, TcszzfldaService, TraceShowModuleDao> { private static final long serialVersionUID = 1L; /* * (非 Javadoc) * <p>标题: initModel</p> * <p>描述: </p> * @see com.ces.xarch.core.web.struts2.BaseController#initModel() */ @Override protected void initModel() { setModel(new StringIDEntity()); } }
[ "qu.xiongwei@cesgroup.com.cn" ]
qu.xiongwei@cesgroup.com.cn
27a97bf47b3634541365e88e667b803a6937e2fb
af66630bdef2969ea0df431aa86ae1689e03b67f
/app/src/main/java/com/mmy/maimaiyun/data/bean/HomeOnlyNewBean.java
0db93d7617092d4abc5dd79d1a6c0927158246fa
[]
no_license
IkeFan/mymyyun
f58650d9aeab2bab2102eec5137d2081fc3e1bf3
2d76528c51e18d8b36a0e109bd0dbc5275557f52
refs/heads/master
2020-03-29T11:43:23.943929
2018-09-28T03:40:42
2018-09-28T03:40:42
149,867,311
0
0
null
null
null
null
UTF-8
Java
false
false
2,145
java
package com.mmy.maimaiyun.data.bean; import java.util.List; /** * @创建者 lucas * @创建时间 2018/1/17 0017 18:03 * @描述 TODO */ public class HomeOnlyNewBean { /** * id : 11 * pid : 0 * shop_id : 0 * name : 新人特惠 * desc : 新人特惠 * logo : * start_time : 0 * end_time : null * discount : 88 * flash_spec : 2 * goods : [{"id":"391","logo":"http://www.ct1212.com/Public/Uploads/Goods/2017-12-29/5a461c094a16e.jpg", * "shop_id":"0","goods_name":"善味阁鲜卤鸭肫鸭胗190g真空独立小包装休闲零食卤味小吃鸭屯","shop_price":"26.00","market_price":"31.00", * "flashsale_start":"1516896000","flashsale_end":"1517328000"},{"id":"392","logo":"http://www * .ct1212.com/Public/Uploads/Goods/2018-01-03/5a4c93ee93046.jpg","shop_id":"0","goods_name":"善味阁新奥尔良烤鸡腿200g * 办公室休闲零食小吃","shop_price":"20.00","market_price":"24.00","flashsale_start":"1516896000","flashsale_end * ":"1517328000"}] */ public String id; public String pid; public String shop_id; public String name; public String desc; public String logo; public String start_time; public Object end_time; public String discount; public String flash_spec; public List<GoodsBean> goods; public static class GoodsBean { /** * id : 391 * logo : http://www.ct1212.com/Public/Uploads/Goods/2017-12-29/5a461c094a16e.jpg * shop_id : 0 * goods_name : 善味阁鲜卤鸭肫鸭胗190g真空独立小包装休闲零食卤味小吃鸭屯 * shop_price : 26.00 * market_price : 31.00 * flashsale_start : 1516896000 * flashsale_end : 1517328000 */ public String id; public String logo; public String shop_id; public String goods_name; public String shop_price; public String market_price; public String flashsale_start; public String flashsale_end; } }
[ "652918554@qq.com" ]
652918554@qq.com
c7190b8f1ea5ec64a3953015d669d1e90da9e594
bbe7eae301fd2289fad3b62b97a68162c6f71e41
/SpringMvc/src/main/java/com/mnt/erp/dao/PurchaseOrganizationDaoImpl.java
27faa5273d92679ef20c169b88c1fa6154b87d12
[]
no_license
venkateshpavuluri/organization
a083e7d283f5f49f49fbd7c3738c888a95159d9e
0bd0ce4eae6abc6aea7f174f7fbc8b224feada00
refs/heads/master
2021-01-19T20:18:36.911359
2014-06-14T10:55:54
2014-06-14T10:55:54
20,830,205
1
0
null
null
null
null
UTF-8
Java
false
false
7,166
java
/* * @Copyright MNTSOFT * */ package com.mnt.erp.dao; import java.io.Serializable; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import org.hibernate.HibernateException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.orm.hibernate3.HibernateCallback; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import com.mnt.erp.bean.OrgPlants; import com.mnt.erp.bean.PurOrgCompany; import com.mnt.erp.bean.PurOrgPlant; import com.mnt.erp.bean.PurchaseOrganization; import com.mnt.erp.service.AuditLogService; /** * * @Author parvathi * @Version 1.0 * @Batch 0.0 */ public class PurchaseOrganizationDaoImpl extends HibernateDaoSupport implements PurchaseOrganizationDao { @Autowired AuditLogService auditLogService; List<Object[]> list = null; String msg = null; public String savePurchaseOrganization(Object object, String userId, String userName) { try { PurchaseOrganization purchaseOrganization = (PurchaseOrganization) object; Serializable id = getHibernateTemplate().save(purchaseOrganization); if (id != null) { Date date = new Date(); String modifiedDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss").format(date); auditLogService.setAuditLogSave(userId, "A", "Purchase Organization", "ROW", String.valueOf(id), "1", modifiedDate, userName); msg = "S"; } } catch (Exception e) { msg = "F"; e.printStackTrace(); } return msg; } public List<Object[]> searchPurchaseOrganization() { try { String hql = "from PurchaseOrganization p order by p.purOrg"; list = getHibernateTemplate().find(hql); } catch (Exception e) { e.printStackTrace(); } return list; } public List<OrgPlants> selectPlants(String orgId){ //List<Object[]> listFinal = new ArrayList<Object[]>(list); List<OrgPlants> list2 = null; Iterator<Object[]> iterator = null; OrgPlants orgplant=null; //List<Object> list = null; try { list2=new ArrayList<OrgPlants>(); if(!orgId.equals("null")){ for (String retval: orgId.split(",")){ int orgIds=Integer.parseInt(retval); String hql = "select p.plantId,p.plantName from Plant p where p.orgId=" + orgIds + ""; list = getHibernateTemplate().find(hql); iterator = list.iterator(); orgplant=new OrgPlants(); while (iterator.hasNext()) { Object[] object = (Object[]) iterator.next(); orgplant.setPlantId((Integer)object[0]); orgplant.setPlantName((String)object[1]); list2.add(orgplant); } } } } catch (Exception e) { e.printStackTrace(); } return list2; } public List<PurchaseOrganization> editPurchaseOrganizationWithId(int id) { List<PurchaseOrganization> objects = null; try { String sql = "from PurchaseOrganization po where po.purOrg_Id=" + id + ""; objects = getHibernateTemplate().find(sql); } catch (Exception e) { e.printStackTrace(); } return objects; } public String updatePurchaseOrganization(Object object) { List<PurOrgCompany> list2 = null; List<PurOrgPlant> list3 = null; PurOrgPlant pp1 = null; PurOrgCompany pc = null; Iterator<PurOrgCompany> iterator1 = null; PurOrgCompany purOrgCompany = null; PurOrgPlant pp = null; Iterator<PurOrgPlant> iterator2 = null; try { PurchaseOrganization pg = (PurchaseOrganization) object; int id = pg.getPurOrg_Id(); PurchaseOrganization po = (PurchaseOrganization) getHibernateTemplate() .get(PurchaseOrganization.class, id); list2 = po.getPurOrgCompany(); list3 = po.getPurOrgPlants(); iterator1 = list2.iterator(); while (iterator1.hasNext()) { purOrgCompany = (PurOrgCompany) iterator1.next(); pc = new PurOrgCompany(); pc.setPurOrgCompany_Id(purOrgCompany.getPurOrgCompany_Id()); getHibernateTemplate().delete(pc); } iterator2 = list3.iterator(); while (iterator2.hasNext()) { pp = (PurOrgPlant) iterator2.next(); pp1 = new PurOrgPlant(); pp1.setPurOrgPlant_Id(pp.getPurOrgPlant_Id()); getHibernateTemplate().delete(pp1); } // Integer[] plant=pg.getPlantId(); getHibernateTemplate().update(pg); msg = "S"; } catch (Exception e) { msg = "F"; e.printStackTrace(); } return msg; } public String deletePurchaseOrganization(int id) { String msg = null; PurchaseOrganization po = null; try { // po=(PurchaseOrganization)getHibernateTemplate().get(PurchaseOrganization.class,id); po = new PurchaseOrganization(); po.setPurOrg_Id(id); getHibernateTemplate().delete(po); msg = "S"; } catch (Exception e) { msg = "F"; e.printStackTrace(); } return msg; } public int purchaseOrganizationDuplicate(String purOrg) { Long count = null; try { final String hql = "select count(*) from PurchaseOrganization p where p.purOrg='" + purOrg + "'"; count = (Long) getHibernateTemplate().execute( new HibernateCallback<Object>() { public Object doInHibernate( org.hibernate.Session session) throws HibernateException, SQLException { // TODO Auto-generated method stub org.hibernate.Query query = session .createQuery(hql); query.setMaxResults(1); return query.uniqueResult(); } }); } catch (Exception e) { e.printStackTrace(); } return count.intValue(); } public int purchaseOrganizationEditDuplicate(String purOrg, int id) { Long count = null; try { final String hql = "select count(*) from PurchaseOrganization p where p.purOrg='" + purOrg + "'and p.purOrg_Id!='" + id + "'"; count = (Long) getHibernateTemplate().execute( new HibernateCallback<Object>() { public Object doInHibernate( org.hibernate.Session session) throws HibernateException, SQLException { // TODO Auto-generated method stub org.hibernate.Query query = session .createQuery(hql); query.setMaxResults(1); return query.uniqueResult(); } }); } catch (Exception e) { e.printStackTrace(); } return count.intValue(); } @Override public List<Object[]> basicSearchPurchaseOrganization(String label, String operator, String searchName) { try { String hql = "from PurchaseOrganization po where po." + label + "" + operator + " ? ORDER BY po.purOrg"; Object[] parameters = { searchName }; list = getHibernateTemplate().find(hql, parameters); } catch (Exception e) { e.printStackTrace(); } return list; } public List<Object[]> selectPurchaseOrg() { // TODO Auto-generated method stub String hql = "select po.purOrg_Id,po.purOrg from PurchaseOrganization po "; List<Object[]> list = getHibernateTemplate().find(hql); return list; } }
[ "pavuluri.venki@gmail.com" ]
pavuluri.venki@gmail.com
374a2d9b72c7d5789758a6a2343d1e2dcc4ae6ed
edd48b650e95b79f3023e8941e8a8d9808280bc9
/modules/jooby-spec/src/test/java/org/jooby/internal/spec/DocApp.java
28b9fa46bb280b11f3975e92b68c84f32100d221
[ "Apache-2.0" ]
permissive
auxiliaire/jooby
579f59153baebbf460c221072c24777dd97a1667
49c0a1dbd30b2b17717192a5e3410486f33e67de
refs/heads/master
2021-04-27T10:39:38.210065
2018-02-22T14:50:46
2018-02-22T14:50:46
122,543,603
0
0
Apache-2.0
2018-02-22T22:35:47
2018-02-22T22:35:46
null
UTF-8
Java
false
false
2,526
java
package org.jooby.internal.spec; import java.util.List; import org.jooby.Jooby; import org.jooby.Results; import org.jooby.spec.RouteProcessor; import org.jooby.spec.RouteSpec; import org.junit.Test; import apps.DB; import apps.model.Pet; public class DocApp extends Jooby { { /** * Everything about your Pets. */ use("/api/pets") /** * List pets ordered by name. * * @param start Start offset, useful for paging. Default is <code>0</code>. * @param max Max page size, useful for paging. Default is <code>200</code>. * @return Pets ordered by name. */ .get(req -> { int start = req.param("start").intValue(0); int max = req.param("max").intValue(200); DB db = req.require(DB.class); List<Pet> pets = db.findAll(Pet.class, start, max); return pets; }) /** * Find pet by ID * * @param id Pet ID. * @return Returns <code>200</code> with a single pet or <code>404</code> */ .get("/:id", req -> { int id = req.param("id").intValue(); DB db = req.require(DB.class); Pet pet = db.find(Pet.class, id); return pet; }) /** * Add a new pet to the store. * * @param body Pet object that needs to be added to the store. * @return Returns a saved pet. */ .post(req -> { Pet pet = req.body().to(Pet.class); DB db = req.require(DB.class); db.save(pet); return pet; }) /** * Update an existing pet. * * @param body Pet object that needs to be updated. * @return Returns a saved pet. */ .put(req -> { Pet pet = req.body().to(Pet.class); DB db = req.require(DB.class); db.save(pet); return pet; }) /** * Deletes a pet by ID. * * @param id Pet ID. * @return A <code>204</code> */ .delete("/:id", req -> { int id = req.param("id").intValue(); DB db = req.require(DB.class); db.delete(Pet.class, id); return Results.noContent(); }) .produces("json") .consumes("json"); } @Test public void check() throws Exception { List<RouteSpec> specs1 = new RouteProcessor().process(new DocApp()); specs1.forEach(System.out::println); } }
[ "espina.edgar@gmail.com" ]
espina.edgar@gmail.com
1fbec6bd1315f38d6e3cf0eecde1af8815a1bdfb
cb1472ab86e4f4772c7dcef823c7f6d9495a9434
/lib_base/src/main/java/cn/cqs/baselib/skin/config/SkinConfig.java
8b0fa29785a00a398b10b5449bba84760b5011c5
[]
no_license
bingoloves/common
2176cb8966b6c374c666559db04ff6799a2f4eb5
439effd04319156f62b72b5cd48ff4f7bba2f1ee
refs/heads/main
2023-02-01T10:00:09.356178
2020-12-21T06:24:36
2020-12-21T06:24:36
321,214,614
0
0
null
null
null
null
UTF-8
Java
false
false
1,233
java
package cn.cqs.baselib.skin.config; import android.content.Context; import cn.cqs.baselib.skin.util.PreferencesUtils; public class SkinConfig { public static final String NAMESPACE = "http://schemas.android.com/android/skin"; public static final String SKIN_SUFFIX = ".theme"; public static final String SKIN_FOLER_NAME = "skin"; public static final String PREF_CUSTOM_SKIN_PATH = "skin_custom_path"; public static final String DEFALT_SKIN = "skin_default"; public static final String SKIN_FROM = "skin_from"; public static final int FROM_INTERNAL = 0; public static final int FROM_EXTERNAL = 1; public static final String ATTR_SKIN_ENABLE = "enable"; /** * get path of last skin package path * @param context * @return path of skin package */ public static String getCustomSkinPath(Context context){ return PreferencesUtils.getString(context, PREF_CUSTOM_SKIN_PATH, DEFALT_SKIN); } public static void saveSkinPath(Context context, String path){ PreferencesUtils.putString(context, PREF_CUSTOM_SKIN_PATH, path); } public static boolean isDefaultSkin(Context context){ return DEFALT_SKIN.equals(getCustomSkinPath(context)); } }
[ "657952166@qq.com" ]
657952166@qq.com
f342a1c47a2a290268d891df559d55bc8c837f8c
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/xweb/x5/X5WebFactory.java
88f043b5f8274b2b3aed2cce6af4afbe3d244cf4
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
4,730
java
package com.tencent.xweb.x5; import android.content.Context; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.smtt.sdk.QbSdk; import com.tencent.smtt.sdk.X5JsCore; import com.tencent.smtt.utils.TbsLog; import com.tencent.xweb.WebView; import com.tencent.xweb.WebView.c; import com.tencent.xweb.c.b.a; import com.tencent.xweb.c.b.b; import com.tencent.xweb.c.k.a; import com.tencent.xweb.i.a; import com.tencent.xweb.x5.sdk.i; import org.xwalk.core.Log; import org.xwalk.core.WebViewExtensionListener; public class X5WebFactory implements k.a { private static final String TAG = "MicroMsg.X5WebFactory"; static X5WebFactory sInstance; public static X5WebFactory getInstance() { AppMethodBeat.i(84869); if (sInstance == null) sInstance = new X5WebFactory(); X5WebFactory localX5WebFactory = sInstance; AppMethodBeat.o(84869); return localX5WebFactory; } public void clearAllWebViewCache(Context paramContext, boolean paramBoolean) { AppMethodBeat.i(84878); QbSdk.clearAllWebViewCache(paramContext, paramBoolean); AppMethodBeat.o(84878); } public com.tencent.xweb.c.h createWebView(WebView paramWebView) { AppMethodBeat.i(84871); paramWebView = new k(paramWebView); AppMethodBeat.o(84871); return paramWebView; } public com.tencent.xweb.c.g createWebviewStorage() { AppMethodBeat.i(84881); j localj = new j(); AppMethodBeat.o(84881); return localj; } public Object excute(String paramString, Object[] paramArrayOfObject) { paramArrayOfObject = null; AppMethodBeat.i(84870); if ((paramString == null) || (paramString.isEmpty())) { AppMethodBeat.o(84870); paramString = paramArrayOfObject; } while (true) { return paramString; if (paramString.equals("STR_CMD_GET_TBS_QBSDK_IMP")) { paramString = new com.tencent.xweb.x5.sdk.e(); AppMethodBeat.o(84870); } else if (paramString.equals("STR_CMD_GET_TBS_DOWNLOADER_IMP")) { paramString = new com.tencent.xweb.x5.sdk.g(); AppMethodBeat.o(84870); } else { AppMethodBeat.o(84870); paramString = paramArrayOfObject; } } } public b.a getCookieManager() { AppMethodBeat.i(84879); d locald = new d(); AppMethodBeat.o(84879); return locald; } public b.b getCookieSyncManager() { AppMethodBeat.i(84880); e locale = new e(); AppMethodBeat.o(84880); return locale; } public com.tencent.xweb.c.f getJsCore(i.a parama, Context paramContext) { AppMethodBeat.i(84874); Object localObject = null; switch (1.izX[parama.ordinal()]) { default: parama = localObject; case 1: } boolean bool; do { AppMethodBeat.o(84874); return parama; bool = X5JsCore.canUseX5JsCore(paramContext); Log.i("MicroMsg.X5WebFactory", "canUseX5JsCore : ".concat(String.valueOf(bool))); parama = localObject; } while (!bool); if (X5JsCore.canUseX5JsCoreNewAPI(paramContext)); for (parama = new h(paramContext); ; parama = new f(paramContext)) { parama.init(0); break; } } public boolean hasInited() { AppMethodBeat.i(84876); boolean bool = X5WebFactory.b.hasInited(); AppMethodBeat.o(84876); return bool; } public boolean hasInitedCallback() { return true; } public void initCallback(WebViewExtensionListener paramWebViewExtensionListener) { } public void initEnviroment(Context paramContext) { AppMethodBeat.i(84873); TbsLog.setTbsLogClient(new X5WebFactory.a(this, paramContext)); AppMethodBeat.o(84873); } public void initInterface() { AppMethodBeat.i(84872); com.tencent.xweb.x5.sdk.d.a(new com.tencent.xweb.x5.sdk.e()); com.tencent.xweb.x5.sdk.f.a(new com.tencent.xweb.x5.sdk.g()); WebView.setX5Interface(new i()); AppMethodBeat.o(84872); } public boolean initWebviewCore(Context paramContext, WebView.c paramc) { AppMethodBeat.i(84875); X5WebFactory.b.a(paramContext, paramc); AppMethodBeat.o(84875); return true; } public boolean isCoreReady() { AppMethodBeat.i(84877); boolean bool = X5WebFactory.b.isCoreReady(); AppMethodBeat.o(84877); return bool; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar * Qualified Name: com.tencent.xweb.x5.X5WebFactory * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
0670a260dd2f0549d2698b146b27151ddeef8dc0
48a2135f2f05fc09c1bc367ef594ee9f704a4289
/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/dedicated/server/OvhSupportLevelEnum.java
74ade2e85eafaeee91dae89213b9dc8f54dae217
[ "BSD-3-Clause" ]
permissive
UrielCh/ovh-java-sdk
913c1fbd4d3ea1ff91de8e1c2671835af67a8134
e41af6a75f508a065a6177ccde9c2491d072c117
refs/heads/master
2022-09-27T11:15:23.115006
2022-09-02T04:41:33
2022-09-02T04:41:33
87,030,166
13
4
BSD-3-Clause
2022-09-02T04:41:34
2017-04-03T01:59:23
Java
UTF-8
Java
false
false
318
java
package net.minidev.ovh.api.dedicated.server; /** * distincts support level */ public enum OvhSupportLevelEnum { critical("critical"), fastpath("fastpath"), gs("gs"), pro("pro"); final String value; OvhSupportLevelEnum(String s) { this.value = s; } public String toString() { return this.value; } }
[ "uriel.chemouni@gmail.com" ]
uriel.chemouni@gmail.com
eb87555443687c609d20b33b067eb532ab1aeb64
d6c041879c662f4882892648fd02e0673a57261c
/com/planet_ink/coffee_mud/Abilities/Druid/Chant_SacredEarth.java
3a7eac64fa6e2e6bcc60509ce712ec2000ef558f
[ "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
6,094
java
package com.planet_ink.coffee_mud.Abilities.Druid; 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.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 2004-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 Chant_SacredEarth extends Chant { @Override public String ID() { return "Chant_SacredEarth"; } private final static String localizedName = CMLib.lang().L("Sacred Earth"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Sacred Earth)"); @Override public String displayText() { return localizedStaticDisplay; } @Override public int classificationCode() { return Ability.ACODE_CHANT | Ability.DOMAIN_ENDURING; } @Override public int abstractQuality() { return Ability.QUALITY_MALICIOUS; } @Override protected int canAffectCode() { return CAN_ROOMS; } @Override protected int canTargetCode() { return 0; } @Override public void unInvoke() { // undo the affects of this spell if((affected==null)||(!(affected instanceof Room))) return; final Room R=(Room)affected; if(canBeUninvoked()) R.showHappens(CMMsg.MSG_OK_VISUAL,L("The sacred earth charm is ended.")); super.unInvoke(); } @Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!super.okMessage(myHost,msg)) return false; if((msg.tool() instanceof Ability) &&((((Ability)msg.tool()).classificationCode()&Ability.ALL_DOMAINS)==Ability.DOMAIN_GATHERINGSKILL) &&(msg.sourceMinor()!=CMMsg.TYP_TEACH)) { msg.source().tell(L("The sacred earth will not allow you to violate it.")); return false; } if((msg.targetMinor()==CMMsg.TYP_DAMAGE) &&(msg.target() instanceof MOB) &&((((MOB)msg.target()).charStats().getMyRace().racialCategory().equals("Vegetation")) ||(((MOB)msg.target()).charStats().getMyRace().racialCategory().equals("Earth Elemental")))) { final int recovery=(int)Math.round(CMath.div((msg.value()),2.0)); msg.setValue(msg.value()-recovery); } return true; } @Override public int castingQuality(final MOB mob, final Physical target) { if(mob!=null) { final Room R=mob.location(); if(R!=null) { if(((R.domainType()&Room.INDOORS)>0) ||CMLib.flags().isWateryRoom(R) ||(R.domainType()==Room.DOMAIN_OUTDOORS_AIR)) return Ability.QUALITY_INDIFFERENT; } if(mob.isInCombat()) { final MOB victim=mob.getVictim(); if(victim!=null) { if(((victim.charStats().getMyRace().racialCategory().equals("Vegetation")) ||(victim.charStats().getMyRace().racialCategory().equals("Earth Elemental")))) return Ability.QUALITY_INDIFFERENT; } if(((!mob.charStats().getMyRace().racialCategory().equals("Vegetation")) &&(!mob.charStats().getMyRace().racialCategory().equals("Earth Elemental")))) return Ability.QUALITY_INDIFFERENT; } } return super.castingQuality(mob,target); } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { final Room target=mob.location(); if(target==null) return false; if(target.fetchEffect(ID())!=null) { mob.tell(L("This earth is already sacred.")); return false; } if((((mob.location().domainType()&Room.INDOORS)>0) ||(CMLib.flags().isWateryRoom(mob.location())) ||(mob.location().domainType()==Room.DOMAIN_OUTDOORS_AIR)) &&(!auto)) { mob.tell(L("This chant will not work here.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); if(success) { invoker=mob; final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),auto?"":L("^S<S-NAME> chant(s) to the ground.^?")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); if(msg.value()<=0) { mob.location().showHappens(CMMsg.MSG_OK_VISUAL,L("The charm of the sacred earth begins here!")); beneficialAffect(mob,target,asLevel,0); for(int d=Directions.NUM_DIRECTIONS()-1;d>=0;d--) { final Room R=mob.location().getRoomInDir(d); if((R!=null) &&(R.fetchEffect(ID())==null) &&((R.domainType()&Room.INDOORS)==0) &&(!CMLib.flags().isWateryRoom(R)) &&(R.domainType()!=Room.DOMAIN_OUTDOORS_AIR)) beneficialAffect(mob,R,asLevel,0); } } } } else return maliciousFizzle(mob,target,L("<S-NAME> chant(s) to the ground, but the magic fades.")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net