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
52ee4bca46ec59f6d72bb476337890c5c248ab9b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project16/src/main/java/org/gradle/test/performance16_1/Production16_77.java
59040f729000135bba393af30c71652fe841d234
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
300
java
package org.gradle.test.performance16_1; public class Production16_77 extends org.gradle.test.performance9_1.Production9_77 { private final String property; public Production16_77() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f9a2b25f2085a65a333db23c3ab749a041ef0aa2
27f6a988ec638a1db9a59cf271f24bf8f77b9056
/Code-Hunt-data/users/User031/Sector1-Level4/attempt011-20140920-121720.java
5ddb2f52cdbde450f6c4c75cf9407269706f4156
[]
no_license
liiabutler/Refazer
38eaf72ed876b4cfc5f39153956775f2123eed7f
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
refs/heads/master
2021-07-22T06:44:46.453717
2017-10-31T01:43:42
2017-10-31T01:43:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
public class Program { public static Boolean Puzzle(int x, int y) { if(x < 1 || x == y){ return true; }else{ return false; } } }
[ "liiabiia@yahoo.com" ]
liiabiia@yahoo.com
b2f462733a750bbca5763ef147398f480ce5b81d
480a55a74b82c98423a9d578a9f0fcac6bb0a349
/src/org/dx4/home/persistence/PersistenceRuntimeException.java
ee0fa8fd4a4a2ae9c4052fd6b94937d117681534
[]
no_license
mariuso28/Px4
db84c79a6545599ef27d57cdb46e76d1e1aed4ea
2ff70084e76a672fb1af0c90a0eabdb17ce629b1
refs/heads/master
2021-05-16T06:15:19.713170
2017-09-27T07:31:32
2017-09-27T07:31:32
103,366,442
0
0
null
null
null
null
UTF-8
Java
false
false
376
java
package org.dx4.home.persistence; public class PersistenceRuntimeException extends RuntimeException { private static final long serialVersionUID = 3996983417038185066L; public PersistenceRuntimeException(String message, String problem ) { super(message + " - " + problem); } public PersistenceRuntimeException(String message) { super(message); } }
[ "mariuso.pk@gmail.com" ]
mariuso.pk@gmail.com
3a3e883357dbdc3993a233048e27830e83b216c1
be4d249449b310472bdff0ee700585389578d20e
/src/main/java/org/rmatil/sync/core/StringLengthComparator.java
383fcd155fedc3c7203c276b104b849555f2c523
[ "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
537
java
package org.rmatil.sync.core; import java.util.Comparator; /** * Compares two strings by their length. */ public class StringLengthComparator implements Comparator<String> { /** * Compares the strings by their length. * <br> * <br> * {@inheritDoc} */ @Override public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return - 1; } if (o1.length() > o2.length()) { return 1; } return o1.compareTo(o2); } }
[ "raphael.matile@gmail.com" ]
raphael.matile@gmail.com
03fd5529033c9aefbda265f23b08c33e3a947257
ab7c374e12ef55482d1c622a0099a7b262195322
/jami-enricher/src/main/java/psidev/psi/mi/jami/enricher/MIEnricher.java
629fd3b12c85aa68378f474d5166022b32548271
[ "Apache-2.0" ]
permissive
colin-combe/psi-jami
9f945d885d76454f7b652382cc676ac98e6faa39
64fb0596b99aa8996d865b5eae0a2094be0889c8
refs/heads/master
2020-12-07T02:17:10.909871
2017-06-07T07:05:14
2017-06-07T07:05:14
64,655,225
0
0
null
2017-03-09T14:26:30
2016-08-01T09:43:06
Java
UTF-8
Java
false
false
1,126
java
package psidev.psi.mi.jami.enricher; import psidev.psi.mi.jami.enricher.exception.EnricherException; import java.util.Collection; /** * General interface for enriching MI objects * * @author Marine Dumousseau (marine@ebi.ac.uk) * @version $Id$ * @since <pre>30/09/13</pre> */ public interface MIEnricher<T extends Object> { /** * Enrich an object * @param object * @throws EnricherException if it cannot enrich the object because cannot connect to a webservice, etc. */ public void enrich(T object) throws EnricherException; /** * Enriche a collection of objects * @param objects * @throws EnricherException if it cannot enrich the object because cannot connect to a webservice, etc. */ public void enrich(Collection<T> objects) throws EnricherException; /** * Enrich an object given a source object * @param objectToEnrich object to enrich * @throws EnricherException if it cannot enrich the object because cannot connect to a webservice, etc. */ public void enrich(T objectToEnrich, T objectSource) throws EnricherException; }
[ "mdumousseau@yahoo.com@73e66818-4ebf-11de-a6a3-df26d2c71dbe" ]
mdumousseau@yahoo.com@73e66818-4ebf-11de-a6a3-df26d2c71dbe
a2abb25b39b89be2ca4a12b408d834b07e9112b3
de173668d571ec3bb03c4394c51383cf819d1394
/ch08/Puzzle_72/ex72-1.java
929f1d9ea29f7df0cde1d825e8a1a1a5a2816174
[]
no_license
freebz/JAVA-PUZZLERS
edee4a23589f99398771af57659b5d3a67e361fd
eced8ded5534011d823a43838642c464ea2c7bb5
refs/heads/master
2020-07-11T01:10:11.308600
2019-08-26T06:57:44
2019-08-26T06:57:44
204,415,902
0
0
null
null
null
null
UTF-8
Java
false
false
264
java
class Jeopardy { public static final String PRIZE = "$64,000"; } public class DoubleJeopardy extends Jeopardy { public static final String PRIZE = "2 cents"; public static void main(String[] args) { System.out.println(DoubleJeopardy.PRIZE); } }
[ "freebz@hananet.net" ]
freebz@hananet.net
9a3d4cda8b92d1483c72370467d7b0b1d2839c57
2135ba111249c6e87097e42c4a9d2db0b96be297
/prosolo-analytics/src/main/java/org/prosolo/bigdata/events/analyzers/activityTimeSpent/LinkTimeSpentOnActivityProcessor.java
a02baeb417bb9218c04a96f2c773a7f44130370a
[ "BSD-3-Clause" ]
permissive
prosolotechnologies/prosolo
55742dda961359cfcd01231f3ae41de41eb73666
fb2058577002f9dce362375afb2ca72bb51deef7
refs/heads/master
2022-12-26T20:23:41.213375
2020-07-15T19:44:10
2020-07-15T19:44:10
239,235,647
3
0
BSD-3-Clause
2022-12-16T04:23:15
2020-02-09T02:35:26
Java
UTF-8
Java
false
false
452
java
package org.prosolo.bigdata.events.analyzers.activityTimeSpent; import org.prosolo.bigdata.events.pojo.LogEvent; public class LinkTimeSpentOnActivityProcessor extends TimeSpentOnActivityProcessor { public LinkTimeSpentOnActivityProcessor(LogEvent event) { super(event); } @Override protected boolean checkAdditionalConditions() { return true; } @Override protected boolean checkIfStoppedLearning(LogEvent nextEv) { return true; } }
[ "you@example.com" ]
you@example.com
87292c452f0ec0a33934608087a184f962f877b0
d613574d9b823d52a5c99302124a49104b2bf112
/src/main/java/io/choerodon/base/infra/annotation/NamingRuleTrans.java
a26dc801928bdc970172fea7a82ad15efc59be45
[ "Apache-2.0" ]
permissive
zhoushiqiang222/base-service
20cdc60c3350678561eb9cd392c850ddee95b2ba
af621601f53efdefef44bce83ab0b1bef0813778
refs/heads/master
2022-12-19T15:10:42.624703
2020-09-25T03:05:34
2020-09-25T03:05:34
298,939,185
0
0
Apache-2.0
2020-09-27T02:43:39
2020-09-27T02:43:38
null
UTF-8
Java
false
false
395
java
package io.choerodon.base.infra.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface NamingRuleTrans { public NamingRuleTransStrategy value() default NamingRuleTransStrategy.CAMEL; }
[ "Longhe1996@foxmail.com" ]
Longhe1996@foxmail.com
c348189b078824bf4ec98cfdde8969db73317624
1059e0db6a8ee12617d5f13ad2a1f66397287576
/_releases/desktop/src/com/flizzet/flyzombieenemy/FlyingZombieEnemySpawner.java
52b723afb66c9b5466d5c9431cb745f7c7eeb245
[]
no_license
pvydro/libgdx-ammo-inferno
ddeaa7127b1eac5989bddd33ba173d346cc21e7c
861cda547fd708fe212cf6e046ac2ce3e584ceb7
refs/heads/master
2021-09-29T03:42:53.451022
2018-11-23T15:29:47
2018-11-23T15:29:47
157,973,375
0
1
null
null
null
null
UTF-8
Java
false
false
2,651
java
package com.flizzet.flyzombieenemy; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.Random; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.flizzet.camera.MainCamera; import com.flizzet.entities.Entity; import com.flizzet.map.Platform; import com.flizzet.player.Player; /** * Spawns enemy bats. * * @author Pedro Dutra (2017) * @version 1.0 */ public class FlyingZombieEnemySpawner extends Entity { private static final FlyingZombieEnemySpawner INSTANCE = new FlyingZombieEnemySpawner(); private ArrayList<FlyingZombieEnemy> zombies = new ArrayList<FlyingZombieEnemy>(); private Queue<FlyingZombieEnemy> toBeRemoved = new LinkedList<FlyingZombieEnemy>(); private int topCooldown = 500; private int cooldown = 200; private boolean enabled = false; /** Returns and instance of the FlyingBatEnemySpawner class */ public static FlyingZombieEnemySpawner getInstance() { return INSTANCE; } /** Single use constructor */ private FlyingZombieEnemySpawner() {} @Override public void update(float delta) { zombies.removeAll(toBeRemoved); if (enabled) { cooldown--; if (cooldown <= 0) { cooldown = topCooldown; spawnBat(); } } for (FlyingZombieEnemy e : zombies) { e.update(delta); } } @Override public void render(SpriteBatch batch) { for (FlyingZombieEnemy e : zombies) { e.render(batch); } } /** Builds a new enemy eye and adds it to the screen */ private void spawnBat() { FlyingZombieEnemy newZombie = new FlyingZombieEnemy(); Platform targetPlatform = Player.getInstance().getController().getTargetPlatform(); int side = targetPlatform.getSide(); switch (side) { case 0: newZombie.setX(MainCamera.getInstance().getWidth() + 20 + newZombie.getWidth()); break; case 1: newZombie.setX(-20); break; case 2: newZombie.setX(new Random().nextBoolean() ? -20 : MainCamera.getInstance().getWidth() + 20 + newZombie.getWidth()); } newZombie.setY(targetPlatform.getCenterY()); zombies.add(newZombie); } /** Removes an eye from the ArrayList of eyes */ public void removeFromZombies(FlyingZombieEnemy zombie) { this.toBeRemoved.add(zombie); } /** Respawn */ public void reset() { this.toBeRemoved.addAll(zombies); } public ArrayList<FlyingZombieEnemy> getZombies() { return this.zombies; } public void setCooldown(int newCooldown) { this.topCooldown = newCooldown; } public void setEnabled(boolean isEnabled) { this.enabled = isEnabled; } }
[ "pedro@flizzet.com" ]
pedro@flizzet.com
505c91241c23e7cefa6deec45bc3de9299b4eaaf
b5502ea9580e882a1c530f6e5914ce090e2d00a6
/experiment/CASSANDRA/cassandra/tools/stress/src/org/apache/cassandra/stress/operations/SampledOpDistributionFactory.java
7fd34ed3126608b26c7e370dea3de26ec9a04238
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
Lingzhi-Ouyang/Almost-Strong-Consistency-Cassandra
a3fb54a8c35805a6810532719d7a8da99998f997
2b9aa8e78e134fc8811ea6caff3daca1f4a92936
refs/heads/master
2021-07-09T01:13:04.424482
2020-11-03T03:12:13
2020-11-03T03:12:13
205,116,322
2
2
null
null
null
null
UTF-8
Java
false
false
4,495
java
package org.apache.cassandra.stress.operations; /* * * 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. * */ import java.util.*; import org.apache.cassandra.stress.generate.*; import org.apache.cassandra.stress.util.Timing; import org.apache.commons.math3.distribution.EnumeratedDistribution; import org.apache.commons.math3.util.Pair; import org.apache.cassandra.stress.Operation; import org.apache.cassandra.stress.generate.DistributionFactory; import org.apache.cassandra.stress.generate.PartitionGenerator; import org.apache.cassandra.stress.util.Timer; public abstract class SampledOpDistributionFactory<T> implements OpDistributionFactory { final Map<T, Double> ratios; final DistributionFactory clustering; protected SampledOpDistributionFactory(Map<T, Double> ratios, DistributionFactory clustering) { this.ratios = ratios; this.clustering = clustering; } protected abstract List<? extends Operation> get(Timer timer, PartitionGenerator generator, T key, boolean isWarmup); protected abstract PartitionGenerator newGenerator(); public OpDistribution get(Timing timing, int sampleCount, boolean isWarmup) { PartitionGenerator generator = newGenerator(); List<Pair<Operation, Double>> operations = new ArrayList<>(); for (Map.Entry<T, Double> ratio : ratios.entrySet()) { List<? extends Operation> ops = get(timing.newTimer(ratio.getKey().toString(), sampleCount), generator, ratio.getKey(), isWarmup); for (Operation op : ops) operations.add(new Pair<>(op, ratio.getValue() / ops.size())); } return new SampledOpDistribution(new EnumeratedDistribution<>(operations), clustering.get()); } public String desc() { List<T> keys = new ArrayList<>(); for (Map.Entry<T, Double> ratio : ratios.entrySet()) keys.add(ratio.getKey()); return keys.toString(); } public Iterable<OpDistributionFactory> each() { List<OpDistributionFactory> out = new ArrayList<>(); for (final Map.Entry<T, Double> ratio : ratios.entrySet()) { out.add(new OpDistributionFactory() { public OpDistribution get(Timing timing, int sampleCount, boolean isWarmup) { List<? extends Operation> ops = SampledOpDistributionFactory.this.get(timing.newTimer(ratio.getKey().toString(), sampleCount), newGenerator(), ratio.getKey(), isWarmup); if (ops.size() == 1) return new FixedOpDistribution(ops.get(0)); List<Pair<Operation, Double>> ratios = new ArrayList<>(); for (Operation op : ops) ratios.add(new Pair<>(op, 1d / ops.size())); return new SampledOpDistribution(new EnumeratedDistribution<>(ratios), new DistributionFixed(1)); } public String desc() { return ratio.getKey().toString(); } public Iterable<OpDistributionFactory> each() { return Collections.<OpDistributionFactory>singleton(this); } }); } return out; } }
[ "lingzhi.ouyang@outlook.com" ]
lingzhi.ouyang@outlook.com
cead7110f51bcbce002ac3010c0e65696800324b
9200618bc0fded6b9cdd06fbbe6ad917eed377eb
/app/src/main/java/com/example/rh/newsapp/adapter/BingPictureAdapter.java
a2553e7aeb4d99daf5aac56941b648f71fa8167c
[]
no_license
JasonRH/NewsApp
474c68fcbd8a601650b41b70a275639816ae0884
bdfc42fc214398afd756f36dfb88cc8c97118a65
refs/heads/master
2021-06-27T17:49:56.418422
2019-02-19T06:24:13
2019-02-19T06:24:13
129,724,789
7
0
null
null
null
null
UTF-8
Java
false
false
2,432
java
package com.example.rh.newsapp.adapter; import android.content.Context; import android.content.Intent; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.example.rh.newsapp.R; import com.example.rh.newsapp.activity.PictureActivity; import com.example.rh.newsapp.model.BingDailyBean; import java.util.List; /** * @author RH * @date 2017/11/3 */ public class BingPictureAdapter extends RecyclerView.Adapter<BingPictureAdapter.ViewHolder> { private Context mContext; private List<BingDailyBean> mPictureList; static class ViewHolder extends RecyclerView.ViewHolder { ImageView pictureImage; TextView pictureName; CardView cardView; private ViewHolder(View itemView) { super(itemView); pictureImage = itemView.findViewById(R.id.picture); pictureName = itemView.findViewById(R.id.picture_name); cardView = itemView.findViewById(R.id.cardView); } } public BingPictureAdapter(List<BingDailyBean> mPictureList) { this.mPictureList = mPictureList; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (mContext == null) { mContext = parent.getContext(); } View view = LayoutInflater.from(mContext).inflate(R.layout.adapter_bing_picture_item, parent, false); final ViewHolder holder = new ViewHolder(view); holder.cardView.setOnClickListener(v -> { int position = holder.getAdapterPosition(); BingDailyBean bingDailyBean = mPictureList.get(position); Intent intent = new Intent(mContext, PictureActivity.class); intent.putExtra("BingDaily_data", bingDailyBean); mContext.startActivity(intent); }); return holder; } @Override public void onBindViewHolder(ViewHolder holder, int position) { BingDailyBean picture = mPictureList.get(position); holder.pictureName.setText(picture.getDate()); Glide.with(mContext).load(picture.getUrl()).into(holder.pictureImage); } @Override public int getItemCount() { return mPictureList.size(); } }
[ "swd-004@mail.foxconn.com" ]
swd-004@mail.foxconn.com
bb306a1301197033719dddac081ca2a571dcb26c
5aa1d34ac9497d14662601b5363ee31c4a059a4b
/src/JAVA/annotation/FruitInfoUtil.java
474cab2889f809b33ce4f66d135abb0afbe914b8
[]
no_license
liyuan231/leetcode
dc71eeb2b6d68c7cd99a6d67e9f4522a957abd35
3e35297c5eea356e8543aee930fed832c6576cd2
refs/heads/master
2023-04-18T20:12:02.162298
2021-05-01T01:59:03
2021-05-01T01:59:03
286,483,592
0
0
null
null
null
null
UTF-8
Java
false
false
725
java
package JAVA.annotation; import java.lang.reflect.Field; public class FruitInfoUtil { public static void getFruitInfo(Class<?> clazz) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if (field.isAnnotationPresent(FruitProvider.class)) { FruitProvider fruitProvider = field.getAnnotation(FruitProvider.class); System.out.println("id:" + fruitProvider.id()); System.out.println("name:" + fruitProvider.name()); System.out.println("address:" + fruitProvider.address()); } } } public static void main(String[] args) { FruitInfoUtil.getFruitInfo(Apple.class); } }
[ "1987151116@qq.com" ]
1987151116@qq.com
644c8000fcf7c3c4b76f11078aa9de186beac0eb
ee15e4de0c382336ed737d5f5e83c33442bffea6
/deployers-impl/src/test/java/org/jboss/test/deployers/managed/test/AbstractManagedObjectUnitTest.java
fc443e08f2b8171c59646b86f0ec2a587643d73c
[]
no_license
wolfc/jboss-deployers
cff992f1c3621cef6662e731d597fa875ced664e
d96e4db10952a2188654a292e13daac88e5f235c
refs/heads/master
2020-06-07T07:40:58.844217
2011-05-16T19:22:50
2011-05-16T19:22:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,874
java
/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.deployers.managed.test; import org.jboss.metatype.api.values.MetaValue; import org.jboss.metatype.api.values.MetaValueFactory; import org.jboss.test.deployers.AbstractDeployerTest; /** * AbstractManagedObjectUnitTest. * * @author <a href="ales.justin@jboss.com">Ales Justin</a> */ public abstract class AbstractManagedObjectUnitTest extends AbstractDeployerTest { protected AbstractManagedObjectUnitTest(String name) { super(name); } protected MetaValueFactory getMetaValueFactory() { return MetaValueFactory.getInstance(); } protected void assertEquals(Object object, MetaValue metaValue) { assertEquals(null, object, metaValue); } protected void assertEquals(String msg, Object object, MetaValue metaValue) { assertEquals(msg, object, getMetaValueFactory().unwrap(metaValue)); } }
[ "ajustin@redhat.com" ]
ajustin@redhat.com
3157233667ce7a7f1d0805c95990e32acc69d11d
2ac8e459e3b49e9998a08d002f8810a81dd97909
/src/com/java1234/dao/MemberDao.java
e34a486a81f38c5cc1ee745dd7f877e71b2e3057
[]
no_license
tianshan20081/MallSSH
004626abb7425bb6e28146dd7976fc2774af49ae
563040b08844b9a11d0713e65e74bcfcc830161a
refs/heads/master
2020-05-07T13:45:24.389811
2014-06-30T06:58:33
2014-06-30T06:58:33
21,342,285
1
0
null
null
null
null
UTF-8
Java
false
false
629
java
package com.java1234.dao; import java.util.List; import com.java1234.model.Member; import com.java1234.model.PageBean; public interface MemberDao { public Member memberRegister(String name); public Member memberLogin(Member member); public void saveMember(Member member); public Member selectMember(String name); public Member selectFind(String name,String result); public Member findMemberById(int id); public void changeMember(Member m); public List<Member> selectMember(); public int selectAllMember(); public List<Member> memberPage(PageBean pageBean); public void deleteMember(int id); }
[ "zhangshch2008@gmail.com" ]
zhangshch2008@gmail.com
92e9d629a6d03484b8bbb7dbe03e31d1da7a67f8
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/apps/PrizeDialerV8/InCallUI/src/com/mediatek/incallui/Toast.java
38126e3279fb26ccca5b040b418acafdfefd800c
[]
no_license
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,364
java
package com.mediatek.incallui; import android.content.Context; /** * A Toast helper for InCallUI, to avoid toast timing issue. */ public class Toast { private static Toast sInstance = new Toast(); private android.widget.Toast mToast; private Toast() { } /** * Get the Toast instance. * @return Toast instance. */ public static Toast getInstance() { return sInstance; } /** * Called in #InCallServiceImpl to set the context. * @param context Context to set. */ public void init(Context context) { if (mToast == null) { mToast = android.widget.Toast.makeText(context, "", android.widget.Toast.LENGTH_SHORT); } } /** * Called when #InCallService quit. */ public void deinit() { mToast = null; } /** * Like android.widget.Toast.show(), to show the Toast message. * @param resId message resId. */ public void show(int resId) { if (mToast != null) { mToast.setText(resId); mToast.show(); } } /** * Like android.widget.Toast.show(), to show the Toast message. * @param msg message text. */ public void show(CharSequence msg) { if (mToast != null) { mToast.setText(msg); mToast.show(); } } }
[ "18218724438@163.com" ]
18218724438@163.com
43924ef123ea785e168261b0f6358e71b4661b1c
fe711416301bdc8fcd798a5c20d7a02f37f61362
/zwsm/src/com/hzfc/utils/Ztree.java
57c6b4ae87d2e22af2fc2feba62ddedae014abac
[]
no_license
chaiguolong/javaweb_step1
e9175521485813c40e763a95629c1ef929405010
e9e8d3e70fd5d9495b6675c60e35d8ca12eefdc2
refs/heads/master
2022-07-07T18:10:59.431906
2020-04-28T05:41:51
2020-04-28T05:41:51
143,223,415
1
0
null
2022-06-21T00:55:31
2018-08-02T00:53:40
Java
UTF-8
Java
false
false
2,818
java
package com.hzfc.utils; public class Ztree { private String id; private String pid; private String name; private boolean open; private boolean isParent; private String rid; private int openValue; private int isParentValue; private String iconSkin; private String clickme; //点击行为 private String newme; //新增行为 private String updateme; //修改行为 private String deleteme; //删除行为 public String getClickme() { return clickme; } public void setClickme(String clickme) { this.clickme = clickme; } public String getNewme() { return newme; } public void setNewme(String newme) { this.newme = newme; } public String getUpdateme() { return updateme; } public void setUpdateme(String updateme) { this.updateme = updateme; } public String getDeleteme() { return deleteme; } public void setDeleteme(String deleteme) { this.deleteme = deleteme; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public boolean isOpen() { return open; } public void setOpen(boolean open) { this.open = open; } public boolean isParent() { return isParent; } public void setParent(boolean isParent) { this.isParent = isParent; } public int getOpenValue() { return openValue; } public void setOpenValue(int openValue) { this.openValue = openValue; if(openValue == 1){ this.open = true; } else { this.open = false; } } public int getIsParentValue() { return isParentValue; } public void setIsParentValue(int isParentValue) { this.isParentValue = isParentValue; if(isParentValue == 1){ this.isParent = true; } else { this.isParent = false; } if(isParentValue == 1){ this.iconSkin = "pIcon01"; } else { this.iconSkin = ""; } } public String getIconSkin() { return iconSkin; } public void setIconSkin(String iconSkin) { this.iconSkin = iconSkin; } public String getRid() { return rid; } public void setRid(String rid) { this.rid = rid; } }
[ "584238433@qq.com" ]
584238433@qq.com
3875869a87bc629b550fb122fd581bcbf13acc4e
e561d6ea521a4d7eee9c96eca671ae6212406309
/Java/src/codility/TapeEquilibrium.java
ad7714b719e04c6201e07f4b1ee79037d737f179
[]
no_license
Seungpang/Algorithms
02a9a9dc3225caf8651c03208334082024deb65f
f7e6c5f28ce3b6509cb91d7aca162f36ae837b82
refs/heads/master
2023-08-19T03:30:24.346606
2023-08-17T15:50:18
2023-08-17T15:50:18
176,178,409
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package codility; public class TapeEquilibrium { public static void main(String[] args) { final TapeEquilibrium tapeEquilibrium = new TapeEquilibrium(); int[] A = {3, 1, 2, 4, 3}; System.out.println(tapeEquilibrium.solution(A)); //1 } public int solution(int[] A) { int totalSum = 0; for (int num : A) { totalSum += num; } int result = Integer.MAX_VALUE; int sum = 0; for (int i = 0; i < A.length - 1; i++) { sum += A[i]; result = Math.min(result, Math.abs(sum - (totalSum - sum))); } return result; } }
[ "obey1342@gmail.com" ]
obey1342@gmail.com
bf26153c64e20d103ddf9ebf71162dd3d8555e62
565515a0482eb542b526c89d5f97cc3b5825356d
/src/main/java/com/example/bddspring1585330669/DemoApplication.java
9dedaca33376dbe02551c063c4955f12f9f5ed9f
[]
no_license
cb-kubecd/bdd-spring-1585330669
8b3a9b313fddfde44e774cf8cb5fb07ebc2823a5
3d7f3ecfb845fe38c4dd9a67f0099e453ccc423b
refs/heads/master
2021-05-17T03:37:46.522192
2020-03-27T17:38:22
2020-03-27T17:38:22
250,602,208
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package com.example.bddspring1585330669; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
[ "jenkins-x-test@googlegroups.com" ]
jenkins-x-test@googlegroups.com
2f2bcf54b303809a2e7325f0d3b67df52803d839
ea084bf22a0a54e7dae3b45f963b95a7da9f7d7d
/mtomcat/src/main/java/com/fjd/utils/XmlParser.java
28a4a6d695b25005442d26b168281eb7ee9f9848
[]
no_license
fanjingdan012/mtomcat
08777212dcb6bae53e6791013f790b6d90016890
460acc28cce7bb8253d6023db0148adead01da30
refs/heads/master
2021-07-06T07:19:06.719756
2019-07-02T07:30:17
2019-07-02T07:30:17
194,469,134
0
0
null
2020-10-13T14:16:08
2019-06-30T03:04:13
Java
UTF-8
Java
false
false
174
java
package com.fjd.utils; import com.fjd.ProjectLoader; public class XmlParser { public ProjectLoader.ProjectConfiginfo loadXml(String s) { return null; } }
[ "judy.fan@sap.com" ]
judy.fan@sap.com
80c9dfa8cf1ce5ca89217ad7dd1ebc1bc10d50e8
7648cbb3c77a33387f2d00a571b9e01bcf01b7a2
/live-admin/src/com/tinypig/newadmin/web/service/UserTransactionHisService.java
f574a39aa884a7c3509aaf5c42348343d26ebd4e
[]
no_license
dawei134679/live
2ea806cff38b0c763f6e7345eb208068dffeff68
ded58b6aeb47af8049ac0cd516a5fad262f3775f
refs/heads/master
2020-04-20T04:28:27.064707
2019-02-01T02:24:50
2019-02-01T02:31:19
168,628,885
1
0
null
null
null
null
UTF-8
Java
false
false
284
java
package com.tinypig.newadmin.web.service; import com.tinypig.newadmin.web.entity.UserTransactionHis; public interface UserTransactionHisService { public int saveUserTransactionHis(UserTransactionHis userTransactionHis); public int delUserTransactionHisByRefId(String refId); }
[ "532231254@qq.com" ]
532231254@qq.com
5c19dea5943f8133bed647282eec40ac5c165746
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/p005cm/aptoide/p006pt/billing/view/login/C2515ha.java
fb6b5704a713bbd16375077526a79f6fe16799ed
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
553
java
package p005cm.aptoide.p006pt.billing.view.login; import p026rx.p027b.C0132p; /* renamed from: cm.aptoide.pt.billing.view.login.ha */ /* compiled from: lambda */ public final /* synthetic */ class C2515ha implements C0132p { /* renamed from: a */ private final /* synthetic */ PaymentLoginPresenter f5676a; public /* synthetic */ C2515ha(PaymentLoginPresenter paymentLoginPresenter) { this.f5676a = paymentLoginPresenter; } public final Object call(Object obj) { return this.f5676a.mo11419f((Void) obj); } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
4892425938e0700bfafe3803c850e23f76a605c3
995f73d30450a6dce6bc7145d89344b4ad6e0622
/MATE-20_EMUI_11.0.0/src/main/java/ohos/utils/fastjson/annotation/JSONType.java
1bec81941ce29b32630b08dbadf8181aa6a92d17
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
package ohos.utils.fastjson.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import ohos.utils.fastjson.PropertyNamingStrategy; import ohos.utils.fastjson.parser.Feature; import ohos.utils.fastjson.serializer.SerializerFeature; @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface JSONType { boolean alphabetic() default true; boolean asm() default true; String[] ignores() default {}; Class<?> mappingTo() default Void.class; PropertyNamingStrategy naming() default PropertyNamingStrategy.CamelCase; String[] orders() default {}; Feature[] parseFeatures() default {}; Class<?>[] seeAlso() default {}; SerializerFeature[] serialzeFeatures() default {}; String typeKey() default ""; String typeName() default ""; }
[ "dstmath@163.com" ]
dstmath@163.com
84549fce457e6fb1761d99deef5d498fe73f98e4
40df4983d86a3f691fc3f5ec6a8a54e813f7fe72
/app/src/main/java/com/p070qq/p071e/comm/net/NetworkClientImpl.java
93821fa2980c6e22041f0866adc2a8610947c97a
[]
no_license
hlwhsunshine/RootGeniusTrunAK
5c63599a939b24a94c6f083a0ee69694fac5a0da
1f94603a9165e8b02e4bc9651c3528b66c19be68
refs/heads/master
2020-04-11T12:25:21.389753
2018-12-24T10:09:15
2018-12-24T10:09:15
161,779,612
0
0
null
null
null
null
UTF-8
Java
false
false
7,860
java
package com.p070qq.p071e.comm.net; import com.p070qq.p071e.comm.net.NetworkClient.Priority; import com.p070qq.p071e.comm.net.p072rr.Request; import com.p070qq.p071e.comm.net.p072rr.Response; import com.p070qq.p071e.comm.util.GDTLogger; import java.util.Map.Entry; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.params.ConnManagerParams; import org.apache.http.conn.params.ConnPerRouteBean; import org.apache.http.conn.scheme.PlainSocketFactory; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; /* renamed from: com.qq.e.comm.net.NetworkClientImpl */ public class NetworkClientImpl implements NetworkClient { /* renamed from: a */ private static final HttpClient f2832a; /* renamed from: b */ private static final NetworkClient f2833b = new NetworkClientImpl(); /* renamed from: c */ private final ExecutorService f2834c = new ThreadPoolExecutor(5, 10, 180, TimeUnit.SECONDS, this.f2835d); /* renamed from: d */ private PriorityBlockingQueue<Runnable> f2835d = new PriorityBlockingQueue(15); /* renamed from: com.qq.e.comm.net.NetworkClientImpl$NetFutureTask */ class NetFutureTask<T> extends FutureTask<T> implements Comparable<NetFutureTask<T>> { /* renamed from: a */ private final Priority f2829a; public NetFutureTask(NetworkClientImpl networkClientImpl, Callable<T> callable, Priority priority) { super(callable); this.f2829a = priority; } public int compareTo(NetFutureTask<T> netFutureTask) { return netFutureTask == null ? 1 : this.f2829a.value() - netFutureTask.f2829a.value(); } } /* renamed from: com.qq.e.comm.net.NetworkClientImpl$TaskCallable */ static class TaskCallable implements Callable<Response> { /* renamed from: a */ private Request f2830a; /* renamed from: b */ private NetworkCallBack f2831b; public TaskCallable(Request request) { this(request, null); } public TaskCallable(Request request, NetworkCallBack networkCallBack) { this.f2830a = request; this.f2831b = networkCallBack; } /* renamed from: a */ private void m3114a(HttpRequestBase httpRequestBase) { for (Entry entry : this.f2830a.getHeaders().entrySet()) { httpRequestBase.setHeader((String) entry.getKey(), (String) entry.getValue()); } httpRequestBase.setHeader("User-Agent", "GDTADNetClient-[" + System.getProperty("http.agent") + "]"); httpRequestBase.addHeader("Accept-Encoding", "gzip"); HttpParams params = httpRequestBase.getParams(); if (params == null) { params = new BasicHttpParams(); } if (this.f2830a.getConnectionTimeOut() > 0) { HttpConnectionParams.setConnectionTimeout(params, this.f2830a.getConnectionTimeOut()); } if (this.f2830a.getSocketTimeOut() > 0) { HttpConnectionParams.setSoTimeout(params, this.f2830a.getSocketTimeOut()); } httpRequestBase.setParams(params); } public Response call() { Throwable e; Response response = null; try { HttpUriRequest httpPost; HttpClient a = NetworkClientImpl.f2832a; switch (this.f2830a.getMethod()) { case POST: httpPost = new HttpPost(this.f2830a.getUrlWithParas()); m3114a(httpPost); byte[] postData = this.f2830a.getPostData(); if (postData != null && postData.length > 0) { httpPost.setEntity(new ByteArrayEntity(postData)); break; } case GET: httpPost = new HttpGet(this.f2830a.getUrlWithParas()); m3114a(httpPost); break; default: httpPost = null; break; } response = this.f2830a.initResponse(httpPost, a.execute(httpPost)); e = null; } catch (Exception e2) { e = e2; } if (e == null) { if (this.f2831b != null) { this.f2831b.onResponse(this.f2830a, response); } if (this.f2830a.isAutoClose()) { response.close(); } } else if (this.f2831b != null) { GDTLogger.m3135w("NetworkClientException", e); this.f2831b.onException(e); if (response != null) { response.close(); } } else { throw e; } return response; } } static { HttpParams basicHttpParams = new BasicHttpParams(); ConnManagerParams.setTimeout(basicHttpParams, 30000); HttpConnectionParams.setConnectionTimeout(basicHttpParams, 30000); HttpConnectionParams.setSoTimeout(basicHttpParams, 30000); ConnManagerParams.setMaxConnectionsPerRoute(basicHttpParams, new ConnPerRouteBean(3)); ConnManagerParams.setMaxTotalConnections(basicHttpParams, 10); HttpProtocolParams.setVersion(basicHttpParams, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(basicHttpParams, "UTF-8"); HttpProtocolParams.setUserAgent(basicHttpParams, "GDTADNetClient-[" + System.getProperty("http.agent") + "]"); SchemeRegistry schemeRegistry = new SchemeRegistry(); schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); f2832a = new DefaultHttpClient(new ThreadSafeClientConnManager(basicHttpParams, schemeRegistry), basicHttpParams); } private NetworkClientImpl() { } public static NetworkClient getInstance() { return f2833b; } public Future<Response> submit(Request request) { return submit(request, Priority.Mid); } public Future<Response> submit(Request request, Priority priority) { Object netFutureTask = new NetFutureTask(this, new TaskCallable(request), priority); this.f2834c.execute(netFutureTask); GDTLogger.m3130d("QueueSize:" + this.f2835d.size()); return netFutureTask; } public void submit(Request request, NetworkCallBack networkCallBack) { submit(request, Priority.Mid, networkCallBack); } public void submit(Request request, Priority priority, NetworkCallBack networkCallBack) { this.f2834c.execute(new NetFutureTask(this, new TaskCallable(request, networkCallBack), priority)); GDTLogger.m3130d("QueueSize:" + this.f2835d.size()); } }
[ "603820467@qq.com" ]
603820467@qq.com
da60ea200c71c9be135bc8354595f94589197ba4
750f1c9beaa046495b2cc9f329c32b628d33c997
/orangelala/orangelala-framework-model/src/main/java/com/orangelala/framework/model/cms/CmsSiteServer.java
07d050da1c2ab57fc99fa46703423934966785c9
[]
no_license
chrilwe/orangelala-shop
7d58f4c5ac3cb0ece1138079a0ec1478d024dc0d
129ea7343452364de6226e09e2cebf5477e9ca78
refs/heads/master
2022-12-01T17:40:15.449360
2019-10-21T14:44:42
2019-10-21T14:44:42
199,277,088
1
0
null
2022-11-24T06:26:44
2019-07-28T11:10:47
Java
UTF-8
Java
false
false
956
java
package com.orangelala.framework.model.cms; import lombok.Data; import lombok.ToString; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; @Data @ToString @Document(collection = "cms_site_server") public class CmsSiteServer { /** * 站点id、服务器IP、端口、访问地址、服务器类型(代理、静态、动态、CDN)、资源发布地址(完整的HTTP接口)、使用类型(测试、生产) */ //站点id private String siteId; //服务器ID @Id private String serverId; //服务器IP private String ip; //端口 private String port; //访问地址 private String webPath; //服务器名称(代理、静态、动态、CDN) private String serverName; //资源发布地址(完整的HTTP接口) private String uploadPath; //使用类型(测试、生产) private String useType; }
[ "1129864619@qq.com" ]
1129864619@qq.com
18ddba9016c0ed84b76e69a4a8faa115d52a9d9d
26c90fa0cf157ffe2ea580012fa1371a7b9f5787
/docs/image/java/ic_crop_16_9.java
25a1783114f60807aa76fa9f47a1078065fcdfcb
[ "Apache-2.0" ]
permissive
ThePreviousOne/SVG-Android
a666e8b2298729d13a72530dee2f1f598dbd86f9
7be929196d23c547034400c7eb8ed937ba9dba4f
refs/heads/master
2020-03-28T08:38:51.300003
2018-09-09T01:07:44
2018-09-09T05:08:15
147,979,009
0
0
Apache-2.0
2018-09-09T00:03:26
2018-09-09T00:03:26
null
UTF-8
Java
false
false
2,142
java
package com.github.megatronking.svg.iconlibs; import android.content.Context; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Paint; import com.github.megatronking.svg.support.SVGRenderer; /** * AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * SVG-Generator. It should not be modified by hand. */ public class ic_crop_16_9 extends SVGRenderer { public ic_crop_16_9(Context context) { super(context); mAlpha = 1.0f; mWidth = dip2px(24.0f); mHeight = dip2px(24.0f); } @Override public void render(Canvas canvas, int w, int h, ColorFilter filter) { final float scaleX = w / 24.0f; final float scaleY = h / 24.0f; mPath.reset(); mRenderPath.reset(); mFinalPathMatrix.setValues(new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); mFinalPathMatrix.postScale(scaleX, scaleY); mPath.moveTo(19.0f, 6.0f); mPath.lineTo(5.0f, 6.0f); mPath.rCubicTo(-1.1f, 0.0f, -2.0f, 0.9f, -2.0f, 2.0f); mPath.rLineTo(0f, 8.0f); mPath.rCubicTo(0.0f, 1.1f, 0.9f, 2.0f, 2.0f, 2.0f); mPath.rLineTo(14.0f, 0f); mPath.rCubicTo(1.1f, 0.0f, 2.0f, -0.9f, 2.0f, -2.0f); mPath.lineTo(21.0f, 8.0f); mPath.rCubicTo(0.0f, -1.1f, -0.9f, -2.0f, -2.0f, -2.0f); mPath.close(); mPath.moveTo(19.0f, 6.0f); mPath.rMoveTo(0.0f, 10.0f); mPath.lineTo(5.0f, 16.0f); mPath.lineTo(5.0f, 8.0f); mPath.rLineTo(14.0f, 0f); mPath.rLineTo(0f, 8.0f); mPath.close(); mPath.moveTo(19.0f, 16.0f); mRenderPath.addPath(mPath, mFinalPathMatrix); if (mFillPaint == null) { mFillPaint = new Paint(); mFillPaint.setStyle(Paint.Style.FILL); mFillPaint.setAntiAlias(true); } mFillPaint.setColor(applyAlpha(-16777216, 1.0f)); mFillPaint.setColorFilter(filter); canvas.drawPath(mRenderPath, mFillPaint); } }
[ "jgy08954@ly.com" ]
jgy08954@ly.com
685e427ebbb8b0c569ee8ee993e50b8767ce5433
5d6c374a2518d469d674a1327d21d8e0cf2b54f7
/modules/unsupported/couchdb/src/main/java/org/geotools/data/couchdb/client/CouchDBResponse.java
d49356d18fb04b6ca62403b910f7f8ae2c2b9262
[]
no_license
HGitMaster/geotools-osgi
648ebd9343db99a1e2688d9aefad857f6521898d
09f6e327fb797c7e0451e3629794a3db2c55c32b
refs/heads/osgi
2021-01-19T08:33:56.014532
2014-03-19T18:04:03
2014-03-19T18:04:03
4,750,321
3
0
null
2014-03-19T13:50:54
2012-06-22T11:21:01
Java
UTF-8
Java
false
false
4,354
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2011, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.data.couchdb.client; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.URIException; import org.geotools.util.logging.Logging; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; /** * * @author Ian Schneider (OpenGeo) */ public final class CouchDBResponse { private final HttpMethod request; private final int result; private final IOException exception; private final Object json; private final boolean isArray; private static final Logger logger = Logging.getLogger(CouchDBResponse.class); public CouchDBResponse(HttpMethod request, int result, IOException exception) throws IOException { this.request = request; this.result = result; this.exception = exception; boolean err = !isHttpOK(); InputStream response = request.getResponseBodyAsStream(); if (err) { if (exception != null) { throw new IOException("HTTP error",exception); } if (response == null) { throw new IOException("HTTP error : " + result); } } json = JSONValue.parse(new InputStreamReader(request.getResponseBodyAsStream())); if (err) { isArray = false; } else { isArray = json instanceof JSONArray; } } public void checkOK(String msg) throws CouchDBException { if (!isHttpOK()) { String fullMsg = msg + "," + getErrorAndReason(); try { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE,"Request URI : " + request.getURI()); } } catch (URIException ex) { logger.warning("An invalid URI was used " + request.getPath() + "," + request.getQueryString()); } throw new CouchDBException(fullMsg,exception); } } private String getErrorAndReason() { if (!isHttpOK()) { JSONObject err = (JSONObject) json; String res = null; if (err.containsKey("error")) { res = err.get("error").toString(); } if (err.containsKey("reason")) { res = res == null ? "" : res + ","; res = res + err.get("reason").toString(); } if (res == null) { res = err.toJSONString(); } return res; } else { throw new IllegalStateException("not an error"); } } public boolean isHttpOK() { return result >= 200 && result < 300; } public boolean isCouchOK() { boolean ok = false; JSONObject obj = (JSONObject) json; return obj.get("ok").equals("true"); } public Throwable getException() { return exception; } public JSONArray getBodyAsJSONArray() throws IOException { if (!isArray) { throw new IllegalStateException("Response is not an array"); } return (JSONArray) json; } public JSONObject getBodyAsJSONObject() throws IOException { if (isArray) { throw new IllegalStateException("Response is not an object"); } return (JSONObject) json; } }
[ "devnull@localhost" ]
devnull@localhost
e3c67f444151a72f7a6609da181dba9704603792
660b1e79949d62ae37abf630ee0dd890678c4999
/src/com/class26/Bank.java
163f0a0cffe375d7cbf1b987909e6eae4562100e
[]
no_license
LolaMelibaeva/JavaClass
3c67c804eb5aaa20a5ee2740da844edf24f94f5d
838c12d489e10308316228f6978f58471e12284f
refs/heads/master
2020-05-03T00:08:23.661321
2019-05-13T15:53:43
2019-05-13T15:53:43
178,301,877
0
0
null
null
null
null
UTF-8
Java
false
false
623
java
package com.class26; public class Bank { int getBalance () { return 0; } } class BankA extends Bank { int getBalance () { return 1000; } } class BankB extends Bank { int getBalance () { return 1500; } } class BankC extends Bank { int getBalance () { return 2000; } } class TestBank { public static void main(String[] args) { Bank b=new BankA(); System.out.println("BankA deposit is "+b.getBalance()); Bank b1=new BankB(); System.out.println("BankB deposit is "+b1.getBalance()); Bank b2=new BankC(); System.out.println("BankC deposit is "+b2.getBalance()); } }
[ "lolam79@gmail.com" ]
lolam79@gmail.com
c17d705af36d33818c92fdcc34a07ba8d8d69a59
c69b09fe89c06e1d83ae8c1d87a46678288d0eda
/_test/src/main/java/webapp/demo6_aop/Rockservice1.java
4b3c6cbbbe1d62fd7ef1b50f9d12d2f79662b166
[ "Apache-2.0" ]
permissive
dongatsh/solon
fb9d3da2ce67746dd8cfe1fef288e2de1bc3d1a2
4c3a074e8e4db7f367f75603ea8347d2c501c69d
refs/heads/master
2023-08-28T18:16:44.023899
2021-10-31T16:21:03
2021-10-31T16:21:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
267
java
package webapp.demo6_aop; import org.noear.solon.annotation.Bean; import org.noear.solon.annotation.Component; @Component("rs1") public class Rockservice1 implements Rockapi { @Override public String test() { return "我是:Rockservice1"; } }
[ "noear@live.cn" ]
noear@live.cn
14805971af42a8b1dab704eaf9f6b7645500e90d
64e5ccf2ac9f296b805efe234b4d3823c1fdc241
/src/main/java/com/github/sergiofgonzalez/cryptools/utils/InitializationVectorGenerator.java
1720c824806ed7dde6e2ab13226f9aae9ab4797c
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sergiofgonzalez/cryptools
9cf5c99ff25cbb9676d89a8123da513621f30f28
ec5885984312a9fc2c1aefa53bd9f6cc3ee4d867
refs/heads/master
2021-05-16T17:43:31.465519
2017-09-24T15:22:17
2017-09-24T15:22:17
102,646,253
0
0
null
null
null
null
UTF-8
Java
false
false
1,249
java
package com.github.sergiofgonzalez.cryptools.utils; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.Base64; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Supports the generation of an Initialization Vector using a SecureRandom. * * @author sergio.f.gonzalez * */ public class InitializationVectorGenerator { private static final Logger LOGGER = LoggerFactory.getLogger(InitializationVectorGenerator.class); public static String getInitializationVector(String algorithm) { byte[] ivBytes = getRawBytesIv(algorithm); String ivString = Base64.getEncoder().encodeToString(ivBytes); return ivString; } private static byte[] getRawBytesIv(String algorithm) { SecureRandom random = new SecureRandom(); byte[] iv; try { iv = new byte[Cipher.getInstance(algorithm).getBlockSize()]; random.nextBytes(iv); return iv; } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { LOGGER.error("Could not generate a valid initialization vector for algorithm {}", algorithm); throw new IllegalArgumentException("Could not generate initialization vector", e); } } }
[ "sergio.f.gonzalez@gmail.com" ]
sergio.f.gonzalez@gmail.com
9497b9b3994475b39e4d653bc967fc47df96f47c
83f02d253c4a23444ce5c10193ad4fbc0bedf62e
/src/java/com/lawyershub/Dao/AdminDashboardDao.java
7c478cb4521b968631004c15e4e936a0deaf7ce2
[]
no_license
akhilbabu868/Lawyers_Hub
c1ee3a98c34aa3868bd3a270de00a9a8032f180c
b531ca34e5841d2fd7720902e8ebe4a711993870
refs/heads/main
2023-04-02T16:33:55.630267
2021-04-07T08:13:57
2021-04-07T08:13:57
355,442,894
0
0
null
null
null
null
UTF-8
Java
false
false
1,973
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.lawyershub.Dao; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import org.hibernate.Hibernate; import org.hibernate.SQLQuery; import org.hibernate.SessionFactory; import org.hibernate.transform.Transformers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; /** * * @author ASUS */ @Repository @Transactional public class AdminDashboardDao { @Autowired public SessionFactory sessionFactory; public List getAllUserRegistrationReport() throws ParseException { SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); SQLQuery qry = sessionFactory .getCurrentSession() .createSQLQuery("SELECT createddate, COUNT(*) as usercount FROM userregistration GROUP BY CAST(createddate AS DATE ) ORDER BY 2 ") .addScalar("createddate", Hibernate.STRING) .addScalar("usercount", Hibernate.STRING); qry.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); return qry.list(); } public List getAllLawyerRegistrationReport() throws ParseException { SQLQuery qry = sessionFactory .getCurrentSession() .createSQLQuery("SELECT createddate, COUNT(*) as lawyercount FROM lawyerregistration GROUP BY createddate ORDER BY 2 ") .addScalar("createddate", Hibernate.STRING) .addScalar("lawyercount", Hibernate.STRING); qry.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); return qry.list(); } }
[ "you@example.com" ]
you@example.com
7527f1dae498f349fb3732aa341618d95bc26196
3cd63aba77b753d85414b29279a77c0bc251cea9
/main/plugins/org.talend.designer.components.libs/libs_src/talend-mscrm/src/main/java/com/microsoft/schemas/crm/_2011/contracts/impl/ArrayOfComponentDetailImpl.java
fd6851f7d6f17a148a43ee1885c8731999f41962
[ "Apache-2.0" ]
permissive
195858/tdi-studio-se
249bcebb9700c6bbc8905ccef73032942827390d
4fdb5cfb3aeee621eacfaef17882d92d65db42c3
refs/heads/master
2021-04-06T08:56:14.666143
2018-10-01T14:11:28
2018-10-01T14:11:28
124,540,962
1
0
null
2018-10-01T14:11:29
2018-03-09T12:59:25
Java
UTF-8
Java
false
false
6,199
java
/* * XML Type: ArrayOfComponentDetail * Namespace: http://schemas.microsoft.com/crm/2011/Contracts * Java type: com.microsoft.schemas.crm._2011.contracts.ArrayOfComponentDetail * * Automatically generated - do not modify. */ package com.microsoft.schemas.crm._2011.contracts.impl; /** * An XML ArrayOfComponentDetail(@http://schemas.microsoft.com/crm/2011/Contracts). * * This is a complex type. */ public class ArrayOfComponentDetailImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.crm._2011.contracts.ArrayOfComponentDetail { private static final long serialVersionUID = 1L; public ArrayOfComponentDetailImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName COMPONENTDETAIL$0 = new javax.xml.namespace.QName("http://schemas.microsoft.com/crm/2011/Contracts", "ComponentDetail"); /** * Gets array of all "ComponentDetail" elements */ public com.microsoft.schemas.crm._2011.contracts.ComponentDetail[] getComponentDetailArray() { synchronized (monitor()) { check_orphaned(); java.util.List targetList = new java.util.ArrayList(); get_store().find_all_element_users(COMPONENTDETAIL$0, targetList); com.microsoft.schemas.crm._2011.contracts.ComponentDetail[] result = new com.microsoft.schemas.crm._2011.contracts.ComponentDetail[targetList.size()]; targetList.toArray(result); return result; } } /** * Gets ith "ComponentDetail" element */ public com.microsoft.schemas.crm._2011.contracts.ComponentDetail getComponentDetailArray(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().find_element_user(COMPONENTDETAIL$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return target; } } /** * Tests for nil ith "ComponentDetail" element */ public boolean isNilComponentDetailArray(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().find_element_user(COMPONENTDETAIL$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return target.isNil(); } } /** * Returns number of "ComponentDetail" element */ public int sizeOfComponentDetailArray() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(COMPONENTDETAIL$0); } } /** * Sets array of all "ComponentDetail" element WARNING: This method is not atomicaly synchronized. */ public void setComponentDetailArray(com.microsoft.schemas.crm._2011.contracts.ComponentDetail[] componentDetailArray) { check_orphaned(); arraySetterHelper(componentDetailArray, COMPONENTDETAIL$0); } /** * Sets ith "ComponentDetail" element */ public void setComponentDetailArray(int i, com.microsoft.schemas.crm._2011.contracts.ComponentDetail componentDetail) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().find_element_user(COMPONENTDETAIL$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.set(componentDetail); } } /** * Nils the ith "ComponentDetail" element */ public void setNilComponentDetailArray(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().find_element_user(COMPONENTDETAIL$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.setNil(); } } /** * Inserts and returns a new empty value (as xml) as the ith "ComponentDetail" element */ public com.microsoft.schemas.crm._2011.contracts.ComponentDetail insertNewComponentDetail(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().insert_element_user(COMPONENTDETAIL$0, i); return target; } } /** * Appends and returns a new empty value (as xml) as the last "ComponentDetail" element */ public com.microsoft.schemas.crm._2011.contracts.ComponentDetail addNewComponentDetail() { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.crm._2011.contracts.ComponentDetail target = null; target = (com.microsoft.schemas.crm._2011.contracts.ComponentDetail)get_store().add_element_user(COMPONENTDETAIL$0); return target; } } /** * Removes the ith "ComponentDetail" element */ public void removeComponentDetail(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(COMPONENTDETAIL$0, i); } } }
[ "dmytro.chmyga@synapse.com" ]
dmytro.chmyga@synapse.com
7fb80ea83b3d6e773762b5341d607e70506479b4
2bdb0dd16b5683fe9822d41314120b2fca917d5e
/src/main/java/io/github/jhipster/eventor/web/rest/errors/LoginAlreadyUsedException.java
040ff2d4920f693cabe3d17477d15865ef5efca6
[]
no_license
daxsieger/jeventor
f32960d3fd20ee6c04741ce96ff5d7dd4a115c49
13968fb712d8811843fb9fb7e99a45aaa436ee06
refs/heads/master
2020-03-22T06:03:38.599276
2018-07-03T16:17:22
2018-07-03T16:17:22
139,609,048
0
0
null
2018-07-03T16:26:11
2018-07-03T16:17:11
Java
UTF-8
Java
false
false
346
java
package io.github.jhipster.eventor.web.rest.errors; public class LoginAlreadyUsedException extends BadRequestAlertException { private static final long serialVersionUID = 1L; public LoginAlreadyUsedException() { super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists"); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
df85a744211da6010fdca0b1a92bb837a6568a84
40aa609d3771179b932e1e9dbe3df53c362a1d54
/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/controller/BasicAuthenticationController.java
aa4514f4235d8a21999482ac65c9509e6cfc30b1
[]
no_license
alvieira/todo-back-end
d4107d72d13614ea8a69f1d83c18d6a98d2884fb
4f7ff89fdd4115d9871617a864f8e21cb2f5597e
refs/heads/master
2020-05-29T19:19:18.907402
2019-06-11T02:01:05
2019-06-11T02:01:05
189,327,053
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package com.in28minutes.rest.webservices.restfulwebservices.controller; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import com.in28minutes.rest.webservices.restfulwebservices.helloworld.AuthenticationBean; @CrossOrigin(origins="http://localhost:4200") @RestController public class BasicAuthenticationController { @GetMapping(path="/basicauth") public AuthenticationBean authBean() { return new AuthenticationBean("You are authenticated"); // throw new RuntimeException("Some error happened. Contact support ***"); } }
[ "aloisio.vieira@gmail.com" ]
aloisio.vieira@gmail.com
d481e0a37c4bd50a2565c4834c1a8e9953395af5
e51de484e96efdf743a742de1e91bce67f555f99
/Android/triviacrack_src/src/com/etermax/tools/widget/pulltorefresh/g.java
4304fe6bde1a889c8c99f41b13a90988ffd1251b
[]
no_license
adumbgreen/TriviaCrap
b21e220e875f417c9939f192f763b1dcbb716c69
beed6340ec5a1611caeff86918f107ed6807d751
refs/heads/master
2021-03-27T19:24:22.401241
2015-07-12T01:28:39
2015-07-12T01:28:39
28,071,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
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.etermax.tools.widget.pulltorefresh; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.ListView; // Referenced classes of package com.etermax.tools.widget.pulltorefresh: // a, PullToRefreshListView class g extends ListView implements a { final PullToRefreshListView a; public g(PullToRefreshListView pulltorefreshlistview, Context context, AttributeSet attributeset) { a = pulltorefreshlistview; super(context, attributeset); } public void a(View view) { super.setEmptyView(view); } public android.view.ContextMenu.ContextMenuInfo getContextMenuInfo() { return super.getContextMenuInfo(); } public boolean onTouchEvent(MotionEvent motionevent) { boolean flag = a.b(motionevent); if (!a.b && flag) { a.b = true; a.a = motionevent.getY(); } if (a.b) { for (int i = 0; i < getChildCount(); i++) { getChildAt(i).setPressed(false); } PullToRefreshListView.a(a).requestFocusFromTouch(); if (a.a(motionevent)) { return false; } } return super.onTouchEvent(motionevent); } public void setEmptyView(View view) { a.setEmptyView(view); } }
[ "klayderpus@chimble.net" ]
klayderpus@chimble.net
a9879d1a723c0bc2fc3b7047f793c84c48093b93
5e37161bc4eba92e02237235ad4a2dfd8b4188b7
/jinshuo-service/src/main/java/com/jinshuo/mall/service/user/application/dto/WxMpUserList.java
4a709915bf820ba3a51e00b38ba8237d728c5312
[]
no_license
dyhimos/jinshuo-mall
f4400cc41ca6a57b7512832209eea6d1a8c3b101
b1cc18c8445a46abd35796bfdad55824f0f4a5a8
refs/heads/master
2022-07-12T23:16:16.872664
2020-05-14T13:09:27
2020-05-14T13:09:27
260,648,942
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.jinshuo.mall.service.user.application.dto; import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * 关注者列表 * * @author chanjarster */ @Data public class WxMpUserList implements Serializable { private static final long serialVersionUID = 1389073042674901032L; protected long total = -1; protected int count = -1; protected List<String> openids = new ArrayList<>(); protected String nextOpenid; }
[ "1" ]
1
bfd06e967c7bc3c265f0ebcf17dc31d6acf9050f
3cf44860d71c684456a1156ccb853d85b8833b1f
/src/com/tencent/trt/executor/test/TransformMultipleRows.java
c141f2f8e190390bc261ae58ca42f7b15a320bea
[ "Apache-2.0" ]
permissive
alanma/trt
c726ad85bbc04a42c48f2c3edb914e3b090d11d3
5c8b52b2598a6bbc3d91f0d16ff1aabbef68be4a
refs/heads/master
2021-01-21T19:59:02.314597
2015-04-01T03:15:47
2015-04-01T03:15:47
35,858,086
0
1
null
2015-05-19T03:54:14
2015-05-19T03:54:14
null
UTF-8
Java
false
false
2,843
java
package com.tencent.trt.executor.test; import com.fasterxml.jackson.databind.ObjectMapper; import com.tencent.trt.executor.model.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * Created by wentao on 1/17/15. */ public class TransformMultipleRows extends BaseTestCase { @Override public ResultTable inputTable() { return new ResultTable() {{ fields.add(new ResultField(){{ field = "raw_data"; }}); }}; } @Override public ResultTable resultTable() throws Exception { final ObjectMapper objectMapper = new ObjectMapper(); return new ResultTable() {{ fields.add(new ResultField() {{ isDimension = true; field = "ProductName"; type = "string"; origins = new String[]{"raw_data"}; processor = "parse_json"; processorArgs = objectMapper.writeValueAsString(new HashMap<String, Object>() {{ put("should_decode", false); put("flatten_field", "products"); put("fields", new HashMap<String, String>() {{ put("ProductName", "ProductName"); put("Price", "Price"); put("PerPrice", "PerPrice"); }}); put("input_type", new HashMap<String, String>() {{ put("Price", "String"); }}); }}); }}); fields.add(new ResultField() {{ isDimension = true; field = "Price"; type = "int"; processor = "=>ProductName"; }}); fields.add(new ResultField() {{ isDimension = true; field = "PerPrice"; type = "int"; processor = "=>ProductName"; }}); }}; } public void test() throws Exception { final ObjectMapper objectMapper = new ObjectMapper(); List<Record> outputs = execute(objectMapper.writeValueAsString(new HashMap<String, Object>() {{ put("products", new Object[]{ new HashMap<String, Object>() {{ put("ProductName", "A"); put("Price", "1"); put("PerPrice", 2); }}, new HashMap<String, Object>() {{ put("ProductName", "B"); put("Price", "2"); put("PerPrice", 4); }} }); }})); assertJsonEquals(new ArrayList<Record>() {{ add(o("A", 1, 2)); add(o("B", 2, 4)); }}, outputs); } }
[ "taowen@gmail.com" ]
taowen@gmail.com
7e27914f628b05daf70475e0e882818f2b926300
7a14ac621c265cdaea3934c0eebf81c9e8495ea3
/src/main/java/com/pd/core/patterns/headfirst/adapter/iterenum/EI.java
ff0cb695124f8a430ba469ec52e17f4a8be6b697
[]
no_license
dunejaparas/CoreJava
12d864a8828880751deb48f87e2eef866c52d6b8
ff113f6ae3c76d9717e0a67b9e5e038257a109bc
refs/heads/master
2021-01-16T18:03:10.644420
2015-09-05T23:59:26
2015-09-05T23:59:26
33,132,791
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
package com.pd.core.patterns.headfirst.adapter.iterenum; import java.util.Arrays; import java.util.Enumeration; import java.util.Iterator; import java.util.Vector; public class EI { public static void main(final String args[]) { final Vector v = new Vector(Arrays.asList(args)); final Enumeration enumeration = v.elements(); while (enumeration.hasMoreElements()) { System.out.println(enumeration.nextElement()); } final Iterator iterator = v.iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); } } }
[ "paras.duneja@ericsson.com" ]
paras.duneja@ericsson.com
5cb640a314752a6ff7d2bc5f211f77e4ff9b9b06
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/d2b889e1ac42bc85f9df5c45c10708f46784be93d69acd1415cfd4d028cb50b19f50c374a9498c8e8b909173053a100e20c279ddb06c6359a06a920ead3e8080/000/mutations/155/digits_d2b889e1_000.java
252cd9e7e0827bff62203630abef698a129de2a7
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,707
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_d2b889e1_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_d2b889e1_000 mainClass = new digits_d2b889e1_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj x = new IntObj (), a = new IntObj (), b = new IntObj (), c = new IntObj (), y = new IntObj (); output += (String.format ("Enter an integer > ")); b.value = scanner.nextInt (); a.value = b.value / 10; c.value = b.value % 10; if (c.value > 0) { output += (String.format ("%d\n", c.value)); } else if (c.value < 0) { y.value = c.value * (-1); output += (String.format ("%d\n", y.value)); } if (a.value > 0) { while (a.value > 0) { x.value = a.value % 10; a.value = a.value / 10; output += (String.format ("%d\n", x.value)); if (a.value < 10) { output += (String.format ("%d\nThat's all, have a nice day!\n", a.value)); if (true) return;; } } } else if (a.value < 0) { a.value = a.value * (-1); while (a.value > 0) { x.value = 10; a.value = a.value / 10; output += (String.format ("%d\n", x.value)); if (a.value < 10) { a.value = a.value * (-1); output += (String.format ("%d\nTHat's all, have a nice day~\n", a.value)); } } } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
e3aba93d79aa2254919ab1f21de8903de4df5308
0a7f9ec9d445a806ffec6419f2c666fb9710059e
/app/src/main/java/com/raisesail/andoid/androidupload/ResponseData.java
19399b5fe20c2b16fa0d8045a14c47484efb3494
[]
no_license
wangchao1994/AndroidUpload
55f19e4fea8a8a5ddc9b3a33a72c7396fd69ca01
3631d16ea833ccdb81c76e5a819931ada43e7fc6
refs/heads/master
2020-05-19T19:34:14.213461
2019-06-27T08:16:58
2019-06-27T08:16:58
185,183,122
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.raisesail.andoid.androidupload; public class ResponseData { /** * status : OK * id : * link : * meta : {} */ private String status; private String id; private String link; private MetaBean meta; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public MetaBean getMeta() { return meta; } public void setMeta(MetaBean meta) { this.meta = meta; } public static class MetaBean { } }
[ "wchao0829@163.com" ]
wchao0829@163.com
c93c45bc3897ba2b74a8cf72a61a3b73de0b7106
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module855/src/main/java/module855packageJava0/Foo14.java
71de7816c07191cbd761ac210ab329b37a6eb874
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
446
java
package module855packageJava0; import java.lang.Integer; public class Foo14 { Integer int0; Integer int1; Integer int2; public void foo0() { new module855packageJava0.Foo13().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
9f2221b59331085a031e1a1feac3ac0761d71f94
6775412013350bceefa00a8197a31a74b7ff5b46
/demos/portal/jsf2-registration-portlet/src/main/java/com/liferay/faces/demos/bean/RegistrantModelBean.java
0034f4e950f56bd003030be783078082e94bd120
[]
no_license
ceidion/liferay-faces
757cd9694d189e017a7568bbca0c98b2deb39c5b
e4a96ca8a01e82d648cc183b4ccc87f215e2772c
refs/heads/master
2023-04-15T22:02:12.121241
2019-11-02T17:40:52
2019-11-02T17:40:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
/** * Copyright (c) 2000-2015 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.faces.demos.bean; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import com.liferay.faces.demos.model.Registrant; import com.liferay.faces.portal.context.LiferayFacesContext; /** * This is a model managed bean that represents a user that is registering for an account. * * @author "Neil Griffin" */ @ManagedBean(name = "registrantModelBean") @ViewScoped public class RegistrantModelBean implements Serializable { // serialVersionUID private static final long serialVersionUID = 7459438254337818761L; // Private Data Members private Registrant registrant; public RegistrantModelBean() { registrant = new Registrant(LiferayFacesContext.getInstance().getCompanyId()); } public Registrant getRegistrant() { return registrant; } }
[ "neil.griffin.scm@gmail.com" ]
neil.griffin.scm@gmail.com
d90b3a19349901366e48f548ffdc1ebbd3ae437b
0aabd164442e2206028cc34da59582915d91cf84
/kingshuk_core_springs/ATMAppSpringStaticFactoryMethodDemo/src/com/spi/date/MainApp.java
d8ecaa6412b1716a062911c3cd86e20839cb67da
[]
no_license
kingshuknandy2016/TBT-Workspace
0d7339518b32fc5c6e01179b3768808e441ec606
fef1c5229d0e1d56d97b41b44fb066e7560c208c
refs/heads/master
2021-01-24T11:06:13.774604
2018-02-27T04:50:44
2018-02-27T04:50:44
123,073,378
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package com.spi.date; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.spi.atm.ATM; public class MainApp { public static void main(String[] args) { System.out.println("BEGINNING PROGRAM **************"); ApplicationContext context = new ClassPathXmlApplicationContext( "appContext.xml"); Implementor impl = (Implementor)context.getBean("obj"); System.out.println(impl); System.out.println("************** ENDING PROGRAM **************"); } }
[ "kingshuknandy2016@gmail.com" ]
kingshuknandy2016@gmail.com
14afedb688de026fb4d6a249af9be6a12ef6636b
499f4189dcda4561df1a3ed3a39165bb78cffcb5
/IK_project/src/Obj/DrawbleObject.java
6fc3ff6aa63b5ad4030f906e9ac1951b1498b0a8
[]
no_license
ilYYYa/IK-project
0f730c5abd923b839291871bc7773b9c42a7f98c
87a7c8811e3bd3019ca4ce3ef1f4af239eceb921
refs/heads/master
2021-01-18T23:07:08.797108
2017-04-05T17:29:34
2017-04-05T17:29:34
87,090,376
0
0
null
null
null
null
UTF-8
Java
false
false
654
java
package Obj; import java.awt.Graphics; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; public abstract class DrawbleObject { public double posX = 0; public double posY = 0; public double localPosX = 0; public double localPosY = 0; public double width = 0; public double height = 0; public abstract void draw(Graphics g); public void onMouseClick(MouseEvent event){} public void onMousePress(MouseEvent event){} public void onMouseRelease(MouseEvent event){} public void onMouseMove(MouseEvent event){} public void onKeyPress(KeyEvent event){} public void onKeyRelease(KeyEvent event){} }
[ "ilyyya.777@gmail.com" ]
ilyyya.777@gmail.com
28f327fa55bb6deefbdd6fe58923fb0c4ac0b64b
e2a97f336e545c89dbba886889416ee99c3d89a0
/ch18_01/src/dao/CartDao.java
4b4e7f5ca70c1e22bd0417df8a7b0e0d8c26e3e8
[]
no_license
jongtix/JSP_jongtix
f580d82beaa3a53c9876961af45389527d3832af
ef5aac22eefa6611bdce6647fba645e55d626192
refs/heads/master
2021-05-06T00:38:00.250849
2018-03-18T07:06:06
2018-03-18T07:06:06
114,311,296
0
0
null
null
null
null
UTF-8
Java
false
false
6,091
java
package dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import javax.naming.Context; import javax.naming.InitialContext; import javax.sql.DataSource; import model.Cart; public class CartDao { private static CartDao instance; public CartDao() { } public static CartDao getInstance() { if (instance == null) { instance = new CartDao(); } return instance; } public Connection getConnection() throws Exception { Connection conn = null; Context init = new InitialContext(); DataSource ds = (DataSource) init.lookup("java:comp/env/jdbc/OracleDB"); conn = ds.getConnection(); return conn; } public int insertCart(Cart cart, String buyer) { int result = 0; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql1 = "select count(*) from cart where buyer = ? and book_id = ?"; String sql2 = "update cart set buy_count = buy_count+? where buyer = ? and book_id = ?"; String sql3 = "insert into cart values(cart_seq.nextval, ?, ?, ?, ?, ?, ?)"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql1); pstmt.setString(1, buyer); pstmt.setInt(2, cart.getBook_id()); rs = pstmt.executeQuery(); if (rs.next()) { if (rs.getInt(1) > 0) { pstmt = conn.prepareStatement(sql2); int i = 0; pstmt.setInt(++i, cart.getBuy_count()); pstmt.setString(++i, cart.getBuyer()); pstmt.setInt(++i, cart.getBook_id()); result = pstmt.executeUpdate(); } else { pstmt = conn.prepareStatement(sql3); int i = 0; pstmt.setString(++i, cart.getBuyer()); pstmt.setInt(++i, cart.getBook_id()); pstmt.setString(++i, cart.getBook_title()); pstmt.setInt(++i, cart.getBuy_price()); pstmt.setInt(++i, cart.getBuy_count()); pstmt.setString(++i, cart.getBook_image()); result = pstmt.executeUpdate(); } } } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return result; } public int getListCount(String buyer) { int count = 0; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql = "select count(*) from cart where buyer = ?"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setString(1, buyer); rs = pstmt.executeQuery(); if (rs.next()) { count = rs.getInt(1); } } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return count; } public ArrayList<Cart> getCartList(String buyer) { ArrayList<Cart> list = new ArrayList<>(); Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql = "select * from cart where buyer = ?"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setString(1, buyer); rs = pstmt.executeQuery(); while (rs.next()) { Cart cart = new Cart(); int i = 0; cart.setCart_id(rs.getInt(++i)); cart.setBuyer(rs.getString(++i)); cart.setBook_id(rs.getInt(++i)); cart.setBook_title(rs.getString(++i)); cart.setBuy_price(rs.getInt(++i)); cart.setBuy_count(rs.getInt(++i)); cart.setBook_image(rs.getString(++i)); list.add(cart); } } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return list; } public int updateCount(int cart_id, int buy_count) { int result = 0; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql1 = "select book.book_count from book, cart where book.book_id = cart.book_id and cart.cart_id = ?"; String sql2 = "update cart set buy_count = ? where cart_id = ?"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql1); pstmt.setInt(1, cart_id); rs = pstmt.executeQuery(); if (rs.next()) { if (buy_count > rs.getInt(1)) { result = -1; } else { pstmt = conn.prepareStatement(sql2); pstmt.setInt(1, buy_count); pstmt.setInt(2, cart_id); result = pstmt.executeUpdate(); } } } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return result; } public int deleteAll(String buyer) { int result = 0; Connection conn = null; PreparedStatement pstmt = null; String sql = "delete cart where buyer = ?"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setString(1, buyer); result = pstmt.executeUpdate(); } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return result; } public int deleteCart(int list) { int result = 0; Connection conn = null; PreparedStatement pstmt = null; String sql = "delete from cart where cart_id = ?"; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setInt(1, list); result = pstmt.executeUpdate(); } catch (Exception e) { System.out.println(e.getMessage()); } finally { try { if (pstmt != null) pstmt.close(); if (conn != null) conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); } } return result; } }
[ "jong1145@naver.com" ]
jong1145@naver.com
3bf462c4809313b3a7f8f9e8886248e1277e3151
b3633e3ec170e10ffaf07f7125d1bc17ff2b462f
/Benchmarks/ph-commons-ph-commons-parent-pom-9.3.9-patched/ph-commons/src/main/java/com/helger/commons/ws/HostnameVerifierVerifyAll.java
30af8b4603fa40564fe4f6bcaefc8e982b105869
[ "Apache-2.0" ]
permissive
dliang2000/hierarchy_analysis
23c30460050a2451606adf28cc1e09fc101e7457
4083b4c9e0daaf519cd1c3f37c4379bf97da9329
refs/heads/master
2022-05-31T02:01:24.776781
2021-03-30T20:39:58
2021-03-30T20:39:58
231,459,166
1
0
null
2022-05-20T21:58:23
2020-01-02T21:03:00
Java
UTF-8
Java
false
false
1,938
java
/** * Copyright (C) 2014-2019 Philip Helger (www.helger.com) * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.commons.ws; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.helger.commons.debug.GlobalDebug; import com.helger.commons.string.ToStringGenerator; /** * Implementation of HostnameVerifier always returning <code>true</code>. * * @author Philip Helger */ public class HostnameVerifierVerifyAll implements HostnameVerifier { private static final Logger LOGGER = LoggerFactory.getLogger (HostnameVerifierVerifyAll.class); private final boolean m_bDebug; public HostnameVerifierVerifyAll () { this (GlobalDebug.isDebugMode ()); } public HostnameVerifierVerifyAll (final boolean bDebug) { m_bDebug = bDebug; } /** * @return The debug flag as passed in the constructor. */ public boolean isDebug () { return m_bDebug; } public boolean verify (final String sURLHostname, final SSLSession aSession) { if (m_bDebug) if (LOGGER.isInfoEnabled ()) LOGGER.info ("Hostname '" + sURLHostname + "' is accepted by default in SSL session " + aSession + "!"); return true; } @Override public String toString () { return new ToStringGenerator (this).append ("debug", m_bDebug).getToString (); } }
[ "q8liang@uwaterloo.ca" ]
q8liang@uwaterloo.ca
0b29781b353f739605220956b4b608e1186d5e5f
69e336d4c9c58fff7c93395339cc0f840e31601c
/src/main/com/idamobile/vpb/courier/network/core/LoaderCallback.java
17ddde62216f40b63143ddaab0e4b3bbd3e6ed56
[]
no_license
idamobile/vpb-courier-app
d8ee1f4cad11a05c4e82b492defcee37c3affb43
760b5a271e6de21b4ea140d68f4e1b29f9de151a
refs/heads/master
2021-01-11T02:08:55.045189
2014-02-20T08:07:30
2014-02-20T08:07:30
8,136,215
0
1
null
null
null
null
UTF-8
Java
false
false
539
java
package com.idamobile.vpb.courier.network.core; import com.idamobile.vpb.courier.ApplicationMediator; import java.io.Serializable; /** * Callback called by NetworkManager when data ready from network. Used to update model or store data in database. * * @author Sergey Royz * @since 05/23/2012 */ public interface LoaderCallback<Q> extends Serializable { void onStartLoading(Request<Q> request, ApplicationMediator mediator); void onDataReady(Request<Q> request, ResponseDTO<Q> response, ApplicationMediator mediator); }
[ "shaubert.alexander@gmail.com" ]
shaubert.alexander@gmail.com
f78809bc35760619b3e7f58fc6a295f8521e3000
e770778e830e9a34b926c5a4df94b011a7e039b1
/ZDIM/src/zhwx/common/view/dialog/IBaseAdapter.java
5bc8d5191f3175529b71785d0db4c78b1ec7a74f
[]
no_license
lixinxiyou01/zdhx-im-yunxin-run
bc5290458dd0e8a4d37339da7ddb07a6d10ad317
3ad40223c15dac575e860136e24be690387405ad
refs/heads/master
2021-01-12T06:51:59.284750
2017-10-10T08:25:40
2017-10-10T08:25:40
83,505,395
3
4
null
null
null
null
UTF-8
Java
false
false
3,880
java
package zhwx.common.view.dialog; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.widget.BaseAdapter; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * com.zdhx.edu.im.common.dialog in ECDemo_Android * Created by 容联•云通讯 Modify By Li.Xin @ 中电和讯 on 2015/4/18. */ public abstract class IBaseAdapter<T> extends BaseAdapter { protected Context mContext; protected List<T> data; protected LayoutInflater mLayoutInflater; private boolean mNotifyOnChange = true; public IBaseAdapter(Context ctx) { mContext = ctx; mLayoutInflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); data = new ArrayList<T>(); } public IBaseAdapter(Context ctx ,List<T> data) { this(ctx); this.data = data; } public View inflateView(int resource) { return mLayoutInflater.inflate(resource , null); } public List<T> getData() { return data; } public void replace(int position , T t) { data.remove(position); data.add(position , t); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void insert(int position , T t) { data.add(position, t); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void addAll(int position , Collection<T> t) { data.addAll(position, t); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void add(T t) { data.add(t); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void setData(Collection<T> t) { data.clear(); addData(t); } public void addData(T[] ts) { if(ts == null || ts.length == 0) { return ; } for(int i = 0 ; i < ts.length ; i++) { data.add(ts[i]); } if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void clear(boolean notify) { data.clear(); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void addData(Collection<T> t) { addData(t, this.mNotifyOnChange); } public void addData(Collection<T> t ,boolean notify) { data.addAll(t); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void reset() { clear(this.mNotifyOnChange); } public void remove(int position) { data.remove(position); if(!mNotifyOnChange) { return ; } notifyDataSetChanged(); } public void addOnly(T t) { data.add(t); } public T removeOnly(int position) { return data.remove(position); } public void removeOnly(T t) { data.remove(t); } public void unNofity() { this.mNotifyOnChange = false; } public boolean hasDataAndRemove(T t) { boolean remove = data.remove(t); if(mNotifyOnChange) { notifyDataSetChanged(); } return remove; } public Context getContext() { return mContext; } public int getPosition(T t) { return data.indexOf(t); } @Override public int getCount() { return data.size(); } @Override public long getItemId(int position) { return position; } @Override public Object getItem(int position) { return data.get(position); } @Override public void notifyDataSetChanged() { super.notifyDataSetChanged(); this.mNotifyOnChange = true; } }
[ "lixin890403@163.com" ]
lixin890403@163.com
7955cece2b15832281bb563a9055a04895944016
67f86bb3d09cbc86cac698b3f0abaf01457a966a
/master/java-ee-cdi-producer-methods-tutorial/com-byteslounge-cdi/src/main/java/com/byteslounge/bean/impl/EmailMessageSender.java
f9c014788950d8e689bd671a2f8557c118aa5e0b
[ "MIT" ]
permissive
tied/DevArtifacts
efba1ccea5f0d832d4227c9fe1a040cb93b9ad4f
931aabb8cbf27656151c54856eb2ea7d1153203a
refs/heads/master
2020-06-06T01:48:32.149972
2018-12-08T15:26:16
2018-12-08T15:26:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
233
java
package com.byteslounge.bean.impl; import com.byteslounge.bean.MessageSender; public class EmailMessageSender implements MessageSender { @Override public void sendMessage() { System.out.println("Sending email message"); } }
[ "alexander.rogalsky@yandex.ru" ]
alexander.rogalsky@yandex.ru
f8533e70c1e84997e1182fb9f85789414f2eb1ed
57fc8f3affcd3e4ceb3775904ee70cb1252f4ea0
/hsdb-webapp/src/main/java/com/github/bogdanovmn/hsdb/webapp/HeadMenuItem.java
87b68f7eef04f612653a88a8eb412a6662c9559a
[ "BSD-2-Clause" ]
permissive
bogdanovmn/hsdb
3bc5f48e7ea2a9a40242397e497c6ac04acdad9a
0a3f266982d587a49bd2753b98cdc2d691f1cbd4
refs/heads/master
2021-09-18T22:32:20.808736
2018-03-25T09:26:13
2018-03-25T09:26:13
107,723,280
0
0
null
2018-07-20T23:30:03
2017-10-20T20:27:13
Java
UTF-8
Java
false
false
626
java
package com.github.bogdanovmn.hsdb.webapp; public class HeadMenuItem { private final String id; private final String url; private final String title; private boolean selected = false; public HeadMenuItem(String id, String url, String title) { this.id = id; this.url = url; this.title = title; } public void select() { this.selected = true; } public boolean is(String current) { return this.id.equals(current); } public String getUrl() { return url; } public String getTitle() { return title; } public boolean isSelected() { return selected; } }
[ "bogdanovmn@gmail.com" ]
bogdanovmn@gmail.com
50d2d9d8628c26335e6624c538c29f4a3296e016
e787c556a822380e6a9d1fe9dd162fac288684f3
/services/metadata-service/metadata-rest-model/src/main/java/com/thinkbiganalytics/metadata/rest/model/feed/transform/FieldsPolicy.java
cbbe15965bdf951694c2ba6bff915570ba5b1a1f
[ "WTFPL", "CDDL-1.0", "MIT", "CC0-1.0", "EPL-1.0", "PostgreSQL", "BSD-3-Clause", "LGPL-2.1-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-protobuf", "OFL-1.1" ]
permissive
rohituppalapati/kylo-source
82bd8e788a14a33edcff8ac6306245c230e90665
cc794fb8a128a1bb6453e029ab7f6354e75c863e
refs/heads/master
2022-12-28T08:14:32.280826
2019-08-13T18:16:31
2019-08-13T18:16:31
200,886,840
0
0
Apache-2.0
2022-12-16T03:26:58
2019-08-06T16:23:27
Java
UTF-8
Java
false
false
1,195
java
/** * */ package com.thinkbiganalytics.metadata.rest.model.feed.transform; /*- * #%L * thinkbig-metadata-rest-model * %% * Copyright (C) 2017 ThinkBig Analytics * %% * 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% */ import java.util.ArrayList; import java.util.List; /** * */ public class FieldsPolicy { List<FieldPolicy> fieldPolicies = new ArrayList<>(); public List<FieldPolicy> getFieldPolicies() { return fieldPolicies; } public void setFieldPolicies(List<FieldPolicy> fieldPolicies) { this.fieldPolicies = fieldPolicies; } public void addPolicy(FieldPolicy policy) { this.fieldPolicies.add(policy); } }
[ "rohituppalapati@Rohits-MacBook-Pro.local" ]
rohituppalapati@Rohits-MacBook-Pro.local
8133c30c653fba083176a4773b63fd06e291d6b2
f4fb031f70595659a44cee19ac5a745285ffd01e
/Minecraft/src/net/minecraft/src/Packet2ClientProtocol.java
836e17e546ca2ce37160ad9b8ef860670755d82e
[]
no_license
minecraftmuse3/Minecraft
7adfae39fccbacb8f4e5d9b1b0adf0d3ad9aebc4
b3efea7d37b530b51bab42b8cf92eeb209697c01
refs/heads/master
2021-01-17T21:53:09.461358
2013-07-22T13:10:43
2013-07-22T13:10:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,407
java
package net.minecraft.src; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public class Packet2ClientProtocol extends Packet { private int protocolVersion; private String username; private String serverHost; private int serverPort; public Packet2ClientProtocol() { } public Packet2ClientProtocol(int par1, String par2Str, String par3Str, int par4) { protocolVersion = par1; username = par2Str; serverHost = par3Str; serverPort = par4; } @Override public int getPacketSize() { return 3 + 2 * username.length(); } public int getProtocolVersion() { return protocolVersion; } public String getUsername() { return username; } @Override public void processPacket(NetHandler par1NetHandler) { par1NetHandler.handleClientProtocol(this); } @Override public void readPacketData(DataInput par1DataInput) throws IOException { protocolVersion = par1DataInput.readByte(); username = readString(par1DataInput, 16); serverHost = readString(par1DataInput, 255); serverPort = par1DataInput.readInt(); } @Override public void writePacketData(DataOutput par1DataOutput) throws IOException { par1DataOutput.writeByte(protocolVersion); writeString(username, par1DataOutput); writeString(serverHost, par1DataOutput); par1DataOutput.writeInt(serverPort); } }
[ "sashok7241@gmail.com" ]
sashok7241@gmail.com
157b60f25a726ad82cdc5009f277750b16bb1bc8
6452d328c9a70f23a037a9226e79d6f5820a44e4
/org/sintef/edap_uC/edapuC.resource.edapuC/src-gen/edapuC/resource/edapuC/mopp/EdapuCReferenceResolverSwitch.java
fd6a7cb6017b699f64c8827bc44b6a684f68526a
[]
no_license
manualem/moderates
2132bf76b7f540c1fa4d74b78154a71070ef0fff
ad8d74667c3532cee44e572ca3d8d8ca316451bd
refs/heads/master
2020-12-29T01:42:11.865055
2011-06-21T09:03:28
2011-06-21T09:03:28
38,399,699
0
0
null
null
null
null
UTF-8
Java
false
false
7,225
java
/******************************************************************************* * Copyright (c) 2010 SINTEF * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * SINTEF - initial API and implementation ******************************************************************************/ package edapuC.resource.edapuC.mopp; public class EdapuCReferenceResolverSwitch implements edapuC.resource.edapuC.IEdapuCReferenceResolverSwitch { protected edapuC.resource.edapuC.analysis.UCGeneratorImportsReferenceResolver uCGeneratorImportsReferenceResolver = new edapuC.resource.edapuC.analysis.UCGeneratorImportsReferenceResolver(); protected edapuC.resource.edapuC.analysis.UCGeneratorEdapReferenceResolver uCGeneratorEdapReferenceResolver = new edapuC.resource.edapuC.analysis.UCGeneratorEdapReferenceResolver(); protected edapuC.resource.edapuC.analysis.UCDeviceDeviceReferenceResolver uCDeviceDeviceReferenceResolver = new edapuC.resource.edapuC.analysis.UCDeviceDeviceReferenceResolver(); protected edapuC.resource.edapuC.analysis.UCApplicationState_machineReferenceResolver uCApplicationState_machineReferenceResolver = new edapuC.resource.edapuC.analysis.UCApplicationState_machineReferenceResolver(); protected edapuC.resource.edapuC.analysis.UCMessageMessageReferenceResolver uCMessageMessageReferenceResolver = new edapuC.resource.edapuC.analysis.UCMessageMessageReferenceResolver(); public edapuC.resource.edapuC.analysis.UCGeneratorImportsReferenceResolver getUCGeneratorImportsReferenceResolver() { return uCGeneratorImportsReferenceResolver; } public edapuC.resource.edapuC.analysis.UCGeneratorEdapReferenceResolver getUCGeneratorEdapReferenceResolver() { return uCGeneratorEdapReferenceResolver; } public edapuC.resource.edapuC.analysis.UCDeviceDeviceReferenceResolver getUCDeviceDeviceReferenceResolver() { return uCDeviceDeviceReferenceResolver; } public edapuC.resource.edapuC.analysis.UCApplicationState_machineReferenceResolver getUCApplicationState_machineReferenceResolver() { return uCApplicationState_machineReferenceResolver; } public edapuC.resource.edapuC.analysis.UCMessageMessageReferenceResolver getUCMessageMessageReferenceResolver() { return uCMessageMessageReferenceResolver; } public void setOptions(java.util.Map<?, ?> options) { uCGeneratorImportsReferenceResolver.setOptions(options); uCGeneratorEdapReferenceResolver.setOptions(options); uCDeviceDeviceReferenceResolver.setOptions(options); uCApplicationState_machineReferenceResolver.setOptions(options); uCMessageMessageReferenceResolver.setOptions(options); } public void resolveFuzzy(String identifier, org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, int position, edapuC.resource.edapuC.IEdapuCReferenceResolveResult<org.eclipse.emf.ecore.EObject> result) { if (container == null) { return; } if (edapuC.EdapuCPackage.eINSTANCE.getUCGenerator().isInstance(container)) { EdapuCFuzzyResolveResult<edapuC.UCGenerator> frr = new EdapuCFuzzyResolveResult<edapuC.UCGenerator>(result); String referenceName = reference.getName(); org.eclipse.emf.ecore.EStructuralFeature feature = container.eClass().getEStructuralFeature(referenceName); if (feature != null && feature instanceof org.eclipse.emf.ecore.EReference && referenceName != null && referenceName.equals("imports")) { uCGeneratorImportsReferenceResolver.resolve(identifier, (edapuC.UCGenerator) container, (org.eclipse.emf.ecore.EReference) feature, position, true, frr); } } if (edapuC.EdapuCPackage.eINSTANCE.getUCGenerator().isInstance(container)) { EdapuCFuzzyResolveResult<edap.EdapModel> frr = new EdapuCFuzzyResolveResult<edap.EdapModel>(result); String referenceName = reference.getName(); org.eclipse.emf.ecore.EStructuralFeature feature = container.eClass().getEStructuralFeature(referenceName); if (feature != null && feature instanceof org.eclipse.emf.ecore.EReference && referenceName != null && referenceName.equals("edap")) { uCGeneratorEdapReferenceResolver.resolve(identifier, (edapuC.UCGenerator) container, (org.eclipse.emf.ecore.EReference) feature, position, true, frr); } } if (edapuC.EdapuCPackage.eINSTANCE.getUCDevice().isInstance(container)) { EdapuCFuzzyResolveResult<edap.Component> frr = new EdapuCFuzzyResolveResult<edap.Component>(result); String referenceName = reference.getName(); org.eclipse.emf.ecore.EStructuralFeature feature = container.eClass().getEStructuralFeature(referenceName); if (feature != null && feature instanceof org.eclipse.emf.ecore.EReference && referenceName != null && referenceName.equals("device")) { uCDeviceDeviceReferenceResolver.resolve(identifier, (edapuC.UCDevice) container, (org.eclipse.emf.ecore.EReference) feature, position, true, frr); } } if (edapuC.EdapuCPackage.eINSTANCE.getUCApplication().isInstance(container)) { EdapuCFuzzyResolveResult<edap.Component> frr = new EdapuCFuzzyResolveResult<edap.Component>(result); String referenceName = reference.getName(); org.eclipse.emf.ecore.EStructuralFeature feature = container.eClass().getEStructuralFeature(referenceName); if (feature != null && feature instanceof org.eclipse.emf.ecore.EReference && referenceName != null && referenceName.equals("state_machine")) { uCApplicationState_machineReferenceResolver.resolve(identifier, (edapuC.UCApplication) container, (org.eclipse.emf.ecore.EReference) feature, position, true, frr); } } if (edapuC.EdapuCPackage.eINSTANCE.getUCMessage().isInstance(container)) { EdapuCFuzzyResolveResult<edap.Message> frr = new EdapuCFuzzyResolveResult<edap.Message>(result); String referenceName = reference.getName(); org.eclipse.emf.ecore.EStructuralFeature feature = container.eClass().getEStructuralFeature(referenceName); if (feature != null && feature instanceof org.eclipse.emf.ecore.EReference && referenceName != null && referenceName.equals("message")) { uCMessageMessageReferenceResolver.resolve(identifier, (edapuC.UCMessage) container, (org.eclipse.emf.ecore.EReference) feature, position, true, frr); } } } public edapuC.resource.edapuC.IEdapuCReferenceResolver<? extends org.eclipse.emf.ecore.EObject, ? extends org.eclipse.emf.ecore.EObject> getResolver(org.eclipse.emf.ecore.EStructuralFeature reference) { if (reference == edapuC.EdapuCPackage.eINSTANCE.getUCGenerator_Imports()) { return uCGeneratorImportsReferenceResolver; } if (reference == edapuC.EdapuCPackage.eINSTANCE.getUCGenerator_Edap()) { return uCGeneratorEdapReferenceResolver; } if (reference == edapuC.EdapuCPackage.eINSTANCE.getUCDevice_Device()) { return uCDeviceDeviceReferenceResolver; } if (reference == edapuC.EdapuCPackage.eINSTANCE.getUCApplication_State_machine()) { return uCApplicationState_machineReferenceResolver; } if (reference == edapuC.EdapuCPackage.eINSTANCE.getUCMessage_Message()) { return uCMessageMessageReferenceResolver; } return null; } }
[ "fleurey@18f204b0-11dd-0995-6934-10920bfec807" ]
fleurey@18f204b0-11dd-0995-6934-10920bfec807
e588a586c50d2914dd495a1e6216363ad496aac2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_c1f8eef7efd117ae5d241b4f9a88e3ebe2d2283d/Application/3_c1f8eef7efd117ae5d241b4f9a88e3ebe2d2283d_Application_t.java
e417bd4d451f59848c022396528c69a40fa27d26
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,382
java
package controllers; import play.*; import play.mvc.*; import play.data.*; import play.data.validation.Constraints.*; import views.html.*; import java.util.List; import java.util.ArrayList; import models.*; public class Application extends Controller { public static Form<User> userForm = form(User.class); public static Result index() { //session("email", "user@gmail.com"); final User user = User.forName("Musterbro"); final List<User> users = new ArrayList<User>(); users.add(user); return ok(views.html.index.render(users)); } public static Result editProfile() { //if session... final User user = User.forName("Musterbro"); return ok(views.html.users.editProfile.render(userForm.fill(user))); } public static Result updateProfile() { final User user = userForm.bindFromRequest().get(); return redirect(routes.Application.showProfile()); } public static Result exportUsers() { final User user = User.forName("Musterbro"); final List<User> users = new ArrayList<User>(); users.add(user); String trimmedText = views.txt.usersExport.render(users, true).body().trim(); return ok(trimmedText); } public static Result showProfile() { final User user = User.forName("Musterbro"); return ok(views.html.users.profile.render(user)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f5651b3aea113462cdb849892382ad8b13e51e21
a66a4d91639836e97637790b28b0632ba8d0a4f9
/src/extras/animalsense/ui/edit/VariablesTableBase.java
f8834d32fcef2de96a49be02060447e04e976636
[]
no_license
roessling/animal-av
7d0ba53dda899b052a6ed19992fbdfbbc62cf1c9
043110cadf91757b984747750aa61924a869819f
refs/heads/master
2021-07-13T05:31:42.223775
2020-02-26T14:47:31
2020-02-26T14:47:31
206,062,707
0
2
null
2020-10-13T15:46:14
2019-09-03T11:37:11
Java
UTF-8
Java
false
false
2,076
java
/** * */ package extras.animalsense.ui.edit; import java.awt.BorderLayout; import java.awt.Panel; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; /** * @author Mihail Mihaylov * */ public class VariablesTableBase extends Panel implements ActionListener { private static final long serialVersionUID = 1L; private JScrollPane tableSP = null; private JButton addNewBtn = null; private JTable qTable = null; private JPanel jPanel = null; /** * This is the default constructor */ public VariablesTableBase() { super(); initialize(); } /** * This method initializes this */ private void initialize() { this.setLayout(new BorderLayout()); this.add(getTableSP(), BorderLayout.CENTER); this.add(getJPanel(), BorderLayout.SOUTH); } /** * This method initializes tableSP * * @return javax.swing.JScrollPane */ private JScrollPane getTableSP() { if (tableSP == null) { tableSP = new JScrollPane(); tableSP.setViewportView(getQTable()); } return tableSP; } /** * This method initializes addNewBtn * * @return javax.swing.JButton */ private JButton getAddNewBtn() { if (addNewBtn == null) { addNewBtn = new JButton(); addNewBtn.setText("Add new"); addNewBtn.setActionCommand("addNew"); addNewBtn.addActionListener(this); } return addNewBtn; } /** * This method initializes qTable * * @return javax.swing.JTable */ public JTable getQTable() { if (qTable == null) { qTable = new JTable(); } return qTable; } @Override public void actionPerformed(ActionEvent e) { // nothing to be done here } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.X_AXIS)); jPanel.add(getAddNewBtn(), null); } return jPanel; } }
[ "guido@tk.informatik.tu-darmstadt.de" ]
guido@tk.informatik.tu-darmstadt.de
26938ad3beed1239a53c4951ea840a7dc8f4fa68
00c1e2cb248225c5c3071b681d169257d604b713
/src/com/smanzana/templateeditor/api/annotations/DataLoaderSuperclass.java
64d7d029add226827e67813c701a6caea28e6761
[]
no_license
Dove-Bren/TemplateEditor
4e32d67c4ba5abc5b3970c608200802dfd517ca1
162d6573a5a1ae539c266249295bce4b2d323cfb
refs/heads/master
2021-05-15T19:06:32.023706
2017-12-02T08:43:15
2017-12-02T08:43:15
107,754,122
2
0
null
null
null
null
UTF-8
Java
false
false
649
java
package com.smanzana.templateeditor.api.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) /** * Marks the field as a container of a subclass of the current.<br /> * The field must be non-null at time of ObjectLoading.<br /> * As soon as a single @DataLoaderSubclass is hit, no other fields * (including those marked with @DataLoaderData, etc) will be parsed. * @author Skyler * */ public @interface DataLoaderSuperclass { String name() default ""; }
[ "skymanzanares@hotmail.com" ]
skymanzanares@hotmail.com
4bcd38e774a34f66526aa2b6d947c6965a7bb39e
43cad2032582fcda2878a4482563d53df3961669
/src/herencia/EmpleadoTemporal.java
0263be974112df7e0cf61a018105dda132ffc621
[]
no_license
UnitecSPS/Programacion2_1_1_2014
98a328efc29a993ca18e0f5a252a9ad81792e735
e5bfc6a1e22ee0c4a81c72ede68f46ce2ebd3ce8
refs/heads/master
2021-01-19T03:18:30.103683
2014-03-18T15:34:27
2014-03-18T15:34:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
588
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package herencia; import java.util.Calendar; /** * * @author Docente2014 */ public class EmpleadoTemporal extends EmpleadoSalariado { private Calendar fechaFin; public static final int version = 5; public EmpleadoTemporal(int c) { super(c, 5000); //version = 5; } public void test(){ //version = 10; double x=Math.PI; } }
[ "cgotcha@gmail.com" ]
cgotcha@gmail.com
83a4f4830040c81d7a39ad690bdfda8455793e8a
38da28e4e7ad9e4cbbe29802db344a82e0a83e68
/AAD/AAD 2ª Evaluación/Jugadores/src/objetos/Pais.java
0a2e0cc5c0c67769141234e39fe2d7a0738516f5
[]
no_license
LDHugeman/DAM_2
dce491da5d45a3852b7047a4c34caea75dcc7235
b6b0ef528cd33f6aa78afbe974668cd9949b63c9
refs/heads/master
2022-07-08T22:51:38.283590
2020-03-16T20:52:26
2020-03-16T20:52:26
209,628,083
2
0
null
null
null
null
UTF-8
Java
false
false
480
java
package objetos; /** * * @author a18luisdvp */ public class Pais { private int id; private String nombre; public Pais(int id, String nombre) { this.id = id; this.nombre = nombre; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } }
[ "luisdavid.vp@gmail.com" ]
luisdavid.vp@gmail.com
0af6c81abe4915dcde043af24af1f4a582076cb4
2d51794469c8489f4a7e3c2130ff450d3ebe2c54
/ConfigManagerClient/src/main/java/io/swagger/client/Configuration.java
94882ee56a4b8556105c9c3ec9a6bc76057174c6
[]
no_license
nextworks-it/config-manager-client
cca4a1dd754cb93989f86b40637344416ad83bee
5dfbfc8b9098d9a80efe90fc25fd4f447f04d483
refs/heads/master
2023-03-10T11:24:06.482775
2021-02-12T16:45:27
2021-02-12T16:45:27
342,523,612
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
/* * Configuration Manager API * The API of the 5GT Monitoring Configuration Manager. * * OpenAPI spec version: 0.6 * Contact: m.capitani@nextworks.it * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.swagger.client; @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2019-04-19T14:05:07.585+02:00[Europe/Rome]")public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API * instances without providing an API client. * * @return Default API client */ public static ApiClient getDefaultApiClient() { return defaultApiClient; } /** * Set the default API client, which would be used when creating API * instances without providing an API client. * * @param apiClient API client */ public static void setDefaultApiClient(ApiClient apiClient) { defaultApiClient = apiClient; } }
[ "j.brenes@nextworks.it" ]
j.brenes@nextworks.it
4a6f896d608671944b7b884374cbecd2a1572d50
84de785f113a03a5e200218fa41711e67cd61b63
/core/src/main/java/org/fourthline/cling/android/AndroidUpnpService.java
bf52b3332764a40becd21b80a2ec9e2890a8f5ee
[]
no_license
bubbleguuum/cling
3be10c3096334fce691a815c730935e73c654d97
28ee8b0fbbc0b71a73e383af530f6bb168b1f9f7
refs/heads/master
2021-01-18T08:24:29.950159
2013-10-26T13:02:46
2013-10-26T13:02:46
2,954,144
1
0
null
null
null
null
UTF-8
Java
false
false
2,880
java
/* * Copyright (C) 2011 4th Line GmbH, Switzerland * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.fourthline.cling.android; import org.fourthline.cling.UpnpService; import org.fourthline.cling.UpnpServiceConfiguration; import org.fourthline.cling.controlpoint.ControlPoint; import org.fourthline.cling.registry.Registry; /** * Interface of the Android UPnP application service component. * <p> * Usage example in an Android activity: * </p> * <pre>{@code *AndroidUpnpService upnpService; * *ServiceConnection serviceConnection = new ServiceConnection() { * public void onServiceConnected(ComponentName className, IBinder service) { * upnpService = (AndroidUpnpService) service; * } * public void onServiceDisconnected(ComponentName className) { * upnpService = null; * } *}; * *public void onCreate(...) { * ... * getApplicationContext().bindService( * new Intent(this, AndroidUpnpServiceImpl.class), * serviceConnection, * Context.BIND_AUTO_CREATE * ); *}}</pre> *<p> * The default implementation requires permissions in <code>AndroidManifest.xml</code>: * </p> * <pre>{@code *<uses-permission android:name="android.permission.INTERNET"/> *<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> *<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/> *<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> *}</pre> * <p> * You also have to add the application service component: * </p> * <pre>{@code *<application ...> * ... * <service android:name="org.fourthline.cling.android.AndroidUpnpServiceImpl"/> *</application> * }</pre> * * @author Christian Bauer */ public interface AndroidUpnpService { /** * @return The actual main instance and interface of the UPnP service. */ public UpnpService get(); /** * @return The configuration of the UPnP service. */ public UpnpServiceConfiguration getConfiguration(); /** * @return The registry of the UPnP service. */ public Registry getRegistry(); /** * @return The client API of the UPnP service. */ public ControlPoint getControlPoint(); }
[ "cb@4thline.com" ]
cb@4thline.com
9c8601a0592f530ecd3bc4af54c4e5c95d2069fe
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzbrn.java
232079832ba36b8b485711e2e43b7d244b735ed9
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
279
java
package com.google.android.gms.internal.ads; final /* synthetic */ class zzbrn implements zzbtu { private final int zzdyz; zzbrn(int i) { this.zzdyz = i; } public final void zzr(Object obj) { ((zzbro) obj).onAdFailedToLoad(this.zzdyz); } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
3b2269a23239cf563bf6268bf78935159c3f5243
1ad9e2fa88d964c379810ffab75a00ecf95d3d55
/src/main/java/com/peace/ostp/util/MyInterceptor.java
c7c68599b24ff002bf0c254bc5df8bf83b3d5bd4
[]
no_license
GuoGuiRong/ostp
08d8fddf6750806cfb58f2717ac43fd896396d38
669c22bca8a85b71da1f5dcee3c5c78ec88eb5bf
refs/heads/master
2021-05-04T04:54:21.924122
2016-11-20T02:11:15
2016-11-20T02:11:15
74,247,413
1
2
null
null
null
null
UTF-8
Java
false
false
6,334
java
package com.peace.ostp.util; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ibatis.binding.MapperMethod.MapperParamMap; import org.apache.ibatis.executor.parameter.DefaultParameterHandler; import org.apache.ibatis.executor.parameter.ParameterHandler; import org.apache.ibatis.executor.statement.RoutingStatementHandler; import org.apache.ibatis.executor.statement.StatementHandler; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.plugin.Intercepts; import org.apache.ibatis.plugin.Invocation; import org.apache.ibatis.plugin.Plugin; import org.apache.ibatis.plugin.Signature; @Intercepts({ @Signature(method = "prepare", type = StatementHandler.class, args = { Connection.class }) }) /** * @Project: YCIG_EXTRONLINE从业人员考试系统后台管理 * @Title: MyInterceptor * @Description: 拦截器(通过IoC进行实现) * @author: lijz * @date :2016年2月18日 下午7:09:07 * @Copyright: Copyright (c) 2016 * @version V1.0 */ public class MyInterceptor implements Interceptor { private Page<?> page; private static Log log = LogFactory.getLog(MyInterceptor.class); public Object intercept(Invocation invocation) throws Throwable { // TODO Auto-generated method stub try { RoutingStatementHandler handler = (RoutingStatementHandler) invocation.getTarget(); StatementHandler delegate = (StatementHandler) ReflectUtil.getFieldValue(handler, "delegate"); BoundSql boundSql = delegate.getBoundSql(); log.debug("拦截sql=" + boundSql.getSql()); // 获取sql对应的参数 MapperParamMap<?> mapperParamMap = null; try { mapperParamMap = (MapperParamMap<?>) boundSql.getParameterObject(); } catch (Exception ex) { log.error(this.getClass().getName() + "映射发生错误", ex); } if (mapperParamMap == null) { Object result = invocation.proceed(); return result; } if (mapperParamMap.containsKey("page")) { page = (Page<?>) mapperParamMap.get("page"); // System.out.println(page.isGetAllRecord()); // page为空或者page的isGetAllRecord=true则不修改sql,返回所有的数据 if (page == null) { throw new Exception("page为空,拦截器不处理数据"); } else if (!page.isGetAllRecord()) { MappedStatement mappedStatement = (MappedStatement) ReflectUtil.getFieldValue(delegate, "mappedStatement"); Connection connection = (Connection) invocation.getArgs()[0]; String strSql = boundSql.getSql(); this.setTotalRecord(boundSql, mappedStatement, connection); StringBuffer sqlBuffer = new StringBuffer(strSql); String pageSql = this.getMySqlPageSql(page, sqlBuffer); ReflectUtil.setFieldValue(boundSql, "sql", pageSql); log.info("修改后的sql=" + pageSql); } } } catch (Exception e) { if (!e.getMessage().equals("page为空,拦截器不处理数据")) e.printStackTrace(); } Object result = invocation.proceed(); return result; } public Object plugin(Object target) { // TODO Auto-generated method stub return Plugin.wrap(target, this); } public void setProperties(Properties properties) { // TODO Auto-generated method stub /* * String prop1 = properties.getProperty("prop1"); String prop2 = * properties.getProperty("prop2"); System.out.println(prop1 + "------" * + prop2); */ } /** * 更换数据库版本可以通过该方法来处理,这里只处理mysql,该方法暂时不用 * * @return */ public String getPageSql() { return null; } public String getMySqlPageSql(Page<?> page, StringBuffer sqlBuffer) { int offset = (page.getPageNo() - 1) * page.getPageSize(); if (!page.isGetAllRecord()) sqlBuffer.append(" limit ").append(offset).append(",").append(page.getPageSize()); return sqlBuffer.toString(); } public String getCountSql(String sql) { /* * int index = sql.toLowerCase().indexOf("from"); String countSql = * "select count(1) " + sql.substring(index); index = * countSql.toLowerCase().indexOf("order by"); if(index != -1) countSql * = countSql.substring(0, index - 1); index = * countSql.toLowerCase().indexOf("group by"); if(index != -1) countSql * = countSql.substring(0, index - 1); */ String countSql = "select count(1) from (" + sql + ") sb"; return countSql; } public void setTotalRecord(BoundSql boundSql, MappedStatement mappedStatement, Connection connection) { String sql = boundSql.getSql(); String countSql = this.getCountSql(sql); System.out.println(countSql); BoundSql countBoundSql = new BoundSql(mappedStatement.getConfiguration(), countSql, boundSql.getParameterMappings(), boundSql.getParameterObject()); ReflectUtil.setFieldValue(countBoundSql, "sql", sql); ReflectUtil.setFieldValue(countBoundSql, "parameterMappings", boundSql.getParameterMappings()); ReflectUtil.setFieldValue(countBoundSql, "parameterObject", boundSql.getParameterObject()); ReflectUtil.setFieldValue(countBoundSql, "additionalParameters", ReflectUtil.getFieldValue(boundSql, "additionalParameters")); ReflectUtil.setFieldValue(countBoundSql, "metaParameters", ReflectUtil.getFieldValue(boundSql, "metaParameters")); MapperParamMap<?> mapperParamMap = (MapperParamMap<?>) boundSql.getParameterObject(); ParameterHandler parameterHandler = new DefaultParameterHandler(mappedStatement, mapperParamMap, countBoundSql); PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = (PreparedStatement) connection.prepareStatement(countSql); parameterHandler.setParameters(pstmt); rs = pstmt.executeQuery(); if (rs.next()) { int totalRecord = rs.getInt(1); page.setTotalRecord(totalRecord); } } catch (Exception e) { e.printStackTrace(); } finally { } try { if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); } catch (SQLException e) { e.printStackTrace(); } } }
[ "3095764372@qq.com" ]
3095764372@qq.com
6191c887f5ae52e25bbbf2e9e0cd4506eabbfb65
3f60a26c4404a93a27ad969e1cd8a5ede1057951
/linkbinder-web/src/main/java/jp/co/opentone/bsol/linkbinder/view/correspon/strategy/CopyCorresponSetupStrategy.java
72c2361382c5ec39dc3488a5e69b66fc189f2a69
[ "Apache-2.0" ]
permissive
otsecbsol/linkbinder
6c448e43d60daa84461050c8a767d5ae1e86ffed
1e59055771d3c4c45c8e2ff4cda05386bc7b19fc
refs/heads/master
2020-04-06T07:02:58.940469
2016-09-20T08:07:50
2016-09-20T08:07:50
61,767,023
6
1
null
2016-09-20T08:07:51
2016-06-23T02:32:44
Java
UTF-8
Java
false
false
4,816
java
/* * Copyright 2016 OPEN TONE 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 jp.co.opentone.bsol.linkbinder.view.correspon.strategy; import jp.co.opentone.bsol.framework.core.service.ServiceAbortException; import jp.co.opentone.bsol.linkbinder.dto.Correspon; import jp.co.opentone.bsol.linkbinder.dto.UpdateMode; import jp.co.opentone.bsol.linkbinder.dto.code.WorkflowStatus; import jp.co.opentone.bsol.linkbinder.view.correspon.CorresponEditPage; import jp.co.opentone.bsol.linkbinder.view.correspon.util.CorresponEditMode; /** * コレポン文書入力画面に初期表示するコレポン文書オブジェクトを生成する. * 編集モード @{link {@link CorresponEditMode#COPY}に対応する. * @author opentone */ public class CopyCorresponSetupStrategy extends CorresponSetupStrategy { /** * SerialVersionUID. */ private static final long serialVersionUID = -5583414188530769658L; /* (non-Javadoc) * @see jp.co.opentone.bsol.linkbinder.view.correspon.util.setup.CorresponSetup#setup() */ @Override public void setup() throws ServiceAbortException { // コピー元コレポン文書を取得し、条件に利用したIDをクリア Correspon correspon = page.getCorresponService().find(page.getId()); // コピーなので元コレポン文書から不要な情報をクリア clearValues(correspon); // ワークフローステータス初期値設定 correspon.setWorkflowStatus(WorkflowStatus.DRAFT); // 宛先の編集モードを新規登録に設定 UpdateMode.setUpdateMode(correspon.getAddressCorresponGroups(), UpdateMode.NEW); // 添付ファイルの内容をページに反映 applyOriginalAttachmentsToPage(correspon); // 新規登録となるのでIDはクリア correspon.setId(null); page.setId(null); page.setCorrespon(correspon); } private void clearValues(Correspon correspon) { correspon.setCorresponNo(null); correspon.setParentCorresponId(null); correspon.setParentCorresponNo(null); correspon.setPreviousRevCorresponId(null); correspon.setPreviousRevCorresponNo(null); clearRepliedInformationFromAddresses(correspon); clearAttachments(correspon); } private void clearAttachments(Correspon correspon) { if (!page.isAttachment1Transfer()) { correspon.setFile1Id(null); correspon.setFile1FileId(null); correspon.setFile1FileName(null); } if (!page.isAttachment2Transfer()) { correspon.setFile2Id(null); correspon.setFile2FileId(null); correspon.setFile2FileName(null); } if (!page.isAttachment3Transfer()) { correspon.setFile3Id(null); correspon.setFile3FileId(null); correspon.setFile3FileName(null); } if (!page.isAttachment4Transfer()) { correspon.setFile4Id(null); correspon.setFile4FileId(null); correspon.setFile4FileName(null); } if (!page.isAttachment5Transfer()) { correspon.setFile5Id(null); correspon.setFile5FileId(null); correspon.setFile5FileName(null); } } private void applyOriginalAttachmentsToPage(Correspon org) { if (page.isAttachment1Transfer()) { addAttachmentToPage(org, org.getFile1Id(), org.getFile1FileName()); } if (page.isAttachment2Transfer()) { addAttachmentToPage(org, org.getFile2Id(), org.getFile2FileName()); } if (page.isAttachment3Transfer()) { addAttachmentToPage(org, org.getFile3Id(), org.getFile3FileName()); } if (page.isAttachment4Transfer()) { addAttachmentToPage(org, org.getFile4Id(), org.getFile4FileName()); } if (page.isAttachment5Transfer()) { addAttachmentToPage(org, org.getFile5Id(), org.getFile5FileName()); } } /* (non-Javadoc) * @see jp.co.opentone.bsol.linkbinder.view.correspon.util.setup.CorresponSetup#getPageTitle() */ @Override protected String getPageTitle() { return CorresponEditPage.NEW; } }
[ "aoyagi@opentone.co.jp" ]
aoyagi@opentone.co.jp
9156d3a4a140ab3708b63d4af53dcb850f10d06d
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/water/fvec/C0DChunkTest.java
6487cfb64f4bc298e5e2634de0e3ce6f41cef5f0
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,959
java
package water.fvec; import java.util.Arrays; import org.junit.Assert; import org.junit.Test; import water.TestUtil; public class C0DChunkTest extends TestUtil { @Test public void test_inflate_impl() { final int K = 1 << 16; for (Double d : new Double[]{ 3.14159265358, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.MAX_VALUE, Double.NaN }) { NewChunk nc = new NewChunk(null, 0); for (int i = 0; i < K; ++i) nc.addNum(d); Assert.assertEquals(K, nc._len); Assert.assertEquals((Double.isNaN(d) ? 0 : K), nc._sparseLen); Assert.assertEquals(K, nc.sparseLenZero()); Assert.assertEquals((Double.isNaN(d) ? 0 : K), nc.sparseLenNA()); int len = nc.len(); Chunk cc = nc.compress(); Assert.assertEquals(K, cc._len); Assert.assertTrue((cc instanceof C0DChunk)); for (int i = 0; i < K; ++i) Assert.assertEquals(d, cc.atd(i), Math.ulp(d)); for (int i = 0; i < K; ++i) Assert.assertEquals(d, cc.at_abs(i), Math.ulp(d)); double[] sparsevals = new double[cc.sparseLenZero()]; int[] sparseids = new int[cc.sparseLenZero()]; cc.getSparseDoubles(sparsevals, sparseids); for (int i = 0; i < (sparsevals.length); ++i) { if (cc.isNA(sparseids[i])) Assert.assertTrue(Double.isNaN(sparsevals[i])); else Assert.assertTrue(((cc.atd(sparseids[i])) == (sparsevals[i]))); } double[] densevals = new double[cc.len()]; cc.getDoubles(densevals, 0, cc.len()); for (int i = 0; i < (densevals.length); ++i) { if (cc.isNA(i)) Assert.assertTrue(Double.isNaN(densevals[i])); else Assert.assertTrue(((cc.atd(i)) == (densevals[i]))); } nc = cc.extractRows(new NewChunk(null, 0), 0, len); Assert.assertEquals(K, nc._len); Assert.assertEquals((Double.isNaN(d) ? 0 : K), nc._sparseLen); Assert.assertEquals(K, nc.sparseLenZero()); Assert.assertEquals((Double.isNaN(d) ? 0 : K), nc.sparseLenNA()); for (int i = 0; i < K; ++i) Assert.assertEquals(d, nc.atd(i), Math.ulp(d)); for (int i = 0; i < K; ++i) Assert.assertEquals(d, nc.at_abs(i), Math.ulp(d)); Chunk cc2 = nc.compress(); Assert.assertEquals(K, cc2._len); Assert.assertTrue((cc2 instanceof C0DChunk)); for (int i = 0; i < K; ++i) Assert.assertEquals(d, cc2.atd(i), Math.ulp(d)); for (int i = 0; i < K; ++i) Assert.assertEquals(d, cc2.at_abs(i), Math.ulp(d)); Assert.assertTrue(Arrays.equals(cc._mem, cc2._mem)); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
0eedca071f371223128ff2b2a06e2950203a7c52
320b274b772586f458b4143f59d335319133f741
/src/main/java/com/flightreservation/controller/HomeController.java
9b4c47823b2a7511258c49dd8684c871a6a6c44f
[]
no_license
mdmuradhossain/flight-reservation-spring-boot
96bdd35765e3fea18141cbe8f6c5cfd84e852f8c
e1e791bf3f1ff174fe46591de517324cd6ea58e4
refs/heads/master
2022-04-13T03:11:35.913819
2020-03-24T14:13:30
2020-03-24T14:13:30
248,550,234
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.flightreservation.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HomeController { @RequestMapping("/") public String index() { return "index"; } }
[ "=" ]
=
0c9311588066449f8f322aa159589731661eb1c6
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/annimon/stream/doublestreamtests/SingleTest.java
c640fe1ff8f7ecd0c319d23368a163461c785844
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,380
java
package com.annimon.stream.doublestreamtests; import com.annimon.stream.DoubleStream; import com.annimon.stream.Functions; import java.util.NoSuchElementException; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; public final class SingleTest { @Test(expected = NoSuchElementException.class) public void testSingleOnEmptyStream() { DoubleStream.empty().single(); } @Test public void testSingleOnOneElementStream() { Assert.assertThat(DoubleStream.of(42.0).single(), Matchers.is(42.0)); } @Test(expected = IllegalStateException.class) public void testSingleOnMoreElementsStream() { DoubleStream.of(0, 1, 2).single(); } @Test(expected = NoSuchElementException.class) public void testSingleAfterFilteringToEmptyStream() { DoubleStream.of(0, 1, 2).filter(Functions.greaterThan(Math.PI)).single(); } @Test public void testSingleAfterFilteringToOneElementStream() { double result = DoubleStream.of(1.0, 10.12, (-3.01)).filter(Functions.greaterThan(Math.PI)).single(); Assert.assertThat(result, Matchers.is(10.12)); } @Test(expected = IllegalStateException.class) public void testSingleAfterFilteringToMoreElementStream() { DoubleStream.of(1.0, 10.12, (-3.01), 6.45).filter(Functions.greaterThan(Math.PI)).single(); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
b91850466154bd081548e4b1f352c1655a08c3d9
976875c25f26ef3e75c051ee9f94f4e1c69fb57f
/src/io/LockingMappedFiles.java
0a33ce587c99d798314eaa7714eef53505c815db
[]
no_license
NanCarp/think-in-java-4-learning
21c4f14b65c58cd33e81145a12cb11be122919f5
9090a00d10ac3d11ccacee280f2754f6a3b80a9d
refs/heads/master
2021-03-27T20:18:46.516874
2018-08-19T15:35:57
2018-08-19T15:35:57
96,985,603
0
0
null
null
null
null
UTF-8
Java
false
false
1,827
java
package io; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; /** * Created by nanca on 9/27/2017. * Locking portions of a mapped file. * {RunByHand} */ public class LockingMappedFiles { static final int LENGTH = 0x8FFFFF; // 128 MB static FileChannel fc; public static void main(String[] args) throws Exception { fc = new RandomAccessFile("test.dat", "rw").getChannel(); MappedByteBuffer out = fc.map(FileChannel.MapMode.READ_WRITE, 0, LENGTH); for (int i = 0; i < LENGTH; i++) { out.put((byte) 'x'); } new LockAndModify(out, 0, 0 + LENGTH/3); new LockAndModify(out, LENGTH / 2, LENGTH / 2 + LENGTH / 4); } private static class LockAndModify extends Thread { private ByteBuffer buff; private int start, end; LockAndModify(ByteBuffer mbb, int start, int end) { this.start = start; this.end = end;; mbb.limit(end); mbb.position(start); buff = mbb.slice(); start(); } public void run() { try { // Exclusive lock with no overlap: FileLock fl = fc.lock(start, end, false); System.out.println("Locked: " + start + " to " + end); // Perform modification: while (buff.position() < buff.limit() - 1) { buff.put((byte) (buff.get() + 1)); } fl.release(); System.out.println("Released: " + start + " to " + end); } catch (IOException e) { throw new RuntimeException(e); } } } }
[ "nancarpli@163.com" ]
nancarpli@163.com
fdf37ab6aaa47fbb08761fc47946e872fe2ec80f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_82bca80f436d2f00722b40790b07f2382b056975/AboutBox/1_82bca80f436d2f00722b40790b07f2382b056975_AboutBox_t.java
ca1b2151156410797fac9ec31a2c7a5dbf331b73
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,255
java
package org.joshy.html.app.aboutbox; import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.io.*; import java.net.URL; import javax.xml.parsers.*; import org.w3c.dom.*; import org.joshy.html.*; import org.joshy.u; import org.joshy.html.app.browser.*; public class AboutBox extends JDialog implements Runnable { JScrollPane scroll; JButton close_button; boolean go = false; public AboutBox(String text, String url) { super(); u.p("starting the about box"); setTitle(text); HTMLPanel panel = new HTMLPanel(); int w = 400; int h = 500; panel.setPreferredSize(new Dimension(w,h)); scroll = new JScrollPane(panel); scroll.setVerticalScrollBarPolicy(scroll.VERTICAL_SCROLLBAR_ALWAYS); scroll.setHorizontalScrollBarPolicy(scroll.HORIZONTAL_SCROLLBAR_NEVER); scroll.setPreferredSize(new Dimension(w,h)); panel.setViewportComponent(scroll); panel.setJScrollPane(scroll); getContentPane().add(scroll,"Center"); close_button = new JButton("Close"); getContentPane().add(close_button,"South"); close_button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { setVisible(false); go = false; } }); try { loadPage(url,panel); } catch (Exception ex) { u.p(ex); } pack(); setSize(w,h); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screen.width-w)/2,(screen.height-h)/2); } public void loadPage(String url_text, HTMLPanel panel) throws Exception { DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance(); fact.setValidating(true); DocumentBuilder builder = fact.newDocumentBuilder(); //builder.setErrorHandler(root.error_handler); Document doc = null; URL ref = null; if(url_text.startsWith("demo:")) { u.p("starts with demo"); DemoMarker marker = new DemoMarker(); u.p("url text = " + url_text); String short_url = url_text.substring(5); if(!short_url.startsWith("/")) { short_url = "/" + short_url; } u.p("short url = " + short_url); ref = marker.getClass().getResource(short_url); u.p("ref = " + ref); doc = builder.parse(marker.getClass().getResourceAsStream(short_url)); } else if(url_text.startsWith("http")) { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } else { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } u.p("ref = " + ref); u.p("url_text = " + url_text); panel.setDocument(doc,ref); } public void setVisible(boolean vis) { super.setVisible(vis); if(vis == true) { startScrolling(); } } Thread thread; public void startScrolling() { go = true; thread = new Thread(this); thread.start(); } public void run() { while(go) { try { Thread.currentThread().sleep(100); } catch (Exception ex) { u.p(ex); } JScrollBar sb = scroll.getVerticalScrollBar(); sb.setValue(sb.getValue()+1); } } public static void main(String[] args) { JFrame frame = new JFrame("About Box Test"); JButton launch = new JButton("Show About Box"); frame.getContentPane().add(launch); frame.pack(); frame.setVisible(true); launch.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/about/index.xhtml"); ab.setVisible(true); } }); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
94eb067edc19f9f6f62057bbb4add24ddb82cee3
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/AlipayCommerceOperationActivityMerchantModifyModel.java
20db9dcdaa69e7bbc25b77e962b653d83fe0dcab
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
1,183
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 商户签约信息修改 * * @author auto create * @since 1.0, 2022-10-27 17:37:44 */ public class AlipayCommerceOperationActivityMerchantModifyModel extends AlipayObject { private static final long serialVersionUID = 2416812286155939454L; /** * 消费门槛,单位分 */ @ApiField("consumption_threshold") private Long consumptionThreshold; /** * 优惠金额,单位分 */ @ApiField("discount_amount") private Long discountAmount; /** * NORMAL 常规类型,不限制, RESTRICTED 限制报名条件 */ @ApiField("type") private String type; public Long getConsumptionThreshold() { return this.consumptionThreshold; } public void setConsumptionThreshold(Long consumptionThreshold) { this.consumptionThreshold = consumptionThreshold; } public Long getDiscountAmount() { return this.discountAmount; } public void setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } }
[ "auto-publish" ]
auto-publish
d55ab141216867cffb9c3e9bb2d477f27bc7b1c7
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
/maind/src/main/java/com/vvt/capture/email/gmail/b/b.java
5fdac19e26373a64c3e74665c0c0fded9fd2b63e
[]
no_license
EchoAGI/Flexispy.re
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
ba65a5b8b033b92c5867759f2727c5141b7e92fc
refs/heads/master
2023-04-26T02:52:18.732433
2018-07-16T07:46:56
2018-07-16T07:46:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
793
java
package com.vvt.capture.email.gmail.b; import com.vvt.io.g; class b implements g { private Thread b = null; b(a parama) {} public void a(int paramInt) { a.a(this.a); Thread localThread = this.b; if (localThread == null) { boolean bool = a.a(); if (bool) {} localThread = new java/lang/Thread; c localc = new com/vvt/capture/email/gmail/b/c; localc.<init>(this); localThread.<init>(localc); this.b = localThread; localThread = this.b; localThread.start(); } } } /* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/capture/email/gmail/removeFromPath/removeFromPath.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "52388483@qq.com" ]
52388483@qq.com
45e88bfe612aa66da8202ab78530a2999b4c71c0
e9adf9227baee96486bb61bfc78fca99660a6bfc
/cat-home/src/main/java/com/dianping/cat/report/view/DomainNavManager.java
bd67e82d0351e9842fe3d1d10e614720ea4ce2ff
[]
no_license
lietou/insight
b1cacc2902c755982a71ea4659311a75ed4acb86
4757005689201327eed6e5dd62740a88e84658f0
refs/heads/master
2021-01-22T12:17:01.291886
2013-04-20T01:38:29
2013-04-20T01:38:29
8,964,847
1
0
null
null
null
null
UTF-8
Java
false
false
4,032
java
package com.dianping.cat.report.view; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; import org.unidal.dal.jdbc.DalException; import org.unidal.helper.Threads; import org.unidal.helper.Threads.Task; import org.unidal.lookup.annotation.Inject; import com.dainping.cat.consumer.dal.report.Project; import com.dainping.cat.consumer.dal.report.ProjectDao; import com.dainping.cat.consumer.dal.report.ProjectEntity; import com.dianping.cat.Cat; import com.dianping.cat.configuration.ServerConfigManager; import com.dianping.cat.helper.TimeUtil; public class DomainNavManager implements Initializable { @Inject private ProjectDao m_projectDao; @Inject private ServerConfigManager m_serverConfigManager; private static Map<String, Project> m_projects = new HashMap<String, Project>(); public static Project getProjectByName(String domain) { return m_projects.get(domain); } public static Map<String, Project> getProjects() { return m_projects; } public static Map<String, Department> getDepartment(Collection<String> domains) { Map<String, Department> result = new TreeMap<String, Department>(); synchronized (m_projects) { for (String domain : domains) { Project project = m_projects.get(domain); String department = "Default"; String projectLine = "Default"; if (project != null) { department = project.getDepartment(); projectLine = project.getProjectLine(); } Department temp1 = result.get(department); if (temp1 == null) { temp1 = new Department(); result.put(department, temp1); } temp1.findOrCreatProjectLine(projectLine).addDomain(domain); } } return result; } @Override public void initialize() throws InitializationException { if (!m_serverConfigManager.isLocalMode()) { try { DomainReload reload = new DomainReload(); Threads.forGroup("Cat").start(reload); } catch (Exception e) { Cat.logError(e); } } } public void reloadDomainInfo() { synchronized (m_projects) { try { List<Project> projects = m_projectDao.findAll(ProjectEntity.READSET_FULL); if (projects.size() > 0) { m_projects.clear(); for (Project project : projects) { m_projects.put(project.getDomain(), project); } } } catch (DalException e) { Cat.logError(e); } } } public static class Department { private Map<String, ProjectLine> m_projectLines = new HashMap<String, ProjectLine>(); public ProjectLine findOrCreatProjectLine(String projectLine) { if (projectLine == null) { projectLine = "Default"; } ProjectLine line = m_projectLines.get(projectLine); if (line == null) { line = new ProjectLine(); m_projectLines.put(projectLine, line); } return line; } public Map<String, ProjectLine> getProjectLines() { return m_projectLines; } public void setProjectLines(Map<String, ProjectLine> projectLines) { m_projectLines = projectLines; } } public class DomainReload implements Task { @Override public String getName() { return "Domain-Info-Reload"; } @Override public void run() { boolean active = true; while (active) { try { reloadDomainInfo(); } catch (Exception e) { Cat.logError(e); } try { Thread.sleep(3 * TimeUtil.ONE_MINUTE); } catch (InterruptedException e) { active = false; } } } @Override public void shutdown() { } } public static class ProjectLine { private List<String> m_lineDomains = new ArrayList<String>(); public void addDomain(String name) { m_lineDomains.add(name); } public List<String> getLineDomains() { return m_lineDomains; } public void setLineDomains(List<String> lineDomains) { m_lineDomains = lineDomains; } } }
[ "qmwu2000@gmail.com" ]
qmwu2000@gmail.com
eaa290ab753f38a9ddb3b11b7f94ef8d08e6392f
d28cec58c2ea2ad9ec84215b0d67ce25adc6b88a
/dojo-server/src/main/java/org/automation/dojo/web/bugs/BrokenSortingBug.java
08d0c678724d97729df185dd15aa15f223de5d67
[]
no_license
bharath431/automated-dojo
eec3876336ce51018c3c48b3615ae6c3b3f2b0e7
db31feb6092efb7b47e339d540df6d955224991e
refs/heads/master
2023-08-20T10:38:11.082890
2018-12-16T11:06:12
2018-12-16T11:06:12
423,474,560
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
java
package org.automation.dojo.web.bugs; import org.automation.dojo.web.model.Record; import org.automation.dojo.web.servlet.RequestWorker; import java.util.List; import java.util.Random; /** * Поменять местами 2 элемента в списке с разными ценами */ // TODO написать юнит тест public class BrokenSortingBug extends Bug<RequestWorker> { public BrokenSortingBug(int id) { super(id); } @Override public RequestWorker apply(RequestWorker result) { List<Record> records = result.getRecords(); if (records != null && !records.isEmpty() && records.size() > 1) { int i = 0; int j = 0; do { i = new Random().nextInt(records.size()); j = new Random().nextInt(records.size()); } while (i == j); Record record = records.get(i); records.set(i, records.get(j)); records.set(j, record); } return result; } }
[ "apofig@gmail.com" ]
apofig@gmail.com
d96669ab86efab48845706548aa8858457ebf570
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
/AndroidApplications/com.zeptolab.ctr.ads-912244/src/com/brightcove/player/media/VideoListener.java
0eaba6db84ab6db7c3026249c53f4c7c2204f28e
[]
no_license
linux86/AndoirdSecurity
3165de73b37f53070cd6b435e180a2cb58d6f672
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
refs/heads/master
2021-01-11T01:20:58.986651
2016-04-05T17:14:26
2016-04-05T17:14:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
package com.brightcove.player.media; import com.brightcove.player.model.Video; public interface VideoListener extends ErrorListener { void onVideo(Video video); }
[ "jack.luo@mail.utoronto.ca" ]
jack.luo@mail.utoronto.ca
7e53e47492f26caa8fd379ad2b7d91c20a3ae192
d4dbb0571226af5809cc953e73924d505094e211
/Hibernate/TheExam/PhotographyWorkshops/src/main/java/app/domains/dtos/xmls/inputs/ParticipantDto.java
f6a857d25bf9043a73e8769216012ebb89dbd68c
[]
no_license
vasilgramov/database-fundamentals
45e258e965e85514e60b849d9049737ae25e81c0
0ebe74ab4bffef0d29d6ee2e200f07bdc24fe6bf
refs/heads/master
2021-06-18T17:54:36.238976
2017-07-10T14:49:44
2017-07-10T14:49:44
89,739,950
0
1
null
null
null
null
UTF-8
Java
false
false
753
java
package app.domains.dtos.xmls.inputs; import javax.xml.bind.annotation.*; import java.io.Serializable; @XmlRootElement(name = "participant") @XmlAccessorType(XmlAccessType.FIELD) public class ParticipantDto implements Serializable { @XmlAttribute(name = "first-name") private String firstName; @XmlAttribute(name = "last-name") private String lastName; public ParticipantDto() { super(); } public String getFirstName() { return this.firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return this.lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
[ "gramovv@gmail.com" ]
gramovv@gmail.com
f6605a281e33c85bcd5ebe026788a70f9159d367
17f541fcde1a485b9b80065b3a66be0bd3cfce45
/src/main/java/org/jensoft/core/plugin/function/tools/peaktracker/PeakTrackerEvent.java
0ce6c2b2e6212184d5d105de775f9f98e7da88d9
[]
no_license
wyrover/jensoft-core
6a3285346fd7aaa69e7ef4e99266eee581e02db6
87eba8fd035694cebcaeeb8ae2257010c4706296
refs/heads/master
2020-04-11T06:11:22.006038
2017-05-28T22:17:06
2017-05-28T22:17:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
/* * Copyright (c) JenSoft API * This source file is part of JenSoft API, All rights reserved. * JENSOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package org.jensoft.core.plugin.function.tools.peaktracker; import java.util.EventObject; import org.jensoft.core.plugin.function.source.SourceFunction; /** * <code>SerieTrackerEvent<code> * * @author sebastien janaud */ public class PeakTrackerEvent extends EventObject { /** uid */ private static final long serialVersionUID = 1225330748067264039L; /** * Create source peak tracker event for given source * * @param source */ public PeakTrackerEvent(SourceFunction source) { super(source); } /** * return the source function * * @return source function */ public SourceFunction getSourceFunction() { return (SourceFunction) getSource(); } }
[ "matthieu@sd-55273.dedibox.fr" ]
matthieu@sd-55273.dedibox.fr
a25ece8bbc70c87e2deb39062f77015b97461b42
0423951dbd08015871e969565deacf4ef38d5319
/src/main/java/mx/infotec/dads/sekc/config/social/SocialConfiguration.java
5df4b1c5bb74114943f6f97f188c5c77ec8470d7
[ "Apache-2.0" ]
permissive
dads-software-brotherhood/sekc
bbccaf998e8ec9fcab24e62c04f998d667576d3f
96835b107a0ef39f601bc505ef37aa349133e6cb
refs/heads/master
2021-01-19T07:53:08.184892
2017-12-21T18:41:51
2017-12-21T18:41:51
87,583,059
4
0
null
null
null
null
UTF-8
Java
false
false
6,713
java
package mx.infotec.dads.sekc.config.social; import mx.infotec.dads.sekc.repository.SocialUserConnectionRepository; import mx.infotec.dads.sekc.repository.CustomSocialUsersConnectionRepository; import mx.infotec.dads.sekc.security.jwt.TokenProvider; import mx.infotec.dads.sekc.security.social.CustomSignInAdapter; import io.github.jhipster.config.JHipsterProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.social.UserIdSource; import org.springframework.social.config.annotation.ConnectionFactoryConfigurer; import org.springframework.social.config.annotation.EnableSocial; import org.springframework.social.config.annotation.SocialConfigurer; import org.springframework.social.connect.ConnectionFactoryLocator; import org.springframework.social.connect.ConnectionRepository; import org.springframework.social.connect.UsersConnectionRepository; import org.springframework.social.connect.web.ConnectController; import org.springframework.social.connect.web.ProviderSignInController; import org.springframework.social.connect.web.ProviderSignInUtils; import org.springframework.social.connect.web.SignInAdapter; import org.springframework.social.facebook.connect.FacebookConnectionFactory; import org.springframework.social.google.connect.GoogleConnectionFactory; import org.springframework.social.security.AuthenticationNameUserIdSource; import org.springframework.social.twitter.connect.TwitterConnectionFactory; // jhipster-needle-add-social-connection-factory-import-package /** * Basic Spring Social configuration. * * <p>Creates the beans necessary to manage Connections to social services and * link accounts from those services to internal Users.</p> */ @Configuration @EnableSocial public class SocialConfiguration implements SocialConfigurer { private final Logger log = LoggerFactory.getLogger(SocialConfiguration.class); private final SocialUserConnectionRepository socialUserConnectionRepository; private final Environment environment; public SocialConfiguration(SocialUserConnectionRepository socialUserConnectionRepository, Environment environment) { this.socialUserConnectionRepository = socialUserConnectionRepository; this.environment = environment; } @Bean public ConnectController connectController(ConnectionFactoryLocator connectionFactoryLocator, ConnectionRepository connectionRepository) { ConnectController controller = new ConnectController(connectionFactoryLocator, connectionRepository); controller.setApplicationUrl(environment.getProperty("spring.application.url")); return controller; } @Override public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) { // Google configuration String googleClientId = environment.getProperty("spring.social.google.client-id"); String googleClientSecret = environment.getProperty("spring.social.google.client-secret"); if (googleClientId != null && googleClientSecret != null) { log.debug("Configuring GoogleConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new GoogleConnectionFactory( googleClientId, googleClientSecret ) ); } else { log.error("Cannot configure GoogleConnectionFactory id or secret null"); } // Facebook configuration String facebookClientId = environment.getProperty("spring.social.facebook.client-id"); String facebookClientSecret = environment.getProperty("spring.social.facebook.client-secret"); if (facebookClientId != null && facebookClientSecret != null) { log.debug("Configuring FacebookConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new FacebookConnectionFactory( facebookClientId, facebookClientSecret ) ); } else { log.error("Cannot configure FacebookConnectionFactory id or secret null"); } // Twitter configuration String twitterClientId = environment.getProperty("spring.social.twitter.client-id"); String twitterClientSecret = environment.getProperty("spring.social.twitter.client-secret"); if (twitterClientId != null && twitterClientSecret != null) { log.debug("Configuring TwitterConnectionFactory"); connectionFactoryConfigurer.addConnectionFactory( new TwitterConnectionFactory( twitterClientId, twitterClientSecret ) ); } else { log.error("Cannot configure TwitterConnectionFactory id or secret null"); } // jhipster-needle-add-social-connection-factory } @Override public UserIdSource getUserIdSource() { return new AuthenticationNameUserIdSource(); } @Override public UsersConnectionRepository getUsersConnectionRepository(ConnectionFactoryLocator connectionFactoryLocator) { return new CustomSocialUsersConnectionRepository(socialUserConnectionRepository, connectionFactoryLocator); } @Bean public SignInAdapter signInAdapter(UserDetailsService userDetailsService, JHipsterProperties jHipsterProperties, TokenProvider tokenProvider) { return new CustomSignInAdapter(userDetailsService, jHipsterProperties, tokenProvider); } @Bean public ProviderSignInController providerSignInController(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository, SignInAdapter signInAdapter) throws Exception { ProviderSignInController providerSignInController = new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, signInAdapter); providerSignInController.setSignUpUrl("/social/signup"); providerSignInController.setApplicationUrl(environment.getProperty("spring.application.url")); return providerSignInController; } @Bean public ProviderSignInUtils getProviderSignInUtils(ConnectionFactoryLocator connectionFactoryLocator, UsersConnectionRepository usersConnectionRepository) { return new ProviderSignInUtils(connectionFactoryLocator, usersConnectionRepository); } }
[ "daniel.cortes.pichardo@gmail.com" ]
daniel.cortes.pichardo@gmail.com
874e055bdb5caf417951f9d7540b1913d604e6a8
7a7ba2805a15059c30f31e1b352ab6aa30592de7
/awd.cloud.platform/awd.cloud.platform.servers/awd.cloud.platform.servers.manager/src/main/java/awd/mis/servers/service/imp/SimpleUsermenuService.java
b372af729823bc956c81a33fbe61d0641b715acc
[]
no_license
tony-catalina/Peking_cloud2
bc1bf7f377b68ce06c77d2de36554893eaabc697
c47db69483c203f4aefd37a034ada6aeb182c4fd
refs/heads/master
2022-12-13T14:55:37.859352
2020-03-02T08:13:48
2020-03-02T08:13:48
244,308,357
0
1
null
2022-12-06T00:46:17
2020-03-02T07:35:13
JavaScript
UTF-8
Java
false
false
7,515
java
/* * Copyright 2008 [rapid-framework], Inc. All rights reserved. * Website: http://www.rapid-framework.org.cn */ package awd.mis.servers.service.imp; import java.util.*; import awd.framework.common.utils.JSONUtil; import awd.mis.servers.api.MessageService; import org.dromara.raincat.annotation.PropagationEnum; import org.dromara.raincat.annotation.TxTransaction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import awd.framework.common.core.IDGenerator; import awd.framework.common.core.param.TermType; import awd.framework.common.datasource.api.annotation.UseDataSource; import awd.framework.common.entity.Entity; import awd.framework.common.entity.PagerResult; import awd.framework.common.entity.param.QueryParamEntity; import awd.framework.common.service.simple.GenericEntityService; import awd.mis.servers.dao.UsermenuDao; import awd.mis.servers.entity.MenusEntity; import awd.mis.servers.entity.Usermenu; import awd.mis.servers.entity.UsermenuEntity; import awd.mis.servers.service.MenusService; import awd.mis.servers.service.UsermenuService; @Service("usermenuService") public class SimpleUsermenuService extends GenericEntityService<UsermenuEntity, String> implements UsermenuService { @Autowired private UsermenuDao usermenuDao; @Autowired private MenusService menusService; @Autowired private MessageService messageService; @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) protected IDGenerator<String> getIDGenerator(UsermenuEntity entity) { String jsbh=entity.getJsbh(); return () -> { return getSEQUID(jsbh); }; } @Override public UsermenuDao getDao() { return usermenuDao; } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public void allowAll(String userid, String appid) { usermenuDao.allowAll(userid,appid); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public String forbid(String user,String jsbh, Usermenu usermenu) { List<String> users=usermenu.getUserid(); Map<String, String> menus=usermenu.getAppmenu(); for (String id : users) { QueryParamEntity delparam=new QueryParamEntity(); delparam.and("userid", id); usermenuDao.delete(delparam); Set<String> menukeys=menus.keySet(); for (String menu : menukeys) { MenusEntity entity=getMenu(menu); String appcode=entity!=null?entity.getAppcode():""; UsermenuEntity usermenuEntity=new UsermenuEntity(); usermenuEntity.setJsbh(jsbh); usermenuEntity.setAppcode(appcode); usermenuEntity.setMenu(menu); usermenuEntity.setUserid(id); usermenuEntity.setCreator(user); usermenuEntity.setCreatetime(Calendar.getInstance().getTime()); this.insert(usermenuEntity); } } for (String id : users){ this.sendMesage("102","2",id); } return "设置成功!"; } @UseDataSource("read_ds") @Transactional(propagation = Propagation.NOT_SUPPORTED) private MenusEntity getMenu(String menu) { QueryParamEntity param=new QueryParamEntity(); param.and("menu", TermType.eq, menu); MenusEntity enity=menusService.selectSingle(param); return enity; } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public int deleteByPk(String pk) { return super.deleteByPk(pk); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public String getSEQUID(String jsbh) { return super.getSEQUID(jsbh); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public String insert(UsermenuEntity entity) { entity.setCreatetime(Calendar.getInstance().getTime()); return super.insert(entity); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public String saveOrUpdate(UsermenuEntity entity) { return super.saveOrUpdate(entity); } @Override @UseDataSource("read_ds") @Transactional(propagation = Propagation.NOT_SUPPORTED) public List<UsermenuEntity> selectByPk(List<String> id) { return super.selectByPk(id); } @Override @UseDataSource("read_ds") @Transactional(propagation = Propagation.NOT_SUPPORTED) public UsermenuEntity selectByPk(String pk) { return super.selectByPk(pk); } @Override @UseDataSource("read_ds") @Transactional(propagation = Propagation.NOT_SUPPORTED) public PagerResult<UsermenuEntity> selectPager(Entity arg0) { return super.selectPager(arg0); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public int updateByPk(List<UsermenuEntity> data) { return super.updateByPk(data); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) public int updateByPk(String pk, UsermenuEntity entity) { entity.setUpdatetime(Calendar.getInstance().getTime()); return super.updateByPk(pk, entity); } @Override @UseDataSource("write_ds") @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW) @TxTransaction(propagation = PropagationEnum.PROPAGATION_REQUIRES_NEW, transactionManager = "transactionManager", waitMaxTime = 80000) protected int updateByPk(UsermenuEntity entity) { return super.updateByPk(entity); } private void sendMesage(String msgType, String action, String PoliceID){ // 用户信息信息 新增修改删除 发送消息 0:新增 1:删除 2:修改 String msgtype = "JGZHYW_REMIND_01_YH"; System.out.println(PoliceID); Map<String,Object> map = new HashMap<String,Object>(); map.put("UserID", PoliceID); map.put("MsgType", msgType); map.put("Action", action); try { messageService.sendMsgJson(msgtype, JSONUtil.toJson(map)); } catch (Exception e) { e.printStackTrace(); System.err.println("发送消息失败================"); } } }
[ "m13635576437@163.com" ]
m13635576437@163.com
eb0c09834f96bc75f7ac9136b5a56f159c8931ac
edb6910171402be6db714fa7a702aceeb80779bb
/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/event/EntityPersistenceEvent.java
6d1e8eaf1ad98c20b90594f5b8a1b97bbca1e6f8
[ "Apache-2.0" ]
permissive
eid101/InjazErp
2e87b9f0f66fcb5c8b3db251496968f9029c6b7f
6d7c69a9d3a6023e093ab0d7b356983fdee1e4c8
refs/heads/master
2021-05-09T20:04:10.687300
2018-01-24T01:39:46
2018-01-24T01:39:46
118,670,797
0
0
Apache-2.0
2018-08-29T03:51:21
2018-01-23T21:15:39
Java
UTF-8
Java
false
false
4,730
java
/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2011 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ package org.openbravo.client.kernel.event; import org.hibernate.type.Type; import org.openbravo.base.model.Property; import org.openbravo.base.structure.BaseOBObject; /** * The base event object send out to reflect a persistence event on an entity (save, update, delete, * etc.). * * Note: it is possible to directly access/retrieve the object which is being deleted or persisted. * To update the object's state one should NOT call setters directly on that object. Instead use the * {@link #setCurrentState(Property, Object)} method. * * @author mtaal */ public class EntityPersistenceEvent { private BaseOBObject targetInstance; private String id; private Object[] currentState; private String[] propertyNames; private Type[] types; private boolean stateUpdated = false; /** * Get the current value (which will be persisted) for a certain property. */ public Object getCurrentState(Property property) { int index = 0; for (String propName : propertyNames) { if (propName.equals(property.getName())) { return currentState[index]; } index++; } throw new IllegalArgumentException("Property " + property + " not found for entity " + getTargetInstance()); } /** * The current values of the properties of the entity, these values are persisted. Use the * {@link EntityPersistenceEvent#getPropertyNames()} to see which properties are located where in * this array. * * @see #getPropertyNames() */ public Object[] getCurrentState() { return currentState; } void setCurrentState(Object[] currentState) { this.currentState = currentState; } /** * The names of the properties of the entity which are persisted. The array corresponds to the * types and state arrays. * * @see #getTypes() * @see #getCurrentState() */ public String[] getPropertyNames() { return propertyNames; } void setPropertyNames(String[] propertyNames) { this.propertyNames = propertyNames; } /** * @return the target instance of the event, note that depending on the event it it not correct to * directly update the instance, use the api's offered by the specific subclass of the * EntityPersistenceEvent class. */ public BaseOBObject getTargetInstance() { return targetInstance; } void setTargetInstance(BaseOBObject targetInstance) { this.targetInstance = targetInstance; } /** * Change the value/state of a property. The change will also be passed on to the entity and to * the database (in case of update and save events). * * @param property * the property to change * @param value * its new value */ public void setCurrentState(Property property, Object value) { int index = 0; for (String propName : propertyNames) { if (propName.equals(property.getName())) { currentState[index] = value; stateUpdated = true; return; } index++; } throw new IllegalArgumentException("Property " + property + " not found for entity " + getTargetInstance()); } /** * @return true if the state of the entity was updated/changed, false otherwise. */ public boolean isStateUpdated() { return stateUpdated; } /** * The id of the entity being persisted, can be null for new entities. */ public String getId() { return id; } void setId(String id) { this.id = id; } /** * The type definition of the properties of the entity to be persisted. * * @see #getPropertyNames() */ public Type[] getTypes() { return types; } void setTypes(Type[] types) { this.types = types; } }
[ "eid.almutari@gmail.com" ]
eid.almutari@gmail.com
f1522a844105dca86738a9c64baa5969605fece0
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/model/control/employee/common/exception/InvalidLeaveStatusException.java
81b3f69ba7f644ce01ccfc63dfe119c4686c20a3
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,572
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.model.control.employee.common.exception; import com.echothree.util.common.message.Message; public class InvalidLeaveStatusException extends BaseEmployeeException { /** Creates a new instance of InvalidLeaveStatusException */ public InvalidLeaveStatusException() { super(); } /** Creates a new instance of InvalidLeaveStatusException */ public InvalidLeaveStatusException(String message) { super(message); } /** Creates a new instance of InvalidLeaveStatusException */ public InvalidLeaveStatusException(Throwable cause) { super(cause); } /** Creates a new instance of InvalidLeaveStatusException */ public InvalidLeaveStatusException(Message message) { super(message); } }
[ "rich@echothree.com" ]
rich@echothree.com
4da64e5c6532d2192658ec0c39f5a1dc75a1085c
a148c0d16e1cc6d0088dcd9d58716abb308bb94e
/ics-4.x/external/apache-http/src/org/apache/http/impl/client/BasicCookieStore.java
0b226794efa3bb6679845f75f55a706dc64e9388
[ "Apache-2.0" ]
permissive
BAT6188/mt36k_android_4.0.4
5f457b2c76c4d28d72b1002ba542371365d2b8b6
3240564345913f02813e497672c9594af6563608
refs/heads/master
2023-05-24T04:13:23.011226
2018-09-04T06:35:16
2018-09-04T06:35:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,301
java
/* * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/BasicCookieStore.java $ * $Revision: #1 $ * $Date: 2013/03/07 $ * * ==================================================================== * * 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.impl.client; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.Iterator; import java.util.List; import org.apache.http.client.CookieStore; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieIdentityComparator; /** * Default implementation of {@link CookieStore} * * @author <a href="mailto:remm@apache.org">Remy Maucherat</a> * @author Rodney Waldhoff * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author Sean C. Sullivan * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:adrian@intencha.com">Adrian Sutton</a> * * @since 4.0 */ public class BasicCookieStore implements CookieStore { private final ArrayList<Cookie> cookies; private final Comparator<Cookie> cookieComparator; // -------------------------------------------------------- Class Variables /** * Default constructor. */ public BasicCookieStore() { super(); this.cookies = new ArrayList<Cookie>(); this.cookieComparator = new CookieIdentityComparator(); } /** * Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent cookies. * If the given cookie has already expired it will not be added, but existing * values will still be removed. * * @param cookie the {@link Cookie cookie} to be added * * @see #addCookies(Cookie[]) * */ public synchronized void addCookie(Cookie cookie) { if (cookie != null) { // first remove any old cookie that is equivalent for (Iterator<Cookie> it = cookies.iterator(); it.hasNext();) { if (cookieComparator.compare(cookie, it.next()) == 0) { it.remove(); break; } } if (!cookie.isExpired(new Date())) { cookies.add(cookie); } } } /** * Adds an array of {@link Cookie HTTP cookies}. Cookies are added individually and * in the given array order. If any of the given cookies has already expired it will * not be added, but existing values will still be removed. * * @param cookies the {@link Cookie cookies} to be added * * @see #addCookie(Cookie) * */ public synchronized void addCookies(Cookie[] cookies) { if (cookies != null) { for (Cookie cooky : cookies) { this.addCookie(cooky); } } } /** * Returns an immutable array of {@link Cookie cookies} that this HTTP * state currently contains. * * @return an array of {@link Cookie cookies}. */ public synchronized List<Cookie> getCookies() { return Collections.unmodifiableList(this.cookies); } /** * Removes all of {@link Cookie cookies} in this HTTP state * that have expired by the specified {@link java.util.Date date}. * * @return true if any cookies were purged. * * @see Cookie#isExpired(Date) */ public synchronized boolean clearExpired(final Date date) { if (date == null) { return false; } boolean removed = false; for (Iterator<Cookie> it = cookies.iterator(); it.hasNext();) { if (it.next().isExpired(date)) { it.remove(); removed = true; } } return removed; } @Override public String toString() { return cookies.toString(); } /** * Clears all cookies. */ public synchronized void clear() { cookies.clear(); } }
[ "342981011@qq.com" ]
342981011@qq.com
1baae863c0d251d2e2e326ac272d23184e1f7628
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project24/src/test/java/org/gradle/test/performance24_4/Test24_372.java
850987443edac87c15e81e9561ae760baeacc2fd
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance24_4; import static org.junit.Assert.*; public class Test24_372 { private final Production24_372 production = new Production24_372("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ebcda746461c4548ecc4b6db52333d85924ca6cb
44265bdcdf5d5d0a549694026f2d24830c25e001
/src/main/java/org/codelibs/fess/es/config/cbean/ca/WebConfigToRoleCA.java
c19474f5c0a8732f15f4d1910bab7e3013963161
[ "MIT", "Apache-2.0" ]
permissive
jmike72/fess
e9e68d7a233d554f914a4176a10da091df1c5d41
0185e7b203c723c5e224b885ebdb062b58c54712
refs/heads/master
2021-06-27T01:46:43.325802
2017-09-15T21:35:04
2017-09-15T21:35:04
103,724,189
1
0
null
2017-09-16T04:19:48
2017-09-16T04:19:48
null
UTF-8
Java
false
false
843
java
/* * Copyright 2012-2017 CodeLibs Project and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.fess.es.config.cbean.ca; import org.codelibs.fess.es.config.cbean.ca.bs.BsWebConfigToRoleCA; /** * @author ESFlute (using FreeGen) */ public class WebConfigToRoleCA extends BsWebConfigToRoleCA { }
[ "shinsuke@yahoo.co.jp" ]
shinsuke@yahoo.co.jp
23e8a90642fe6c256a90a69cd8efa0d9685ef611
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/realm--realm-java/48197be15f754cefa55eefb8794f01f202d58fa0/after/FilterableMediator.java
314db14cb4eb83445711f9cf263f77d2a610a5b2
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,928
java
/* * Copyright 2015 Realm 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 io.realm.internal.modules; import android.util.JsonReader; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import io.realm.Realm; import io.realm.RealmModel; import io.realm.internal.ColumnInfo; import io.realm.internal.RealmObjectProxy; import io.realm.internal.RealmProxyMediator; import io.realm.internal.Row; import io.realm.internal.SharedRealm; import io.realm.internal.Table; import io.realm.internal.Util; /** * Specialized version of a {@link RealmProxyMediator} that can further filter the available classes based on provided * filter. */ public class FilterableMediator extends RealmProxyMediator { private final RealmProxyMediator originalMediator; private final Set<Class<? extends RealmModel>> allowedClasses; /** * Creates a filterable {@link RealmProxyMediator}. * * @param originalMediator the original auto generated mediator. * @param allowedClasses the subset of classes from original mediator to allow. */ public FilterableMediator(RealmProxyMediator originalMediator, Collection<Class<? extends RealmModel>> allowedClasses) { this.originalMediator = originalMediator; Set<Class<? extends RealmModel>> tempAllowedClasses = new HashSet<Class<? extends RealmModel>>(); if (originalMediator != null) { Set<Class<? extends RealmModel>> originalClasses = originalMediator.getModelClasses(); for (Class<? extends RealmModel> clazz : allowedClasses) { if (originalClasses.contains(clazz)) { tempAllowedClasses.add(clazz); } } } this.allowedClasses = Collections.unmodifiableSet(tempAllowedClasses); } public RealmProxyMediator getOriginalMediator() { return originalMediator; } @Override public Table createTable(Class<? extends RealmModel> clazz, SharedRealm sharedRealm) { checkSchemaHasClass(clazz); return originalMediator.createTable(clazz, sharedRealm); } @Override public ColumnInfo validateTable(Class<? extends RealmModel> clazz, SharedRealm sharedRealm, boolean allowExtraColumns) { checkSchemaHasClass(clazz); return originalMediator.validateTable(clazz, sharedRealm, allowExtraColumns); } @Override public List<String> getFieldNames(Class<? extends RealmModel> clazz) { checkSchemaHasClass(clazz); return originalMediator.getFieldNames(clazz); } @Override public String getTableName(Class<? extends RealmModel> clazz) { checkSchemaHasClass(clazz); return originalMediator.getTableName(clazz); } @Override public <E extends RealmModel> E newInstance(Class<E> clazz, Object baseRealm, Row row, ColumnInfo columnInfo, boolean acceptDefaultValue, List<String> excludeFields) { checkSchemaHasClass(clazz); return originalMediator.newInstance(clazz, baseRealm, row, columnInfo, acceptDefaultValue, excludeFields); } @Override public Set<Class<? extends RealmModel>> getModelClasses() { return allowedClasses; } @Override public <E extends RealmModel> E copyOrUpdate(Realm realm, E object, boolean update, Map<RealmModel, RealmObjectProxy> cache) { checkSchemaHasClass(Util.getOriginalModelClass(object.getClass())); return originalMediator.copyOrUpdate(realm, object, update, cache); } @Override public void insert(Realm realm, RealmModel object, Map<RealmModel, Long> cache) { checkSchemaHasClass(Util.getOriginalModelClass(object.getClass())); originalMediator.insert(realm, object, cache); } @Override public void insert(Realm realm, Collection<? extends RealmModel> objects) { checkSchemaHasClass(Util.getOriginalModelClass(objects.iterator().next().getClass())); originalMediator.insert(realm, objects); } @Override public void insertOrUpdate(Realm realm, RealmModel object, Map<RealmModel, Long> cache) { checkSchemaHasClass(Util.getOriginalModelClass(object.getClass())); originalMediator.insertOrUpdate(realm, object, cache); } @Override public void insertOrUpdate(Realm realm, Collection<? extends RealmModel> objects) { checkSchemaHasClass(Util.getOriginalModelClass(objects.iterator().next().getClass())); originalMediator.insertOrUpdate(realm, objects); } @Override public <E extends RealmModel> E createOrUpdateUsingJsonObject(Class<E> clazz, Realm realm, JSONObject json, boolean update) throws JSONException { checkSchemaHasClass(clazz); return originalMediator.createOrUpdateUsingJsonObject(clazz, realm, json, update); } @Override public <E extends RealmModel> E createUsingJsonStream(Class<E> clazz, Realm realm, JsonReader reader) throws IOException { checkSchemaHasClass(clazz); return originalMediator.createUsingJsonStream(clazz, realm, reader); } @Override public <E extends RealmModel> E createDetachedCopy(E realmObject, int maxDepth, Map<RealmModel, RealmObjectProxy.CacheData<RealmModel>> cache) { checkSchemaHasClass(Util.getOriginalModelClass(realmObject.getClass())); return originalMediator.createDetachedCopy(realmObject, maxDepth, cache); } @Override public boolean transformerApplied() { //noinspection SimplifiableIfStatement if (originalMediator == null) { return true; } return originalMediator.transformerApplied(); } // Validate if a model class (not RealmProxy) is part of this Schema. private void checkSchemaHasClass(Class<? extends RealmModel> clazz) { if (!allowedClasses.contains(clazz)) { throw new IllegalArgumentException(clazz.getSimpleName() + " is not part of the schema for this Realm"); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
b898f4cc0efa7a9cc3bc3ba7d4962491478ffafa
92a46a70210e8d821380e4598f78b6c454fc2777
/skadmin-admin/skadmin-admin-interface/src/main/java/com/dxj/admin/mapper/RoleSmallMapper.java
24852517ca56aa4435a4dd22d40b48531eb11b2d
[ "Apache-2.0" ]
permissive
LauRocky/skadmin
d87c74a35bf2f3da67261b78fcc7cf14381bc3de
b7a62532a5a86f3b9e3a862469b43a9165185d81
refs/heads/master
2020-12-02T12:26:49.313005
2019-12-19T01:01:31
2019-12-19T01:01:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package com.dxj.admin.mapper; import com.dxj.admin.entity.Role; import com.dxj.admin.entity.dto.RoleSmallDTO; import com.dxj.common.mapper.EntityMapper; import org.mapstruct.Mapper; import org.mapstruct.ReportingPolicy; import org.springframework.stereotype.Service; /** * @Author: dxj * @Date: 2019-05-27 11:21 */ @Service @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) public interface RoleSmallMapper extends EntityMapper<RoleSmallDTO, Role> { }
[ "dengsinkiang@gmail.com" ]
dengsinkiang@gmail.com
68a3f96a7e7512e6480f9539938da2715d7676a3
dbc6ff39c4777a6afe65086e501979136c75a9ac
/app/src/main/java/net/doyouhike/app/bbs/biz/openapi/presenter/page/user/PageCollect.java
6b3c4fc31c2a8b82545d9f181dcfdf52317cbbc7
[]
no_license
dongodngtang/jianghu_android
9aef38bf2272b9ef500a1f87e3fa902f16b065e0
484d4f6e58adec61dd4e602e511b5c3ef86f5575
refs/heads/master
2021-05-10T07:50:45.068221
2018-01-25T04:09:51
2018-01-25T04:09:51
118,858,323
0
1
null
null
null
null
UTF-8
Java
false
false
5,894
java
package net.doyouhike.app.bbs.biz.openapi.presenter.page.user; import android.content.Context; import net.doyouhike.app.bbs.biz.newnetwork.dao.base.IOnResponseListener; import net.doyouhike.app.bbs.biz.newnetwork.model.base.Response; import net.doyouhike.app.bbs.biz.openapi.presenter.UsersHelper; import net.doyouhike.app.bbs.biz.openapi.presenter.page.base.PageBase; import net.doyouhike.app.bbs.biz.openapi.request.nodes.timelines.UserFavoritesTimelineGet; import net.doyouhike.app.bbs.biz.openapi.response.nodes.NodeTimeline; import net.doyouhike.app.bbs.biz.openapi.response.users.UserNodeStateResp; import net.doyouhike.app.bbs.ui.adapter.me.UserLiveAdapter; import net.doyouhike.app.bbs.util.StringUtil; import java.util.ArrayList; import java.util.List; import rx.Observable; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.functions.Func1; import rx.schedulers.Schedulers; /** * 功能: * 作者:曾江 * 日期:16-1-12. */ public class PageCollect extends PageBase<NodeTimeline.ItemsBean> { private Context mContext; public PageCollect(Context context, String user_id) { items = new ArrayList<>(); adapter = new UserLiveAdapter(context, items); mRequest = new UserFavoritesTimelineGet(user_id); mContext = context; } @Override public void updateItem(final List<NodeTimeline.ItemsBean> items, boolean isRefresh) { super.updateItem(items, isRefresh); Observable.create(new Observable.OnSubscribe<List<String>>() { @Override public void call(Subscriber<? super List<String>> subscriber) { List<String> nodes = new ArrayList<>(); for (NodeTimeline.ItemsBean bean : items) { if (bean.getNode() != null && StringUtil.isNotEmpty(bean.getNode().getNode_id())) { if (bean.getNode().getForward() != null && bean.getNode().getForward().getNode() != null && StringUtil.isNotEmpty(bean.getNode().getForward().getNode().getNode_id())) { nodes.add(bean.getNode().getForward().getNode().getNode_id()); } else { nodes.add(bean.getNode().getNode_id()); } } } subscriber.onNext(nodes); subscriber.onCompleted(); } }).subscribeOn(Schedulers.newThread()) .observeOn(Schedulers.newThread()) .subscribe(new Action1<List<String>>() { @Override public void call(List<String> nodes) { UsersHelper.getSingleTon().getNodeStates(mContext, nodes, nodeStateListener); } }); } IOnResponseListener<Response<UserNodeStateResp>> nodeStateListener = new IOnResponseListener<Response<UserNodeStateResp>>() { @Override public void onSuccess(Response<UserNodeStateResp> response) { Observable.from(response.getData().getItems()) .subscribeOn(Schedulers.newThread()) .map(new Func1<UserNodeStateResp.ItemsBean, List<NodeTimeline.ItemsBean>>() { @Override public List<NodeTimeline.ItemsBean> call(UserNodeStateResp.ItemsBean nodeState) { for (NodeTimeline.ItemsBean node : getItems()) { if (node.getNode().getForward() != null && node.getNode().getForward().getNode() != null && StringUtil.isNotEmpty(node.getNode().getForward().getNode().getNode_id())) { if (nodeState.getNode_id().equals(node.getNode().getForward().getNode().getNode_id())) { setNodeCounter(nodeState, node); } } else if (nodeState.getNode_id().equals(node.getNode().getNode_id())) { setNodeCounter(nodeState, node); } } return getItems(); } private void setNodeCounter(UserNodeStateResp.ItemsBean nodeState, NodeTimeline.ItemsBean node) { node.getNode_counter().setLiked(nodeState.isLiked()); node.getNode_counter().setFavorited(nodeState.isFavorited()); node.getNode_counter().setSocial(nodeState.getSocial()); } }) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<List<NodeTimeline.ItemsBean>>() { @Override public void call(List<NodeTimeline.ItemsBean> itemsBeen) { adapter.notifyDataSetChanged(); } }); } @Override public void onError(Response response) { } }; @Override public String[] getEmptyTip() { return new String[]{"", "暂无收藏"}; } @Override public UserFavoritesTimelineGet getRequestParam() { if (getItems().size() > 0 && getItems().get(getItems().size() - 1).getNode() != null && getItems().get(getItems().size() - 1).getNode().getNode_id() != null) { String lastId = getItems().get(getItems().size() - 1).getNode().getNode_id(); mRequest.setLast_id(lastId); } return (UserFavoritesTimelineGet) mRequest; } @Override public UserLiveAdapter getAdapter() { return (UserLiveAdapter) super.getAdapter(); } }
[ "2270333671@qq.com" ]
2270333671@qq.com
f91b4b57c3d03e116f728ca3612f40b11de29ceb
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.3-rc1/mule/src/java/org/mule/impl/container/JndiContextHelper.java
32a745725229884ec5ba60a1e20c53fcf244c6a6
[ "LicenseRef-scancode-symphonysoft", "LicenseRef-scancode-unknown-license-reference" ]
permissive
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,509
java
/* * $Header$ * $Revision$ * $Date$ * ------------------------------------------------------------------------------------------------------ * * Copyright (c) SymphonySoft Limited. All rights reserved. * http://www.symphonysoft.com * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * */ package org.mule.impl.container; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import java.util.Map; import java.util.Hashtable; /** * Common code for initialising the JNDI context. * * @author <a href="mailto:aperepel@itci.com">Andrew Perepelytsya</a> */ public class JndiContextHelper { /** * Create a new initial context. * * @param environment JNDI properties or <code>null</code>. * In the latter case a default constructor of * <code>InitialContext</code> will be called with * standard JNDI lookup properties semantics. * @return jndi context * @throws NamingException if there was a JNDI error */ public static Context initialise(final Map environment) throws NamingException { Context context; if (environment != null && environment.size() > 0) { context = new InitialContext(new Hashtable(environment)); } else { context = new InitialContext(); } return context; } }
[ "(no author)@bf997673-6b11-0410-b953-e057580c5b09" ]
(no author)@bf997673-6b11-0410-b953-e057580c5b09
82eb6956845eb79da76ca7071c8dad680caf377a
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/RT_News_com.rt.mobile.english/javafiles/com/google/android/exoplayer2/upstream/BandwidthMeter$EventListener.java
420d2e7979859abce954caafa34a11018efaabc0
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
432
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.google.android.exoplayer2.upstream; // Referenced classes of package com.google.android.exoplayer2.upstream: // BandwidthMeter public static interface BandwidthMeter$EventListener { public abstract void onBandwidthSample(int i, long l, long l1); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
14d4666bc6383e5f866e561f4c8cfa8c0b233712
af6251ee729995455081c4f4e48668c56007e1ac
/gateway/src/main/java/mmp/gps/gateway/codec/phoenix/Handler/LocationInformationReportHandler.java
044437c6bde2c62b9de9d094935083ecb4d7da5d
[]
no_license
LXKing/monitor
b7522d5b95d2cca7e37a8bfc66dc7ba389e926ef
7d1eca454ce9a93fc47c68f311eca4dcd6f82603
refs/heads/master
2020-12-01T08:08:53.265259
2018-12-24T12:43:32
2018-12-24T12:43:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,655
java
package mmp.gps.gateway.codec.phoenix.Handler; import mmp.gps.gateway.contract.ICommandHandler; import mmp.gps.gateway.domain.DataSender; import mmp.gps.common.util.ExcepPrinter; import mmp.gps.protocol.jtt808.JTT808Packet; import mmp.gps.protocol.jtt808.JTT808Util; import mmp.gps.protocol.jtt808.body.GpsTime; import mmp.gps.protocol.jtt808.body.LocationInformationAddonInfo; import mmp.gps.protocol.jtt808.body.LocationInformationBaseInfo; import mmp.gps.protocol.jtt808.body.LocationInformationReportBody; import mmp.gps.protocol.jtt808.body.RawBody; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.log4j.Logger; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; public class LocationInformationReportHandler implements ICommandHandler { private static Logger cmdLog = Logger.getLogger("cmd"); public Object getName() { return Integer.valueOf(512); } public void process(IoSession session, Object raw, byte[] data) { try { JTT808Packet e = (JTT808Packet) raw; RawBody rawBody = (RawBody) e.getBody(); JTT808Packet packet = new JTT808Packet(new LocationInformationReportBody()); packet.from(data); LocationInformationReportBody body8 = (LocationInformationReportBody) packet.getBody(); LocationInformationBaseInfo locationBody = body8.getBaseInfo(); LocationInformationAddonInfo addonInfo = body8.getAddonInfo(); cmdLog.debug("位置信息 :" + IoBuffer.wrap(data).getHexDump() + " --->" + locationBody + "m:" + addonInfo.getMileage()); LocationInformationBaseInfo body = new LocationInformationBaseInfo(); body.setLat(locationBody.getLat()); body.setLng(locationBody.getLng()); body.setSpeed(locationBody.getSpeed() * 10); body.setAngle(locationBody.getAngle()); SimpleDateFormat sdformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); GpsTime gpsTime = GpsTime.parse(sdformat.format(new Date())); body.setGpstime(gpsTime); body.setAlarms(locationBody.getAlarms()); body.setAltitude(locationBody.getAltitude()); body.setStatus(locationBody.getStatus()); LocationInformationReportBody locationInformationReportBody = new LocationInformationReportBody(); locationInformationReportBody.setBaseInfo(body); LocationInformationAddonInfo locationInformationAddonInfo = new LocationInformationAddonInfo(); locationInformationAddonInfo.setMileage(addonInfo.getMileage()); locationInformationReportBody.setAddonInfo(locationInformationAddonInfo); JTT808Packet reply = new JTT808Packet(locationInformationReportBody); reply.setBody(locationInformationReportBody); reply.setCommand(512); reply.setSerialNumber(JTT808Util.getSerialNumber()); reply.setNumber(e.getNumber()); reply.setPaging(false); reply.setEncrypting(false); byte[] datamsg = reply.array(); DataSender.getCurrent().send(e.getNumber(), 1, "", "", datamsg); } catch (Exception var17) { ExcepPrinter.print(var17); } } public static void main(String[] args) { SimpleDateFormat sdformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); GpsTime gpsTime = GpsTime.parse(sdformat.format(new Date())); System.out.println(gpsTime); GpsTime gpsTime2 = GpsTime.parse("2014-4-2 9:2:11"); System.out.println(gpsTime2); } }
[ "heavenlystate@163.com" ]
heavenlystate@163.com
2701c87f176dab10d88e2b04515700763464ddd3
2650d565255cf7f5c0192599cb69650aba91fdb8
/java/src/main/java/com/ciaoshen/leetcode/myUtils/UndirectedGraphNode.java
8dabae7e62ad050a94c9c3241a26f8bd907d341f
[ "MIT" ]
permissive
helloShen/leetcode
78ded31b16cfc0ca4d0618d90bb0ef3a8b10377a
5bba26f0612d785800c990947db8dae3af4bad81
refs/heads/master
2021-06-03T14:44:57.256143
2019-04-06T19:06:15
2019-04-06T19:06:15
96,709,063
1
0
null
null
null
null
UTF-8
Java
false
false
3,662
java
/** * ########################################################## * Deprecated * please use new util package: com.ciaoshen.leetcode.util * ########################################################## * * Leetcode - Basic Data Structure - Undirected Graph Node */ package com.ciaoshen.leetcode.myUtils; import java.util.*; public class UndirectedGraphNode { public int label; public List<UndirectedGraphNode> neighbors; public UndirectedGraphNode(int x) { label = x; neighbors = new ArrayList<UndirectedGraphNode>(); } // 相等的条件是:两个节点的label相等,并且有完全相同的一组neighbors(==)。 public boolean equals(Object o) { if (o == null || !(o instanceof UndirectedGraphNode)) { return false; } UndirectedGraphNode another = (UndirectedGraphNode)o; if (label != another.label) { return false; } if (neighbors.size() != another.neighbors.size()) { return false; } outFor: for (int i = 0; i < neighbors.size(); i++) { UndirectedGraphNode node = neighbors.get(i); inFor: for (int j = 0; j < another.neighbors.size(); j++) { if (another.neighbors.get(j) == node) { continue outFor; } } return false; // 有一个neighbor匹配不上,就不相等。 } return true; } // 用自身的label和所有neighbors的label计算散列值。 public int hashCode() { int hash = 17 * 31 + label; for (UndirectedGraphNode node : neighbors) { hash = hash * 31 + node.label; } return hash; } public String toString() { return dfs(this,new ArrayList<UndirectedGraphNode>()); } private String dfs(UndirectedGraphNode node, List<UndirectedGraphNode> memo) { String res = ""; if (memo.contains(node)) { return res; } res = res + "#" + node.label; memo.add(node); for (UndirectedGraphNode nbs : node.neighbors) { res = res + "," + nbs.label; } for (UndirectedGraphNode nbs : node.neighbors) { res = res + dfs(nbs,memo); } return res; } /** * 测试区 */ private static void testEquals() { UndirectedGraphNode firstOne = new UndirectedGraphNode(1); UndirectedGraphNode secondOne = new UndirectedGraphNode(1); UndirectedGraphNode firstTwo = new UndirectedGraphNode(2); UndirectedGraphNode secondTwo = new UndirectedGraphNode(2); UndirectedGraphNode origin = new UndirectedGraphNode(3); UndirectedGraphNode right = new UndirectedGraphNode(3); UndirectedGraphNode wrong = new UndirectedGraphNode(3); origin.neighbors.add(firstOne); origin.neighbors.add(firstTwo); right.neighbors.add(firstTwo); right.neighbors.add(firstOne); wrong.neighbors.add(secondOne); wrong.neighbors.add(secondTwo); System.out.println("origin equals right?" + origin.equals(right)); System.out.println("origin equals wrong?" + origin.equals(wrong)); } private static void testToString() { UndirectedGraphNode one = new UndirectedGraphNode(1); UndirectedGraphNode two = new UndirectedGraphNode(2); UndirectedGraphNode three = new UndirectedGraphNode(3); UndirectedGraphNode four = new UndirectedGraphNode(4); one.neighbors.add(two); one.neighbors.add(three); two.neighbors.add(four); four.neighbors.add(two); System.out.println(one); } public static void main(String[] args) { //testEquals(); testToString(); } };
[ "symantec__@hotmail.com" ]
symantec__@hotmail.com
284da9b86be976b5a724367f492514554b98dd86
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project11/src/test/java/org/gradle/test/performance11_3/Test11_234.java
1bd897b73a1870cd2370bc5ec6530819264c37a7
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance11_3; import static org.junit.Assert.*; public class Test11_234 { private final Production11_234 production = new Production11_234("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f4ebd0b571763432de3cfafc3227e77fec11661f
eb31160e5915c422860267acbd1dcb3c3743c09c
/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Tables.java
b9d0f1e1d8255528d5fcd7c2b131486795462751
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
digulla/jOOQ
b75b43c2e15b4e46d3412aca9d08d65c240c94f3
6c3334d5b73749a2045ae038e71a0003ba5f6139
refs/heads/master
2022-06-20T17:34:48.041188
2022-06-04T21:52:39
2022-06-04T21:52:39
4,752,073
0
0
NOASSERTION
2022-06-04T21:52:40
2012-06-22T14:36:17
Java
UTF-8
Java
false
false
4,178
java
/** * This class is generated by jOOQ */ package org.jooq.test.ingres.generatedclasses; /** * This class is generated by jOOQ. * * Convenience access to all tables in test */ public final class Tables { /** * The table test.t_639_numbers_table */ public static org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; /** * The table test.t_658_ref */ public static org.jooq.test.ingres.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.ingres.generatedclasses.tables.T_658Ref.T_658_REF; /** * The table test.t_725_lob_test */ public static org.jooq.test.ingres.generatedclasses.tables.T_725LobTest T_725_LOB_TEST = org.jooq.test.ingres.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST; /** * The table test.t_785 */ public static org.jooq.test.ingres.generatedclasses.tables.T_785 T_785 = org.jooq.test.ingres.generatedclasses.tables.T_785.T_785; /** * An entity holding authors of books */ public static org.jooq.test.ingres.generatedclasses.tables.TAuthor T_AUTHOR = org.jooq.test.ingres.generatedclasses.tables.TAuthor.T_AUTHOR; /** * An entity holding books */ public static org.jooq.test.ingres.generatedclasses.tables.TBook T_BOOK = org.jooq.test.ingres.generatedclasses.tables.TBook.T_BOOK; /** * A book store */ public static org.jooq.test.ingres.generatedclasses.tables.TBookStore T_BOOK_STORE = org.jooq.test.ingres.generatedclasses.tables.TBookStore.T_BOOK_STORE; /** * An m:n relation between books and book stores */ public static org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore T_BOOK_TO_BOOK_STORE = org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE; /** * The table test.t_booleans */ public static org.jooq.test.ingres.generatedclasses.tables.TBooleans T_BOOLEANS = org.jooq.test.ingres.generatedclasses.tables.TBooleans.T_BOOLEANS; /** * The table test.t_dates */ public static org.jooq.test.ingres.generatedclasses.tables.TDates T_DATES = org.jooq.test.ingres.generatedclasses.tables.TDates.T_DATES; /** * The table test.t_identity */ public static org.jooq.test.ingres.generatedclasses.tables.TIdentity T_IDENTITY = org.jooq.test.ingres.generatedclasses.tables.TIdentity.T_IDENTITY; /** * The table test.t_identity_pk */ public static org.jooq.test.ingres.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.ingres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; /** * The table test.t_triggers */ public static org.jooq.test.ingres.generatedclasses.tables.TTriggers T_TRIGGERS = org.jooq.test.ingres.generatedclasses.tables.TTriggers.T_TRIGGERS; /** * The table test.v_author */ public static org.jooq.test.ingres.generatedclasses.tables.VAuthor V_AUTHOR = org.jooq.test.ingres.generatedclasses.tables.VAuthor.V_AUTHOR; /** * The table test.v_book */ public static org.jooq.test.ingres.generatedclasses.tables.VBook V_BOOK = org.jooq.test.ingres.generatedclasses.tables.VBook.V_BOOK; /** * The table test.v_library */ public static org.jooq.test.ingres.generatedclasses.tables.VLibrary V_LIBRARY = org.jooq.test.ingres.generatedclasses.tables.VLibrary.V_LIBRARY; /** * The table test.x_test_case_64_69 */ public static org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69 X_TEST_CASE_64_69 = org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69; /** * The table test.x_test_case_71 */ public static org.jooq.test.ingres.generatedclasses.tables.XTestCase_71 X_TEST_CASE_71 = org.jooq.test.ingres.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71; /** * The table test.x_test_case_85 */ public static org.jooq.test.ingres.generatedclasses.tables.XTestCase_85 X_TEST_CASE_85 = org.jooq.test.ingres.generatedclasses.tables.XTestCase_85.X_TEST_CASE_85; /** * An unused table in the same schema. */ public static org.jooq.test.ingres.generatedclasses.tables.XUnused X_UNUSED = org.jooq.test.ingres.generatedclasses.tables.XUnused.X_UNUSED; /** * No instances */ private Tables() {} }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
8753f353279d4a06ec96cef03975eb46a6d18cc0
b26d0ac0846fc13080dbe3c65380cc7247945754
/src/main/java/imports/aws/Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation.java
7b8439e0edc0fb17454082dc8c1ca639264eac9d
[]
no_license
nvkk-devops/cdktf-java-aws
1431404f53df8de517f814508fedbc5810b7bce5
429019d87fc45ab198af816d8289dfe1290cd251
refs/heads/main
2023-03-23T22:43:36.539365
2021-03-11T05:17:09
2021-03-11T05:17:09
346,586,402
0
0
null
null
null
null
UTF-8
Java
false
false
6,765
java
package imports.aws; @javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-10T09:47:03.066Z") @software.amazon.jsii.Jsii(module = imports.aws.$Module.class, fqn = "aws.Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation") @software.amazon.jsii.Jsii.Proxy(Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation.Jsii$Proxy.class) public interface Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation extends software.amazon.jsii.JsiiSerializable { @org.jetbrains.annotations.NotNull java.lang.Number getPriority(); @org.jetbrains.annotations.NotNull java.lang.String getType(); /** * @return a {@link Builder} of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation} */ static Builder builder() { return new Builder(); } /** * A builder for {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation} */ public static final class Builder implements software.amazon.jsii.Builder<Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation> { private java.lang.Number priority; private java.lang.String type; /** * Sets the value of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation#getPriority} * @param priority the value to be set. This parameter is required. * @return {@code this} */ public Builder priority(java.lang.Number priority) { this.priority = priority; return this; } /** * Sets the value of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation#getType} * @param type the value to be set. This parameter is required. * @return {@code this} */ public Builder type(java.lang.String type) { this.type = type; return this; } /** * Builds the configured instance. * @return a new instance of {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation} * @throws NullPointerException if any required attribute was not provided */ @Override public Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation build() { return new Jsii$Proxy(priority, type); } } /** * An implementation for {@link Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation { private final java.lang.Number priority; private final java.lang.String type; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.priority = software.amazon.jsii.Kernel.get(this, "priority", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final java.lang.Number priority, final java.lang.String type) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.priority = java.util.Objects.requireNonNull(priority, "priority is required"); this.type = java.util.Objects.requireNonNull(type, "type is required"); } @Override public final java.lang.Number getPriority() { return this.priority; } @Override public final java.lang.String getType() { return this.type; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("priority", om.valueToTree(this.getPriority())); data.set("type", om.valueToTree(this.getType())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("aws.Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation.Jsii$Proxy that = (Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementAndStatementStatementSizeConstraintStatementTextTransformation.Jsii$Proxy) o; if (!priority.equals(that.priority)) return false; return this.type.equals(that.type); } @Override public final int hashCode() { int result = this.priority.hashCode(); result = 31 * result + (this.type.hashCode()); return result; } } }
[ "venkata.nidumukkala@emirates.com" ]
venkata.nidumukkala@emirates.com
b29b22132c675d012ab531a29b1cdad16002a502
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_73129913ed942a8e35e38ef1c78ecf7d6e4cdae5/ChainLink/16_73129913ed942a8e35e38ef1c78ecf7d6e4cdae5_ChainLink_t.java
258b3b351a760f3a208bd83127d0ba04e6bc0226
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,532
java
/* * Copyright 2013 The Sculptor Project Team, including 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 org.sculptor.generator.chain; /** * This class provides the logic for chain-linking the overriden methods of an * overridable template. The {@link ChainOverridable} annotation applies this * class as base class for the overriden templates. * * @param <T> the overridable template * @see ChainOverridable */ public abstract class ChainLink<T extends ChainLink<T>> { private T nextLink; T[] methodsDispatchHead = null; public T[] getMethodsDispatchHead() { return methodsDispatchHead; } public ChainLink(T next) { nextLink = next; } @SuppressWarnings("unchecked") public void setMethodsDispatchHead(Object[] methodsDispatchHead) { this.methodsDispatchHead = (T[])methodsDispatchHead; } protected T getNext() { return nextLink; } protected abstract T[] _getOverridesDispatchArray(); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a76e1d6fc3b3e536dbfb91b4e52959ec645ad692
9534f9a0b1bb443d853e77250f6265dc5f3c5a0a
/src/main/java/com/yqc/thread/lock/LockObject.java
74cad9082f6d2c5a9c4c9c9d0378b0889291ed9b
[]
no_license
arsenal-ac/java-basic
48a2a8a5eddd9956625a57b6820102aafc7ad734
2aece800b5008b58f0d33d8f293a755b2849b296
refs/heads/master
2020-12-30T13:27:55.621179
2018-04-22T10:46:40
2018-04-22T10:46:40
91,216,861
0
2
null
2017-05-14T03:33:55
2017-05-14T03:15:58
Java
GB18030
Java
false
false
1,662
java
package com.yqc.thread.lock; /** * 1.对于实例同步方法,锁是当前实例对象. * 2.对于静态同步方法,锁是当前对象的Class对象. * 3.对于同步方法块,锁是Synchonized括号里配置的对象. * * @author yangqc * */ public class LockObject { private static volatile int a = 0; synchronized static int get() throws InterruptedException { Thread.sleep(5000); return a; } synchronized static void put(int b) { a = b; } public static void main(String[] args) { Runnable task1 = new Runnable() { @Override public void run() { try { System.out.println(LockObject.get()); } catch (InterruptedException e) { System.out.println("fuck,interrupted!"); } } }; Runnable task2 = new Runnable() { @Override public void run() { LockObject.put(12); System.out.println("completed"); } }; // new Thread(task1).start(); // new Thread(task2).start(); new Thread(new Task(true)).start(); new Thread(new Task(false)).start(); } } class A { public synchronized void printName() throws InterruptedException { while (true) { Thread.sleep(1000); System.out.println("name"); } } public synchronized void printAge() throws InterruptedException { while (true) { Thread.sleep(1000); System.out.println("age"); } } } class Task implements Runnable { private final boolean flag; private A a; Task(boolean flag) { this.flag = flag; a = new A(); } @Override public void run() { try { if (flag) { a.printAge(); } else { a.printName(); } } catch (Exception e) { System.out.println("fuck,interrupted!"); } } }
[ "yangqc_ars@outlook.com" ]
yangqc_ars@outlook.com
d6126fad261e90183174a847b60e5c6df23178cd
292bd357f3a14a81d7fd743453fbd52e2c3090e8
/src/baekJ/bj_14500_DFS_완탐.java
f9193adb4e4c6a273d6df2d16ef811fa15bc2e1a
[]
no_license
BangKiHyun/Algorithm
90ea1e07924d06ab7c16a9aa6e5578c33953c705
065953a728227c796294ef993815a1fa50d9be31
refs/heads/master
2023-04-13T11:14:35.325863
2023-04-02T08:50:43
2023-04-02T08:50:43
190,966,256
0
0
null
null
null
null
UTF-8
Java
false
false
3,921
java
package baekJ; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; //폴리오미노란 크기가 1×1인 정사각형을 여러 개 이어서 붙인 도형이며, 다음과 같은 조건을 만족해야 한다. // //정사각형은 서로 겹치면 안 된다. //도형은 모두 연결되어 있어야 한다. //정사각형의 변끼리 연결되어 있어야 한다. 즉, 꼭짓점과 꼭짓점만 맞닿아 있으면 안 된다. //정사각형 4개를 이어 붙인 폴리오미노는 테트로미노라고 하며, 다음과 같은 5가지가 있다. // //아름이는 크기가 N×M인 종이 위에 테트로미노 하나를 놓으려고 한다. //종이는 1×1 크기의 칸으로 나누어져 있으며, 각각의 칸에는 정수가 하나 쓰여 있다. // //테트로미노 하나를 적절히 놓아서 테트로미노가 놓인 칸에 쓰여 있는 수들의 합을 최대로 하는 프로그램을 작성하시오. // //테트로미노는 반드시 한 정사각형이 정확히 하나의 칸을 포함하도록 놓아야 하며, 회전이나 대칭을 시켜도 된다. public class bj_14500_DFS_완탐 { private static int n, m; private static int[][] board; private static boolean[][] visit; private static int max = 0; private static int[] dx = {-1, 0, 1, 0}; private static int[] dy = {0, 1, 0, -1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; st = new StringTokenizer(br.readLine()); n = Integer.parseInt(st.nextToken()); m = Integer.parseInt(st.nextToken()); board = new int[n][m]; visit = new boolean[n][m]; for (int i = 0; i < n; i++) { st = new StringTokenizer(br.readLine()); for (int j = 0; j < m; j++) { board[i][j] = Integer.parseInt(st.nextToken()); } } goTetromino(); System.out.println(max); } private static void goTetromino() { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { visit[i][j] = true; goDFS(i, j, 1, board[i][j]); visit[i][j] = false; goException(i, j); } } } private static void goDFS(int cur_x, int cur_y, int depth, int sum) { if (depth == 4) { max = Math.max(max, sum); return; } for (int i = 0; i < 4; i++) { int nx = cur_x + dx[i]; int ny = cur_y + dy[i]; if (isRange(nx, ny) && !visit[nx][ny]) { visit[nx][ny] = true; goDFS(nx, ny, depth + 1, sum + board[nx][ny]); visit[nx][ny] = false; } } } private static boolean isRange(int x, int y) { return x >= 0 && y >= 0 && x < n && y < m; } private static void goException(int cur_x, int cur_y) { int wingCnt = 0; int sum = board[cur_x][cur_y]; int minNumber = 1001; for (int i = 0; i < 4; i++) { int nx = cur_x + dx[i]; int ny = cur_y + dy[i]; if (isRange(nx, ny)) { wingCnt++; sum += board[nx][ny]; minNumber = Math.min(minNumber, board[nx][ny]); } } if (wingCnt == 3) max = Math.max(max, sum); else if (wingCnt == 4) max = Math.max(max, sum - minNumber); } } /* 5가지 테트로미노에 대해 완탐을 한다 일단 모양별로 회전이나 대칭을해도 똑같은 모양을 유지하는데 애들이 있기떄문에 모양별로 구분해야한다 하지만 이렇게하면 모양별 case가 너무 많아진다 답은 DFS다 상하좌우 4번까지만 탐색하면 된다. */
[ "rlrlvh@naver.com" ]
rlrlvh@naver.com
34ff3fd4bd3fe41909a9da6e6efb76a8472e5dbc
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14462-16-30-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
3c43ece04f287adfbf0b29a5ffb358fcfc283b9a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 02:25:12 UTC 2020 */ package org.xwiki.job; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6d00cdd9b3d95c55b46117ba2cdbe54a67dd543b
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/webbeans/1.0.0.PREVIEW2.SP2/spi/src/main/java/org/jboss/webbeans/bootstrap/api/helpers/ForwardingServiceRegistry.java
0ad974e07e2a3bad442fe59151a717c9d1729369
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
744
java
package org.jboss.webbeans.bootstrap.api.helpers; import java.util.Iterator; import org.jboss.webbeans.bootstrap.api.Service; import org.jboss.webbeans.bootstrap.api.ServiceRegistry; public abstract class ForwardingServiceRegistry implements ServiceRegistry { protected abstract ServiceRegistry delegate(); public <S extends Service> void add(Class<S> type, S service) { delegate().add(type, service); } public <S extends Service> boolean contains(Class<S> type) { return delegate().contains(type); } public <S extends Service> S get(Class<S> type) { return delegate().get(type); } public Iterator<Service> iterator() { return delegate().iterator(); } }
[ "janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
660ffa22ad23363651764fff953f4ac1d3c07fee
287f4d7281fa445be5664e66268f19e0b3af947c
/util/xcolab-utils/src/main/java/org/xcolab/util/activities/enums/MemberActivityType.java
a8b246dec68ef77713f2e22406d60e1822023eab
[ "MIT" ]
permissive
CCI-MIT/XCoLab
3e46c2d06975cfde79886c5a3d0e47bb28696f92
b0e1f6d09e88de138a57efec0c434185eb63de97
refs/heads/master
2022-12-11T10:54:17.079902
2021-12-14T01:08:00
2021-12-14T01:08:00
3,661,343
17
10
MIT
2022-12-07T09:44:23
2012-03-08T15:38:13
Java
UTF-8
Java
false
false
230
java
package org.xcolab.util.activities.enums; public enum MemberActivityType implements ActivityType { REGISTERED, ; @Override public ActivityCategory getCategory() { return ActivityCategory.MEMBER; } }
[ "jobachhu@mit.edu" ]
jobachhu@mit.edu
ad3be640e7f37f1e1af6cc97a4a3b4c2c60c3709
1ff51747ecd56f661084ea170501a402b2425451
/springboot的整合mybatis/模板2(好用,全面,高级,使用@Select、@Update等SQL注解方式,mybatis-demo2项目用到)/mybatis-demo2/src/main/java/com/mzl/mybatisdemo2/controller/TestController.java
2a8fd301f61d1340264a26414504f94003398a92
[]
no_license
KTLeYing/springboot-learning-2
d150be86e93d0a168fe75a55fece0a6201fb39cf
e5bfb4eee954aee751f014381e9f91133e550556
refs/heads/master
2023-03-19T14:09:37.848706
2021-03-18T11:32:18
2021-03-18T11:32:18
347,958,757
0
0
null
null
null
null
UTF-8
Java
false
false
3,587
java
package com.mzl.mybatisdemo2.controller; import com.mzl.mybatisdemo2.entity.Course; import com.mzl.mybatisdemo2.entity.Department; import com.mzl.mybatisdemo2.entity.Student; import com.mzl.mybatisdemo2.service.CourseService; import com.mzl.mybatisdemo2.service.DepartmentService; import com.mzl.mybatisdemo2.service.StudentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @ClassName : TestController * @Description: mybatis测试控制器 * @Author: mzl * @CreateDate: 2020/11/17 21:47 * @Version: 1.0 */ @RestController public class TestController { @Autowired private StudentService studentService; @Autowired private DepartmentService departmentService; @Autowired private CourseService courseService; /** * 通过id查询学生 * @param * @return */ @RequestMapping("findStuById") public Student findStuById(Integer id){ System.out.println(id); return studentService.findById(id); } /** * 通过班级查询学生 * @param clazz * @return */ @RequestMapping("findStuByClazz") public List<Student> findStuByClazz(String clazz){ return studentService.findStuByClazz(clazz); } /** * 查询所有学生信息及其对应的学院信息(一对一) * @return */ @RequestMapping("findStuInfo") public List<Student> findStuInfo(){ return studentService.findStuInfo(); } /** * 查询某个学院的所有学生(一对多) * @return */ @RequestMapping("findStuInDepartment") public Department findStuInDepartment(String department){ return departmentService.findStuInDepartment(department); } /** * 查询所有学院的所有学生(一对多) * @return */ @RequestMapping("findAllStuInDepartment") public List<Department> findAllStuInDepartment(){ return departmentService.findAllStuInDepartment(); } /** * 查询所有课程对应的所有的学生(多对多,其实就是和一对多实现是一样的,只是它有两个一对多而已,双向的一对多) * @return */ @RequestMapping("findStuInCourse") public List<Course> findAllStuInCourse(){ return courseService.findAllStuInCourse(); } /** * 模糊查询,根据学生姓名和班级模糊查询(where-if) */ @RequestMapping("findStuByNameAndClass") public List<Student> findStuByNameAndClass(String name, String clazz){ return studentService.findStuByNameAndClass(name, clazz); } /** * 更新学生信息 * @return */ @RequestMapping("updateStu") public String updateStu(Student student){ return studentService.updateStu(student); } /** * 根据id删除多个学生,批量删除,前端的多个值用逗号隔开,表示一个数组 */ @RequestMapping("deleteMoreStu") public String deleteMoreStu(Integer[] ids){ return studentService.deleteMoreStu(ids); } /** * 根据id删除学生 */ @RequestMapping("deleteStu") public String deleteStu(Integer id){ return studentService.deleteStu(id); } /** * 添加学生信息 * @param student * @return */ @RequestMapping("addStu") public String addStu(Student student){ return studentService.addStu(student); } }
[ "2198902814@qq.com" ]
2198902814@qq.com
5cc62db4c0b20fd375fc236ccd894bb6365055ea
9a786a921d82f7ee286c30c3ead114f34e57c0cc
/mpUsedVehicle.logic/src/main/java/co/edu/uniandes/csw/mpusedvehicle/persistence/ProviderPersistence.java
e8b3b37e7d1db22795109e099b20b5260ef3473d
[]
no_license
scaldas/PruebaGenerador
a950b96a916fbc3940ca985fc666fb944c7ca4c8
137fc56acad099a6064d65319c93cda3e9aca10a
refs/heads/master
2021-01-10T04:03:03.992164
2015-09-30T22:19:41
2015-09-30T22:19:41
43,462,637
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package co.edu.uniandes.csw.mpusedvehicle.persistence; import co.edu.uniandes.csw.mpusedvehicle.entities.ProviderEntity; import javax.ejb.Stateless; /** * @generated */ @Stateless public class ProviderPersistence extends CrudPersistence<ProviderEntity> { /** * @generated */ public ProviderPersistence() { this.entityClass = ProviderEntity.class; } }
[ "help@genmymodel.com" ]
help@genmymodel.com
fd1149b281034d90a1ef3a26d5a1be8516b4404f
d450b62e0cebfcfc592350192cd424009c347733
/jOOQ-meta/src/main/java/org/jooq/util/sybase/sys/Tables.java
dfc372a8d619622b9d8d47545185c5f6574eee9c
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
rtincar/jOOQ
9ccec69ff0d4af5217829413c1132a0d08acded8
d0304fdfa77c0a8fd79614f7ff72b558783ec6a8
refs/heads/master
2020-12-25T11:21:22.173304
2012-03-01T16:32:48
2012-03-01T16:32:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,145
java
/** * This class is generated by jOOQ */ package org.jooq.util.sybase.sys; /** * This class is generated by jOOQ. * * Convenience access to all tables in sys */ @javax.annotation.Generated(value = {"http://www.jooq.org", "2.0.5"}, comments = "This class is generated by jOOQ") public final class Tables { /** * The table sys.SYSIDXCOL */ public static org.jooq.util.sybase.sys.tables.Sysidxcol SYSIDXCOL = org.jooq.util.sybase.sys.tables.Sysidxcol.SYSIDXCOL; /** * The table sys.SYSFKEY */ public static org.jooq.util.sybase.sys.tables.Sysfkey SYSFKEY = org.jooq.util.sybase.sys.tables.Sysfkey.SYSFKEY; /** * The table sys.SYSDOMAIN */ public static org.jooq.util.sybase.sys.tables.Sysdomain SYSDOMAIN = org.jooq.util.sybase.sys.tables.Sysdomain.SYSDOMAIN; /** * The table sys.SYSVIEW */ public static org.jooq.util.sybase.sys.tables.Sysview SYSVIEW = org.jooq.util.sybase.sys.tables.Sysview.SYSVIEW; /** * The table sys.SYSSEQUENCE */ public static org.jooq.util.sybase.sys.tables.Syssequence SYSSEQUENCE = org.jooq.util.sybase.sys.tables.Syssequence.SYSSEQUENCE; /** * The table sys.SYSTAB */ public static org.jooq.util.sybase.sys.tables.Systab SYSTAB = org.jooq.util.sybase.sys.tables.Systab.SYSTAB; /** * The table sys.SYSTABCOL */ public static org.jooq.util.sybase.sys.tables.Systabcol SYSTABCOL = org.jooq.util.sybase.sys.tables.Systabcol.SYSTABCOL; /** * The table sys.SYSIDX */ public static org.jooq.util.sybase.sys.tables.Sysidx SYSIDX = org.jooq.util.sybase.sys.tables.Sysidx.SYSIDX; /** * The table sys.SYSTABLE */ public static org.jooq.util.sybase.sys.tables.Systable SYSTABLE = org.jooq.util.sybase.sys.tables.Systable.SYSTABLE; /** * The table sys.SYSPROCEDURE */ public static org.jooq.util.sybase.sys.tables.Sysprocedure SYSPROCEDURE = org.jooq.util.sybase.sys.tables.Sysprocedure.SYSPROCEDURE; /** * The table sys.SYSPROCPARM */ public static org.jooq.util.sybase.sys.tables.Sysprocparm SYSPROCPARM = org.jooq.util.sybase.sys.tables.Sysprocparm.SYSPROCPARM; /** * No instances */ private Tables() {} }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com