blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
177fb51e7a5a04c8380ba16fefcb7128ab470bac
35d90b457e828c28eb568bc5d62cbf840649592e
/src/main/java/com/mycompany/todolist/service/StateService.java
951c037fac0c11a8daf3407a57386880559ede3f
[]
no_license
Dmytro1996/todo-list
69aa08e868ab09e2c1dda75b97564649bfe047e8
a9851fc568d231503c7b313fbd9bd65710baa393
refs/heads/master
2023-01-20T19:29:14.949455
2020-11-30T12:30:39
2020-11-30T12:30:39
316,781,918
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.mycompany.todolist.service; import com.mycompany.todolist.model.State; import java.util.List; public interface StateService { State create(State state); State readById(long id); State update(State state); void delete(long id); List<State> getAll(); State getByName(String name); List<State> getSortAsc(); }
[ "dmytr@DESKTOP-N8AF4RV" ]
dmytr@DESKTOP-N8AF4RV
8760c01c30c3fa9555046b4315f176c5bbea08ab
e62f83e5e172529b4010c36055da4255414bb761
/app/src/main/java/com/example/linh/myapplication/NotificationCombindation.java
a9942ed09e7a5b6fdfdb5a16ab60927e5c0b52c5
[ "Apache-2.0" ]
permissive
linhphan0108/NitificationCombinenation
2ec049b7d9e397bab42f80f007ef4e5c761c55cc
12851a49cae2b6132df9e6ae3dcfeae5a5d97e2a
refs/heads/master
2021-01-13T11:22:58.070567
2017-02-09T04:53:51
2017-02-09T04:53:51
81,410,071
0
0
null
null
null
null
UTF-8
Java
false
false
3,381
java
package com.example.linh.myapplication; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationManagerCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import java.util.ArrayList; import java.util.List; /** * a sample app that demonstrate how to combine notifications * notes: this feature doesn't work on Xiaomi's devices */ public class NotificationCombindation extends AppCompatActivity implements View.OnClickListener { Button mButton; static List<String> notifications = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification_combindation); mButton = (Button) findViewById(R.id.btn); mButton.setOnClickListener(this); } @Override public void onClick(View view) { String message = "notification " + notifications.size(); sendNotification(this, message); } private void sendNotification(Context cxt, String messageBody) { //onDismiss Intent Intent intent = new Intent(cxt, MyBroadcastReceiver.class); PendingIntent broadcastIntent = PendingIntent.getBroadcast(cxt.getApplicationContext(), 0, intent, 0); //OnClick Listener Intent launchIntent = new Intent(cxt, NotificationCombindation.class); launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(cxt, 0, launchIntent, PendingIntent.FLAG_ONE_SHOT); Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(cxt) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("Title") .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri) .setContentIntent(pendingIntent); NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle(); // Sets a title for the Inbox in expanded layout inboxStyle.setBigContentTitle("Title - Notification"); inboxStyle.setSummaryText("You have "+ notifications.size()+" Notifications."); // Moves events into the expanded layout notifications.add(messageBody); for (int i=0; i < notifications.size(); i++) { inboxStyle.addLine(notifications.get(i)); } // Moves the expanded layout object into the notification object. notificationBuilder.setStyle(inboxStyle); // NotificationManager notificationManager = // (NotificationManager) cxt.getSystemService(Context.NOTIFICATION_SERVICE); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); notificationBuilder.setDeleteIntent(broadcastIntent); notificationManager.notify(0, notificationBuilder.build()); } }
[ "linh.phan@appsters.net" ]
linh.phan@appsters.net
cc5d84f61d49b3e0fa6127f5c13ba930f9703460
e5b43ba08d23ea7be037f08274118c5b07ce4455
/assignment5/src/com/qainfotech/Assignment_tatoc/ReadObjects.java
2cc2661857f62651d73eb059e9dd60bc0b08c4eb
[]
no_license
sumitmishraqait/Assignmnet5
85caf1e83f577d61daeb81bdd682e0f35fe88c85
cf0abdb24cb07004d2856836d2b2c97da4337876
refs/heads/master
2021-01-01T18:16:52.831359
2017-07-27T12:33:18
2017-07-27T12:33:18
98,295,428
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
package com.qainfotech.Assignment_tatoc; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class ReadObjects { Properties p = new Properties(); public Properties getproperties() throws IOException { InputStream inputStream=new FileInputStream(new File("C:\\Users\\sumitmishra.QAIT\\workspace\\assignment5\\src\\object.properties")); p.load(inputStream); return p; } }
[ "sumitmishra@QAIT.COM" ]
sumitmishra@QAIT.COM
febb4c29337b8c3c58582b6cd60a31d04bad1734
02597a3698d5d2d0026802c549e5626265cb9a5f
/app/src/main/java/com/example/friendsapplication/data/Moment.java
17e2d779dc2d07c6b41fe0b3fb0cdc4d83f7c7cd
[]
no_license
Summerdise/friends_application
a3a09033beed59b0b2c2dac98a595b480381f970
bf8e29691713c325d090d16b7e1b7aab6ed8c4ed
refs/heads/master
2023-02-06T14:37:42.934765
2020-12-10T02:32:30
2020-12-10T02:32:30
313,183,176
0
0
null
null
null
null
UTF-8
Java
false
false
2,372
java
package com.example.friendsapplication.data; import androidx.room.Entity; import androidx.room.PrimaryKey; import com.example.friendsapplication.data.Comment; import java.util.Date; import java.util.List; @Entity(tableName = "moments") public class Moment { @PrimaryKey(autoGenerate = true) private int id; private int userId; private String userName; private int avatar; private String content; private Date pubDate; private List<Integer> imageList; private List<String> agreeList; private List<Comment> commentList; public Moment(int userId, String userName, int avatar, String content, Date pubDate, List<Integer> imageList, List<String> agreeList, List<Comment> commentList) { this.userId = userId; this.userName = userName; this.avatar = avatar; this.content = content; this.pubDate = pubDate; this.imageList = imageList; this.agreeList = agreeList; this.commentList = commentList; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public int getAvatar() { return avatar; } public void setAvatar(int avatar) { this.avatar = avatar; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Date getPubDate() { return pubDate; } public void setPubDate(Date pubDate) { this.pubDate = pubDate; } public List<Integer> getImageList() { return imageList; } public void setImageList(List<Integer> imageList) { this.imageList = imageList; } public List<String> getAgreeList() { return agreeList; } public void setAgreeList(List<String> agreeList) { this.agreeList = agreeList; } public List<Comment> getCommentList() { return commentList; } public void setCommentList(List<Comment> commentList) { this.commentList = commentList; } }
[ "350464517@qq.com" ]
350464517@qq.com
cc81fb0154e6d0ae5942fd6bc6f6df01b3d221a7
9ba8a9a4536b8f484f0fc009d4803df52bcae921
/src/com/javaex/ex01/Ex01.java
408d7a8db2a7e884be85be838c60b5fa09b27d54
[]
no_license
yangjis/Chapter01
3e63031c1e020b9490fc94219adca89334add5be
1008b6841fc123e326a97cd3812564177ddbd23d
refs/heads/master
2022-07-02T21:33:50.301850
2020-05-12T06:25:33
2020-05-12T06:25:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.javaex.ex01; public class Ex01 { public static void main(String[] args) { // int myAge; // myAge = 25; // System.out.println(myAge); // myAge = 26; // System.out.println(myAge); // int var01 = 10; // int var02 = 20; // int var03 = -30; // int var01 = 10, var02 = 20, var03 = 30; // System.out.println(var01); // System.out.println(var02); // System.out.println(var03); long lvar01 =2354864898212335139l; System.out.println(lvar01); } }
[ "hi@DESKTOP-53P5LLN" ]
hi@DESKTOP-53P5LLN
2a6e4d7479b23305f9c493461772dbb990fa9fbf
122287275ec1666cc27a6b6d06bab4f8b1c4ff33
/jconstraints/src/main/java/gov/nasa/jpf/constraints/util/TransformVarVisitor.java
c0f5ae33c30e4fa88e276b210512e991ebb72e7d
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
NJUCWL/symbolic_tools
f036691918b147019c99584efb4dcbe1228ae6c0
669f549b0a97045de4cd95b1df43de93b1462e45
refs/heads/main
2023-05-09T12:00:57.836897
2021-06-01T13:34:40
2021-06-01T13:34:40
370,017,201
2
0
null
null
null
null
UTF-8
Java
false
false
1,785
java
/* * Copyright (C) 2015, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The PSYCO: A Predicate-based Symbolic Compositional Reasoning environment * platform is 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 gov.nasa.jpf.constraints.util; import gov.nasa.jpf.constraints.api.Expression; import gov.nasa.jpf.constraints.api.Variable; import com.google.common.base.Function; class TransformVarVisitor extends DuplicatingVisitor<Function<? super Variable<?>, ? extends Expression<?>>> { private static final TransformVarVisitor INSTANCE = new TransformVarVisitor(); public static TransformVarVisitor getInstance() { return INSTANCE; } /* (non-Javadoc) * @see gov.nasa.jpf.constraints.expressions.AbstractExpressionVisitor#visit(gov.nasa.jpf.constraints.api.Variable, java.lang.Object) */ @Override public <E> Expression<?> visit(Variable<E> v, Function<? super Variable<?>, ? extends Expression<?>> data) { return data.apply(v); } public <T> Expression<T> apply(Expression<T> expr, Function<? super Variable<?>,? extends Expression<?>> transform) { return visit(expr, transform).requireAs(expr.getType()); } }
[ "48467952+NJUCWL@users.noreply.github.com" ]
48467952+NJUCWL@users.noreply.github.com
4833b0d4bddeb734e25a93e5745e8789781ed21e
1ae8782adbb7136f21f14619016ac4f4afb5803f
/src/main/java/com/alon/ficticiusclean/resource/domain/ModeloResource.java
58c36018b7f8652e9e2c6ef8cf53baba9f9f3901
[]
no_license
paulosalonso/ficticius-clean
2fcdd09c7710d5c7aecdc62815dad3dda63515b9
6af5ca956781b378bd9013999bdbeaed0d164f60
refs/heads/master
2020-08-21T23:50:46.006555
2019-10-21T15:17:14
2019-10-21T15:17:14
216,275,144
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.alon.ficticiusclean.resource.domain; import com.alon.ficticiusclean.resource.domain.dto.CreateModeloInput; import com.alon.ficticiusclean.resource.domain.dto.ModeloResourceDtoConverterProvider; import com.alon.ficticiusclean.resource.domain.dto.UpdateModeloInput; import com.alon.ficticiusclean.service.domain.ModeloService; import com.alon.spring.crud.resource.CrudResource; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/modelo") public class ModeloResource extends CrudResource<ModeloService, CreateModeloInput, UpdateModeloInput, ModeloResourceDtoConverterProvider> { }
[ "paulo_alonso_@hotmail.com" ]
paulo_alonso_@hotmail.com
41d9896ec5a3203df050d3eca392b1ea35bd4e80
73cc3242200fbead9fc36c21a8f80f4246628d6b
/basetool/src/main/java/com/zhuyongdi/basetool/widget/refresh/smart_refresh/api/RefreshHeader.java
310d94fd7cd915603475911a77023f968ed00e8b
[]
no_license
zhuyongdi/base-tool
6338f562dd54fa1fb790a75da34aa5ec3096aed5
7c1a97c216058f4318076bbf5df58ad0cdb80420
refs/heads/master
2020-04-29T04:07:43.041059
2019-05-10T09:11:42
2019-05-10T09:11:42
175,837,141
0
0
null
null
null
null
UTF-8
Java
false
false
185
java
package com.zhuyongdi.basetool.widget.refresh.smart_refresh.api; /** * 刷新头部 * Created by SCWANG on 2017/5/26. */ public interface RefreshHeader extends RefreshInternal { }
[ "904507761@qq.com" ]
904507761@qq.com
effb3f0a3846e2217bc25b0bd5fcc00fee782c48
b7435239528825764648650d0afa171188a4c93d
/api/src/main/java/com/meli/useraccount/api/configuration/DatabaseConfiguration.java
210f9675cd8ef73b0d1130c82af3ee10789b23d6
[ "BSD-3-Clause" ]
permissive
danilopeixoto/user-account-service
ec8558e13874b3fd7d3bf825473b731e782fb7bb
3a802b904915c8c91adbfb4764378f3dce6fcebb
refs/heads/main
2023-06-02T20:34:26.869170
2021-06-23T01:13:05
2021-06-23T01:13:05
379,441,744
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.meli.useraccount.api.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.data.repository.init.Jackson2RepositoryPopulatorFactoryBean; @Configuration public class DatabaseConfiguration { @Bean public Jackson2RepositoryPopulatorFactoryBean populator() { Jackson2RepositoryPopulatorFactoryBean factory = new Jackson2RepositoryPopulatorFactoryBean(); factory.setResources(new Resource[]{ new ClassPathResource("database.json") }); return factory; } }
[ "danilo.peixoto@mercadolivre.com" ]
danilo.peixoto@mercadolivre.com
45e626f7a76aafc343c64038336bef72c9a03bd1
531452124c7cf2e89b878c07be41045b17ced567
/src/main/java/com/niche/ng/service/mapper/GodownMapper.java
67740931985dd7d8678dd9d3d2f2af0a19de1221
[]
no_license
AnithaRaja90/ProjectGreenHands_isha
b93619014b74817c669c21b9bf5e7bfc29b5a03c
377e43e60ae78c7e27d7d8a8caaf4f2ade65b446
refs/heads/master
2020-03-26T19:34:46.965548
2018-08-19T04:39:04
2018-08-19T04:39:04
145,272,857
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package com.niche.ng.service.mapper; import com.niche.ng.domain.*; import com.niche.ng.service.dto.GodownDTO; import org.mapstruct.*; /** * Mapper for the entity Godown and its DTO GodownDTO. */ @Mapper(componentModel = "spring", uses = {}) public interface GodownMapper extends EntityMapper<GodownDTO, Godown> { @Mapping(target = "godownPurchaseDetails", ignore = true) @Mapping(target = "godownStocks", ignore = true) Godown toEntity(GodownDTO godownDTO); default Godown fromId(Long id) { if (id == null) { return null; } Godown godown = new Godown(); godown.setId(id); return godown; } }
[ "ptnaveenraj@outlook.com" ]
ptnaveenraj@outlook.com
9a57b62923766e7b80bf43ae3a008d4a2cc8e96e
527598302e6669c815609d11f266e6fa79a9d23d
/app/src/main/java/com/example/tp3_1/Parametres.java
bce2e5f487ca87018c7eeede57858bb09ad699f1
[]
no_license
lamvng/android_cipher_app
59c9c94a3f6229ce398811a0e171fd973fe74bf1
1ae7c4b4de2b8016a5cc0abef6d91e40c1bece7c
refs/heads/main
2022-12-31T04:42:13.606347
2020-10-11T17:31:06
2020-10-11T17:31:06
303,076,867
0
0
null
null
null
null
UTF-8
Java
false
false
1,851
java
package com.example.tp3_1; import android.os.Parcel; import android.os.Parcelable; // https://www.youtube.com/watch?v=WBbsvqSu0is // https://guides.codepath.com/android/using-parcelable public class Parametres implements Parcelable { // Parcel data types private int chiffre_ou_pas; private String algo; private String key; private String inputText; // Define the variables to be getted and setted public Parametres() { } protected Parametres(Parcel in) { chiffre_ou_pas = in.readInt(); algo = in.readString(); key = in.readString(); inputText = in.readString(); } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(chiffre_ou_pas); dest.writeString(algo); dest.writeString(key); dest.writeString(inputText); } @Override public int describeContents() { return 0; } public static final Creator<Parametres> CREATOR = new Creator<Parametres>() { @Override public Parametres createFromParcel(Parcel in) { return new Parametres(in); } @Override public Parametres[] newArray(int size) { return new Parametres[size]; } }; public int getChiffre_ou_pas() { return chiffre_ou_pas; } public String getAlgo() { return algo; } public String getKey() { return key; } public String getInputText() { return inputText; } public void setChiffre_ou_pas(int chiffre_ou_pas) { this.chiffre_ou_pas = chiffre_ou_pas; } public void setAlgo(String algo) { this.algo = algo; } public void setKey(String key) { this.key = key; } public void setInputText(String inputText) { this.inputText = inputText; } }
[ "lam.nguyenvan1997@gmail.com" ]
lam.nguyenvan1997@gmail.com
55e06a7d2d9b219ca7eb4f292d3a373fdfd1c647
9ede6e712d4fe8b5119465cf5a62537df948815c
/src/main/java/com/authentication/db/entity/UserCorporateProfileEntity.java
dd4cb50333db549313d2e22d1e2bc1c01bed1168
[]
no_license
studyonlyonline/singlepointauth
43f63407fc765f617d435d6d36cd4274ec2f5649
d6e996be277adeeffa51c4a4dc8ea02092cf93dd
refs/heads/master
2020-05-31T16:11:13.624203
2019-07-18T20:18:41
2019-07-18T20:18:41
190,376,087
0
0
null
null
null
null
UTF-8
Java
false
false
1,079
java
package com.authentication.db.entity; import lombok.*; import javax.persistence.*; import java.time.LocalDateTime; @Getter @Setter @Builder @Entity @Table(name = "user_corporate_profile") @NoArgsConstructor @AllArgsConstructor public class UserCorporateProfileEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "corporate_profile_id") private Long corporateProfileId; @Column(name = "user_id") private Long userId; @Column(name = "email") private String email; @Column(name = "organization_id") private String organizationId; @Column(name = "firm_name") private String firmName; @Column(name = "GSTIN") private String gstin; @Column(name = "aadhar_no") private String aadharNo; @Column(name = "billing_address") private String billingAddress; @Column(name = "is_profile_verified") private Boolean profileVerified=false; @Column(name = "created_on") private LocalDateTime createdOn; @Column(name = "modified_on") private LocalDateTime modifiedOn; }
[ "studyonlyonline@gmail.com" ]
studyonlyonline@gmail.com
44d71618c6335d100381f071580a6b6fdf9f92db
80845ec6e0cfd2684a009a6165faf7fbd6ee97f4
/src/main/java/nz/theappstore/com/shoppingcartmodule/uiElements/adapters/CartListAdapter.java
fa5d59899f66396f71dd6475264c1a3f99a181bf
[]
no_license
vyomkeshj/ShoppingCartModule-Android
52bf1342e297b181130fca347a4be97c49f00eca
741c3911557aa1a73e1a6870db68cef11b1afe6e
refs/heads/master
2021-09-26T06:43:43.321521
2018-01-30T02:35:16
2018-01-30T02:35:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,141
java
package nz.theappstore.com.shoppingcartmodule.uiElements.adapters; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.List; import nz.theappstore.com.shoppingcartmodule.R; import nz.theappstore.com.shoppingcartmodule.businessLogic.Contracts.ShoppingCart; import nz.theappstore.com.shoppingcartmodule.businessLogic.ShoppingCartImpl; import nz.theappstore.com.shoppingcartmodule.uiElements.viewHolders.CartItemViewHolder; import nz.theappstore.com.shoppingcartmodule.uiElements.util.SampleProductEntity; import rx.Completable; import rx.subjects.PublishSubject; /** * Created by vyomkeshjha on 12/5/17. */ public class CartListAdapter extends RecyclerView.Adapter<CartItemViewHolder>{ ShoppingCart<SampleProductEntity> dataset = new ShoppingCartImpl(); PublishSubject<SampleProductEntity> increaseQuantityPipe; PublishSubject<SampleProductEntity> decreaseQuantityPipe; PublishSubject<SampleProductEntity> removeItemPipe; public CartListAdapter() { increaseQuantityPipe = PublishSubject.create(); decreaseQuantityPipe = PublishSubject.create(); removeItemPipe = PublishSubject.create(); } @Override public CartItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()) .inflate(R.layout.product_item_in_cart, parent, false); return new CartItemViewHolder(v); } @Override public void onBindViewHolder(CartItemViewHolder holder, int position) { holder.getCurrentProductQuantityTextView(). setText(String.valueOf(dataset.getProductQuantity(dataset.getItemFromCart(position)))); holder.getProductDescription(). setText(String.valueOf(dataset.getItemFromCart(position).getProductDescription())); holder.getProductName(). setText(String.valueOf(dataset.getItemFromCart(position).getProductName())); holder.getIncreaseProductCountTextView().setOnClickListener(view -> { getIncreaseQuantityPipe().onNext(dataset.getItemFromCart(position)); }); holder.getReduceProductCountTextView().setOnClickListener(view -> { getDecreaseQuantityPipe().onNext(dataset.getItemFromCart(position)); }); holder.getRemoveProductFromCart().setOnClickListener(view -> { getRemoveItemPipe().onNext(dataset.getItemFromCart(position)); }); //TODO: setup event pipes } @Override public int getItemCount() { return dataset.getNumberOfItemsInCart(); } public void setDataset(ShoppingCart<SampleProductEntity> dataset) { this.dataset = dataset; } public PublishSubject<SampleProductEntity> getIncreaseQuantityPipe() { return increaseQuantityPipe; } public PublishSubject<SampleProductEntity> getDecreaseQuantityPipe() { return decreaseQuantityPipe; } public PublishSubject<SampleProductEntity> getRemoveItemPipe() { return removeItemPipe; } }
[ "vyomkeshjha@yahoo.com" ]
vyomkeshjha@yahoo.com
3d37d3c72ab3a79b886e076e7df93db301c42d2a
4e516583021b884f45c1763698d38996fed326f6
/pcgen/code/src/java/pcgen/core/levelability/LevelAbilityList.java
800ba436b45e79f07754fff3fea3b25eaf364d9a
[]
no_license
Manichee/pcgen
d993d04e75a8398b8cb9d577a717698a5ae8e3e9
5fb3937e5e196d2c0b244e9b4dacab2aecca381f
refs/heads/master
2020-04-09T01:55:53.634379
2016-04-11T03:41:50
2016-04-11T03:41:50
23,060,834
0
0
null
2014-08-18T22:37:19
2014-08-18T06:20:19
Java
UTF-8
Java
false
false
4,411
java
/* * LevelAbilityList.java * Copyright 2001 (C) Dmitry Jemerov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Created on July 24, 2001, 12:36 PM */ package pcgen.core.levelability; import pcgen.core.PObject; import pcgen.core.PlayerCharacter; import pcgen.core.pclevelinfo.PCLevelInfo; import pcgen.util.chooser.ChooserInterface; import java.util.*; /** * Represents an option list that a character gets when gaining a level * (an ADD:LIST entry in the LST file). * * @author Dmitry Jemerov <yole@spb.cityline.ru> * @version $Revision: 1.11 $ */ final class LevelAbilityList extends LevelAbility { private List aBonusList; private List aChoiceList; private int cnt = 0; LevelAbilityList(final PObject aowner, final int aLevel, final String aList) { super(aowner, aLevel, aList); } List getChoicesList(final String bString, final PlayerCharacter aPC) { aChoiceList = new ArrayList(); aBonusList = new ArrayList(); return super.getChoicesList(bString.substring(5), aPC); } /** * Performs the initial setup of a chooser. * @param c * @param aPC * @return String */ String prepareChooser(final ChooserInterface c, PlayerCharacter aPC) { super.prepareChooser(c, aPC); c.setTitle("Option List"); return rawTagData; } /** * Process the choice selected by the user. * @param selectedList * @param aPC * @param pcLevelInfo * @param aArrayList */ public boolean processChoice( final List aArrayList, final List selectedList, final PlayerCharacter aPC, final PCLevelInfo pcLevelInfo) { for (int index = 0; index < selectedList.size(); ++index) { cnt = aArrayList.indexOf(selectedList.get(index).toString()); String theChoice = null; String theBonus; final List selectedBonusList = new ArrayList(); final String prefix = cnt + "|"; for (Iterator e = aBonusList.iterator(); e.hasNext();) { theBonus = (String) e.next(); if (theBonus.startsWith(prefix)) { theBonus = theBonus.substring((cnt / 10) + 2); selectedBonusList.add(theBonus); } } for (Iterator e = aChoiceList.iterator(); e.hasNext();) { theChoice = (String) e.next(); if (theChoice.startsWith(prefix)) { theChoice = theChoice.substring((cnt / 10) + 9); break; } theChoice = ""; } if ((theChoice != null) && (theChoice.length() > 0)) { owner.getChoices(theChoice, selectedBonusList, aPC); } else if (selectedBonusList.size() > 0) { for (Iterator e1 = selectedBonusList.iterator(); e1.hasNext();) { owner.applyBonus((String) e1.next(), "", aPC); } } } return true; } /** * Processes a single token in the comma-separated list of the ADD: * field and adds the choices to be shown in the list to anArrayList. * * @param aToken the token to be processed. * @param anArrayList the list to add the choice to. * @param aPC the PC this Level ability is adding to. */ void processToken( final String aToken, final List anArrayList, final PlayerCharacter aPC) { final StringTokenizer cTok = new StringTokenizer(aToken, "[]", false); try { anArrayList.add(cTok.nextToken()); } catch (NoSuchElementException e) { //do nothing, TODO add debug logger and log condition } while (cTok.hasMoreTokens()) { final String bTokString = cTok.nextToken(); final String aString = new StringBuffer(cnt).append(String.valueOf(cnt)).append("|").append(bTokString) .toString(); if (bTokString.startsWith("CHOOSE:")) { aChoiceList.add(aString); } if (bTokString.startsWith("BONUS:")) { aBonusList.add(aString); } } cnt++; } }
[ "tladdjr@gmail.com" ]
tladdjr@gmail.com
e4dcb955319c2b1b242dcd560a0270e6abf39bba
ba6765646635580169580ef50b67fd742874654a
/app/src/main/java/com/tzh/designpattern/structure/adapterpattern/V5Desc.java
2198c7b291771cd51f7af7484ee7485c4de81de4
[]
no_license
tuzanhua/studydemo
22fa0ff23ea3020f1883026879de18f1c763f479
9578985cc68be456ec02a7ae69bfecaec923edb2
refs/heads/master
2021-08-24T12:54:00.225996
2021-06-17T07:44:41
2021-06-17T07:44:41
254,353,887
1
0
null
null
null
null
UTF-8
Java
false
false
360
java
package com.tzh.designpattern.structure.adapterpattern; /** * * * * create by tuzanhua on 2020/4/20 */ public class V5Desc implements IVPolicy{ private V220Target target; public V5Desc(V220Target target) { this.target = target; } @Override public int toV5() { int i = target.dianya() / 44; return i; } }
[ "13126130675@163.com" ]
13126130675@163.com
bb4032e0b5cbdb2f9144cf658f2a9bee3523a155
2ca044b4d80d460cbaf093ea828c06e97d728df8
/EveryMarket_v2.1/src/everymarket/controller/ReviewController.java
04ec5bca5e934d6b4c85fd19790eb0723e60dba6
[]
no_license
QuangMuop/everymarket
9f7fb2484c0a340b43ca2d13e9b299385d55d9be
30ad7afeed20f4b2f743a439af78dd4598c58802
refs/heads/master
2021-01-10T20:57:53.425037
2013-06-10T05:14:14
2013-06-10T05:14:14
39,817,003
0
0
null
null
null
null
UTF-8
Java
false
false
1,947
java
package everymarket.controller; import java.sql.Timestamp; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import everymarket.dao.ReviewDao; import everymarket.dao.TradeDao; import everymarket.model.BoardReport; import everymarket.model.Review; @Controller public class ReviewController { private ReviewDao daoR; private TradeDao daoT; public void setDaoT(TradeDao daoT) { this.daoT = daoT; } public void setDaoR(ReviewDao daoR) { this.daoR = daoR; } /*getJSON*/ @RequestMapping("/getReviewList.do") public ModelAndView getReviewList(@RequestParam("m_id") String m_id){ ModelAndView mav = new ModelAndView(); Map<String, Object> resultMap = new HashMap<String, Object>(); int scoreSum = daoR.getScoreSumByM_id(m_id); int countReview = daoR.countReviewByM_id(m_id); List<Review> listReview = daoR.getReviewListByM_id(m_id); resultMap.put("scoreSum", scoreSum); resultMap.put("countReview", countReview); resultMap.put("listReview", listReview); mav.addAllObjects(resultMap); mav.setViewName("jsonView"); return mav; } @RequestMapping(value = "/reviewAction.do", method = RequestMethod.POST) public ModelAndView report(Review review) { ModelAndView mav = new ModelAndView(); review.setR_id(daoR.get_Review_MaxID() + 1); review.setR_date(new Timestamp(System.currentTimeMillis())); /* daoR.Insert_review(review); */ daoT.update_status_review(review.getP_id()); mav.setViewName("trade_list.do"); return mav; } }
[ "kitchu@naver.com" ]
kitchu@naver.com
2e67ceedfacf1ef92df18d4a6aedba8394a9cc3b
8ead5ff8d527e4b4d98cd54e9b84f50ea824f2be
/cj.lns.chip.sos.website.market.app.cyberport/src/cj/lns/chip/sos/website/market/app/cyberport/component/GetMessagesComponent.java
042f9633928bbb1c49a21fd2efd41fa017be97ee
[]
no_license
911Steven/cj.lns.sos
9976efcf28418094e315324a4ce145c56bb57478
af82a5e7555b99780a9606b5e848861ce1ae5503
refs/heads/master
2020-07-05T16:22:11.341767
2018-10-12T02:13:41
2018-10-12T02:13:41
202,696,541
1
0
null
2019-08-16T09:10:35
2019-08-16T09:10:35
null
UTF-8
Java
false
false
2,117
java
package cj.lns.chip.sos.website.market.app.cyberport.component; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.parser.Tag; import cj.lns.chip.sos.website.framework.IServiceosWebsiteModule; import cj.lns.chip.sos.website.framework.IServicewsContext; import cj.lns.chip.sos.website.market.app.cyberport.services.FetchServciewsInfo; import cj.lns.common.sos.website.customable.IComponent; import cj.lns.common.sos.website.moduleable.ServiceosWebsiteModule; import cj.studio.ecm.annotation.CjService; import cj.studio.ecm.annotation.CjServiceRef; import cj.studio.ecm.frame.Circuit; import cj.studio.ecm.frame.Frame; import cj.studio.ecm.graph.CircuitException; import cj.studio.ecm.graph.IPlug; import cj.studio.ecm.sns.mailbox.viewer.MailboxMessageViewer; import cj.ultimate.util.StringUtil; @CjService(name = "/popup/getMessages.html") public class GetMessagesComponent implements IComponent { @CjServiceRef(refByName = "FetchServciewsInfo") FetchServciewsInfo dao; @Override public void flow(Frame frame, Circuit circuit, IPlug plug) throws CircuitException { // 作用适配客户端类型,并读取场景,为终端插件设画布 IServiceosWebsiteModule m = ServiceosWebsiteModule.get(); Document doc = m.context().html("/popup/getMessages.html", m.site().contextPath(), "utf-8"); IServicewsContext ctx = IServicewsContext.context(frame); String action = frame.parameter("action"); if (StringUtil.isEmpty(action)) { throw new CircuitException("404", "参数:action不能为空"); } String skip = frame.parameter("skip"); if(StringUtil.isEmpty(skip)){ skip="0"; } String limit = frame.parameter("limit"); if(StringUtil.isEmpty(limit)){ limit="2000"; } MailboxMessageViewer view=dao.getAllMessage(ctx.owner(),ctx.swsid(),action,skip,limit,m); Element templi=doc.select(".app.msg").first(); Element container=new Element(Tag.valueOf("ul"), ""); dao.printMessages(action,view,templi,container,m); container.appendChild(doc.head().children().first()); circuit.content().writeBytes(container.html().getBytes()); } }
[ "carocean.jofers@icloud.com" ]
carocean.jofers@icloud.com
9a767e84553a43fa99cccca95907ea8f9d50c8dc
76c58cf59c06e61ff0fc8019816580c8d4864343
/ToDoMVP3-starter/app/src/main/java/edu/csce4623/ahnelson/todomvp3/data/ToDoItemRepository.java
ef3037379f6498aa6e1caf6afb360c124852e3ac
[]
no_license
AveryDeSean/Android-To-Do-List-Application
9d2e7b8a0ce3caa01642fcfdccdbdbe13212b05b
c8d2f1a00a9b74d4837687e55933a5ff74c5d64f
refs/heads/master
2023-01-02T16:09:57.702736
2020-10-26T19:03:20
2020-10-26T19:03:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,987
java
package edu.csce4623.ahnelson.todomvp3.data; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.util.Log; import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; import util.AppExecutors; /** * ToDoItemRepository class - implements the ToDoDataSource interface */ public class ToDoItemRepository implements ToDoListDataSource { //Memory leak here by including the context - Fix this at some point private static volatile ToDoItemRepository INSTANCE; //Thread pool for execution on other threads private AppExecutors mAppExecutors; //Context for calling ToDoProvider private Context mContext; /** * private constructor - prevent direct instantiation * * @param appExecutors - thread pool * @param context */ private ToDoItemRepository(@NonNull AppExecutors appExecutors, @NonNull Context context) { mAppExecutors = appExecutors; mContext = context; } /** * public constructor - prevent creation of instance if one already exists * * @param appExecutors * @param context * @return */ public static ToDoItemRepository getInstance(@NonNull AppExecutors appExecutors, @NonNull Context context) { if (INSTANCE == null) { synchronized (ToDoItemRepository.class) { if (INSTANCE == null) { INSTANCE = new ToDoItemRepository(appExecutors, context); } } } return INSTANCE; } /** * getToDoItems runs query in a separate thread, and on success loads data from cursor into a list * * @param callback */ @Override public void getToDoItems(@NonNull final LoadToDoItemsCallback callback) { Log.d("REPOSITORY", "Loading..."); Runnable runnable = new Runnable() { @Override public void run() { String[] projection = { ToDoItem.TODOITEM_ID, ToDoItem.TODOITEM_TITLE, ToDoItem.TODOITEM_CONTENT, ToDoItem.TODOITEM_DUEDATE, ToDoItem.TODOITEM_COMPLETED}; final Cursor c = mContext.getContentResolver().query(Uri.parse("content://" + ToDoProvider.AUTHORITY + "/" + ToDoProvider.TODOITEM_TABLE_NAME), projection, null, null, null); final List<ToDoItem> toDoItems = new ArrayList<ToDoItem>(0); mAppExecutors.mainThread().execute(new Runnable() { @Override public void run() { if (c == null) { callback.onDataNotAvailable(); } else { while (c.moveToNext()) { ToDoItem item = new ToDoItem(); item.setId(c.getInt(c.getColumnIndex(ToDoItem.TODOITEM_ID))); item.setTitle(c.getString(c.getColumnIndex(ToDoItem.TODOITEM_TITLE))); item.setContent(c.getString(c.getColumnIndex(ToDoItem.TODOITEM_CONTENT))); item.setDueDate(c.getLong(c.getColumnIndex(ToDoItem.TODOITEM_DUEDATE))); item.setCompleted(c.getInt(c.getColumnIndex(ToDoItem.TODOITEM_COMPLETED)) > 0); toDoItems.add(item); } c.close(); callback.onToDoItemsLoaded(toDoItems); } } }); } }; mAppExecutors.diskIO().execute(runnable); } /** * Not implemented yet * * @param toDoItemId * @param callback */ @Override public void getToDoItem(@NonNull String toDoItemId, @NonNull GetToDoItemCallback callback) { Log.d("REPOSITORY", "GetToDoItem"); } /** * saveToDoItem runs contentProvider update in separate thread * * @param toDoItem */ @Override public void saveToDoItem(@NonNull final ToDoItem toDoItem) { Log.d("REPOSITORY", "SaveToDoItem"); Runnable runnable = new Runnable() { @Override public void run() { ContentValues myCV = new ContentValues(); myCV.put(ToDoItem.TODOITEM_ID, toDoItem.getId()); myCV.put(ToDoItem.TODOITEM_TITLE, toDoItem.getTitle()); myCV.put(ToDoItem.TODOITEM_CONTENT, toDoItem.getContent()); myCV.put(ToDoItem.TODOITEM_DUEDATE, toDoItem.getDueDate()); myCV.put(ToDoItem.TODOITEM_COMPLETED, toDoItem.getCompleted()); final int numUpdated = mContext.getContentResolver().update(Uri.parse("content://" + ToDoProvider.AUTHORITY + "/" + ToDoProvider.TODOITEM_TABLE_NAME), myCV, null, null); Log.d("REPOSITORY", "Update ToDo updated " + String.valueOf(numUpdated) + " rows"); } }; mAppExecutors.diskIO().execute(runnable); } /** * createToDoItem runs contentProvider insert in separate thread * * @param toDoItem */ @Override public void createToDoItem(@NonNull final ToDoItem toDoItem) { Log.d("REPOSITORY", "CreateToDoItem"); Runnable runnable = new Runnable() { @Override public void run() { ContentValues myCV = new ContentValues(); myCV.put(ToDoItem.TODOITEM_TITLE, toDoItem.getTitle()); myCV.put(ToDoItem.TODOITEM_CONTENT, toDoItem.getContent()); myCV.put(ToDoItem.TODOITEM_DUEDATE, toDoItem.getDueDate()); myCV.put(ToDoItem.TODOITEM_COMPLETED, toDoItem.getCompleted()); final Uri uri = mContext.getContentResolver().insert(Uri.parse("content://" + ToDoProvider.AUTHORITY + "/" + ToDoProvider.TODOITEM_TABLE_NAME), myCV); Log.d("REPOSITORY", "Create ToDo finished with URI" + uri.toString()); } }; mAppExecutors.diskIO().execute(runnable); } /** * DeleteToDoItem deletes the to do item * * @param toDoItem */ @Override public void deleteToDoItem(@NonNull final long id) { Runnable runnable = new Runnable() { @Override public void run() { Uri uri = Uri.parse("content://" + ToDoProvider.AUTHORITY + "/" + ToDoProvider.TODOITEM_TABLE_NAME + "/" + id); int isDeleted = mContext.getContentResolver().delete(uri, null, null); if (isDeleted == 0) { Log.d("REPOSITORY", "Not Deleted"); } else { Log.d("REPOSITORY", "Deleted!"); } } }; mAppExecutors.diskIO().execute(runnable); } public void setAsComplete(@NonNull final ToDoItem toDoItem){ Log.d("REPOSITORY", "setAsComplete"); Runnable runnable = new Runnable() { @Override public void run() { ContentValues myCV = new ContentValues(); if(toDoItem.getCompleted()) { myCV.put(ToDoItem.TODOITEM_COMPLETED, true); } else myCV.put(ToDoItem.TODOITEM_COMPLETED, false); //final int numUpdate = mContext.getContentResolver().update() // int isFinished = mContext.getContentResolver().update(uri,null,null); // Log.d("REPOSITORY", "Finished!" + uri.toString()); } }; mAppExecutors.diskIO().execute(runnable); } }
[ "62083127+AveryDeSean@users.noreply.github.com" ]
62083127+AveryDeSean@users.noreply.github.com
e639ad0086a32bd501c14ffd9a89e4f6899be86f
f9847c1ab4296a971d55bea70f7582c32b1cceef
/src/main/java/com/andey/log/WrapperResponseGlobalFilter.java
d1bf5ce1bc52a2f39634129d5cdc693e3003d243
[]
no_license
AndeyJiang/cloud-gateway-demo
d2f7e0a513d96cc62bc0e4a4889d2322d99e6e6a
1e2e82fbe7ffdd862bb97ef3fc19374a650094de
refs/heads/master
2020-04-29T06:18:27.227039
2019-03-16T02:26:53
2019-03-16T02:26:53
175,911,912
1
0
null
null
null
null
UTF-8
Java
false
false
2,818
java
//package com.andey.log; // //import org.reactivestreams.Publisher; //import org.springframework.cloud.gateway.filter.GatewayFilterChain; //import org.springframework.cloud.gateway.filter.GlobalFilter; //import org.springframework.core.Ordered; //import org.springframework.core.io.buffer.DataBuffer; //import org.springframework.core.io.buffer.DataBufferFactory; //import org.springframework.core.io.buffer.DataBufferUtils; //import org.springframework.http.server.reactive.ServerHttpResponse; //import org.springframework.http.server.reactive.ServerHttpResponseDecorator; //import org.springframework.stereotype.Component; //import org.springframework.web.server.ServerWebExchange; //import reactor.core.publisher.Flux; //import reactor.core.publisher.Mono; // //import java.nio.charset.Charset; // ///** // * @author wuweifeng wrote on 2018/10/31. // */ //@Component //public class WrapperResponseGlobalFilter implements GlobalFilter, Ordered { // @Override // public int getOrder() { // // -1 is response write filter, must be called before that // return -2; // } // // @Override // public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { // // ServerHttpResponse originalResponse = exchange.getResponse(); // DataBufferFactory bufferFactory = originalResponse.bufferFactory(); // ServerHttpResponseDecorator decoratedResponse = new ServerHttpResponseDecorator(originalResponse) { // @Override // public Mono<Void> writeWith(Publisher<? extends DataBuffer> body) { // if (body instanceof Flux) { // Flux<? extends DataBuffer> fluxBody = (Flux<? extends DataBuffer>) body; // return super.writeWith(fluxBody.map(dataBuffer -> { // // probably should reuse buffers // byte[] content = new byte[dataBuffer.readableByteCount()]; // dataBuffer.read(content); // //释放掉内存 // DataBufferUtils.release(dataBuffer); // String s = new String(content, Charset.forName("UTF-8")); // //TODO,s就是response的值,想修改、查看就随意而为了 // System.out.println(s); // byte[] uppedContent = new String(content, Charset.forName("UTF-8")).getBytes(); // return bufferFactory.wrap(uppedContent); // })); // } // // if body is not a flux. never got there. // return super.writeWith(body); // } // }; // // // replace response with decorator // return chain.filter(exchange.mutate().response(decoratedResponse).build()); // } //}
[ "jb!@1234" ]
jb!@1234
00fc200d62a15a8a207911ffe015fc37a0987156
4340604b3f98cd9524ec3541ee018ee0daff688f
/src/main/java/com/qiyewan/core/domain/SmsRepository.java
b3bb17cb30590554419d3a35d0fe7e6fc4443a15
[]
no_license
lhzbxx/qiyewan-official-site-server
1e1d7343089fb3c3069dccaa1cdb86c7870b9347
456ac6bbc41903f38df1d83cdda898b1e431b193
refs/heads/master
2021-01-11T04:15:31.690020
2017-01-21T07:01:11
2017-01-21T07:01:11
71,222,491
1
1
null
null
null
null
UTF-8
Java
false
false
284
java
package com.qiyewan.core.domain; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * Created by lhzbxx on 2016/10/19. * * 短信 */ @Repository public interface SmsRepository extends JpaRepository<Sms, Long> { }
[ "lhzbxx@gmail.com" ]
lhzbxx@gmail.com
15b23719972acd3fe0d7ee7210355a94ee7ab59f
0891a76ee5e31617ee3288979eacf1451607c6f8
/src/main/java/eu/datex/v220/KilogramsConcentrationValue.java
a7d6883f717d2e448a22afc2a7058aa50ead7d13
[ "MIT" ]
permissive
vegvesen/datex-client
83945420f25eeda4c756f3b1db4b9dfd7108b199
09ed90c881a74de839536cea69716b3ba6227b54
refs/heads/master
2021-09-01T03:53:16.403652
2021-08-19T10:46:27
2021-08-19T10:46:27
218,272,993
2
4
MIT
2020-02-11T12:52:34
2019-10-29T11:39:15
Java
UTF-8
Java
false
false
2,531
java
package eu.datex.v220; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for KilogramsConcentrationValue complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="KilogramsConcentrationValue"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://datex2.eu/schema/2/2_0}DataValue"&gt; * &lt;sequence&gt; * &lt;element name="kilogramsConcentration" type="{http://datex2.eu/schema/2/2_0}ConcentrationKilogramsPerCubicMetre"/&gt; * &lt;element name="kilogramsConcentrationValueExtension" type="{http://datex2.eu/schema/2/2_0}_ExtensionType" minOccurs="0"/&gt; * &lt;/sequence&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "KilogramsConcentrationValue", namespace = "http://datex2.eu/schema/2/2_0", propOrder = { "kilogramsConcentration", "kilogramsConcentrationValueExtension" }) public class KilogramsConcentrationValue extends DataValue { @XmlElement(namespace = "http://datex2.eu/schema/2/2_0") protected float kilogramsConcentration; @XmlElement(namespace = "http://datex2.eu/schema/2/2_0") protected ExtensionType kilogramsConcentrationValueExtension; /** * Gets the value of the kilogramsConcentration property. * */ public float getKilogramsConcentration() { return kilogramsConcentration; } /** * Sets the value of the kilogramsConcentration property. * */ public void setKilogramsConcentration(float value) { this.kilogramsConcentration = value; } /** * Gets the value of the kilogramsConcentrationValueExtension property. * * @return * possible object is * {@link ExtensionType } * */ public ExtensionType getKilogramsConcentrationValueExtension() { return kilogramsConcentrationValueExtension; } /** * Sets the value of the kilogramsConcentrationValueExtension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setKilogramsConcentrationValueExtension(ExtensionType value) { this.kilogramsConcentrationValueExtension = value; } }
[ "safurudin.mahic@q-free.com" ]
safurudin.mahic@q-free.com
0449fe6b7b4baf35fbd81a2679b2e7c7b43f521b
3c18841d5b169aaa14a4bbdcff4059fef9a99cc2
/src/main/java/mysticmods/mysticalworld/client/model/armor/AntlerHatModel.java
9ab9ba7da4e478985bd4e4f72599cea5b69e8229
[ "MIT" ]
permissive
MysticMods/MysticalWorld
cb3d1073fa40c3d16a16e468df869855ad09ae27
8ca03f2a922ab42ee90b63bf918dc92571c11841
refs/heads/1.18
2023-04-07T16:34:51.082937
2023-02-19T03:19:05
2023-02-19T03:19:05
137,164,303
30
34
MIT
2023-04-02T17:21:19
2018-06-13T04:54:58
Java
UTF-8
Java
false
false
4,819
java
package mysticmods.mysticalworld.client.model.armor; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.PartPose; import net.minecraft.client.model.geom.builders.CubeListBuilder; import net.minecraft.client.model.geom.builders.LayerDefinition; import net.minecraft.client.model.geom.builders.MeshDefinition; import net.minecraft.client.model.geom.builders.PartDefinition; import net.minecraft.world.entity.EquipmentSlot; public class AntlerHatModel extends ArmorModel { private final ModelPart hat; private final ModelPart horn1; private final ModelPart horn1_1; private final ModelPart strap; private final ModelPart horn3; private final ModelPart horn6; private final ModelPart horn8; private final ModelPart horn3_1; private final ModelPart horn6_1; private final ModelPart horn8_1; public AntlerHatModel(ModelPart pRoot) { super(pRoot, EquipmentSlot.HEAD); this.hat = pRoot.getChild("head"); this.horn1 = this.hat.getChild("horn1"); this.horn1_1 = this.hat.getChild("horn1_1"); this.strap = this.hat.getChild("strap"); this.horn3 = this.horn1.getChild("horn3"); this.horn3_1 = this.horn1_1.getChild("horn3_1"); this.horn6 = this.horn3.getChild("horn6"); this.horn6_1 = this.horn3_1.getChild("horn6_1"); this.horn8 = this.horn6.getChild("horn8"); this.horn8_1 = this.horn6_1.getChild("horn8_1"); } @Override public void renderToBuffer(PoseStack matrixStackIn, VertexConsumer bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) { super.renderToBuffer(matrixStackIn, bufferIn, packedLightIn, packedOverlayIn, red, green, blue, alpha); } public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); partdefinition.addOrReplaceChild("hat", CubeListBuilder.create(), PartPose.ZERO); partdefinition.addOrReplaceChild("body", CubeListBuilder.create(), PartPose.ZERO); partdefinition.addOrReplaceChild("right_arm", CubeListBuilder.create(), PartPose.ZERO); partdefinition.addOrReplaceChild("left_arm", CubeListBuilder.create(), PartPose.ZERO); partdefinition.addOrReplaceChild("right_leg", CubeListBuilder.create(), PartPose.ZERO); partdefinition.addOrReplaceChild("left_leg", CubeListBuilder.create(), PartPose.ZERO); PartDefinition hat = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(64, 0).addBox(-3.0F, -10.0F, -3.0F, 6f, 3f, 6f), PartPose.offsetAndRotation(0f, 0f, 0f, 0f, 0f, 0f)); PartDefinition horn1_1 = hat.addOrReplaceChild("horn1_1", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(-2.0F, -9.0F, 0.0F, 0.0F, 0.0F, -0.08726646259971647F)); PartDefinition horn3_1 = horn1_1.addOrReplaceChild("horn3_1", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(-0.15F, -2.5F, 0.0F, 0.0F, -0.08726646259971647F, -1.0471975511965976F)); PartDefinition horn6_1 = horn3_1.addOrReplaceChild("horn6_1", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(0.3F, -3.2F, -0.2F, 0.0F, 0.08726646259971647F, 1.0471975511965976F)); horn6_1.addOrReplaceChild("horn8_1", CubeListBuilder.create().texOffs(70, 32).addBox(-0.5F, -3.0F, -0.5F, 1, 3, 1), PartPose.offsetAndRotation(0.0F, -2.0F, 0.0F, 0.0F, -0.17453292519943295F, -0.7853981633974483F)); PartDefinition horn1 = hat.addOrReplaceChild("horn1", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(2.0F, -9.0F, 0.0F, 0.0F, 0.0F, 0.08726646259971647F)); PartDefinition horn3 = horn1.addOrReplaceChild("horn3", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(0.15F, -2.5F, 0.0F, 0.0F, 0.08726646259971647F, 1.0471975511965976F)); PartDefinition horn6 = horn3.addOrReplaceChild("horn6", CubeListBuilder.create().texOffs(66, 32).addBox(-0.5F, -5.0F, -0.5F, 1, 5, 1), PartPose.offsetAndRotation(-0.3F, -3.2F, -0.2F, 0.0F, -0.08726646259971647F, -1.0471975511965976F)); horn6.addOrReplaceChild("horn8", CubeListBuilder.create().texOffs(70, 32).addBox(-0.5F, -3.0F, -0.5F, 1, 3, 1), PartPose.offsetAndRotation(0.0F, -2.0F, 0.0F, 0.0F, 0.17453292519943295F, 0.7853981633974483F)); hat.addOrReplaceChild("strap", CubeListBuilder.create().texOffs(64, 10).addBox(-4.5F, 0.0F, -0.5F, 9, 9, 1), PartPose.offsetAndRotation(0.0F, -8.1F, -0.5F, -0.25132741228718347F, 0.0F, 0.0F)); return LayerDefinition.create(meshdefinition, 128, 64); } }
[ "due@wxwhatever.com" ]
due@wxwhatever.com
ae7429d14194b687f949b77c716b6c2d6361ba85
3c0d8b595c1ebb3be40a7acdf748361497eee6da
/app/src/main/java/top/biduo/exchange/base/BaseFragment.java
a105e4b8ef4dbaa2ae444da781e1ba287dffb8db
[ "Apache-2.0" ]
permissive
jiajianfa/ZTuoExchange_android
a62f44671c80c0b99b572288000db9727dc4059f
6b6af54fad923ce7ca7334eb33087ae0e51ebf33
refs/heads/master
2022-11-28T16:44:30.478937
2020-08-13T04:58:28
2020-08-13T04:58:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,768
java
package top.biduo.exchange.base; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import com.gyf.barlibrary.ImmersionBar; import butterknife.ButterKnife; import butterknife.Unbinder; /** * Created by Administrator on 2017/9/26. */ public abstract class BaseFragment extends Fragment { protected View rootView; Unbinder unbinder; protected ImmersionBar immersionBar; protected boolean isInit = false; protected boolean isNeedLoad = true; protected boolean isSetTitle = false; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(getLayoutId(), null); return rootView; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); unbinder = ButterKnife.bind(this, rootView); isInit = true; if (isImmersionBarEnabled()) { initImmersionBar(); } initViews(savedInstanceState); obtainData(); fillWidget(); } protected abstract int getLayoutId(); protected abstract void initViews(Bundle savedInstanceState); protected abstract void obtainData(); protected abstract void fillWidget(); protected abstract void loadData(); protected boolean isImmersionBarEnabled() { return true; } protected void initImmersionBar() { immersionBar = ImmersionBar.with(this); //immersionBar.keyboardEnable(false, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN).statusBarDarkFont(false,0.2f).flymeOSStatusBarFontColor(R.color.help_view).init(); } public static String makeFragmentName(int viewId, long id) { return "android:switcher:" + viewId + ":" + id; } @Override public void onResume() { super.onResume(); } public void displayLoadingPopup() { if (getActivity() != null) ((BaseActivity) getActivity()).displayLoadingPopup(); } public void hideLoadingPopup() { if (getActivity() != null) ((BaseActivity) getActivity()).hideLoadingPopup(); } @Override public View getView() { return rootView; } @Override public void onDestroyView() { if (immersionBar != null) immersionBar.destroy(); unbinder.unbind(); super.onDestroyView(); } protected void finish() { getActivity().finish(); } public BaseActivity getmActivity() { return (BaseActivity) super.getActivity(); } }
[ "390330302@qq.com" ]
390330302@qq.com
07f89860715278ed7ed37d1dbdd96f7581afa550
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.core/3895.java
ad1d9633c8674bbbedac6eb827732625a9fda32c
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
60,010
java
/******************************************************************************* * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.core.tests.model; import java.io.File; import java.io.IOException; import junit.framework.Test; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.*; public class TypeHierarchyNotificationTests extends ModifyingResourceTests implements ITypeHierarchyChangedListener { /** * Whether we received notification of change */ protected boolean changeReceived = false; /** * The hierarchy we received change for */ protected ITypeHierarchy hierarchy = null; /** * The number of notifications */ protected int notifications = 0; public TypeHierarchyNotificationTests(String name) { super(name); } /** * Make sure that one change has been received for the given hierarchy. */ private void assertOneChange(ITypeHierarchy h) { assertTrue("Should receive change", this.changeReceived); assertTrue("Change should be for this hierarchy", this.hierarchy == h); assertEquals("Unexpected number of notifications", 1, this.notifications); } private void addSuper(ICompilationUnit unit, String typeName, String newSuper) throws JavaModelException { ICompilationUnit copy = unit.getWorkingCopy(null); IType type = copy.getTypes()[0]; String source = type.getSource(); int superIndex = -1; String newSource = source.substring(0, (superIndex = source.indexOf(typeName) + typeName.length())) + " extends " + newSuper + source.substring(superIndex); type.delete(true, null); copy.createType(newSource, null, true, null); copy.commitWorkingCopy(true, null); } protected void changeSuper(ICompilationUnit unit, String existingSuper, String newSuper) throws JavaModelException { ICompilationUnit copy = unit.getWorkingCopy(null); IType type = copy.getTypes()[0]; String source = type.getSource(); int superIndex = -1; String newSource = source.substring(0, (superIndex = source.indexOf(" " + existingSuper))) + " " + newSuper + source.substring(superIndex + existingSuper.length() + 1); type.delete(true, null); copy.createType(newSource, null, true, null); copy.commitWorkingCopy(true, null); } protected void changeVisibility(ICompilationUnit unit, String existingModifier, String newModifier) throws JavaModelException { ICompilationUnit copy = unit.getWorkingCopy(null); IType type = copy.getTypes()[0]; String source = type.getSource(); int modifierIndex = -1; String newSource = source.substring(0, (modifierIndex = source.indexOf(existingModifier))) + " " + newModifier + source.substring(modifierIndex + existingModifier.length()); type.delete(true, null); copy.createType(newSource, null, true, null); copy.commitWorkingCopy(true, null); } /** * Reset the flags that watch notification. */ private void reset() { this.changeReceived = false; this.hierarchy = null; this.notifications = 0; } protected void setUp() throws Exception { super.setUp(); reset(); this.setUpJavaProject("TypeHierarchyNotification", "1.5"); } static { // TESTS_NAMES= new String[] { "testAddExtendsSourceType3" }; } public static Test suite() { return buildModelTestSuite(TypeHierarchyNotificationTests.class); } protected void tearDown() throws Exception { this.deleteProject("TypeHierarchyNotification"); super.tearDown(); } /** * When adding an anonymous type in a hierarchy on a region, we should be notified of change. * (regression test for bug 51867 An anonymous type is missing in type hierarchy when editor is modified) */ public void testAddAnonymousInRegion() throws CoreException { ITypeHierarchy h = null; ICompilationUnit copy = null; try { copy = getCompilationUnit("TypeHierarchyNotification", "src", "p3", "A.java"); copy.becomeWorkingCopy(null); IRegion region = JavaCore.newRegion(); region.add(copy.getParent()); h = copy.getJavaProject().newTypeHierarchy(region, null); h.addTypeHierarchyChangedListener(this); // add a field initialized with a 'new B() {...}' anonymous type String newSource = "package p3;\n" + "public class A{\n" + " B field = new B() {};\n" + "}"; copy.getBuffer().setContents(newSource); copy.reconcile(ICompilationUnit.NO_AST, false, null, null); copy.commitWorkingCopy(true, null); assertOneChange(h); } finally { if (h != null) { h.removeTypeHierarchyChangedListener(this); } if (copy != null) { copy.discardWorkingCopy(); } } } /** * When a CU is added the type hierarchy should change * only if one of the types of the CU is part of the * type hierarchy. */ public void testAddCompilationUnit1() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); // a cu with no types part of the hierarchy IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p"); ICompilationUnit newCU1 = pkg.createCompilationUnit("Z1.java", "package p;\n" + "\n" + "public class Z1 {\n" + "\n" + " public static main(String[] args) {\n" + " System.out.println(\"HelloWorld\");\n" + " }\n" + "}\n", false, null); try { assertCreation(newCU1); assertTrue("Should not receive change", !this.changeReceived); } finally { // cleanup h.removeTypeHierarchyChangedListener(this); } } /** * When a CU is added the type hierarchy should change * only if one of the types of the CU is part of the * type hierarchy. */ public void testAddCompilationUnit2() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); // a cu with a top level type which is part of the hierarchy IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p"); ICompilationUnit newCU2 = pkg.createCompilationUnit("Z2.java", "package p;\n" + "\n" + "public class Z2 extends e.E {\n" + "}\n", false, null); try { assertCreation(newCU2); assertOneChange(h); h.refresh(null); IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.java").getType("E"); IType[] subtypes = h.getSubtypes(eE); assertTrue("Should be one subtype of e.E", subtypes.length == 1); assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]); } finally { // cleanup h.removeTypeHierarchyChangedListener(this); } } /** * When a CU is added the type hierarchy should change * only if one of the types of the CU is part of the * type hierarchy. */ public void testAddCompilationUnit3() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); // a cu with an inner type which is part of the hierarchy IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p"); ICompilationUnit newCU3 = pkg.createCompilationUnit("Z3.java", "package p;\n" + "\n" + "public class Z3 {\n" + " public class InnerZ extends d.D {\n" + " }\n" + "}\n", false, null); try { assertCreation(newCU3); assertOneChange(h); h.refresh(null); IType dD = getCompilationUnit("TypeHierarchyNotification", "src", "d", "D.java").getType("D"); IType[] subtypes = h.getSubtypes(dD); assertTrue("Should be one subtype of d.D", subtypes.length == 1); assertEquals("Subtype of d.D should be p.Z3.InnerZ", newCU3.getType("Z3").getType("InnerZ"), subtypes[0]); } finally { // cleanup h.removeTypeHierarchyChangedListener(this); } } /** * When a CU is added the type hierarchy should change * only if one of the types of the CU is part of the * type hierarchy. Tests parameterized supertype, see https://bugs.eclipse.org/401726 */ public void testAddCompilationUnit4() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); IType collection = javaProject.findType("java.util.Collection"); ITypeHierarchy h = collection.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); // a cu with a top level type which is part of the hierarchy IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p"); ICompilationUnit newCU2 = pkg.createCompilationUnit("Z2.java", "package p;\n" + "\n" + "public abstract class Z2 extends java.util.Collection<java.lang.String> {\n" + "}\n", false, null); try { assertCreation(newCU2); assertOneChange(h); h.refresh(null); IType[] subtypes = h.getSubtypes(collection); assertTrue("Should be one subtype of Collection", subtypes.length == 1); assertEquals("Subtype of Collection should be p.Z2", newCU2.getType("Z2"), subtypes[0]); } finally { // cleanup h.removeTypeHierarchyChangedListener(this); } } /** * When a CU is added, if the type hierarchy doesn't have a focus, it should change * only if one of the types of the CU is part of the region. */ public void testAddCompilationUnitInRegion() throws CoreException, IOException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); IRegion region = JavaCore.newRegion(); region.add(javaProject); ITypeHierarchy h = javaProject.newTypeHierarchy(region, null); h.addTypeHierarchyChangedListener(this); try { setUpJavaProject("TypeHierarchyDependent"); // a cu with no types part of the region IPackageFragment pkg = getPackageFragment("TypeHierarchyDependent", "", ""); ICompilationUnit newCU1 = pkg.createCompilationUnit("Z1.java", "\n" + "public class Z1 {\n" + "\n" + " public static main(String[] args) {\n" + " System.out.println(\"HelloWorld\");\n" + " }\n" + "}\n", false, null); try { assertCreation(newCU1); assertTrue("Should not receive change", !this.changeReceived); } finally { // cleanup deleteResource(newCU1.getUnderlyingResource()); reset(); } // a cu with a type which is part of the region and is a subtype of an existing type of the region pkg = getPackageFragment("TypeHierarchyNotification", "src", "p"); ICompilationUnit newCU2 = pkg.createCompilationUnit("Z2.java", "package p;\n" + "\n" + "public class Z2 extends e.E {\n" + "}\n", false, null); try { assertCreation(newCU2); assertOneChange(h); h.refresh(null); IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.java").getType("E"); IType[] subtypes = h.getSubtypes(eE); assertTrue("Should be one subtype of e.E", subtypes.length == 1); assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]); } finally { // cleanup deleteResource(newCU2.getUnderlyingResource()); h.refresh(null); reset(); } // a cu with a type which is part of the region and is not a sub type of an existing type of the region ICompilationUnit newCU3 = pkg.createCompilationUnit("Z3.java", "package p;\n" + "\n" + "public class Z3 extends Throwable {\n" + "}\n", false, null); try { assertCreation(newCU3); assertOneChange(h); h.refresh(null); IType throwableClass = getClassFile("TypeHierarchyNotification", getExternalJCLPathString("1.5"), "java.lang", "Throwable.class").getType(); assertEquals("Superclass of Z3 should be java.lang.Throwable", throwableClass, h.getSuperclass(newCU3.getType("Z3"))); } finally { // cleanup deleteResource(newCU3.getUnderlyingResource()); h.refresh(null); reset(); } } finally { h.removeTypeHierarchyChangedListener(this); this.deleteProject("TypeHierarchyDependent"); } } /** * When a CU is added if the CU does not intersects package fragments in the type hierarchy, * the typehierarchy has not changed. */ public void testAddExternalCompilationUnit() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p.other"); ICompilationUnit newCU = pkg.createCompilationUnit("Z.java", "package p.other;\n" + "\n" + "public class Z {\n" + "\n" + " public static main(String[] args) {\n" + " System.out.println(\"HelloWorld\");\n" + " }\n" + "}\n", false, null); try { assertCreation(newCU); assertTrue("Should not receive changes", !this.changeReceived); } finally { // cleanup deleteResource(newCU.getUnderlyingResource()); h.removeTypeHierarchyChangedListener(this); } } /** * When a package is added in an external project, the type hierarchy should not change */ public void testAddExternalPackage() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); try { this.createJavaProject("Other", new String[] { "src" }, "bin"); h.addTypeHierarchyChangedListener(this); IPackageFragmentRoot root = getPackageFragmentRoot("Other", "src"); IPackageFragment frag = root.createPackageFragment("a.day.in.spain", false, null); try { assertCreation(frag); assertTrue("Should not receive changes", !this.changeReceived); } finally { // cleanup frag.delete(true, null); reset(); } } finally { this.deleteProject("Other"); h.removeTypeHierarchyChangedListener(this); } } /** * When a project is added that is not on the class path of the type hierarchy project, * the type hierarchy should not change. */ public void testAddExternalProject() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); project.getJavaModel().getWorkspace().getRoot().getProject("NewProject").create(null); try { assertTrue("Should not receive change", !this.changeReceived); } finally { // cleanup this.deleteProject("NewProject"); h.removeTypeHierarchyChangedListener(this); } } /** * Test adding the same listener twice. */ public void testAddListenerTwice() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); // add listener twice h.addTypeHierarchyChangedListener(this); h.addTypeHierarchyChangedListener(this); IFile file = (IFile) superCU.getUnderlyingResource(); try { deleteResource(file); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a package is added, the type hierarchy should change */ public void testAddPackage() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); IPackageFragmentRoot root = getPackageFragmentRoot("TypeHierarchyNotification", "src"); IPackageFragment frag = root.createPackageFragment("one.two.three", false, null); try { assertCreation(frag); assertOneChange(h); } finally { // cleanup h.removeTypeHierarchyChangedListener(this); } } /** * When a package fragment root is added, the type hierarchy should change */ public void testAddPackageFragmentRoot() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); // prepare a classpath entry for the new root IClasspathEntry[] originalCP = project.getRawClasspath(); IClasspathEntry newEntry = JavaCore.newSourceEntry(project.getProject().getFullPath().append("extra")); IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1]; System.arraycopy(originalCP, 0, newCP, 0, originalCP.length); newCP[originalCP.length] = newEntry; try { // set new classpath project.setRawClasspath(newCP, null); // now create the actual resource for the root and populate it reset(); project.getProject().getFolder("extra").create(false, true, null); IPackageFragmentRoot newRoot = getPackageFragmentRoot("TypeHierarchyNotification", "extra"); assertTrue("New root should now be visible", newRoot != null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a project is added that is on the class path of the type hierarchy project, * the type hierarchy should change. */ public void testAddProject() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); // prepare a new classpath entry for the new project IClasspathEntry[] originalCP = project.getRawClasspath(); IClasspathEntry newEntry = JavaCore.newProjectEntry(new Path("/NewProject"), false); IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1]; System.arraycopy(originalCP, 0, newCP, 0, originalCP.length); newCP[originalCP.length] = newEntry; try { // set the new classpath project.setRawClasspath(newCP, null); // now create the actual resource for the root and populate it reset(); final IProject newProject = project.getJavaModel().getWorkspace().getRoot().getProject("NewProject"); IWorkspaceRunnable create = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { newProject.create(null, null); newProject.open(null); } }; getWorkspace().run(create, null); IProjectDescription description = newProject.getDescription(); description.setNatureIds(new String[] { JavaCore.NATURE_ID }); newProject.setDescription(description, null); assertOneChange(h); } finally { this.deleteProject("NewProject"); h.removeTypeHierarchyChangedListener(this); } } /** * When a class file is added or removed if the class file intersects package fragments in the type hierarchy, * the type hierarchy has possibly changed (possibly introduce a supertype) */ public void testAddRemoveClassFile() throws CoreException { // Create type hierarchy on 'java.lang.LinkageError' in 'Minimal.zip' IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit unit = getCompilationUnit("TypeHierarchyNotification", "src", "p", "MyError.java"); IType type = unit.getType("MyError"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); // Create 'patch' folder and add it to classpath IFolder pathFolder = project.getProject().getFolder("patch"); pathFolder.create(true, true, null); IClasspathEntry newEntry = JavaCore.newLibraryEntry(pathFolder.getFullPath(), null, null, false); IClasspathEntry[] classpath = project.getRawClasspath(); IClasspathEntry[] newClassPath = new IClasspathEntry[classpath.length + 1]; newClassPath[0] = newEntry; System.arraycopy(classpath, 0, newClassPath, 1, classpath.length); try { // Set new classpath setClasspath(project, newClassPath); // Create package 'java.lang' in 'patch' IPackageFragment pf = project.getPackageFragmentRoots()[0].createPackageFragment("java.lang", false, null); h.refresh(null); // Test addition of 'Error.class' in 'java.lang' (it should replace the 'Error.class' of the JCL in the hierarchy) reset(); IFile file = getProject("TypeHierarchyNotification").getFile("Error.class"); ((IFolder) pf.getUnderlyingResource()).getFile("Error.class").create(file.getContents(false), false, null); assertOneChange(h); h.refresh(null); assertEquals("Superclass of MyError should be Error in patch", pf.getClassFile("Error.class").getType(), h.getSuperclass(type)); // Test removal of 'Error.class' reset(); deleteResource(pf.getClassFile("Error.class").getUnderlyingResource()); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /* * Ensures that changing the modifiers of the focus type in a working copy reports a hierarchy change on save. * (regression test for bug */ public void testChangeFocusModifier() throws CoreException { ITypeHierarchy h = null; ICompilationUnit workingCopy = null; try { createJavaProject("P1"); createFolder("/P1/p"); createFile("/P1/p/X.java", "package p1;\n" + "public class X {\n" + "}"); workingCopy = getCompilationUnit("/P1/p/X.java"); workingCopy.becomeWorkingCopy(/*no progress*/ null); h = workingCopy.getType("X").newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); workingCopy.getBuffer().setContents("package p1;\n" + "class X {\n" + "}"); workingCopy.reconcile(ICompilationUnit.NO_AST, /*no pb detection*/ false, /*no workingcopy owner*/ null, /*no prgress*/ null); workingCopy.commitWorkingCopy(/*don't force*/ false, /*no progress*/ null); assertOneChange(h); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); if (workingCopy != null) workingCopy.discardWorkingCopy(); deleteProjects(new String[] { "P1", "P2" }); } } /** * Ensures that a TypeHierarchyNotification is made invalid when the project is closed. */ public void testCloseProject() throws Exception { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { assertTrue(h.exists()); javaProject.getProject().close(null); assertTrue("Should have been invalidated", !h.exists()); } finally { h.removeTypeHierarchyChangedListener(this); } } /* * Ensures that editing a working copy's buffer and committing (without a reconcile) triggers a type hierarchy notification * (regression test for bug 204805 ICompilationUnit.commitWorkingCopy doesn't send typeHierarchyChanged) */ public void testEditBuffer() throws CoreException { ITypeHierarchy h = null; ICompilationUnit workingCopy = null; try { createJavaProject("P"); createFolder("/P/p"); createFile("/P/p/X.java", "package p;\n" + "public class X {\n" + "}"); workingCopy = getCompilationUnit("/P/p/X.java"); workingCopy.becomeWorkingCopy(/*no progress*/ null); h = workingCopy.getType("X").newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); workingCopy.getBuffer().setContents("package p;\n" + "public class X extends Throwable {\n" + "}"); workingCopy.commitWorkingCopy(/*don't force*/ false, /*no progress*/ null); assertOneChange(h); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); if (workingCopy != null) workingCopy.discardWorkingCopy(); deleteProject("P"); } } /** * When editing the extends clause of a source type in a hierarchy, we should be notified of change. */ public void testEditExtendsSourceType() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { // change the superclass to a.A changeSuper(cu, "B", "a.A"); assertOneChange(h); h.refresh(null); // change the superclass back to B reset(); changeSuper(cu, "a.A", "B"); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } public void testAddDependentProject() throws CoreException { ITypeHierarchy h = null; try { createJavaProject("P1"); createFolder("/P1/p"); createFile("/P1/p/X.java", "package p1;\n" + "public class X {\n" + "}"); h = getCompilationUnit("/P1/p/X.java").getType("X").newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); createJavaProject("P2", new String[] { "" }, new String[0], new String[] { "/P1" }, ""); assertOneChange(h); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); deleteProjects(new String[] { "P1", "P2" }); } } /** * When adding an extends clause of a source type in a hierarchy, we should be notified of change. * (regression test for bug 4917 Latest build fails updating TypeHierarchyNotification) */ public void testAddExtendsSourceType1() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java"); IType type = cu.getType("A"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { // add p2.B as the superclass of p2.A addSuper(cu, "A", "p2.B"); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When adding an extends clause of a source type in a hierarchy on a region, we should be notified of change. * (regression test for bug 45113 No hierarchy refresh when on region) */ public void testAddExtendsSourceType2() throws CoreException { ITypeHierarchy h = null; ICompilationUnit copy = null; try { copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java"); copy.becomeWorkingCopy(null); IRegion region = JavaCore.newRegion(); region.add(copy.getParent()); h = copy.getJavaProject().newTypeHierarchy(region, null); h.addTypeHierarchyChangedListener(this); // add p2.B as the superclass of p2.A String typeName = "A"; String newSuper = "p2.B"; String source = copy.getBuffer().getContents(); int superIndex = -1; String newSource = source.substring(0, (superIndex = source.indexOf(typeName) + typeName.length())) + " extends " + newSuper + source.substring(superIndex); copy.getBuffer().setContents(newSource); copy.reconcile(ICompilationUnit.NO_AST, false, null, null); copy.commitWorkingCopy(true, null); assertOneChange(h); } finally { if (h != null) { h.removeTypeHierarchyChangedListener(this); } if (copy != null) { copy.discardWorkingCopy(); } } } /** * While in a primary working copy, when adding an extends clause with a qualified name in a hierarchy, * we should be notified of change after a reconcile. * (regression test for bug 111396 TypeHierarchy doesn't notify listeners on addition of fully qualified subtypes) */ public void testAddExtendsSourceType3() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit copy = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "B.java"); ITypeHierarchy h = null; try { copy.becomeWorkingCopy(null); h = getCompilationUnit("TypeHierarchyNotification", "src", "p2", "A.java").getType("A").newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); // add p2.A as the superclass of p2.B String typeName = "B"; String newSuper = "p2.A"; String source = copy.getBuffer().getContents(); int superIndex = -1; String newSource = source.substring(0, (superIndex = source.indexOf(typeName) + typeName.length())) + " extends " + newSuper + source.substring(superIndex); copy.getBuffer().setContents(newSource); copy.reconcile(ICompilationUnit.NO_AST, false, null, null); copy.commitWorkingCopy(true, null); assertOneChange(h); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); copy.discardWorkingCopy(); } } /** * When editing a source type NOT in a hierarchy, we should receive NO CHANGES. */ public void testEditExternalSourceType() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); ICompilationUnit cu2 = getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java"); IField field = cu2.getType("External").getField("field"); try { field.delete(false, null); assertTrue("Should receive NO change", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When editing the field of a source type in a hierarchy, * we should NOT be notified of a change. */ public void testEditFieldSourceType() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { // remove a field an make sure we don't get any notification IField field = type.getField("field"); String source = field.getSource(); field.delete(false, null); assertTrue("Should not receive change", !this.changeReceived); // add the field back in and make sure we don't get any notification type.createField(source, null, false, null); assertTrue("Should receive change", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When editing the imports of a source type in a hierarchy, * we should be notified of a change. */ public void testEditImportSourceType() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { // remove an import declaration IImportDeclaration importDecl = cu.getImport("b.*"); importDecl.delete(false, null); assertOneChange(h); h.refresh(null); // remove all remaining import declarations reset(); importDecl = cu.getImport("i.*"); importDecl.delete(false, null); assertOneChange(h); h.refresh(null); // add an import back in reset(); cu.createImport("b.B", null, null); assertOneChange(h); h.refresh(null); // add a second import back in reset(); cu.createImport("i.*", null, null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When editing > 1 source type in a hierarchy using a MultiOperation, * we should be notified of ONE change. */ public void testEditSourceTypes() throws CoreException { // TBD: Find a way to do 2 changes in 2 different CUs at once IJavaProject project = getJavaProject("TypeHierarchyNotification"); final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); try { // change the visibility of the super class and the 'extends' of the type we're looking at // in a batch operation JavaCore.run(new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) { try { changeVisibility(superCU, "public", "private"); changeSuper(cu, "X", "a.A"); } catch (JavaModelException e) { assertTrue("No exception", false); } } }, null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When editing a super source type in a hierarchy, we should be notified of change only if * the change affects the visibility of the type. */ public void testEditSuperType() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java"); IType type = cu.getType("X"); IType superType = superCU.getType("B"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); try { // delete a field, there should be no change IField superField = superType.getField("value"); superField.delete(false, null); assertTrue("Should receive no change", !this.changeReceived); // change the visibility of the super class, there should be one change changeVisibility(superCU, "public", "private"); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When an involved compilation unit is deleted, the type hierarchy should change */ public void testRemoveCompilationUnit() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IFile file = (IFile) superCU.getUnderlyingResource(); try { deleteResource(file); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When an uninvolved compilation unit is deleted, the type hierarchy should not change */ public void testRemoveExternalCompilationUnit() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); ICompilationUnit otherCU = getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IFile file = (IFile) otherCU.getUnderlyingResource(); try { deleteResource(file); assertTrue("Should not receive changes", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a uninvolved package is deleted, the type hierarchy should NOT change */ public void testRemoveExternalPackage() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IPackageFragment pkg = getPackageFragment("TypeHierarchyNotification", "src", "p.other"); IFolder folder = (IFolder) pkg.getUnderlyingResource(); try { deleteResource(folder); assertTrue("Should receive NO change", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a package fragment root is removed from the classpath, but does not impact the * package fragments, the type hierarchy should not change. */ public void testRemoveExternalPackageFragmentRoot() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); // add a classpath entry for the new root IClasspathEntry[] originalCP = project.getRawClasspath(); IClasspathEntry newEntry = JavaCore.newSourceEntry(project.getProject().getFullPath().append("extra")); IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1]; System.arraycopy(originalCP, 0, newCP, 0, originalCP.length); newCP[originalCP.length] = newEntry; try { // set classpath project.setRawClasspath(newCP, null); // now create the actual resource for the root and populate it reset(); project.getProject().getFolder("extra").create(false, true, null); IPackageFragmentRoot newRoot = getPackageFragmentRoot("TypeHierarchyNotification", "extra"); assertTrue("New root should now be visible", newRoot != null); assertOneChange(h); h.refresh(null); // remove a classpath entry that does not impact the type hierarchy reset(); project.setRawClasspath(originalCP, null); assertTrue("Should not receive change", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a project is deleted that contains package fragments that impact the * type hierarchy, the type hierarchy should change */ public void testRemoveExternalProject() throws CoreException { try { this.createJavaProject("External", new String[] { "" }, new String[] { "JCL_LIB" }, new String[] { "/TypeHierarchyNotification" }, ""); this.createFolder("/External/p"); this.createFile("/External/p/Y.java", "package p; public class Y extends X {}"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); try { this.deleteProject("External"); assertTrue("Should receive change", this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } finally { this.deleteProject("External"); } } /** * Test removing a listener while the type hierarchy is notifying listeners. */ public void testRemoveListener() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); final ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); final ICompilationUnit superCU = getCompilationUnit("TypeHierarchyNotification", "src", "b", "B.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); ITypeHierarchyChangedListener listener = new ITypeHierarchyChangedListener() { public void typeHierarchyChanged(ITypeHierarchy th) { TypeHierarchyNotificationTests.this.changeReceived = true; TypeHierarchyNotificationTests.this.hierarchy = th; TypeHierarchyNotificationTests.this.notifications++; th.removeTypeHierarchyChangedListener(this); } }; h.addTypeHierarchyChangedListener(listener); try { // change the visibility of the super class and the 'extends' of the type we're looking at // in a batch operation getWorkspace().run(new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) { try { changeVisibility(superCU, "public", "private"); changeSuper(cu, "B", "a.A"); } catch (JavaModelException e) { assertTrue("No exception", false); } } }, null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a package is deleted, the type hierarchy should change */ public void testRemovePackage() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IPackageFragment pkg = type.getPackageFragment(); try { deleteResource(pkg.getUnderlyingResource()); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a package fragment root is removed from the classpath, the type hierarchy should change */ public void testRemovePackageFragmentRoots() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); try { project.setRawClasspath(null, null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When a project is deleted that contains package fragments that impact the * type hierarchy, the type hierarchy should change (and be made invalid) */ public void testRemoveProject() throws CoreException, IOException { ITypeHierarchy h = null; try { setUpJavaProject("TypeHierarchyDependent"); IJavaProject project = getJavaProject("TypeHierarchyDependent"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyDependent", "", "", "Dependent.java"); IType type = cu.getType("Dependent"); h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); // Sanity check assertEquals("Superclass of Dependent is a.A", "a.A", h.getSuperclass(type).getFullyQualifiedName()); // Delete a related project IResource folder = getJavaProject("TypeHierarchyNotification").getUnderlyingResource(); deleteResource(folder); assertOneChange(h); assertTrue("Should still exist", h.exists()); h.refresh(null); IType superType = h.getSuperclass(type); assertTrue("Superclass of Dependent should be null", superType == null); // Delete the project type lives in. folder = getJavaProject("TypeHierarchyDependent").getUnderlyingResource(); deleteResource(folder); assertTrue("Should have been invalidated", !h.exists()); } finally { this.deleteProject("TypeHierarchyDependent"); if (h != null) h.removeTypeHierarchyChangedListener(this); } } /** * When type used to create a TypeHierarchyNotification is deleted, * the hierarchy should be made invalid. */ public void testRemoveType() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); try { type.delete(true, null); assertTrue("Should have been invalidated", !h.exists()); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When an involved compilation unit is renamed, the type hierarchy may change. */ public void testRenameCompilationUnit() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); try { cu.rename("X2.java", false, null); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * When an uninvolved compilation unit is renamed, the type hierarchy does not change. */ public void testRenameExternalCompilationUnit() throws CoreException { IJavaProject javaProject = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(javaProject, null); h.addTypeHierarchyChangedListener(this); ICompilationUnit cu2 = getCompilationUnit("TypeHierarchyNotification", "src", "p", "External.java"); try { cu2.rename("External2.java", false, null); assertTrue("Should not receive changes", !this.changeReceived); } finally { h.removeTypeHierarchyChangedListener(this); } } /* * Ensures that getting a non-primary working copy does NOT trigger * a type hierarchy notification for the concerned hierarchy. * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=275805 */ public void testGetWorkingCopy() throws CoreException { ITypeHierarchy h = null; ICompilationUnit superCopy = null; ICompilationUnit aWorkingCopy = null; try { createJavaProject("P"); createFolder("/P/p"); createFile("/P/p/IX.java", "package p;\n" + "public interface IX {\n" + "}"); createFile("/P/p/X.java", "package p;\n" + "public class X implements IX{\n" + "}"); superCopy = getCompilationUnit("/P/p/IX.java"); superCopy.becomeWorkingCopy(/*no progress*/ null); h = superCopy.getType("IX").newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); aWorkingCopy = getCompilationUnit("P/p/X.java").getWorkingCopy(null); assertTrue("Should receive NO change", !this.changeReceived); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); if (aWorkingCopy != null) aWorkingCopy.discardWorkingCopy(); if (superCopy != null) superCopy.discardWorkingCopy(); deleteProject("P"); } } /* * Ensures that working copies with different owner than that of the * type hierarchy listener are ignored. * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=275805 */ public void testOwner() throws CoreException { ITypeHierarchy h = null; ICompilationUnit aWorkingCopy = null; ICompilationUnit anotherWorkingCopy = null; try { createJavaProject("P"); createFolder("/P/p"); createFile("/P/p/X.java", "package p;\n" + "public class X {\n" + "}"); aWorkingCopy = getCompilationUnit("/P/p/X.java").getWorkingCopy(null); h = aWorkingCopy.getType("X").newTypeHierarchy(null); h.addTypeHierarchyChangedListener(this); anotherWorkingCopy = getCompilationUnit("/P/p/X.java").getWorkingCopy(null); anotherWorkingCopy.getBuffer().setContents("package p;\n" + "public class X extends Throwable {\n" + "}"); anotherWorkingCopy.commitWorkingCopy(/*don't force*/ false, /*no progress*/ null); assertTrue("Should receive NO change", !this.changeReceived); } finally { if (h != null) h.removeTypeHierarchyChangedListener(this); if (aWorkingCopy != null) aWorkingCopy.discardWorkingCopy(); if (anotherWorkingCopy != null) anotherWorkingCopy.discardWorkingCopy(); deleteProject("P"); } } /** * @bug 316654: ITypeHierarchyChangedListener receive spurious callbacks * * Test that a non-Java resource added to a folder package fragment root doesn't * result in a type hierarchy changed event. * * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=316654" * @throws CoreException */ public void testBug316654() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IPath filePath = project.getProject().getFullPath().append("src").append("simplefile.txt"); try { createFile(filePath.toOSString(), "A simple text file"); assertTrue("Should not receive change", !this.changeReceived); } finally { deleteFile(filePath.toOSString()); h.removeTypeHierarchyChangedListener(this); } } /** * Additional test - Test that a relevant Java source resource change results in a type hierarchy * change event. * * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=316654" * @throws CoreException */ public void testBug316654_a() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); ICompilationUnit cu = getCompilationUnit("TypeHierarchyNotification", "src", "p", "X.java"); IType type = cu.getType("X"); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); IPath filePath = project.getProject().getFullPath().append("src").append("p").append("Y.java"); try { createFile(filePath.toOSString(), "package p;\n" + "class Y extends X{\n" + "}"); assertOneChange(h); } finally { deleteFile(filePath.toOSString()); h.removeTypeHierarchyChangedListener(this); } } /** * Additional test - Test that a relevant external archive change results in a type hierarchy * change event. * * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=316654" * @throws CoreException */ public void testBug316654_b() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); refreshExternalArchives(project); String externalJCLPathString = getExternalJCLPathString("1.5"); File jarFile = new File(externalJCLPathString); long oldTimestamp = jarFile.lastModified(); assertTrue("File does not exist", jarFile.exists()); IType throwableClass = getClassFile("TypeHierarchyNotification", externalJCLPathString, "java.lang", "Throwable.class").getType(); ITypeHierarchy h = throwableClass.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); reset(); try { jarFile.setLastModified(System.currentTimeMillis()); refreshExternalArchives(project); assertOneChange(h); } finally { jarFile.setLastModified(oldTimestamp); h.removeTypeHierarchyChangedListener(this); } } /** * Additional test - Test that a relevant archive change results in a type hierarchy * change event. * * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=316654" * @throws CoreException */ public void testBug316654_c() throws CoreException { IJavaProject project = getJavaProject("TypeHierarchyNotification"); IPath jarPath = project.getPath().append("test316654.jar"); IFile jarFile = getFile(jarPath.toOSString()); IType type = getClassFile("TypeHierarchyNotification", jarPath.toOSString(), "a", "A.class").getType(); ITypeHierarchy h = type.newTypeHierarchy(project, null); h.addTypeHierarchyChangedListener(this); reset(); try { jarFile.touch(null); refresh(project); assertOneChange(h); } finally { h.removeTypeHierarchyChangedListener(this); } } /** * Make a note of the change */ public void typeHierarchyChanged(ITypeHierarchy typeHierarchy) { this.changeReceived = true; this.hierarchy = typeHierarchy; this.notifications++; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
accf90bb7fcea661bcd12d270904a05195a2a6cd
f6ea97786513514d77268ca91e5d1f776d8daba9
/src/test/java/runners/Runner.java
93f86e640f1a25d75e78c293d5532c0e74f7a8d9
[]
no_license
fabioej/AutomacaoWebJavaSeleniumCucumber
499de12fa7d2c6eff50c7be0e8355239d0abefff
f7556c6a46b56dceec57bd3b2019f57817a8eadc
refs/heads/master
2023-04-29T20:03:58.511596
2021-05-15T06:22:16
2021-05-15T06:22:16
367,548,715
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package runners; import org.junit.runner.RunWith; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; @RunWith(Cucumber.class) @CucumberOptions( features = "src/test/resources/features/preencher_formularios_seguro.feature", glue = "steps", tags = "@PreencherFormularioSeguro", plugin = {"pretty", "html:target/cucumber.html"}, monochrome= true ) public class Runner { }
[ "fabio_e@apple.com" ]
fabio_e@apple.com
51590749f43b99183500d3af1432c5e48512ed57
7df45aa99c32deb21942d8948fe4d88c32053380
/base/obstacle/ObstacleHat.java
aa519a27c7f29cf020f54d726edca0a6b942b992
[]
no_license
linhh611/AliceInWonderRabitcave
770413637c645d0b26c05091f35e9b6730272e6c
ac34a7531c985a1899a0de4fed58908ce3b7c9a8
refs/heads/main
2023-01-29T06:36:34.751521
2020-12-11T09:06:23
2020-12-11T09:06:23
320,516,268
0
0
null
null
null
null
UTF-8
Java
false
false
314
java
package base.obstacle; public class ObstacleHat extends Obstacle {} /* Location: C:\Users\ADMIN\Downloads\Compressed\Alice in the wonderland\Alice in the wonderland\Alice in the wonder land.jar!\base\obstacle\ObstacleHat.class * Java compiler version: 10 (54.0) * JD-Core Version: 1.1.3 */
[ "linhkod97@gmail.com" ]
linhkod97@gmail.com
d6590744c22f32cfa5024525c3bdae48de5dd248
819b66d38493a672ebb23ae0eecd7546a5ea3439
/src/lxl/y2021/MAR/MatrixDiagonalSum.java
34929fabecde80c97a5da6bf87696b04cd369069
[]
no_license
lxlzyc/leetcode-hz
b950f2c9df7c0127e0d9f13ec70e31685bf29aa8
13bd127d13ffc2e27cf36a089206fc736d1c545c
refs/heads/master
2021-06-25T09:02:20.246917
2021-04-06T01:45:21
2021-04-06T01:45:21
223,842,761
1
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package lxl.y2021.MAR; /** * @author lxl * @program leetcode-hz * @description: 1572. 矩阵对角线元素的和 * 给你一个正方形矩阵 mat,请你返回矩阵对角线元素的和。 * <p> * 请你返回在矩阵主对角线上的元素和副对角线上且不在主对角线上元素的和。 * <p> * <p> * <p> * 示例 1: * <p> * 输入:mat = [[1,2,3], * [4,5,6], * [7,8,9]] * 输出:25 * 解释:对角线的和为:1 + 5 + 9 + 3 + 7 = 25 * 请注意,元素 mat[1][1] = 5 只会被计算一次。 * <p> * 示例 2: * <p> * 输入:mat = [[1,1,1,1], * [1,1,1,1], * [1,1,1,1], * [1,1,1,1]] * 输出:8 * <p> * 示例 3: * <p> * 输入:mat = [[5]] * 输出:5 * <p> * <p> * <p> * 提示: * <p> * n == mat.length == mat[i].length * 1 <= n <= 100 * 1 <= mat[i][j] <= 100 * <p> * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/matrix-diagonal-sum * 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 * @date 2021/3/26 13:46 * @Version 1.0 */ public class MatrixDiagonalSum { public int diagonalSum(int[][] mat) { int m = mat.length; int n = mat[0].length; int ans = 0; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (i == j || m - i + 1 == j) { ans += mat[i][j]; } } } return ans; } }
[ "liuxiangli@hbh.ltd" ]
liuxiangli@hbh.ltd
a98a2652f624d142efa3389af846539798d99c9c
52b866b41fc5d5a5bb3027eeb6e0e74b1a9f5477
/src/general_Algorithm_Questions/Integer_Reverse.java
6dca9d25bb9e2abc752c11efcd7b5bda24ddb7e3
[]
no_license
JazMek/Interview_Questions
050b561093472a8274c46e49b5c066fcc978c655
bcf725446ecb76adcdf96614e2b62ae5ca4c3c32
refs/heads/master
2023-01-20T22:41:02.056899
2020-11-25T01:40:01
2020-11-25T01:40:01
298,133,262
1
0
null
null
null
null
UTF-8
Java
false
false
2,119
java
package general_Algorithm_Questions; public class Integer_Reverse { /* Java program to reverse a given Integer number: Write a method to reverse a given Integer number. Note: Avoid using the in-built method. Note: Use in-built method. Input : 3 Expected Result : 3 Input : 18 Expected Result : 81 Input : 230 Expected Result : 23 Input : 1987 Expected Result : 7891 Input : 0 Expected Result : 0 Input :123456986 ===> max characters accepted du to the integer size limit. Expected Result :689654321 */ public static void main(String[] args) { int num= 123456986; // System.out.println(reverse_Integer_Using_In_Built_Method(num)); System.out.println(reverse_Integer_Avoid_Using_In_Built_Method(num)); } // Reverse integer using in built method (using the string class characteristics) public static long reverse_Integer_Using_In_Built_Method(int num){ String Xstring =Integer.toString(num); StringBuffer sb= new StringBuffer (Xstring); String reversedXstring=sb.reverse().toString(); int reversedNumber =Integer.parseInt(reversedXstring); return reversedNumber; } // Reverse integer using in built method public static int reverse_Integer_Using_In_Built_Method1(int num){ Integer x=Integer.valueOf(num); String xstr=x.toString(); StringBuilder sb =new StringBuilder(xstr); String xsb=sb.reverse().toString(); Integer Inxstr=Integer.parseInt(xsb); int reversx=Inxstr.intValue(); return reversx; } // Reverse integer avoid using in built method public static int reverse_Integer_Avoid_Using_In_Built_Method(int num){ int revnum=0; while(num!=0){ revnum=(revnum*10)+num%10; num=num/10; } return revnum; } }
[ "karimmekdoud@gmail.com" ]
karimmekdoud@gmail.com
3608f5c48c35effc1e028b5a0c0b8bd4541f79b5
e7b55a9c8690a3f7e9b9f83d802a26fc902ee27e
/src/main/java/com/techmentor/Repo/UserRepo.java
e562f520594a49d9e6d8421187e8766b9dcde8a3
[]
no_license
harshkoshta/techmentor
65b792f8d4074f6ad84cf4c61abe1bc37081d21c
16b6105a838cb5ce65f1e717906d801190a1043e
refs/heads/main
2023-08-09T12:53:41.924079
2021-06-27T11:24:32
2021-06-27T11:24:32
380,718,658
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package com.techmentor.Repo; import com.techmentor.Model.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface UserRepo extends JpaRepository<User, String> { }
[ "koshta15@gmail.com" ]
koshta15@gmail.com
e2762f0c0edf3c21d2c0951f71af01d72ec8456e
8b17e5947d87abeb6bac6343cb40b9b340c17d86
/mobile-model/src/main/java/com/polyglot/mobile/model/bloomberg/quote/MediaQuote.java
a868ea80eda112fd9235971eed584fb5631e9feb
[]
no_license
rahulgarg21/mobile
be9dfa876cef2cf1670e5204709d77581cabb25c
40f040adaa95be83c38784be1122f67d9a549314
refs/heads/master
2020-06-01T19:29:42.750709
2015-11-02T02:44:20
2015-11-25T02:42:54
42,905,934
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package com.polyglot.mobile.model.bloomberg.quote; import com.polyglot.mobile.model.bloomberg.common.BModel; /** * Created by Rajiv Singla on 11/1/2015. */ public interface MediaQuote extends BModel { }
[ "Rajiv.Singla.NJ@gmail.com" ]
Rajiv.Singla.NJ@gmail.com
02e1db907ae96c5de8e110e150e3013fb4883938
cccccbd92a308c8b6fa4ec3ccd33cf0995345680
/src/test/java/TimElastixAPI.java
5c4779e125e72b41fc3571eeed85f12bd26f89df
[]
no_license
tischi/DEPRECATED-fiji-plugin-elastixWrapper
9f06cc2a8a00c485fe9c0451ae37fbf487884013
d02bb91820d5912c68cc31b6e562f7d6e5d14145
refs/heads/master
2021-11-03T09:10:38.950890
2019-04-26T08:44:01
2019-04-26T08:44:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,779
java
import bdv.util.Bdv; import de.embl.cba.elastixwrapper.elastix.ElastixSettings; import de.embl.cba.elastixwrapper.elastix.ElastixWrapper; import net.imagej.ImageJ; public class TimElastixAPI { public static void main( String[] args ) { final ImageJ ij = new ImageJ(); ij.ui().showUI(); ElastixSettings settings = new ElastixSettings(); settings.logService = ij.log(); settings.elastixDirectory = "/Applications/elastix_macosx64_v4.8" ; settings.workingDirectory = "/Users/tischer/Desktop/elastix-tmp"; settings.transformationType = ElastixSettings.AFFINE; settings.fixedImageFilePath = "/Users/tischer/Desktop/tim-elastix/template.tif"; settings.movingImageFilePath = "/Users/tischer/Desktop/tim-elastix/bUnwarpJ_pass.tif"; /** * You want to match the first channel (0) in the fixed image, * - which has only one channel - * to the second channel (1) in the moving image * - which has two channels - */ settings.fixedToMovingChannel.put( 0, 1 ); settings.downSamplingFactors = "10 10"; // settings.fixedMaskPath = ""; // settings.movingMaskPath = ""; // settings.bSplineGridSpacing = "50 50 50"; settings.iterations = 1000; settings.spatialSamples = "3000"; // settings.channelWeights = new double[]{1.0, 3.0, 3.0, 1.0, 1.0}; // settings.finalResampler = ElastixSettings.FINAL_RESAMPLER_LINEAR; final ElastixWrapper elastixWrapper = new ElastixWrapper( settings ); elastixWrapper.runElastix(); //elastixWrapper.createTransformedImagesAndSaveAsTiff(); final Bdv bdv = elastixWrapper.reviewResults(); bdv.close(); settings.logService.info( "Done!" ); } private static String getImageFilePath( String relativePath ) { return TimElastixAPI.class.getResource( relativePath ).getFile().toString(); } }
[ "christian.tischer@embl.de" ]
christian.tischer@embl.de
198b2e86f1319087cefc16605034966c65f4b3a1
1a7b9080eabf5258baf80d3b0438db1f1965040a
/restaurant-manager/src/main/java/it/unipd/tos/business/RestaurantBill.java
12cb909ddc29a8d698af97b3f69a234fcc9c7219
[]
no_license
Dogemist/assignment2
5f9a611f8ee2215d9919904e23f92295fcfd25ad
bf6ae9976f6ba31e9bd14680fcdc39bc71d806f6
refs/heads/master
2020-04-10T05:13:15.005475
2018-12-14T10:58:50
2018-12-14T10:58:50
160,819,812
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
//////////////////////////////////////////////////////////////////// // [Enrico] [Trinco] [1121850] //////////////////////////////////////////////////////////////////// package it.unipd.tos.business; import java.util.List; import it.unipd.tos.business.exception.RestaurantBillException; import it.unipd.tos.model.MenuItem; public interface RestaurantBill { double getOrderPrice(List<MenuItem> itemsOrdered) throws RestaurantBillException; }
[ "enricotrinco95@hotmail.it" ]
enricotrinco95@hotmail.it
740d15746ea2cf3399e7108b28c92a4df0b9d733
cc885dc4bcbdfc596126182b3eee2630cbbbec85
/java prof/java desktop/TransformaEmNumerosRomanos/src/EEEnumerosRomanos.java
93ac60f41a930effa5f86c523034b2f1858936ec
[]
no_license
MullerL/JavaExercicios
249c4985a2e4c80c666e20d756969dd56dbd9183
ed4cfad1905cc94ee4b56b1579a5577b0f3b794c
refs/heads/master
2021-01-10T16:30:05.318787
2016-04-05T13:54:24
2016-04-05T13:54:24
55,510,870
0
0
null
null
null
null
UTF-8
Java
false
false
2,363
java
import java.util.Scanner; /** * @author Müller */ public class EEEnumerosRomanos { public static void main (String args []) { Scanner absorvendoDigitado = new Scanner(System.in); System.out.println("Digite um numero que transformo para romano"); int numero = absorvendoDigitado.nextInt(); while(!(numero == 1)) { while((numero % 1000) == 0 && (!(numero == 1))) { System.out.print("M"); numero /= 1000; } while((numero % 900) == 0 && (!(numero == 1))) { System.out.print("CM"); numero /= 900; } while((numero % 500) == 0 && (!(numero == 1))) { System.out.print("D"); numero /= 500; } while((numero % 400) == 0 && (!(numero == 1))) { System.out.print("CD"); numero /= 400; } while((numero % 100) == 0 && (!(numero == 1))) { System.out.print("C"); numero /= 100; } while((numero % 90) == 0 && (!(numero == 1))) { System.out.print("XC"); numero /= 90; } while((numero % 50) == 0 && (!(numero == 1))) { System.out.print("L"); numero /= 50; } while((numero % 40) == 0 && (!(numero == 1))) { System.out.print("XL"); numero /= 40; } while((numero % 10) == 0 && (!(numero == 1))) { System.out.print("X"); numero /= 10; } while((numero % 9) == 0 && (!(numero == 1))) { System.out.print("IX"); numero /= 9; } while((numero % 5) == 0 && (!(numero == 1))) { System.out.print("V"); numero /= 5; } while((numero % 4) == 0 && (!(numero == 1))) { System.out.print("IV"); numero /= 4; } while((numero % 1) == 0 && (!(numero == 1))) { System.out.print("I"); numero -= 1; } } } }
[ "mlnw10@192.168.1.11" ]
mlnw10@192.168.1.11
0683a45f9391e6a6127158b2cd1ad1745367b0d6
d82c6771efd7f9015f7c237ed800f984fbcf5dd0
/src/main/java/basaki/intprod/FileNameDataFormat.java
ac9b1b6f86450426d7b3c58d1cf82318bb03a2e4
[]
no_license
bluedino/camel-example
fd430b76d4241e37fe32dc4ed98c36925ff27bb1
4138ae04d7472721805b4979271d24d9eaf6e3ed
refs/heads/master
2016-09-05T17:32:47.659703
2015-03-06T02:33:47
2015-03-06T02:33:47
31,748,596
0
0
null
null
null
null
UTF-8
Java
false
false
947
java
package basaki.intprod; import java.io.InputStream; import java.io.OutputStream; import java.util.Calendar; import org.apache.camel.Exchange; import org.apache.camel.spi.DataFormat; public class FileNameDataFormat implements DataFormat { @Override public void marshal(Exchange exchange, Object graph, OutputStream stream) throws Exception { System.out.println("*** entering ExchangeToStringDataFormat.marshal"); exchange.getOut().setHeader(Exchange.FILE_NAME, "l" + Calendar.getInstance().getTime().getTime() + ".txt"); String message = exchange.getIn().getBody(String.class); System.out.println("&&&&& " + exchange.getIn().getBody(String.class)); System.out.println("message: " + message); stream.write(message.getBytes()); System.out.println("*** exiting ExchangeToStringDataFormat.marshal"); } @Override public Object unmarshal(Exchange exchange, InputStream stream) throws Exception { return null; } }
[ "bit3784@yahoo.com" ]
bit3784@yahoo.com
aff2deacb0f0d1057022848308cf44279b0349c7
1977db9371bc3304dc9d54c701082c228d2c7727
/lookup-core/src/main/java/id/co/telkomsigma/lookup/service/SvcLookupHeaderIntf.java
1f7b2767e1dbcd10ee4500d3e135099551c83bd7
[]
no_license
agampradhana/lookup-maintenance
7deb1b5ece604fabed9a698664bf5c4076e8cdfa
76ce34363886712f025391bed0dfc34dc9d4b123
refs/heads/master
2016-09-10T13:24:45.230283
2015-05-19T07:03:15
2015-05-19T07:03:15
35,853,673
0
0
null
null
null
null
UTF-8
Java
false
false
365
java
package id.co.telkomsigma.lookup.service; import id.co.telkomsigma.lookup.entity.LookupHeader; public interface SvcLookupHeaderIntf { public LookupHeader findLookupHeaderByHeaderCode(String headerCode); public void insert(LookupHeader lookupHeader); public void update(String headerCode, LookupHeader lookupHeader); public void delete(String headerCode); }
[ "sarasuartha@sigma.co.id" ]
sarasuartha@sigma.co.id
537cd583c7e45b526d5b63033503d9e501532a3e
c210ad08ef5fd11cd8a9df4c375d9ff511027f10
/src/Theatre/MovieDBController.java
6910772701e52e3e455785d7a3a2fcbcfbe0fd3d
[]
no_license
jposyluzny/ENSF619TermProject
79d3d7e9ba9f82151e0f2a4364dfa7202edb4417
83b1318c264165923d4e506db546a8f9cb30f8e1
refs/heads/master
2023-02-19T07:34:46.113710
2021-01-20T02:10:41
2021-01-20T02:10:41
310,735,171
1
0
null
2020-12-01T02:08:12
2020-11-07T00:28:47
Java
UTF-8
Java
false
false
1,325
java
package Theatre; import java.sql.*; /** * Controller class for the Movie database controller. This class functions on the assumption that the SQL database * has already been initialized and populated (this is done through two .sql scripts) */ public class MovieDBController extends DBController{ /** * Single instance of MovieDBController */ static MovieDBController singleInstance = null; /** * Method to get all movies from database * @return ResultSet containing all movies */ public ResultSet initializeMovies(){ String sql = "SELECT * FROM movie"; ResultSet movies = null; try { statement = jdbc_connection.prepareStatement(sql); movies = statement.executeQuery(); } catch (SQLException throwables) { throwables.printStackTrace(); } return movies; } /** * Method for getting single instance of MovieDBController * @return MovieDBController instance */ public static MovieDBController getSingleInstance() { if(singleInstance == null){ singleInstance = new MovieDBController(); } return singleInstance; } public static void main(String[] args) { MovieDBController a = new MovieDBController(); } }
[ "ryan.raimondo@gmail.com" ]
ryan.raimondo@gmail.com
bb65259b6cdfc0cf509805c22539c1b9fc4f0da4
be28a7b64a4030f74233a79ebeba310e23fe2c3a
/generated-tests/rmosa/tests/s1024/19_jmca/evosuite-tests/com/soops/CEN4010/JMCA/JParser/JavaParserTokenManager_ESTest_scaffolding.java
ff5c29c58c5ac258fc24833dd40db9fc3fc2cc2a
[ "MIT" ]
permissive
blindsubmissions/icse19replication
664e670f9cfcf9273d4b5eb332562a083e179a5f
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
refs/heads/master
2020-03-27T06:12:34.631952
2018-08-25T11:19:56
2018-08-25T11:19:56
146,074,648
0
0
null
null
null
null
UTF-8
Java
false
false
4,845
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Aug 23 16:34:39 GMT 2018 */ package com.soops.CEN4010.JMCA.JParser; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class JavaParserTokenManager_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("file.encoding", "UTF-8"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); java.lang.System.setProperty("user.country", "US"); java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/19_jmca"); java.lang.System.setProperty("user.home", "/home/ubuntu"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "ubuntu"); java.lang.System.setProperty("user.timezone", "Etc/UTC"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JavaParserTokenManager_ESTest_scaffolding.class.getClassLoader() , "com.soops.CEN4010.JMCA.JParser.JavaCharStream", "com.soops.CEN4010.JMCA.JParser.Token$GTToken", "com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager", "com.soops.CEN4010.JMCA.JParser.TokenMgrError", "com.soops.CEN4010.JMCA.JParser.JavaParserConstants", "com.soops.CEN4010.JMCA.JParser.Token" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JavaParserTokenManager_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager", "com.soops.CEN4010.JMCA.JParser.JavaParserConstants", "com.soops.CEN4010.JMCA.JParser.JavaCharStream", "com.soops.CEN4010.JMCA.JParser.TokenMgrError", "com.soops.CEN4010.JMCA.JParser.Token", "com.soops.CEN4010.JMCA.JParser.Token$GTToken" ); } }
[ "my.submission.blind@gmail.com" ]
my.submission.blind@gmail.com
c2a2b4ee514abb25e9a6e3f3d118e6970d61324e
2b0035e70aa00ae98ae5a6a895e0969a4b0963f5
/auth-core/src/main/java/com/guoyao/auth/core/util/Validator.java
428913fe606267a288484c38b6876bc0c9c811ac
[]
no_license
DeepLife-wu/auth
3b33e239cc78f803f7117541519561d1f9b40b0d
57934c190e520ac9e54d36b7f73acefb82c81382
refs/heads/master
2023-08-02T22:03:15.465051
2019-04-17T00:29:50
2019-04-17T00:29:50
181,587,594
0
0
null
null
null
null
UTF-8
Java
false
false
4,190
java
package com.guoyao.auth.core.util; import java.util.regex.Pattern; /** * 校验器:利用正则表达式校验邮箱、手机号等 * gyq */ public class Validator { /** * 正则表达式:验证用户名(不包含中文和特殊字符)如果用户名使用手机号码或邮箱 则结合手机号验证和邮箱验证 */ /** 表单验证使用的是此正则^[A-Za-z]{1}\\w+*/ public static final String REGEX_USERNAME = "^[a-zA-Z]\\w{5,17}$"; /** * 正则表达式:验证密码(不包含特殊字符) */ public static final String REGEX_PASSWORD = "^[a-zA-Z0-9]{6,16}$"; /** *说明:移动:134、135、136、137、138、139、150、151、157(TD)、158、159、187、188 * 联通:130、131、132、152、155、156、185、186 * 电信:133、153、180、189 * 总结起来就是第一位必定为1,第二位必定为3或5或8,其他位置的可以为0-9 * 验证号码 手机号 固话均可 * 正则表达式:验证手机号 */ /** 表单校验使用的是此正则(^[0-9]{11}$)*/ public static final String REGEX_MOBILE = "((^(13|15|18)[0-9]{9}$)|(^0[1,2]{1}\\d{1}-?\\d{8}$)|(^0[3-9] {1}\\d{2}-?\\d{7,8}$)|(^0[1,2]{1}\\d{1}-?\\d{8}-(\\d{1,4})$)|(^0[3-9]{1}\\d{2}-? \\d{7,8}-(\\d{1,4})$))"; /** * 正则表达式:验证邮箱 */ /** 表单验证使用的是此正则(([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$)*/ public static final String REGEX_EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; /** * 正则表达式:验证汉字(1-9个汉字) {1,9} 自定义区间 */ public static final String REGEX_CHINESE = "^[\u4e00-\u9fa5]{1,9}$"; /** * 正则表达式:验证身份证 */ public static final String REGEX_ID_CARD = "(\\d{14}[0-9a-zA-Z])|(\\d{17}[0-9a-zA-Z])"; /** * 正则表达式:验证URL */ public static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?"; /** * 正则表达式:验证IP地址 */ public static final String REGEX_IP_ADDR = "(2[5][0-5]|2[0-4]\\d|1\\d{2}|\\d{1,2})\\.(25[0-5]|2[0-4]\\d|1\\d{2}|\\d{1,2})\\.(25[0-5]|2[0-4]\\d|1\\d{2}|\\d{1,2})\\.(25[0-5]|2[0-4]\\d|1\\d{2}|\\d{1,2})"; /** * 校验用户名 * * @param username * @return 校验通过返回true,否则返回false */ public static boolean isUsername(String username) { return Pattern.matches(REGEX_USERNAME, username); } /** * 校验密码 * * @param password * @return 校验通过返回true,否则返回false */ public static boolean isPassword(String password) { return Pattern.matches(REGEX_PASSWORD, password); } /** * 校验手机号 * * @param mobile * @return 校验通过返回true,否则返回false */ public static boolean isPhone(String mobile) { return Pattern.matches(REGEX_MOBILE, mobile); } /** * 校验邮箱 * * @param email * @return 校验通过返回true,否则返回false */ public static boolean isEmail(String email) { return Pattern.matches(REGEX_EMAIL, email); } /** * 校验汉字 * * @param chinese * @return 校验通过返回true,否则返回false */ public static boolean isChinese(String chinese) { return Pattern.matches(REGEX_CHINESE, chinese); } /** * 校验身份证 * * @param idCard * @return 校验通过返回true,否则返回false */ public static boolean isIDCard(String idCard) { return Pattern.matches(REGEX_ID_CARD, idCard); } /** * 校验URL * * @param url * @return 校验通过返回true,否则返回false */ public static boolean isUrl(String url) { return Pattern.matches(REGEX_URL, url); } /** * 校验IP地址 * * @param ipAddress * @return */ public static boolean isIPAddress(String ipAddress) { return Pattern.matches(REGEX_IP_ADDR, ipAddress); } }
[ "2721177083@qq.om" ]
2721177083@qq.om
d70393ed55868f3b0c70c8eaa6b8c3d09ab05e72
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/2.3.0/code/base/dso-l2/src/com/tc/objectserver/tx/TransactionAccountImpl.java
5182ae2d88b1faf898fb2d2c65d5e7be47db4697
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
5,168
java
/* * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tc.objectserver.tx; import com.tc.net.protocol.tcm.ChannelID; import com.tc.object.tx.TransactionID; import com.tc.util.Assert; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; /** * An account of the state of a given transaction. Keeps track of the initiating client, the state of the transaction * (applied, committed, etc), clients the transaction has been broadcast to, and clients that have ACKed the * transaction. * */ public class TransactionAccountImpl implements TransactionAccount { final ChannelID clientID; private final Map waitees = Collections.synchronizedMap(new HashMap()); public TransactionAccountImpl(ChannelID clientID) { this.clientID = clientID; } public String toString() { return "TransactionAccount[" + clientID + ": waitees=" + waitees + "]\n"; } public ChannelID getClientID() { return clientID; } /* * returns true if completed, false if not completed or if the client has sent a duplicate ACK. */ public boolean removeWaitee(ChannelID waitee, TransactionID requestID) { TransactionRecord transactionRecord = getRecord(requestID); if (transactionRecord == null) return false; synchronized (transactionRecord) { transactionRecord.remove(waitee); return checkCompleted(requestID, transactionRecord); } } public void addWaitee(ChannelID waitee, TransactionID requestID) { TransactionRecord record = getOrCreateRecord(requestID); synchronized (record) { boolean added = record.addWaitee(waitee); Assert.eval(added); } } private TransactionRecord getOrCreateRecord(TransactionID requestID) { synchronized (waitees) { TransactionRecord transactionRecord = getRecord(requestID); if (transactionRecord == null) { waitees.put(requestID, (transactionRecord = new TransactionRecord())); } return transactionRecord; } } private TransactionRecord getRecord(TransactionID requestID) { TransactionRecord transactionRecord = (TransactionRecord) waitees.get(requestID); return transactionRecord; } public boolean skipApplyAndCommit(TransactionID requestID) { TransactionRecord transactionRecord = getOrCreateRecord(requestID); synchronized (transactionRecord) { transactionRecord.applyAndCommitSkipped(); return checkCompleted(requestID, transactionRecord); } } public void applyStarted(TransactionID requestID) { TransactionRecord transactionRecord = getOrCreateRecord(requestID); synchronized (transactionRecord) { transactionRecord.applyStarted(); } } public boolean applyCommitted(TransactionID requestID) { TransactionRecord transactionRecord = getRecord(requestID);// (TransactionRecord) waitees.get(requestID); if (transactionRecord == null) { // this can happen when a client crashes and there are still some unprocessed apply messages in the // queue. We dont want to try to send acks for such scenario. return false; } synchronized (transactionRecord) { transactionRecord.applyCommitted(); return checkCompleted(requestID, transactionRecord); } } public boolean broadcastCompleted(TransactionID requestID) { TransactionRecord transactionRecord = getRecord(requestID);// (TransactionRecord) waitees.get(requestID); if (transactionRecord == null) { // this could happen when a client crashes and there are still some unprocessed apply messages in the // queue. We dont want to try to send acks for such scenario. return false; } synchronized (transactionRecord) { transactionRecord.broadcastCompleted(); return checkCompleted(requestID, transactionRecord); } } public boolean relayTransactionComplete(TransactionID requestID) { TransactionRecord transactionRecord = getOrCreateRecord(requestID); synchronized (transactionRecord) { transactionRecord.relayTransactionComplete(); return checkCompleted(requestID, transactionRecord); } } public boolean hasWaitees(TransactionID requestID) { TransactionRecord record = getRecord(requestID); if (record == null) return false; synchronized (record) { return !record.isEmpty(); } } public Set requestersWaitingFor(ChannelID waitee) { Set requesters = new HashSet(); synchronized (waitees) { for (Iterator i = new HashSet(waitees.keySet()).iterator(); i.hasNext();) { TransactionID requester = (TransactionID) i.next(); // if (((Set) waitees.get(requester)).contains(waitee)) if (getRecord(requester).contains(waitee)) { requesters.add(requester); } } } return requesters; } private boolean checkCompleted(TransactionID requestID, TransactionRecord record) { if (record.isComplete()) { waitees.remove(requestID); return true; } return false; } }
[ "jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
17ee234749819e0d5203d5b2fc0c63811041145f
568f1f0b83add1805558521f31ceac9949ba8004
/src/Logic/GreatestCommonDivisor.java
86f464c831be85d9a8980976f335ce3c857825ac
[]
no_license
skotcharat/JavaBatchJanuary2021
b5089483a40e4be37702380df08d15e3bb18a5e1
82ad110268a76cfd4f8ab14c5b56835fd12920fc
refs/heads/master
2023-03-10T19:13:04.923208
2021-03-02T18:25:48
2021-03-02T18:25:48
339,181,466
0
0
null
null
null
null
UTF-8
Java
false
false
619
java
package Logic; /** * * @author student * Greatest Common Divisor The Greatest Common Divisor of two positive integers is the largest integer that divides both without remainder. Write a method that returns the Greatest Common Divisor of p and q. */ public class GreatestCommonDivisor { public static void main(String[] args) { System.out.println(gcd(55, 5)); } public static Integer gcd(Integer num1, Integer num2) { int gcd = 0; for(int i = 1; i <= num1 && i <= num2; i++) { if(num1 % i == 0 && num2 % i == 0) gcd = i; } return gcd; } }
[ "skotcharat@madisoncollege.edu" ]
skotcharat@madisoncollege.edu
e9a0e4d9b7d933c308a40ff81577802012d59c8b
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/17c940fa479804a3da68b83caf85354a88783637/after/LibrariesValidatorContextImpl.java
30594fc7ae4caa1317d1f7a0e70f43d258e9cbb4
[]
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
1,883
java
/* * Copyright (c) 2000-2007 JetBrains s.r.o. All Rights Reserved. */ package com.intellij.facet.impl.ui.libraries; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.NotNull; import com.intellij.openapi.roots.ModuleRootModel; import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable; import com.intellij.openapi.roots.ui.configuration.ModulesProvider; import com.intellij.openapi.roots.ui.configuration.DefaultModulesProvider; import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory; import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer; import com.intellij.openapi.roots.libraries.LibraryTable; import com.intellij.openapi.project.Project; import com.intellij.openapi.module.Module; /** * @author nik */ public class LibrariesValidatorContextImpl implements LibrariesValidatorContext { private Module myModule; private LibrariesContainer myLibrariesContainer; public LibrariesValidatorContextImpl(final @NotNull Module module) { myModule = module; myLibrariesContainer = LibrariesContainerFactory.createContainer(module); } @Nullable public ModuleRootModel getRootModel() { return ModuleRootManager.getInstance(myModule); } @Nullable public ModifiableRootModel getModifiableRootModel() { return null; } private LibraryTable getProjectLibraryTable() { return ProjectLibraryTable.getInstance(myModule.getProject()); } @NotNull public ModulesProvider getModulesProvider() { return new DefaultModulesProvider(myModule.getProject()); } @Nullable public Project getProject() { return myModule.getProject(); } public LibrariesContainer getLibrariesContainer() { return myLibrariesContainer; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
748d515ef4cc86a756999c7bdfac0060dcd546b6
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/google/android/gms/maps/model/ButtCap.java
bbd19b1dd95840a7943f47ef0d956d01078a7d45
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package com.google.android.gms.maps.model; public final class ButtCap extends Cap { public ButtCap() { super(0); } @Override // com.google.android.gms.maps.model.Cap, java.lang.Object public final String toString() { return "[ButtCap]"; } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
47e7f963017db066a91a28f7ce5f49b9472e9751
5727f930c896154e7f4c2890bdcece55b5e03e02
/src/edu/cmu/java/development/application/util/DateTimeSerializer.java
7372b5ca372cdc48d2a61b497d24fbb4b4caeb52
[]
no_license
oximer/meetapenguim_server
2dd9f230460e63c38c67222bf1e20d32e0763084
6a9e7eb2f7bdcee0caa3c45cd1046e75df49bfb6
refs/heads/master
2021-01-09T07:59:20.887350
2016-08-02T17:49:13
2016-08-02T17:49:13
56,031,131
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package edu.cmu.java.development.application.util; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import org.joda.time.DateTime; import java.io.IOException; public class DateTimeSerializer extends JsonSerializer<DateTime> { @Override public void serialize(DateTime value, JsonGenerator gen, SerializerProvider arg2) throws IOException, JsonProcessingException { gen.writeString(value.toString()); } }
[ "oximer@gmail.com" ]
oximer@gmail.com
6fa2e5572f7fa3311ad8552165104a0794c12b7a
625df274c4a1cbd86e3bf76cd712320fcfdfd3bd
/addressbook-web-tests/src/test/java/ru/stqa/msl/addressbook/appmanager/NavigationHelper.java
59a21521d6b2dc8efc8b828de2da24e4e89db270
[ "Apache-2.0" ]
permissive
ma1m2/java_ab
22b4a6f18abd103dc5b3ef578e98c8cbf1331022
43e06cf83ec25d4c9429f55bde5d08b96fdb5c45
refs/heads/master
2021-08-26T09:45:44.887651
2017-11-23T05:10:52
2017-11-23T05:10:52
103,624,934
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
package ru.stqa.msl.addressbook.appmanager; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class NavigationHelper extends HelperBase { public NavigationHelper(WebDriver wd) { super(wd); } public void groupPage() { if (isElementPresent(By.tagName("h1")) && wd.findElement(By.tagName("h1")).getText().equals("Groups") && isElementPresent(By.name("new"))) { return; } click(By.linkText("groups")); } public void homePage() { if (isElementPresent(By.id("maintable"))){ return; } click(By.linkText("home")); } }
[ "ma1m2@mail.ru" ]
ma1m2@mail.ru
4fac0c94f15a1cb0172b16b2d05bf58c46336a51
370809a91dcec755d96dac4e5506478edbabe5a9
/src/main/java/com/example/demo/common/HandlerMapping.java
dd6959a37efdec2121aa8076876703ab737bdb7b
[]
no_license
dgxwl/diyMVC
802301b5df2029d52f2f447811705e3c9e3ffc62
6a63dd39b3210d3ee87fe65ce6949ca08fc33a7e
refs/heads/master
2020-03-29T02:17:58.530025
2018-09-27T07:15:58
2018-09-27T07:15:58
149,429,070
0
0
null
null
null
null
UTF-8
Java
false
false
1,237
java
package com.example.demo.common; import java.lang.reflect.Method; import java.util.HashMap; import java.util.List; import java.util.Map; import com.example.demo.annotation.RequestMapping; /** * 映射处理器 * 建立请求url与对应处理类及处理类方法的对应关系 * @author Administrator * */ public class HandlerMapping { //key:请求路径, value:处理类及处理类方法 private Map<String, Handler> handlerMap = new HashMap<>(); public void process(List<Object> controllers) { for (Object con : controllers) { //获得controller的class Class<?> clazz = con.getClass(); //获得所有方法 Method[] methods = clazz.getDeclaredMethods(); //查找带有@RequestMapping的方法(是处理请求的方法) for (Method mh : methods) { //获取方法上的注解 RequestMapping rm = mh.getAnnotation(RequestMapping.class); if (rm == null) { continue; } String path = rm.value(); if (!path.startsWith("/")) { path = "/" + path; } handlerMap.put(path, new Handler(con, mh)); } } System.err.println(handlerMap); } public Handler getHandler(String path) { return handlerMap.get(path); } }
[ "1029325214@qq.com" ]
1029325214@qq.com
6485ae01dea362ce2cbbbb224a039ad1d0ceca6c
50586b4eb223a82ea49abf26f37760c3d8d71be5
/src/main/java/org/nav/solution/controller/EmployeeExcelBuilder.java
71199caa80b78dee86231654acba24c60b295715
[]
no_license
sunilshrestha123/NavProject
96e986efd64bec48d740ebc2aadbcb83c3594810
a0156953ba735ce53adede97c1abef4e7edd622f
refs/heads/master
2020-03-11T18:00:19.003094
2018-09-05T06:12:37
2018-09-05T06:12:37
130,163,965
0
0
null
null
null
null
UTF-8
Java
false
false
3,146
java
//package org.nav.solution.controller; // //import org.apache.poi.hssf.usermodel.HSSFFont; //import org.apache.poi.hssf.usermodel.HSSFRow; //import org.apache.poi.hssf.usermodel.HSSFSheet; //import org.apache.poi.hssf.usermodel.HSSFWorkbook; //import org.apache.poi.hssf.util.HSSFColor; //import org.apache.poi.ss.usermodel.CellStyle; //import org.apache.poi.ss.usermodel.Font; //import org.nav.solution.model.Employee; //import org.springframework.web.servlet.view.document.AbstractExcelView; // //import javax.servlet.http.HttpServletRequest; //import javax.servlet.http.HttpServletResponse; // import java.util.List; // import java.util.Map; // //public class EmployeeExcelBuilder extends AbstractExcelView{ // // // @Override // protected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook hssfWorkbook, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { // List<Employee> listEmployee=(List<Employee>)model.get("listEmployee"); // //create a new Excel sheets // HSSFSheet sheet=hssfWorkbook.createSheet("Employee Details "); // sheet.setDefaultColumnWidth(50); // //create style for header cell; // CellStyle style =hssfWorkbook.createCellStyle(); // Font font = hssfWorkbook.createFont(); // font.setFontName("Arial"); // style.setFillForegroundColor(HSSFColor.BLUE.index); // style.setFillPattern(CellStyle.SOLID_FOREGROUND); // font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); // font.setColor(HSSFColor.WHITE.index); // style.setFont(font); // // // create header row // HSSFRow header = sheet.createRow(0); // // header.createCell(0).setCellValue("full name"); // header.getCell(0).setCellStyle(style); // // header.createCell(1).setCellValue(""); // header.getCell(1).setCellStyle(style); // // header.createCell(2).setCellValue("ISBN"); // header.getCell(2).setCellStyle(style); // // header.createCell(3).setCellValue("Published Date"); // header.getCell(3).setCellStyle(style); // // header.createCell(4).setCellValue("Price"); // header.getCell(4).setCellStyle(style); // header.createCell(5).setCellValue("Price"); // header.getCell(5).setCellStyle(style); // // header.createCell(6).setCellValue("Price"); // header.getCell(6).setCellStyle(style); // header.createCell(7).setCellValue("Price"); // header.getCell(7).setCellStyle(style); // // // // // // // // create data rows // int rowCount = 1; // // for (Employee aEmployee : listEmployee) { // HSSFRow aRow = sheet.createRow(rowCount++); // aRow.createCell(0).setCellValue(aEmployee.getEmployeeFname()); // aRow.createCell(1).setCellValue(aEmployee.getEmployeeEmail()); // aRow.createCell(2).setCellValue(aEmployee.getEmployeeMobile()); // aRow.createCell(3).setCellValue(aEmployee.getEmployeeBdate()); // aRow.createCell(4).setCellValue(aEmployee.getEmployeeAbout()); // } // } // //} //
[ "ilamalisunilshrestha00@gmail.com" ]
ilamalisunilshrestha00@gmail.com
c181cd75b6fc07aff8620292c55294b21d6ca75d
400211f8ba8ee352ce4a63a8c0a768ecf46aca65
/src/dao/cn/com/atnc/ioms/dao/faultmng/impl/FaultHandleDaoImpl.java
af530cf42acca4c138e01b5b22f5a7cbfa713187
[]
no_license
jyf666/IOMS
76003040489dc8f594c88ff35c07bd77d1447da4
6d3c8428c06298bee8d1f056aab7b21d81fd4ce2
refs/heads/master
2021-05-10T18:38:37.276724
2018-01-19T14:50:34
2018-01-19T14:50:34
118,130,382
0
2
null
null
null
null
UTF-8
Java
false
false
1,669
java
package cn.com.atnc.ioms.dao.faultmng.impl; import cn.com.atnc.ioms.dao.MyBaseDao; import cn.com.atnc.ioms.dao.faultmng.IFaultHandleDao; import cn.com.atnc.ioms.entity.faultmng.FaultHandle; import cn.com.atnc.ioms.model.faultmng.FaultHandleQueryModel; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Repository; /** * 故障处置管理实现类 * * @author duanyanlin * 2016年6月17日 下午2:54:31 */ @Repository("faultHandleDao") public class FaultHandleDaoImpl extends MyBaseDao<FaultHandle> implements IFaultHandleDao { /** * 查询故障处理记录 * @author duanyanlin * @date 2016年6月17日下午2:59:27 * @return List 处置记录 * @param qm 事件处置查询model */ @Override @SuppressWarnings("unchecked") public List<FaultHandle> queryList(FaultHandleQueryModel qm) { StringBuilder hql = new StringBuilder(" from FaultHandle where 1=1 "); List<Object> params = new ArrayList<>(); //故障单编号 if (!StringUtils.isEmpty(qm.getFaultId())) { hql.append(" and faultId = ? "); params.add(qm.getFaultId()); } //操作人 if (!ObjectUtils.equals(qm.getCurrentUser(),null)) { hql.append(" and operator = ? "); params.add(qm.getCurrentUser()); } //操作类型 if (!ObjectUtils.equals(qm.getFaultHandelType(),null)) { hql.append(" and handleType = ? "); params.add(qm.getFaultHandelType()); } //操作时间倒序排列 hql.append(" order by operatTime desc "); return (List<FaultHandle>) super.queryList(hql.toString(), params.toArray()); } }
[ "1206146862@qq.com" ]
1206146862@qq.com
d2500f9d6932778305ac335230c545b65ed3046c
66ec5b17060e750c800f3b9a4f6b33b2a933d702
/AndroidAsync/src/com/koushikdutta/async/http/body/ByteBufferListRequestBody.java
07c3edc1dac05972d163e20e4010ff0aa9af7c86
[ "Apache-2.0" ]
permissive
RocChing/AndroidAsync
7c5f2c0b2dd00b7968c8029334121b3a669cfaca
f547cdec920e2fba23b0b5afb6c79f676d3eff2a
refs/heads/master
2020-09-14T11:39:27.136555
2020-02-05T02:14:18
2020-02-05T02:14:18
223,118,496
0
0
NOASSERTION
2020-02-05T02:14:19
2019-11-21T07:53:37
null
UTF-8
Java
false
false
1,420
java
package com.koushikdutta.async.http.body; import com.koushikdutta.async.ByteBufferList; import com.koushikdutta.async.DataEmitter; import com.koushikdutta.async.DataSink; import com.koushikdutta.async.Util; import com.koushikdutta.async.callback.CompletedCallback; import com.koushikdutta.async.http.AsyncHttpRequest; import com.koushikdutta.async.parser.ByteBufferListParser; public class ByteBufferListRequestBody implements AsyncHttpRequestBody<ByteBufferList> { public ByteBufferListRequestBody() { } ByteBufferList bb; public ByteBufferListRequestBody(ByteBufferList bb) { this.bb = bb; } @Override public void write(AsyncHttpRequest request, DataSink sink, CompletedCallback completed) { Util.writeAll(sink, bb, completed); } @Override public void parse(DataEmitter emitter, CompletedCallback completed) { new ByteBufferListParser().parse(emitter).setCallback((e, result) -> { bb = result; completed.onCompleted(e); }); } public static String CONTENT_TYPE = "application/binary"; @Override public String getContentType() { return CONTENT_TYPE; } @Override public boolean readFullyOnRequest() { return true; } @Override public int length() { return bb.remaining(); } @Override public ByteBufferList get() { return bb; } }
[ "koushd@gmail.com" ]
koushd@gmail.com
14e947b8a704404955c5f958b86fd5ab73c358ac
df457a8cac45a4ab6f45a28317ba140722955253
/ExemploFor011.java
22ff2aebdbb8263a4c18523736145eace7f175e6
[]
no_license
Logan-Michel-JF/Lista-De-Exemplos
5b7a9e675a105268eaecd16e579aa5c54f80e09e
5b02770e56617a9cfadc511762d283dfce6f2d67
refs/heads/master
2020-03-19T11:44:05.980206
2018-06-07T12:22:52
2018-06-07T12:22:52
136,473,126
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
/** * @author Logan Michel */ public class ExemploFor011 { public static void main(String[] args) { primeiro: for (int i = 0; i < 3; i++) { segundo: for (int j = 0; j < 3; j++) { if (i == 1) { continue primeiro; } System.out.println(i + " " + j); } } } }
[ "38558603+Logan-Michel-JF@users.noreply.github.com" ]
38558603+Logan-Michel-JF@users.noreply.github.com
84060bcdc4bc730503cffcc6f05ff169f437d858
a2556093dbba709af0b725fb6984e55088d956f4
/app/src/main/java/com/hbm/haeboomi/MainSplash.java
0e65e966e944706b7d688f52c9dd489ceb2ca51c
[]
no_license
godzzzggg/HaeBooMi2
c9679d06907e7915819c4f7280201a1103341fa4
ad2cd03f81ee858827401330d8b96294ababeb5f
refs/heads/master
2021-07-06T03:08:27.068716
2021-05-13T12:23:42
2021-05-13T12:23:42
58,547,132
1
0
null
null
null
null
UTF-8
Java
false
false
1,596
java
package com.hbm.haeboomi; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.widget.TextView; public class MainSplash extends Activity { private DBManager db; private DBManager.innerDB innerDB; public static boolean DEBUG_MODE = false; private String id, pw; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_splash); final TextView splash_text = (TextView)findViewById(R.id.splash_text); splash_text.setTextColor(Color.LTGRAY); Handler handler = new Handler() { @Override public void handleMessage(Message msg) { db = new DBManager(MainSplash.this); innerDB = new DBManager.innerDB(MainSplash.this); String[] data = innerDB.getData().split("!"); if(data.length != 1) { //null인 경우를 제외 splash_text.setText("로그인 중입니다."); id = data[0]; pw = data[1]; innerDB.onDestroy(); if (DEBUG_MODE) { finish(); startActivity(new Intent(MainSplash.this, LoginActivity.class)); } else { if (id.length() == 8) db.DBLogin(id, pw, "0"); //학생 else db.DBLogin(id, pw, "1"); //교수 } } else { innerDB.onDestroy(); finish(); startActivity(new Intent(MainSplash.this, LoginActivity.class)); } } }; handler.sendEmptyMessageDelayed(0, 1000); //1000ms( == 1s) 후에 핸들러 메세지를 보냄 } }
[ "godzzgzgg@naver.com" ]
godzzgzgg@naver.com
bfcd84aeb8ffab35cf8e422c92e75c4baf2aa18b
64b3c5216bd4ecda11cc1780e28a1aa55ebeb518
/src/main/java/Main.java
918cbbdebc7c44bde92cf1f64ed0368212a26673
[]
no_license
Pewliedie/HW
a6a615eac1f1c38d9f6fde241b97d0b7bf5a177d
1fd674832a75ab7fa934bc48d409ae2e3093e3cc
refs/heads/master
2023-05-26T08:47:08.418117
2020-05-09T02:51:16
2020-05-09T02:51:16
262,475,306
0
0
null
2023-05-09T18:46:55
2020-05-09T02:51:30
Java
UTF-8
Java
false
false
412
java
public class Main { public static void main(String[] args) { double a = 7; //double b = 2; double tngns = Math.sin(a)/Math.cos(a); //double sin = Math.sin(a); // System.out.println(tngns); // double coTanA = 1.0/Math.tan(7.0); // System.out.println(coTanA); System.out.println(Math.cos(7)); // System.out.println(Math.tan(7)); } }
[ "56083057+Pewliedie@users.noreply.github.com" ]
56083057+Pewliedie@users.noreply.github.com
9ee343bd8e317236a7035d9af24b78ae93497dc9
7e6f96bb7449a3ce9bac24c4833f31374e9b149d
/app/src/main/java/com/example/android/tourguide/HotelActivity.java
5332fb5c2d4dc69be9bd00b78d629c18318712ff
[]
no_license
AbdelrahmanElShikh/TourGuide-App-Android-
aa6ace0c0f9eb6b6e729c4be7d92a089d08b486c
575de88b3cb44ffe879d55a255d0c61acd310292
refs/heads/master
2020-03-27T00:48:49.464874
2018-08-22T04:32:10
2018-08-22T04:32:10
145,659,172
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
package com.example.android.tourguide; import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ImageView; import android.widget.TextView; public class HotelActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_hotel); Intent i = getIntent(); String hotelNameIntent = i.getStringExtra(getString(R.string.name)); int hotelImageIntent = i.getIntExtra(getString(R.string.image), 0); String hotelInfoIntent = i.getStringExtra(getString(R.string.info)); ImageView hotelImage = (ImageView) findViewById(R.id.hotelImage); TextView hotelName = (TextView) findViewById(R.id.hotelName); TextView hotelInfo = (TextView) findViewById(R.id.hotelInfo); hotelImage.setImageResource(hotelImageIntent); hotelName.setText(hotelNameIntent); hotelInfo.setText(hotelInfoIntent); hotelImage.getLayoutParams().width = Resources.getSystem().getDisplayMetrics().widthPixels; hotelImage.getLayoutParams().height = Resources.getSystem().getDisplayMetrics().heightPixels / 3; } }
[ "a.rahmanelshikh@gmail.com" ]
a.rahmanelshikh@gmail.com
a0a48c6bba8b0d5b5b1e130c94c777d3a34e0924
375e5d142df3856f339954c5581fdcf9e9ddcff7
/src/main/java/school/domain/Grade.java
152f62837bbeee0c390ec566f615a071fbfcd20a
[]
no_license
i-robots/schoolsystemMVC
b537ff52f7b83e88c7f804384cad7886c81a3c50
1dacd1295a96314ea7b60329536def6cb8a0cf50
refs/heads/master
2020-05-29T18:01:04.126173
2019-06-04T22:15:26
2019-06-04T22:15:26
189,293,144
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package school.domain; import javax.persistence.Entity; import javax.persistence.Id; import lombok.AccessLevel; import lombok.Data; import lombok.NoArgsConstructor; import lombok.RequiredArgsConstructor; @Data @RequiredArgsConstructor @NoArgsConstructor(access=AccessLevel.PRIVATE, force=true) @Entity public class Grade { @Id private final Long id; private final ClassName name; private final Section section; public static enum ClassName{ NURSERY, KG1, KG2, ONE, TWO, THEREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE } public static enum Section { A, B, C } }
[ "henifikere123@gmail.com" ]
henifikere123@gmail.com
9649ac9d125a23f6802a0986a407038a42210930
eda14d2178bf09c70a439dde20f5fa9818061fb8
/src/main/java/com/labsoft/aula/domain/Pedido.java
509cc02a66a83d402400967e0583d9cc5ffaa41b
[]
no_license
laboratorio-projetos/labsoft
acc5c77156fee5bec4011cb188b2c37c9cca9486
ec7d2b1c62ce06fe0a9c403ca8c6ad905b37c47e
refs/heads/master
2023-03-07T14:00:29.931036
2021-02-21T01:22:39
2021-02-21T01:22:39
333,198,232
0
0
null
null
null
null
UTF-8
Java
false
false
2,788
java
package com.labsoft.aula.domain; import java.io.Serializable; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonManagedReference; @Entity public class Pedido implements Serializable{ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @JsonFormat(pattern = "dd/MM/yyyy HH:mm") private Date instante; @JsonManagedReference @OneToOne(cascade=CascadeType.ALL, mappedBy = "pedido") private Pagamento pagamento; @ManyToOne @JoinColumn(name="endereco_de_entrega_id") private Endereco enderecoDeEntrega; @JsonManagedReference @ManyToOne @JoinColumn(name = "cliente_id") private Cliente cliente; @OneToMany(mappedBy = "id.pedido") private Set<ItemPedido> itens = new HashSet<>(); public Pedido() { } public Pedido(Integer id, Date instante, Endereco enderecoDeEntrega, Cliente cliente) { super(); this.id = id; this.instante = instante; this.enderecoDeEntrega = enderecoDeEntrega; this.cliente = cliente; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Date getInstante() { return instante; } public void setInstante(Date instante) { this.instante = instante; } public Pagamento getPagamento() { return pagamento; } public void setPagamento(Pagamento pagamento) { this.pagamento = pagamento; } public Endereco getEnderecoDeEntrega() { return enderecoDeEntrega; } public void setEnderecoDeEntrega(Endereco enderecoDeEntrega) { this.enderecoDeEntrega = enderecoDeEntrega; } public Cliente getCliente() { return cliente; } public void setCliente(Cliente cliente) { this.cliente = cliente; } public Set<ItemPedido> getItens() { return itens; } public void setItens(Set<ItemPedido> itens) { this.itens = itens; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pedido other = (Pedido) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "daniel.saraiva@prof.ce.gov.br" ]
daniel.saraiva@prof.ce.gov.br
4f420302ffe1ae40c5cd58fe5c497034efc6ca7f
87bc4ed16f191e382bc64798d5ad28ff72d7742a
/src/main/java/com/fanwe/g419/model/RoomModel.java
94a420d03f85932543089badc06bd9f0e9e59810
[]
no_license
qq674684107/fanweHybridLive
cf847515123e33438ef4808c884ad0df5fb6c8a6
f043be1fba7aa96e50f2add8dbe1500cf6c6e4c0
refs/heads/master
2020-06-10T06:49:28.554572
2019-04-01T10:53:54
2019-04-01T10:54:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
711
java
package com.fanwe.g419.model; public class RoomModel { private int room_id; private String group_id; private String user_id; // 主播id private String head_image; // 主播头像 public int getRoom_id() { return room_id; } public void setRoom_id(int room_id) { this.room_id = room_id; } public String getGroup_id() { return group_id; } public void setGroup_id(String group_id) { this.group_id = group_id; } public String getUser_id() { return user_id; } public void setUser_id(String user_id) { this.user_id = user_id; } public String getHead_image() { return head_image; } public void setHead_image(String head_image) { this.head_image = head_image; } }
[ "liujun@yimidida.com" ]
liujun@yimidida.com
f28c8e52049370f017ada65abc9f4a004afb3a8f
5d4b31b529229e2c18bbd0b2c88cbedc1cf4987e
/app/src/main/java/com/jinju/android/api/ButtonList.java
b5663a2f16fdd2763155e1fc9dca668f0f354350
[]
no_license
Tony123654/jinju_android
89a8e7d40aeeb7ade8c222c7e07278cd6c5af606
9d6eadbf2291254d83401d50d98a285aade8c310
refs/heads/master
2020-03-09T04:28:33.510897
2018-06-08T02:55:21
2018-06-08T02:55:21
128,588,692
0
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
package com.jinju.android.api; import java.io.Serializable; /** * Created by Libra on 2017/5/15. */ public class ButtonList implements Serializable{ private static final long serialVersionUID = 1L; private String desc; private String pic; private String title; private String linkUrl; private String type; private String flag; public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getPic() { return pic; } public void setPic(String pic) { this.pic = pic; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getLinkUrl() { return linkUrl; } public void setLinkUrl(String linkUrl) { this.linkUrl = linkUrl; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getFlag() { return flag; } public void setFlag(String flag) { this.flag = flag; } @Override public String toString() { return "ButtonList{" + "pic='" + pic + '\'' + ", title='" + title + '\'' + ", linkUrl='" + linkUrl + '\'' + ", type='" + type + '\'' + ", flag='" + flag + '\'' + '}'; } }
[ "2214162455@qq.com" ]
2214162455@qq.com
9ef4f6fa21c3c69a336a9814defbdd3f891b8651
7f9a82d227ab32bb3256278a8a91dcd837eb4d25
/reciept-service/src/main/java/de/probstl/recieptservice/data/QuantityUnit.java
029a935370c4b73e317d4fe6c4182affff65086c
[]
no_license
fprobst/receipts
e7725de54b5da124d960a3754e9085b08a77b093
159c1f1963e37c673a9621088d443f459bfc0497
refs/heads/master
2021-01-16T19:57:02.046471
2018-02-04T15:55:49
2018-02-04T15:55:49
100,190,736
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package de.probstl.recieptservice.data; public enum QuantityUnit { /** Unit in gramm */ Gramm, /** Unit in kilogramm */ Kilogramm, /** Unit in litres */ Liter, /** The quantity was in pieces */ Count }
[ "flo@probstl.de" ]
flo@probstl.de
650d2e266f0e3eafb43f7d2c45b5aa252cbc4605
32c98a18f9030b51b320d5d2cee5ce3a6af80d78
/src/main/java/fp/dam/psp/ejemplos/ejemplo5/Main.java
1cec5b696cc41da98795352485c17e5e658689f1
[]
no_license
LWV28326/ejerciciospsp
c1e1e52caba55331e2f4cd72dfd7a10bbf0c4866
d9a64f5d240ab0ff21ba71679000dfd53edc38c9
refs/heads/main
2023-08-28T13:07:19.322348
2021-10-26T19:19:33
2021-10-27T16:17:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package fp.dam.psp.ejemplos.ejemplo5; import java.awt.Container; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.SwingUtilities; public class Main extends JFrame { public static long serialVersionUID = 1; JLabel hora; public Main() { Container panel = getContentPane(); panel.setPreferredSize(new Dimension(300, 300)); hora = new JLabel("00:00:00"); hora.setFont(hora.getFont().deriveFont(30f)); hora.setAlignmentX(JLabel.CENTER_ALIGNMENT); panel.add(hora); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pack(); setLocationRelativeTo(null); } private void comenzar() { setVisible(true); } public static void main(String[] args) { SwingUtilities.invokeLater(new Main()::comenzar); } public void run() { while (true) { } } }
[ "jplbayon@gmail.com" ]
jplbayon@gmail.com
d12082c4dc073108e979354eb5bd9c5bb0e3513a
2c91bfb74963cf2795419d8bdbccab961174fb09
/src/graphing/Edge.java
3dac5fbbe394f86543a60882ff8e0d9723a5f429
[]
no_license
startsUp/DriveSafe
fd003bfb40d979107251b6876d67d02f51d5adf6
8e31f454a8d1a3c9190e52a99ff582089866419a
refs/heads/master
2021-06-28T04:04:26.007902
2020-10-07T19:49:26
2020-10-07T19:49:26
168,078,713
0
1
null
null
null
null
UTF-8
Java
false
false
808
java
package graphing; /** * Class representing an Edge * @author shardool * */ public class Edge { private int i; private int w; private int from; /** * Constructor (called automatically by gson when constructing the graph) * @param i the index of the vertex it connects to * @param w weight of the edge */ public Edge(int i, int w) { this.i = i; this.w = i; } public int getI() { return i; } public void setFrom(int vertex) { this.from = vertex; } public int other(int vertex) { if(vertex==i) return from; else return i; } public void setI(int i) { this.i = i; } public int getW() { return w; } public void setW(int w) { this.w = w; } @Override public String toString() { // TODO Auto-generated method stub return this.i + " " + this.w; } }
[ "pates25@mcmaster.ca" ]
pates25@mcmaster.ca
47df3bce9ae1838f45d318fca3fb7bfeb95676a9
208979000a9842c26b65d75ca4177d913e3f7857
/AmrProject/src/main/java/com/peng/amr/service/impl/LevelServiceImpl.java
fcaa8ea8aabb65ac8406354bd300fbdcaca245b2
[]
no_license
pqm506038014/git
984eab76190ae1eab8fd07bfc11836f12c4ddcee
92b06e840446df696a61f52e941d1120b1c6a9cc
refs/heads/master
2021-05-07T14:18:44.668643
2017-11-07T08:33:35
2017-11-07T08:33:35
109,807,979
0
0
null
null
null
null
GB18030
Java
false
false
739
java
package com.peng.amr.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.peng.amr.dao.ILevelDAO; import com.peng.amr.service.ILevelService; import com.peng.amr.service.abs.AbstractService; import com.peng.amr.vo.Level; @Service public class LevelServiceImpl extends AbstractService implements ILevelService { @Resource private ILevelDAO levelDAO; @Override public boolean checkSalary(double salary, int lid) throws Exception { //根据雇员级别查询出对应的最高工资和最低工资信息 Level level = this.levelDAO.findById(lid); if(salary >= level.getLosal() && salary <= level.getHisal()) { return true; } return false; } }
[ "Administrator@PC-20170217ANLO" ]
Administrator@PC-20170217ANLO
c0d83a1cde93676b806fe446ffc4966db6b3136a
47fc1ce8168417fd7c9241996ebea6e98341e619
/src/com/siaod/lec1/Stacks/StackOfItems.java
f73fe8ff1741ae1cdd8583dc6ecb71015af273e4
[]
no_license
lsvy97/My_first_repo
73a59c42270c1b23f18a874991b3b7bb977e760d
22e345cd2d4c13c07c9bcd48e16e4ebcd645b98c
refs/heads/master
2021-08-26T07:08:38.586909
2017-11-22T04:15:15
2017-11-22T04:15:15
106,499,169
0
0
null
null
null
null
UTF-8
Java
false
false
711
java
package com.siaod.lec1.Stacks; import java.util.NoSuchElementException; public class StackOfItems<Item> { private Node first = null; int size = 0; private class Node { Item item; Node next; } public Item peek() { if (isEmpty()) throw new NoSuchElementException("Stack underflow"); return first.item; } public void push (Item item) { size++; Node oldFirst = first; first = new Node(); first.item = item; first.next = oldFirst; } public Item pop() { size--; Item item = first.item; first = first.next; return item; } boolean isEmpty() {return first == null;} }
[ "diamondfinder7@gmail.com" ]
diamondfinder7@gmail.com
92f18f1481d16896fbaf7328c3c29d455db79752
dbe7199555dea5eebc34dea93737d79cad5c25f1
/spring-wind-web/src/main/java/com/baomidou/springwind/utils/PostUtil.java
9af0f2d19489fac1970b1426de18aac949955bb3
[]
no_license
tsregll/energy_project
eb6c07bb6675b46d50f19f93eaa3169845ccab2b
f807d1bc0828e97993d13a903f988ab91e9fd625
refs/heads/master
2023-04-18T11:58:57.390631
2018-06-04T15:36:10
2018-06-04T15:36:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
package com.baomidou.springwind.utils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.springwind.entity.RecordMeterConsume; import com.baomidou.springwind.entity.Result; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; /** * 描述: * * @author XieYongJie * @since 2018/6/2 */ public class PostUtil { private RestTemplate restTemplate; private HttpHeaders headers; public PostUtil() { // 实例化接口调用工具 restTemplate = new RestTemplate(); // 实例化Http头 headers = new HttpHeaders(); // 配置Content-Type = application/json headers.setContentType(MediaType.APPLICATION_JSON); } public Result autoBill(String url, RecordMeterConsume recordMeterConsume) { HttpEntity<String> entity = new HttpEntity<>(JSON.toJSONString(recordMeterConsume), headers); ResponseEntity<JSONObject> response = restTemplate.postForEntity(url, entity, JSONObject.class); return response.getBody().toJavaObject(Result.class); } }
[ "442466076@qq.com" ]
442466076@qq.com
fef52572f37293748afd7136c6a9e597f4964b9b
8ab8c9ef2e4d8c37d80f9f62dfde48bfbab50d58
/src/controller/ApplicationSettings.java
4586c6f90fa54760ec68a89a5765ef45f8f23bc5
[]
no_license
jap330/JPaint
e6a66fe90ac59a7eb33e48448c595ab078e69e29
dd3f1cc1ece4c49ecd2c620b8d47bc7b0550e309
refs/heads/master
2021-01-02T09:36:36.864712
2017-08-03T18:28:52
2017-08-03T18:28:52
99,261,976
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
package controller; import viewInterfaces.IDialogChoice; public class ApplicationSettings { private ShapeSettings drawShapeSettings = new ShapeSettings(); public ShapeSettings getDrawShapeSettings() { return drawShapeSettings; } private PrimaryColor primaryColor = new PrimaryColor(); public PrimaryColor getPrimaryColor() { return primaryColor; } private SecondaryColor secondaryColor = new SecondaryColor(); public SecondaryColor getSecondaryColor() { return secondaryColor; } private ShadingTypeSettings shadingType = new ShadingTypeSettings(); public ShadingTypeSettings getCurrentShade() { return shadingType; } private MouseDrawMode mouseDrawMode = new MouseDrawMode(); public MouseDrawMode getMouseDrawMode() { return mouseDrawMode; } }
[ "alexpena@Alexs-Air.eaglemarketmakers.com" ]
alexpena@Alexs-Air.eaglemarketmakers.com
bca79299dfa910d9ba31e857de4a7c919fbd2ead
92f74abb448975c0ba5c13f96ea97d612e92a516
/atcrowdfunding-front-parent/atcrowdfunding-front-commons/src/main/java/com/atguigu/front/enume/AcctTypeEnume.java
8e9a7dad085573819993a075d98bafcafe8575f1
[]
no_license
littlejeck/mycode
f99f0ee3108cdf68c5d7bfbe44d543044e8890eb
5c33ac04846e123b2148ea278bdca5cb1bb16667
refs/heads/master
2022-12-22T21:56:32.750347
2019-07-07T08:11:31
2019-07-07T08:11:31
195,622,973
1
0
null
2022-12-16T11:53:53
2019-07-07T07:31:49
JavaScript
UTF-8
Java
false
false
733
java
package com.atguigu.front.enume; public enum AcctTypeEnume { ////账户类型: 0 - 企业, 1 - 个体, 2 - 个人, 3 - 政府 COMPANTY("0","企业"), PERSON_COMPANY("1","个体"), PERSON("2","个人"), GOV("3","政府"); private String code;//给数据库保存 private String msg;//给人看的 private AcctTypeEnume(String code,String msg){ this.code = code; this.msg = msg; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
[ "1823220575@qq.com" ]
1823220575@qq.com
b021e543f36a1be6535bde9f3c38c36be24972c2
e0e76e0d32bc696b67d4af0f6b4ae1ae917e1dcc
/Concentration/src/se/t1835039/card/test/CPUTest.java
776c5566a7d0179935072f71b5314fe591b4ec38
[]
no_license
terakawakohei/software-dev
973021488647130a7a1080bcc955f8f590c76d00
eee6d034ed0abcc2e6d6ca66c0f5d5d048f94b2b
refs/heads/main
2023-04-17T12:42:53.533333
2021-05-07T10:02:48
2021-05-07T10:02:48
365,191,120
0
0
null
null
null
null
UTF-8
Java
false
false
2,339
java
package se.t1835039.card.test; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; import se.t1835039.card.entity.CPU; import se.t1835039.card.entity.Card; import se.t1835039.card.entity.CardDeck; import se.t1835039.card.entity.CheatStrategy; import se.t1835039.card.entity.NeverForgetStrategy; import se.t1835039.card.entity.NormalStrategy; import se.t1835039.card.entity.RandomStrategy; public class CPUTest extends TestCase { private CPU weakCPU, normalCPU, strongCPU; private CardDeck deck = new CardDeck(); private List<Card> table = new ArrayList<Card>(); private List<Integer> opened = new ArrayList<Integer>(); protected void setUp() throws Exception { weakCPU = new CPU("weakCPU1", new RandomStrategy(), new RandomStrategy()); normalCPU = new CPU("normalCPU2", new NeverForgetStrategy(), new NormalStrategy()); strongCPU = new CPU("strongCPU", new NeverForgetStrategy(), new CheatStrategy()); deck.createFullDeck(); deck.shuffle(); for (Card c : deck.getAllCards()) { table.add(c); opened.add(0);//最初は全て伏せた状態(0)に設定 } } protected void tearDown() throws Exception { } public void testSelectFirstCard() { //カードを選んだ結果、52枚のうちどれかを決定してほしい //要素数52のリストのインデックスとして使用するので、0以上51以下の数字である必要がある assertTrue(0 <= weakCPU.selectFirstCard(opened, table) && 51 >= weakCPU.selectFirstCard(opened, table)); assertTrue(0 <= normalCPU.selectFirstCard(opened, table) && 51 >= weakCPU.selectFirstCard(opened, table)); assertTrue(0 <= strongCPU.selectFirstCard(opened, table) && 51 >= weakCPU.selectFirstCard(opened, table)); } public void testSelectSecondCard() { //カードを選んだ結果、52枚のうちどれかを決定してほしい //要素数52のリストのインデックスとして使用するので、0以上51以下の数字である必要がある assertTrue(0 <= weakCPU.selectSecondCard(opened, table) && 51 >= weakCPU.selectSecondCard(opened, table)); assertTrue(0 <= normalCPU.selectSecondCard(opened, table) && 51 >= weakCPU.selectSecondCard(opened, table)); assertTrue(0 <= strongCPU.selectSecondCard(opened, table) && 51 >= weakCPU.selectSecondCard(opened, table)); } }
[ "odayakalife@ods-MacBook-Pro.local" ]
odayakalife@ods-MacBook-Pro.local
9acaf225c3beadeae8b0ca4eec5a5abda9a2f5c9
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-14152-3-22-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/xwiki/query/internal/CountDocumentFilter_ESTest_scaffolding.java
18f5be0d78a8a6ea319802b53fae5d677cc1c9cc
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
9,345
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 26 10:21:58 UTC 2021 */ package org.xwiki.query.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class CountDocumentFilter_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.query.internal.CountDocumentFilter"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CountDocumentFilter_ESTest_scaffolding.class.getClassLoader() , "org.xwiki.query.QueryFilter", "org.infinispan.commons.marshall.MarshallableFunctions$Remove", "org.infinispan.stream.impl.TerminalFunctions$MaxLongFunction", "org.infinispan.stream.StreamMarshalling$EqualityPredicate", "org.infinispan.stream.StreamMarshalling$AlwaysTruePredicate", "org.infinispan.stream.impl.TerminalFunctions$CountLongFunction", "org.infinispan.commons.marshall.MarshallableFunctions$RemoveReturnPrevOrNull", "org.apache.lucene.search.QueryCache", "org.infinispan.stream.impl.DistributedCacheStream", "org.infinispan.stream.impl.TerminalFunctions$ToArrayIntFunction", "org.infinispan.stream.impl.TerminalFunctions$SumIntFunction", "org.infinispan.stream.impl.TerminalFunctions$ToArrayDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$MinIntFunction", "org.infinispan.stream.impl.TerminalFunctions$CollectIntFunction", "org.infinispan.stream.impl.TerminalFunctions$MinFunction", "org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsIntFunction", "org.infinispan.stream.impl.TerminalFunctions$FindAnyIntFunction", "org.infinispan.stream.impl.TerminalFunctions$MinLongFunction", "org.infinispan.stream.impl.TerminalFunctions$CollectorFunction", "org.infinispan.stream.impl.TerminalFunctions$MaxIntFunction", "org.infinispan.stream.impl.TerminalFunctions$AnyMatchIntFunction", "org.infinispan.stream.impl.TerminalFunctions$CountFunction", "org.infinispan.stream.impl.TerminalFunctions$FindAnyLongFunction", "org.apache.lucene.search.LRUQueryCache$LeafCache", "org.apache.lucene.util.Accountable", "org.apache.lucene.search.LRUQueryCache$MinSegmentSizePredicate", "org.infinispan.stream.impl.TerminalFunctions$AverageIntFunction", "org.infinispan.stream.impl.TerminalFunctions$AnyMatchLongFunction", "org.jfree.ui.FilesystemFilter", "org.infinispan.stream.impl.TerminalFunctions$AverageLongFunction", "org.infinispan.stream.StreamMarshalling$EntryToValueFunction", "org.infinispan.stream.impl.DistributedCacheStream$IteratorSupplier", "org.infinispan.stream.impl.TerminalFunctions$ReduceFunction", "org.infinispan.stream.impl.TerminalFunctions$CountDoubleFunction", "org.apache.lucene.search.LRUQueryCache", "org.infinispan.stream.impl.TerminalFunctions$CollectFunction", "org.infinispan.stream.impl.TerminalFunctions$SumDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$AllMatchFunction", "org.infinispan.stream.impl.TerminalFunctions$ForEachDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$NoneMatchDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$CollectLongFunction", "info.informatica.io.FilesystemInfo$TokenizedPath", "org.infinispan.util.CloseableSupplier", "info.informatica.io.WildcardFilter", "org.infinispan.stream.impl.TerminalFunctions$CollectDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$AllMatchLongFunction", "org.infinispan.filter.CacheFilters$ConverterAsCacheEntryFunction", "org.infinispan.stream.impl.TerminalFunctions$FindAnyDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$CountIntFunction", "org.infinispan.CacheStream", "org.infinispan.stream.impl.TerminalFunctions$IdentityReduceIntFunction", "org.infinispan.stream.impl.TerminalFunctions$ReduceIntFunction", "org.apache.commons.collections.ListUtils", "org.infinispan.stream.impl.TerminalFunctions$MinDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$ToArrayFunction", "org.infinispan.stream.impl.TerminalFunctions$IdentityReduceDoubleFunction", "org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteView", "org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsLongFunction", "org.infinispan.stream.impl.TerminalFunctions$NoneMatchFunction", "org.infinispan.stream.impl.TerminalFunctions$IdentityReduceCombinerFunction", "org.infinispan.stream.impl.TerminalFunctions$IdentityReduceLongFunction", "org.infinispan.stream.impl.TerminalFunctions$ToArrayGeneratorFunction", "org.infinispan.stream.StreamMarshalling$EntryToKeyFunction", "org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteFind", "org.infinispan.util.SerializableFunction", "org.infinispan.stream.impl.TerminalFunctions$AllMatchIntFunction", "org.infinispan.stream.impl.TerminalFunctions$ForEachFunction", "org.infinispan.stream.impl.TerminalFunctions$MaxFunction", "org.infinispan.stream.impl.TerminalFunctions$IdentityReduceFunction", "org.infinispan.stream.impl.AbstractCacheStream$IntermediateType", "org.infinispan.stream.impl.TerminalFunctions$SumLongFunction", "org.infinispan.stream.impl.TerminalFunctions$NoneMatchIntFunction", "org.infinispan.commons.marshall.MarshallableFunctions$RemoveReturnBoolean", "org.infinispan.stream.impl.TerminalFunctions$ForEachIntFunction", "org.xwiki.query.internal.CountDocumentFilter", "org.xwiki.component.annotation.Component", "org.apache.lucene.search.Weight", "org.infinispan.stream.impl.TerminalFunctions$AllMatchDoubleFunction", "org.infinispan.stream.impl.DistributedCacheStream$SegmentListenerNotifier", "org.infinispan.stream.impl.TerminalFunctions$FindAnyFunction", "org.infinispan.filter.CacheFilters$KeyValueFilterAsPredicate", "org.xwiki.query.internal.AbstractQueryFilter", "org.infinispan.stream.impl.TerminalFunctions$NoneMatchLongFunction", "org.infinispan.stream.impl.AbstractCacheStream$CollectionDecomposerConsumer", "org.infinispan.stream.impl.DistributedCacheStream$HandOffConsumer", "org.apache.lucene.search.LRUQueryCache$CachingWrapperWeight", "org.infinispan.stream.impl.TerminalFunctions$ReduceDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$SummaryStatisticsDoubleFunction", "org.infinispan.stream.impl.AbstractCacheStream", "org.infinispan.stream.impl.TerminalFunctions$ForEachLongFunction", "info.informatica.io.FilePatternSpec$FilePattern", "org.infinispan.stream.impl.TerminalFunctions$ToArrayLongFunction", "org.infinispan.commons.marshall.MarshallableFunctions$ReturnReadWriteGet", "org.infinispan.stream.StreamMarshalling$NonNullPredicate", "org.infinispan.stream.impl.TerminalFunctions$MaxDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$AnyMatchFunction", "info.informatica.io.FilePatternSpec", "org.infinispan.filter.CacheFilters$FilterConverterAsCacheEntryFunction", "org.infinispan.stream.impl.TerminalFunctions$ReduceLongFunction", "org.infinispan.stream.impl.TerminalFunctions$AnyMatchDoubleFunction", "org.infinispan.stream.impl.TerminalFunctions$AverageDoubleFunction", "org.apache.lucene.search.ConstantScoreWeight", "info.informatica.io.FilesystemInfo" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.slf4j.Logger", false, CountDocumentFilter_ESTest_scaffolding.class.getClassLoader())); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
8fd5775896ca5e18858a0258525b467c71f28e54
9580f2c6c55d22f499297eb1576b0e431df0e239
/CommonDomain/src/Etudes/NombreMaxDeVoeuxAtteintException.java
627f828c2add03ce95b7c9aee8ef833b878d67f1
[]
no_license
gaetanpique/Projet_Corba
73fabc47ab5403c0608c27414e235bd62573e036
45903b63d74d976ff45a77133efce67ac74da7fe
refs/heads/master
2020-06-09T17:39:10.554839
2015-06-26T08:38:23
2015-06-26T08:38:23
36,603,488
2
2
null
null
null
null
UTF-8
Java
false
false
618
java
package Etudes; /** * Exception definition : NombreMaxDeVoeuxAtteintException * * @author OpenORB Compiler */ public final class NombreMaxDeVoeuxAtteintException extends org.omg.CORBA.UserException { /** * Default constructor */ public NombreMaxDeVoeuxAtteintException() { super(NombreMaxDeVoeuxAtteintExceptionHelper.id()); } /** * Full constructor with fields initialization */ public NombreMaxDeVoeuxAtteintException(String orb_reason) { super(NombreMaxDeVoeuxAtteintExceptionHelper.id() +" " + orb_reason); } }
[ "Gaetan@192.168.1.35" ]
Gaetan@192.168.1.35
eb3b54818af90a410ee2bf3818513be707af2458
acd9b11687fd0b5d536823daf4183a596d4502b2
/java-client/src/main/java/co/elastic/clients/json/UnexpectedJsonEventException.java
0f3c68685254530db99174168ac4842d5db17bd1
[ "Apache-2.0" ]
permissive
szabosteve/elasticsearch-java
75be71df80a4e010abe334a5288b53fa4a2d6d5e
79a1249ae77be2ce9ebd5075c1719f3c8be49013
refs/heads/main
2023-08-24T15:36:51.047105
2021-10-01T14:23:34
2021-10-01T14:23:34
399,091,850
0
0
Apache-2.0
2021-08-23T12:15:19
2021-08-23T12:15:19
null
UTF-8
Java
false
false
1,407
java
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package co.elastic.clients.json; import jakarta.json.stream.JsonParser; import jakarta.json.stream.JsonParser.Event; import jakarta.json.stream.JsonParsingException; public class UnexpectedJsonEventException extends JsonParsingException { public UnexpectedJsonEventException(JsonParser parser, Event event) { super("Unexpected JSON event [" + event + "]", parser.getLocation()); } public UnexpectedJsonEventException(JsonParser parser, Event event, Event expected) { super("Unexpected JSON event [" + event + "] instead of [" + expected + "]", parser.getLocation()); } }
[ "sylvain@elastic.co" ]
sylvain@elastic.co
64879800cec9d97df9b4507464aac7632e04ae2d
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/65/org/apache/commons/math/optimization/fitting/GaussianParametersGuesser_getInterpolationPointsForY_189.java
4c3282b6b7f4e068cd1faf42043e06b09efc8a09
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,578
java
org apach common math optim fit guess paramet link parametr gaussian function parametricgaussianfunct base observ point version revis date gaussian paramet guesser gaussianparametersguess bound interpol point point suitabl determin param point point interpol param start idx startidx index point start search interpol bound point param idx step idxstep index step search interpol bound point param determin arrai point suitabl determin illeg argument except illegalargumentexcept idx step idxstep rang except outofrangeexcept code code rang code point code weight observ point weightedobservedpoint interpol point getinterpolationpointsfori weight observ point weightedobservedpoint point start idx startidx idx step idxstep rang except outofrangeexcept idx step idxstep allow except zeronotallowedexcept start idx startidx idx step idxstep idx step idxstep idx step idxstep point length idx step idxstep isbetween point geti point idx step idxstep geti idx step idxstep weight observ point weightedobservedpoint point idx step idxstep point weight observ point weightedobservedpoint point point idx step idxstep min mini doubl posit infin max maxi doubl neg infin weight observ point weightedobservedpoint point point min mini math min min mini point geti max maxi math max max maxi point geti rang except outofrangeexcept min mini max maxi
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
d55cebf65fb07c5d14003bbb8a50077983af9cec
652a73d770614fca3782f0d91edf573f1c4333c2
/app/src/main/java/com/example/smsboomer/ui/params/ParamsFragment.java
5fe3f400eb1756f484f5c286664fbe6528e62bd2
[]
no_license
birnagerald/smsBoomer
ec9165638f1eedb22bef4e04f1d2b5cd8f513090
7ca38574ea760deca9e4584d10b65a09cd825a1a
refs/heads/master
2022-07-28T12:00:20.402571
2020-05-22T11:51:49
2020-05-22T11:51:49
266,097,876
1
0
null
null
null
null
UTF-8
Java
false
false
2,363
java
package com.example.smsboomer.ui.params; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import com.example.smsboomer.R; import static com.example.smsboomer.MainActivity.textAutos; public class ParamsFragment extends Fragment { private ParamsViewModel paramsViewModel; public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { paramsViewModel = ViewModelProviders.of(this).get(ParamsViewModel.class); View root = inflater.inflate(R.layout.fragment_params, container, false); final EditText auto1 = root.findViewById(R.id.field_auto1); final EditText auto2 = root.findViewById(R.id.field_auto2); final EditText auto3 = root.findViewById(R.id.field_auto3); final TextView text1 = root.findViewById(R.id.text_auto1); final TextView text2 = root.findViewById(R.id.text_auto2); final TextView text3 = root.findViewById(R.id.text_auto3); text1.setText(textAutos[0]); text2.setText(textAutos[1]); text3.setText(textAutos[2]); final Button button = root.findViewById(R.id.confirm_auto); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String newText1 = auto1.getText().toString(); String newText2 = auto2.getText().toString(); String newText3 = auto3.getText().toString(); text1.setText(newText1); textAutos[0] = newText1; text2.setText(newText2); textAutos[1] = newText2; text3.setText(newText3); textAutos[2] = newText3; } }); paramsViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() { @Override public void onChanged(@Nullable String s) { } }); return root; } }
[ "geraldbirna@MacBook-Pro-de-admin.local" ]
geraldbirna@MacBook-Pro-de-admin.local
b3a20ae050a95155ad1a97809c447f3d4ba2060b
a1958184904cf57620e7aad09c703c690be56c16
/src/main/java/com/footpath/inventory/security/config/service/UserManagementServiceImpl.java
ff10da00b3af394f5d1cb6b418b9b54bb213f3c5
[]
no_license
debashish345/footpath-product-inventory
95fb18ca8ce8bb0dd46062ee52f25eb213dd5d78
57ff54a1c24fb7c4a55338d223ff901530b8bda8
refs/heads/main
2023-03-20T19:02:28.305354
2021-03-19T19:08:14
2021-03-19T19:08:14
345,675,501
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
package com.footpath.inventory.security.config.service; import com.footpath.inventory.security.config.model.UserEntity; import com.footpath.inventory.security.config.repository.UserManagementRepo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class UserManagementServiceImpl implements UserManagementService { @Autowired private UserManagementRepo userManagementRepo; @Override public Optional<UserEntity> getUserByEmail(String email) { return Optional.of(userManagementRepo.findByEmail(email).get()); } }
[ "31614783+debashish345@users.noreply.github.com" ]
31614783+debashish345@users.noreply.github.com
39c1fdf653113ff913dd25dc2a32863518ae4e9d
ec2baf63e28a35af84033048334e834599e097c4
/app/src/main/java/es/unileon/happycow/model/composite/Valoration.java
a57897bdad97ac083a713b521ac531a4894eb538
[]
no_license
happycow-unileon/happycow-android
2208f607bf07280ea7eaf012ee0ae0542f61c3f6
f5a947cf508d3f8f3a9cda42fadc6cde21ba2b72
refs/heads/master
2021-01-10T11:03:42.727971
2015-05-19T16:41:36
2015-05-19T16:41:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,710
java
package es.unileon.happycow.model.composite; import es.unileon.happycow.database.*; import es.unileon.happycow.handler.*; import es.unileon.happycow.model.InformationEvaluation; import es.unileon.happycow.model.iterator.Iterator; import es.unileon.happycow.model.table.Entity; public class Valoration implements Component { public static final Entity TYPE = Entity.VALORATION; private IdHandler _idHandler; private float _weighing; private float nota; private Component parent; private Component root; public Valoration(IdHandler idHandler, float nota) { _idHandler = idHandler; this.nota = nota; //por defecto el peso es 1 this._weighing = 1; } public Valoration(float nota) { this((IdHandler) new IdValoration(Database.getInstance(null).nextIdValoration()), nota); } public IdHandler getIdCategory() { //parent es el criterio, getparent me da la categoria return parent.getParent().getId(); } public IdHandler getIdEvaluation(){ return this.root.getInformation().getIdEvaluation(); } public IdHandler getIdCriterion(){ return this.parent.getId(); } public float getNota() { return nota; } public void setNota(float nota) { this.nota = nota; } @Override public boolean isLeaf() { return true; } @Override public void show(int depth) { System.out.println(_idHandler.toString() + " --> " + depth); } @Override public Component search(IdHandler id) { if (_idHandler.compareTo(id) == 0) { return this; } return null; } @Override public IdHandler getId() { return _idHandler; } @Override public Iterator<Component> iterator(String[] args) { return null; } @Override public Entity getLevel() { return TYPE; } @Override public float getWeighing() { return _weighing; } @Override public void setWeighing(float weighing) { this._weighing = weighing; } @Override public Component getParent(){ return parent; } @Override public Component getRoot(){ return root; } @Override public void setParent(Component parent){ this.parent=parent; } @Override public void setRoot(Component root){ this.root=root; } @Override public InformationEvaluation getInformation(){ return this.root.getInformation(); } }
[ "dorian.cadenas@gmail.com" ]
dorian.cadenas@gmail.com
d396ca09250f5ec5905c16935b63a1fa5712cfd5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_73632020a90c10b50a7fe04d7447f311297d6353/Sender/4_73632020a90c10b50a7fe04d7447f311297d6353_Sender_t.java
de8271477bf19a995ed36f26b37434aa311d389d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,103
java
package bck; import bck.Backup; import java.io.IOException; import java.net.DatagramPacket; import java.net.InetAddress; import java.net.MulticastSocket; import java.util.HashMap; import java.util.logging.Level; import java.util.logging.Logger; /* thread que vai enviar chunks para fazer backup no receiver*/ public class Sender extends Thread { MulticastSocket socket = null; InetAddress address = null; int MC; int MD; String sha = ""; int replication_degree; public Sender(InetAddress ad, int m_c, int m_d, String sh, int rd) throws IOException { address = ad; MC = m_c; MD = m_d; sha = sh; replication_degree = rd; socket = new MulticastSocket(MD); socket.joinGroup(address); } public void run() { System.out.println("Sending: " + Backup.getMapShaFiles().get(this.sha).getName()); int n = 0; HashMap<Integer, byte[]> file_to_send_chunks = Backup.getMapChunkFiles().get(sha); while (file_to_send_chunks.get(n) != null) { //PUTCHUNK <Version> <FileId> <ChunkNo> <ReplicationDeg><CRLF><CRLF><Body> System.out.println("tamanho dos chunks em falta "+Backup.getMissingChunks()); String msg = "PUTCHUNK " + Backup.getVersion() + " " + this.sha + " " + n + " " + replication_degree + "\n\n" + file_to_send_chunks.get(n); DatagramPacket chunk = new DatagramPacket(msg.getBytes(), msg.length(), this.address, this.MD); try { Thread.sleep(10); socket.send(chunk); Backup.getMissingChunks(sha).put(n, replication_degree); } catch (Exception ex) { Logger.getLogger(Sender.class.getName()).log(Level.SEVERE, null, ex); } n++; } System.out.print("Tentanto enviar chunks em falta... "); System.out.println(Backup.getMissingChunks(sha).size()); Utils.flag_sending = 0; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8512a222623a273527d9562bb898a1b0c8178685
376e849705ea05d6f271a919f32c93e72690f0ad
/leasing-identity-parent/leasing-identity-service/src/main/java/com/cloudkeeper/leasing/identity/repository/HiddenIssueRepository.java
5f6c27a0de5a6cf9b33a581d134bc61e805ed2c7
[]
no_license
HENDDJ/EngineeringApi
314198ce8b91212b1626decde2df1134cb1863c8
3bcc2051d2877472eda4ac0fce42bee81e81b0be
refs/heads/master
2020-05-16T03:41:05.335371
2019-07-31T08:21:57
2019-07-31T08:21:57
182,734,226
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package com.cloudkeeper.leasing.identity.repository; import com.cloudkeeper.leasing.identity.domain.HiddenIssue; import com.cloudkeeper.leasing.base.repository.BaseRepository; import org.springframework.stereotype.Repository; /** * 隐患信息 repository * @author lxw */ @Repository public interface HiddenIssueRepository extends BaseRepository<HiddenIssue> { }
[ "243485908@qq.com" ]
243485908@qq.com
9f494bfdef1c962f63d218afef24fa931fe6dcd9
5803d4c5bccf8111a656d728727ea1279060be3a
/src/main/java/br/com/multiTenancy/util/jpa/Tenant.java
2c2f230fe279b82f1a1e87e953a3946e89812180
[]
no_license
Heitorh3/mult-tenancy
3ababbfe22c8763b80ccd3e903a0637ca20a7fb3
9e04f5e0c214ac4fe1efb60a72b2086e7aebe4cb
refs/heads/master
2021-01-13T11:26:14.670083
2016-12-21T18:20:35
2016-12-21T18:20:35
77,044,410
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package br.com.multiTenancy.util.jpa; import java.io.Serializable; public class Tenant implements Serializable { private static final long serialVersionUID = 1L; private String id; public Tenant() { } public Tenant(String id) { this.id = id; } public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Tenant other = (Tenant) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "heitorh3@gmail.com" ]
heitorh3@gmail.com
257acf2563b83329bed7f8aff99be976b3596f02
b611f7eed7771bb96393f5fb618d4f93cf50be8a
/src/main/java/atest/actions/GetAll.java
7af53f2aab82d338cfa7c3b9309c1e92fb8bcaed
[]
no_license
huangjien/test
006f8a845189995df4d311b8d0934a82bef87399
2f983eac7cc8f5fa45951ddedf602c12bbb1f2f9
refs/heads/console
2022-07-28T00:49:58.990374
2022-07-05T11:49:37
2022-07-05T11:49:37
126,839,302
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package atest.actions; import org.openqa.selenium.WebElement; /** * Created by jien.huang on 19/10/2016. */ public class GetAll extends Action { public WebElement findTestObject() { return null; } protected void handle(WebElement testObject) { } }
[ "huangjien@gmail.com" ]
huangjien@gmail.com
cc91572bea413c7290fbb45eb5c344ef01e2b471
1532ad87139de8d2856cae4addde264f8a48cb1e
/sensors/src/main/java/edu/uci/ics/perpetual/sensors/SensorManager.java
30567e72ea050c57572c2f451ce9d5ee943cd516
[]
no_license
nl0012/perpetual-db
f43d8c87ebc8f0487ade29e4d71dac704cd70907
acf80dec0f163cb19c66d319d11481a91dfb5596
refs/heads/master
2023-07-10T23:56:24.825971
2021-05-06T18:14:23
2021-05-06T18:14:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package edu.uci.ics.perpetual.sensors; import edu.uci.ics.perpetual.util.Pair; import java.util.List; public class SensorManager { private SensorRepository repo = SensorRepository.getInstance(); public void createObservationType(String name, List<Pair<String, String>> attributes) throws Exception { ObservationType type = new ObservationType(name, attributes); repo.insertObservationType(type); } public void createSensorType(String name, String observationType) throws Exception { SensorType type = new SensorType(name, observationType); repo.insertSensorType(type); repo.createTable(type.getDataTableName()); } public void createSensor() {} public void storeObservation() {} public void fetchObservations() {} }
[ "sriramrao@dhcp-10-8-019-233.mobile.reshsg.uci.edu" ]
sriramrao@dhcp-10-8-019-233.mobile.reshsg.uci.edu
bd0d2ead74f5b2fe0deb9c4955e671fd3dc7b831
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
/glassfish-4.1.1/nucleus/security/core/src/main/java/com/sun/enterprise/security/PolicyLoader.java
cd678cfd29a4285601e67d8eaf97fdde35a29f15
[]
no_license
Appdynamics/OSS
a8903058e29f4783e34119a4d87639f508a63692
1e112f8854a25b3ecf337cad6eccf7c85e732525
refs/heads/master
2023-07-22T03:34:54.770481
2021-10-28T07:01:57
2021-10-28T07:01:57
19,390,624
2
13
null
2023-07-08T02:26:33
2014-05-02T22:42:20
null
UTF-8
Java
false
false
11,246
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html * or packager/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at packager/legal/LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.enterprise.security; import java.util.logging.*; //V3:Commented import com.sun.enterprise.server.ApplicationServer; import com.sun.enterprise.config.serverbeans.JaccProvider; //V3:Commented import com.sun.enterprise.config.serverbeans.ElementProperty; //V3:Commented import com.sun.enterprise.config.ConfigContext; import org.glassfish.hk2.api.IterableProvider; import org.jvnet.hk2.config.types.Property; import com.sun.enterprise.config.serverbeans.SecurityService; import com.sun.enterprise.util.i18n.StringManager; import java.util.List; import org.glassfish.api.admin.ServerEnvironment; import javax.inject.Inject; import javax.inject.Named; import org.jvnet.hk2.annotations.Service; import javax.inject.Singleton; /** * Loads the Default Policy File into the system. * * @author Harpreet Singh * @author Jyri J. Virkki * */ @Service @Singleton public class PolicyLoader{ @Inject @Named(ServerEnvironment.DEFAULT_INSTANCE_NAME) private SecurityService securityService; @Inject private IterableProvider<JaccProvider> jaccProviders; private static Logger _logger = null; static { _logger = SecurityLoggerInfo.getLogger(); } private static StringManager sm = StringManager.getManager(PolicyLoader.class); private static final String POLICY_PROVIDER_14 = "javax.security.jacc.policy.provider"; private static final String POLICY_PROVIDER_13 = "javax.security.jacc.auth.policy.provider"; private static final String POLICY_CONF_FACTORY = "javax.security.jacc.PolicyConfigurationFactory.provider"; private static final String POLICY_PROP_PREFIX = "com.sun.enterprise.jaccprovider.property."; private boolean isPolicyInstalled = false; /** * Attempts to install the policy-provider. The policy-provider * element in domain.xml is consulted for the class to use. Note * that if the javax.security.jacc.policy.provider system property * is set it will override the domain.xml configuration. This will * normally not be the case in S1AS. * * <P>The J2EE 1.3 property javax.security.jacc.auth.policy.provider is * checked as a last resort. It should not be set in J2EE 1.4. * */ public void loadPolicy() { if (isPolicyInstalled) { _logger.log(Level.FINE, "Policy already installed. Will not re-install."); return; } // get config object JaccProvider jacc = getConfiguredJaccProvider(); // set config properties (see method comments) setPolicyConfigurationFactory(jacc); boolean j2ee13 = false; // check if system property is set String javaPolicy = System.getProperty(POLICY_PROVIDER_14); if (javaPolicy !=null) { // inform user domain.xml is being ignored _logger.log(Level.INFO, SecurityLoggerInfo.policyProviderConfigOverrideMsg, new String[] { POLICY_PROVIDER_14, javaPolicy } ); } else { // otherwise obtain JACC policy-provider from domain.xml if (jacc != null) { javaPolicy = jacc.getPolicyProvider(); } } if (javaPolicy == null) { javaPolicy = System.getProperty(POLICY_PROVIDER_13); if (javaPolicy != null) { // warn user j2ee13 property is being used j2ee13 = true; _logger.log(Level.WARNING, SecurityLoggerInfo.policyProviderConfigOverrideWarning, new String[] { POLICY_PROVIDER_13, javaPolicy} ); } } // now install the policy provider if one was identified if (javaPolicy != null) { try { _logger.log(Level.INFO, SecurityLoggerInfo.policyLoading, javaPolicy); //Object obj = Class.forName(javaPolicy).newInstance(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class javaPolicyClass = loader.loadClass(javaPolicy); Object obj = javaPolicyClass.newInstance(); if (j2ee13) { // Use JDK 1.3 classes if j2ee1 3 property being used if (!(obj instanceof javax.security.auth.Policy)) { String msg = sm.getString("enterprise.security.plcyload.not13"); throw new RuntimeException(msg); } javax.security.auth.Policy policy = (javax.security.auth.Policy)obj; javax.security.auth.Policy.setPolicy(policy); policy.refresh(); } else { // Otherwise use JDK 1.4 classes. if (!(obj instanceof java.security.Policy)) { String msg = sm.getString("enterprise.security.plcyload.not14"); throw new RuntimeException(msg); } java.security.Policy policy = (java.security.Policy)obj; java.security.Policy.setPolicy(policy); //TODO: causing ClassCircularity error when SM ON and //deployment use library feature and ApplibClassLoader //it is likely a problem caused by the way classloading is done //in this case. if (System.getSecurityManager() == null) { policy.refresh(); } } } catch (Exception e) { _logger.log(Level.SEVERE, SecurityLoggerInfo.policyInstallError, e.getLocalizedMessage()); throw new RuntimeException(e); } // Success. _logger.fine("Policy set to: " + javaPolicy); isPolicyInstalled = true; } else { // no value for policy provider found _logger.warning(SecurityLoggerInfo.policyNotLoadingWarning); } } /** * Returns a JaccProvider object representing the jacc element from * domain.xml which is configured in security-service. * * @return The config object or null on errors. * */ private JaccProvider getConfiguredJaccProvider() { JaccProvider jacc = null; try { String name = securityService.getJacc(); jacc = getJaccProviderByName(name); if (jacc == null) { _logger.log(Level.WARNING, SecurityLoggerInfo.policyNoSuchName, name); } } catch (Exception e) { _logger.warning(SecurityLoggerInfo.policyReadingError); jacc = null; } return jacc; } private JaccProvider getJaccProviderByName(String name) { if (jaccProviders == null || name == null) { return null; } for (JaccProvider jaccProvider : jaccProviders) { if (jaccProvider.getName().equals(name)) { return jaccProvider; } } return null; } /** * Set internal properties based on domain.xml configuration. * * <P>The POLICY_CONF_FACTORY property is consumed by the jacc-api * as documented in JACC specification. It's value is set here to the * value given in domain.xml <i>unless</i> it is already set in which * case the value is not modified. * * <P>Then and properties associated with this jacc provider from * domain.xml are set as internal properties prefixed with * POLICY_PROP_PREFIX. This is currently a workaround for bug 4846938. * A cleaner interface should be adopted. * */ private void setPolicyConfigurationFactory(JaccProvider jacc) { if (jacc == null) { return; } // Handle JACC-specified property for factory //TODO:V3 system property being read here String prop = System.getProperty(POLICY_CONF_FACTORY); if (prop != null) { // warn user of override _logger.log(Level.WARNING, SecurityLoggerInfo.policyFactoryOverride, new String[] { POLICY_CONF_FACTORY, prop } ); } else { // use domain.xml value by setting the property to it String factory = jacc.getPolicyConfigurationFactoryProvider(); if (factory == null) { _logger.log(Level.WARNING, SecurityLoggerInfo.policyConfigFactoryNotDefined); } else { System.setProperty(POLICY_CONF_FACTORY, factory); } } // Next, make properties of this jacc provider available to provider List<Property> props = jacc.getProperty(); for (Property p: props) { String name = POLICY_PROP_PREFIX + p.getName(); String value = p.getValue(); _logger.finest("PolicyLoader set ["+name+"] to ["+value+"]"); System.setProperty(name, value); } } }
[ "fgonzales@appdynamics.com" ]
fgonzales@appdynamics.com
1a439afe098720e675b941efd72aad22d0965f06
73e31b53ebc6fdb3f7f538999fef9cc69aafa804
/src/gg/Exercise.java
ff7a01805b653004c4ef78c233e4faaadbef92ba
[]
no_license
tang-xuehua/txh
4065698e84f23af4798dcb1114e2bb7c447d501f
4596b464a66dd07b9cd0fcc5fc7fd186b8d2c4c6
refs/heads/master
2020-09-22T10:26:25.275873
2019-12-01T12:10:54
2019-12-01T12:10:54
225,154,896
0
0
null
null
null
null
GB18030
Java
false
false
2,025
java
package gg; import java.util.Random; public class Exercise { static final int MAX_NUMBER = 50; static final int COLUMN_NUMBER = 5; private BinaryOperator equationList[] = new BinaryOperator[MAX_NUMBER]; public void generateExercise(){ BinaryOperator bo; for(int i = 0; i < MAX_NUMBER; i++){ bo = generateOperation(); while(contains(bo, i-1)){ bo = generateOperation(); } equationList[i] = bo; } } public void generateAdditionExercise(){ BinaryOperator bo; for(int i = 0; i < MAX_NUMBER; i++){ bo = new AdditionOperation(); while(contains(bo, i-1)){ bo = new AdditionOperation(); } equationList[i] = bo; } } public void generateSubstractExercise(){ BinaryOperator bo; for(int i = 0; i < MAX_NUMBER; i++){ bo = new SubtractOperation(); while(contains(bo, i-1)){ bo = new SubtractOperation(); } equationList[i] = bo; } } private BinaryOperator generateOperation() { int intOperator; Random random = new Random(); intOperator = random.nextInt(2); if(intOperator == 1) return new AdditionOperation(); else return new SubtractOperation(); } public boolean contains(BinaryOperator bo, int length){ boolean appear = false; for(int i = 0; i <= length; i++){ if(bo.equals(equationList[i])){ appear = true; break; } } return appear; } public void formateDisplay(){ for (int i = 0; i < equationList.length; i++) { BinaryOperator bo1 = equationList[i]; System.out.print(bo1.getLeftOperator()+""+bo1.getOperator()+""+bo1.getRightOperator()+"= "); if((i+1) % COLUMN_NUMBER == 0)System.out.println(); } } public static void main(String[] args) { Exercise exercise = new Exercise(); //exercise.generateAdditionExercise();//生成50个加法算式 //exercise.generateSubstractExercise();//生成50个减法算式 exercise.generateExercise();////生成50个混合算式 exercise.formateDisplay(); } }
[ "Lenovo@LAPTOP-ATVUF9KB" ]
Lenovo@LAPTOP-ATVUF9KB
d864876a1912d7287cdfb1b27f52821bb3a2fdd6
397ac432d4ab51c4ef46f294161ecd388d46be26
/src/test/java/com/usermanagment/UsermanagmentApplicationTests.java
aa24f0c01a3b8c122c9fd6212b5b5e1dd25ee274
[]
no_license
paras16jul1991/usermanagement
06701f18962f81e9cb428520ba08c6812e351420
7de8a29ad2858c2dd939d996046628ef16c5f415
refs/heads/main
2023-03-19T06:10:21.072096
2021-02-21T13:40:26
2021-02-21T13:40:26
340,319,785
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package com.usermanagment; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class UsermanagmentApplicationTests { @Test void contextLoads() { } }
[ "paras16jul1991@gmail.com" ]
paras16jul1991@gmail.com
2898d1eecaa21c4e20fd6cb1d24cb2098e75c0fb
57ac3c4ca6daffaf9219c21b0a0ff6e2e34ee67b
/M.SC/ASSIGNMENTS_1/ASS_5.java
ce2f948add57c0d76a9766b5d834f69c5aa084f7
[]
no_license
HomeVampire/Java-Programming
adec27af1c64f14bd2f2ab6599d0ff49f9e5bcc7
9ecf0f451d03f5aa6f92bef9c4cbe25e9579dac2
refs/heads/main
2023-01-29T04:44:16.366007
2020-12-12T18:00:07
2020-12-12T18:00:07
320,888,078
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
/*WAJP to Check whether a number is BUZZ number or not. A BUZZ number is the number, which either ends with 7 or is divided by 7.*/ import java.util.*; class ASS_5{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); System.out.println("Enter a number"); int n=sc.nextInt(); int last_digit=n%10; if((last_digit==7) || (n%7==0)){ System.out.println("The number is BUZZ number."); } else{ System.out.println("The number is not-BUZZ number."); } } }
[ "deepdey9811@outlook.com" ]
deepdey9811@outlook.com
b8faa1c82f9c37a2a9e5b2cccf6cd62cb18a7fad
be725740aa3b9efd953651634e4c858aec438eab
/src/main/java/com/cni/pojo/CommonResponse.java
0e43196727a17e3aab873a3690628d223227465d
[]
no_license
474846718/cni-track-transform
0b35166d10913dcd482f42b0c4fcaeed01e15623
1668987ed7a5746d8d48753e021e489b6dc35a2b
refs/heads/master
2020-03-08T15:46:09.375980
2018-04-08T14:21:33
2018-04-08T14:21:33
128,220,838
0
0
null
null
null
null
UTF-8
Java
false
false
2,503
java
package com.cni.pojo; /** * 示例: * { * "code": "11006", * "message": "token不能为空", * "info": null, * "success": false * } * <p> * Created by CNI on 2018/1/9. * <p> * Author: 胡飞飞 */ public class CommonResponse { /** * code : 11006 * message : token不能为空 * info : null * success : false */ private String code; private String message; private Object info; private boolean success; public CommonResponse() { } private CommonResponse(String code, String message, Object info, boolean success) { this.code = code; this.message = message; this.info = info; this.success = success; } public static CommonResponse build(String code, String message, Object info, boolean success) { return new CommonResponse(code, message, info, success); } public static CommonResponse success() { return new CommonResponse("200", "ok", null, true); } public static CommonResponse success(String msg) { return new CommonResponse("200", msg, null, true); } public static CommonResponse success(String msg, Object info) { return new CommonResponse("200", msg, info, true); } public static CommonResponse error(String code, String msg) { return new CommonResponse(code, msg, null, false); } public static CommonResponse error(String code, String msg, Object info) { return new CommonResponse(code, msg, info, false); } public static CommonResponse error(String msg, Throwable e) { return new CommonResponse("500", msg, e.getMessage(), false); } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Object getInfo() { return info; } public void setInfo(Object info) { this.info = info; } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } @Override public String toString() { return "CommonResult{" + "code='" + code + '\'' + ", message='" + message + '\'' + ", info=" + info + ", success=" + success + '}'; } }
[ "hff1996723@qq.com" ]
hff1996723@qq.com
998a160b051afdcb8c50398b87fca8d251a3e096
d8c52998aefc85f9497401e73029adbb57c8a64d
/app/src/main/java/com/curzar/androidkiosksample/ble/backup/DeviceScanActivity_bak.java
a98063a979235145464be8ca3b33f0bfb31b96ae
[]
no_license
JonatanGarces/AndroidKioskSample
445b1d583898c0da5f0ddc3a09ca1284cd9d2e17
be21eb6489340c89f04c14b36a1c552e7b2d6815
refs/heads/master
2023-03-29T15:37:32.087653
2021-04-03T00:28:21
2021-04-03T00:28:21
306,259,163
0
0
null
null
null
null
UTF-8
Java
false
false
10,272
java
package com.curzar.androidkiosksample.ble.backup; import android.Manifest; import android.app.Activity; import android.app.ListActivity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothManager; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import com.curzar.androidkiosksample.R; import com.curzar.androidkiosksample.Activity4BleServices; import com.curzar.androidkiosksample.database.SettingViewModel; import java.util.ArrayList; public class DeviceScanActivity_bak extends ListActivity { private SettingViewModel mSettingViewModel; private LeDeviceListAdapter mLeDeviceListAdapter; private BluetoothAdapter mBluetoothAdapter; private boolean mScanning; private Handler mHandler; private static final int REQUEST_ENABLE_BT = 1; private static final int REQUEST_LOCATION_PERMISSIONS = 2; // Stops scanning after 10 seconds. private static final long SCAN_PERIOD = 10000; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // getActionBar().setTitle(R.string.title_devices); mHandler = new Handler(); // Use this check to determine whether BLE is supported on the device. Then you can // selectively disable BLE-related features. if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show(); finish(); } // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to // BluetoothAdapter through BluetoothManager. final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); mBluetoothAdapter = bluetoothManager.getAdapter(); // Checks if Bluetooth is supported on the device. if (mBluetoothAdapter == null) { Toast.makeText(this, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show(); finish(); return; } //mSettingViewModel = new ViewModelProvider((ViewModelStoreOwner) this).get(SettingViewModel.class); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); if (!mScanning) { menu.findItem(R.id.menu_stop).setVisible(false); menu.findItem(R.id.menu_scan).setVisible(true); menu.findItem(R.id.menu_refresh).setActionView(null); } else { menu.findItem(R.id.menu_stop).setVisible(true); menu.findItem(R.id.menu_scan).setVisible(false); menu.findItem(R.id.menu_refresh).setActionView( R.layout.actionbar_indeterminate_progress); } return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_scan: mLeDeviceListAdapter.clear(); scanLeDevice(true); break; case R.id.menu_stop: scanLeDevice(false); break; } return true; } @Override protected void onResume() { super.onResume(); // Ensures Bluetooth is enabled on the device. If Bluetooth is not currently enabled, // fire an intent to display a dialog asking the user to grant permission to enable it. if (!mBluetoothAdapter.isEnabled()) { Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); } // Initializes list view adapter. mLeDeviceListAdapter = new LeDeviceListAdapter(); setListAdapter(mLeDeviceListAdapter); //scanLeDevice(true); //esta parte es de permisos int permissionCoarse = Build.VERSION.SDK_INT >= 23 ? ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) : PackageManager.PERMISSION_GRANTED; if (permissionCoarse == PackageManager.PERMISSION_GRANTED) { scanLeDevice(true); } else { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_LOCATION_PERMISSIONS); } } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { case REQUEST_LOCATION_PERMISSIONS: { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { scanLeDevice(true); } } } } //esta parte es de permisos @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // User chose not to enable Bluetooth. if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) { finish(); return; } super.onActivityResult(requestCode, resultCode, data); } @Override protected void onPause() { super.onPause(); scanLeDevice(false); mLeDeviceListAdapter.clear(); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { final BluetoothDevice device = mLeDeviceListAdapter.getDevice(position); if (device == null) return; final Intent intent = new Intent(this, Activity4BleServices.class); intent.putExtra(Activity4BleServices.EXTRAS_DEVICE_NAME, device.getName()); intent.putExtra(Activity4BleServices.EXTRAS_DEVICE_ADDRESS, device.getAddress()); //mSettingViewModel.updateByName("device_name",device.getName()); //mSettingViewModel.updateByName("device_address",device.getAddress()); if (mScanning) { mBluetoothAdapter.stopLeScan(mLeScanCallback); mScanning = false; } startActivity(intent); } private void scanLeDevice(final boolean enable) { if (enable) { // Stops scanning after a pre-defined scan period. mHandler.postDelayed(new Runnable() { @Override public void run() { mScanning = false; mBluetoothAdapter.stopLeScan(mLeScanCallback); invalidateOptionsMenu(); } }, SCAN_PERIOD); mScanning = true; mBluetoothAdapter.startLeScan(mLeScanCallback); } else { mScanning = false; mBluetoothAdapter.stopLeScan(mLeScanCallback); } invalidateOptionsMenu(); } // Adapter for holding devices found through scanning. private class LeDeviceListAdapter extends BaseAdapter { private ArrayList<BluetoothDevice> mLeDevices; private LayoutInflater mInflator; public LeDeviceListAdapter() { super(); mLeDevices = new ArrayList<BluetoothDevice>(); mInflator = DeviceScanActivity_bak.this.getLayoutInflater(); } public void addDevice(BluetoothDevice device) { if(!mLeDevices.contains(device)) { mLeDevices.add(device); } } public BluetoothDevice getDevice(int position) { return mLeDevices.get(position); } public void clear() { mLeDevices.clear(); } @Override public int getCount() { return mLeDevices.size(); } @Override public Object getItem(int i) { return mLeDevices.get(i); } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { ViewHolder viewHolder; // General ListView optimization code. if (view == null) { view = mInflator.inflate(R.layout.listitem_device, null); viewHolder = new ViewHolder(); viewHolder.deviceAddress = (TextView) view.findViewById(R.id.device_address); viewHolder.deviceName = (TextView) view.findViewById(R.id.device_name); view.setTag(viewHolder); } else { viewHolder = (ViewHolder) view.getTag(); } BluetoothDevice device = mLeDevices.get(i); final String deviceName = device.getName(); if (deviceName != null && deviceName.length() > 0) viewHolder.deviceName.setText(deviceName); else viewHolder.deviceName.setText(R.string.unknown_device); viewHolder.deviceAddress.setText(device.getAddress()); return view; } } // Device scan callback. private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) { runOnUiThread(new Runnable() { @Override public void run() { mLeDeviceListAdapter.addDevice(device); mLeDeviceListAdapter.notifyDataSetChanged(); } }); } }; static class ViewHolder { TextView deviceName; TextView deviceAddress; } }
[ "jogala14@hotmail.com" ]
jogala14@hotmail.com
60b32b73765fa87871f0c75e426d29071f06fd38
dc518944f545eeed48896a0c1eb6124827193ca5
/src/main/java/ch/epfl/cs107/play/game/actor/general/Nuage.java
8d97ea48ca56a1b31183bcc924d9482d14fb3265
[]
no_license
ClementSicard/Bike-Game-in-Java
3ec78cfe0e572b22526169ab4336285c4b30ae33
ba16ee51ef58eeb948838275cc90ff0083396930
refs/heads/master
2021-08-29T01:27:04.224443
2017-12-13T09:01:54
2017-12-13T09:01:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package ch.epfl.cs107.play.game.actor.general; import ch.epfl.cs107.play.game.actor.ImageGraphics; import ch.epfl.cs107.play.game.actor.*; import ch.epfl.cs107.play.math.PartBuilder; import ch.epfl.cs107.play.math.Polygon; import ch.epfl.cs107.play.math.Vector; import ch.epfl.cs107.play.window.Canvas; public class Nuage extends GameEntity implements Actor { private PartBuilder partBuilder; private ImageGraphics graphics; public Nuage(ActorGame game, Vector position, float height, float width) { super(game, true, position); partBuilder = getEntity().createPartBuilder(); Polygon polygon = new Polygon( new Vector(0.0f, 0.0f), new Vector(width, 0.0f), new Vector(width, height), new Vector(0.0f, height)); partBuilder.setShape(polygon); partBuilder.setGhost(true); //The cloud is set ghost : it won't affect the bike's trajectory if there is a contact between them (a cloud is a passive Actor) graphics = new ImageGraphics("cloud.png", width, height); graphics.setParent(this); getOwner().addActor(this); } @Override public void draw(Canvas canvas) { graphics.draw(canvas); } public void destroy() { getEntity().destroy(); } }
[ "ClementSicard@users.noreply.github.com" ]
ClementSicard@users.noreply.github.com
c3848a6e78b6b8cef8668e242258abcaf329a750
9b13012a5782b1a44eeea76532d9f43e33619a26
/src/test/java/MailPageTest.java
2acfd339744b0233387872ef190157841a989cac
[]
no_license
dvitkovsky/Test_Template
d9acecfb424509d678262b883653e9b3f833220d
a6a140ffe11e5c0a7bbb442ba4e8b30c8581b119
refs/heads/master
2021-06-02T04:42:01.505150
2016-05-25T17:10:53
2016-05-25T17:10:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,653
java
import base.TestBase; import org.testng.annotations.Test; import pages.MailPage; import ru.yandex.qatools.allure.annotations.Description; import ru.yandex.qatools.allure.annotations.Features; import ru.yandex.qatools.allure.annotations.Title; import static helpers.PageText.getPageText; @Features("Mail Page Tests") public class MailPageTest extends TestBase { private static final String INBOX_TITLE = getPageText("MailPage.inboxPageTitle"); private static final String SENT_ITEMS_TITLE = getPageText("MailPage.sentItemsPageTitle"); private static final String DRAFTS_TITLE = getPageText("MailPage.draftsPageTitle"); private static final String SPAM_TITLE = getPageText("MailPage.spamPageTitle"); private static final String TRASH_TITLE = getPageText("MailPage.trashPageTitle"); @Title("Basic UI elements Test") @Description("Verify all ui elements") @Test public void basicUiElementsTest() { MailPage.checkAllUiElements(); } @Test public void openInboxTest() { MailPage.openInbox(); MailPage.checkChildPageTitle(INBOX_TITLE); } @Test public void openSentItemsTest() { MailPage.openSentItems(); MailPage.checkChildPageTitle(SENT_ITEMS_TITLE); } @Test public void openDraftsTest() { MailPage.openDrafts(); MailPage.checkChildPageTitle(DRAFTS_TITLE); } @Test public void openSpamTest() { MailPage.openSpam(); MailPage.checkChildPageTitle(SPAM_TITLE); } @Test public void openTrashTest() { MailPage.openTrash(); MailPage.checkChildPageTitle(TRASH_TITLE); } }
[ "vitkovsky.denis@gmail.com" ]
vitkovsky.denis@gmail.com
eab189d24de44154944aeda3ed57860907b8a148
f166d3ab1d31b33669ec48ea0144853646336dce
/app/src/main/java/com/cicinnus/cateye/tools/LocationUtil.java
d4e6928ae5134a44fcc5244233afa41b5c44b944
[ "MIT" ]
permissive
Canglangweiwei/CatEye
4ebf86366876422e42aa4f73cbb5837c33523492
94a2fe5c1a74b42db11b54e3ceda0a0044feb13c
refs/heads/master
2020-04-23T14:32:58.549871
2019-06-03T06:57:02
2019-06-03T06:57:02
171,235,517
0
0
null
null
null
null
UTF-8
Java
false
false
4,371
java
package com.cicinnus.cateye.tools; import android.app.Activity; import android.util.Log; import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocationClient; import com.amap.api.location.AMapLocationClientOption; import com.amap.api.location.AMapLocationListener; import java.lang.ref.WeakReference; /** * 高德定位工具类 */ public class LocationUtil { // 声明AMapLocationClient类对象 private AMapLocationClient mLocationClient; // 声明AMapLocationClientOption对象 private AMapLocationClientOption mLocationOption = null; // 定位信息 private AMapLocation mLocationInfo; public LocationUtil setOnLocationChangeListener(OnLocationChangeListener onLocationChangeListener) { this.onLocationChangeListener = onLocationChangeListener; return this; } // 回调 private OnLocationChangeListener onLocationChangeListener; public LocationUtil(final WeakReference<Activity> mContext) { mLocationClient = new AMapLocationClient(mContext.get()); initOption(); mLocationClient.setLocationOption(mLocationOption); mLocationClient.setLocationListener(new AMapLocationListener() { @Override public void onLocationChanged(AMapLocation amapLocation) { if (amapLocation != null) { if (amapLocation.getErrorCode() == 0) { //可在其中解析amapLocation获取相应内容。 mLocationInfo = amapLocation; if (onLocationChangeListener != null) { onLocationChangeListener.onChange(amapLocation); } } else { //定位失败时,可通过ErrCode(错误码)信息来确定失败的原因,errInfo是错误信息,详见错误码表。 Log.e("AmapError", "location Error, ErrCode:" + amapLocation.getErrorCode() + ", errInfo:" + amapLocation.getErrorInfo()); if (onLocationChangeListener != null) { onLocationChangeListener.onLocateFail(amapLocation); } } } } }); } private void initOption() { // 初始化AMapLocationClientOption对象 mLocationOption = new AMapLocationClientOption(); // 设置定位模式为AMapLocationMode.Hight_Accuracy,高精度模式。 // 获取最近3s内精度最高的一次定位结果: // 设置setOnceLocationLatest(boolean b)接口为true,启动定位时SDK会返回最近3s内精度最高的一次定位结果。 // 如果设置其为true,setOnceLocation(boolean b)接口也会被设置为true,反之不会,默认为false。 mLocationOption.setOnceLocationLatest(true); } /** * 开始定位 */ public void startLocation() { mLocationClient.setLocationOption(mLocationOption); mLocationClient.startLocation(); } /** * 设置是否进行单次定位,默认true */ public LocationUtil setOnceLocation(boolean once) { mLocationOption.setOnceLocation(once); return this; } /** * 设置定位精度模式 */ public LocationUtil setLocationType(AMapLocationClientOption.AMapLocationMode mode) { // 定位模式,默认为省电模式 AMapLocationClientOption.AMapLocationMode aMapLocationMode = mode; mLocationOption.setLocationMode(aMapLocationMode); return this; } /** * 获取经度 */ public double getLongitude() { return mLocationInfo.getLongitude(); } /** * 获取维度 */ public double getLatitude() { return mLocationInfo.getLatitude(); } /** * 获取地址 */ public String getAddress() { return mLocationInfo.getAddress(); } /** * 停止定位,本地定位服务并不会被销毁 */ public void stopLocation() { mLocationClient.stopLocation(); } /** * 销毁定位客户端,同时销毁本地定位服务。 */ public void destroyLocation() { if (mLocationClient != null) { mLocationClient.onDestroy(); mLocationClient = null; } } public interface OnLocationChangeListener { void onChange(AMapLocation amapLocation); void onLocateFail(AMapLocation amapLocation); } }
[ "weiweistar@163.com" ]
weiweistar@163.com
ac97f96a1b8a28345960011189b8dd39e738801e
22cb3e3de41c2fde2005fe4a79f6788946e67c75
/sel/src/main/java/sel/Captchademo.java
25b10ac338f9de64eea03f33b767404c6b212dd9
[]
no_license
priyakomandur/test-repo
f968ac635b2069bb34fbbd79968f7cccf23ab7ca
d4b7411033270a37c0e397eca17044c883d9153a
refs/heads/master
2020-04-01T02:36:29.662713
2018-10-21T19:10:53
2018-10-21T19:10:53
152,786,784
0
0
null
null
null
null
UTF-8
Java
false
false
1,565
java
package sel; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class Captchademo { public static void main(String[] args) { // TODO Auto-generated method stub WebDriver driver=new FirefoxDriver(); driver.get("https://www.finalwebsites.com/demosnew/custom-captcha-image-script/"); driver.manage().window().maximize(); driver.findElement(By.cssSelector("textarea[class='form-control']")).click(); driver.findElement(By.cssSelector("textarea[class='form-control']")).sendKeys("captcha test"); int number=switchframeutility(driver,By.cssSelector("div.recaptcha-checkbox-checkmark")); driver.switchTo().frame(number); driver.findElement(By.cssSelector("div.recaptcha-checkbox-checkmark")).click(); int number2=switchframeutility(driver,By.cssSelector("#recaptcha-verify-button")); driver.switchTo().frame(number2); driver.findElement(By.cssSelector("#recaptcha-verify-button")).click(); } public static int switchframeutility(WebDriver driver,By by) { int totalframes=driver.findElements(By.tagName("iframe")).size(); System.out.println("totalframes is:"+totalframes); int i; for(i=0;i<totalframes;i++) { driver.switchTo().frame(i); int count=driver.findElements(by).size(); if(count!=0) { driver.findElement(by).click(); break; } else { System.out.println("continue looping"); } } driver.switchTo().defaultContent(); return i; } }
[ "pavan.komandur@gmail.com" ]
pavan.komandur@gmail.com
8d03ebc0c2b4eeab052c07d668e074320e599e3d
2289069aaa0b74f95d6be2089bfe3857442e5c53
/src/main/java/com/company/project/web/DeviceController.java
b69c17fd4f1da971cc8d4839994d3fece4bba241
[]
no_license
CDKPXN/light-web-server
846c235b77e349d511dc9d8bdca22b74978382e3
450b11b12b904d91f90134f9a233399aa486c2d7
refs/heads/master
2020-04-24T08:13:45.774233
2019-02-22T03:49:16
2019-02-22T03:49:16
171,824,136
0
0
null
null
null
null
UTF-8
Java
false
false
2,478
java
package com.company.project.web; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.company.project.core.Result; import com.company.project.core.ResultGenerator; import com.company.project.model.Light; import com.company.project.service.DeviceService; import com.company.project.vo.HeartReport; @RestController @RequestMapping("/api/cmd") public class DeviceController { @Autowired private DeviceService deviceService; private static final Logger LOG = LoggerFactory.getLogger(DeviceController.class); @GetMapping("/heart") public Result refreshHeart(@RequestParam String lightnum,@RequestParam Integer heartfrequency) { return ResultGenerator.genSuccessResult(); } @PutMapping("/heart") public Result setHeart(@RequestParam String lightnum,@RequestParam Integer heartfrequency) { return ResultGenerator.genSuccessResult(); } @GetMapping("/refresh4g") public Result refresh4G(@RequestParam String lightnum) { return ResultGenerator.genSuccessResult(); } @GetMapping("/refreshgps") public Result refreshGPS(@RequestParam String lightnum) { return ResultGenerator.genSuccessResult(); } @PutMapping("/buzzer") public Result setBuzzer(@RequestParam String lightnum, @RequestParam Integer lamp_buzzer_day, @RequestParam Integer lamp_buzzer_night) { return ResultGenerator.genSuccessResult(); } @PutMapping("/light") public Result setLight(@RequestParam String lightnum,@RequestParam Integer heartfrequency) { return ResultGenerator.genSuccessResult(); } @PostMapping("/heart") public Result heartAutoReport(@RequestBody Light light) { LOG.info("上报心跳"); return ResultGenerator.genSuccessResult(); } @PutMapping("/on") public Result on(@RequestParam String lightnum) { return ResultGenerator.genSuccessResult(); } @PutMapping("/off") public Result off(@RequestParam String lightnum) { return ResultGenerator.genSuccessResult(); } }
[ "786305898@qq.com" ]
786305898@qq.com
eaf676ad5421668d387579b50e582e1d162b861e
e1b285bd260ab560be1c43a96c60cb03580447f2
/src/com/Sender.java
1655932903c2e16fb5e69118b8bb256e33ea67c2
[]
no_license
VivekRajyaguru/RabbittMQBasic
31042b6fd7a7f5f46f8059c3f814d5d61dfa4b80
b034569c7ea8ba8096e8536fbf30a268129fce7a
refs/heads/master
2021-01-22T02:48:56.146713
2017-10-15T17:27:45
2017-10-15T17:27:45
102,252,923
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.ConnectionFactory; public class Sender { private final static String queueName = "demo"; public static void main(String[] args) throws Exception { ConnectionFactory factory = new ConnectionFactory(); factory.setHost("localhost"); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); channel.queueDeclare(queueName, false, false, false, null); String message = "This is a test Messsage."; channel.basicPublish("", queueName, null, message.getBytes()); channel.close(); connection.close(); } }
[ "vivekrajyaguru1993@gmail.com" ]
vivekrajyaguru1993@gmail.com
f7040804a272b966055e0254ad0ce9bf869aefb3
f400e0a0054682736b9df5b2a5295518fc3ef1b9
/gaia-web/src/main/java/com/ntc/gaia/web/base/vo/CSessionBean.java
6e8e3b9a5ee3bb1005302466ae404070b7100b85
[]
no_license
wugenbin/gm-gaia
4973c0fb9f2aeafe9bf4e4c01e988ecd6a89338d
8b7ed1960f0f49817e8d3669ece19efaadb64dc3
refs/heads/master
2021-07-18T17:24:51.475432
2017-10-23T11:45:12
2017-10-23T11:45:12
107,971,150
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package com.ntc.gaia.web.base.vo; import java.io.Serializable; /** * 客户登录会话信息对象 * * @author David * @date 2017-08-11 */ public class CSessionBean implements Serializable { private static final long serialVersionUID = 215080776579791865L; // 系统Session号 private String UID = ""; // 客户编号 private String cid = ""; // 客户昵称 private String nickname = ""; // 客户手机 private String msisdn = ""; // roleName private String[] roleNames ; // roleLevel private Integer[] roleLevels; // 客户密码 private String pwdmd5 = ""; // 登录时间 private String logintime = ""; public CSessionBean() { } public CSessionBean(String UID, String cid, String nickname, String[] roleNames, String msisdn, Integer[] roleLevels, String pwdmd5) { this.UID = UID; this.cid = cid; this.nickname = nickname; this.roleNames = roleNames; this.msisdn = msisdn; this.roleLevels = roleLevels; this.pwdmd5 = pwdmd5; } public String getCid() { if (cid == null) { cid = ""; } return cid; } public String getUID() { return UID; } public void setUID(String uID) { UID = uID; } public void setCid(String cid) { this.cid = cid; } public String getMsisdn() { return msisdn; } public void setMsisdn(String msisdn) { this.msisdn = msisdn; } public String getPwdmd5() { return pwdmd5; } public void setPwdmd5(String pwdmd5) { this.pwdmd5 = pwdmd5; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getLogintime() { return logintime; } public void setLogintime(String logintime) { this.logintime = logintime; } public String[] getRoleNames() { return roleNames; } public void setRoleNames(String[] roleNames) { this.roleNames = roleNames; } public Integer[] getRoleLevels() { return roleLevels; } public void setRoleLevels(Integer[] roleLevels) { this.roleLevels = roleLevels; } }
[ "wugenbin@126.com" ]
wugenbin@126.com
bec1f75d962fdd4a7a23efd9a3837a771be51a6c
7b0521dfb4ec76ee1632b614f32ee532f4626ea2
/src/main/java/alcoholmod/Mathioks/NPC/EntityQuestGiver.java
9b69a727fe22d34ac8beb4f7e5cbca06a4cdc640
[]
no_license
M9wo/NarutoUnderworld
6c5be180ab3a00b4664fd74f6305e7a1b50fe9fc
948065d8d43b0020443c0020775991b91f01dd50
refs/heads/master
2023-06-29T09:27:24.629868
2021-07-27T03:18:08
2021-07-27T03:18:08
389,832,397
0
0
null
null
null
null
UTF-8
Java
false
false
14,199
java
package alcoholmod.Mathioks.NPC; import alcoholmod.Mathioks.AlcoholMod; import alcoholmod.Mathioks.ExtendedPlayer; import java.util.Random; import net.minecraft.command.ICommandSender; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EnumCreatureAttribute; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAIFollowOwner; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; public class EntityQuestGiver extends EntityTameable { private int timer; private int timer2; private int homeCheckTimer; private int attackTimer; private int giveCounter = 0; private boolean quested; private int questTimer; Random rand = new Random(); public EntityQuestGiver(World par1World) { super(par1World); this.tasks.addTask(0, (EntityAIBase)new EntityAISwimming((EntityLiving)this)); this.tasks.addTask(4, (EntityAIBase)new EntityAIMoveTowardsRestriction((EntityCreature)this, 1.0D)); this.tasks.addTask(6, (EntityAIBase)new EntityAIWander((EntityCreature)this, 1.0D)); this.tasks.addTask(2, (EntityAIBase)this.aiSit); this.tasks.addTask(7, (EntityAIBase)new EntityAIWatchClosest((EntityLiving)this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, (EntityAIBase)new EntityAILookIdle((EntityLiving)this)); this.tasks.addTask(5, (EntityAIBase)new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.targetTasks.addTask(1, (EntityAIBase)new EntityAIHurtByTarget((EntityCreature)this, true)); setSize(0.6F, 1.8F); } public boolean isBesideClimbableBlock() { return ((this.dataWatcher.getWatchableObjectByte(16) & 0x1) != 0); } protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(18, Byte.valueOf((byte)0)); setTameSkin(this.worldObj.rand.nextInt(6)); this.quested = false; getEntityData().setBoolean("quested", this.quested); this.questTimer = 0; getEntityData().setInteger("questTimer", this.questTimer); } protected boolean isAIEnabled() { return true; } protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0D); getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); } public void writeEntityToNBT(NBTTagCompound p_70014_1_) { super.writeEntityToNBT(p_70014_1_); p_70014_1_.setInteger("CatType", getTameSkin()); p_70014_1_.setInteger("questTimer", this.questTimer); p_70014_1_.setBoolean("quested", this.quested); } public void readEntityFromNBT(NBTTagCompound p_70037_1_) { super.readEntityFromNBT(p_70037_1_); setTameSkin(p_70037_1_.getInteger("CatType")); this.quested = p_70037_1_.getBoolean("quested"); this.questTimer = p_70037_1_.getInteger("questTimer"); } public int getTameSkin() { return this.dataWatcher.getWatchableObjectByte(18); } public void setTameSkin(int p_70912_1_) { this.dataWatcher.updateObject(18, Byte.valueOf((byte)p_70912_1_)); } public boolean interact(EntityPlayer p_70085_1_) { ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); this.questTimer = getEntityData().getInteger("questTimer"); this.quested = getEntityData().getBoolean("quested"); if (p_70085_1_ != null) { ExtendedPlayer props = ExtendedPlayer.get(p_70085_1_); if (!this.worldObj.isRemote && !isTamed()) { if (getTameSkin() == 0) { if (props.getRank() == 21) p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Tazuna: A ninja! thank goodness! oh... You're just an academy student.. I need at least a Chunin..")); if (props.getRank() == 1) p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Tazuna: A ninja! thank goodness! oh... You're just a Genin.. I need at least a Chunin..")); } if (getTameSkin() == 1) { getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D); if (itemstack != null) { if (itemstack.getItem() != AlcoholMod.DQuestBabysitting) if (!this.quested) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Woman: Could you please watch over my baby for a bit?")); dropItem(AlcoholMod.DQuestBabysitting, 1); this.aiSit.setSitting(true); getEntityData().setInteger("questTimer", 24000); getEntityData().setBoolean("quested", true); } else if (this.quested) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Woman: I don't need any help right now hun")); } } else if (!this.quested) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Woman: Could you please watch over my baby for a bit?")); dropItem(AlcoholMod.DQuestBabysitting, 1); this.aiSit.setSitting(true); getEntityData().setInteger("questTimer", 24000); getEntityData().setBoolean("quested", true); } else if (this.quested) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Woman: I don't need any help right now hun")); } } if (getTameSkin() == 2) { getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D); if (!this.quested) if (props.getRank() == 21) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Oh man, Oh man, I need some ingredients, quick!")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Could you please help me out?")); dropItem(AlcoholMod.DQuest, 1); this.aiSit.setSitting(true); getEntityData().setInteger("questTimer", 24000); getEntityData().setBoolean("quested", true); } else if (props.getRank() != 21) { int rand = p_70085_1_.worldObj.rand.nextInt(5); if (rand == 1) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Oh man, Oh man, I need some ingredients, quick!")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: They will require some fighthing to be acquired though!")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Could you please help me out?")); dropItem(AlcoholMod.CQuest, 1); this.aiSit.setSitting(true); getEntityData().setInteger("questTimer", 24000); getEntityData().setBoolean("quested", true); } else { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Oh man, Oh man, I need some ingredients, quick!")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Could you please help me out?")); dropItem(AlcoholMod.DQuest, 1); this.aiSit.setSitting(true); getEntityData().setInteger("questTimer", 24000); getEntityData().setBoolean("quested", true); } } else if (this.quested) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Ichiraku's helper: Thank you! I'll probably need your help again tomorrow!")); } } if (getTameSkin() == 3) { getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D); if (!this.quested) if (props.getRank() != 21 && props.getRank() != 1) { if (props.getRank() >= 2 && props.getRank() != 21) setDead(); } else { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Hiruzen: I've got a mission for a Chunin or higher")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Hiruzen: I'm sorry, but you're not cut out for it!")); setDead(); } } if (getTameSkin() == 5) { getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.0D); if (!this.quested) if (props.getRank() == 21) { if (props.getLevel() >= 50) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, an Academy Student eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: You seem strong enough to take on the Genin exams, here you go!")); dropItem(AlcoholMod.GeninExam, 1); setDead(); } else { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, an Academy Student eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: hehe, keep at it young shinobi, one day you'll be able to participate in the exams!")); } } else if (props.getRank() == 1) { if (props.getLevel() >= 200) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, a Genin eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: You seem strong enough to take on the Chunin exams, here you go!")); dropItem(AlcoholMod.ChuninExams, 1); setDead(); } else { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, a Genin eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: hehe, keep at it young shinobi, one day you'll be able to participate in the Chuunin exams!")); } } else if (props.getRank() == 2) { if (props.getLevel() >= 350) { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, a Chuunin eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: You seem strong enough to take on the Tokubetsu Jonin exams...")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: oh, it looks like they aren't coded in yet...")); setDead(); } else { p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: Oh, a Chuunin eh?")); p_70085_1_.addChatMessage((IChatComponent)new ChatComponentText("Exam Proctor: hehe, keep at it young shinobi, one day you'll be able to participate in the Tokubetsu Jonin exams!")); } } } } } return super.interact(p_70085_1_); } public boolean attackEntityFrom(DamageSource source, float amount) { if (source != null && getOwner() != null && !this.worldObj.isRemote) ((ICommandSender)getOwner()).addChatMessage((IChatComponent)new ChatComponentText("Tazuna: AAUUW I'm Hurt!")); return super.attackEntityFrom(source, amount); } public void onUpdate() { super.onUpdate(); if (this.quested) { this.questTimer--; getEntityData().setInteger("questTimer", this.questTimer); } if (this.questTimer == 0) { getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); this.quested = false; getEntityData().setBoolean("quested", this.quested); this.questTimer = 1; getEntityData().setInteger("questTimer", this.questTimer); } } public void onDeath(DamageSource par1DamageSource) { super.onDeath(par1DamageSource); if (!this.worldObj.isRemote && getOwner() != null) { ((ICommandSender)getOwner()).addChatMessage((IChatComponent)new ChatComponentText("Tazuna: UWAAaaAaaahh!!!")); ((ICommandSender)getOwner()).addChatMessage((IChatComponent)new ChatComponentText("Your Client died")); ((ICommandSender)getOwner()).addChatMessage((IChatComponent)new ChatComponentText("Mission Failed")); } } protected void fall() {} public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.UNDEFINED; } public EntityAgeable createChild(EntityAgeable p_90011_1_) { return null; } public int getVerticalFaceSpeed() { return isSitting() ? 20 : super.getVerticalFaceSpeed(); } protected boolean isValidLightLevel() { int i = MathHelper.floor_double(this.posX); int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); if (this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, i, j, k) > this.rand.nextInt(32)) return false; int l = this.worldObj.getBlockLightValue(i, j, k); if (this.worldObj.isThundering()) { int i1 = this.worldObj.skylightSubtracted; this.worldObj.skylightSubtracted = 10; l = this.worldObj.getBlockLightValue(i, j, k); this.worldObj.skylightSubtracted = i1; } return (l <= this.rand.nextInt(8)); } public boolean getCanSpawnHere() { return super.getCanSpawnHere(); } protected boolean canDespawn() { return true; } }
[ "mrkrank2023@gmail.com" ]
mrkrank2023@gmail.com
8a896c0ab1326ea4811b986dd4831bd09edc879b
5e3abdad2159bb835768311962b964167ab7de00
/jsf-spring-boot-autoconfigure/src/main/java/org/joinfaces/javaxfaces/package-info.java
12c8da0a90ab3eb5c43111b304e25ed4eebc6b5d
[ "Apache-2.0" ]
permissive
virmerson/joinfaces
4ab638299249d30350e692ee35dc21081efcb239
97eaa79a07ed5ab672c4e2fd6db32d25fb6ce1fb
refs/heads/master
2021-01-15T09:42:15.142413
2016-08-26T22:29:41
2016-08-26T22:29:41
67,267,547
0
1
null
2016-09-03T02:50:15
2016-09-03T02:50:14
null
UTF-8
Java
false
false
792
java
/* * Copyright 2016-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * JavaxFaces Spring Boot Auto Configuration classes. * * @see org.joinfaces.javaxfaces.JavaxFacesSpringBootAutoConfiguration */ package org.joinfaces.javaxfaces;
[ "persapiens@gmail.com" ]
persapiens@gmail.com
4b2408ce2bdf21a63ae1b63c586a1bcc2f74a1ef
d12160a1b4ca3818e9612d7f77b0b9d44e3f8c10
/src/main/java/com/jh/common/util/DateParseUtil.java
c0362234e9d0b6a5b31c3c1ad09d63f04beb5058
[]
no_license
Wjhsmart/SSM
a9a31efa8199d0c26492489dc460c235765ebe8a
0c77e605cc69e78ae871a0b1042e3ee86c99a830
refs/heads/master
2021-01-23T01:18:05.149982
2017-03-28T00:50:00
2017-03-28T00:50:00
85,896,160
1
0
null
null
null
null
UTF-8
Java
false
false
701
java
package com.jh.common.util; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by WangGenshen on 6/2/16. */ public class DateParseUtil { public static final String DEFAULT_PATTERN = DateFormatUtil.DEFAULT_PATTERN; public static Date parseDate(String dateStr) { return parseDate(dateStr, DEFAULT_PATTERN); } public static Date parseDate(String dateStr, String pattern) { DateFormat df = new SimpleDateFormat(pattern); try { return df.parse(dateStr); } catch (ParseException e) { e.printStackTrace(); } return null; } }
[ "672630243@qq.com" ]
672630243@qq.com
9d809feac09e6638972b82ecaf938df955903137
1e65fa0eb0dccd401f659c334a4f637e2f4c6447
/Design Patterns/src/com/factory/SingletonFactory/PC.java
fd53262cf3324b9b154681c42d01028f482d4356
[]
no_license
souravbhttchr/Java_Repository
14642f05b92cb16d1456d98d2d6d0f11e66884fc
0d43237cf3d3694a07563bffdc592f838687a99c
refs/heads/master
2022-12-30T15:35:54.363939
2020-04-21T08:04:42
2020-04-21T08:04:42
113,486,804
0
0
null
2020-10-13T21:21:44
2017-12-07T18:47:50
Java
UTF-8
Java
false
false
806
java
package com.factory.SingletonFactory; public class PC implements Computer { private static Computer instance = null; private int RAM; private int HDD; private String processor; private PC(int RAM, int HDD, String processor) { this.RAM = RAM; this.HDD = HDD; this.processor = processor; } public static Computer getPCInstance(int ram, int hdd, String processor){ try{ if(instance == null){ instance = new PC(ram, hdd, processor); } } catch(Exception e){ System.out.println("Error creating PC Instance..."); } return instance; } @Override public int getRAM() { return this.RAM; } @Override public int getHDD() { return this.HDD; } @Override public String getProcessor() { return this.processor; } }
[ "Bhattacharya@Bhattacharya" ]
Bhattacharya@Bhattacharya
5a026c57dc43eb803bd7c3316adf47009d253ece
1177c8ad52588118dce0b5ea3868796625b81d23
/CookEase/src/edu/berkeley/cs160/DeansOfDesign/cookease/DatabaseHandler.java
128b3b312e821bcd7cb140383bc5c58ea9015a20
[ "Apache-2.0" ]
permissive
DanielCJLee/CookEase
8b7f43f942b7771ef1c0a8253a8f0b035d2a0848
fdcc90acf849c73c86b68b179d292b57221587c9
refs/heads/master
2020-12-11T08:07:18.706127
2014-05-13T04:16:39
2014-05-13T04:16:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,329
java
package edu.berkeley.cs160.DeansOfDesign.cookease; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.text.format.DateFormat; public class DatabaseHandler extends SQLiteOpenHelper{ // All Static variables // Database Version private static final int DATABASE_VERSION = 1; // Database Name private static final String DATABASE_NAME = "AnalyticsDataManager"; // AnalyticsData table name private static final String TABLE_CONTACTS = "AnalyticsData"; // AnalyticsData Table Columns names private static final String KEY_ID = "id"; private static final String KEY_DATE = "date"; private static final String KEY_DURATION = "duration"; private static final String KEY_DATATYPE = "dataType"; public DatabaseHandler(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } // Creating Tables @Override public void onCreate(SQLiteDatabase db) { String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_CONTACTS + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_DATE + " TEXT," + KEY_DURATION + " TEXT," + KEY_DATATYPE + " TEXT"+")"; db.execSQL(CREATE_CONTACTS_TABLE); } // Upgrading database @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // Drop older table if existed db.execSQL("DROP TABLE IF EXISTS " + TABLE_CONTACTS); // Create tables again onCreate(db); } /** * All CRUD(Create, Read, Update, Delete) Operations */ // Adding new data void addAnalyticsData(AnalyticsData contact) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_DATE, contact.getDate()); // AnalyticsData date values.put(KEY_DURATION, contact.getDuration()); // AnalyticsData duration values.put(KEY_DATATYPE, contact.getDataType()); // AnalyticsData data type // Inserting Row db.insert(TABLE_CONTACTS, null, values); db.close(); // Closing database connection } // Getting single contact AnalyticsData getAnalyticsData(int id) { SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.query(TABLE_CONTACTS, new String[] { KEY_ID, KEY_DATE, KEY_DURATION, KEY_DATATYPE }, KEY_ID + "=?", new String[] { String.valueOf(id) }, null, null, null, null); if (cursor != null) cursor.moveToFirst(); AnalyticsData contact = new AnalyticsData(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getString(2), cursor.getString(3)); // return contact return contact; } // Getting All AnalyticsData public List<AnalyticsData> getAllAnalyticsData() { List<AnalyticsData> contactList = new ArrayList<AnalyticsData>(); // Select All Query String selectQuery = "SELECT * FROM " + TABLE_CONTACTS; SQLiteDatabase db = this.getWritableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); // looping through all rows and adding to list if (cursor.moveToFirst()) { do { AnalyticsData contact = new AnalyticsData(); contact.setID(Integer.parseInt(cursor.getString(0))); contact.setDate(cursor.getString(1)); contact.setDuration(cursor.getString(2)); contact.setDataType(cursor.getString(3)); // Adding contact to list contactList.add(contact); } while (cursor.moveToNext()); } // return contact list return contactList; } // Updating single contact public int updateAnalyticsData(AnalyticsData contact) { if (this.getWritableDatabase() == null) { System.out.println("Here's the problem"); } SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_DATE, contact.getDate()); values.put(KEY_DURATION, contact.getDuration()); values.put(KEY_DATATYPE, contact.getDataType()); // updating row return db.update(TABLE_CONTACTS, values, KEY_ID + " = ?", new String[] { String.valueOf(contact.getID()) }); } // Deleting single contact public void deleteAnalyticsData(AnalyticsData contact) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_CONTACTS, KEY_ID + " = ?", new String[] { String.valueOf(contact.getID()) }); db.close(); } // Getting contacts Count public int getAnalyticsDataCount() { String countQuery = "SELECT * FROM " + TABLE_CONTACTS; SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(countQuery, null); cursor.close(); // return count return cursor.getCount(); } }
[ "dannynchang@gmail.com" ]
dannynchang@gmail.com
4e9b2dd73610e2aee01b46cb3f8a9c97c17cc7b0
79608b49db3b91347a140d6856f05ab30e07938b
/src/KBAI/B/BN.java
47598a10a944ee320c76890613b4e33bd964dfdd
[]
no_license
kamalyesh/KompressorTool
5748fc3c326a00ad957b71e045b62ad82a72c229
382be52e2f8c26faccb153c5771525e85a48b83e
refs/heads/master
2020-04-24T14:01:19.565361
2019-05-24T03:34:35
2019-05-24T03:34:35
172,006,656
2
0
null
null
null
null
UTF-8
Java
false
false
36,814
java
/* Author: Kamalyesh Kannadkar Date: Tue Feb 19 17:19:10 IST 2019 package: KBAI.B class: BN */ package KBAI.B; public class BN { public static String getNext(int check){ switch(check) { case 18473: return "g"; case 42822: return "g"; case 49944: return ""; case 41330: return "t"; case 28902: return "g"; case 23121: return ""; case 18510: return "g"; case 42758: return "i"; case 23723: return ""; case 36232: return "g"; case 23969: return "ei"; case 24121: return "g"; case 30127: return "i"; case 49609: return ""; case 28432: return "at"; case 62695: return "i"; case 35592: return "g"; case 28502: return "d"; case 42101: return "g"; case 29160: return "de"; case 36213: return ""; case 41877: return "d"; case 49236: return ""; case 43182: return "d"; case 28760: return "d"; case 55331: return "e"; case 23584: return "g"; case 35729: return "t"; case 56062: return ""; case 49160: return "g"; case 73454: return ""; case 42227: return "e"; case 65251: return ""; case 65535: return ""; case 18793: return "i"; case 35359: return ""; case 35736: return ""; case 29718: return "e"; case 35528: return "g"; case 23195: return ""; case 35403: return ""; case 18584: return "a"; case 23703: return "t"; case 43110: return ""; case 14059: return "e"; case 14096: return "o"; case 41642: return "t"; case 29214: return "g"; case 29202: return ""; case 42425: return "g"; case 23568: return "g"; case 23470: return ""; case 23642: return ""; case 14170: return "i"; case 18687: return "e"; case 42068: return "g"; case 48881: return ""; case 49125: return "t"; case 42422: return ""; case 23847: return "giy"; case 29571: return "eg"; case 29426: return "t"; case 14244: return ""; case 19138: return ""; case 41961: return "s"; case 24175: return "g"; case 18843: return "g"; case 35340: return "g"; case 23335: return "o"; case 18552: return "cio"; case 48520: return "t"; case 35260: return "g"; case 49741: return ""; case 43311: return "e"; case 35602: return "a"; case 41186: return ""; case 18675: return "e"; case 29827: return ""; case 23499: return ""; case 36085: return "e"; case 18880: return "g"; case 36390: return ""; case 23917: return "g"; case 42902: return "g"; case 23958: return "eg"; case 30093: return "eir"; case 42998: return "g"; case 58135: return ""; case 36553: return "g"; case 14355: return "e"; case 57491: return ""; case 35909: return "e"; case 36357: return "g"; case 36124: return "e"; case 30352: return "g"; case 23585: return "o"; case 50503: return "g"; case 9919: return "acdegiklnqstxy"; case 18626: return "a"; case 35086: return "g"; case 23360: return "an"; case 29190: return "a"; case 23704: return "g"; case 35923: return "e"; case 23962: return ""; case 29987: return "g"; case 23827: return "g"; case 23565: return ""; case 36112: return "g"; case 49263: return "e"; case 42503: return "t"; case 23991: return "g"; case 51262: return "g"; case 41531: return ""; case 14429: return "eios"; case 24114: return "g"; case 43220: return ""; case 43383: return "g"; case 29871: return "g"; case 24188: return "eg"; case 36431: return "g"; case 24360: return "g"; case 30084: return "eg"; case 30318: return "c"; case 30506: return "g"; case 24221: return ""; case 58635: return ""; case 50313: return "t"; case 37053: return "g"; case 34540: return "a"; case 40954: return ""; case 41612: return ""; case 50152: return "g"; case 50785: return "e"; case 42187: return "g"; case 35841: return "g"; case 34884: return "a"; case 23770: return "g"; case 36425: return ""; case 36365: return "e"; case 24069: return "e"; case 29576: return "g"; case 29469: return "e"; case 47829: return "e"; case 29069: return "d"; case 18938: return "e"; case 29226: return "eio"; case 42131: return "g"; case 35387: return ""; case 35559: return ""; case 35771: return "g"; case 49424: return "e"; case 19102: return "g"; case 30407: return "e"; case 23795: return "t"; case 42848: return "e"; case 36576: return "d"; case 23967: return "it"; case 43020: return "e"; case 24139: return "g"; case 50645: return ""; case 30355: return "i"; case 14577: return "ay"; case 19348: return "aeiy"; case 35196: return ""; case 42707: return ""; case 49363: return "ct"; case 24082: return "cg"; case 49188: return "g"; case 56639: return "t"; case 36215: return "g"; case 24254: return "lnw"; case 48725: return "g"; case 24426: return "g"; case 24336: return "d"; case 42541: return "g"; case 36579: return "g"; case 36703: return ""; case 24766: return ""; case 29862: return "t"; case 37105: return "y"; case 31063: return "ei"; case 18811: return "i"; case 23848: return "e"; case 36208: return ""; case 29509: return "t"; case 18975: return "e"; case 36467: return "e"; case 41668: return ""; case 42494: return ""; case 29818: return "g"; case 19139: return "eg"; case 24352: return ""; case 42799: return "o"; case 24176: return "g"; case 14614: return "e"; case 19385: return ""; case 36334: return ""; case 50451: return ""; case 36669: return "g"; case 24504: return "e"; case 30639: return "i"; case 37005: return ""; case 44097: return "g"; case 58171: return "g"; case 36287: return ""; case 36294: return "ei"; case 24545: return "ag"; case 57202: return "g"; case 30422: return "e"; case 24803: return ""; case 35758: return ""; case 29546: return "t"; case 43318: return "g"; case 24090: return "g"; case 19176: return "g"; case 23951: return ""; case 24123: return ""; case 42165: return "e"; case 19422: return ""; case 24635: return ""; case 48633: return ""; case 29932: return ""; case 30120: return ""; case 42160: return "t"; case 29833: return ""; case 42968: return ""; case 24410: return "egi"; case 36465: return "g"; case 36653: return "g"; case 24582: return "g"; case 64309: return "g"; case 42734: return "t"; case 30306: return "g"; case 24840: return ""; case 24705: return "g"; case 24656: return "g"; case 29605: return "g"; case 35705: return ""; case 14688: return "s"; case 49389: return ""; case 35660: return "g"; case 48832: return ""; case 29456: return "g"; case 23861: return "e"; case 19250: return "gi"; case 36146: return "ag"; case 29679: return "g"; case 24037: return "e"; case 24193: return ""; case 24365: return "g"; case 14762: return ""; case 42556: return ""; case 36613: return ""; case 24652: return "g"; case 24910: return ""; case 24558: return "e"; case 19361: return "g"; case 19607: return "e"; case 43407: return "g"; case 28858: return "g"; case 23564: return "aeil"; case 35619: return "g"; case 23347: return "g"; case 35361: return ""; case 23777: return "a"; case 49801: return ""; case 36195: return ""; case 23675: return "g"; case 23716: return "eg"; case 14072: return ""; case 29215: return "d"; case 29301: return "g"; case 50135: return "e"; case 36616: return "d"; case 23921: return "g"; case 36158: return "e"; case 18966: return ""; case 36265: return ""; case 30030: return "g"; case 36396: return "e"; case 23831: return ""; case 72970: return ""; case 42945: return "g"; case 24003: return "g"; case 29510: return ""; case 35682: return "t"; case 50602: return "g"; case 49739: return ""; case 35496: return "e"; case 49395: return "e"; case 35435: return "g"; case 49364: return "t"; case 35163: return "g"; case 23241: return "c"; case 23708: return "g"; case 23966: return "ei"; case 36021: return "g"; case 29639: return "g"; case 42426: return "eg"; case 19163: return "a"; case 42298: return "g"; case 41099: return "g"; case 35538: return "g"; case 35342: return "g"; case 43259: return "g"; case 23458: return "g"; case 35155: return "g"; case 18544: return ""; case 35513: return ""; case 49953: return ""; case 42452: return "g"; case 49509: return "t"; case 29696: return "g"; case 30092: return ""; case 35843: return "g"; case 29801: return "m"; case 49763: return "t"; case 30020: return ""; case 23606: return ""; case 58349: return "g"; case 48965: return "g"; case 23860: return "c"; case 49018: return "g"; case 24155: return ""; case 19200: return "g"; case 29742: return "g"; case 28818: return ""; case 23411: return "u"; case 14220: return ""; case 35623: return "g"; case 30178: return "g"; case 30307: return "g"; case 29875: return "g"; case 35287: return ""; case 35499: return "g"; case 36547: return "g"; case 36202: return "g"; case 41892: return "d"; case 37343: return "e"; case 36460: return "g"; case 29513: return "d"; case 24106: return "g"; case 18491: return ""; case 35790: return "g"; case 36420: return "g"; case 35591: return "g"; case 23692: return "g"; case 18819: return "n"; case 23989: return "ei"; case 36044: return "g"; case 35746: return "g"; case 14294: return "a"; case 19065: return "ei"; case 36151: return "g"; case 42553: return "g"; case 49487: return "t"; case 36227: return "g"; case 24266: return "ae"; case 35721: return ""; case 29637: return "g"; case 34888: return "g"; case 18692: return ""; case 18856: return "d"; case 41501: return "d"; case 14331: return ""; case 36746: return "g"; case 14368: return "g"; case 24073: return "d"; case 42529: return "g"; case 14442: return "ao"; case 42324: return "g"; case 29699: return "g"; case 29914: return "g"; case 29265: return "g"; case 57081: return "g"; case 50521: return "g"; case 29096: return ""; case 36218: return "g"; case 35799: return "e"; case 30027: return "g"; case 43343: return "g"; case 35641: return "n"; case 42351: return "a"; case 58180: return ""; case 35891: return "e"; case 50434: return "t"; case 29473: return ""; case 24340: return "a"; case 36818: return "g"; case 30193: return "e"; case 35837: return "d"; case 43702: return "d"; case 30365: return "g"; case 29596: return "c"; case 24066: return "e"; case 30519: return "g"; case 24615: return "g"; case 18713: return "g"; case 23488: return ""; case 35903: return "g"; case 42294: return "t"; case 29678: return ""; case 35997: return "g"; case 19041: return "cgjv"; case 29978: return "g"; case 24383: return "elno"; case 30213: return "e"; case 23898: return "ei"; case 35953: return "g"; case 19287: return "s"; case 30776: return ""; case 10043: return "acdegijnstuz"; case 29339: return "g"; case 23828: return "g"; case 49285: return "eg"; case 57162: return "a"; case 56872: return ""; case 41421: return "ct"; case 55910: return "e"; case 48478: return "t"; case 29335: return "g"; case 50272: return "g"; case 42868: return "ct"; case 42718: return "g"; case 49775: return "t"; case 23947: return "ail"; case 35578: return "ct"; case 30340: return "g"; case 35738: return ""; case 14553: return "e"; case 36188: return "g"; case 42579: return "t"; case 24730: return "e"; case 36573: return "n"; case 43283: return "a"; case 30583: return "a"; case 36949: return "e"; case 23779: return "t"; case 19152: return "c"; case 58027: return "g"; case 36542: return "g"; case 49978: return "g"; case 49912: return "g"; case 57363: return "t"; case 42898: return ""; case 43799: return "g"; case 23853: return "ei"; case 35908: return "g"; case 29921: return "g"; case 35965: return "e"; case 23755: return "d"; case 36836: return "g"; case 43248: return "g"; case 50052: return "g"; case 35840: return "e"; case 24304: return ""; case 14701: return "aeio"; case 42435: return "e"; case 30833: return "g"; case 30184: return "g"; case 36927: return "e"; case 23890: return "t"; case 18935: return "t"; case 30248: return ""; case 35779: return "g"; case 41782: return "g"; case 48839: return "t"; case 35890: return "g"; case 23882: return ""; case 36323: return "t"; case 36864: return "g"; case 24177: return "ei"; case 24435: return "e"; case 49032: return "t"; case 35772: return "g"; case 50227: return "g"; case 42546: return "g"; case 49728: return "g"; case 44233: return "g"; case 14738: return "ou"; case 24378: return "e"; case 37274: return "g"; case 24161: return "g"; case 49767: return "g"; case 49634: return "g"; case 43840: return "g"; case 44098: return "g"; case 50340: return "g"; case 30299: return "t"; case 30487: return "k"; case 58233: return "g"; case 29920: return ""; case 58264: return "g"; case 42728: return "g"; case 43804: return "g"; case 37405: return "g"; case 43796: return "t"; case 43845: return "g"; case 49552: return ""; case 43026: return "g"; case 42920: return "g"; case 23927: return "e"; case 29420: return ""; case 29608: return "g"; case 24214: return "k"; case 42790: return "g"; case 43524: return "g"; case 29635: return "g"; case 29994: return "ei"; case 42899: return "g"; case 19546: return "giy"; case 24888: return ""; case 36852: return "g"; case 43243: return "t"; case 43581: return "g"; case 50638: return "t"; case 51485: return "t"; case 36777: return "g"; case 43168: return "t"; case 30552: return "e"; case 24706: return "g"; case 24964: return "g"; case 30471: return "g"; case 30064: return ""; case 29889: return "g"; case 36090: return "t"; case 35999: return "g"; case 42390: return "t"; case 36179: return "g"; case 56775: return "e"; case 49879: return "g"; case 57330: return "t"; case 19411: return "t"; case 42739: return "g"; case 49796: return "t"; case 19657: return "d"; case 49936: return ""; case 36963: return "g"; case 43354: return "t"; case 19731: return "d"; case 19194: return "t"; case 19768: return "ci"; case 30898: return "g"; case 14165: return "g"; case 14905: return "d"; case 35954: return "a"; case 14196: return "gt"; case 24086: return "g"; case 29695: return "e"; case 42093: return "ci"; case 35618: return "a"; case 29404: return "a"; case 18631: return "t"; case 35926: return "an"; case 42636: return "i"; case 23709: return "g"; case 42098: return "t"; case 24062: return "i"; case 36109: return "g"; case 23410: return ""; case 23582: return "g"; case 18668: return "t"; case 18832: return "g"; case 14344: return "n"; case 19074: return "i"; case 30302: return "g"; case 23738: return ""; case 30089: return "e"; case 24494: return ""; case 24488: return "gt"; case 57860: return ""; case 36377: return ""; case 29501: return "a"; case 18779: return "t"; case 23644: return ""; case 23816: return "g"; case 24074: return "n"; case 29904: return "e"; case 30133: return ""; case 23677: return "d"; case 14418: return "eo"; case 24361: return "i"; case 29634: return "d"; case 29092: return "i"; case 29522: return "ag"; case 18800: return "d"; case 42767: return ""; case 37004: return "e"; case 24001: return "g"; case 42845: return ""; case 49994: return ""; case 29662: return "t"; case 19128: return "eg"; case 37255: return "e"; case 50273: return ""; case 24165: return "g"; case 42733: return "g"; case 49790: return "t"; case 36371: return "g"; case 29672: return "ae"; case 24206: return "g"; case 30083: return ""; case 29597: return ""; case 29785: return ""; case 24464: return ""; case 36942: return "g"; case 24792: return "g"; case 18837: return "ao"; case 35905: return "a"; case 19001: return "s"; case 10167: return "adegiknotu"; case 23952: return "g"; case 35901: return "e"; case 14677: return "aeiy"; case 24362: return "g"; case 30170: return "ao"; case 30753: return "o"; case 37685: return "g"; case 24677: return "ag"; case 23940: return "eiy"; case 19157: return "o"; case 29515: return "e"; case 14714: return "o"; case 58177: return ""; case 42806: return "t"; case 58633: return ""; case 19112: return "n"; case 24282: return "ai"; case 19276: return "n"; case 24446: return "a"; case 19522: return "t"; case 37029: return "e"; case 24760: return "t"; case 29423: return ""; case 29611: return "g"; case 56409: return "g"; case 36014: return ""; case 24100: return "g"; case 29824: return "g"; case 29491: return ""; case 35796: return "g"; case 23879: return "d"; case 24215: return ""; case 24674: return "g"; case 30308: return "g"; case 24713: return "i"; case 35900: return ""; case 36691: return ""; case 36257: return "g"; case 35888: return "t"; case 36708: return "g"; case 43721: return "ei"; case 19633: return ""; case 24629: return "go"; case 25010: return ""; case 19096: return "g"; case 35780: return "t"; case 24602: return "a"; case 29761: return ""; case 19424: return "g"; case 24658: return ""; case 36901: return "g"; case 43475: return "g"; case 30676: return "eu"; case 24830: return "g"; case 30450: return ""; case 30638: return "aio"; case 58282: return "g"; case 84574: return ""; case 59120: return "g"; case 29661: return "ct"; case 19334: return "t"; case 49939: return "g"; case 28776: return "g"; case 55991: return "g"; case 34676: return "d"; case 29016: return "ei"; case 41921: return "g"; case 35288: return ""; case 64343: return "g"; case 29204: return "g"; case 56331: return "g"; case 23609: return "e"; case 29674: return "a"; case 50276: return ""; case 41873: return "g"; case 35201: return "e"; case 18814: return ""; case 50190: return "e"; case 23933: return "g"; case 14289: return "cdkq"; case 35489: return "g"; case 35300: return "g"; case 49632: return ""; case 65730: return "c"; case 49530: return "g"; case 56981: return "t"; case 23759: return "e"; case 42690: return "g"; case 29655: return "g"; case 24060: return "e"; case 24138: return "g"; case 19183: return "e"; case 49757: return "g"; case 30247: return "g"; case 36448: return "t"; case 42827: return "e"; case 23876: return "acotu"; case 66057: return ""; case 43217: return "g"; case 51002: return ""; case 24466: return "g"; case 24724: return "eimr"; case 36779: return "g"; case 43170: return "t"; case 35104: return "g"; case 29657: return "g"; case 29133: return "g"; case 14437: return "cdeknt"; case 35637: return "g"; case 29502: return "g"; case 19167: return "ioy"; case 42512: return "o"; case 24626: return "i"; case 30436: return "g"; case 36277: return "g"; case 29523: return "g"; case 14585: return "dk"; case 56879: return "g"; case 29650: return "g"; case 24055: return "e"; case 29951: return "g"; case 43472: return "g"; case 29880: return "e"; case 41721: return "g"; case 29722: return "cgt"; case 14807: return "cdk"; case 24277: return "e"; case 43532: return "d"; case 29913: return "eg"; case 58342: return "g"; case 43960: return "e"; case 43288: return "e"; case 36890: return "g"; case 30300: return "g"; case 43087: return "e"; case 43856: return "g"; case 24738: return "g"; case 30806: return "g"; case 24689: return ""; case 30934: return ""; case 24861: return "g"; case 19906: return ""; case 37264: return "t"; case 42445: return "g"; case 36168: return ""; case 29811: return ""; case 37103: return ""; case 19390: return "eo"; case 30437: return "t"; case 58153: return "g"; case 37430: return "e"; case 30542: return "g"; case 29852: return "g"; case 24257: return "e"; case 19554: return "g"; case 15029: return "dgt"; case 43023: return "g"; case 30223: return "g"; case 30782: return "g"; case 25187: return "e"; case 30860: return "g"; case 30946: return "g"; case 43916: return "g"; case 29697: return "e"; case 29964: return "c"; case 24313: return "g"; case 30190: return ""; case 29704: return "s"; case 29892: return ""; case 36327: return ""; case 43212: return ""; case 43172: return ""; case 43408: return ""; case 18616: return "c"; case 23612: return "egw"; case 29869: return "k"; case 29633: return "e"; case 24018: return "g"; case 29366: return "d"; case 29388: return "t"; case 23629: return ""; case 19018: return "g"; case 35320: return ""; case 36125: return ""; case 24002: return "g"; case 29726: return "g"; case 51736: return "g"; case 35525: return "i"; case 24281: return "g"; case 59861: return "e"; case 23892: return "e"; case 19109: return "e"; case 42953: return ""; case 36224: return ""; case 24048: return "d"; case 24220: return ""; case 24392: return "g"; case 14789: return ""; case 24429: return "aei"; case 42427: return ""; case 43676: return "g"; case 24720: return "g"; case 24978: return "i"; case 57562: return ""; case 24019: return "a"; case 57656: return ""; case 36245: return "o"; case 10353: return "abcdefghimnstuyz"; case 19060: return "z"; case 57061: return ""; case 24314: return ""; case 57421: return ""; case 29529: return ""; case 35518: return ""; case 29717: return ""; case 36152: return ""; case 36364: return ""; case 37223: return "e"; case 50592: return ""; case 42997: return ""; case 43233: return ""; case 36251: return "ei"; case 50026: return "g"; case 19388: return "eg"; case 14863: return "eiy"; case 49861: return "g"; case 24548: return "e"; case 36699: return "g"; case 29756: return "d"; case 49431: return "g"; case 24462: return "g"; case 29810: return "d"; case 29853: return ""; case 30041: return ""; case 30511: return "g"; case 36805: return "d"; case 36191: return "g"; case 24544: return "g"; case 30225: return ""; case 36511: return "g"; case 14900: return ""; case 30858: return "g"; case 36745: return ""; case 24831: return "g"; case 51670: return "g"; case 25077: return "g"; case 29677: return ""; case 19536: return "g"; case 15011: return "ei"; case 19782: return ""; case 51008: return "g"; case 92985: return "g"; case 36242: return "a"; case 37596: return "g"; case 42842: return ""; case 24610: return "e"; case 30541: return "g"; case 19819: return ""; case 24938: return "g"; case 25237: return ""; case 50042: return ""; case 19282: return "ioy"; case 43588: return "g"; case 42709: return "c"; case 36595: return "g"; case 19569: return "i"; case 36135: return ""; case 43797: return ""; case 25016: return "e"; case 30740: return "g"; case 37282: return "g"; case 25274: return "ey"; case 29771: return "v"; case 36602: return ""; case 37010: return ""; case 24381: return "g"; case 74592: return "t"; case 30793: return ""; case 15122: return "cdt"; case 30144: return "g"; case 29999: return ""; case 30187: return "g"; case 44076: return ""; case 30547: return "i"; case 30633: return ""; case 36835: return ""; case 20016: return "elo"; case 75168: return "i"; case 25311: return "n"; case 31141: return "i"; case 19684: return "e"; case 24217: return "t"; case 30236: return "g"; case 19557: return "i"; case 24553: return ""; case 19721: return "g"; case 19803: return "o"; case 24799: return "eg"; case 24496: return ""; case 24668: return ""; case 15196: return "e"; case 30923: return ""; case 37802: return "g"; case 58930: return "g"; case 19594: return ""; case 43286: return "g"; case 19758: return "g"; case 37700: return ""; case 30728: return "e"; case 23324: return "t"; case 42377: return "e"; case 48588: return "t"; case 48678: return "o"; case 35250: return ""; case 64407: return "a"; case 43024: return "a"; case 84131: return "e"; case 50397: return ""; case 42501: return "e"; case 29885: return ""; case 29382: return "g"; case 29305: return "eis"; case 29681: return "is"; case 19000: return "eilpsy"; case 29765: return "g"; case 35895: return ""; case 35449: return ""; case 35661: return ""; case 14475: return "cdgklnstu"; case 35675: return "eg"; case 29540: return "g"; case 49716: return "g"; case 35906: return "g"; case 43674: return "e"; case 49295: return "t"; case 36035: return "g"; case 51177: return "e"; case 29884: return ""; case 19205: return "y"; case 30390: return "e"; case 50650: return "g"; case 19492: return "i"; case 24316: return "e"; case 49839: return ""; case 50083: return "g"; case 30253: return "g"; case 19574: return "eiy"; case 30339: return "e"; case 24611: return "g"; case 24480: return "efiln"; case 42319: return ""; case 36535: return "g"; case 30310: return "e"; case 35290: return "g"; case 28967: return ""; case 50150: return "n"; case 57960: return "e"; case 43005: return ""; case 57332: return "g"; case 35445: return ""; case 29542: return "g"; case 42114: return "d"; case 42940: return "e"; case 36648: return "o"; case 43328: return ""; case 56054: return "e"; case 58179: return "e"; case 35454: return "g"; case 29319: return "g"; case 30265: return "e"; case 24320: return ""; case 14623: return "nt"; case 19353: return "aei"; case 30118: return "g"; case 24300: return "eios"; case 36355: return "g"; case 24812: return ""; case 58806: return "c"; case 36761: return ""; case 24800: return "eg"; case 23964: return "g"; case 29686: return "g"; case 42597: return ""; case 29563: return "o"; case 35458: return ""; case 42555: return ""; case 29555: return "g"; case 29770: return "g"; case 30181: return ""; case 35542: return ""; case 35410: return "g"; case 23825: return "dt"; case 42030: return "e"; case 42878: return "e"; case 30238: return "e"; case 35899: return "t"; case 50345: return "e"; case 30182: return "g"; case 37500: return "ey"; case 14771: return "degijky"; case 29965: return "g"; case 24456: return "e"; case 36693: return "e"; case 19542: return "y"; case 24747: return "e"; case 37095: return "eg"; case 24358: return "n"; case 30188: return "i"; case 24960: return ""; case 36924: return "e"; case 29337: return "ei"; case 42242: return "g"; case 23930: return "e"; case 72942: return "g"; case 29566: return "g"; case 42353: return "a"; case 80623: return ""; case 29403: return "t"; case 36010: return ""; case 24047: return ""; case 30197: return "g"; case 24555: return "g"; case 24637: return "ae"; case 14993: return "cdtz"; case 58220: return "y"; case 44198: return "g"; case 31004: return "eg"; case 30099: return "g"; case 30400: return "g"; case 30488: return "e"; case 50647: return "e"; case 37484: return "d"; case 31179: return "g"; case 20092: return "beinswy"; case 36658: return ""; case 30857: return "g"; case 25262: return "e"; case 44904: return "e"; case 31072: return "g"; case 19412: return "g"; case 24449: return "e"; case 19740: return ""; case 30720: return "g"; case 30763: return "g"; case 15215: return "eiot"; case 30777: return ""; case 25158: return "i"; case 43156: return ""; case 30657: return "eg"; case 37621: return "e"; case 30985: return ""; case 37539: return "g"; case 75408: return ""; case 51246: return "g"; case 24974: return "e"; case 57787: return ""; case 44088: return "g"; case 25146: return "g"; case 20134: return "iy"; case 30899: return ""; case 37498: return ""; case 14568: return "s"; case 29481: return "e"; case 19376: return "io"; case 23532: return "e"; case 19003: return "t"; case 36899: return "d"; case 24204: return "g"; case 29928: return "g"; case 36548: return ""; case 43714: return ""; case 24147: return "i"; case 23954: return "g"; case 23905: return "e"; case 24077: return "g"; case 36275: return "g"; case 24110: return ""; case 30245: return "eil"; case 19524: return "i"; case 23639: return "e"; case 37761: return "e"; case 29847: return "g"; case 24373: return "g"; case 24537: return "eg"; case 24234: return "t"; case 43781: return "g"; case 36743: return ""; case 57730: return "g"; case 30044: return "c"; case 30455: return "i"; case 43684: return ""; case 24836: return ""; case 30861: return "g"; case 43449: return "g"; case 24574: return ""; case 24779: return "g"; case 30460: return ""; case 52188: return "e"; case 10539: return "cdgiknoty"; case 29835: return "eg"; case 30048: return "g"; case 24447: return "g"; case 30171: return "g"; case 24787: return ""; case 15049: return "iy"; case 29953: return ""; case 24980: return "eg"; case 30704: return "e"; case 25443: return ""; case 24878: return "ct"; case 25222: return "g"; case 24251: return "e"; case 24853: return "e"; case 25111: return "d"; case 19722: return "i"; case 24935: return ""; case 24759: return "g"; case 51530: return "g"; case 24497: return "s"; case 15197: return "aeiost"; case 59622: return "g"; case 24882: return "g"; case 43534: return "g"; case 25046: return "g"; case 37782: return "g"; case 38131: return "e"; case 31155: return "g"; case 30492: return ""; case 25386: return ""; case 25333: return "g"; case 24726: return ""; case 42617: return ""; case 57825: return "g"; case 24673: return "eg"; case 30252: return "t"; case 30279: return "g"; case 57347: return "g"; case 19759: return "e"; case 24796: return "e"; case 25124: return "g"; case 30889: return "g"; case 25370: return "g"; case 19468: return "e"; case 42986: return "g"; case 50228: return "e"; case 24743: return "t"; case 37273: return "eg"; case 43428: return ""; case 43664: return ""; case 31048: return "u"; case 25202: return "g"; case 25460: return "behimswy"; case 37515: return "g"; case 51821: return "g"; case 30943: return "e"; case 31389: return ""; case 31671: return "e"; case 19944: return "e"; case 19981: return "g"; case 25670: return "g"; case 19685: return "e"; case 19296: return "d"; case 10663: return "a"; case 25248: return "e"; case 24945: return "d"; case 19814: return "t"; case 43264: return ""; case 37321: return "e"; default: return ""; } } }
[ "kkamalyesh@gmail.com" ]
kkamalyesh@gmail.com
e0059fa9f2e7df635734231a4b939927a1bd718b
5b2c309c903625b14991568c442eb3a889762c71
/classes/com/e/a/a/a/c.java
1efd292d4ea70f6e026a9d7801e37c678b4326dd
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.e.a.a.a; import java.io.OutputStream; public abstract interface c extends d { public abstract void a(OutputStream paramOutputStream); public abstract String c(); } /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\e\a\a\a\c.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
dfc931458b2af7ccdc22c216dc5db0ddfee580c7
0f58b58d6d36949915141ff7ee9e6793b3285367
/vt.qlkdtt-yte-ws/src/main/java/vt/qlkdtt/yte/service/sdi/PartnerShareInsertProductOfferSdi.java
351eb86f6f56dcd1ee68a322bf33e101fa755f63
[]
no_license
Doxuancanh3103/qlyte
bd93dec2e3deee05f493d9059c338dfb29772b55
6330acaf4856ddeaa204f6e7cfad653365af73ff
refs/heads/master
2023-01-14T12:18:08.944935
2020-11-17T08:08:25
2020-11-17T08:08:25
313,547,146
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package vt.qlkdtt.yte.service.sdi; import lombok.Data; import vt.qlkdtt.yte.common.Const; import vt.qlkdtt.yte.domain.DocumentMapping; import vt.qlkdtt.yte.domain.PartnerRevenueShared; import java.util.Date; @Data public class PartnerShareInsertProductOfferSdi { Long partnerId; Long partnerPercent; Long documentId; String shareType; String description; public PartnerRevenueShared toPrs(long productOfferId){ PartnerRevenueShared prs = new PartnerRevenueShared(); prs.setPartnerId(this.getPartnerId()); prs.setPartnerPercent(this.getPartnerPercent()); prs.setViettelPercent(100 - this.getPartnerPercent()); prs.setProductOfferId(productOfferId); prs.setStatus(Const.STATUS.ACTIVE); prs.setShareType(this.getShareType()); prs.setCreateUser("ADMIN"); prs.setCreateDatetime(new Date()); return prs; } public DocumentMapping toDocumentMapping(long partnerRevenueSharedId) { DocumentMapping dm = new DocumentMapping(); dm.setDocumentId(this.getDocumentId()); dm.setObjectType(Const.DOC_OBJ_MAP_TYPE.PARTNER_REVENUE_SHARE); dm.setMappingObjectId(partnerRevenueSharedId); dm.setStatus(Const.STATUS.ACTIVE); dm.setCreateUser("ADMIN"); dm.setCreateDatetime(new Date()); return dm; } }
[ "dxcanh310320@gmail.com" ]
dxcanh310320@gmail.com
c43d8da34eaaace2954d1bd7f85b6ff780ef95fd
89398bb1e061c9c51455ca63d451b2b58c519e7d
/target/generated-sources/jaxb/iso/std/iso/_20022/tech/xsd/camt_029_001/Case2.java
c593e35c4eadebbd570ca3ae291f9300607121c5
[]
no_license
toretest/xmlFileOutput
5ab88a609195c48a7da6ab9dfd469b3c6995921f
e79120830b0b87c95bcd7b1fea9c3959edafbc53
refs/heads/master
2021-06-02T06:46:26.481029
2016-09-20T22:38:10
2016-09-20T22:38:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,498
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.09.21 at 12:19:19 AM CEST // package iso.std.iso._20022.tech.xsd.camt_029_001; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for Case2 complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Case2"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Id" type="{urn:iso:std:iso:20022:tech:xsd:camt.029.001.03}Max35Text"/> * &lt;element name="Cretr" type="{urn:iso:std:iso:20022:tech:xsd:camt.029.001.03}Party7Choice"/> * &lt;element name="ReopCaseIndctn" type="{urn:iso:std:iso:20022:tech:xsd:camt.029.001.03}YesNoIndicator" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Case2", namespace = "urn:iso:std:iso:20022:tech:xsd:camt.029.001.03", propOrder = { "id", "cretr", "reopCaseIndctn" }) public class Case2 implements Serializable { private final static long serialVersionUID = -1L; @XmlElement(name = "Id", namespace = "urn:iso:std:iso:20022:tech:xsd:camt.029.001.03", required = true) protected String id; @XmlElement(name = "Cretr", namespace = "urn:iso:std:iso:20022:tech:xsd:camt.029.001.03", required = true) protected Party7Choice cretr; @XmlElement(name = "ReopCaseIndctn", namespace = "urn:iso:std:iso:20022:tech:xsd:camt.029.001.03") protected Boolean reopCaseIndctn; /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the cretr property. * * @return * possible object is * {@link Party7Choice } * */ public Party7Choice getCretr() { return cretr; } /** * Sets the value of the cretr property. * * @param value * allowed object is * {@link Party7Choice } * */ public void setCretr(Party7Choice value) { this.cretr = value; } /** * Gets the value of the reopCaseIndctn property. * * @return * possible object is * {@link Boolean } * */ public Boolean isReopCaseIndctn() { return reopCaseIndctn; } /** * Sets the value of the reopCaseIndctn property. * * @param value * allowed object is * {@link Boolean } * */ public void setReopCaseIndctn(Boolean value) { this.reopCaseIndctn = value; } }
[ "drgerot@gmail.com" ]
drgerot@gmail.com
e754169e1d4d9e553ca5672a781693918b3dff4c
1fc6c53fe7f18b4d73dadea98b37ba2afb6d6dad
/src/test/java/org/glytching/sandbox/simulator/SimulatorBuilder.java
242e70e4ce346650cf0ff7bfa37650210d7fc4a6
[ "Apache-2.0" ]
permissive
glytching/sandbox
4a2f748653c560d104adc046ac78a251525cc981
ff44331eeb37da07b75ad664af1f6a7b69b6456d
refs/heads/master
2022-11-24T10:18:39.040864
2022-10-06T09:22:21
2022-10-06T09:22:21
109,672,531
1
1
Apache-2.0
2022-11-16T03:16:58
2017-11-06T09:14:40
Java
UTF-8
Java
false
false
859
java
package org.glytching.sandbox.simulator; public class SimulatorBuilder { private SimulatorDelay simulatorDelay; private SimulatedEventFactory simulatedEventFactory; public SimulatorBuilder withDelay(SimulatorDelay simulatorDelay) { this.simulatorDelay = simulatorDelay; return this; } public SimulatorBuilder withEventCreator(SimulatedEventFactory simulatedEventFactory) { this.simulatedEventFactory = simulatedEventFactory; return this; } public JsonSimulator buildJsonSimulator() { if (simulatorDelay == null) { simulatorDelay = new NoOpSimulatorDelay(); } if (simulatedEventFactory == null) { simulatedEventFactory = new RandomSimulatedEventFactory(); } return new JsonSimulator(simulatorDelay, simulatedEventFactory); } }
[ "colm.mcdonnell@gmail.com" ]
colm.mcdonnell@gmail.com