lang
stringclasses 10
values | seed
stringlengths 5
2.12k
|
---|---|
java | package org.nutz.castor.castor;
import org.nutz.castor.Castor;
import org.nutz.lang.Mirror;
@SuppressWarnings({"rawtypes"})
public class Mirror2Class extends Castor<Mirror, Class> {
@Override
public Class cast(Mirror src, Class toType, String... args) {
return src.getType();
}
} |
java | if (raid1.isActive() && d1 < d0) {
raid = raid1;
d0 = d1;
}
}
return raid;
}
} |
java | public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
} |
java |
class NullDeref10 {
int foo(Object o) {
System.out.println(o == null);
return o.hashCode();
}
} |
java | getTemporaryDir().delete();
}
}
@Input
public Property<String> getUrl() {
return url;
}
@Input
public Property<Boolean> getDeleteAfterDownload() { |
java |
import static javax.ws.rs.core.Response.Status.CREATED;
import static javax.ws.rs.core.Response.Status.FORBIDDEN;
import static javax.ws.rs.core.Response.Status.UNAUTHORIZED;
import static javax.ws.rs.core.Response.Status.OK; |
java |
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked") |
java | import com.gentics.mesh.core.endpoint.admin.debuginfo.DebugInfoBufferEntry;
import com.gentics.mesh.core.endpoint.admin.debuginfo.DebugInfoEntry;
import com.gentics.mesh.core.endpoint.admin.debuginfo.DebugInfoProvider;
import io.reactivex.Flowable;
|
java | // em.persist(storeLocation);
//
// // Product product2 = new Product("Tomato", 6.5, BigDecimal.TEN);
// // product2.getSales().add(sale);
//
// // em.persist(product2);
//
// |
java | import jetbrains.jetpad.projectional.cell.ProjectionalSynchronizers;
import jetbrains.jetpad.projectional.util.CellNavigationController;
import jetbrains.jetpad.values.Color;
class TextTokenCell extends TextCell {
private BaseHybridSynchronizer<?, ?> mySync;
private boolean myFirst; |
java |
/**
* 写回一个 skuId 目前在 redis 中的库存
*
* @param skuId sku id
*/
@Override
public void onMessage(Long skuId) {
// 把写回信号量置为 0
String key = "wb_" + skuId;
redisUtils.set(key, Boolean.FALSE, writeBackExpire); |
java | *
*/
package com.github.weisj.darklaf.task;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.text.DefaultEditorKit;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.util.SystemInfo;
public class InputDefaultsInitTask implements DefaultsInitTask { |
java | public IndexedUnsafeBuffer(ByteOrder byteOrder) {
this.byteOrder = byteOrder;
delegate = new UnsafeBuffer(EMPTY_ARRAY);
}
public void wrap(ByteBuffer buffer) {
wrap(buffer, 0, buffer.capacity());
}
public void wrap(ByteBuffer buffer, int offset, int length) { |
java | {
/**
* 查询员工记录
*
* @param id 员工记录ID
* @return 员工记录
*/
public EmployeeRecord selectEmployeeRecordById(Long id);
/**
* 查询员工记录列表
*
* @param employeeRecord 员工记录
* @return 员工记录集合
*/ |
java | public DeliveryOrderUseCase(OrderRepository repository) {
super(repository);
}
@Override
protected Order updateStatus(Order order) {
order.delivery();
return repository.persist(order.delivery());
}
} |
java | import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class TransferMonitoringAspect {
@Pointcut("execution(* com.packt.springhighperformance.ch03.bankingapp.service.TransferService.transfer(..))")
public void transfer() { }
} |
java | import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.clickfreebackup.clickfree.R;
import com.clickfreebackup.clickfree.util.SenderUtil;
public class HelpScreenFragment extends Fragment {
private FirstRunScreensListener mFirstRunScreensListener;
HelpScreenFragment(FirstRunScreensListener mFirstRunScreensListener) {
this.mFirstRunScreensListener = mFirstRunScreensListener;
}
|
java | * 同步回调:就是A的a1方法调用B的b1的方法开始,A开始进入阻塞状态,一直等待B的回调结果
* 异步回调:就是A在a1方法中新开启一个线程去调用B的b1的方法,A不用阻塞等待B的结果,A起完新线程之后A就是开始继续
* 做A的事情了,对于B的b1方法在子线程中调用。当B处理完b1的逻辑之后回调A的方法传递回结果
* 所以:同步回调和异步回调主要区别就是在主线程还是在子线程中去调用B,在主线程就是同步回调,子线程就是异步回调
*
*
*
*/
public class CallBackMain {
public static void main(String[] args) {
Server server = new Server(); |
java | {
executorService = Executors.newCachedThreadPool();
return getExecutorService();
}
return executorService;
}
public static void setExecutorService(ExecutorService service)
{
if (executorService != null)
{
executorService.shutdown();
}
executorService = service; |
java | public void setTipoMoneda(Integer tipoMoneda) {
this.tipoMoneda = tipoMoneda;
}
public Integer getIdTipoActivo() {
return idTipoActivo;
}
|
java |
import org.jpc.term.Term;
/**
* Internal class.
* Represents a (term) binding currently bound to one or more variable cells.
* @author sergioc
*
*/ |
java | import com.fasterxml.jackson.annotation.JsonTypeName;
import de.fraunhofer.iais.eis.*;
import de.fraunhofer.iais.eis.util.*;
@JsonTypeName("ConnectorNotificationMessage")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type")
@JsonSubTypes({
@JsonSubTypes.Type(value = ConnectorUpdateMessage.class),
@JsonSubTypes.Type(value = ConnectorUnavailableMessage.class),
@JsonSubTypes.Type(value = ConnectorCertificateGrantedMessage.class),
@JsonSubTypes.Type(value = ConnectorCertificateRevokedMessage.class)
}) |
java | public void setUp() {
}
@After
public void tearDown() { |
java | /**
* Updates workspace based on player's guess.
* @param workspace Game data as a multidimensional character array.
* @param guess Single alphabetical character chosen by player.
* @return Updated version of workspace character array.
*/
protected static char[][] update(char[][] workspace, char guess) |
java | public void testParseWithoutWeight() {
String expectedFeature = "ad_url|891572";
FeatureValue fv = FeatureValue.parse(expectedFeature);
assertNotNull(fv);
assertEquals(expectedFeature, fv.getFeature().toString());
assertEquals(1.f, fv.getValueAsFloat(), 0.f);
expectedFeature = "891572";
fv = FeatureValue.parse(expectedFeature);
assertNotNull(fv);
assertEquals(expectedFeature, fv.getFeature().toString());
assertEquals(1.f, fv.getValueAsFloat(), 0.f);
}
|
java | }
@Override
public void onLowMemory() {
super.onLowMemory();
mapView.onLowMemory();
}
@Override
protected void onDestroy() {
super.onDestroy();
mapView.onDestroy();
}
@Override |
java | c.addNamespace(new NamespaceImpl(
-1,
"Especial",
"Special",
false, |
java |
private static GenericShader shader;
private static int vao;
private static int vbo;
public static void main(String[] args) {
if ( !glfwInit() )
throw new IllegalStateException("Unable to initialize GLFW");
// Create a standard opengl 3.2 window. You can do this yourself.
long handle = LWJGUIUtil.createOpenGLCoreWindow("Hello World", WIDTH, HEIGHT, true, false);
// Initialize lwjgui for this window |
java | { "sar", "rial saudita" },
{ "sbd", "d\u00f3lar das Illas Salom\u00f3n" },
{ "scr", "rupia de Seychelles" },
{ "sdg", "libra sudanesa" },
{ "sek", "coroa sueca" },
{ "sgd", "d\u00f3lar de Singapur" },
{ "shp", "libra de Santa Helena" },
{ "sll", "leone de Serra Leoa" },
{ "sos", "xilin somal\u00ed" },
{ "srd", "d\u00f3lar surinam\u00e9s" },
{ "ssp", "libra sursudanesa" }, |
java | /**平台类型 android, ios, wap, web*/
private String platform;
/**IP地址 */
private String ip;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName; |
java | */
Role createRole(RoleIdentifier id, RoleModification modification);
/**
* Updates a role. This method can be used to update the role's metadata and/or permissions.
* @throws RoleNotFoundException No role with the ID exists
*/
void updateRole(RoleIdentifier id, RoleModification modification);
/** |
java |
import java.util.List;
/**
* 刷新光环效果监听
* @author <NAME>
* @date 2020/3/16 17:50 |
java | import java.util.ArrayList;
import org.junit.jupiter.api.Test;
import seedu.address.model.group.Group;
import seedu.address.model.person.ActivityList;
import seedu.address.model.person.Name; |
java | */
public class WheelOf4Chan extends Loopable{
Servo actuator = new Servo(0);
double actuatorPos = 0;
VictorSPX spinThing = new VictorSPX(5);
@Override
public void Loop() { |
java | * Default function which returns a two/three line description of what this
* class is about.
*/
@Override
public String getDescription() {
String description = "This class checks whether or not there is a mismatch "
+ "between basic and segmented names, basic and segmented file names, "
+ "plus their NSLinks for each communication in the coma file.";
return description;
}
@Override |
java | * @date 2019年6月12日
*/
@FunctionalInterface
public interface DateFormat {
/**
* 获取格式化
*/
String getFormat();
|
java | import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.sound.BlockSoundGroup;
public class PortalBlockRaw extends Block { |
java | 'S', new ItemStack(polished_stone));
}
}
|
java | out.flush();
} else {
out.clearBuffer();
}
} catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context); |
java | import lombok.Data;
@Data
public class AgencyTokenUidDto {
private String uid;
private int capacity;
public AgencyTokenUidDto(String uid, int capacity) {
this.uid = uid;
this.capacity = capacity;
}
}
|
java | import java.io.Serializable;
public enum MigrationBandwidthLimitType implements Serializable {
/**
* <ul>
* <li>If QoS of migration network is defined then
* {@link org.ovirt.engine.core.common.businessentities.network.HostNetworkQos#outAverageUpperlimit}</li>
* <li>Else if {@link org.ovirt.engine.core.common.businessentities.network.NetworkInterface#speed} exists for
* both sending and receiving network interfaces then the network saturation constant times min of these link
* speeds.
* <li>Otherwise use vdsm configuration as in {@link #VDSM_CONFIG}</li> |
java | import org.jetbrains.annotations.NotNull;
/**
* @author <NAME> <<EMAIL>>
*/
class ScalaStringPostfixTemplateCreator {
@NotNull
static StringBasedPostfixTemplate createTemplate(CptMapping mapping, String matchingClass, String conditionClass, String templateName, String description, String template) {
return new CustomScalaStringPostfixTemplate(matchingClass, conditionClass, templateName, description, template, mapping); |
java | import co.joyrun.videoplayer.video_player_manager.manager.VideoPlayerManagerCallback;
import co.joyrun.videoplayer.video_player_manager.widget.VideoInterfaceV2;
/**
* This PlayerMessage calls {@link MediaPlayer#release()} on the instance that is used inside {@link VideoInterfaceV2}
*/
public class Release extends PlayerMessage { |
java | mv.addObject("isAdminClickedCategories", "true");
mv.addObject("isAdmin", "true");
if (categoryDAO.getCategoryById(id) == null) {
mv.addObject("cMessage", "Category does not exists with id : " + id);
return mv;
} else {
categoryDAO.update(category);
mv.addObject("cMessage", "Category updated success with id : " + id);
} |
java | import de.epages.ws.crossselling.model.TDeleteCrossSelling_Return;
import de.epages.ws.crossselling.model.TExistsCrossSelling_Input;
import de.epages.ws.crossselling.model.TExistsCrossSelling_Return;
import de.epages.ws.crossselling.model.TGetCrossSelling_Input;
import de.epages.ws.crossselling.model.TGetCrossSelling_Return; |
java | * {@code paramName=paramValue.toString()}.
*
* @param params particularly built request parameters
* @param paramName name of new parameter, that must be added
* @param paramValue value of new parameter, that must be added
* @return request parameters with new added parameter |
java | package game.service;
/**
* Class that provides weighted random methods
*
* @param <T> type of random value
*/
public interface WeightedRandomizer<T> {
/**
* Method that returns weighted random value
*
* @return weighted random value |
java | <gh_stars>1000+
if (true) {
System.out.println("everything is well");
}
onlyToEndOfBlock();
|
java | protected ShiroModuleSupport createSecurityModule() {
return new ShiroModuleSupport();
}
@Override
public void customize(final T application,
final C config,
final Environment environment)
{
addFilter(application, environment, GuiceShiroFilter.class, false, "/*"); |
java | public byte getByte( String key ) {
return Byte.parseByte( getString( key ) );
}
public byte getByte( String key, byte defaultValue ) {
return Byte.parseByte( getString( key, Byte.toString( defaultValue ) ) );
}
public boolean getBoolean( String key ) {
return Boolean.parseBoolean( getString( key ) );
}
public boolean getBoolean( String key, boolean defaultValue ) { |
java |
import java.util.List;
/**
* 活动信息接口
* @author yangc
* @version 1.0 |
java |
public void setProjectId(int projectId) {
this.projectId = projectId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getExecutionId() != null ? getExecutionId().hashCode() : 0);
return hash; |
java | import java.io.IOException;
/**
* @author herald
*/
public class StreamBufferFactory {
private StreamBufferFactory() {
}
public static StreamBuffer createStreamBuffer(int size) throws IOException {
return new SynchronizedBuffer(new SimpleCyclicStreamByteBuffer(size));
}
|
java |
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
@Entity
public class Sizes {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
|
java | .build()).collect(Collectors.toList()),
thainUserPageInfo.getTotal(),
thainUserPageInfo.getPageNum(),
thainUserPageInfo.getPageSize());
}
return ApiResult.fail("Not allow to access");
} |
java |
public CdkFile getPreviewFile ()
throws CdkFileException
{
try
{
String previewPath =
CdkHelper.getSharedInstance().masterToPreviewPath(this.getCdkPath()); |
java |
for (final KeyValue kv : trackedData) {
sb.append(((KeyValueToJSON)kv).toJSON() + ",");
}
|
java | }
@Test
public void testInequality() {
LiquidityPoolID pool1 = new LiquidityPoolID(LiquidityPoolType.LIQUIDITY_POOL_CONSTANT_PRODUCT, a, b, LiquidityPoolParameters.Fee);
LiquidityPoolID pool2 = new LiquidityPoolID(LiquidityPoolType.LIQUIDITY_POOL_CONSTANT_PRODUCT, b, c, LiquidityPoolParameters.Fee); |
java | case STATE_COMPLETE:
mText.setText(getContext().getText(R.string.listview_loading));
this.setVisibility(View.GONE);
break;
case STATE_NOMORE:
mText.setText(getContext().getText(R.string.nomore_loading));
progressCon.setVisibility(View.GONE);
this.setVisibility(View.VISIBLE);
break;
}
|
java |
import static org.assertj.core.api.Assertions.assertThat;
class IdentityRefJsonTest {
private IdentityReferenceJson identityRefJson;
@Test
@DisplayName("Should produce a valid IdentityReferenceJson")
void getIdentityReference() {
identityRefJson = new IdentityReferenceJson("1234");
JSONObject idRefJson = new JSONObject();
idRefJson.put("idRef", "1234");
|
java | import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @Project seata-web
* @Package com.ramble.seataweb.model |
java | "Destination",
"Keywords",
"Local Caption"
};
if (iptcDir != null) {
String iptcRet = EmptyString;
int p=0;
for (int i=0; i< iptc_tag_list.length; i++) {
String tag = iptcDir.getString(iptc_tag_list[i]); |
java | package view;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.util.Duration;
public class SceneManager {
private Stage stage;
private Timeline animation;
|
java |
in.succinct.beckn.Order becknOrder = new in.succinct.beckn.Order();
becknOrder.setId(order_id);
becknOrder.setCreatedAt(order.getCreatedAt());
becknOrder.setUpdatedAt(order.getUpdatedAt());
becknOrder.setState(order.getFulfillmentStatus());
onCancel.getMessage().setOrder(becknOrder);
return (onCancel);
}
}
|
java | import ro.uaic.info.ip.proiect.b3.database.objects.comentariuprofesor.exceptions.ComentariuProfesorException;
import ro.uaic.info.ip.proiect.b3.database.objects.contconectat.exceptions.ContConectatException;
import java.lang.reflect.Constructor;
import java.sql.SQLException;
import java.util.ArrayList;
import static com.googlecode.catchexception.CatchException.catchException;
import static com.googlecode.catchexception.CatchException.caughtException;
import static org.hamcrest.core.IsInstanceOf.instanceOf; |
java | @Test
public void test() throws Exception {
ResetBasicData.reset();
URL resource = TestCsvReaderWithCallback.class.getResource("/test1.csv");
try (Reader reader = IOUtils.newReader(resource.openStream())){
|
java | for (Application application : applications) {
if(application.getPublisher().size() > 0 || application.getSubscriber().size()>0) {
setFolders(application);
writeSetup(application);
writeMain(application); |
java | private final Vector3 gradient;
@CustomConstructor
public Line(Vector3 point, Vector3 gradient) {
this.point = point;
this.gradient = gradient;
}
public static Line ofPoints(Vector3 point1, Vector3 point2) {
return new Line(point1, point1.subtract(point2));
}
public Vector3 getPoint() { |
java | @Bean
public Queue appQueueGenericAgain() {
return new Queue("employees");
}
@Bean
public Binding declareBindingGenericAgain() {
return BindingBuilder.bind(appQueueGenericAgain()).to(appExchange()).with("key321");
}
|
java | /**
* Converts a string into seperate letters and writes each letter in a
* vertical line (from top to bottom)
*
* @param text String
* @param xc int
* @param yc int
*/
private void draw_string_vert(String text, float xc, float yc) {
//
float font_height = graphics.getFontMetrics(getFont()).getHeight() + 1f;
int j = 0;
int k = text.length(); |
java | import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* @author haoxp
* @date 20/9/16
*/ |
java | this.rightSpeed = rightSpeed;
this.controller = controller;
this.drivetrain = drivetrain;
}
@Override
public void initialize() {}
@Override
public void execute() {
double leftMeasured = Units.feetToMeters(drivetrain.getLeftEncoder().getRate()), |
java | }
private void readDelimiter() {
StringBuilder b = new StringBuilder();
b.append(source.charAt(cursor)); |
java | * Created by Administrator on 2017/2/11.
*/
public interface FeedbackContract {
interface Presenter extends BasePresenter {
/**
* 提交反馈
*/
void postAdvice(String feedType, String content, List<LocalMedia> selectList);
|
java |
public class CombineFragmentsRecipe extends SpecialRecipe {
public CombineFragmentsRecipe(ResourceLocation idIn) {
super(idIn);
}
|
java | */
package de.rub.nds.tlsattacker.core.constants;
import de.rub.nds.modifiablevariable.util.ArrayConverter;
import de.rub.nds.tlsattacker.core.exceptions.UnknownCiphersuiteException;
import java.util.LinkedList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
public class CipherSuiteTest {
|
java | org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_RelationshipName")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 5);
add(jLabel1, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 4; |
java | * @param entity The entity being rendered.
* @return The texture.
*/
public ResourceLocation getElytraTexture(ItemStack stack, T entity) {
return WINGS_LOCATION; |
java | public class SpringRestBatchApplicationTests {
@Test
public void contextLoads() {
} |
java | .until(ExpectedConditions.elementToBeClickable(appMenuContent.findElement(DdapBy.se(appSelector))));
WebPageScroller.scrollTo(driver, appSelectorEl);
appSelectorEl.click();
new WebDriverWait(driver, 10)
.until(ExpectedConditions.invisibilityOfElementLocated(By.className("cdk-overlay-backdrop")));
}
public DiscoveryPage goToDiscovery() {
goToApp("product-app-menu-discovery"); |
java | import java.util.Comparator;
import java.util.PriorityQueue;
public class _0774MinimizeMaxDistanceToGasStation {
public static void main(String[] args) {
System.out.println(minmaxGasDist(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, 9));
System.out.println(minmaxGasDist(new int[] { 23, 24, 36, 39, 46, 56, 57, 65, 84, 98 }, 1));
}
public static double minmaxGasDist(int[] stations, int k) {
PriorityQueue<int[]> pq = new PriorityQueue<int[]>(new Comparator<int[]>() {
@Override
public int compare(int[] a, int[] b) { |
java |
import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.parrot.drone.groundsdk.device.peripheral.media.MediaItem;
import com.parrot.drone.groundsdk.device.peripheral.stream.MediaReplay;
import com.parrot.drone.groundsdk.internal.device.peripheral.media.MediaResourceCore;
import com.parrot.drone.sdkcore.stream.SdkCoreStream;
import java.util.Objects; |
java | @RequestMapping("/main")
public ModelAndView main(Map<String, Object> map) {
ModelAndView mav = new ModelAndView();
mav.setViewName("main");
return mav;
}
@RequestMapping("/main2")
public ModelAndView main2(Map<String, Object> map) {
ModelAndView mav = new ModelAndView(); |
java | @SuppressWarnings("unchecked")
Option<Double> NODE_DEPTH = new Option<Double>("NODE_DEPTH", Double.class,
bundle, new Range<Double>(Double.class, "{[1,1E9]}"), 1d,
new ValuePairUncomparable<Option<OutputFormat>, Range<OutputFormat>>(FORMAT, SBML_CONDITION));
/**
* The position on the z-axis where the entire two-dimensional graph should
* be drawn.
*/
@SuppressWarnings("unchecked") |
java | package com.hz.learnspring.redis.util;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource; |
java | this.setSeatGroupName(String.valueOf(value));
continue;
}
if (fieldName.equals("seatGroupDesc")) {
if(value == null) {this.setSeatGroupDesc(null); continue;}
if(value.equals(this.getSeatGroupDesc())) continue;
this.setSeatGroupDesc(String.valueOf(value));
continue;
}
if (fieldName.equals("totalSeats")) {
if(value == null) {this.setTotalSeats(null); continue;}
if(value.equals(this.getTotalSeats())) continue; |
java | this.zzjbu = str;
this.zzjbx = z;
if (this.zzjbw == Long.MAX_VALUE) {
com_google_android_gms_internal_zzche.zzawm().zzayr().log("Tasks index overflow");
}
}
|
java | import org.springframework.data.jpa.repository.JpaRepository;
import com.digitalsanctuary.spring.user.persistence.model.Role;
/**
* The Interface RoleRepository.
*/ |
java | import org.springframework.stereotype.Component;
import pl.szotaa.repperybackend.supermemo.repository.FlashcardRepository;
@Component
@RequiredArgsConstructor |
java | TicketSeverity validateValue = validateValue(String.valueOf(value));
if( validateValue != null ) {
return validateValue;
}
else {
for( TicketSeverity severity : values() ) {
if( severity.name().equalsIgnoreCase(String.valueOf(value)) ) {
return severity;
}
}
}
}
throw new CloudException("Invalid value for TicketSeverity " + value); |
java | private static String alias(String subslice, Entry<String, Service> serviceEntry) {
return "[" + serviceEntry.getKey() + "]";
}
private static String lookup(String dep, Map<String, DockerComposeConfig> dockerComposeConfigs) {
return dockerComposeConfigs.entrySet().stream()
.flatMap(e -> e.getValue().getServices().entrySet().stream().map(se -> Pair.of(e.getKey(), se)))
.filter(p -> p.getValue().getKey().equals(dep))
.map(p -> metricName(p.getKey(), p.getValue()))
.findFirst().get();
}
}
|
java | *
*/
package org.unixlibre.tacplus.tacplusclient;
/**
*
* @author antoniovl
*/
public class AuthorizationData { |
java | /*
* Copyright 2019-2020 Baidu, 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 |
java | @Mapping(source = "dto.memberIds", target = "memberIds")
@Mapping(source = "dto.description", target = "description")
@Mapping(source = "dto.groupMemberships", target = "groupMemberships", qualifiedByName = "toModelGroupMembership")
Group toModel(GroupDto dto);
@BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
@Mapping(target = "memberIds", ignore = true)
// @Mapping(target = "members", ignore = true)
@Mapping(target = "groupMemberships", ignore = true)
void updateGroupFromDto(GroupDto dto, @MappingTarget Group entity);
} |
java | * @param c
*/
public Point3D(Point2D p, Coordinate c) {
super(p);
_z = new Coordinate(c);
}
/**
|
java | if (isOfMod(id))
return new TranslatableText("text.advancednbttooltip.toggle." + id.getPath().split("/")[1]);
return isNameShortened(id) ? new LiteralText(id.toString().substring(0, MAX_NAME_LENGTH) + "...")
: new LiteralText(id.toString());
}
private Text createTooltip(Identifier id) {
if (isOfMod(id))
return new TranslatableText(
"text.advancednbttooltip.toggle." + id.getPath().split("/")[1] + ".tooltip");
return isNameShortened(id) ? new LiteralText(id.toString()) : null;
}
|
java | char ch;
int count;
public CharCount(char ch, int count) {
this.ch = ch;
this.count = count;
}
}
public String reorganizeString(String S) {
int[] counts = new int[26];
int n = S.length(); |
java | .stream()
.filter(IS_GLOBAL_PERMISSION)
.collect(Collectors.toList());
} catch (IOException ex) {
Logger.logError(ex);
}
return permissions;
}
/**
*
* @param fileInfo
* @return the requests to remove all "anyone with the link can view" permissions from the given file and its subfiles
*/ |
java |
/**
* Check if the entry has expired
*
* @return true if the entry has expired
*/
public boolean hasExpired() {
return (expiry > 0) && (System.currentTimeMillis() >= expiry);
}
}
|
java | package life.coachy.backend.user.domain;
import java.util.List;
import life.coachy.backend.user.domain.exception.UserNotFoundException;
import life.coachy.backend.user.query.UserQueryDto;
import life.coachy.backend.user.query.UserQueryRepository;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
class UserCrudService {
private final UserRepository userRepository;
private final UserQueryRepository userQueryRepository; |
Subsets and Splits