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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7fe11f6037b1d3bf947c7e7d930a50ed5bb22151 | 83e81c25b1f74f88ed0f723afc5d3f83e7d05da8 | /core/java/android/view/ScrollCaptureCallback.java | 291ce1caa871ee6b8ecfbecfb972586a7b65dbc2 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | Ankits-lab/frameworks_base | 8a63f39a79965c87a84e80550926327dcafb40b7 | 150a9240e5a11cd5ebc9bb0832ce30e9c23f376a | refs/heads/main | 2023-02-06T03:57:44.893590 | 2020-11-14T09:13:40 | 2020-11-14T09:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,140 | java | /*
* Copyright (C) 2020 The Android Open Source Project
*
* 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 android.view;
import android.annotation.NonNull;
import android.annotation.UiThread;
import android.graphics.Rect;
import java.util.function.Consumer;
/**
* A ScrollCaptureCallback is responsible for providing rendered snapshots of scrolling content for
* the scroll capture system. A single callback is responsible for providing support to a single
* scrolling UI element. At request time, the system will select the best candidate from among all
* callbacks registered within the window.
* <p>
* A callback is assigned to a View using {@link View#setScrollCaptureCallback}, or to the window as
* {@link Window#addScrollCaptureCallback}. The point where the callback is registered defines the
* frame of reference for the bounds measurements used.
* <p>
* <b>Terminology</b>
* <dl>
* <dt>Containing View</dt>
* <dd>The view on which this callback is attached, or the root view of the window if the callback
* is assigned directly to a window.</dd>
*
* <dt>Scroll Bounds</dt>
* <dd>A rectangle which describes an area within the containing view where scrolling content may
* be positioned. This may be the Containing View bounds itself, or any rectangle within.
* Requested by {@link #onScrollCaptureSearch}.</dd>
*
* <dt>Scroll Delta</dt>
* <dd>The distance the scroll position has moved since capture started. Implementations are
* responsible for tracking changes in vertical scroll position during capture. This is required to
* map the capture area to the correct location, given the current scroll position.
*
* <dt>Capture Area</dt>
* <dd>A rectangle which describes the area to capture, relative to scroll bounds. The vertical
* position remains relative to the starting scroll position and any movement since ("Scroll Delta")
* should be subtracted to locate the correct local position, and scrolled into view as necessary.
* </dd>
* </dl>
*
* @see View#setScrollCaptureHint(int)
* @see View#setScrollCaptureCallback(ScrollCaptureCallback)
* @see Window#addScrollCaptureCallback(ScrollCaptureCallback)
*
* @hide
*/
@UiThread
public interface ScrollCaptureCallback {
/**
* The system is searching for the appropriate scrolling container to capture and would like to
* know the size and position of scrolling content handled by this callback.
* <p>
* Implementations should inset {@code containingViewBounds} to cover only the area within the
* containing view where scrolling content may be positioned. This should cover only the content
* which tracks with scrolling movement.
* <p>
* Return the updated rectangle to {@code resultConsumer}. If for any reason the scrolling
* content is not available to capture, a {@code null} rectangle may be returned, and this view
* will be excluded as the target for this request.
* <p>
* Responses received after XXXms will be discarded.
* <p>
* TODO: finalize timeout
*
* @param onReady consumer for the updated rectangle
*/
void onScrollCaptureSearch(@NonNull Consumer<Rect> onReady);
/**
* Scroll Capture has selected this callback to provide the scrolling image content.
* <p>
* The onReady signal should be called when ready to begin handling image requests.
*/
void onScrollCaptureStart(@NonNull ScrollCaptureSession session, @NonNull Runnable onReady);
/**
* An image capture has been requested from the scrolling content.
* <p>
* <code>captureArea</code> contains the bounds of the image requested, relative to the
* rectangle provided by {@link ScrollCaptureCallback#onScrollCaptureSearch}, referred to as
* {@code scrollBounds}.
* here.
* <p>
* A series of requests will step by a constant vertical amount relative to {@code
* scrollBounds}, moving through the scrolling range of content, above and below the current
* visible area. The rectangle's vertical position will not account for any scrolling movement
* since capture started. Implementations therefore must track any scroll position changes and
* subtract this distance from requests.
* <p>
* To handle a request, the content should be scrolled to maximize the visible area of the
* requested rectangle. Offset {@code captureArea} again to account for any further scrolling.
* <p>
* Finally, clip this rectangle against scrollBounds to determine what portion, if any is
* visible content to capture. If the rectangle is completely clipped, set it to {@link
* Rect#setEmpty() empty} and skip the next step.
* <p>
* Make a copy of {@code captureArea}, transform to window coordinates and draw the window,
* clipped to this rectangle, into the {@link ScrollCaptureSession#getSurface() surface} at
* offset (0,0).
* <p>
* Finally, return the resulting {@code captureArea} using
* {@link ScrollCaptureSession#notifyBufferSent}.
* <p>
* If the response is not supplied within XXXms, the session will end with a call to {@link
* #onScrollCaptureEnd}, after which {@code session} is invalid and should be discarded.
* <p>
* TODO: finalize timeout
* <p>
*
* @param captureArea the area to capture, a rectangle within {@code scrollBounds}
*/
void onScrollCaptureImageRequest(
@NonNull ScrollCaptureSession session, @NonNull Rect captureArea);
/**
* Signals that capture has ended. Implementations should release any temporary resources or
* references to objects in use during the capture. Any resources obtained from the session are
* now invalid and attempts to use them after this point may throw an exception.
* <p>
* The window should be returned as much as possible to its original state when capture started.
* At a minimum, the content should be scrolled to its original position.
* <p>
* <code>onReady</code> should be called when the window should be made visible and
* interactive. The system will wait up to XXXms for this call before proceeding.
* <p>
* TODO: finalize timeout
*
* @param onReady a callback to inform the system that the application has completed any
* cleanup and is ready to become visible
*/
void onScrollCaptureEnd(@NonNull Runnable onReady);
}
| [
"keneankit01@gmail.com"
] | keneankit01@gmail.com |
5117d02c2f0ac632ab5e688748dfb175e2d8cf0e | bda7552d9b6c5048e26007910d8227bb0a2ea951 | /test_ajax/src/com/maventic/suman/GetUserServlet.java | b402b92a0d1ac32a78a174a669938d7d0d851f64 | [] | no_license | sumanssaha1993/BackUpCodesOfMine | 2067f0e6b497449ce6a1e8e856743649d67b10be | 95fe2b4f2535aecd2711c7d7f4616d1b504c0355 | refs/heads/master | 2020-04-19T09:00:22.222996 | 2019-03-11T12:52:39 | 2019-03-11T12:52:39 | 168,096,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 771 | java | package com.maventic.suman;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/GetUserServlet")
public class GetUserServlet extends HttpServlet{
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String userName = request.getParameter("userName").trim();
if(userName == null || "".equals(userName)){
userName = "Guest";
}
String greetings = "Hello " + userName;
response.setContentType("text/plain");
response.getWriter().write(greetings);
}
}
| [
"aa"
] | aa |
170046c53b39544a173aa89345f15b502eba4353 | 145b8edd4ece1d5a103af67d35d8aaf352d5bd91 | /src/main/java/br/com/anteros/integracao/bancaria/banco/layout/SaldoAnterior.java | 3579e3963d68809ca6c4cae4a91ffccf6ebbcdc4 | [] | no_license | anterostecnologia/anterosintegracaobancaria | 8efff79084355d5c62763c47c8b756d4224996e2 | f5cef8b4305c271203a8528df36e83d271dc6a83 | refs/heads/master | 2021-07-01T23:49:32.414871 | 2021-03-26T18:53:47 | 2021-03-26T18:53:47 | 61,902,151 | 1 | 0 | null | 2021-06-15T15:55:26 | 2016-06-24T17:46:14 | Java | UTF-8 | Java | false | false | 265 | java | package br.com.anteros.integracao.bancaria.banco.layout;
import java.math.BigDecimal;
import java.util.Date;
public interface SaldoAnterior {
public Date getDataSaldoAnterior();
public BigDecimal getValorSaldoAnterior();
public String getDebitoCredito();
}
| [
"edsonmartins2005@gmail.com"
] | edsonmartins2005@gmail.com |
5ecd55d2d261dae998da77c8f5a35df5971cd64d | cc32a64afed91f7186c009d3d1247370a904be1c | /hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java | d4f7cbfb46945f419bab4eddf65c908319665f9f | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rmoult01/hapi_fhir_mir_1 | 5dc5966ce06738872d8e0ddb667d513df76bb3d1 | 93270786e2d30185c41987038f878943cd736e34 | refs/heads/master | 2021-07-20T15:58:24.384813 | 2017-10-30T14:36:18 | 2017-10-30T14:36:18 | 106,035,744 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,928 | java | package ca.uhn.fhir.model.api;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2017 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/**
* Represents a FHIR resource path specification, e.g. <code>Patient:name</code>
* <p>
* Note on equality: This class uses {@link #getValue() value} and the {@link #isRecurse() recurse} properties to test
* equality. Prior to HAPI 1.2 (and FHIR DSTU2) the recurse property did not exist, so this may merit consideration when
* upgrading servers.
* </p>
*/
public class Include implements Serializable {
private static final long serialVersionUID = 1L;
private final boolean myImmutable;
private boolean myRecurse;
private String myValue;
/**
* Constructor for <b>non-recursive</b> include
*
* @param theValue
* The <code>_include</code> value, e.g. "Patient:name"
*/
public Include(String theValue) {
myValue = theValue;
myImmutable = false;
}
/**
* Constructor for an include
*
* @param theValue
* The <code>_include</code> value, e.g. "Patient:name"
* @param theRecurse
* Should the include recurse
*/
public Include(String theValue, boolean theRecurse) {
myValue = theValue;
myRecurse = theRecurse;
myImmutable = false;
}
/**
* Constructor for an include
*
* @param theValue
* The <code>_include</code> value, e.g. "Patient:name"
* @param theRecurse
* Should the include recurse
*/
public Include(String theValue, boolean theRecurse, boolean theImmutable) {
myValue = theValue;
myRecurse = theRecurse;
myImmutable = theImmutable;
}
/**
* Creates a copy of this include with non-recurse behaviour
*/
public Include asNonRecursive() {
return new Include(myValue, false);
}
/**
* Creates a copy of this include with recurse behaviour
*/
public Include asRecursive() {
return new Include(myValue, true);
}
/**
* See the note on equality on the {@link Include class documentation}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Include other = (Include) obj;
if (myRecurse != other.myRecurse) {
return false;
}
if (myValue == null) {
if (other.myValue != null) {
return false;
}
} else if (!myValue.equals(other.myValue)) {
return false;
}
return true;
}
/**
* Returns the portion of the value before the first colon
*/
public String getParamType() {
int firstColon = myValue.indexOf(':');
if (firstColon == -1 || firstColon == myValue.length() - 1) {
return null;
}
return myValue.substring(0, firstColon);
}
/**
* Returns the portion of the value after the first colon but before the second colon
*/
public String getParamName() {
int firstColon = myValue.indexOf(':');
if (firstColon == -1 || firstColon == myValue.length() - 1) {
return null;
}
int secondColon = myValue.indexOf(':', firstColon + 1);
if (secondColon != -1) {
return myValue.substring(firstColon + 1, secondColon);
}
return myValue.substring(firstColon + 1);
}
/**
* Returns the portion of the string after the second colon, or null if there are not two colons in the value.
*/
public String getParamTargetType() {
int firstColon = myValue.indexOf(':');
if (firstColon == -1 || firstColon == myValue.length() - 1) {
return null;
}
int secondColon = myValue.indexOf(':', firstColon + 1);
if (secondColon != -1) {
return myValue.substring(secondColon + 1);
}
return null;
}
public String getValue() {
return myValue;
}
/**
* See the note on equality on the {@link Include class documentation}
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (myRecurse ? 1231 : 1237);
result = prime * result + ((myValue == null) ? 0 : myValue.hashCode());
return result;
}
/**
* Is this object {@link #toLocked() locked}?
*/
public boolean isLocked() {
return myImmutable;
}
public boolean isRecurse() {
return myRecurse;
}
public void setRecurse(boolean theRecurse) {
myRecurse = theRecurse;
}
public void setValue(String theValue) {
if (myImmutable) {
throw new IllegalStateException("Can not change the value of this include");
}
myValue = theValue;
}
/**
* Return a new
*/
public Include toLocked() {
Include retVal = new Include(myValue, myRecurse, true);
return retVal;
}
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
builder.append("value", myValue);
builder.append("recurse", myRecurse);
return builder.toString();
}
/**
* Creates and returns a new copy of this Include with the given type. The following table shows what will be
* returned:
* <table>
* <tr>
* <th>Initial Contents</th>
* <th>theResourceType</th>
* <th>Output</th>
* </tr>
* <tr>
* <td>Patient:careProvider</th>
* <th>Organization</th>
* <th>Patient:careProvider:Organization</th>
* </tr>
* <tr>
* <td>Patient:careProvider:Practitioner</th>
* <th>Organization</th>
* <th>Patient:careProvider:Organization</th>
* </tr>
* <tr>
* <td>Patient</th>
* <th>(any)</th>
* <th>{@link IllegalStateException}</th>
* </tr>
* </table>
*
* @param theResourceType
* The resource type (e.g. "Organization")
* @return A new copy of the include. Note that if this include is {@link #toLocked() locked}, the returned include
* will be too
*/
public Include withType(String theResourceType) {
StringBuilder b = new StringBuilder();
String paramType = getParamType();
String paramName = getParamName();
if (isBlank(paramType) || isBlank(paramName)) {
throw new IllegalStateException("This include does not contain a value in the format [ResourceType]:[paramName]");
}
b.append(paramType);
b.append(":");
b.append(paramName);
if (isNotBlank(theResourceType)) {
b.append(':');
b.append(theResourceType);
}
Include retVal = new Include(b.toString(), myRecurse, myImmutable);
return retVal;
}
}
| [
"moultonr@mir.wustl.edu"
] | moultonr@mir.wustl.edu |
6869c164e288dd9379f8e82046179d2ab289658d | 6aae159dca5c39e0fbbd46114aa16d0c955ad3c0 | /perun-beans/src/main/java/cz/metacentrum/perun/core/api/exceptions/AttributeNotExistsException.java | c7780179cb62c1033271186b2e16ee3759246905 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | vlastavlasta/perun | 01be9e55dac683913a5c1e953a434dbe74bada22 | e69ff53f4e83ec66c674f921c899a3e50c045c87 | refs/heads/master | 2020-12-30T19:45:55.605367 | 2014-03-19T16:41:34 | 2014-03-19T16:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,070 | java | package cz.metacentrum.perun.core.api.exceptions;
import cz.metacentrum.perun.core.api.Attribute;
import cz.metacentrum.perun.core.api.exceptions.rt.AttributeNotExistsRuntimeException;
/**
* Attribute not exists in underlaying data source.
*
* @author Slavek Licehammer glory@ics.muni.cz
*/
public class AttributeNotExistsException extends EntityNotExistsException {
static final long serialVersionUID = 0;
private Attribute attribute;
public AttributeNotExistsException(AttributeNotExistsRuntimeException rt) {
super(rt.getMessage(),rt);
}
public AttributeNotExistsException(String message) {
super(message);
}
public AttributeNotExistsException(String message, Throwable cause) {
super(message, cause);
}
public AttributeNotExistsException(Throwable cause) {
super(cause);
}
public AttributeNotExistsException(Attribute attribute) {
super(attribute.toString());
this.attribute = attribute;
}
public Attribute getAttribute() {
return attribute;
}
}
| [
"256627@mail.muni.cz"
] | 256627@mail.muni.cz |
94ec1637871852e3990b57b9b0f52414f5836f72 | 2a13e40d091af2877fdfba93834b3fe69ffe273f | /src/main/java/net/gy/SwiftFrameWork/MVP/Presenter/Presenter.java | 24356a0165a4b51e74cf00ba6ba5d5c06f02c47d | [] | no_license | SwiftOSSite/SwiftFrameWork | 5517bc6c386ad470e24df427c39c43abf8f4ee36 | 84cc0294ec3f7f9c8d205dcb66da069ed889732e | refs/heads/gy | 2020-04-05T18:57:05.366093 | 2016-08-31T09:05:20 | 2016-08-31T09:05:20 | 67,022,414 | 1 | 0 | null | 2016-08-31T09:13:57 | 2016-08-31T09:13:56 | null | UTF-8 | Java | false | false | 5,773 | java | package net.gy.SwiftFrameWork.MVP.Presenter;
import android.app.Activity;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.IdRes;
import android.view.View;
import net.gy.SwiftFrameWork.IOC.Model.net.http.impl.HttpInjectUtil;
import net.gy.SwiftFrameWork.IOC.Mvp.annotation.InjectPresenter;
import net.gy.SwiftFrameWork.IOC.Service.thread.impl.InjectAsycTask;
import net.gy.SwiftFrameWork.MVP.View.context.IContext;
import net.gy.SwiftFrameWork.MVP.View.context.activity.IActivity;
import net.gy.SwiftFrameWork.MVP.View.context.entity.ContextChangeEvent;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import java.util.WeakHashMap;
/**
* Created by gy on 2015/12/28.
*/
public abstract class Presenter implements IPresenterCallBack{
//当前栈顶的Presenter 即当前栈顶Activity对应的Presenter
private static Presenter curPresenter;
//所有的Presenter
private static WeakHashMap<Class<? extends Presenter>,Presenter> presents = new WeakHashMap<Class<? extends Presenter>,Presenter>();;
//当前Presenter对应的Context(栈顶Activity)的弱引用
private WeakReference<? extends Context> curContextRef;
//当前Presenter对应的所有Context
private List<Context> contextList;
public Presenter() {
contextList = new ArrayList<Context>();
curPresenter = this;
InjectAsycTask.getInstance().inject(this);
HttpInjectUtil.getInstance().inject(this);
}
//分析注解绑定Presenter
public static Presenter regist(Context context){
Class<?> type = context.getClass();
InjectPresenter inject = type.getAnnotation(InjectPresenter.class);
if (inject == null)
return null;
Class<? extends Presenter> clazz = inject.value();
Presenter presenter = getPresent(clazz);
if (presenter == null){
try {
presenter = clazz.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
putPresent(presenter);
}
presenter.addContext(context);
return presenter;
}
//解绑
public static void unregist(Context context){
Presenter presenter = ((IContext)context).getPresent();
presenter.removeContext(context);
if (presenter.getContexts().size() == 0)
destoryPresenter(presenter);
}
@Override
public void OnPresentSeted(Context context) {
Context preContext = null;
if (curContextRef !=null)
preContext = curContextRef.get();
this.curContextRef = new WeakReference<Context>(context);
if (getCurPresenter() != ((IContext)context).getPresent())
setCurPresnter(((IContext)context).getPresent());
if (preContext == null){
OnPresentInited(context);
return;
}
ContextChangeEvent event = new ContextChangeEvent();
if (preContext instanceof Activity){
if (context instanceof Activity)
event.setAction(ContextChangeEvent.ACTIVITY_ACTIVITY);
else if (preContext instanceof Service)
event.setAction(ContextChangeEvent.ACTIVITY_SERVICE);
}else if (preContext instanceof Service){
if (context instanceof Activity)
event.setAction(ContextChangeEvent.SERVICE_ACTIVITY);
else if (preContext instanceof Service)
event.setAction(ContextChangeEvent.SERVICE_SERVICE);
}
event.setContext(context);
onContextChanged(event);
}
//销毁Presenter的回调,子类可以重写
@Override
public void DestoryPresent() {
HttpInjectUtil.getInstance().remove(this);
InjectAsycTask.getInstance().remove(this);
}
protected abstract void onContextChanged(ContextChangeEvent event);
@Override
public Context getContext() {
return curContextRef.get();
}
public Activity getActivityRaw(){
return (Activity) getContext();
}
public IActivity getActivityInter(){
return (IActivity) getActivityRaw();
}
public Service getServiceRaw(){
return (Service) getContext();
}
protected <T extends View> T getView(@IdRes int ViewId){
return getActivityInter().getView(ViewId);
}
protected void startActivity(Intent intent){
//OnActivityChangeBefore();
getActivityRaw().startActivity(intent);
}
public static Presenter getCurPresenter() {
return curPresenter;
}
public static void setCurPresnter(Presenter presnter){
curPresenter = presnter;
}
public static Presenter getPresenter(Class<? extends Presenter> key){
return presents.get(key);
}
private static void destoryPresenter(Presenter presenter){
presenter.DestoryPresent();
presents.remove(presenter.getClass());
}
public static Presenter getPresent(Class clazz){
return presents.get(clazz);
}
public static void putPresent(Presenter presenter){
presents.put(presenter.getClass(),presenter);
}
public void addContext(Context context){
contextList.add(context);
}
public void removeContext(Context context){
contextList.remove(context);
}
public List<Context> getContexts(){
return contextList;
}
}
| [
"939543405@qq.com"
] | 939543405@qq.com |
e1eed2caef82a402c08f803a8ca3de231bd6cf89 | 94dafb3bf3b6919bf4fcb3d460173077bfa29676 | /core/src/main/java/com/wdcloud/lms/core/base/enums/ResourceFileTypeEnum.java | 664daf6b0f6d9f632bf1fbebaebb559c8dce804f | [] | no_license | Miaosen1202/1126Java | b0fbe58e51b821b1ec8a8ffcfb24b21d578f1b5f | 7c896cffa3c51a25658b76fbef76b83a8963b050 | refs/heads/master | 2022-06-24T12:33:14.369136 | 2019-11-26T05:49:55 | 2019-11-26T05:49:55 | 224,112,546 | 0 | 0 | null | 2021-02-03T19:37:54 | 2019-11-26T05:48:48 | Java | UTF-8 | Java | false | false | 547 | java | package com.wdcloud.lms.core.base.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Objects;
/**
* 资源文件类型
*/
@Getter
@AllArgsConstructor
public enum ResourceFileTypeEnum {
COVER(1),
DATA(2),
ATTACHMENT(3);
private Integer type;
public static ResourceFileTypeEnum typeOf(Integer type) {
for (ResourceFileTypeEnum value : values()) {
if (Objects.equals(value.type, type)) {
return value;
}
}
return null;
}
}
| [
"miaosen1202@163.com"
] | miaosen1202@163.com |
1d5e50921fac6f5a17763d2508049068606a28ab | d96d68d72cc519eaaf1c645e90e89a5fd2071f95 | /check_api/src/main/java/com/google/errorprone/predicates/type/ExactAny.java | 3bdc142e76a8d5dae0961a22bcc20881d8bda402 | [
"Apache-2.0"
] | permissive | PicnicSupermarket/error-prone | 1e22e603c3e6581f652c0b33a4545b827bbe9ac7 | 9f8c332d9ea67dfd31d8a91a023392f61097ae8a | refs/heads/master | 2023-08-31T01:58:56.562162 | 2023-08-24T21:00:02 | 2023-08-24T21:02:22 | 81,736,167 | 10 | 2 | Apache-2.0 | 2023-08-10T16:54:06 | 2017-02-12T15:33:41 | Java | UTF-8 | Java | false | false | 1,510 | java | /*
* Copyright 2015 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.errorprone.predicates.type;
import com.google.errorprone.VisitorState;
import com.google.errorprone.predicates.TypePredicate;
import com.google.errorprone.suppliers.Supplier;
import com.google.errorprone.util.ASTHelpers;
import com.sun.tools.javac.code.Type;
/** Matches types that exactly match one of the given types. */
public class ExactAny implements TypePredicate {
public final Iterable<Supplier<Type>> types;
public ExactAny(Iterable<Supplier<Type>> types) {
this.types = types;
}
@Override
public boolean apply(Type type, VisitorState state) {
if (type == null) {
return false;
}
for (Supplier<Type> supplier : types) {
Type expected = supplier.get(state);
if (expected == null) {
continue;
}
if (ASTHelpers.isSameType(expected, type, state)) {
return true;
}
}
return false;
}
}
| [
"cushon@google.com"
] | cushon@google.com |
3013d341e3d0f8f91db03974a7000fb2708af17a | 31fadf0c9066e43cc8002770d37196196b0250b2 | /src/test/java/io/github/jhipster/application/config/timezone/HibernateTimeZoneTest.java | 39d62659ab2c97df81dea5761d6d27a80e52afb9 | [] | no_license | yousrajali/jhipster-gestioncommerciale | e39c46892bc1c0bb76ecb2438f0378164e8d6bf5 | ad69f33b678d0eddcb6a1802f37a6aaca4668b91 | refs/heads/master | 2020-04-13T09:25:19.078371 | 2018-12-25T21:01:06 | 2018-12-25T21:01:06 | 163,111,230 | 0 | 0 | null | 2018-12-25T21:08:54 | 2018-12-25T21:00:57 | Java | UTF-8 | Java | false | false | 7,008 | java | package io.github.jhipster.application.config.timezone;
import io.github.jhipster.application.GestioncommercialeApp;
import io.github.jhipster.application.repository.timezone.DateTimeWrapper;
import io.github.jhipster.application.repository.timezone.DateTimeWrapperRepository;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
import java.time.*;
import java.time.format.DateTimeFormatter;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Unit tests for the UTC Hibernate configuration.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = GestioncommercialeApp.class)
public class HibernateTimeZoneTest {
@Autowired
private DateTimeWrapperRepository dateTimeWrapperRepository;
@Autowired
private JdbcTemplate jdbcTemplate;
private DateTimeWrapper dateTimeWrapper;
private DateTimeFormatter dateTimeFormatter;
private DateTimeFormatter timeFormatter;
private DateTimeFormatter dateFormatter;
@Before
public void setup() {
dateTimeWrapper = new DateTimeWrapper();
dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z"));
dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0"));
dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00"));
dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00"));
dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10"));
dateTimeFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd HH:mm:ss.S")
.withZone(ZoneId.of("UTC"));
timeFormatter = DateTimeFormatter
.ofPattern("HH:mm:ss")
.withZone(ZoneId.of("UTC"));
dateFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd");
}
@Test
@Transactional
public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("instant", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant());
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDateTime()
.atZone(ZoneId.systemDefault())
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getZonedDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetTime()
.toLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDate()
.format(dateFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
private String generateSqlRequest(String fieldName, long id) {
return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id);
}
private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) {
while (sqlRowSet.next()) {
String dbValue = sqlRowSet.getString(1);
assertThat(dbValue).isNotNull();
assertThat(dbValue).isEqualTo(expectedValue);
}
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
4552c06989c2999a831a09bbdb4f68f8ddd2ddbf | e114ab03fcda58897f522dc8603365d50b098131 | /japs/java/src/net/mumie/cocoon/util/MosesPasswordEncryptor.java | 0f44822019e642c04e1f92bfb83276536f15dece | [
"MIT"
] | permissive | TU-Berlin/Mumie | 07ff6ed89cae043f0a942fa1b32916b0a319a7d0 | 322f6772f5bf1ce42fc00d0c6f8c3eba27ecc010 | refs/heads/master | 2016-08-12T11:33:53.553539 | 2016-01-13T11:01:20 | 2016-01-13T11:01:20 | 49,567,992 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,977 | java | /*
* The MIT License (MIT)
*
* Copyright (c) 2010 Technische Universitaet Berlin
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package net.mumie.cocoon.util;
import java.security.MessageDigest;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.avalon.framework.logger.NullLogger;
/**
* <p>
* Encrypts passwords the way MOSES does.
* </p>
* <p>
* NOTE: The algorithm to convert the hash to a string is questionable, so use this
* encryptor only if communication with MOSES is required.
* </p>
*/
public class MosesPasswordEncryptor extends AbstractLogEnabled
implements ThreadSafe, PasswordEncryptor
{
/**
* Encrypts <code>password</code> and returns the result.
*/
public String encrypt (String password)
throws PasswordEncryptionException
{
final String METHOD_NAME = "encrypt";
this.getLogger().debug(METHOD_NAME + " 1/2: Started");
try
{
MessageDigest digest = MessageDigest.getInstance("MD5");
String salt =
(password.length() >= 2
? salt=password.substring(0,2)
: password);
digest.update(salt.getBytes("ASCII"));
digest.update(password.getBytes());
byte[] hash = digest.digest();
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < hash.length; i++)
buffer.append(hash[i]);
this.getLogger().debug(METHOD_NAME + " 2/2: Done");
return buffer.toString();
}
catch (Exception exception)
{
throw new PasswordEncryptionException(exception);
}
}
/**
* Creates and returns an instance that is suitable to work offline.
*/
public static MosesPasswordEncryptor createOfflineInstance ()
{
MosesPasswordEncryptor encryptor = new MosesPasswordEncryptor();
encryptor.enableLogging(new NullLogger());
return encryptor;
}
}
| [
"erhard@math.tu-berlin.de"
] | erhard@math.tu-berlin.de |
dd25a23f4c47d6ad2f9deb581adaa3e97efdec6e | 613002dec3d8d0bdda87fd97f3f22e34685edf45 | /app/src/main/java/com/jecelyin/editor/v2/ui/dialog/LangListDialog.java | 1030ec126f619e5719a68f0d9eaf66763a6fd46a | [] | no_license | fullstackenviormentss/c_cpp_compiler | 4d375715ac9a1625a48669e5e1888b41c66ea5fb | f6ca1d68ef37399292a0437370ac20ad36f4c7a8 | refs/heads/master | 2020-03-14T16:48:21.871798 | 2018-04-30T17:22:39 | 2018-04-30T17:22:39 | 131,705,321 | 1 | 0 | null | 2018-05-01T11:25:10 | 2018-05-01T11:25:10 | null | UTF-8 | Java | false | false | 3,339 | java | /*
* Copyright (C) 2016 Jecelyin Peng <jecelyin@gmail.com>
*
* This file is part of 920 Text Editor.
*
* 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.jecelyin.editor.v2.ui.dialog;
import android.content.Context;
import android.view.View;
import com.afollestad.materialdialogs.MaterialDialog;
import com.duy.ccppcompiler.R;
import com.jecelyin.editor.v2.common.Command;
import org.gjt.sp.jedit.Catalog;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Set;
/**
* @author Jecelyin Peng <jecelyin@gmail.com>
*/
public class LangListDialog extends AbstractDialog {
private String[] scopeList;
private String[] langList;
private int currentLangIndex = -1;
public LangListDialog(Context context) {
super(context);
initGrammarInfo();
}
private void initGrammarInfo() {
Set<String> strings = Catalog.modes.keySet();
ArrayList<Grammar> list = new ArrayList<Grammar>(strings.size());
Grammar g;
for (String name : strings) {
list.add(new Grammar(name, name));
}
Collections.sort(list, new Comparator<Grammar>() {
@Override
public int compare(Grammar lhs, Grammar rhs) {
return lhs.name.compareToIgnoreCase(rhs.name);
}
});
String currLang = getMainActivity().getCurrentLang();
int size = list.size();
langList = new String[size];
scopeList = new String[size];
for (int i = 0; i < size; i++) {
g = list.get(i);
langList[i] = g.name;
scopeList[i] = g.scope;
if (currLang != null && currLang.equals(g.scope)) {
currentLangIndex = i;
}
}
}
@Override
public void show() {
MaterialDialog dlg = getDialogBuilder().items(langList)
.title(R.string.select_lang_to_highlight)
.itemsCallbackSingleChoice(currentLangIndex, new MaterialDialog.ListCallbackSingleChoice() {
@Override
public boolean onSelection(MaterialDialog materialDialog, View view, int i, CharSequence charSequence) {
Command command = new Command(Command.CommandEnum.HIGHLIGHT);
command.object = scopeList[i];
getMainActivity().doCommand(command);
return true;
}
})
.negativeText(R.string.cancel)
.show();
handleDialog(dlg);
}
private static class Grammar {
String name;
String scope;
public Grammar(String scope, String name) {
this.name = name;
this.scope = scope;
}
}
}
| [
"tranleduy1233@gmail.com"
] | tranleduy1233@gmail.com |
db27035e597912664328bf0ce7b703b7802535c0 | 313cac74fe44fa4a08c50b2f251e4167f637c049 | /retail-fas-1.1.2/retail-fas/retail-fas-manager/src/main/java/cn/wonhigh/retail/fas/manager/scheduler/MovingWeightedScheduler.java | 0a6dc608ad396cab26484894ad18cfc28ca82641 | [] | no_license | gavin2lee/spring-projects | a1d6d495f4a027b5896e39f0de2765aaadc8a9de | 6e4a035ae3c9045e880a98e373dd67c8c81bfd36 | refs/heads/master | 2020-04-17T04:52:41.492652 | 2016-09-29T16:07:40 | 2016-09-29T16:07:40 | 66,710,003 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 6,126 | java | package cn.wonhigh.retail.fas.manager.scheduler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import cn.wonhigh.retail.fas.common.constans.CommonConstants;
import cn.wonhigh.retail.fas.common.model.BrandOnline;
import cn.wonhigh.retail.fas.common.model.Company;
import cn.wonhigh.retail.fas.common.utils.DateUtil;
import cn.wonhigh.retail.fas.manager.BrandOnlineManager;
import cn.wonhigh.retail.fas.manager.CompanyManager;
import cn.wonhigh.retail.fas.manager.FinancialAccountManager;
import cn.wonhigh.retail.gms.api.service.CalculateWeightedCostApi;
import cn.wonhigh.retail.gms.common.dto.InvCostGenerateDto;
import com.yougou.logistics.base.common.enums.JobBizStatusEnum;
import com.yougou.logistics.base.common.exception.ManagerException;
import com.yougou.logistics.base.common.exception.RpcException;
import com.yougou.logistics.base.common.interfaces.RemoteJobServiceExtWithParams;
import com.yougou.logistics.base.common.model.JobBizLog;
import com.yougou.logistics.base.common.vo.scheduler.RemoteJobInvokeParamsDto;
/**
* 月末一次加权---移动加权成本计算
* @author wang.xy1
*
*/
@Service
@ManagedResource(objectName = CommonConstants.SYS_NAME + "MovingWeighted", description = StringUtils.EMPTY)
public class MovingWeightedScheduler implements RemoteJobServiceExtWithParams {
private static final Logger log = Logger.getLogger(MovingWeightedScheduler.class);
@Resource
private BrandOnlineManager brandOnlineManager;
@Resource
private CompanyManager companyManager;
@Resource
private CalculateWeightedCostApi calculateWeightedCostApi;
@Resource
private FinancialAccountManager financialAccountManager;
/**
* 调度错误日志
*/
private static final List<JobBizLog> JOB_BIZ_LOG = new ArrayList<JobBizLog>();
/**
* 调度执行状态
*/
private static JobBizStatusEnum jobBizStatusEnum;
@Override
public void executeJobWithParams(String jobId, String triggerName, String groupName,
RemoteJobInvokeParamsDto remoteJobInvokeParamsDto) {
try {
//定时任务执行的时间是凌晨,需要更新上一天的成本
Date todayDate = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(todayDate);
cal.add(Calendar.DAY_OF_MONTH, -1);
todayDate = cal.getTime();
//承担总部职能公司
String financialAccounts = financialAccountManager.findLeadRoleCompanyNos();
List<Company> companies = companyManager.findAllCompanyWithoutPermission();
if (CollectionUtils.isEmpty(companies)) {
return;
}
List<BrandOnline> brandUnitList = brandOnlineManager.findByBiz(null, null);
if (CollectionUtils.isEmpty(brandUnitList)) {
return;
}
//已经上线的品牌,暂时写死
List<String> brandUnitNos = new ArrayList<String>();
for (BrandOnline brandOnline : brandUnitList) {
brandUnitNos.add(brandOnline.getBrandNo());
}
List<String> companyNos = new ArrayList<String>();
for (Company company : companies) {
//承担总部职能公司跳过
if (financialAccounts.contains(company.getCompanyNo())) {
continue;
}
companyNos.add(company.getCompanyNo());
}
InvCostGenerateDto dto = new InvCostGenerateDto();
dto.setStartDate(DateUtil.getFirstDayOfMonth(todayDate));
dto.setEndDate(DateUtil.getLastDayOfMonth(todayDate));
dto.setCreateUser("System");
dto.setCreateTime(new Date());
// dto.setBrandNos(brandNos);
dto.setBrandUnitNos(brandUnitNos);
dto.setCompanyNos(companyNos);
//调用GMS接口,检验是否存在单据异常
log.debug("#####加权成本定时任务执行#############");
calculateWeightedCostApi.doBatchGenerateByJob(dto);
} catch (RpcException e) {
// 如果异常传JobBizLog对象到Scheduler
log.error("生成成本的调度任务调用GMS接口异常。。。。", e);
} catch (ManagerException e) {
log.error("查询后台数据公司信息、财务帐套信息出现异常。。。。", e);
}
}
@Override
public JobBizStatusEnum getJobStatus(String jobId, String arg0, String arg1) {
return jobBizStatusEnum;
}
@Override
public String getLogs(String jobId, String triggerName, String groupName, long lastDate) {
String listStr = "[]";
List<JobBizLog> list = JOB_BIZ_LOG;
JobBizLog jobBizLog = new JobBizLog();
jobBizLog.setGroupName(groupName);
jobBizLog.setTriggerName(triggerName);
jobBizLog.setRemark("拉远程日志48");
jobBizLog.setType("INTERRUPTED");
// GMT时间
jobBizLog.setGmtDate(new Date().getTime());
JOB_BIZ_LOG.add(jobBizLog);
if (list.size() == 0) {
return listStr;
}
Iterator<JobBizLog> it = list.iterator();
while (it.hasNext()) {
JobBizLog log = it.next();
if (null != log.getGmtDate() && log.getGmtDate() <= lastDate) {
it.remove();
}
}
ObjectMapper mapper = new ObjectMapper();
try {
listStr = mapper.writeValueAsString(list);
} catch (JsonGenerationException e) {
log.error("给调度框架传数据报错!", e);
} catch (JsonMappingException e) {
log.error("给调度框架传数据报错!", e);
} catch (IOException e) {
log.error("给调度框架传数据报错!", e);
}
return listStr;
}
@Override
public void initializeJob(String jobId, String arg0, String arg1) {
}
@Override
public void pauseJob(String jobId, String arg0, String arg1) {
}
@Override
public void restartJob(String jobId, String arg0, String arg1) {
}
@Override
public void resumeJob(String jobId, String arg0, String arg1) {
}
@Override
public void stopJob(String jobId, String arg0, String arg1) {
}
}
| [
"gavin2lee@163.com"
] | gavin2lee@163.com |
50dc485bf66bba19e80e78306d8e9faa1a9e1e8d | f08256664e46e5ac1466f5c67dadce9e19b4e173 | /sources/com/bumptech/glide/load/p339o/p340y/C8342c.java | b321c91012eff1c00427f0b19c6b345d7351c389 | [] | no_license | IOIIIO/DisneyPlusSource | 5f981420df36bfbc3313756ffc7872d84246488d | 658947960bd71c0582324f045a400ae6c3147cc3 | refs/heads/master | 2020-09-30T22:33:43.011489 | 2019-12-11T22:27:58 | 2019-12-11T22:27:58 | 227,382,471 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,759 | java | package com.bumptech.glide.load.p339o.p340y;
import android.content.Context;
import android.net.Uri;
import com.bumptech.glide.load.C8115i;
import com.bumptech.glide.load.p332m.p333o.C8141b;
import com.bumptech.glide.load.p332m.p333o.C8142c;
import com.bumptech.glide.load.p339o.C8306n;
import com.bumptech.glide.load.p339o.C8306n.C8307a;
import com.bumptech.glide.load.p339o.C8308o;
import com.bumptech.glide.load.p339o.C8314r;
import java.io.InputStream;
import p163g.p413f.p414a.p423v.C10760b;
/* renamed from: com.bumptech.glide.load.o.y.c */
/* compiled from: MediaStoreImageThumbLoader */
public class C8342c implements C8306n<Uri, InputStream> {
/* renamed from: a */
private final Context f17820a;
/* renamed from: com.bumptech.glide.load.o.y.c$a */
/* compiled from: MediaStoreImageThumbLoader */
public static class C8343a implements C8308o<Uri, InputStream> {
/* renamed from: a */
private final Context f17821a;
public C8343a(Context context) {
this.f17821a = context;
}
/* renamed from: a */
public C8306n<Uri, InputStream> mo19954a(C8314r rVar) {
return new C8342c(this.f17821a);
}
/* renamed from: a */
public void mo19955a() {
}
}
public C8342c(Context context) {
this.f17820a = context.getApplicationContext();
}
/* renamed from: a */
public C8307a<InputStream> mo19951a(Uri uri, int i, int i2, C8115i iVar) {
if (C8141b.m23617a(i, i2)) {
return new C8307a<>(new C10760b(uri), C8142c.m23622a(this.f17820a, uri));
}
return null;
}
/* renamed from: a */
public boolean mo19953a(Uri uri) {
return C8141b.m23618a(uri);
}
}
| [
"101110@vivaldi.net"
] | 101110@vivaldi.net |
00d92424f67c1247819ed6364bf64c4873bb9c82 | f54c1a0e64cf81d3429683b38fea609e52870dd1 | /Server_11_GuestBook/src/main/java/com/callor/guest/controller/HomeController.java | a33eddeb91af583a6b4d1608e62b22c5a123f57e | [] | no_license | hooninfinity/Biz_403_2021_04_Server | bd87b24956b1316ab7b0f1dfa28292705e915849 | e185f2369aea52bc1bc2653761c68ff4279f813d | refs/heads/master | 2023-05-18T18:54:14.047749 | 2021-06-01T23:44:53 | 2021-06-01T23:44:53 | 362,004,925 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 996 | java | package com.callor.guest.controller;
import java.io.IOException;
import java.util.List;
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.callor.guest.model.GuestBookVO;
import com.callor.guest.service.GuestBookService;
import com.callor.guest.service.impl.GuestBookServiceImplV1;
@WebServlet("/")
public class HomeController extends HttpServlet{
private static final long serialVersionUID = 1L;
protected GuestBookService gbService;
public HomeController() {
gbService = new GuestBookServiceImplV1();
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
List<GuestBookVO> gbList = gbService.selectAll();
req.setAttribute("GBLIST", gbList);
req.getRequestDispatcher("/WEB-INF/views/home.jsp").forward(req, resp);
}
}
| [
"hooninfinity@naver.com"
] | hooninfinity@naver.com |
1a2d2e9e8169d3c41cd722f131f3da2933e4f44d | 71007018bfae36117fd2f779dbe6e6d7bb9bde9c | /src/main/java/com/magento/test/dao/DefaultDirectoryCountryRegionNameDao.java | 69315bef09194e05fbed65e0b0ce53de00916580 | [] | no_license | gmai2006/magentotest | 819201760b720a90d55ef853be964651ace125ac | ca67d16d6280ddaefbf57fa1129b6ae7bd80408f | refs/heads/main | 2023-09-03T05:14:27.788984 | 2021-10-17T06:25:09 | 2021-10-17T06:25:09 | 418,040,494 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,645 | java | /**
* %% Copyright (C) 2021 DataScience 9 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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing permissions and
* limitations under the License. #L%
*
* <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or
* function or changes please update the templates then submit the template through our web
* interface.
*/
package com.magento.test.dao;
import static java.util.Objects.requireNonNull;
import java.util.List;
import java.util.logging.Logger;
import javax.inject.Inject;
import javax.ejb.Stateless;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.transaction.Transactional;
import com.magento.test.entity.DirectoryCountryRegionName;
import com.magento.test.entity.DirectoryCountryRegionNameId;
@Stateless
@Named("DefaultDirectoryCountryRegionNameDao")
public class DefaultDirectoryCountryRegionNameDao implements DirectoryCountryRegionNameDao {
private static final int BATCH_SIZE = 50;
private final Logger logger = Logger.getLogger(this.getClass().getName());
private JpaDao dao;
@Inject
@Named("DefaultJpaDao")
public DefaultDirectoryCountryRegionNameDao(JpaDao dao) {
this.dao = dao;
}
public DefaultDirectoryCountryRegionNameDao() {}
/** {@inheritDoc} */
@Override
public DirectoryCountryRegionName find(DirectoryCountryRegionNameId id) {
final EntityManager em = dao.getEntityManager();
return em.find(DirectoryCountryRegionName.class, id);
}
/** {@inheritDoc} */
@Override
public List<DirectoryCountryRegionName> select(int max) {
return dao.select(
"select a from DirectoryCountryRegionName a", DirectoryCountryRegionName.class, max);
}
/** {@inheritDoc} */
@Override
public List<DirectoryCountryRegionName> selectAll() {
return dao.selectAll(
"select a from DirectoryCountryRegionName a", DirectoryCountryRegionName.class);
}
/** {@inheritDoc} */
@Override
public DirectoryCountryRegionName create(DirectoryCountryRegionName e) {
return dao.create(e);
}
/** {@inheritDoc} */
@Override
public DirectoryCountryRegionName update(DirectoryCountryRegionName e) {
return dao.update(e);
}
}
| [
"gmai2006@gmail.com"
] | gmai2006@gmail.com |
70d93bf29d92d01ab5282060280190407900dd7a | 6ac07128b3e1a37628ff29363cdc176762ce3ace | /quarkc/test/emit/expected/java/package/src/main/java/package_md/test_Test.java | 36141b068af3450282cf50b9af8e6fdc3ca4380f | [
"Apache-2.0"
] | permissive | bozzzzo/quark | b735f30c30362bb4b1c93babb84f68caeb202cc7 | f569642eb618848c4168d864c6abb3462d033459 | refs/heads/master | 2021-01-22T00:13:36.933589 | 2016-04-21T17:57:17 | 2016-04-21T17:57:17 | 44,208,481 | 1 | 0 | null | 2015-10-13T22:10:00 | 2015-10-13T22:09:59 | null | UTF-8 | Java | false | false | 927 | java | package package_md;
public class test_Test extends quark.reflect.Class implements io.datawire.quark.runtime.QObject {
public static quark.reflect.Class singleton = new test_Test();
public test_Test() {
super("test.Test");
(this).name = "test.Test";
(this).parameters = new java.util.ArrayList(java.util.Arrays.asList(new Object[]{}));
(this).fields = new java.util.ArrayList(java.util.Arrays.asList(new Object[]{new quark.reflect.Field("quark.String", "name")}));
(this).methods = new java.util.ArrayList(java.util.Arrays.asList(new Object[]{new test_Test_go_Method()}));
}
public Object construct(java.util.ArrayList<Object> args) {
return new test.Test();
}
public String _getClass() {
return (String) (null);
}
public Object _getField(String name) {
return null;
}
public void _setField(String name, Object value) {}
}
| [
"rhs@alum.mit.edu"
] | rhs@alum.mit.edu |
91788a22598ae3c981563e03617b729ed53cd5a4 | 1c1243b9bb11458dc32d3eb3f06dd8fcd6e8c40f | /src/NODE/Node.java | 97d9b3a4c725d29b8bfdd78340e02690bdd83294 | [] | no_license | Muhaiminur/INSERTION-SORT | 0decf7e39434818905574139ab49efce448e9c8b | 5847a18e606ecf6cc189735db15643fa39d8db0b | refs/heads/master | 2020-04-28T09:11:49.158078 | 2019-03-12T07:33:48 | 2019-03-12T07:33:48 | 175,158,382 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 136 | java | package NODE;
public class Node{
public int element=0;
public Node next=null;
Node(int o,Node n){
element=o;
next=n;
}
} | [
"muhaiminurabir@gmail.com"
] | muhaiminurabir@gmail.com |
151261ba37bc259d48f53080de798531898061d8 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/java-design-patterns/learning/7681/HolderNaive.java | df5d9c34e5854edd6b9301631914158347ea9962 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | /**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.lazy.loading;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* Simple implementation of the lazy loading idiom. However, this is not thread safe.
*
*/
public class HolderNaive {
private static final Logger LOGGER = LoggerFactory.getLogger(HolderNaive.class);
private Heavy heavy;
/**
* Constructor
*/
public HolderNaive() {
LOGGER.info("HolderNaive created" );
}
/**
* Get heavy object
*/
public Heavy getHeavy() {
if (heavy == null) {
heavy = new Heavy();
}
return heavy;
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
f04c81d2d37e90dc4294e2b1c5363dd582484d2c | 56ac314fe3a9360a16a5833217bca1f47596e1bc | /OFResourceIncludeAndOutputFormat/src/main/java/beans/TextBean.java | 4fd14aaf04ba9815748c4a0a4b800580a1fa5b0f | [] | no_license | cybernetics/JSF-2.x | 083a34f60df58f82178fae733baf34303cefc6f2 | 5022f3b7f215a8a723f7c75fbfedfd85cd22c9f7 | refs/heads/master | 2021-01-21T08:12:15.937061 | 2016-03-07T08:25:37 | 2016-03-07T08:25:37 | 53,640,187 | 1 | 0 | null | 2016-03-11T04:44:37 | 2016-03-11T04:44:37 | null | UTF-8 | Java | false | false | 226 | java | package beans;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
@Named
@RequestScoped
public class TextBean {
public String decorate(String text) {
return "***" + text + "***";
}
}
| [
"leoprivacy@yahoo.com"
] | leoprivacy@yahoo.com |
54bc451dcd7a3da614cb1169aafb908a0701b8ee | cfde4e9d805f82f8ec4905ae74cf661731c4e8d2 | /JavaBase/src/main/java/com/yjl/javabase/thinkinjava/holding/StackTest.java | 7c5f3547c2bcf5d861a8dd47eba2f3113518e92a | [
"Apache-2.0"
] | permissive | yangjunlin-const/WhileTrueCoding | 096ee1adff6e972240595436486d02a69eacecd1 | db45d5739483acf664d653ca8047e33e8d012377 | refs/heads/master | 2021-01-10T01:22:11.893902 | 2016-08-18T09:37:48 | 2016-08-18T09:37:48 | 47,909,082 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 426 | java | package com.yjl.javabase.thinkinjava.holding;//: holding/StackTest.java
import com.yjl.javabase.thinkinjava.net.mindview.util.*;
public class StackTest {
public static void main(String[] args) {
Stack<String> stack = new Stack<String>();
for(String s : "My dog has fleas".split(" "))
stack.push(s);
while(!stack.empty())
System.out.print(stack.pop() + " ");
}
} /* Output:
fleas has dog My
*///:~
| [
"519100949@qq.com"
] | 519100949@qq.com |
bae185299a04e356efa4f908ccab0cb95a5470ee | df755f1ad9f30e2968faaf65d5f203ac9de8dcf1 | /mftcc-platform-web-master/src/main/java/app/base/shiro/SysShiroRealm.java | fc5651ef2649f22afe67384ae0085ce7fc839826 | [] | no_license | gaoqiang9399/eclipsetogit | afabf761f77fe542b3da1535b15d4005274b8db7 | 03e02ef683929ea408d883ea35cbccf07a4c43e6 | refs/heads/master | 2023-01-22T16:42:32.813383 | 2020-11-23T07:31:23 | 2020-11-23T07:31:23 | 315,209,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,898 | java | package app.base.shiro;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import app.component.sys.entity.SysUser;
import app.component.sys.feign.SysUserFeign;
/**
* MyShiroRealm
*
*/
public class SysShiroRealm extends AuthorizingRealm {
public SysShiroRealm() {
// super();
// super.setCachingEnabled(true);
// super.setAuthorizationCachingEnabled(true);
}
private static final Logger logger = LoggerFactory.getLogger(SysShiroRealm.class);
@Autowired
private SysUserFeign sysUserFeign;
/**
* 权限认证,为当前登录的Subject授予角色和权限
*
* @see 经测试:本例中该方法的调用时机为需授权资源被访问时
* @see 经测试:并且每次访问需授权资源时都会执行该方法中的逻辑,这表明本例中默认并未启用AuthorizationCache
* @see 经测试:如果连续访问同一个URL(比如刷新),该方法不会被重复调用,Shiro有一个时间间隔(也就是cache时间,在ehcache-shiro.xml中配置),超过这个时间间隔再刷新页面,该方法会被执行
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
logger.info("##################执行Shiro权限认证##################");
// 获取当前登录输入的用户名,等价于(String)
// principalCollection.fromRealm(getName()).iterator().next();
String loginName = (String) super.getAvailablePrincipal(principalCollection);
// 到数据库查是否有此对象
// User user=userService.findByName(loginName);//
// 实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
// TODO
SysUser sysUserSearch = new SysUser();
sysUserSearch.setOpNo(loginName);
SysUser user;
try {
user = sysUserFeign.getById(sysUserSearch);
} catch (Exception e) {
e.printStackTrace();
return null;
}
if (user != null) {
// 权限信息对象info,用来存放查出的用户的所有的角色(role)及权限(permission)
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
// 用户的角色集合
Set<String> set = new HashSet<String>();
set.add(user.getRoleNo());// "admin");//todo: roleID
info.setRoles(set);
// 用户的角色对应的所有权限,如果只使用角色定义访问权限,下面的四行可以不要
List<String> list = new ArrayList<String>();
list.add(user.getRoleNo());
info.addStringPermissions(list);// menuURLs
return info;
}
// 返回null的话,就会导致任何用户访问被拦截的请求时,都会自动跳转到unauthorizedUrl指定的地址
return null;
}
/**
* 登录认证
*/
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
// UsernamePasswordToken对象用来存放提交的登录信息
UsernamePasswordToken token = (UsernamePasswordToken) authenticationToken;
logger.info("验证当前Subject时获取到token为:" + ReflectionToStringBuilder.toString(token, ToStringStyle.MULTI_LINE_STYLE));
// 查出是否有此用户
SysUser sysUserSearch = new SysUser();
sysUserSearch.setOpNo(token.getUsername());
SysUser user = null;
try {
user = sysUserFeign.getById(sysUserSearch);
} catch (Exception e) {
e.printStackTrace();
throw new AuthenticationException("查询用户失败!");
}
if (user != null && ("1").equals(user.getOpSts())) {
// 若存在,将此用户存放到登录认证info中,无需自己做密码对比,Shiro会为我们进行密码对比校验
return new SimpleAuthenticationInfo(user.getOpNo(), user.getPasswordhash(), getName());
}
return null;
}
public void clearAllCachedAuthorizationInfo() {
getAuthorizationCache().clear();
// super.clearCachedAuthorizationInfo();
// clearCachedAuthorizationInfo();
}
public void clearAllCachedAuthenticationInfo() {
getAuthenticationCache().clear();
}
public void clearAllCache() {
clearAllCachedAuthenticationInfo();
clearAllCachedAuthorizationInfo();
}
} | [
"gaoqiang1@chenbingzhu.zgcGuaranty.net"
] | gaoqiang1@chenbingzhu.zgcGuaranty.net |
2f41e07fc52905c465e4052064a1e68ea2082a14 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/12/org/apache/commons/lang3/exception/ExceptionUtils_getRootCauseStackTrace_516.java | ec79160077756a822a648c7b473a6c315fe0c32d | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,603 | java |
org apach common lang3 except
util manipul examin
code throwabl code object
version
except util exceptionutil
creat compact stack trace root suppli
code throwabl code
output method consist jdk version
consist root except wrap
except separ wrap note opposit
order jdk1 displai
param throwabl throwabl examin
arrai stack trace frame
string root stack trace getrootcausestacktrac throwabl throwabl
throwabl
arrai util arrayutil empti string arrai
throwabl throwabl throwabl getthrow throwabl
count throwabl length
list string frame arrai list arraylist string
list string trace nexttrac stack frame list getstackframelist throwabl count
count
list string trace trace nexttrac
trace nexttrac stack frame list getstackframelist throwabl
remov common frame removecommonfram trace trace nexttrac
count
frame add throwabl string tostr
frame add wrap marker throwabl string tostr
trace size
frame add trace
frame arrai toarrai string frame size
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
0f1eb2574fd1bfa35dd5cfd157acf74f0370b93c | c753b739b8e5484c0251113b797c442ef0b3bb49 | /src/org/greatfree/app/search/dip/container/cluster/entry/StartSearchEngine.java | 15a95e9eafde128c3e2858fbdee53f76151db8d2 | [] | no_license | 640351963/Wind | 144c0e9e9f3fdf3ee398f9f1a26a3434ca2dfabf | 0493d95a1fa8de2de218e651e8ce16be00b8ba38 | refs/heads/master | 2023-05-03T03:17:06.737980 | 2021-05-22T19:24:41 | 2021-05-22T19:24:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,116 | java | package org.greatfree.app.search.dip.container.cluster.entry;
import java.io.IOException;
import org.greatfree.chat.ChatConfig;
import org.greatfree.data.ServerConfig;
import org.greatfree.exceptions.DistributedNodeFailedException;
import org.greatfree.exceptions.RemoteReadException;
import org.greatfree.util.TerminateSignal;
// Created: 01/14/2019, Bing Li
class StartSearchEngine
{
public static void main(String[] args)
{
System.out.println("Search entry starting up ...");
try
{
SearchEntry.CLUSTER().start(ChatConfig.CHAT_SERVER_PORT, new SearchTask());
}
catch (ClassNotFoundException | IOException | RemoteReadException | DistributedNodeFailedException e)
{
e.printStackTrace();
}
System.out.println("Search entry started ...");
while (!TerminateSignal.SIGNAL().isTerminated())
{
try
{
// If the terminating flag is false, it is required to sleep for some time. Otherwise, it might cause the high CPU usage. 08/22/2014, Bing Li
Thread.sleep(ServerConfig.TERMINATE_SLEEP);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
}
| [
"bing.li@asu.edu"
] | bing.li@asu.edu |
a6b1ea00ed1601da1679d20a6bcad6790292eb0d | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/platformtools/r.java | f232303ed5ba305bebc1df7aeb5e00b6c3a8bb3e | [] | 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 | 555 | java | package com.tencent.mm.platformtools;
import android.os.Build.VERSION;
import android.view.View;
import com.tencent.matrix.trace.core.AppMethodBeat;
public final class r {
public static void ci(View view) {
AppMethodBeat.i(16669);
if (view == null) {
AppMethodBeat.o(16669);
return;
}
if (VERSION.SDK_INT >= 11) {
u uVar = new u();
if (VERSION.SDK_INT >= 11) {
view.setLayerType(1, null);
}
}
AppMethodBeat.o(16669);
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
1919bdc30401548e1eec168dd6d3cb1a8e9f7f82 | 4b027a96e457f90fdd146c73a92a99a63b5f6cab | /level36/lesson06/task01/Solution.java | 05c4b68b485d472f172ef36241e33c7d3bb6319a | [] | no_license | Byshevsky/JavaRush | c44a3b25afca677bbe5b6c015aec7c2561ca4830 | d8965bc8b5f060af558cc86924ae6488727cdbd4 | refs/heads/master | 2021-05-02T12:17:48.896494 | 2016-12-26T21:56:12 | 2016-12-26T21:56:12 | 52,143,706 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 946 | java | package com.javarush.test.level36.lesson06.task01;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/* Найти класс по описанию
1. Реализует интерфейс List
2. Является приватным статическим классом внутри популярного утилитного класса
3. Доступ по индексу запрещен - кидается исключение IndexOutOfBoundsException
4. Используйте рефлекшн, чтобы добраться до искомого класса
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getExpectedClass());
}
public static Class getExpectedClass() {
return Collections.EMPTY_LIST.getClass();
}
}
| [
"igberda2011@gmail.com"
] | igberda2011@gmail.com |
639bedab2de25280c5578f821aded8bf2adcd1e1 | 610e3f2d3ee2d04241bc0d05dd91cef127d842c0 | /src/com/ivend/iintegrationservice/_2010/_12/XUpdateLoyaltyCustomerResponse.java | c8fe3cffe127a586c018ac5dc603b44f0a6de418 | [] | no_license | MasterInc/InventoryUpdateWS | 5d9ff02b7cf868035e68a6410714b087edcde367 | a768dfefc0ee4dc6b6e4467a0a74b49707846dcf | refs/heads/master | 2021-01-10T16:16:46.270984 | 2015-11-27T21:34:01 | 2015-11-27T21:34:01 | 46,999,934 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,033 | java |
package com.ivend.iintegrationservice._2010._12;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="X_UpdateLoyaltyCustomerResult" type="{http://www.iVend.com/IIntegrationService/2010/12}Customer" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"xUpdateLoyaltyCustomerResult"
})
@XmlRootElement(name = "X_UpdateLoyaltyCustomerResponse")
public class XUpdateLoyaltyCustomerResponse {
@XmlElementRef(name = "X_UpdateLoyaltyCustomerResult", namespace = "http://www.iVend.com/IIntegrationService/2010/12", type = JAXBElement.class, required = false)
protected JAXBElement<Customer> xUpdateLoyaltyCustomerResult;
/**
* Gets the value of the xUpdateLoyaltyCustomerResult property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Customer }{@code >}
*
*/
public JAXBElement<Customer> getXUpdateLoyaltyCustomerResult() {
return xUpdateLoyaltyCustomerResult;
}
/**
* Sets the value of the xUpdateLoyaltyCustomerResult property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link Customer }{@code >}
*
*/
public void setXUpdateLoyaltyCustomerResult(JAXBElement<Customer> value) {
this.xUpdateLoyaltyCustomerResult = value;
}
}
| [
"jahir.nava@gmail.com"
] | jahir.nava@gmail.com |
f4963618197bc908fa34aed29f3fccff1dc8a640 | 97de4b551e19572d4ee9809336e9af5586b91e59 | /app/src/main/java/com/watchxxi/freemovies/adapters/ActiveSubscriptionAdapter.java | 94ef7ef025bfc9d2bfcd796a6dfa085e49b04e7a | [] | no_license | fandofastest/nontonxxinew | c9b1ecbd7de70831166c60ff29f099ceb41ffc31 | 058dae017cdaa4fed3b24f2bea798f7073ef7ccc | refs/heads/master | 2021-05-26T04:20:33.779471 | 2020-06-06T14:39:44 | 2020-06-06T14:39:44 | 254,049,922 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,539 | java | package com.watchxxi.freemovies.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.watchxxi.freemovies.R;
import com.watchxxi.freemovies.network.model.ActiveSubscription;
import java.util.List;
public class ActiveSubscriptionAdapter extends RecyclerView.Adapter<ActiveSubscriptionAdapter.ViewHolder> {
private List<ActiveSubscription> activeSubscriptions;
private Context context;
private OnItemClickLiestener onItemClickLiestener;
public ActiveSubscriptionAdapter(List<ActiveSubscription> activeSubscriptions, Context context) {
this.activeSubscriptions = activeSubscriptions;
this.context = context;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.active_subscription_layout, parent,
false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
ActiveSubscription activeSubscription = activeSubscriptions.get(position);
if (activeSubscription != null) {
holder.serialNoTv.setText(position+1+"");
holder.planTv.setText(activeSubscription.getPlanTitle());
holder.purchaseDateTv.setText(activeSubscription.getPaymentTimestamp());
holder.fromTv.setText(activeSubscription.getStartDate());
holder.toTv.setText(activeSubscription.getExpireDate());
}
}
@Override
public int getItemCount() {
return activeSubscriptions.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView serialNoTv, planTv, purchaseDateTv, fromTv, toTv;
Button actionBt;
public ViewHolder(@NonNull View itemView) {
super(itemView);
serialNoTv = itemView.findViewById(R.id.serial_no_tv);
planTv = itemView.findViewById(R.id.plan_tv);
purchaseDateTv = itemView.findViewById(R.id.purchase_date_tv);
fromTv = itemView.findViewById(R.id.from_tv);
toTv = itemView.findViewById(R.id.to_tv);
actionBt = itemView.findViewById(R.id.action_bt);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (onItemClickLiestener != null) {
onItemClickLiestener.onItemClick();
}
}
});
actionBt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (onItemClickLiestener != null) {
onItemClickLiestener.onCancelBtClick(activeSubscriptions.get(getAdapterPosition())
.getSubscriptionId(), getAdapterPosition());
}
}
});
}
}
public void setOnItemClickLiestener(OnItemClickLiestener onItemClickLiestener) {
this.onItemClickLiestener = onItemClickLiestener;
}
public interface OnItemClickLiestener {
void onItemClick();
void onCancelBtClick(String subscriptionId, int position);
}
}
| [
"fandofast@gmail.com"
] | fandofast@gmail.com |
77a5ca979cadb227ca7556222606bf22f28c5252 | d4880ab76f3ec23930eff43fb37cd659bdeb4c1f | /aliyun-java-sdk-idrsservice/src/main/java/com/aliyuncs/idrsservice/model/v20200630/GetRuleRequest.java | 6a3cfcfe55f5e8f19e11d9911903b3d2e16548c4 | [
"Apache-2.0"
] | permissive | kentzh/aliyun-openapi-java-sdk | 8337aa40b881beb411532978253310f540baaf74 | b73c11ed753aa90325e3f41eaec7bcd55a55494e | refs/heads/master | 2022-12-04T16:36:16.771365 | 2020-08-18T06:56:40 | 2020-08-18T06:56:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,214 | 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 com.aliyuncs.idrsservice.model.v20200630;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
/**
* @author auto create
* @version
*/
public class GetRuleRequest extends RpcAcsRequest<GetRuleResponse> {
private String id;
public GetRuleRequest() {
super("idrsservice", "2020-06-30", "GetRule", "idrsservice");
setMethod(MethodType.POST);
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
if(id != null){
putQueryParameter("Id", id);
}
}
@Override
public Class<GetRuleResponse> getResponseClass() {
return GetRuleResponse.class;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
4b6750a32406afbef4f63dadc702aa5fda725e36 | ec1c08c9783a5ed9b2101ed5844cbd1f1dcc470e | /ExpressSystem/client/src/main/java/nju/sec/yz/ExpressSystem/bl/receiptbl/ReceiptController.java | ad9965d56a2c4e57d285074cc1b1ba0417a73abb | [] | no_license | NJUse2014yz/SEC2 | b8016cd7e9047eb573195336df654f3ddcbb5ae2 | 48693de754b7a2a30ce3594d5aa25f05d91338be | refs/heads/master | 2021-01-10T20:32:39.031686 | 2016-01-05T05:30:57 | 2016-01-05T05:30:57 | 42,342,086 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,062 | java | package nju.sec.yz.ExpressSystem.bl.receiptbl;
import java.util.List;
import nju.sec.yz.ExpressSystem.blservice.receiptBlService.ReceiptBlService;
import nju.sec.yz.ExpressSystem.common.ReceiptType;
import nju.sec.yz.ExpressSystem.common.ResultMessage;
import nju.sec.yz.ExpressSystem.vo.ReceiptVO;
/**
* 负责实现单据业务所需要的服务
* @author 周聪
*
*/
public class ReceiptController implements ReceiptBlService{
@Override
public List<ReceiptVO> getAll() {
ReceiptList list=new ReceiptList();
return list.getAll();
}
@Override
public ReceiptVO getSingle(String id) {
ReceiptList list=new ReceiptList();
return list.getSingle(id);
}
@Override
public ResultMessage approve(ReceiptVO vo) {
ReceiptList list=new ReceiptList();
return list.approve(vo);
}
@Override
public List<ReceiptVO> getByType(ReceiptType type) {
ReceiptList list=new ReceiptList();
return list.getByType(type);
}
@Override
public ResultMessage modify(ReceiptVO vo) {
ReceiptList list=new ReceiptList();
return list.modify(vo);
}
}
| [
"244053679@qq.com"
] | 244053679@qq.com |
29a41f3b5ac00bbbb2c1b0e693c39460a3dccc58 | 445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602 | /aliyun-java-sdk-dcdn/src/main/java/com/aliyuncs/dcdn/model/v20180115/DescribeUserLogserviceStatusResponse.java | cc132c3570aedb2a95ca99d4fdda075324bb8f25 | [
"Apache-2.0"
] | permissive | caojiele/aliyun-openapi-java-sdk | b6367cc95469ac32249c3d9c119474bf76fe6db2 | ecc1c949681276b3eed2500ec230637b039771b8 | refs/heads/master | 2023-06-02T02:30:02.232397 | 2021-06-18T04:08:36 | 2021-06-18T04:08:36 | 172,076,930 | 0 | 0 | NOASSERTION | 2019-02-22T14:08:29 | 2019-02-22T14:08:29 | null | UTF-8 | Java | false | false | 1,995 | 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 com.aliyuncs.dcdn.model.v20180115;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.dcdn.transform.v20180115.DescribeUserLogserviceStatusResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class DescribeUserLogserviceStatusResponse extends AcsResponse {
private String requestId;
private Boolean enabled;
private Boolean onService;
private Boolean inDebt;
private Boolean inDebtOverdue;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Boolean getEnabled() {
return this.enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public Boolean getOnService() {
return this.onService;
}
public void setOnService(Boolean onService) {
this.onService = onService;
}
public Boolean getInDebt() {
return this.inDebt;
}
public void setInDebt(Boolean inDebt) {
this.inDebt = inDebt;
}
public Boolean getInDebtOverdue() {
return this.inDebtOverdue;
}
public void setInDebtOverdue(Boolean inDebtOverdue) {
this.inDebtOverdue = inDebtOverdue;
}
@Override
public DescribeUserLogserviceStatusResponse getInstance(UnmarshallerContext context) {
return DescribeUserLogserviceStatusResponseUnmarshaller.unmarshall(this, context);
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
9233f8c64352ae92fdc29adcb67a8d8b1db5be22 | 832e07840208b2763084cfc033696928542b8adc | /App_ushihui/src/main/java/com/mcz/xhj/yz/dr_app/ConponsAct.java | d951213cdb37b028d660312c16cc888a1e0c6e1a | [] | no_license | JinnL/ushihui | f15a63df5ac3aecf308be32ef093ffef6193c81c | bb4a7a165414212191ae068c84ef2ba0884e44fe | refs/heads/master | 2020-12-10T22:32:29.948346 | 2020-01-18T09:01:00 | 2020-01-18T09:01:00 | 233,728,545 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,226 | java | package com.mcz.xhj.yz.dr_app;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.mcz.xhj.R;
import com.viewpagerindicator.TabPageIndicator;
import com.mcz.xhj.yz.dr_app.find.CallCenterActivity;
import com.mcz.xhj.yz.dr_app_fragment.Frag_Myconpons_offtime;
import com.mcz.xhj.yz.dr_app_fragment.Frag_Myconpons_unuse;
import com.mcz.xhj.yz.dr_app_fragment.Frag_Myconpons_used;
import com.mcz.xhj.yz.dr_application.LocalApplication;
import com.mcz.xhj.yz.dr_urlconfig.UrlConfig;
import com.mcz.xhj.yz.dr_view.DialogMaker;
import butterknife.BindView;
public class ConponsAct extends BaseActivity {
private String[] tab;//标题
// 初始化数据
private TabFragPA tabPA;
@BindView(R.id.vp_conpons)
ViewPager vp_conpons;
@BindView(R.id.more_indicator)
TabPageIndicator tabin;
@BindView(R.id.title_centertextview)
TextView centertv;
@BindView(R.id.title_righttextview)
TextView title_righttextview;
@BindView(R.id.tv_usedconpons)
TextView tv_usedconpons;
@BindView(R.id.title_leftimageview)
ImageView leftima;
@BindView(R.id.tv_commom_question)
TextView tv_commom_question;
@BindView(R.id.tv_contact_us)
TextView tv_contact_us;
@Override
protected int getLayoutId() {
// TODO Auto-generated method stub
return R.layout.act_conpons;
}
private Fragment frag;
private Fragment frag1;
private Fragment frag2;
@Override
protected void initParams() {
centertv.setText("优惠券 ");
Drawable nav_up = getResources().getDrawable(R.mipmap.wenhao_plus);
nav_up.setBounds(0, 0, nav_up.getMinimumWidth(), nav_up.getMinimumHeight());
centertv.setCompoundDrawables(null, null, nav_up, null);
title_righttextview.setVisibility(View.VISIBLE);
title_righttextview.setText("去投资");
title_righttextview.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
LocalApplication.getInstance().getMainActivity().setCheckedFram(2);
finish();
}
});
leftima.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
tab = new String[]{"返现红包", "加息券", "翻倍券"};
// 给viewpager设置适配器
tabPA = new TabFragPA(getSupportFragmentManager());//继承fragmentactivity
vp_conpons.setAdapter(tabPA);
// viewpagerindictor和viewpager关联
tabin.setViewPager(vp_conpons);
vp_conpons.setOffscreenPageLimit(2);
tv_usedconpons.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ConponsAct.this, ConponsUsed.class));
}
});
centertv.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ConponsAct.this, WebViewActivity.class)
.putExtra("URL", UrlConfig.REMINDER + "?app=true")
.putExtra("TITLE", "优惠券温馨提示")
.putExtra("BANNER", "banner"));
}
});
tv_commom_question.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(ConponsAct.this, CallCenterActivity.class));
}
});
tv_contact_us.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
DialogMaker.showKufuPhoneDialog(ConponsAct.this);
}
});
}
class TabFragPA extends FragmentPagerAdapter {
public TabFragPA(FragmentManager fm) {
super(fm);
// TODO Auto-generated constructor stub
}
@Override
public Fragment getItem(int arg0) {
switch (arg0) {
case 0://返现
frag = frag == null ? new Frag_Myconpons_unuse() : frag;
return frag;
case 1://加息券
frag1 = frag1 == null ? new Frag_Myconpons_used() : frag1;
return frag1;
case 2://翻倍券
frag2 = frag2 == null ? new Frag_Myconpons_offtime() : frag2;
return frag2;
default:
return null;
}
}
@Override
public CharSequence getPageTitle(int position) {
return tab[position % tab.length];
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return tab.length;
}
}
}
| [
"lijun.tong@jibaoyuan.net"
] | lijun.tong@jibaoyuan.net |
a1c6239e0589771f460df60dde08c309e9d1c127 | 8759da2b77b1c48ad1e015cdd9737e5566a6f24e | /src/Practice/Practice_13_Abstract03/Sekil.java | 1c56e47596dc0641f144c5a865c6843f7755348a | [] | no_license | Mehmet0626/Java2021allFiles | aa1e55f652476a6538d7e897b90133af37f24e7d | 3a84ba2cfc9f966a23597f0bee3bb4b58846803d | refs/heads/master | 2023-08-31T05:05:45.057755 | 2021-10-11T09:06:04 | 2021-10-11T09:06:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 490 | java | package Practice.Practice_13_Abstract03;
/*
*Sekil diye bir class olusturalim cevre ve alan abstract methodlari olsun
-ucgen
-eskenar
-ikizkenar
-cesitkenar
-dikdortgen
-daire
herbirinin alan ve cevresini hesaplayan kodu yazin
*/
public abstract class Sekil {
// abstract class larda body olmaz..
// abstract icinde concrete method yapabiliriz..
// parametreli cons olmaz..
public abstract int cevre();
public abstract int alan();
} | [
"delenkar2825@gmail.com"
] | delenkar2825@gmail.com |
0a2d24a68b3c5a1853f2ed336672ef3be6ac3f43 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc106/C/4553560.java | d7b7293ffbe4b4fafd327a2199963d1d9e0d95c0 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String s = sc.next();
long k = sc.nextLong();
sc.close();
int idx = -1;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == '1') {
idx = i;
} else {
break;
}
}
if (idx == -1) {
System.out.println(s.charAt(0));
} else if (idx >= k - 1) {
System.out.println("1");
} else {
System.out.println(s.charAt(idx + 1));
}
}
} | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
554855f11eb75240d02758808cd5c7eb61aefd50 | e39843b2dead25cce89aec95f0cf2953fb43321d | /app/src/main/java/vision/genesis/clientapp/feature/main/social/SocialMainPresenter.java | 29c80e6a7f3acc392909f1d89427b9243cc2d374 | [] | no_license | GenesisVision/android-client | 6727d5c61f2134ea00b308b00a52fc531a78d110 | 319b7dfd53ad498a65c2ee80b0e0ce15aef8aec6 | refs/heads/develop | 2022-05-13T08:56:00.715425 | 2022-04-18T11:17:16 | 2022-04-18T11:17:16 | 118,433,575 | 16 | 7 | null | 2021-04-01T19:41:53 | 2018-01-22T09:14:35 | Java | UTF-8 | Java | false | false | 2,927 | java | package vision.genesis.clientapp.feature.main.social;
import android.content.Context;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp.MvpPresenter;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
import io.swagger.client.model.Post;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import vision.genesis.clientapp.GenesisVisionApplication;
import vision.genesis.clientapp.feature.main.social.feed.SocialLiveView;
import vision.genesis.clientapp.feature.main.social.post.actions.SocialPostActionsBottomSheetFragment;
import vision.genesis.clientapp.managers.AuthManager;
import vision.genesis.clientapp.managers.SettingsManager;
import vision.genesis.clientapp.model.SocialPostType;
import vision.genesis.clientapp.model.User;
import vision.genesis.clientapp.model.events.OnMediaPostClickedEvent;
/**
* GenesisVisionAndroid
* Created by Vitaly on 13/06/2020.
*/
@InjectViewState
public class SocialMainPresenter extends MvpPresenter<SocialMainView> implements SocialLiveView.Listener
{
@Inject
public Context context;
@Inject
public AuthManager authManager;
@Inject
public SettingsManager settingsManager;
private Subscription userSubscription;
private boolean isActive;
@Override
protected void onFirstViewAttach() {
super.onFirstViewAttach();
GenesisVisionApplication.getComponent().inject(this);
EventBus.getDefault().register(this);
subscribeToUser();
}
@Override
public void onDestroy() {
if (userSubscription != null) {
userSubscription.unsubscribe();
}
EventBus.getDefault().unregister(this);
super.onDestroy();
}
void onResume() {
isActive = true;
updateAll();
}
void onPause() {
isActive = false;
}
private void updateAll() {
getViewState().updateMedia();
getViewState().updateLive();
getViewState().updateHot();
getViewState().updateFeed();
getViewState().updateUsers();
}
private void subscribeToUser() {
userSubscription = authManager.userSubject
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.newThread())
.subscribe(this::userUpdated, this::handleUserError);
}
private void userUpdated(User user) {
getViewState().showAddNewPostButton(user != null);
}
private void handleUserError(Throwable throwable) {
getViewState().showAddNewPostButton(false);
}
@Subscribe
public void onEventMainThread(OnMediaPostClickedEvent event) {
if (isActive) {
getViewState().openMediaUrl(event.getPost().getUrl());
}
}
@Override
public void onShowSocialPostActions(Post post, SocialPostType type, boolean isOwnPost, SocialPostActionsBottomSheetFragment.Listener listener) {
getViewState().showSocialPostActions(post, type, isOwnPost, listener);
}
@Override
public void onPostEditClicked(Post post) {
getViewState().showEditPost(post);
}
}
| [
"dev.prus@gmail.com"
] | dev.prus@gmail.com |
4001889aae27b412e21f2b731a750228ab9c0093 | 569ce95bb1554b653468a86e0a8a9450a4215287 | /proxy/src/main/java/com/luo/dbroute/OrderDao.java | 4dbecdd8b39187929a367317241377d97ab81729 | [] | no_license | RononoaZoro/archer-pattern | bf2449a96e77caae289b51efb0f3575d6549727d | 2bb352dcf571892686c3b3e354739b47cd5472a4 | refs/heads/master | 2022-07-30T21:43:44.248197 | 2019-11-07T07:47:22 | 2019-11-07T07:47:22 | 201,577,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.luo.dbroute;
/**
* Created by Tom.
*/
public class OrderDao {
public int insert(Order order){
System.out.println("OrderDao创建Order成功!");
return 1;
}
}
| [
"352907839@qq.com"
] | 352907839@qq.com |
99532c13bc2d776f38c14b510e9c4968bdcd30ae | 7e651dc44a5fd2b636003958d7e5a283e1828318 | /minecraft/net/minecraft/client/util/JsonException.java | 18117bd07b132578e0ca75e5f6c9f2133c17f9fb | [] | no_license | Niklas61/CandyClient | b05a1edc0d360dacc84fed7944bce5dc0a873be4 | 97e317aaacdcf029b8e87960adab4251861371eb | refs/heads/master | 2023-04-24T15:48:59.747252 | 2021-05-12T16:54:32 | 2021-05-12T16:54:32 | 352,600,734 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,546 | java | package net.minecraft.client.util;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
public class JsonException extends IOException
{
private final List<JsonException.Entry> field_151383_a = Lists.newArrayList();
private final String field_151382_b;
public JsonException(String p_i45279_1_)
{
this.field_151383_a.add(new JsonException.Entry());
this.field_151382_b = p_i45279_1_;
}
public JsonException(String p_i45280_1_, Throwable p_i45280_2_)
{
super(p_i45280_2_);
this.field_151383_a.add(new JsonException.Entry());
this.field_151382_b = p_i45280_1_;
}
public void func_151380_a(String p_151380_1_)
{
this.field_151383_a.get(0).func_151373_a(p_151380_1_);
}
public void func_151381_b(String p_151381_1_)
{
this.field_151383_a.get(0).field_151376_a = p_151381_1_;
this.field_151383_a.add(0, new JsonException.Entry());
}
public String getMessage()
{
return "Invalid " + this.field_151383_a.get(this.field_151383_a.size() - 1).toString() + ": " + this.field_151382_b;
}
public static JsonException func_151379_a(Exception p_151379_0_)
{
if (p_151379_0_ instanceof JsonException)
{
return (JsonException)p_151379_0_;
}
else
{
String s = p_151379_0_.getMessage();
if (p_151379_0_ instanceof FileNotFoundException)
{
s = "File not found";
}
return new JsonException(s, p_151379_0_);
}
}
public static class Entry
{
private String field_151376_a;
private final List<String> field_151375_b;
private Entry()
{
this.field_151376_a = null;
this.field_151375_b = Lists.newArrayList();
}
private void func_151373_a(String p_151373_1_)
{
this.field_151375_b.add(0, p_151373_1_);
}
public String func_151372_b()
{
return StringUtils.join( this.field_151375_b , "->");
}
public String toString()
{
return this.field_151376_a != null ? (!this.field_151375_b.isEmpty() ? this.field_151376_a + " " + this.func_151372_b() : this.field_151376_a) : (!this.field_151375_b.isEmpty() ? "(Unknown file) " + this.func_151372_b() : "(Unknown file)");
}
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
88ddb6c8b55646dbcbbd9b07308e0ff3060ccc1f | ac6d56b6aafc7f66a7a22aca5cc2b809a71e7568 | /src/main/java/com/matsg/battlegrounds/config/BattleCacheYaml.java | aaa275355c038e31e80cd07321583382bfbba2c2 | [] | no_license | thundereye2k/battlegrounds-plugin | 3aa4d3e8b30fedeb41a031801b9e2efe9071a498 | 09d3600caf5949a32fe8296c402f636f652509f4 | refs/heads/master | 2020-03-31T10:30:07.474255 | 2018-10-08T17:01:34 | 2018-10-08T17:01:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,908 | java | package com.matsg.battlegrounds.config;
import com.matsg.battlegrounds.api.Battlegrounds;
import com.matsg.battlegrounds.api.config.AbstractYaml;
import com.matsg.battlegrounds.api.config.CacheYaml;
import org.bukkit.Location;
import java.io.IOException;
public class BattleCacheYaml extends AbstractYaml implements CacheYaml {
public BattleCacheYaml(Battlegrounds plugin, String resource) throws IOException {
super(plugin, plugin.getDataFolder().getPath(), resource, false);
}
public BattleCacheYaml(Battlegrounds plugin, String path, String resource) throws IOException {
super(plugin, path, resource, false);
}
public Location getLocation(String path) {
if (getString(path) == null) {
return null;
}
String[] locationString = getString(path).split(",");
if (locationString.length <= 0) {
return null;
}
try {
return new Location(plugin.getServer().getWorld(locationString[0]), Double.parseDouble(locationString[1]),
Double.parseDouble(locationString[2]), Double.parseDouble(locationString[3]),
Float.parseFloat(locationString[4]), Float.parseFloat(locationString[5]));
} catch (NumberFormatException e) {
e.printStackTrace();
return null;
}
}
public void setLocation(String path, Location location, boolean block) {
if (!block) {
set(path, location.getWorld().getName() + "," + location.getBlockX() + "," + location.getBlockY() + "," +
location.getBlockZ() + "," + location.getYaw() + "," + 0.0);
} else {
set(path, location.getWorld().getName() + "," + (location.getBlockX() + 0.5) + "," + location.getBlockY() + "," +
(location.getBlockZ() + 0.5) + "," + location.getYaw() + "," + 0.0);
}
}
} | [
"matsgemmeke@gmail.com"
] | matsgemmeke@gmail.com |
efdfb1b69a3760299f5f7ec8716dc85b46fb7434 | 6322eab33bc0a505b2623ce3e0346b6aa649094b | /device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java | c55fb4565696d056c314ce2a9c8062094d9aaba1 | [
"BSD-3-Clause"
] | permissive | 453483289/chromium | 2f6d1c2c067d0261251c0051aa877ed532882d40 | 1b4ef1a69b08dd2d779521118ddb1f3a285d4c83 | refs/heads/master | 2021-10-01T05:51:06.768376 | 2015-10-16T20:44:36 | 2015-10-16T20:45:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,755 | java | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.device.bluetooth;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.os.Build;
import android.os.ParcelUuid;
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import java.util.List;
/**
* Exposes android.bluetooth.BluetoothDevice as necessary for C++
* device::BluetoothDeviceAndroid.
*
* Lifetime is controlled by device::BluetoothDeviceAndroid.
*/
@JNINamespace("device")
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
final class ChromeBluetoothDevice {
private static final String TAG = "Bluetooth";
private long mNativeBluetoothDeviceAndroid;
final Wrappers.BluetoothDeviceWrapper mDevice;
private List<ParcelUuid> mUuidsFromScan;
Wrappers.BluetoothGattWrapper mBluetoothGatt;
private final BluetoothGattCallbackImpl mBluetoothGattCallbackImpl;
private ChromeBluetoothDevice(
long nativeBluetoothDeviceAndroid, Wrappers.BluetoothDeviceWrapper deviceWrapper) {
mNativeBluetoothDeviceAndroid = nativeBluetoothDeviceAndroid;
mDevice = deviceWrapper;
mBluetoothGattCallbackImpl = new BluetoothGattCallbackImpl();
Log.v(TAG, "ChromeBluetoothDevice created.");
}
/**
* Handles C++ object being destroyed.
*/
@CalledByNative
private void onBluetoothDeviceAndroidDestruction() {
disconnectGatt();
mNativeBluetoothDeviceAndroid = 0;
}
// ---------------------------------------------------------------------------------------------
// BluetoothDeviceAndroid methods implemented in java:
// Implements BluetoothDeviceAndroid::Create.
// 'Object' type must be used because inner class Wrappers.BluetoothDeviceWrapper reference is
// not handled by jni_generator.py JavaToJni. http://crbug.com/505554
@CalledByNative
private static ChromeBluetoothDevice create(
long nativeBluetoothDeviceAndroid, Object deviceWrapper) {
return new ChromeBluetoothDevice(
nativeBluetoothDeviceAndroid, (Wrappers.BluetoothDeviceWrapper) deviceWrapper);
}
// Implements BluetoothDeviceAndroid::UpdateAdvertisedUUIDs.
@CalledByNative
private boolean updateAdvertisedUUIDs(List<ParcelUuid> uuidsFromScan) {
if ((mUuidsFromScan == null && uuidsFromScan == null)
|| (mUuidsFromScan != null && mUuidsFromScan.equals(uuidsFromScan))) {
return false;
}
mUuidsFromScan = uuidsFromScan;
return true;
}
// Implements BluetoothDeviceAndroid::GetBluetoothClass.
@CalledByNative
private int getBluetoothClass() {
return mDevice.getBluetoothClass_getDeviceClass();
}
// Implements BluetoothDeviceAndroid::GetAddress.
@CalledByNative
private String getAddress() {
return mDevice.getAddress();
}
// Implements BluetoothDeviceAndroid::IsPaired.
@CalledByNative
private boolean isPaired() {
return mDevice.getBondState() == BluetoothDevice.BOND_BONDED;
}
// Implements BluetoothDeviceAndroid::GetUUIDs.
@CalledByNative
private String[] getUuids() {
int uuidCount = (mUuidsFromScan != null) ? mUuidsFromScan.size() : 0;
String[] string_array = new String[uuidCount];
for (int i = 0; i < uuidCount; i++) {
string_array[i] = mUuidsFromScan.get(i).toString();
}
// TODO(scheib): return merged list of UUIDs from scan results and,
// after a device is connected, discoverServices. crbug.com/508648
return string_array;
}
// Implements BluetoothDeviceAndroid::CreateGattConnectionImpl.
@CalledByNative
private void createGattConnectionImpl(Context context) {
Log.i(TAG, "connectGatt");
// autoConnect set to false as under experimentation using autoConnect failed to complete
// connections.
mBluetoothGatt =
mDevice.connectGatt(context, false /* autoConnect */, mBluetoothGattCallbackImpl);
}
// Implements BluetoothDeviceAndroid::DisconnectGatt.
@CalledByNative
private void disconnectGatt() {
Log.i(TAG, "BluetoothGatt.disconnect");
if (mBluetoothGatt != null) mBluetoothGatt.disconnect();
}
// Implements BluetoothDeviceAndroid::GetDeviceName.
@CalledByNative
private String getDeviceName() {
return mDevice.getName();
}
// Implements callbacks related to a GATT connection.
private class BluetoothGattCallbackImpl extends Wrappers.BluetoothGattCallbackWrapper {
@Override
public void onConnectionStateChange(final int status, final int newState) {
Log.i(TAG, "onConnectionStateChange status:%d newState:%s", status,
(newState == android.bluetooth.BluetoothProfile.STATE_CONNECTED)
? "Connected"
: "Disconnected");
if (newState == android.bluetooth.BluetoothProfile.STATE_CONNECTED) {
mBluetoothGatt.discoverServices();
}
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (mNativeBluetoothDeviceAndroid != 0) {
nativeOnConnectionStateChange(mNativeBluetoothDeviceAndroid, status,
newState == android.bluetooth.BluetoothProfile.STATE_CONNECTED);
}
}
});
}
@Override
public void onServicesDiscovered(final int status) {
Log.i(TAG, "onServicesDiscovered status:%d==%s", status,
status == android.bluetooth.BluetoothGatt.GATT_SUCCESS ? "OK" : "Error");
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
if (mNativeBluetoothDeviceAndroid != 0) {
for (Wrappers.BluetoothGattServiceWrapper service :
mBluetoothGatt.getServices()) {
// Create a device unique service ID. getInstanceId only differs
// between service instances with the same UUID.
String serviceInstanceId =
service.getUuid().toString() + service.getInstanceId();
nativeCreateGattRemoteService(
mNativeBluetoothDeviceAndroid, serviceInstanceId, service);
}
}
}
});
}
}
// ---------------------------------------------------------------------------------------------
// BluetoothAdapterDevice C++ methods declared for access from java:
// Binds to BluetoothDeviceAndroid::OnConnectionStateChange.
private native void nativeOnConnectionStateChange(
long nativeBluetoothDeviceAndroid, int status, boolean connected);
// Binds to BluetoothDeviceAndroid::CreateGattRemoteService.
// 'Object' type must be used for |bluetoothGattServiceWrapper| because inner class
// Wrappers.BluetoothGattServiceWrapper reference is not handled by jni_generator.py JavaToJni.
// http://crbug.com/505554
private native void nativeCreateGattRemoteService(long nativeBluetoothDeviceAndroid,
String instanceId, Object bluetoothGattServiceWrapper);
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
3d3a606d0104e59d99b81640f3d471cdbe23d89f | ec9f8d8f03918929490e5bb8f597e7cb3969a475 | /ahome-ext-kitchensink/src/com/ait/toolkit/ext/kitchensink/client/views/ContentPanel.java | 20faacf6ddc2dc47084b3a24e2f081b2f5d306e0 | [
"Apache-2.0"
] | permissive | dikalo/ahome-ext-kitchensink | 18ed38e85a4d87d3c1b295e02d2c21ee8bb4ec24 | 9c9ed86550dbc26f15c81448338ea5c63571c13e | refs/heads/master | 2021-05-29T01:49:58.819798 | 2014-11-03T22:44:19 | 2014-11-03T22:44:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 978 | java | /*
Copyright (c) 2014 Ahomé Innovation Technologies. 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.ait.toolkit.ext.kitchensink.client.views;
import com.ait.toolkit.sencha.ext.client.layout.BorderRegion;
import com.ait.toolkit.sencha.ext.client.ui.Panel;
public class ContentPanel extends Panel {
public ContentPanel() {
this.setId("content-panel");
this.setAutoScroll(true);
this.setTitle(" ");
this.setRegion(BorderRegion.CENTER);
}
}
| [
"jazzmatadazz@gmail.com"
] | jazzmatadazz@gmail.com |
59a0e146b57f7b300321ce3aa9796ca04e065086 | 10d77fabcbb945fe37e15ae438e360a89a24ea05 | /graalvm/transactions/fork/narayana/ArjunaJTA/jta/tests/classes/com/hp/mwtests/ts/jta/common/XACreator.java | 0fcaee0c0564a358c9acb29a6f7715a06e5287bb | [
"Apache-2.0",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"LicenseRef-scancode-other-copyleft"
] | permissive | nmcl/scratch | 1a881605971e22aa300487d2e57660209f8450d3 | 325513ea42f4769789f126adceb091a6002209bd | refs/heads/master | 2023-03-12T19:56:31.764819 | 2023-02-05T17:14:12 | 2023-02-05T17:14:12 | 48,547,106 | 2 | 1 | Apache-2.0 | 2023-03-01T12:44:18 | 2015-12-24T15:02:58 | Java | UTF-8 | Java | false | false | 1,345 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* (C) 2005-2006,
* @author JBoss Inc.
*/
/*
* Copyright (C) 1998, 1999, 2000,
*
* Hewlett-Packard Arjuna Labs,
* Newcastle upon Tyne,
* Tyne and Wear,
* UK.
*
* $Id: XACreator.java 2342 2006-03-30 13:06:17Z $
*/
package com.hp.mwtests.ts.jta.common;
import javax.transaction.xa.XAResource;
public interface XACreator
{
public XAResource create (String param, boolean print);
}
| [
"mlittle@redhat.com"
] | mlittle@redhat.com |
0b1530d73dbe370f5b19a9e04775b84a0810de86 | 4c961d0b75f44d99099b5c65680cdeced2aa8fe8 | /javaee/框架/springMVC/10springMVC_LoginIntercepter/src/com/ypy/model/User.java | 480873a601b43cb7269dd350002bf7e671ac7eca | [] | no_license | dl-ypy/dynamic-web | e00076b6519d07db5479c35678fba9c7b35895a7 | f5fb8ccf1e1119a174c8ee3aa3b7b444dc6e37bc | refs/heads/master | 2021-05-11T12:46:57.449564 | 2018-01-17T09:04:11 | 2018-01-17T09:04:11 | 117,663,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package com.ypy.model;
public class User {
private String name;
private String password;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
| [
"792015431@qq.com"
] | 792015431@qq.com |
53669558c91b6c361c6d4bb9d8bc3aef9e2b6d7b | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/75/org/apache/commons/math/linear/ArrayRealVector_ArrayRealVector_143.java | adca300811985e649a9aa5f651e2d82b46158a27 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,669 | java |
org apach common math linear
link real vector realvector arrai
version revis date
arrai real vector arrayrealvector abstract real vector abstractrealvector serializ
construct vector part doubl arrai
param arrai doubl
param po posit entri
param size number entri copi
arrai real vector arrayrealvector doubl po size
length po size
math runtim except mathruntimeexcept creat illeg argument except createillegalargumentexcept
fit posit size messag po size length
data size
po po size
data po doublevalu
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
144466bdca62cceb6fe03cebb3a9593e46d86d55 | e62c3b93b38d2d7781d38ba1cdbabfea2c1cf7af | /BOCMBankClient606/src/main/java/com/chinamworld/bocmbci/biz/safety/adapter/InsuranceProductAdapter.java | fc60550fca73ef0c7ff6aa8f2370ff0c44d9ad30 | [] | no_license | soghao/zgyh | df34779708a8d6088b869d0efc6fe1c84e53b7b1 | 09994dda29f44b6c1f7f5c7c0b12f956fc9a42c1 | refs/heads/master | 2021-06-19T07:36:53.910760 | 2017-06-23T14:23:10 | 2017-06-23T14:23:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,635 | java | package com.chinamworld.bocmbci.biz.safety.adapter;
import java.util.List;
import java.util.Map;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.chinamworld.bocmbci.R;
import com.chinamworld.bocmbci.bii.constant.Safety;
import com.chinamworld.bocmbci.biz.safety.SafetyDataCenter;
import com.chinamworld.bocmbci.utils.PopupWindowUtils;
import com.chinamworld.bocmbci.utils.StringUtil;
/**
* 保险产品适配器
*
* @author panwe
*
*/
public class InsuranceProductAdapter extends BaseAdapter {
private Context mContext;
private List<Map<String, Object>> mList;
public InsuranceProductAdapter(Context cn, List<Map<String, Object>> list) {
this.mContext = cn;
this.mList = list;
}
@Override
public int getCount() {
if (!StringUtil.isNullOrEmpty(mList)) {
return mList.size();
}
return 0;
}
@Override
public Object getItem(int position) {
if (!StringUtil.isNullOrEmpty(mList)) {
return mList.get(position);
}
return null;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
Map<String, Object> map = mList.get(position);
ViewHodler h;
if (convertView == null) {
h = new ViewHodler();
convertView = LinearLayout.inflate(mContext, R.layout.safety_product_item, null);
h.riskName = (TextView) convertView.findViewById(R.id.insurancename);
h.riskType = (TextView) convertView.findViewById(R.id.insurancetype);
h.riskPrem = (TextView) convertView.findViewById(R.id.insuranceprem);
convertView.setTag(h);
} else {
h = (ViewHodler) convertView.getTag();
}
h.riskName.setText((String) (map.get(Safety.RISKNAME)));
h.riskType.setText(SafetyDataCenter.insuranceType.get(map.get(Safety.RISKTYPE)));
if (!StringUtil.isNull((String) map.get(Safety.QUOTAPREM))) {
h.riskPrem.setText(StringUtil.parseStringPattern((String) (map.get(Safety.QUOTAPREM)), 2));
} else if (!StringUtil.isNull((String) map.get(Safety.RISKPAEM))) {
h.riskPrem.setText(StringUtil.parseStringPattern((String) (map.get(Safety.RISKPAEM)), 2));
} else {
h.riskPrem.setText("-");
}
PopupWindowUtils.getInstance().setOnShowAllTextListener(mContext, h.riskName);
return convertView;
}
public void setData(List<Map<String, Object>> list) {
this.mList = list;
notifyDataSetChanged();
}
private class ViewHodler {
public TextView riskName;
public TextView riskType;
public TextView riskPrem;
}
}
| [
"15609143618@163.com"
] | 15609143618@163.com |
93b766063395fc24d17e5aa7cbea66c1d2f4618e | a4178e5042f43f94344789794d1926c8bdba51c0 | /iwxxm3Converter/src/schemabindings/schemabindings31/net/opengis/gml/v_3_2_1/DirectionDescriptionType.java | 12afced45c27546b734871dfd79cbb05fedb4913 | [
"Apache-2.0"
] | permissive | moryakovdv/iwxxmConverter | c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0 | 5c2b57e57c3038a9968b026c55e381eef0f34dad | refs/heads/master | 2023-07-20T06:58:00.317736 | 2023-07-05T10:10:10 | 2023-07-05T10:10:10 | 128,777,786 | 11 | 7 | Apache-2.0 | 2023-07-05T10:03:12 | 2018-04-09T13:38:59 | Java | UTF-8 | Java | false | false | 4,956 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.05.06 at 11:11:25 PM MSK
//
package schemabindings31.net.opengis.gml.v_3_2_1;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* direction descriptions are specified by a compass point code, a keyword, a textual description or a reference to a description.
* A gml:compassPoint is specified by a simple enumeration.
* In addition, thre elements to contain text-based descriptions of direction are provided.
* If the direction is specified using a term from a list, gml:keyword should be used, and the list indicated using the value of the codeSpace attribute.
* if the direction is decribed in prose, gml:direction or gml:reference should be used, allowing the value to be included inline or by reference.
*
* <p>Java class for DirectionDescriptionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DirectionDescriptionType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice>
* <element name="compassPoint" type="{http://www.opengis.net/gml/3.2}CompassPointEnumeration"/>
* <element name="keyword" type="{http://www.opengis.net/gml/3.2}CodeType"/>
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="reference" type="{http://www.opengis.net/gml/3.2}ReferenceType"/>
* </choice>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DirectionDescriptionType", propOrder = {
"compassPoint",
"keyword",
"description",
"reference"
})
public class DirectionDescriptionType {
@XmlSchemaType(name = "string")
protected CompassPointEnumeration compassPoint;
protected CodeType keyword;
protected String description;
protected ReferenceType reference;
/**
* Gets the value of the compassPoint property.
*
* @return
* possible object is
* {@link CompassPointEnumeration }
*
*/
public CompassPointEnumeration getCompassPoint() {
return compassPoint;
}
/**
* Sets the value of the compassPoint property.
*
* @param value
* allowed object is
* {@link CompassPointEnumeration }
*
*/
public void setCompassPoint(CompassPointEnumeration value) {
this.compassPoint = value;
}
public boolean isSetCompassPoint() {
return (this.compassPoint!= null);
}
/**
* Gets the value of the keyword property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getKeyword() {
return keyword;
}
/**
* Sets the value of the keyword property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setKeyword(CodeType value) {
this.keyword = value;
}
public boolean isSetKeyword() {
return (this.keyword!= null);
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
public boolean isSetDescription() {
return (this.description!= null);
}
/**
* Gets the value of the reference property.
*
* @return
* possible object is
* {@link ReferenceType }
*
*/
public ReferenceType getReference() {
return reference;
}
/**
* Sets the value of the reference property.
*
* @param value
* allowed object is
* {@link ReferenceType }
*
*/
public void setReference(ReferenceType value) {
this.reference = value;
}
public boolean isSetReference() {
return (this.reference!= null);
}
}
| [
"moryakovdv@gmail.com"
] | moryakovdv@gmail.com |
c2f1a0138daafc40c06821deeb9872f359cc15a5 | 4f4ddc396fa1dfc874780895ca9b8ee4f7714222 | /src/gdanol/gda/com/gensym/gda/dialogs/blocks/gdiDataInputCounter.java | 3e8677ba7b922d23f20fd5abbd4f21cf81572e76 | [] | no_license | UtsavChokshiCNU/GenSym-Test2 | 3214145186d032a6b5a7486003cef40787786ba0 | a48c806df56297019cfcb22862dd64609fdd8711 | refs/heads/master | 2021-01-23T23:14:03.559378 | 2017-09-09T14:20:09 | 2017-09-09T14:20:09 | 102,960,203 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 931 | java |
package com.gensym.gda.dialogs.blocks;
import com.gensym.util.Symbol;
import com.gensym.beansruntime.StringVector;
import com.gensym.gda.controls.*;
public class gdiDataInputCounter extends BlocksDialog{
public gdiDataInputCounter () {}
public gdiDataInputCounter (java.awt.Frame frame) {
super(frame);
updateOutput = new RadioBoxEditor();
StringVector members = new StringVector(new String[] {"continuously", "upon-reset"});
updateOutput.setLabels(members);
updateOutput.setMembers(members);
updateOutput.setRowsAndColumns(1, 2);
dpanel.placeAttributeEditor(updateOutput,
UPDATE_OUTPUT_, dpanel.symbolFieldType, 1);
}
protected RadioBoxEditor updateOutput;
protected final static Symbol UPDATE_OUTPUT_= Symbol.intern("UPDATE-OUTPUT");
/*
protected final static Symbol CONTINUOUSLY_= Symbol.intern("CONTINUOUSLY");
protected final static Symbol UPONRESET_= Symbol.intern("UPON-RESET");
*/
} | [
"utsavchokshi@Utsavs-MacBook-Pro.local"
] | utsavchokshi@Utsavs-MacBook-Pro.local |
1922eadfd5030104fd4f7edb9e37e2ea7f633057 | 0d26d715a0e66246d9a88d1ca77637c208089ec4 | /ALONE/src/com/lkp/an/Person.java | 56cde06ac2971063aacd2abb2673f1309b11bb74 | [] | no_license | lkp7321/sour | ff997625c920ddbc8f8bd05307184afc748c22b7 | 06ac40e140bad1dc1e7b3590ce099bc02ae065f2 | refs/heads/master | 2021-04-12T12:18:22.408705 | 2018-04-26T06:22:26 | 2018-04-26T06:22:26 | 126,673,285 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 744 | java | package com.lkp.an;
/**
* 实体类
*/
public class Person {
private String name;
String addr;
public int id;
public Person(){
}
private Person(String name){
this.name = name;
}
public Person(String name, String addr, int id){
this.name = name;
this.addr = addr;
this.id = id;
}
private void toSay(String name){
System.out.println("say hello "+name);
}
public String toHelloSay(){
System.out.print("oo");
return "ss";
}
@Override
public String toString() {
return "Person{" +
"name='" + name + '\'' +
", addr='" + addr + '\'' +
", id=" + id +
'}';
}
}
| [
"lz13037330@163.com"
] | lz13037330@163.com |
b6b0bfae9f46bced1486fcc055dc29e27e3f3bcc | d46558b01a692657aa3c8dd9e51d871e50b50896 | /src/main/java/com/gene/mobilemaster/model/Gl_sf.java | 185a2fd505d0fa99fc49aa649e71e4d24c63f853 | [] | no_license | quweijun/cms_order_zgmall_bak | c5355740d409038f1676f6c60542edc7c68f86fe | 57335178214eba5ef7f31148a10e71cddcf1409d | refs/heads/master | 2023-08-03T11:43:50.133601 | 2018-12-12T07:37:29 | 2018-12-12T07:37:29 | 158,420,844 | 0 | 0 | null | 2023-07-20T04:45:02 | 2018-11-20T16:38:10 | Java | UTF-8 | Java | false | false | 260 | java | package com.gene.mobilemaster.model;
public class Gl_sf {
private String col001;
public String getCol001() {
return col001;
}
public void setCol001(String col001) {
this.col001 = col001 == null ? null : col001.trim();
}
} | [
"29048829@qq.com"
] | 29048829@qq.com |
01126d22e4a1f5589e61189047810555e04237a0 | f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a | /rdma-based-storm/external/sql/storm-sql-runtime/src/jvm/org/apache/storm/sql/runtime/calcite/ExecutableExpression.java | 8416945b868214958ce27b2c3e10e107152c182c | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-1.0-or-later"
] | permissive | dke-knu/i2am | 82bb3cf07845819960f1537a18155541a1eb79eb | 0548696b08ef0104b0c4e6dec79c25300639df04 | refs/heads/master | 2023-07-20T01:30:07.029252 | 2023-07-07T02:00:59 | 2023-07-07T02:00:59 | 71,136,202 | 8 | 14 | Apache-2.0 | 2023-07-07T02:00:31 | 2016-10-17T12:29:48 | Java | UTF-8 | Java | false | false | 1,125 | 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.storm.sql.runtime.calcite;
import org.apache.calcite.interpreter.Context;
import java.io.Serializable;
/**
* Compiled executable expression.
*/
public interface ExecutableExpression extends Serializable {
Object execute(Context context);
void execute(Context context, Object[] results);
}
| [
"wnghd9999@naver.com"
] | wnghd9999@naver.com |
040065f45f5f1b92af55aa8d221e1388e3f90be9 | bfed0d992f925ee137eb94026f0283724eba17fa | /V2.0/ZIDS/src/nl/zeesoft/zids/database/model/Session.java | cabf1cdcc9a95a385fea1a296bc28f3a8e14e2d2 | [] | no_license | DyzLecticus/Zeesoft | c17c469b000f15301ff2be6c19671b12bba25f99 | b5053b762627762ffeaa2de4f779d6e1524a936d | refs/heads/master | 2023-04-15T01:42:36.260351 | 2023-04-10T06:50:40 | 2023-04-10T06:50:40 | 28,697,832 | 7 | 2 | null | 2023-02-27T16:30:37 | 2015-01-01T22:57:39 | Java | UTF-8 | Java | false | false | 7,944 | java | package nl.zeesoft.zids.database.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import nl.zeesoft.zids.json.JsElem;
import nl.zeesoft.zids.json.JsFile;
import nl.zeesoft.zodb.Generic;
import nl.zeesoft.zodb.Messenger;
import nl.zeesoft.zodb.database.DbDataObject;
import nl.zeesoft.zodb.database.model.helpers.HlpObject;
public class Session extends HlpObject {
private String sessionId = "";
private long dateTimeStart = 0;
private long dateTimeLastActivity = 0;
private long dateTimeEnd = 0;
private StringBuilder context = new StringBuilder();
private long dialogId = 0;
private Dialog dialog = null;
private StringBuilder log = new StringBuilder();
private StringBuilder logIncludingThoughts = new StringBuilder();
private StringBuilder logAssignments = new StringBuilder();
private StringBuilder output = new StringBuilder();
private List<SessionVariable> variables = new ArrayList<SessionVariable>();
private List<SessionDialogVariable> dialogVariables = new ArrayList<SessionDialogVariable>();
@Override
public void fromDataObject(DbDataObject obj) {
super.fromDataObject(obj);
if (obj.hasPropertyValue("sessionId")) {
setSessionId(obj.getPropertyValue("sessionId").toString());
}
if (obj.hasPropertyValue("dateTimeStart")) {
setDateTimeStart(Long.parseLong(obj.getPropertyValue("dateTimeStart").toString()));
}
if (obj.hasPropertyValue("dateTimeLastActivity")) {
setDateTimeLastActivity(Long.parseLong(obj.getPropertyValue("dateTimeLastActivity").toString()));
}
if (obj.hasPropertyValue("dateTimeEnd")) {
setDateTimeEnd(Long.parseLong(obj.getPropertyValue("dateTimeEnd").toString()));
}
if (obj.hasPropertyValue("dialog") && obj.getLinkValue("dialog")!=null && obj.getLinkValue("dialog").size()>0) {
setDialogId(obj.getLinkValue("dialog").get(0));
}
if (obj.hasPropertyValue("context")) {
setContext(obj.getPropertyValue("context"));
}
if (obj.hasPropertyValue("log")) {
setLog(obj.getPropertyValue("log"));
}
if (obj.hasPropertyValue("logIncludingThoughts")) {
setLogIncludingThoughts(obj.getPropertyValue("logIncludingThoughts"));
}
if (obj.hasPropertyValue("logAssignments")) {
setLogAssignments(obj.getPropertyValue("logAssignments"));
}
if (obj.hasPropertyValue("output")) {
setOutput(obj.getPropertyValue("output"));
}
}
@Override
public DbDataObject toDataObject() {
DbDataObject r = super.toDataObject();
r.setPropertyValue("sessionId",new StringBuilder(getSessionId()));
r.setPropertyValue("dateTimeStart",new StringBuilder("" + getDateTimeStart()));
r.setPropertyValue("dateTimeLastActivity",new StringBuilder("" + getDateTimeLastActivity()));
r.setPropertyValue("dateTimeEnd",new StringBuilder("" + getDateTimeEnd()));
r.setLinkValue("dialog",getDialogId());
r.setPropertyValue("context",getContext());
r.setPropertyValue("log",getLog());
r.setPropertyValue("logIncludingThoughts",getLogIncludingThoughts());
r.setPropertyValue("logAssignments",getLogAssignments());
r.setPropertyValue("output",getOutput());
return r;
}
public JsFile toJSON() {
JsFile f = new JsFile();
f.rootElement = new JsElem();
JsElem c = null;
c = new JsElem();
c.name = "sessionId";
f.rootElement.children.add(c);
c.value = new StringBuilder(getSessionId());
c.cData = true;
c = new JsElem();
c.name = "context";
f.rootElement.children.add(c);
c.value = getContext();
c.cData = true;
c = new JsElem();
c.name = "log";
f.rootElement.children.add(c);
c.value = getLog();
c.cData = true;
c = new JsElem();
c.name = "logIncludingThoughts";
f.rootElement.children.add(c);
c.value = getLogIncludingThoughts();
c.cData = true;
c = new JsElem();
c.name = "output";
f.rootElement.children.add(c);
c.value = getOutput();
c.cData = true;
if (variables.size()>0) {
c = new JsElem();
c.name = "variables";
f.rootElement.children.add(c);
c.array = true;
for (SessionVariable sv: variables) {
JsFile svf = sv.toJSON();
c.children.add(svf.rootElement);
}
}
if (dialogVariables.size()>0) {
c = new JsElem();
c.name = "dialogVariables";
f.rootElement.children.add(c);
c.array = true;
for (SessionDialogVariable sv: dialogVariables) {
JsFile svf = sv.toJSON();
c.children.add(svf.rootElement);
}
}
return f;
}
public void appendLogLine(boolean debug,String line,boolean isThought) {
if (debug) {
Messenger.getInstance().debug(this,line);
}
Date d = new Date();
String ds = Generic.getTimeString(d,true);
StringBuilder addLine = new StringBuilder();
addLine.append(ds);
addLine.append(": ");
addLine.append(line);
addLine.append("\n");
if (!isThought) {
log.append(addLine);
}
logIncludingThoughts.append(addLine);
setDateTimeLastActivity(d.getTime());
}
/**
* @return the sessionId
*/
public String getSessionId() {
return sessionId;
}
/**
* @param sessionId the sessionId to set
*/
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
/**
* @return the log
*/
public StringBuilder getLog() {
return log;
}
/**
* @param log the log to set
*/
public void setLog(StringBuilder log) {
this.log = log;
}
/**
* @return the variables
*/
public List<SessionDialogVariable> getDialogVariables() {
return dialogVariables;
}
/**
* @return the dateTimeStart
*/
public long getDateTimeStart() {
return dateTimeStart;
}
/**
* @param dateTimeStart the dateTimeStart to set
*/
public void setDateTimeStart(long dateTimeStart) {
this.dateTimeStart = dateTimeStart;
}
/**
* @return the dateTimeEnd
*/
public long getDateTimeEnd() {
return dateTimeEnd;
}
/**
* @param dateTimeEnd the dateTimeEnd to set
*/
public void setDateTimeEnd(long dateTimeEnd) {
this.dateTimeEnd = dateTimeEnd;
}
/**
* @return the context
*/
public StringBuilder getContext() {
return context;
}
/**
* @param context the context to set
*/
public void setContext(StringBuilder context) {
this.context = context;
}
/**
* @return the dialogId
*/
public long getDialogId() {
return dialogId;
}
/**
* @param dialogId the dialogId to set
*/
public void setDialogId(long dialogId) {
this.dialogId = dialogId;
}
/**
* @return the dialog
*/
public Dialog getDialog() {
return dialog;
}
/**
* @param dialog the dialog to set
*/
public void setDialog(Dialog dialog) {
if (dialog==null) {
dialogId = 0;
} else {
dialogId = dialog.getId();
}
this.dialog = dialog;
}
/**
* @return the dateTimeLastActivity
*/
public long getDateTimeLastActivity() {
return dateTimeLastActivity;
}
/**
* @param dateTimeLastActivity the dateTimeLastActivity to set
*/
public void setDateTimeLastActivity(long dateTimeLastActivity) {
this.dateTimeLastActivity = dateTimeLastActivity;
}
/**
* @return the output
*/
public StringBuilder getOutput() {
return output;
}
/**
* @param output the output to set
*/
public void setOutput(StringBuilder output) {
this.output = output;
}
/**
* @return the logIncludingThoughts
*/
public StringBuilder getLogIncludingThoughts() {
return logIncludingThoughts;
}
/**
* @param logIncludingThoughts the logIncludingThoughts to set
*/
public void setLogIncludingThoughts(StringBuilder logIncludingThoughts) {
this.logIncludingThoughts = logIncludingThoughts;
}
/**
* @return the logAssignments
*/
public StringBuilder getLogAssignments() {
return logAssignments;
}
/**
* @param logAssignments the logAssignments to set
*/
public void setLogAssignments(StringBuilder logAssignments) {
this.logAssignments = logAssignments;
}
/**
* @return the variables
*/
public List<SessionVariable> getVariables() {
return variables;
}
}
| [
"dyz@xs4all.nl"
] | dyz@xs4all.nl |
edefc6e4157573d23e2cb0029932848f882489d6 | d383eae25299467f33a15d606fdcf91e56fc3967 | /xml/src/main/java/org/tipprunde/model/ws/openliga/GetGoalsByLeagueSaison.java | 3bb08f1edbfff05be04f964841344eed854d52ca | [] | no_license | thorsten-k/tipprunde | 6dc11424064d867c6009b8359d9e862c22a8767c | 4bbc99784e642f88e46b58ee1ae92b380a2c2c25 | refs/heads/master | 2023-04-30T07:31:59.169857 | 2023-04-19T11:52:53 | 2023-04-19T11:52:53 | 71,550,240 | 0 | 0 | null | 2021-08-22T06:12:09 | 2016-10-21T09:20:05 | Java | UTF-8 | Java | false | false | 2,138 | java |
package org.tipprunde.model.ws.openliga;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="leagueShortcut" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="leagueSaison" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"leagueShortcut",
"leagueSaison"
})
@XmlRootElement(name = "GetGoalsByLeagueSaison")
public class GetGoalsByLeagueSaison {
protected String leagueShortcut;
protected String leagueSaison;
/**
* Gets the value of the leagueShortcut property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLeagueShortcut() {
return leagueShortcut;
}
/**
* Sets the value of the leagueShortcut property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLeagueShortcut(String value) {
this.leagueShortcut = value;
}
/**
* Gets the value of the leagueSaison property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLeagueSaison() {
return leagueSaison;
}
/**
* Sets the value of the leagueSaison property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLeagueSaison(String value) {
this.leagueSaison = value;
}
}
| [
"t.kisner@web.de"
] | t.kisner@web.de |
203c7127201157838889cefb90b8a98b72f2ae0d | 76f15be2fce710e7d64841ea57d56741beda3e22 | /DubboRpc/src/main/java/com/hong/py/rpc/support/RpcUtils.java | cbc8e264b5c680519d3146579f4a8b8e8fe03dda | [] | no_license | hongpingyang/MyDubbo | 0ce178eff4b847f9290f06465c11dd776003bcec | dd635f3214fdbe1dc8d7387cccee08c3342eb10d | refs/heads/master | 2022-12-23T17:31:47.664867 | 2020-01-11T03:46:55 | 2020-01-11T03:46:55 | 226,441,404 | 1 | 0 | null | 2022-12-16T04:23:37 | 2019-12-07T02:01:04 | Java | UTF-8 | Java | false | false | 1,766 | java | package com.hong.py.rpc.support;
import com.hong.py.commonUtils.Constants;
import com.hong.py.commonUtils.URL;
import com.hong.py.rpc.Invocation;
/**
* 文件描述
*
* @ProductName: HONGPY
* @ProjectName: MyDubbo
* @Package: com.hong.py.rpc.support
* @Description: note
* @Author: hongpy21691
* @CreateDate: 2019/12/31 17:08
* @UpdateUser: hongpy21691
* @UpdateDate: 2019/12/31 17:08
* @UpdateRemark: The modified content
* @Version: 1.0
* <p>
* Copyright © 2019 hongpy Technologies Inc. All Rights Reserved
**/
public class RpcUtils {
public static String getMethodName(Invocation invocation) {
if (Constants.$INVOKE.equals(invocation.getMethodName())
&& invocation.getArguments() != null
&& invocation.getArguments().length > 0
&& invocation.getArguments()[0] instanceof String) {
return (String) invocation.getArguments()[0]; //?
}
return invocation.getMethodName();
}
public static boolean isAsync(URL url, Invocation inv) {
boolean isAsync;
if (Boolean.TRUE.toString().equals(inv.getAttachment(Constants.ASYNC_KEY))) {
isAsync = true;
} else {
isAsync = url.getMethodParameter(getMethodName(inv), Constants.ASYNC_KEY, false);
}
return isAsync;
}
//判断是否是需要返回的 通过 "return" 默认是true
public static boolean isOneway(URL url, Invocation inv) {
boolean isOneway;
if (Boolean.FALSE.toString().equals(inv.getAttachment(Constants.RETURN_KEY))) {
isOneway = true;
} else {
isOneway = !url.getMethodParameter(getMethodName(inv), Constants.RETURN_KEY, true);
}
return isOneway;
}
}
| [
"hpymn123@163.com"
] | hpymn123@163.com |
1f53296da39415496dc642177ce7bfeafaea1ace | 0adcb787c2d7b3bbf81f066526b49653f9c8db40 | /src/main/java/com/alipay/api/request/AlipayOfflineMarketShopCreateRequest.java | f668143e42dd807e9a6fc86c7351692c48f7c655 | [
"Apache-2.0"
] | permissive | yikey/alipay-sdk-java-all | 1cdca570c1184778c6f3cad16fe0bcb6e02d2484 | 91d84898512c5a4b29c707b0d8d0cd972610b79b | refs/heads/master | 2020-05-22T13:40:11.064476 | 2019-04-11T14:11:02 | 2019-04-11T14:11:02 | 186,365,665 | 1 | 0 | null | 2019-05-13T07:16:09 | 2019-05-13T07:16:08 | null | UTF-8 | Java | false | false | 3,189 | java | package com.alipay.api.request;
import com.alipay.api.domain.AlipayOfflineMarketShopCreateModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayOfflineMarketShopCreateResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.offline.market.shop.create request
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayOfflineMarketShopCreateRequest implements AlipayRequest<AlipayOfflineMarketShopCreateResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 系统商需要通过该接口在口碑平台帮助商户创建门店信息。
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.offline.market.shop.create";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayOfflineMarketShopCreateResponse> getResponseClass() {
return AlipayOfflineMarketShopCreateResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
09b4c18406683a12a8003b6b2473528fd23e1015 | 963599f6f1f376ba94cbb504e8b324bcce5de7a3 | /sources/com/afollestad/materialdialogs/C1035xc4691f22.java | 19ca5b3e6a32d761fe052b180b655739bc027901 | [] | no_license | NikiHard/cuddly-pancake | 563718cb73fdc4b7b12c6233d9bf44f381dd6759 | 3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4 | refs/heads/main | 2023-04-09T06:58:04.403056 | 2021-04-20T00:45:08 | 2021-04-20T00:45:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,114 | java | package com.afollestad.materialdialogs;
import com.afollestad.materialdialogs.utils.ColorsKt;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Lambda;
@Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\b\n\u0000\n\u0002\u0010\b\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, mo51343d2 = {"<anonymous>", "", "invoke"}, mo51344k = 3, mo51345mv = {1, 1, 16})
/* renamed from: com.afollestad.materialdialogs.MaterialDialog$invalidateBackgroundColorAndRadius$backgroundColor$1 */
/* compiled from: MaterialDialog.kt */
final class C1035xc4691f22 extends Lambda implements Function0<Integer> {
final /* synthetic */ MaterialDialog this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
C1035xc4691f22(MaterialDialog materialDialog) {
super(0);
this.this$0 = materialDialog;
}
public final int invoke() {
return ColorsKt.resolveColor$default(this.this$0, (Integer) null, Integer.valueOf(C1036R.attr.colorBackgroundFloating), (Function0) null, 5, (Object) null);
}
}
| [
"a.amirovv@mail.ru"
] | a.amirovv@mail.ru |
b1676772d4afcd1b8aed2841a80b7711ec93f3eb | 48e0f257417cfb75a79aa2c1cec4238f6b43de83 | /eclipse/plugins/org.switchyard.tools.models.switchyard1_0/src/org/switchyard/tools/models/switchyard1_0/spring/impl/PhpExpressionImpl.java | 031a2d46a219d1e27f850ed873cc73e06c1fb296 | [] | no_license | bfitzpat/tools | 4833487de846e577cf3de836b4aa700bdd04ce52 | 26ea82a46c481b196180c7cb16fcd306d894987f | refs/heads/master | 2021-01-17T16:06:29.271555 | 2017-10-13T19:14:25 | 2017-10-19T15:49:41 | 3,909,717 | 0 | 1 | null | 2017-08-01T09:05:50 | 2012-04-02T18:38:01 | Java | UTF-8 | Java | false | false | 910 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.switchyard.tools.models.switchyard1_0.spring.impl;
import org.eclipse.emf.ecore.EClass;
import org.switchyard.tools.models.switchyard1_0.spring.PhpExpression;
import org.switchyard.tools.models.switchyard1_0.spring.SpringPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Php Expression</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class PhpExpressionImpl extends ExpressionImpl implements PhpExpression {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PhpExpressionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SpringPackage.eINSTANCE.getPhpExpression();
}
} //PhpExpressionImpl
| [
"rcernich@redhat.com"
] | rcernich@redhat.com |
1442dc6fde3226876b59e5ce0a87f4bbd0572a41 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Math-9/org.apache.commons.math3.geometry.euclidean.threed.Line/BBC-F0-opt-70/18/org/apache/commons/math3/geometry/euclidean/threed/Line_ESTest_scaffolding.java | e4a606822e4c23cb6c1d8caeea21cdb6a52179d3 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 7,446 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 13:20:22 GMT 2021
*/
package org.apache.commons.math3.geometry.euclidean.threed;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Line_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.apache.commons.math3.geometry.euclidean.threed.Line";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
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.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Line_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math3.geometry.Vector",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3DFormat",
"org.apache.commons.math3.util.Precision",
"org.apache.commons.math3.exception.util.ExceptionContextProvider",
"org.apache.commons.math3.geometry.Space",
"org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet",
"org.apache.commons.math3.util.MathArrays",
"org.apache.commons.math3.geometry.euclidean.oned.Vector1D",
"org.apache.commons.math3.exception.util.ArgUtils",
"org.apache.commons.math3.exception.MathArithmeticException",
"org.apache.commons.math3.exception.NumberIsTooSmallException",
"org.apache.commons.math3.geometry.partitioning.BSPTreeVisitor",
"org.apache.commons.math3.exception.MathInternalError",
"org.apache.commons.math3.exception.NotPositiveException",
"org.apache.commons.math3.exception.MathIllegalStateException",
"org.apache.commons.math3.geometry.VectorFormat",
"org.apache.commons.math3.exception.NonMonotonicSequenceException",
"org.apache.commons.math3.exception.MathIllegalArgumentException",
"org.apache.commons.math3.geometry.euclidean.threed.Line",
"org.apache.commons.math3.geometry.euclidean.threed.SubLine",
"org.apache.commons.math3.util.FastMath$CodyWaite",
"org.apache.commons.math3.exception.MathIllegalNumberException",
"org.apache.commons.math3.util.CompositeFormat",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.geometry.partitioning.AbstractRegion",
"org.apache.commons.math3.exception.MathParseException",
"org.apache.commons.math3.geometry.partitioning.Region",
"org.apache.commons.math3.util.FastMath",
"org.apache.commons.math3.exception.DimensionMismatchException",
"org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D",
"org.apache.commons.math3.exception.util.Localizable",
"org.apache.commons.math3.geometry.partitioning.BSPTree",
"org.apache.commons.math3.exception.NotStrictlyPositiveException",
"org.apache.commons.math3.exception.util.ExceptionContext",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3D",
"org.apache.commons.math3.exception.NullArgumentException",
"org.apache.commons.math3.geometry.euclidean.oned.Vector1DFormat",
"org.apache.commons.math3.geometry.partitioning.Embedding",
"org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D",
"org.apache.commons.math3.geometry.partitioning.SubHyperplane"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Line_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.math3.geometry.euclidean.threed.Line",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.util.FastMath",
"org.apache.commons.math3.util.Precision",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3D",
"org.apache.commons.math3.util.MathArrays",
"org.apache.commons.math3.geometry.euclidean.oned.Vector1D",
"org.apache.commons.math3.geometry.VectorFormat",
"org.apache.commons.math3.geometry.euclidean.oned.Vector1DFormat",
"org.apache.commons.math3.util.CompositeFormat",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3DFormat",
"org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D",
"org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D$LazyHolder",
"org.apache.commons.math3.exception.MathIllegalArgumentException",
"org.apache.commons.math3.exception.util.ExceptionContext",
"org.apache.commons.math3.exception.util.ArgUtils",
"org.apache.commons.math3.geometry.euclidean.threed.SubLine",
"org.apache.commons.math3.geometry.partitioning.AbstractRegion",
"org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet",
"org.apache.commons.math3.geometry.partitioning.BSPTree",
"org.apache.commons.math3.util.FastMath$CodyWaite",
"org.apache.commons.math3.exception.MathIllegalNumberException",
"org.apache.commons.math3.exception.DimensionMismatchException",
"org.apache.commons.math3.exception.MathArithmeticException",
"org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D",
"org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D$LazyHolder"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
e20bacb863bf4a19657db7da37a8a318dc7a44be | a2321f425f17a566b93de706fd465bc2de5d2c01 | /app/src/main/java/com/eaglesakura/andriders/ui/auth/AcesAuthActivity.java | 5c6547b461069051997164d4bea013f843341f4b | [] | no_license | fkmhrk/andriders-central-engine-v3 | 10660ebd8e1e7559eb59baabf9552c8f318ae174 | 9c7fea6d3cce5e4cc81e959a9655e38879118bfc | refs/heads/master | 2020-12-24T13:52:14.442098 | 2016-02-11T08:44:33 | 2016-02-11T08:44:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 422 | java | package com.eaglesakura.andriders.ui.auth;
import com.google.android.gms.common.api.GoogleApiClient;
import com.eaglesakura.andriders.AceApplication;
import com.eaglesakura.android.playservice.GoogleAuthActivity;
public class AcesAuthActivity extends GoogleAuthActivity {
@Override
protected GoogleApiClient.Builder newGoogleApiClient() {
return AceApplication.newFullPermissionClientBuilder();
}
}
| [
"eagle.sakura@gmail.com"
] | eagle.sakura@gmail.com |
1d8c161e1653b05aadd6bb284d1cc2b769249680 | 3a761065fbec236406c29a6fa88684d58ad7c9ec | /src/main/java/com/lulan/shincolle/entity/mounts/EntityMountMiH.java | d99bd2c2df51cfe7cb00d54696ce5ee9e5f03dc4 | [] | no_license | PinkaLulan/ShinColle | f6a84152d5224ac8ef3a055e9a593e9322c751f3 | a576df79ac47afb67ee94c33dc38f3fc923a48e3 | refs/heads/mc-1.12.2 | 2021-01-24T09:09:29.392613 | 2018-09-02T11:29:31 | 2018-09-02T11:31:17 | 24,890,170 | 92 | 78 | null | 2020-05-15T04:37:17 | 2014-10-07T12:56:52 | Java | UTF-8 | Java | false | false | 3,166 | java | package com.lulan.shincolle.entity.mounts;
import java.util.List;
import com.lulan.shincolle.ai.EntityAIShipCarrierAttack;
import com.lulan.shincolle.ai.EntityAIShipRangeAttack;
import com.lulan.shincolle.ai.path.ShipMoveHelper;
import com.lulan.shincolle.ai.path.ShipPathNavigate;
import com.lulan.shincolle.entity.BasicEntityMountLarge;
import com.lulan.shincolle.entity.BasicEntityShip;
import com.lulan.shincolle.reference.ID;
import com.lulan.shincolle.reference.Values;
import com.lulan.shincolle.utility.CalcHelper;
import com.lulan.shincolle.utility.ParticleHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
public class EntityMountMiH extends BasicEntityMountLarge
{
public EntityMountMiH(World world)
{
super(world);
this.setSize(2.5F, 2.9F);
this.seatPos = new float[] {0F, 2F, 0F};
this.seatPos2 = new float[] {-0.3F, 0.5F, 0F};
this.shipNavigator = new ShipPathNavigate(this);
this.shipMoveHelper = new ShipMoveHelper(this, 60F);
}
@Override
public void initAttrs(BasicEntityShip host)
{
this.host = host;
//設定位置
this.posX = host.posX;
this.posY = host.posY;
this.posZ = host.posZ;
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.setPosition(this.posX, this.posY, this.posZ);
//設定基本屬性
this.setupAttrs();
if (this.getHealth() < this.getMaxHealth()) this.setHealth(this.getMaxHealth());
//設定AI
this.setAIList();
}
@Override
public void onUpdate()
{
super.onUpdate();
//client side
if (this.world.isRemote)
{
if (this.ticksExisted % 8 == 0)
{
//drip lava at tongue
float[] partPos1 = CalcHelper.rotateXZByAxis(1.2F, -0.25F, this.renderYawOffset * Values.N.DIV_PI_180, 1F);
ParticleHelper.spawnAttackParticleAt(this.posX + partPos1[1], this.posY+0.85D, this.posZ + partPos1[0], 0D, 0D, 0D, (byte)49);
}
}
}
@Override
public void setAIList()
{
super.setAIList();
//use range attack
this.tasks.addTask(10, new EntityAIShipCarrierAttack(this));
this.tasks.addTask(11, new EntityAIShipRangeAttack(this));
}
@Override
public int getTextureID()
{
return ID.ShipMisc.MidwayMount;
}
@Override
protected void setRotationByRider()
{
//sync rotation
List<Entity> riders = this.getPassengers();
for (Entity rider : riders)
{
if (rider instanceof BasicEntityShip)
{
rider.rotationYaw = ((BasicEntityShip) rider).renderYawOffset;
this.prevRotationYawHead = ((EntityLivingBase) rider).prevRotationYawHead;
this.rotationYawHead = ((EntityLivingBase) rider).rotationYawHead;
this.prevRenderYawOffset = ((EntityLivingBase) rider).prevRenderYawOffset;
this.renderYawOffset = ((EntityLivingBase) rider).renderYawOffset;
this.prevRotationYaw = rider.prevRotationYaw;
this.rotationYaw = rider.rotationYaw;
}
}//end for sync rotation
}
} | [
"zec_tails@yahoo.com.tw"
] | zec_tails@yahoo.com.tw |
2e880e166d5742d07907ed34772d59710213dd51 | ada117ab3e3039eba72970d557417c25cfb91900 | /springboot-guice-demo/src/main/java/com/cheng/guice/server/controller/SpringAwareGuiceFilter.java | a835114a5d1bf886e01ca2e9dba6852431c5d315 | [] | no_license | zchengi/Guice-Demo | 997d7cccfd102dcd9a19d7d13268e2f821ba3885 | 2f155c5daca0862e235f5be70634c6464eda2001 | refs/heads/master | 2020-04-03T16:14:09.661527 | 2019-01-02T09:44:07 | 2019-01-02T09:44:07 | 155,397,060 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 258 | java | package com.cheng.guice.server.controller;
import com.google.inject.servlet.GuiceFilter;
import javax.servlet.annotation.WebFilter;
/**
* @author cheng
* 2018/11/1 14:30
*/
@WebFilter
public class SpringAwareGuiceFilter extends GuiceFilter {
}
| [
"792702352@qq.com"
] | 792702352@qq.com |
610ae3ee0c1188c91965b5dfa204b669e23ba818 | 020e885bbe705673b8dad6314db5d7109a3d014f | /src/main/java/servlet/SeatServlet.java | 0f56a07b7112c49445e81a7d1237fb84fc9865f7 | [] | no_license | jadilovic/flightmanagerwebapp | bc7ebc6b2b0f5ec970f607a38d8af084a238a62c | c5ee541f13994066087d99a5fdd6149608295d69 | refs/heads/master | 2021-06-26T00:24:50.368490 | 2020-02-05T12:37:34 | 2020-02-05T12:37:34 | 228,902,382 | 0 | 0 | null | 2021-06-16T17:56:54 | 2019-12-18T18:52:11 | Java | UTF-8 | Java | false | false | 4,086 | java | package servlet;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
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 beans.Airline;
import beans.Flight;
import beans.Seat;
import utils.MyUtils;
import utils.SeatManager;
import utils.AirlineManager;
import utils.AirportManager;
import utils.FlightManager;
@WebServlet(
name = "SeatServlet",
urlPatterns = {"/bookflight"}
)
public class SeatServlet extends HttpServlet {
/**
* @see HttpServlet#HttpServlet()
*/
public SeatServlet() {
super();
// TODO Auto-generated constructor stub
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
System.out.println("DoGET Seat Servlet");
String option = req.getParameter("option");
String message = "";
req.setAttribute("message", message);
if(option != null) {
if(option.equals("List Seats")) {
doPost(req, resp);
} else if(option.equals("Flight Seats")) {
req.getRequestDispatcher("/flightseats.jsp").forward(req, resp);
} else if(option.equals("Book a Seat")) {
req.setAttribute("message", message);
req.getRequestDispatcher("/bookaseat.jsp").forward(req, resp);
}
} else {
req.getRequestDispatcher("/home.jsp").forward(req, resp);
}
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String option = request.getParameter("option");
String flightID = request.getParameter("flightID");
String seatID = request.getParameter("seatID");
String page = "";
String message = null;
request.setAttribute("message", message);
System.out.println("DoPOST Seat Servlet");
Connection conn = MyUtils.getStoredConnection(request);
FlightManager flg = new FlightManager(conn);
AirportManager air = new AirportManager(conn);
AirlineManager lin = new AirlineManager(conn);
SeatManager seat = new SeatManager(conn);
List<Seat> listOfSeats = new ArrayList<Seat>();
Seat bookedSeat = new Seat();
if(option.equals("Flight Seats")) {
if(flightID.equals("")) {
message = "No flight ID entered. Please try again";
request.setAttribute("message", message);
page = "/flightseats.jsp";
} else {
try {
listOfSeats = seat.getFlightSeats(flightID);
request.setAttribute("flightSeats", listOfSeats);
request.setAttribute("listSize", listOfSeats.size());
//request.setAttribute("message", seat.getMessage());
if(listOfSeats.size() == 0) {
message = "Entered flight ID does not exist. Please try again";
request.setAttribute("message", message);
page = "/flightseats.jsp";
}
else
page = "/listOfSeatsView.jsp";
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} else if(option.equals("List Seats")) {
try {
listOfSeats = seat.getAllSeats();
request.setAttribute("flightSeats", listOfSeats);
request.setAttribute("listSize", listOfSeats.size());
request.setAttribute("message", seat.getMessage());
page = "/listOfSeatsAllFlightsView.jsp";
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else if(option.equals("Book a Seat")) {
try {
bookedSeat = seat.bookSeat(flightID, seatID);
request.setAttribute("seat", bookedSeat);
request.setAttribute("message", seat.getMessage());
page = "/bookaseat.jsp";
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
page = "/home";
}
request.getRequestDispatcher(page).forward(request, response);
}
}
| [
"adilovic79@yahoo.com"
] | adilovic79@yahoo.com |
98f60a088ec298f6dedf15855635ee981d472c09 | fa9c7cc793458184aab612536fb30d1df62010e0 | /TestUtil/src/com/example/testutil/data/adapter/CustomDataAdapter.java | e5e4b67c2a52960394e227d32463218aae8c19a2 | [] | no_license | xdcs100/UtilXX | 1056e62b7b25af023b6a42b0f5b2826f1fd56f4d | 62ba9e5a5fef09ec5328bf624ab6c5c2c7522e39 | refs/heads/master | 2021-07-11T14:28:44.729444 | 2017-10-10T15:57:07 | 2017-10-10T15:57:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,121 | java | package com.example.testutil.data.adapter;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.testutil.R;
import com.example.testutil.data.entity.Student;
import com.xuexiang.util.adapter.BaseContentAdapter;
import com.xuexiang.util.data.db.ormlite.custom.CustomDBService;
public class CustomDataAdapter extends BaseContentAdapter<Student> {
private CustomDBService<Student> mDatabaseService;
public void setData(List<Student> data) {
mDataList = data;
notifyDataSetChanged();
}
public CustomDataAdapter(Context context, List<Student> list, CustomDBService<Student> databaseService) {
super(context, list);
mDatabaseService = databaseService;
}
@Override
public View getConvertView(final int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if(convertView==null){
convertView=LayoutInflater.from(mContext).inflate(R.layout.data_item, null);
holder=new ViewHolder();
holder.tvId=(TextView) convertView.findViewById(R.id.tvId);
holder.tvName=(TextView) convertView.findViewById(R.id.tvName);
holder.tvAge=(TextView) convertView.findViewById(R.id.tvAge);
holder.tvSex=(TextView) convertView.findViewById(R.id.tvSex);
holder.tvUpdate=(TextView) convertView.findViewById(R.id.tvUpdate);
holder.tvDelete=(TextView) convertView.findViewById(R.id.tvDelete);
convertView.setTag(holder);
}else{
holder=(ViewHolder) convertView.getTag();
}
Student student = getItem(position);
holder.tvId.setText(String.valueOf(student.getId()));
holder.tvName.setText(student.getUsername());
holder.tvAge.setText(String.valueOf(student.getAge()));
holder.tvSex.setText(student.getSex());
holder.tvUpdate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
update(position);
} catch (IOException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
});
holder.tvDelete.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
delete(position);
} catch (IOException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
});
return convertView;
}
private class ViewHolder{
private TextView tvId,tvName,tvAge,tvSex,tvUpdate,tvDelete;
}
public void update(int position) throws IOException, SQLException {
Student student = getItem(position);
student.setUsername("xxxx");
student.setAge(19);
student.setSex("女");
mDatabaseService.updateData(student);
mDataList = mDatabaseService.queryAllData();
notifyDataSetChanged();
}
public void delete(int position) throws IOException, SQLException {
Student student = getItem(position);
mDatabaseService.deleteData(student);
mDataList = mDatabaseService.queryAllData();
notifyDataSetChanged();
}
}
| [
"xuexiangjys@163.com"
] | xuexiangjys@163.com |
2a723d37cb40426efecfad9e20c508aa3b4130df | 55830c1bb38731e14e7e13e78bc9f3b7d85fef50 | /freelec-springboot2-webservice/src/main/java/com/jojoldu/book/springboot/domain/user/User.java | 190c94fbb8c32f200de1607be49458acfcc71eba | [] | no_license | zepetto7065/study | bfba0a994678bd985397090c84dd1966cf39f40d | ed406c37cdd02f435870f8c37a80f6b99d4c3f98 | refs/heads/main | 2022-11-05T10:22:49.240357 | 2022-11-02T11:52:12 | 2022-11-02T11:52:12 | 152,854,603 | 0 | 0 | null | 2020-06-23T03:48:59 | 2018-10-13T09:08:25 | null | UTF-8 | Java | false | false | 959 | java | package com.jojoldu.book.springboot.domain.user;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import javax.persistence.*;
@Getter
@NoArgsConstructor
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String email;
@Column
private String picture;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Role role;
@Builder
public User(String name, String email, String picture, Role role) {
this.name = name;
this.email = email;
this.picture = picture;
this.role = role;
}
public User update(String name, String picture){
this.name = name;
this.picture = picture;
return this;
}
public String getRoleKey(){
return this.role.getKey();
}
}
| [
"zepetto.yoo@gmail.com"
] | zepetto.yoo@gmail.com |
49f9c92811e0596e19541b3d2a1ff20d458b4737 | bc20b8db8e0afdc84edec1eb299553e0c413fc4c | /CiF005SharedPreferences/app/src/main/java/ru/startandroid/cif005sharedpreferences/MainActivity.java | db0892ff666df02a7576281b6c245f36cf5759db | [] | no_license | expencive/AndroidLessonsPart03 | 1c0ced3a2fcbec304f4408d7350d0e7d72404de9 | adb5bac6b07706240d07809c38284ff543b67f71 | refs/heads/master | 2020-04-04T10:01:10.199663 | 2020-03-04T15:45:03 | 2020-03-04T15:45:03 | 155,839,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,339 | java | package ru.startandroid.cif005sharedpreferences;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
TextView tvSavedText;
EditText etTextInsert, etTextInsert2, etTextInsert3;
Button btnApplyText, btnSaveText;
Switch switchButton;
public static final String SHARED_PREF = "sharedPrefs";
public static final String TEXT1 = "text1";
public static final String TEXT2 = "text2";
public static final String TEXT3 = "text3";
public static final String SWITCH_BUTTON = "switchButton";
private String text;
private String text2;
private String text3;
private Boolean switcOnOff;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tvSavedText = (TextView) findViewById(R.id.tvSavedText);
etTextInsert = (EditText) findViewById(R.id.etTextInsert);
etTextInsert2 = (EditText) findViewById(R.id.etTextInsert2);
etTextInsert3 = (EditText) findViewById(R.id.etTextInsert3);
btnApplyText = (Button) findViewById(R.id.btnApplyText);
btnSaveText = (Button) findViewById(R.id.btnSaveText);
switchButton = (Switch) findViewById(R.id.switchButton);
btnApplyText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loadData();
}
});
btnSaveText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
saveData();
}
});
loadData();
updateViews();
}
public void saveData() {
SharedPreferences sharePreferences = getSharedPreferences(SHARED_PREF, MODE_PRIVATE);
SharedPreferences.Editor editor = sharePreferences.edit();
editor.putString(TEXT1, etTextInsert.getText().toString());
editor.putString(TEXT2, etTextInsert2.getText().toString());
editor.putString(TEXT3,etTextInsert3.getText().toString());
editor.putBoolean(SWITCH_BUTTON, switchButton.isChecked());
editor.apply();
Toast.makeText(this, "Текст Сохранен", Toast.LENGTH_SHORT).show();
}
public void loadData() {
SharedPreferences sharePreferences = getSharedPreferences(SHARED_PREF, MODE_PRIVATE);
text = sharePreferences.getString(TEXT1, "");
text2 = sharePreferences.getString(TEXT2, "");
text3 = sharePreferences.getString(TEXT3, "");
switcOnOff = sharePreferences.getBoolean(SWITCH_BUTTON, false);
switchButton.setChecked(switcOnOff);
etTextInsert.setText(text);
etTextInsert2.setText(text2);
etTextInsert3.setText(text3);
}
public void updateViews() {
tvSavedText.setText(text +"\n" + text2 +"\n"+ text3);
switchButton.setChecked(switcOnOff);
}
@Override
protected void onDestroy() {
super.onDestroy();
saveData();
}
}
| [
"43270198+expencive@users.noreply.github.com"
] | 43270198+expencive@users.noreply.github.com |
5eab0654c6e96813157bdbdb6b3236001020ed80 | be4d249449b310472bdff0ee700585389578d20e | /src/test/java/org/rmatil/sync/test/messaging/fileexchange/offer/FileOfferResponseTest.java | f4b05c6893d5dda606ede8397bec5be8cec0d609 | [
"Apache-2.0"
] | permissive | doytsujin/sync | 34e76555c4f0334eb2589167016e707195e4b347 | 8e02c2f735bd0968cb845b3d0a172f8cc6abcaca | refs/heads/master | 2021-06-01T05:26:02.200447 | 2016-03-31T11:02:17 | 2016-03-31T11:02:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,534 | java | package org.rmatil.sync.test.messaging.fileexchange.offer;
import org.junit.BeforeClass;
import org.junit.Test;
import org.rmatil.sync.core.messaging.fileexchange.offer.FileOfferResponse;
import org.rmatil.sync.network.core.model.ClientDevice;
import org.rmatil.sync.network.core.model.NodeLocation;
import org.rmatil.sync.test.base.BaseMessageTest;
import java.util.UUID;
import static org.junit.Assert.assertEquals;
public class FileOfferResponseTest extends BaseMessageTest {
protected static final UUID CLIENT_DEVICE_ID = UUID.randomUUID();
protected static final ClientDevice CLIENT_DEVICE = new ClientDevice("Norman Gordon", CLIENT_DEVICE_ID, null);
protected static final NodeLocation CLIENT_LOCATION = new NodeLocation("Norman Gordon", CLIENT_DEVICE_ID, null);
protected static FileOfferResponse fileOfferResponse;
@BeforeClass
public static void setUp() {
fileOfferResponse = new FileOfferResponse(
EXCHANGE_ID,
STATUS_CODE,
CLIENT_DEVICE,
CLIENT_LOCATION
);
}
@Test
public void test() {
assertEquals("ExchangeId not equal", EXCHANGE_ID, fileOfferResponse.getExchangeId());
assertEquals("StatusCode not equal", STATUS_CODE, fileOfferResponse.getStatusCode());
assertEquals("ClientDevice not equal", CLIENT_DEVICE, fileOfferResponse.getClientDevice());
assertEquals("NodeLocation not equal", CLIENT_LOCATION, fileOfferResponse.getReceiverAddress());
}
}
| [
"raphael.matile@gmail.com"
] | raphael.matile@gmail.com |
b6f20498bb0ef729da0e462a03ff8521b6567906 | 3054eab9f6ed308eef6b34bdbf7f2d333e51639c | /src/com/op/service/consignee_citys/Consignee_CitysService.java | 4305dd97441d145a15a97d52bedd022a392b4a3c | [] | no_license | luotianwen/opManage | df0aafb894ce0843e2508e8512db462c0074b42f | 1b553a7895463cbf4a4a7b514b32389de1a0514e | refs/heads/master | 2021-06-26T03:56:40.850857 | 2017-09-09T14:59:35 | 2017-09-09T14:59:35 | 102,962,576 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 453 | java | package com.op.service.consignee_citys;
import java.util.List;
import org.springframework.stereotype.Service;
import com.op.entity.consignee_citys.Consignee_Citys;
/**
* 数据库中(省)接口
* @author PYW
* Date: 2015年12月18日 09:26:14
*/
@Service("consignee_CitysService")
public interface Consignee_CitysService {
/**
* 根据省id查询出对应的市
*/
List<Consignee_Citys> selectCitys(String parent_code) throws Exception;
}
| [
"tw l"
] | tw l |
c6f1deb9c10d031c448bfdb4edb1fe787982ee29 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a018/A018524Test.java | 4a5cfc178a754242a91500eb3736a84defc8401f | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a018;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A018524Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
695ab73cb3b2a738bad85502dfd2e2d5ce4e2842 | dfac1eb4ac647b96f311a7cdd07dec558a209bd6 | /src/com/zjxjwxk/leetcode/_0995_Minimum_Number_of_K_Consecutive_Bit_Flips/SolutionTest.java | 942c1c1b0bdacd6b916a99320dda517cbea90aff | [] | no_license | zjxjwxk/LeetCode | 7f8e91edb23b24bbedbff6cca49c32e4e3bd78bf | 99a8a17fa1417b066bbd204ab7170fdcb5295532 | refs/heads/master | 2023-08-25T18:46:11.137419 | 2023-08-15T08:10:45 | 2023-08-15T08:10:45 | 141,663,719 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package com.zjxjwxk.leetcode._0995_Minimum_Number_of_K_Consecutive_Bit_Flips;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class SolutionTest {
private final Solution solution = new Solution();
@Test
void minKBitFlips1() {
int[] A = {0, 1, 0};
int K = 1;
int ans = 2;
assertEquals(ans, solution.minKBitFlips(A, K));
}
@Test
void minKBitFlips2() {
int[] A = {1, 1, 0};
int K = 2;
int ans = -1;
assertEquals(ans, solution.minKBitFlips(A, K));
}
@Test
void minKBitFlips3() {
int[] A = {0, 0, 0, 1, 0, 1, 1, 0};
int K = 3;
int ans = 3;
assertEquals(ans, solution.minKBitFlips(A, K));
}
} | [
"zjxjwxk@gmail.com"
] | zjxjwxk@gmail.com |
4c97585033d4868ade45473c643679610f1788c6 | 6362a1b8b35fee61b1bd4a44f9829f1a645230f9 | /gen/me/serce/devkt/solidity/lang/psi/impl/SolParameterDefImpl.java | f5f968b27f267c283a06247ed6cf927f392f9b3b | [
"MIT"
] | permissive | devkt-plugins/solidity-devkt | 83f3a8388ddac309b81d4ca6d457199a131e5a36 | 44814ff7943f582ac9ff4ff8abf5e01f2f638e45 | refs/heads/master | 2020-03-12T12:44:52.766137 | 2018-09-15T03:18:24 | 2018-09-15T03:18:24 | 130,625,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 1,377 | java | // This is a generated file. Not intended for manual editing.
package me.serce.devkt.solidity.lang.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import org.jetbrains.kotlin.com.intellij.lang.ASTNode;
import org.jetbrains.kotlin.com.intellij.psi.PsiElement;
import org.jetbrains.kotlin.com.intellij.psi.PsiElementVisitor;
import org.jetbrains.kotlin.com.intellij.psi.util.PsiTreeUtil;
import static me.serce.devkt.solidity.lang.core.SolidityTokenTypes.*;
import org.jetbrains.kotlin.com.intellij.extapi.psi.ASTWrapperPsiElement;
import me.serce.devkt.solidity.lang.psi.*;
public class SolParameterDefImpl extends ASTWrapperPsiElement implements SolParameterDef {
public SolParameterDefImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull SolVisitor visitor) {
visitor.visitParameterDef(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof SolVisitor) accept((SolVisitor)visitor);
else super.accept(visitor);
}
@Override
@Nullable
public SolStorageLocation getStorageLocation() {
return findChildByClass(SolStorageLocation.class);
}
@Override
@NotNull
public SolTypeName getTypeName() {
return findNotNullChildByClass(SolTypeName.class);
}
@Override
@Nullable
public PsiElement getIdentifier() {
return findChildByType(IDENTIFIER);
}
}
| [
"ice1000kotlin@foxmail.com"
] | ice1000kotlin@foxmail.com |
4afbe6a6493c0f3fe6db7240935cb70d483ba09b | 67ae86ea97dc4e9e50b330520428919467a5372e | /src/main/java/com/cbs/edu/examples/comparing/SortByEmployeeNameComparator.java | 6239a9eef8a8e91b11c9998b43a9394310164c2b | [] | no_license | Dergachov/JavaStudyPro | a17f5a308a815a0f3e54279717dddf83dda8ff06 | 38c1a289c1be07440ad68e3dadebb2c60f0e174c | refs/heads/master | 2020-06-28T19:42:41.314831 | 2017-09-16T13:39:39 | 2017-09-16T13:39:39 | 74,471,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package com.cbs.edu.examples.comparing;
import java.util.Comparator;
public class SortByEmployeeNameComparator implements Comparator<Employee> {
@Override
public int compare(Employee o1, Employee o2) {
return o1.getName().compareTo(o2.getName());
}
}
| [
"deyneko55@gmail.com"
] | deyneko55@gmail.com |
f1759c5cb71bab3e8d034f85d1663e9484440005 | e49146e716eea5c75ef208a3a33ec927e1c5df1b | /MVAS/SOAP/src/com/services/soap/apiclient/g3gateway/SmssoapPort.java | 2e3e257574f654726db5ba63c6dd1dcc54bda3ec | [] | no_license | cococo111111/vng | 513c8cc19f368e0fae1187ce4e7ddefd046336bd | 8d5010d5e1477eda743cacb87b9db18524d676d0 | refs/heads/master | 2021-01-19T00:09:45.087480 | 2015-08-03T15:56:54 | 2015-08-03T15:56:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 617 | java | /**
* SmssoapPort.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.services.soap.apiclient.g3gateway;
public interface SmssoapPort extends java.rmi.Remote {
/**
* MO Receive from user
*/
public int moReceive(java.lang.String requestID, java.lang.String userID, java.lang.String serviceID, java.lang.String commandCode, java.lang.String message, java.lang.String operator, java.lang.String partnerUsername, java.lang.String partnerPassword, java.lang.String requestTime) throws java.rmi.RemoteException;
}
| [
"cuong.truong@mobivi.vn"
] | cuong.truong@mobivi.vn |
cc70aa7fffbab5f4443fc477e59540174dc82d8c | b06acf556b750ac1fa5b28523db7188c05ead122 | /IfcXML/src/org/tech/iai/ifc/xml/ifc/_2x3/final_/impl/IfcPHMeasureTypeImpl.java | 624d54e1d0480ac51f16722a8a60b9d59f0469ff | [] | no_license | christianharrington/MDD | 3500afbe5e1b1d1a6f680254095bb8d5f63678ba | 64beecdaed65ac22b0047276c616c269913afd7f | refs/heads/master | 2021-01-10T21:42:53.686724 | 2012-12-17T03:27:05 | 2012-12-17T03:27:05 | 6,157,471 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,949 | java | /**
*/
package org.tech.iai.ifc.xml.ifc._2x3.final_.impl;
import java.math.BigInteger;
import java.util.List;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage;
import org.tech.iai.ifc.xml.ifc._2x3.final_.IfcPHMeasureType;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Ifc PH Measure Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.impl.IfcPHMeasureTypeImpl#getValue <em>Value</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.impl.IfcPHMeasureTypeImpl#getId <em>Id</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.impl.IfcPHMeasureTypeImpl#getPath <em>Path</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.impl.IfcPHMeasureTypeImpl#getPos <em>Pos</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class IfcPHMeasureTypeImpl extends EObjectImpl implements IfcPHMeasureType {
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final double VALUE_EDEFAULT = 0.0;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected double value = VALUE_EDEFAULT;
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final String ID_EDEFAULT = null;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected String id = ID_EDEFAULT;
/**
* The default value of the '{@link #getPath() <em>Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected static final List<String> PATH_EDEFAULT = null;
/**
* The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected List<String> path = PATH_EDEFAULT;
/**
* The default value of the '{@link #getPos() <em>Pos</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPos()
* @generated
* @ordered
*/
protected static final List<BigInteger> POS_EDEFAULT = null;
/**
* The cached value of the '{@link #getPos() <em>Pos</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPos()
* @generated
* @ordered
*/
protected List<BigInteger> pos = POS_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IfcPHMeasureTypeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FinalPackage.eINSTANCE.getIfcPHMeasureType();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public double getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(double newValue) {
double oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FinalPackage.IFC_PH_MEASURE_TYPE__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FinalPackage.IFC_PH_MEASURE_TYPE__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public List<String> getPath() {
return path;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPath(List<String> newPath) {
List<String> oldPath = path;
path = newPath;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FinalPackage.IFC_PH_MEASURE_TYPE__PATH, oldPath, path));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public List<BigInteger> getPos() {
return pos;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPos(List<BigInteger> newPos) {
List<BigInteger> oldPos = pos;
pos = newPos;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FinalPackage.IFC_PH_MEASURE_TYPE__POS, oldPos, pos));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FinalPackage.IFC_PH_MEASURE_TYPE__VALUE:
return getValue();
case FinalPackage.IFC_PH_MEASURE_TYPE__ID:
return getId();
case FinalPackage.IFC_PH_MEASURE_TYPE__PATH:
return getPath();
case FinalPackage.IFC_PH_MEASURE_TYPE__POS:
return getPos();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FinalPackage.IFC_PH_MEASURE_TYPE__VALUE:
setValue((Double)newValue);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__ID:
setId((String)newValue);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__PATH:
setPath((List<String>)newValue);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__POS:
setPos((List<BigInteger>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FinalPackage.IFC_PH_MEASURE_TYPE__VALUE:
setValue(VALUE_EDEFAULT);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__ID:
setId(ID_EDEFAULT);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__PATH:
setPath(PATH_EDEFAULT);
return;
case FinalPackage.IFC_PH_MEASURE_TYPE__POS:
setPos(POS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FinalPackage.IFC_PH_MEASURE_TYPE__VALUE:
return value != VALUE_EDEFAULT;
case FinalPackage.IFC_PH_MEASURE_TYPE__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case FinalPackage.IFC_PH_MEASURE_TYPE__PATH:
return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
case FinalPackage.IFC_PH_MEASURE_TYPE__POS:
return POS_EDEFAULT == null ? pos != null : !POS_EDEFAULT.equals(pos);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (value: ");
result.append(value);
result.append(", id: ");
result.append(id);
result.append(", path: ");
result.append(path);
result.append(", pos: ");
result.append(pos);
result.append(')');
return result.toString();
}
} //IfcPHMeasureTypeImpl
| [
"christian@harrington.dk"
] | christian@harrington.dk |
2ff0e4e3e55de27a106e5e83c793f247ccc82cd4 | 8f3dcdb61b3d5d810b750ca8b7d451df3ec7260d | /app/src/main/java/com/android/dx/dex/code/form/Form11x.java | bdb44059989134d3399e810cc412daa6868ffcb9 | [] | no_license | Doublemine/TerminalIDE | 7453e47b9e0c5506b048d19e3fd776b1abc9efa7 | ae40d0855c93785b3c129143d835652b6a90cbcf | refs/heads/master | 2020-04-09T19:17:37.771138 | 2015-08-25T13:07:47 | 2015-08-25T13:07:47 | 41,362,667 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,491 | java | /*
* Copyright (C) 2007 The Android Open Source Project
*
* 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.android.dx.dex.code.form;
import com.android.dx.dex.code.DalvInsn;
import com.android.dx.dex.code.InsnFormat;
import com.android.dx.dex.code.SimpleInsn;
import com.android.dx.rop.code.RegisterSpecList;
import com.android.dx.util.AnnotatedOutput;
/**
* Instruction format {@code 11x}. See the instruction format spec
* for details.
*/
public final class Form11x extends InsnFormat {
/**
* {@code non-null;} unique instance of this class
*/
public static final InsnFormat THE_ONE = new Form11x();
/**
* Constructs an instance. This class is not publicly
* instantiable. Use {@link #THE_ONE}.
*/
private Form11x() {
// This space intentionally left blank.
}
/**
* {@inheritDoc}
*/
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
return regs.get(0).regString();
}
/**
* {@inheritDoc}
*/
@Override
public String insnCommentString(DalvInsn insn, boolean noteIndices) {
// This format has no comment.
return "";
}
/**
* {@inheritDoc}
*/
@Override
public int codeSize() {
return 1;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
return (insn instanceof SimpleInsn) &&
(regs.size() == 1) &&
unsignedFitsInByte(regs.get(0).getReg());
}
/**
* {@inheritDoc}
*/
@Override
public InsnFormat nextUp() {
return null;
}
/**
* {@inheritDoc}
*/
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
write(out, opcodeUnit(insn, regs.get(0).getReg()));
}
}
| [
"wanghaokoko1994@gmail.com"
] | wanghaokoko1994@gmail.com |
8f1ac2aab281287a756307e7689adaa1fec9ccfa | efbfbad75813b92ba0cce0df492fe6c7cf41a8c6 | /basic-mongodb-repository/src/main/java/example/controller/PersonController.java | 961977dccd2aad51d424e3538912c17899832513 | [] | no_license | sergueik/springboot_study | d4636cd255cdaec07a22276393541a7dd9bb97c1 | 59c87d64d0d8d5e2eae6fe496b2a84425208fcfd | refs/heads/master | 2023-09-01T14:04:34.285473 | 2023-08-31T22:29:09 | 2023-08-31T22:29:09 | 101,407,389 | 5 | 6 | null | 2023-03-04T00:57:19 | 2017-08-25T13:38:05 | Java | UTF-8 | Java | false | false | 2,798 | java | package example.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import example.model.Person;
import example.model.Ticket;
import example.service.PersonService;
import example.service.TicketService;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
@RestController
@RequestMapping("person")
public class PersonController {
@Autowired
private final PersonService personService;
@Autowired
private final TicketService ticketService;
public PersonController(PersonService personService,
TicketService ticketService) {
this.personService = personService;
this.ticketService = ticketService;
}
@PostMapping
public Person create(@RequestBody Person person) {
return personService.insertPersonData(person);
}
@GetMapping
public Collection<Person> read() {
return personService.getAllPersonInformation();
}
@GetMapping(path = "name/{name}")
public List<Person> findByNameLike(@PathVariable("name") String name) {
return personService.findByNameLike(name);
}
@GetMapping(path = "greater/{id}")
public List<Person> findByNumberGreaterOrEqualCustomQuery(
@PathVariable("id") Integer id) {
return personService.findByNumberGreaterOrEqualCustomQuery(id);
}
@GetMapping(path = "{id}")
public Optional<Person> readQueryUsingId(@PathVariable("id") Integer id) {
return personService.getPersonInformationUsingId(id);
}
@PutMapping(path = "/update/{id}")
public void update(@PathVariable Integer id, @RequestBody Person person) {
personService.updatePersonUsingId(id, person);
}
@PutMapping(path = "/addticket/{id}")
public void addTickets(@PathVariable Integer id,
@RequestBody List<Ticket> tickets) {
personService.addTickets(id, tickets);
}
@DeleteMapping(path = "/delete/{id}")
public void delete(@PathVariable("id") Integer id) {
personService.deletePersonUsingId(id);
}
@RequestMapping(value = "/tickets/{id}", method = RequestMethod.GET)
public Optional<Ticket> getTicketById(@PathVariable("id") String id) {
return ticketService.getTicketById(id);
}
@RequestMapping(value = "/tickets", method = RequestMethod.POST)
public Ticket addNewApplication(@RequestBody Ticket ticket) {
return ticketService.addNewApplication(ticket);
}
@RequestMapping(value = "/tickets/{id}", method = RequestMethod.PUT)
public Ticket updateApplication(@PathVariable("id") String id,
@RequestBody Ticket ticket) {
return ticketService.updateApplication(id, ticket);
}
@RequestMapping(value = "/tickets/{id}", method = RequestMethod.DELETE)
public void deleteTicket(@PathVariable("id") String id) {
ticketService.deleteTicket(id);
}
}
| [
"kouzmine_serguei@yahoo.com"
] | kouzmine_serguei@yahoo.com |
539d9e9764dc156ef71f0d427f01543c3d834bd9 | 99094cc79bdbb69bb24516e473f17b385847cb3a | /283.Move Zeroes/src/Solution.java | 92e7b9545a74623612bd9a7729a02da9cad956ba | [] | no_license | simonxu14/LeetCode_Simon | 7d389bbfafd3906876a3f796195bb14db3a1aeb3 | 13f4595374f30b482c4da76e466037516ca3a420 | refs/heads/master | 2020-04-06T03:33:25.846686 | 2016-09-10T00:23:11 | 2016-09-10T00:23:11 | 40,810,940 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 229 | java | public class Solution {
public void moveZeroes(int[] nums) {
int k = 0;
for(int i = 0; i < nums.length; i++) {
if (nums[i] != 0) {
int temp = nums[i];
nums[i] = nums[k];
nums[k] = temp;
k ++;
}
}
}
} | [
"simonxu14@gmail.com"
] | simonxu14@gmail.com |
aa5980b0d20ca000e576934841b31038bdc052c8 | 2632f896a71d52a7e1f56cb5fab227ac88770cf0 | /app/src/main/java/ir/mft/mftfridaysbahman97/TestDialogActivity.java | f1c8f0f97c575b713d4ab9423997061ad28e6405 | [] | no_license | SirLordPouya/MFTFridaysBahman97 | ecc734ae914a5c6c4e1f90230fc5d21fe5fd9dc5 | 53ddb88ff682a429a3b75155a98b0698014a23fc | refs/heads/master | 2020-04-23T03:09:11.445370 | 2019-03-15T13:49:07 | 2019-03-15T13:49:07 | 170,869,741 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 352 | java | package ir.mft.mftfridaysbahman97;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class TestDialogActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_dialog);
}
}
| [
"pouyaheydary@gmail.com"
] | pouyaheydary@gmail.com |
d751f24e1eba7614f9fec72ec835d401147c5760 | 1931aa0e243dcdfc5a485c3281402319535d3f8c | /src/pagination/ExecutePageLoop.java | f24213f1f978a3c948122e11517c96604f9cd6c8 | [] | no_license | preetishIbankG99/MindQMisc | 01975136742b2ee95bb1286a113b30156d774739 | b120fafefbe5c695648953e04b67792a99447817 | refs/heads/master | 2023-04-13T18:22:51.294937 | 2021-05-01T13:42:26 | 2021-05-01T13:42:26 | 363,422,169 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,118 | java | package pagination;
import java.io.IOException;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ExecutePageLoop {
public static void main(String[] args) throws IOException, InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.get("https://www.w3schools.com/howto/howto_css_pagination.asp");
driver.manage().window().maximize();
List pagination =driver.findElements(By.xpath("//*[@id=\"main\"]/ul/li/a"));
int size= pagination.size();
System.out.println(pagination.size());
if(size>0)
{
System.out.println("pagination exists");
// click on pagination link
for(int i=2; i<size; i++){
// JavascriptExecutor js=(JavascriptExecutor)driver;
WebElement element=driver.findElement(By.xpath("//*[@id=\"main\"]/ul/li[\"+i+\"]/a"));
// js.executeScript("arguments[0].setAttribute('style','border: solid 2px red');", element);
// element.click() ;
element.click();
Thread.sleep(5000);
System.out.println("Page "+i);
}
//driver.quit();
}
else
{
System.out.println("pagination not exists");
}
}
}
//List<WebElement> pagination = driver.findElements(By.xpath("//div[@class='pagination-container']//a"));
//int s = pagination.size();
//for(int i=0;i<=s;i++){
// this.getAuthors();
// driver.get(Constants.url);
// Thread.sleep(5000);
//
// pagination = driver.findElements(By.xpath("//div[@class='pagination-container']//a"));
// pagination.get(i).click();
// Thread.sleep(5000);
//new WebDriverWait(
// driver, TIME_TO_WAIT).until(
// ExpectedConditions.presenceOfElementLocated(
// By.tagName("a")));
//List<WebElement> elements = driver.findElements(By.tagName("a"));
//for (int i = 0; i < elements.size(); i++) {
//String title = elements.get(i).getAttribute("title");
//if (title.equals("Next Page")) {
// elements.get(i).click();
// break;
//}
| [
"shubhamsethiabc87@gmail.com"
] | shubhamsethiabc87@gmail.com |
8944661151829da045a3afd70f2222cc3f18bf53 | e2d8057dee95fa9bfd595e98270bce7dc7428c11 | /JThermodynamics/test/disassociation/TestFindDisassociationStructure.java | 8b9ee9f6ce35d5d5ec50a09c94d262af4fd6aa6f | [] | no_license | blurock/Thermodynamics | 1e1970aaa2b76c3b31d8021b91f45825829e4643 | 3285da0d2a3580bfcc6db39b46c5e62df9bf69ec | refs/heads/master | 2020-05-21T20:31:39.619319 | 2018-05-24T08:54:00 | 2018-05-24T08:54:00 | 63,304,339 | 2 | 2 | null | 2016-10-07T20:53:08 | 2016-07-14T05:13:17 | Java | UTF-8 | Java | false | false | 2,389 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package disassociation;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openscience.cdk.AtomContainer;
import org.openscience.cdk.exception.CDKException;
import thermo.data.benson.DB.ThermoSQLConnection;
import thermo.data.structure.disassociation.DB.SQLDisassociationEnergy;
import thermo.data.structure.linearform.NancyLinearFormToGeneralStructure;
import thermo.data.structure.linearform.NancyLinearFormToMolecule;
import thermo.data.structure.substructure.FindSubstructure;
import static org.junit.Assert.*;
/**
*
* @author edwardblurock
*/
public class TestFindDisassociationStructure {
public TestFindDisassociationStructure() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void testDisassociationStructure() {
try {
ThermoSQLConnection connection = new ThermoSQLConnection();
connection.connect();
NancyLinearFormToMolecule nancy = new NancyLinearFormToGeneralStructure(connection);
//String nancyS = "ch2(.)ch2/ch2/ch2/ch2/ch3";
String nancyS = "ch(.)//ch/ch2/ch2/ch2/ch3";
//String nancyS = "ch3(.)";
AtomContainer mol = nancy.convert(nancyS);
FindSubstructure find = new FindSubstructure(mol, connection);
SQLDisassociationEnergy sqldiss = new SQLDisassociationEnergy(connection);
List<String> names = sqldiss.listOfDisassociationStructures();
String name = find.findLargestSubstructure(names);
System.out.println("The substructure of " + nancyS + " is " + name);
} catch (CDKException ex) {
Logger.getLogger(TestFindDisassociationStructure.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(TestFindDisassociationStructure.class.getName()).log(Level.SEVERE, null, ex);
}
}
} | [
"edward.blurock@gmail.com"
] | edward.blurock@gmail.com |
d3381d9d1ed3d314311a78ccf6ef996892f9b70f | 0f78eb1bd70ee3ea0cbd7b795d7e946255366efd | /src-batch/com/qfw/batch/bizservice/schedule/BatchDaemoUCC.java | a4b3087d0ad2d9ce148170357b6f17e882f0348d | [] | no_license | xie-summer/sjct | b8484bc4ee7d61b3713fa2e88762002f821045a6 | 4674af9a0aa587b5765e361ecaa6a07f966f0edb | refs/heads/master | 2021-06-16T22:06:06.646687 | 2017-05-12T09:24:52 | 2017-05-12T09:24:52 | 92,924,351 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 748 | java | package com.qfw.batch.bizservice.schedule;
import com.qfw.batch.bizservice.schedule.common.ThreadDeamon;
import com.qfw.batch.bizservice.util.JobUtil;
import com.qfw.batch.bizservice.util.QuartzUtil;
import com.qfw.batch.listener.BatchWorkerListener;
/**
*
* @author Jie
*
*/
public class BatchDaemoUCC {
private static boolean isRun = false;
/**
* 启动批框架
*/
public static void mainStart() {
try {
JobUtil.init();
QuartzUtil.startScheduler();
if(!isRun){
BatchWorkerListener workerListener = new BatchWorkerListener();
workerListener.start();
ThreadDeamon td = new ThreadDeamon();
td.start();
isRun = true;
}
} catch (Exception e) {
}
}
} | [
"271673805@qq.com"
] | 271673805@qq.com |
23236f4688eb4000d3fa396853030fba47c8bc70 | 2b2fcb1902206ad0f207305b9268838504c3749b | /WakfuClientSources/srcx/class_7103_cns.java | c1227681206fefbd4e260b97d805e97e47850318 | [] | no_license | shelsonjava/Synx | 4fbcee964631f747efc9296477dee5a22826791a | 0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d | refs/heads/master | 2021-01-15T13:51:41.816571 | 2013-11-17T10:46:22 | 2013-11-17T10:46:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 471 | java | import java.util.HashMap;
import java.util.Map;
public enum cns
{
private static final Map cFX;
private final int bQS;
public static cns vS(int paramInt)
{
return (cns)cFX.get(Integer.valueOf(paramInt));
}
private cns(int arg3)
{
int j;
this.bQS = j;
}
public int intValue() {
return this.bQS;
}
static
{
cFX = new HashMap();
for (cns localcns : values())
cFX.put(Integer.valueOf(localcns.bQS), localcns);
}
} | [
"music_inme@hotmail.fr"
] | music_inme@hotmail.fr |
8bcbc181c46fa6c4256cd051c8ef6ac63b98ac9d | 6471e8d82fdb5ebf5458bc85c85f9fbedb42218d | /src/main/java/websocket/execute/AttendanceProcessStrategy.java | 78d6d35eafdd17894aa9ec8ed6c7f55b3f98b0f9 | [] | no_license | mankicho/split | 7e2ffd3246743c808bdee6f70dd917be30d7395a | 86372e6ec9da23b549d6106de41e6a11eb5b6dd3 | refs/heads/master | 2023-07-16T03:35:25.925976 | 2021-09-03T11:22:24 | 2021-09-03T11:22:24 | 307,864,886 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,746 | java | package websocket.execute;
import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import org.json.JSONObject;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Map;
@Log4j2
public class AttendanceProcessStrategy {
private Map<String, WebSocketSession> cafeMap;
private Map<String, WebSocketSession> userMap;
public void setCafeMap(Map<String, WebSocketSession> cafeMap) {
this.cafeMap = cafeMap;
}
public void setUserMap(Map<String, WebSocketSession> userMap) {
this.userMap = userMap;
}
public void execute(TextMessage tm) {
JSONObject object = new JSONObject(tm.getPayload());
String cafe = object.getString("cafe"); // 메세지에 카페정보(Q01B)
// todo 1. 카페 어플리케이션에 출석했음을 알림.
WebSocketSession cafeSession = cafeMap.get(cafe); // Q01B로 세션 찾아내서
if (cafeSession != null) {
try {
cafeSession.sendMessage(tm); // 카페에 메세지 전달
} catch (IOException e) {
log.info(getClass().getName() + " IOException occur!! => " + e.getMessage());
}
}
// todo 2. 해당 플랜을 참여하는 유저들에게 알림.
// todo 3. 내 친구들에게 소식 알림
}
private void sendMessageToUser(String email, TextMessage tm) {
try {
userMap.get(email).sendMessage(tm);
} catch (IOException e) {
log.info(LocalDateTime.now()+" websocket error occur: att->sendMessage->IOException "+e.getMessage());
}
}
}
| [
"skxz123@gmail.com"
] | skxz123@gmail.com |
97e20f73134e9351580afe99bac29d62e303808a | c07dddb3f56e4525732081e4b532632ec5c4a4db | /dataset/src/main/java/com/cloudera/cdk/examples/data/ReadHCatalogUserDatasetGeneric.java | 9f88b48803df311834d83fb28e62a066672324b5 | [
"Apache-2.0"
] | permissive | epishkin/cdk-examples | d22cb2eb5bef3f43ff4ccdacf5bca1ef2b8fddf9 | 53bc4a458a678bf076f1fb532578dd9192056021 | refs/heads/master | 2021-01-17T10:43:50.025347 | 2013-08-01T12:20:18 | 2013-08-05T13:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,932 | java | /**
* Copyright 2013 Cloudera Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cloudera.cdk.examples.data;
import com.cloudera.cdk.data.Dataset;
import com.cloudera.cdk.data.DatasetReader;
import com.cloudera.cdk.data.DatasetRepository;
import com.cloudera.cdk.data.hcatalog.HCatalogDatasetRepository;
import org.apache.avro.generic.GenericRecord;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
/**
* Read all the user objects from the users dataset using Avro generic records.
*/
public class ReadHCatalogUserDatasetGeneric extends Configured implements Tool {
@Override
public int run(String[] args) throws Exception {
// Construct an HCatalog dataset repository using managed Hive tables
DatasetRepository repo = new HCatalogDatasetRepository();
// Get the users dataset
Dataset users = repo.get("users");
// Get a reader for the dataset and read all the users
DatasetReader<GenericRecord> reader = users.getReader();
try {
reader.open();
while (reader.hasNext()) {
GenericRecord user = reader.read();
System.out.println(user);
}
} finally {
reader.close();
}
return 0;
}
public static void main(String... args) throws Exception {
int rc = ToolRunner.run(new ReadHCatalogUserDatasetGeneric(), args);
System.exit(rc);
}
}
| [
"tom@cloudera.com"
] | tom@cloudera.com |
c5211286eca0c1d0ff31dcfd2484fc20268624c9 | 1c7a9b02e81e9c212bd0a6492a6e86a0eb63f495 | /src/main/java/com/epchong/po/User.java | c2d20ef1985faf1240c8e725c66fa05edd821470 | [] | no_license | epochong/jsj_validate | eae0a676612e3c6fa5f45013f06d7f8e8152872f | 9c321f844bb81fc36fc3ad24725c276fa0bd6356 | refs/heads/master | 2022-06-24T07:32:06.097807 | 2019-09-06T12:23:33 | 2019-09-06T12:23:33 | 206,558,021 | 0 | 0 | null | 2022-06-21T01:49:21 | 2019-09-05T12:26:04 | Java | UTF-8 | Java | false | false | 920 | java | package com.epchong.po;
import java.io.Serializable;
/**
* @author epochong
* @date 2019/9/4 19:55
* @email epochong@163.com
* @blog epochong.github.io
* @describe
*/
public class User implements Serializable {
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
private String userName;
private String password;
@Override
public String toString() {
return "User{" +
"userName='" + userName + '\'' +
", password='" + password + '\'' +
'}';
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
| [
"Valentineone@example.com"
] | Valentineone@example.com |
89831b74894b7bfd0e448241fe445d6fc4b7de1b | 4b80a1d37087ca4c352fb026cca641b5310f8a24 | /trunk/frame/service/dataload/dna2hbase/src/main/java/com/eb/bi/rs/dna2hbase/.svn/text-base/DnaChaptCnt2HbaseMapper.java.svn-base | 259def476c5142694d5936fd56f44d967e0ab643 | [] | no_license | byr-ly/leetcode | 292ff93245d81a6b271c7785896330d271ea5915 | 4eb8966b237c81a68822f81b17158ee5d91c9400 | refs/heads/master | 2022-11-09T15:20:29.792485 | 2017-11-07T12:06:05 | 2017-11-07T12:06:05 | 77,654,665 | 1 | 0 | null | 2022-11-04T22:44:01 | 2016-12-30T02:40:38 | Java | UTF-8 | Java | false | false | 884 | package com.eb.bi.rs.dna2hbase;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
//这个是传统的MR导入数据到hbase的程序,先在map端进行分割数据,做一下初步的处理,然后在reduce端把数据插入到hbase里
public class DnaChaptCnt2HbaseMapper extends Mapper<Object, Text, Text, Text> {
private String split;
public void map(Object o, Text value, Context context) throws IOException, InterruptedException {
String line = value.toString();
String[] items = line.split(split, -1);
context.write(new Text(items[0]), new Text(items[1]));
}
protected void setup(Context context) throws IOException, InterruptedException {
Configuration conf = context.getConfiguration();
split = conf.get("conf.text.split");
}
}
| [
"liyang@liyangdeMacBook-Pro.local"
] | liyang@liyangdeMacBook-Pro.local | |
4447b189d745019065987882e5f7bda755ec2a6f | c36d08386a88e139e6325ea7f5de64ba00a45c9f | /hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/dao/AMAttemptsInfo.java | ab20c6db2c2d36d93b97b2e8209a934d498f98b4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"CC0-1.0",
"CC-BY-3.0",
"EPL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Classpath-exception-2.0",
"CC-PDDC",
"GCC-exception-3.1",
"CDDL-1.0",
"MIT",
"GPL-2.0-only",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-on... | permissive | dmgerman/hadoop | 6197e3f3009196fb4ca528ab420d99a0cd5b9396 | 70c015914a8756c5440cd969d70dac04b8b6142b | refs/heads/master | 2020-12-01T06:30:51.605035 | 2019-12-19T19:37:17 | 2019-12-19T19:37:17 | 230,528,747 | 0 | 0 | Apache-2.0 | 2020-01-31T18:29:52 | 2019-12-27T22:48:25 | Java | UTF-8 | Java | false | false | 3,186 | java | begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/** * 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 joblicable 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. */
end_comment
begin_package
DECL|package|org.apache.hadoop.mapreduce.v2.hs.webapp.dao
package|package
name|org
operator|.
name|apache
operator|.
name|hadoop
operator|.
name|mapreduce
operator|.
name|v2
operator|.
name|hs
operator|.
name|webapp
operator|.
name|dao
package|;
end_package
begin_import
import|import
name|java
operator|.
name|util
operator|.
name|ArrayList
import|;
end_import
begin_import
import|import
name|javax
operator|.
name|xml
operator|.
name|bind
operator|.
name|annotation
operator|.
name|XmlAccessType
import|;
end_import
begin_import
import|import
name|javax
operator|.
name|xml
operator|.
name|bind
operator|.
name|annotation
operator|.
name|XmlAccessorType
import|;
end_import
begin_import
import|import
name|javax
operator|.
name|xml
operator|.
name|bind
operator|.
name|annotation
operator|.
name|XmlElement
import|;
end_import
begin_import
import|import
name|javax
operator|.
name|xml
operator|.
name|bind
operator|.
name|annotation
operator|.
name|XmlRootElement
import|;
end_import
begin_class
annotation|@
name|XmlRootElement
argument_list|(
name|name
operator|=
literal|"jobAttempts"
argument_list|)
annotation|@
name|XmlAccessorType
argument_list|(
name|XmlAccessType
operator|.
name|FIELD
argument_list|)
DECL|class|AMAttemptsInfo
specifier|public
class|class
name|AMAttemptsInfo
block|{
annotation|@
name|XmlElement
argument_list|(
name|name
operator|=
literal|"jobAttempt"
argument_list|)
DECL|field|attempt
specifier|protected
name|ArrayList
argument_list|<
name|AMAttemptInfo
argument_list|>
name|attempt
init|=
operator|new
name|ArrayList
argument_list|<
name|AMAttemptInfo
argument_list|>
argument_list|()
decl_stmt|;
DECL|method|AMAttemptsInfo ()
specifier|public
name|AMAttemptsInfo
parameter_list|()
block|{ }
comment|// JAXB needs this
DECL|method|add (AMAttemptInfo info)
specifier|public
name|void
name|add
parameter_list|(
name|AMAttemptInfo
name|info
parameter_list|)
block|{
name|this
operator|.
name|attempt
operator|.
name|add
argument_list|(
name|info
argument_list|)
expr_stmt|;
block|}
DECL|method|getAttempts ()
specifier|public
name|ArrayList
argument_list|<
name|AMAttemptInfo
argument_list|>
name|getAttempts
parameter_list|()
block|{
return|return
name|this
operator|.
name|attempt
return|;
block|}
block|}
end_class
end_unit
| [
"vinodkv@apache.org"
] | vinodkv@apache.org |
42f479ea2871c8688e3491c8de6872ce38597040 | c3d2c07bfbcee009b859cf8598fdf2dca71be148 | /game-net/src/main/java/com/wjybxx/fastjgame/annotation/HttpRequestMapping.java | 77b1e2e62f7d96eecc1d3201ed1c2578b3fc2b7d | [
"Apache-2.0"
] | permissive | happyjianguo/fastjgame | be8906c3796a36e4dc5817e59426dbb856136e55 | a4b7e35fe30e45eb50f8a5117ca2e09908e8e300 | refs/heads/master | 2020-07-29T18:47:11.613430 | 2019-09-19T09:21:52 | 2019-09-19T09:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,416 | java | /*
* Copyright 2019 wjybxx
*
* 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 iBn 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.wjybxx.fastjgame.annotation;
import com.wjybxx.fastjgame.net.HttpRequestHandler;
import com.wjybxx.fastjgame.net.HttpRequestParam;
import com.wjybxx.fastjgame.net.HttpSession;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* http请求路由。
* 该注解可以用在类/接口上,也可以用在方法上。当类上存在该注解时,那么该类中的所有方法默认都在该路径之下。
* <p>
* 方法必须满足以下要求,否则编译会报错:
* <li>1. 必须是3个参数:第一个必须{@link HttpSession},第二个参数为{@link String},第三个参数必须是{@link HttpRequestParam}。
* 也就是可以转换为{@link HttpRequestHandler}</li>
* <li>2. 必须是public </li>
* <p>
* eg:
* <pre>{@code
* @HttpRequestMapping
* public void onRequest(HttpSession session, String path, HttpRequestParam param) {
* // do something
* }
* }
* </pre>
* <p>
* 没想到啥好名字,参考下了常见的spring的RequestMapping,也打算做个类似的支持。
*
* @author wjybxx
* @version 1.0
* date - 2019/8/27
* github - https://github.com/hl845740757
*/
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface HttpRequestMapping {
/**
* 要监听的http请求路径。
* 路径必须以'/'开头,eg: /main
*
* @return path
*/
String path();
/**
* 是否继承父节点的路径,默认继承。
* 如果不继承父节点路径,则使用指定的路径,否则使用父节点路径和当前路径拼接完的路径。
*
* @return true/false
*/
boolean inherit() default true;
}
| [
"845740757@qq.com"
] | 845740757@qq.com |
abbe46f74822f70b20e1c0caa4da25c5c92011ef | fcd28e246e059e5305ee89931ce7d81edddf8057 | /camera/java/camera/Cluster_EncoderDataReaderHelper.java | 490d1dea2305e66da8ae454f19c74fd430c7ad1d | [] | no_license | lsst-ts/ts_sal_runtime | 56e396cb42f1204595f9bcdb3a2538007c0befc6 | ae918e6f2b73f2ed7a8201bf3a79aca8fb5b36ef | refs/heads/main | 2021-12-21T02:40:37.628618 | 2017-09-14T18:06:48 | 2017-09-14T18:06:49 | 145,469,981 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 900 | java | package camera;
import org.opensplice.dds.dcps.Utilities;
public final class Cluster_EncoderDataReaderHelper
{
public static camera.Cluster_EncoderDataReader narrow(java.lang.Object obj)
{
if (obj == null) {
return null;
} else if (obj instanceof camera.Cluster_EncoderDataReader) {
return (camera.Cluster_EncoderDataReader)obj;
} else {
throw Utilities.createException(Utilities.EXCEPTION_TYPE_BAD_PARAM, null);
}
}
public static camera.Cluster_EncoderDataReader unchecked_narrow(java.lang.Object obj)
{
if (obj == null) {
return null;
} else if (obj instanceof camera.Cluster_EncoderDataReader) {
return (camera.Cluster_EncoderDataReader)obj;
} else {
throw Utilities.createException(Utilities.EXCEPTION_TYPE_BAD_PARAM, null);
}
}
}
| [
"DMills@lsst.org"
] | DMills@lsst.org |
3410d85902cd72b239fd0186f588bbe9d282fba0 | c4623aa95fb8cdd0ee1bc68962711c33af44604e | /src/android/support/v4/view/et.java | ae907a073a04ffc6d4ab2aadab4eca30b8b57b1c | [] | no_license | reverseengineeringer/com.yelp.android | 48f7f2c830a3a1714112649a6a0a3110f7bdc2b1 | b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8 | refs/heads/master | 2021-01-19T02:07:25.997811 | 2016-07-19T16:37:24 | 2016-07-19T16:37:24 | 38,555,675 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 464 | java | package android.support.v4.view;
import android.view.View;
import android.view.ViewPropertyAnimator;
class et
{
public static void a(View paramView, ex paramex)
{
if (paramex != null)
{
paramView.animate().setListener(new eu(paramex, paramView));
return;
}
paramView.animate().setListener(null);
}
}
/* Location:
* Qualified Name: android.support.v4.view.et
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
931f261499314f39e21b3bb9cdfc840b4a1c8971 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/model_seeding/29_apbsmem-jahuwaldt.plot.PlotYAxis-0.5-4/jahuwaldt/plot/PlotYAxis_ESTest_scaffolding.java | 585919223fd2f9512ce479148ce4271ce261ecdc | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 530 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 11:54:55 GMT 2019
*/
package jahuwaldt.plot;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class PlotYAxis_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
12e53346db9f181c430abdd6572ceed90906abb8 | 692a7b9325014682d72bd41ad0af2921a86cf12e | /iWiFi/src/com/autonavi/aps/api/APSFactory.java | bbcfc765da4e43a7742e12d8d4ba3a7a37709ab0 | [] | no_license | syanle/WiFi | f76fbd9086236f8a005762c1c65001951affefb6 | d58fb3d9ae4143cbe92f6f893248e7ad788d3856 | refs/heads/master | 2021-01-20T18:39:13.181843 | 2015-10-29T12:38:57 | 2015-10-29T12:38:57 | 45,156,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 931 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.autonavi.aps.api;
import android.content.Context;
// Referenced classes of package com.autonavi.aps.api:
// APS, APSLENOVODUALCARD, IAPS
public class APSFactory
{
private static IAPS a = null;
public APSFactory()
{
}
public static IAPS getInstance(Context context)
{
return getInstance(context, null);
}
public static IAPS getInstance(Context context, String s)
{
if (s != null && s.length() > 0) goto _L2; else goto _L1
_L1:
a = APS.getInstance(context);
_L4:
return a;
_L2:
if (s.equalsIgnoreCase("lenovodualcard"))
{
a = APSLENOVODUALCARD.getInstance(context);
}
if (true) goto _L4; else goto _L3
_L3:
}
}
| [
"arehigh@gmail.com"
] | arehigh@gmail.com |
21cdb2280e7d0e68a87767d493a0135123cc13c5 | 092b280111bfc83a12c3a211ebbefa88fa2a6ba1 | /dart/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/dialogs/SortMembersMessageDialog.java | 0458dae2a978ad502b1830540ed54e1fb45b9d27 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | bopopescu/Dart-1 | 490a06e930d68aaaf26bda379883bc86f321f0c7 | 6f958b9a71df9cc6da963b1c2828606a603ea97c | refs/heads/master | 2022-11-27T12:00:36.627589 | 2011-10-31T09:49:15 | 2011-10-31T09:49:15 | 282,516,915 | 0 | 0 | NOASSERTION | 2020-07-25T20:06:54 | 2020-07-25T20:06:54 | null | UTF-8 | Java | false | false | 8,038 | java | /*
* Copyright (c) 2011, the Dart project authors.
*
* Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.dart.tools.ui.internal.dialogs;
import com.google.dart.tools.ui.CodeTemplateContextType;
import com.google.dart.tools.ui.DartToolsPlugin;
import com.google.dart.tools.ui.MembersOrderPreferencePage;
import com.google.dart.tools.ui.dialogs.DialogsMessages;
import com.google.dart.tools.ui.internal.dialogs.fields.DialogField;
import com.google.dart.tools.ui.internal.dialogs.fields.IDialogFieldListener;
import com.google.dart.tools.ui.internal.dialogs.fields.LayoutUtil;
import com.google.dart.tools.ui.internal.dialogs.fields.SelectionButtonDialogField;
import com.google.dart.tools.ui.internal.text.IJavaHelpContextIds;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
public class SortMembersMessageDialog extends OptionalMessageDialog {
private final static String OPTIONAL_ID = "SortMembersMessageDialog.optionalDialog.id"; //$NON-NLS-1$
private final static String DIALOG_SETTINGS_SORT_ALL = "SortMembers.sort_all"; //$NON-NLS-1$
private SelectionButtonDialogField fNotSortAllRadio;
private SelectionButtonDialogField fSortAllRadio;
private final IDialogSettings fDialogSettings;
public SortMembersMessageDialog(Shell parentShell) {
super(OPTIONAL_ID, parentShell, DialogsMessages.SortMembersMessageDialog_dialog_title, null,
new String(), INFORMATION, new String[] {
IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
setShellStyle(getShellStyle() | SWT.RESIZE);
fDialogSettings = DartToolsPlugin.getDefault().getDialogSettings();
boolean isSortAll = fDialogSettings.getBoolean(DIALOG_SETTINGS_SORT_ALL);
fNotSortAllRadio = new SelectionButtonDialogField(SWT.RADIO);
fNotSortAllRadio.setLabelText(DialogsMessages.SortMembersMessageDialog_do_not_sort_fields_label);
fNotSortAllRadio.setSelection(!isSortAll);
fSortAllRadio = new SelectionButtonDialogField(SWT.RADIO);
fSortAllRadio.setLabelText(DialogsMessages.SortMembersMessageDialog_sort_all_label);
fSortAllRadio.setSelection(isSortAll);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.Dialog#close()
*/
@Override
public boolean close() {
fDialogSettings.put(DIALOG_SETTINGS_SORT_ALL, fSortAllRadio.isSelected());
return super.close();
}
public boolean isNotSortingFieldsEnabled() {
return fNotSortAllRadio.isSelected();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.window.Window#open()
*/
@Override
public int open() {
if (isDialogEnabled(OPTIONAL_ID)) {
int res = super.open();
if (res != Window.OK) {
setDialogEnabled(OPTIONAL_ID, true); // don't save state on cancel
}
return res;
}
return Window.OK;
}
/*
* @see org.eclipse.jface.dialogs.IconAndMessageDialog#createContents(org.eclipse
* .swt.widgets.Composite)
*/
@Override
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
IJavaHelpContextIds.SORT_MEMBERS_DIALOG);
return contents;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.IconAndMessageDialog#createMessageArea(org.eclipse
* .swt.widgets.Composite)
*/
@Override
protected Control createMessageArea(Composite parent) {
initializeDialogUnits(parent);
Composite messageComposite = new Composite(parent, SWT.NONE);
messageComposite.setFont(parent.getFont());
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
messageComposite.setLayout(layout);
messageComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createLinkControl(messageComposite);
int indent = convertWidthInCharsToPixels(3);
fNotSortAllRadio.doFillIntoGrid(messageComposite, 1);
LayoutUtil.setHorizontalIndent(fNotSortAllRadio.getSelectionButton(null), indent);
fSortAllRadio.doFillIntoGrid(messageComposite, 1);
LayoutUtil.setHorizontalIndent(fSortAllRadio.getSelectionButton(null), indent);
final Composite warningComposite = new Composite(messageComposite, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 2;
layout.marginWidth = 0;
layout.marginHeight = 0;
warningComposite.setLayout(layout);
warningComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
warningComposite.setFont(messageComposite.getFont());
Image image = Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
final Label imageLabel1 = new Label(warningComposite, SWT.LEFT | SWT.WRAP);
imageLabel1.setImage(image);
imageLabel1.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 1, 1));
final Label label = new Label(warningComposite, SWT.WRAP);
label.setText(DialogsMessages.SortMembersMessageDialog_sort_warning_label);
GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1);
gridData.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
label.setLayoutData(gridData);
label.setFont(warningComposite.getFont());
fNotSortAllRadio.setDialogFieldListener(new IDialogFieldListener() {
@Override
public void dialogFieldChanged(DialogField field) {
imageLabel1.setEnabled(!fNotSortAllRadio.isSelected());
label.setEnabled(!fNotSortAllRadio.isSelected());
}
});
imageLabel1.setEnabled(!fNotSortAllRadio.isSelected());
label.setEnabled(!fNotSortAllRadio.isSelected());
return messageComposite;
}
protected void openCodeTempatePage(String id) {
PreferencesUtil.createPreferenceDialogOn(getShell(), MembersOrderPreferencePage.PREF_ID, null,
null).open();
}
private Control createLinkControl(Composite composite) {
Link link = new Link(composite, SWT.WRAP | SWT.RIGHT);
link.setText(DialogsMessages.SortMembersMessageDialog_description);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID);
}
});
link.setToolTipText(DialogsMessages.SortMembersMessageDialog_link_tooltip);
GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
gridData.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);// convertWidthInCharsToPixels(60);
link.setLayoutData(gridData);
link.setFont(composite.getFont());
return link;
}
}
| [
"dgrove@google.com@260f80e4-7a28-3924-810f-c04153c831b5"
] | dgrove@google.com@260f80e4-7a28-3924-810f-c04153c831b5 |
c07577f6e88973b5d4096de9a748d8f504b3bd78 | 41fade2b76f4137b08f9b3e4e43d8109fe0499b7 | /app/src/main/java/dev/tornaco/torscreenrec/ui/tiles/MoreSettingsTile.java | 7e6a7eca985ff3765ea0b99d15338cb610900928 | [] | no_license | 1004/Tor-ScreenRec | f9d66d8c05cae922426051debf83fd68da29c617 | 238f5d50e6e73e91d6329b71731e4c180d381862 | refs/heads/master | 2021-06-23T18:56:28.081649 | 2017-08-12T11:27:39 | 2017-08-12T11:27:39 | 106,362,314 | 1 | 0 | null | 2017-10-10T03:08:35 | 2017-10-10T03:08:35 | null | UTF-8 | Java | false | false | 1,016 | java | package dev.tornaco.torscreenrec.ui.tiles;
import android.content.Context;
import android.view.View;
import dev.nick.tiles.tile.QuickTile;
import dev.nick.tiles.tile.QuickTileView;
import dev.tornaco.torscreenrec.R;
import dev.tornaco.torscreenrec.ui.ContainerHostActivity;
import dev.tornaco.torscreenrec.ui.SettingsFragment;
/**
* Created by Tornaco on 2017/7/28.
* Licensed with Apache.
*/
public class MoreSettingsTile extends QuickTile {
public MoreSettingsTile(final Context context) {
super(context);
this.titleRes = R.string.title_more_settings;
this.iconRes = R.drawable.ic_settings_white_24dp;
this.tileView = new QuickTileView(context, this) {
@Override
public void onClick(View v) {
super.onClick(v);
context.startActivity(ContainerHostActivity.getIntent(
context, SettingsFragment.class
));
}
};
}
}
| [
"guohao4@lenovo.com"
] | guohao4@lenovo.com |
7f90eb0f366a2bccd3dc0240133f6c0f96571f4c | 33d4358ec3245817a4dd1ec20692155e85d1f5d7 | /cas-demo/spring-security-cas-module/src/main/java/io/github/dunwu/module/security/annotation/rest/AnonymousPostMapping.java | d38350de4046ec9c1982a3de32fefb0e0a9febc1 | [
"Apache-2.0"
] | permissive | dunwu/dunwu-security | ebe1bf318090a1bb22ff9a0764fa3a6fa11b0687 | 790900278a4be6762a7e92ea1e419a981d4165ab | refs/heads/main | 2023-08-14T02:56:42.613595 | 2021-09-30T11:04:34 | 2021-09-30T11:04:34 | 408,478,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,468 | java | /*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.github.dunwu.module.security.annotation.rest;
import io.github.dunwu.module.security.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/**
* Annotation for mapping HTTP {@code POST} requests onto specific handler
* methods.
* 支持匿名访问 PostMapping
*
* @author liaojinlong
* @see AnonymousGetMapping
* @see AnonymousPostMapping
* @see AnonymousPutMapping
* @see AnonymousDeleteMapping
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.POST)
public @interface AnonymousPostMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
| [
"forbreak@163.com"
] | forbreak@163.com |
b0dd163d6296fcbacc6b35b7c44e87b30d173fc4 | 34043d7414a831a9b32290313ddb4a6fb45f2bff | /src/main/java/eu/matejkormuth/smartlajt/events/BooleanValueUpdateEvent.java | f011f0c652caf737642595ff534d17de8a2868da | [
"MIT"
] | permissive | dobrakmato/smartlajt | e32b23f5357172caa25a5d73c9041f3de65c15b6 | 5128cf009cb8aa512075108c6a16378c5beeac95 | refs/heads/master | 2021-05-02T09:15:37.627477 | 2018-02-08T21:33:43 | 2018-02-08T21:33:43 | 120,820,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 201 | java | package eu.matejkormuth.smartlajt.events;
import eu.matejkormuth.smartlajt.Event;
import lombok.Data;
@Data
public class BooleanValueUpdateEvent implements Event {
private final boolean value;
}
| [
"dobrakmato@gmail.com"
] | dobrakmato@gmail.com |
d8331c540c6d54cd5cce90fb57e92e9f8c812ebe | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/location/ui/impl/c$15.java | 3f05feb637dede2de8a987950d618f45e8e1ad8a | [] | 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 | 1,657 | java | package com.tencent.mm.plugin.location.ui.impl;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.base.MMLoadMoreListView;
final class c$15
implements Animation.AnimationListener
{
c$15(c paramc, boolean paramBoolean)
{
}
public final void onAnimationEnd(Animation paramAnimation)
{
AppMethodBeat.i(113611);
c.c(this.nQa, true);
if (this.nQc)
{
this.nQa.xF(c.d(this.nQa));
c.d(this.nQa, true);
}
while (true)
{
c.s(this.nQa).clearAnimation();
c.l(this.nQa).clearAnimation();
c.t(this.nQa).clearAnimation();
c.c(this.nQa).clearFocus();
AppMethodBeat.o(113611);
return;
this.nQa.xF(c.e(this.nQa));
c.d(this.nQa, false);
}
}
public final void onAnimationRepeat(Animation paramAnimation)
{
}
public final void onAnimationStart(Animation paramAnimation)
{
AppMethodBeat.i(113610);
ab.d("MicroMsg.MMPoiMapUI", "newpoi start animation %s", new Object[] { Long.valueOf(System.currentTimeMillis()) });
c.c(this.nQa, false);
c.a(this.nQa, true);
AppMethodBeat.o(113610);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.location.ui.impl.c.15
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
19bc25b392aa612456a138fe43da62aabea9a0c3 | 7d197e259ba33e18444200d06a09433c38fcc850 | /src/test/java/com/aqumon/zzx/guava/OptionalTest.java | 6b1f5b292a607fb7927694507858e69667ccbb74 | [] | no_license | Zhang-Zexi/Java8 | f2bef598d5bc3fff7e824dd9f896d4aefee51f38 | 3d07ceddd820fdd5521551550c74ce343b84b3d9 | refs/heads/master | 2023-01-29T15:02:18.621701 | 2020-12-05T16:24:17 | 2020-12-05T16:24:17 | 317,908,102 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,592 | java | package com.aqumon.zzx.guava;
import org.junit.Test;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
/**
* 学习Java8中的Optional使用方法
*/
public class OptionalTest {
@Test
public void test() throws Throwable {
/**
* 三种创建Optional对象方式
*/
// 创建空的Optional对象
Optional.empty();
// 使用非null值创建Optional对象
Optional.of("zzx");
// 使用任意值创建Optional对象
Optional optional = Optional.ofNullable("zzx");
/**
* 判断是否引用缺失的方法(建议不直接使用)
*/
optional.isPresent();
/**
* 当optional引用存在时执行
* 类似的方法:map filter flatMap
*/
optional.ifPresent(System.out::println);
/**
* 当optional引用缺失时执行
*/
optional.orElse("引用缺失");
optional.orElseGet(() -> {
// 自定义引用缺失时的返回值
return "自定义引用缺失";
});
optional.orElseThrow(() -> {
throw new RuntimeException("引用缺失异常");
});
}
public static void stream(List<String> list) {
// list.stream().forEach(System.out::println);
Optional.ofNullable(list)
.map(List::stream)
.orElseGet(Stream::empty)
.forEach(System.out::println);
}
public static void main(String[] args) {
stream(null);
}
}
| [
"zhangzx@allinfinance.com"
] | zhangzx@allinfinance.com |
4a331251614ab37bbf88565a93adf14fd571ae04 | 5db5d54466b54d41a05d21abf458cf7e88d7a201 | /src/chapter01_변수와_계산/TypeCastingExam.java | 8b622074958f4226defe79a815b91c0e15dcdf8d | [] | no_license | JamesAreuming/programmers.co.kr | ba35974bc383dc8037437444b03df405139823e7 | 3eb4f99aff56b9f4bcd14aa99be2bad369f8430e | refs/heads/master | 2020-12-05T07:34:06.454499 | 2020-01-06T07:55:08 | 2020-01-06T07:55:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | package chapter01_변수와_계산;
public class TypeCastingExam {
public static void main(String[] args) {
int x = 50000;
long y = x;
long x2 = 5;
// int y2 = x2;
int y2 = (int) x2;
}
}
| [
"hothihi5@gmail.com"
] | hothihi5@gmail.com |
d4932354d57e4e69462a67a31f5e7d9c673dad65 | 42e407691d11a5fbe815dd231240e47c42e88463 | /src/main/java/net/hydromatic/morel/type/DummyType.java | 9934b83af0669978dd08051ffa016e32cd87a601 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hollad/morel | 23f64515a3565db0da886f9113bc1bc8f59d3326 | 3912347d32b21d611e80bdd878aad24377cdbb9c | refs/heads/master | 2022-04-22T21:32:38.266251 | 2020-04-22T03:46:37 | 2020-04-23T06:13:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,471 | java | /*
* Licensed to Julian Hyde under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Julian Hyde 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 net.hydromatic.morel.type;
import net.hydromatic.morel.ast.Op;
import java.util.function.Function;
/** Type that is a place-holder for a type constructor that has no arguments;
* for example, "NONE" in "datatype 'a option = NONE | SOME of 'a" would have
* dummy type. */
public enum DummyType implements Type {
INSTANCE;
public String description() {
return "dummy";
}
public Op op() {
return Op.NAMED_TYPE;
}
public <R> R accept(TypeVisitor<R> typeVisitor) {
throw new UnsupportedOperationException();
}
public Type copy(TypeSystem typeSystem, Function<Type, Type> transform) {
return transform.apply(this);
}
}
// End DummyType.java
| [
"jhyde@apache.org"
] | jhyde@apache.org |
674fc5bc87f2019042fe9cd086d102d7f34d25ab | 28021566bfbe54b5e903fd0bcfecf88bb8a37146 | /src/com/ms/silverking/cloud/dht/daemon/RingMapStateListener.java | b84aa588101c9588a7d23ff48eea6d2815f5e758 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ft655508/SilverKing | 1dce9e28a9f3dcd30648567e610fe40b7ec4b306 | 0bbd76fd69dbb9896e1cfb85a6c3fc3164d181d3 | refs/heads/master | 2020-05-25T05:06:47.932717 | 2019-05-16T20:46:20 | 2019-05-16T20:46:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 148 | java | package com.ms.silverking.cloud.dht.daemon;
interface RingMapStateListener {
void globalConvergenceComplete(RingMapState ringMapState);
}
| [
"glenn.judd@morganstanley.com"
] | glenn.judd@morganstanley.com |
97c78436d1808b11cf45f2b10ab8b433a94f100c | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/app/feed/util/$$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8.java | c15a1475344ffea9fd0926d962a341a25460e6bb | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 734 | java | package com.zhihu.android.app.feed.util;
import java.util.List;
import java8.util.p2234b.AbstractC32237i;
/* renamed from: com.zhihu.android.app.feed.util.-$$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8 reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8 implements AbstractC32237i {
public static final /* synthetic */ $$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8 INSTANCE = new $$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8();
private /* synthetic */ $$Lambda$n$oGNaq3KtMULq6r9o702qJ6jRYM8() {
}
@Override // java8.util.p2234b.AbstractC32237i
public final Object apply(Object obj) {
return FeedPreProcessHelper.m62648a((List) obj);
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
7e406a7c0c34c7f7f7590935d95bbe4eda3d298c | 11f3ae506d7b89cf1f4fbdf59809f67674f503a0 | /src/main/java/net/slipp/service/rank/ScoreLikeService.java | 974bbcc21fb479b6953c509ab24290e0815fbed4 | [] | no_license | rockyruah/slipp | 623cc74d71289fa90053a6adbbcb73fbdcbd85a2 | 9af96c2d3df6999e1eba200b155ff2b8efea435a | refs/heads/master | 2021-01-18T00:11:53.859012 | 2013-10-27T00:45:23 | 2013-10-27T00:45:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 875 | java | package net.slipp.service.rank;
import net.slipp.domain.qna.ScoreLike;
import net.slipp.domain.qna.ScoreLikeType;
import net.slipp.repository.qna.ScoreLikeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 향후 질문(Quest)와의 동적 처리
*
* @author eclipse4j
*
*/
@Service
public class ScoreLikeService {
@Autowired
private ScoreLikeRepository scoreLikeRepository;
public boolean alreadyLikedAnswer(Long answerId, Long socialUserId) {
ScoreLike scoreLike = scoreLikeRepository.findBySocialUserIdAnds(ScoreLikeType.ANSWER, answerId,socialUserId);
if (scoreLike == null) {
return false;
}
return true;
}
public void saveLikeAnswer(Long answerId, Long socialUserId) {
scoreLikeRepository.save(new ScoreLike(ScoreLikeType.ANSWER, socialUserId, answerId));
}
}
| [
"javajigi@gmail.com"
] | javajigi@gmail.com |
a05ca5cd93cb690b5b2ee9b66b2f603074dbfbb6 | e285253de760ce7794de027bc7d2f9aa943883b3 | /src/main/java/com/xxxx/seckill/rabbitmq/MiaoShaReceiver.java | 7078db2039b896fb03b51ca752b15a185f31c620 | [] | no_license | iStitches/Miao_Sha_System | 873e43470a3ecc4c926f18686a6c98a25370f6ff | 16646dbea47f1625fecf66f2cfaead03ae39c178 | refs/heads/master | 2023-05-09T15:33:01.918419 | 2021-06-01T10:51:21 | 2021-06-01T10:51:21 | 365,223,314 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,128 | java | package com.xxxx.seckill.rabbitmq;
import com.xxxx.seckill.constant.CommonEnum;
import com.xxxx.seckill.exception.GlobalException;
import com.xxxx.seckill.pojo.SeckillOrder;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.redis.OrderKey;
import com.xxxx.seckill.redis.RedisService;
import com.xxxx.seckill.service.IGoodsService;
import com.xxxx.seckill.service.IOrderService;
import com.xxxx.seckill.service.ISeckillOrderService;
import com.xxxx.seckill.util.JSONUtil;
import com.xxxx.seckill.vo.SeckillGoodsVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class MiaoShaReceiver {
@Autowired
IGoodsService goodsService;
@Autowired
IOrderService orderService;
@Autowired
ISeckillOrderService seckillOrderService;
@Autowired
RedisService redisService;
@RabbitListener(queues = {MQConfig.MIAOSHA_QUEUE})
public void receive(String msg){
//从队列中拿消息
MiaoShaMessage miaoShaMessage = JSONUtil.stringToBean(msg, MiaoShaMessage.class);
if(miaoShaMessage == null)
throw new RuntimeException("消息队列消费者接收消息异常");
User user = miaoShaMessage.getUser();
Long goodsId = miaoShaMessage.getGoodsId();
//真实库存判断
SeckillGoodsVo goodsVo = goodsService.querySeckillGood(goodsId);
if(goodsVo.getStockCount() <= 0)
throw new GlobalException(CommonEnum.GOODS_STACK_ZERO);
//再次判断用户是否重复秒杀
SeckillOrder order = redisService.get(OrderKey.getByUidGoodid,user.getId()+"_"+goodsId, SeckillOrder.class);
if(order != null)
throw new GlobalException(CommonEnum.GOODS_ALREADY_ROB);
//秒杀减库存生成订单
try {
orderService.doSeckill(user.getId(),goodsVo);
} catch (Exception e) {
log.error("消息接收处理时发现异常:{}"+e.getMessage());
}
}
}
| [
"1093453695@qq.com"
] | 1093453695@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.