blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
af3e0e55d6d3518065cb45e4e68b79728b362699 | b77a8d8a7ed469e90ab514eb3b6b4e912c1e6df3 | /commons/authorization/tags/1.0.1/src/main/java/com/unitt/commons/authorization/hazelcast/PermissionMapHandler.java | 89f80d65e9639f43c1a8b1beb88739d4add0850b | [] | no_license | wowmendezz/unitt | 3958e89180a264b335edfb5a38f9b2dce3b7a621 | 704331c585309e8e64c27df4c53852871582d937 | refs/heads/master | 2021-01-25T07:08:44.239107 | 2012-12-11T03:41:18 | 2012-12-11T03:41:18 | 34,671,982 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,117 | java | /*
* Copyright 2009 UnitT Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.unitt.commons.authorization.hazelcast;
import java.util.Collection;
import java.util.Map;
import com.hazelcast.core.MapLoader;
import com.hazelcast.core.MapStore;
import com.unitt.commons.authorization.PermissionKey;
public class PermissionMapHandler implements MapLoader<PermissionKey, Long>, MapStore<PermissionKey, Long>
{
protected PermissionDao dao;
// getters & setters
// ---------------------------------------------------------------------------
public PermissionDao getDao()
{
return dao;
}
public void setDao( PermissionDao aDao )
{
dao = aDao;
}
// loader implementation
// ---------------------------------------------------------------------------
public Long load( PermissionKey aPermissionKey )
{
return getDao().load( aPermissionKey );
}
public Map<PermissionKey, Long> loadAll( Collection<PermissionKey> aPermissionKeys )
{
return getDao().loadAll( aPermissionKeys );
}
public void delete( PermissionKey aPermissionKey )
{
getDao().delete( aPermissionKey );
}
public void deleteAll( Collection<PermissionKey> aPermissionKeys )
{
getDao().deleteAll( aPermissionKeys );
}
public void store( PermissionKey aPermissionKey, Long aPermission )
{
getDao().store( aPermissionKey, aPermission );
}
public void storeAll( Map<PermissionKey, Long> aPermissions )
{
getDao().storeAll( aPermissions );
}
}
| [
"joshuadmorris@02f9dee6-7804-11de-adf2-cbd3851e0ccf"
] | joshuadmorris@02f9dee6-7804-11de-adf2-cbd3851e0ccf |
0e28c0d2a5bacf9fc220e2360dac417c4ff27731 | 316454a8086b6725f8859afc04a436b3b0dfd3be | /src/main/java/com/rabbit/samples/hateoas/services/BookService.java | eddce308e34a202b05499728f106c6eb526e5019 | [
"Apache-2.0"
] | permissive | damonslee/spring-hateoas | 93394c65590c8a8f54892bc282f408f33d40b89e | 290466a8b7863a7e7662396d5ea2d7bab819f4f9 | refs/heads/master | 2021-09-29T13:18:54.919763 | 2018-11-24T10:52:45 | 2018-11-24T10:52:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 300 | java | package com.rabbit.samples.hateoas.services;
import com.rabbit.samples.hateoas.persistence.data.Book;
import java.util.List;
/**
* @author Matteo Baiguini
* matteo@solidarchitectures.com
* 30 Sep 2018
*/
public interface BookService {
List<Book> getAll();
Book getById(final Long id);
}
| [
"baiguini.matteo@gmail.com"
] | baiguini.matteo@gmail.com |
56a04aba996847ed4072b953a367a138506e4d95 | 26a4fb58cc3cc70367d2523fa78530073faa03dd | /src/src/com/company/VideoCap.java | 60ba0d75c47a5c308cef6d0150d20b42323cd394 | [] | no_license | yairrim/PCdataOpenCV | f1fc2d49e514faf667db53f48904c674f3a59459 | 8fe81c6648e090cfdee86582f614650e23ce84ba | refs/heads/master | 2022-09-26T22:09:12.035503 | 2020-06-06T10:01:47 | 2020-06-06T10:01:47 | 269,939,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 529 | java | package src.com.company;
import java.awt.image.BufferedImage;
import org.opencv.core.Core;
import org.opencv.videoio.VideoCapture;
public class VideoCap {
static{
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
VideoCapture cap;
Mat2Image mat2Img = new Mat2Image();
public VideoCap(){
cap = new VideoCapture();
cap.open(0);
}
public BufferedImage getOneFrame() {
cap.read(mat2Img.mat);
return mat2Img.getImage(mat2Img.mat);
}
} | [
"noreply@github.com"
] | noreply@github.com |
f1e38789edc956a8d37fb7165d0f718d1c1b6a7a | 8cdf3e4eeb2c06005b47cda92e1a28ce22f67b06 | /src/main/java/me/qyh/blog/web/security/DefaultCsrfToken.java | 728e7f9c489ff7d73ded0ab63bb77c66be5a2c18 | [
"Apache-2.0"
] | permissive | zhunengfei/mblog | 567607ad2d0093a0dce1555060bceca17163a312 | b6b75acac75db6e52d5a48a8d6ac3862537b5417 | refs/heads/master | 2021-01-19T23:24:29.815384 | 2017-04-21T05:12:08 | 2017-04-21T05:12:08 | 88,971,808 | 1 | 1 | null | 2017-04-21T10:17:26 | 2017-04-21T10:17:26 | null | UTF-8 | Java | false | false | 2,807 | java | /*
* Copyright 2016 qyh.me
*
* 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.
*/
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.qyh.blog.web.security;
import org.springframework.util.Assert;
/**
* A CSRF token that is used to protect against CSRF attacks.
*
* @author Rob Winch
* @since 3.2
*/
@SuppressWarnings("serial")
public final class DefaultCsrfToken implements CsrfToken {
private final String token;
private final String parameterName;
private final String headerName;
/**
* Creates a new instance
* @param headerName the HTTP header name to use
* @param parameterName the HTTP parameter name to use
* @param token the value of the token (i.e. expected value of the HTTP parameter of parametername).
*/
public DefaultCsrfToken(String headerName, String parameterName, String token) {
Assert.hasLength(headerName, "headerName cannot be null or empty");
Assert.hasLength(parameterName, "parameterName cannot be null or empty");
Assert.hasLength(token, "token cannot be null or empty");
this.headerName = headerName;
this.parameterName = parameterName;
this.token = token;
}
/* (non-Javadoc)
* @see org.springframework.security.web.csrf.CsrfToken#getHeaderName()
*/
public String getHeaderName() {
return headerName;
}
/* (non-Javadoc)
* @see org.springframework.security.web.csrf.CsrfToken#getParameterName()
*/
public String getParameterName() {
return parameterName;
}
/* (non-Javadoc)
* @see org.springframework.security.web.csrf.CsrfToken#getToken()
*/
public String getToken() {
return token;
}
}
| [
"admin@qyh.me"
] | admin@qyh.me |
1b178cd737312360a3842199765df7010382a332 | 04e103f8f2b7430aaaa7c9e94459bd26c089fdc3 | /src/main/java/com/asuscomm/yangyinetwork/websocket/channel/domain/Channel.java | d408369fe7e804239b534de7485b5a7a3cd30709 | [] | no_license | Koreauniv-step05/Gomoku_spring_socket_server | 04fa8afb299dcd194d0b67a7ad45e731967bb700 | 4dc7c2156b049e48c0bde3c76e1a8b4aa6c5fbfb | refs/heads/master | 2021-01-20T10:05:26.154253 | 2017-05-12T09:14:09 | 2017-05-12T09:14:09 | 90,319,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,327 | java | package com.asuscomm.yangyinetwork.websocket.channel.domain;
import java.util.ArrayList;
import java.util.List;
import static com.asuscomm.yangyinetwork.config.GAME_BOARD.BLACK_STONE;
import static com.asuscomm.yangyinetwork.config.GAME_BOARD.NONE_STONE;
import static com.asuscomm.yangyinetwork.config.GAME_BOARD.WHITE_STONE;
import static com.asuscomm.yangyinetwork.websocket.channel.domain.Channel.Status.NEEDS_MORE_USER;
import static com.asuscomm.yangyinetwork.websocket.channel.domain.Channel.Status.NEEDS_ONLY_OBSERVER;
/**
* Created by jaeyoung on 2017. 5. 7..
*/
public class Channel {
List<User> userList;
User lastUser;
String id;
public interface Status {
String NEEDS_MORE_USER = "NEEDS_MORE_USER";
String NEEDS_ONLY_OBSERVER = "NEEDS_ONLY_OBSERVER";
String ALREADY_STARTED = "ALREADY_STARTED";
}
public Channel() {
}
public Channel(String id) {
this.userList = new ArrayList<User>();
this.id = id;
}
public Channel(List<User> userList, String id) {
this.userList = userList;
this.id = id;
}
public List<User> getUserList() {
return userList;
}
public void setUserList(List<User> userList) {
this.userList = userList;
}
public void addUser(User user) {
this.userList.add(user);
this.lastUser = user;
}
public void addUser() {
this.addUser(new User(newStoneType()));
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String status() {
if(userList.size() >= 2) {
return NEEDS_ONLY_OBSERVER;
} else {
return NEEDS_MORE_USER;
}
}
public int newStoneType() {
int target = BLACK_STONE;
for (User user:
userList) {
if(user.getStoneType() == target) {
target = nextTarget(target);
}
}
return target;
}
private int nextTarget(int target) {
if ( target == BLACK_STONE ) {
return WHITE_STONE;
}
return NONE_STONE;
}
public User getLastUser() {
return lastUser;
}
public void setLastUser(User lastUser) {
this.lastUser = lastUser;
}
}
| [
"pjo901018@korea.ac.kr"
] | pjo901018@korea.ac.kr |
ce2e5e9827401c60ad8148c86523e19e9db5d787 | 0745bf5907ec382964d1af02aef032f323be8e5f | /app/src/main/java/com/example/lifeline/Doc_InfoActivity.java | 287fe72d70efa7846ef05d2f4fe04551a40a290e | [] | no_license | mdg-soc-19/lifeline | db0e8c4daf31c6050cf01ab29db45f193183e80a | 4c2f658b741d6210affde02178baa02186600433 | refs/heads/master | 2020-09-22T10:14:13.694802 | 2020-01-21T03:58:32 | 2020-01-21T03:58:32 | 225,152,075 | 1 | 1 | null | 2020-01-21T03:58:34 | 2019-12-01T11:44:25 | null | UTF-8 | Java | false | false | 9,886 | java | package com.example.lifeline;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Button;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.squareup.picasso.Picasso;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
public class Doc_InfoActivity extends AppCompatActivity {
ImageView Image;
TextView name, graduate, dpt, doc_info;
String Doctorname, Doctorgraduate, Doctordpt, Docimage, Docinfo;
Button button;
private DatabaseReference mDatabase;
private DatabaseReference fDatabase;
private DatabaseReference tDatabase;
private DatabaseReference pDatabase;
SharedPreferenceConfig preferenceConfig;
FirebaseAuth dAuth;
FirebaseUser Current_User;
int tok;
int TOKEN;
int Status_token;
String User_Doctor;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.doc_info);
doc_info = findViewById(R.id.doc_info);
Image = findViewById(R.id.image);
name = findViewById(R.id.name);
graduate = findViewById(R.id.graduate);
dpt = findViewById(R.id.dpt);
Doctorname = getIntent().getStringExtra("name");
Doctorgraduate = getIntent().getStringExtra("graduate");
Doctordpt = getIntent().getStringExtra("dpt");
Docinfo = getIntent().getStringExtra("doc_info");
Docimage = getIntent().getStringExtra("image");
name.setText(Doctorname);
Log.e("jhfklsdajflk;", "dsfnhkdjsh" + Doctorname);
graduate.setText(Doctorgraduate);
dpt.setText(Doctordpt);
Picasso.get().load(Docimage).into(Image);
dAuth = FirebaseAuth.getInstance();
Current_User = dAuth.getCurrentUser();
final String current_name = Current_User.getEmail();
final ProgressDialog dialog = new ProgressDialog(this);
mDatabase = FirebaseDatabase.getInstance().getReference().child("Doctors_List");
mDatabase.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot dataSnapshot2 : dataSnapshot.getChildren()) {
String value = dataSnapshot2.child("doc_info").getValue().toString();
doc_info.setText(value);
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
// tDatabase = FirebaseDatabase.getInstance().getReference().child("Users").child(Current_User.getUid());
// tDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
// @Override
// public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
// User_Doctor = dataSnapshot.getValue(User.class).getMy_doctor();
// Log.e("asd","asd"+User_Doctor);
// TOKEN = dataSnapshot.getValue(User.class).getMy_token();
// Log.e("123","asdfg"+TOKEN);
// int random =0;
// if(TOKEN < Status_token){
// tDatabase.child("my_token").setValue(random);
// }
// }
// @Override
// public void onCancelled(@NonNull DatabaseError databaseError) {
//
// }
// });
// pDatabase = FirebaseDatabase.getInstance().getReference().child("Doctors_Status");
// pDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
// @Override
// public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
// for (DataSnapshot dataSnapshot1:dataSnapshot.getChildren()){
// if(User_Doctor.equals(dataSnapshot1.getValue(Token.class).getDoctor_name())){
// Status_token= (dataSnapshot1.getValue(Token.class).getToken_No());
// Log.e("145","asdfg"+Status_token);
//
// }
// }
// }
//
// @Override
// public void onCancelled(@NonNull DatabaseError databaseError) {
//
// }
// });
tDatabase = FirebaseDatabase.getInstance().getReference().child("Users").child(Current_User.getUid());
tDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
User_Doctor = dataSnapshot.getValue(User.class).getMy_doctor();
TOKEN = dataSnapshot.getValue(User.class).getMy_token();
Log.e("123","asdfg"+TOKEN);
// int random = 0;
// if(9<12){
// Log.e("149","asdfg"+"false");
// tDatabase.child("my_token").setValue(random);
// }
// else {
// Log.e("789","asdfg"+"true");
// }
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
button = findViewById(R.id.bookbtn);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.setMessage("Booking Appointment, Please wait.");
dialog.show();
if(TOKEN == 0) {
{
mDatabase = FirebaseDatabase.getInstance().getReference().child("Doctors_List");
mDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
Log.i("Function", "Called");
for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {
if (Doctorname.equals(dataSnapshot1.getValue(Doctor.class).getDoc_name())) {
Log.e("doc_name", "ahkfjhkj" + dataSnapshot1.getValue(Doctor.class).getDoc_name());
Log.e("doc_token", "ahkfjhkj" + dataSnapshot1.getValue(Doctor.class).getDoc_token());
String current_name = dataSnapshot1.getValue(Doctor.class).getDoc_name();
tok = dataSnapshot1.getValue(Doctor.class).getDoc_token() + 1;
String key = dataSnapshot1.getKey();
mDatabase.child(key).child("doc_token").setValue(tok);
}
} //loop ends
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
{
fDatabase = FirebaseDatabase.getInstance().getReference().child("Users").child(Current_User.getUid());
fDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
Log.e("name", "name" + dataSnapshot.getValue(User.class).getName());
Log.e("current", "current" + current_name);
String data = dataSnapshot.getKey();
fDatabase.child("my_doctor").setValue(Doctorname);
fDatabase.child("my_token").setValue(tok).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
startActivity(new Intent(getApplicationContext(), tokenStatusFragment.class));
dialog.dismiss();
}
}
});
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
}
else {
Toast.makeText(Doc_InfoActivity.this, "You can't Book twice", Toast.LENGTH_SHORT).show();
dialog.dismiss();
}
}
});
// else{
// Toast.makeText(this, "You can't Book twice!!", Toast.LENGTH_SHORT).show();
// }
}
}
| [
"niteshmaahwer1@gmail.com"
] | niteshmaahwer1@gmail.com |
0eefb293fd568f9ce2a41ca3148f3524ec282eb4 | 988ffdb7bb71fb73a0e8842c5ec43e2633dcb8e9 | /02.java | f2cfa576a8902bbdd0c356d7e625806c5b56da33 | [] | no_license | Chetanpaliwal22/May-Leet-Code-Challenge | d4b165824ed46ee70ea51480bb013c3b0945f1f5 | 051110d8fb836dd3d944b6d86f2ea0257004ddc3 | refs/heads/master | 2022-11-06T18:25:26.579377 | 2020-06-12T21:15:54 | 2020-06-12T21:15:54 | 260,607,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | /*Input: J = "aA", S = "aAAbbbb"
Output: 3
Input: J = "z", S = "ZZ"
Output: 0*/
class Solution {
public int numJewelsInStones(String J, String S) {
if(J.length() ==0 || S.length() == 0){
return 0;
}
int count =0;
for(int i=0;i<J.length();i++){
char ithChar = J.charAt(i);
for(int j=0;j<S.length();j++){
if(ithChar == S.charAt(j)){
count++;
}
}
}
return count;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
bd84d9f36bb2c6946625fe5e4cda149bb8209be3 | cf74fa9194bc1daf7a60b68107161edce24f3819 | /src/main/java/com/example/healthclock/config/RedisConfig.java | b9a9360c1b10ce0857ef1e73769f55acdfa3ed18 | [] | no_license | Yweidong/healthclock | 5af2e8437f9bd3d3cd7a577cfbc2f4bc609f61fd | 80b9cac29a9918abaa49e3accf392da72771f0ec | refs/heads/master | 2023-01-23T17:47:29.777015 | 2020-11-18T05:48:55 | 2020-11-18T05:48:55 | 304,273,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,105 | java | package com.example.healthclock.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* @program: healthclock
* @description: redis配置
* @author: ywd
* @contact:1371690483@qq.com
* @create: 2020-10-15 11:38
**/
@Configuration
public class RedisConfig {
/**
* redisTemplate 序列化使用的jdkSerializeable, 存储二进制字节码, 所以自定义序列化类
* @param redisConnectionFactory redis连接工厂类
* @return RedisTemplate
*/
@Bean
public RedisTemplate<Object, Object> redisTemplate(LettuceConnectionFactory redisConnectionFactory) {
RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory);
// 使用Jackson2JsonRedisSerialize 替换默认序列化
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
// 设置value的序列化规则和 key的序列化规则
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
}
| [
"1371690483@qq.com"
] | 1371690483@qq.com |
82155a4b63b3d2044391d4d9ac911338f3a90f0c | aa2847d4607bee66aa2a8c8ebe070821698dc456 | /src/main/java/com/blak/controllers/RestResourceCategoryController.java | c627c176180fb371591c4025436fc0d6bcba6d86 | [] | no_license | jaroslawblak/final_poject | 3a9069f649c26d9cbd62eb9c3011c09752e110ac | 3883acc08b30aa7e3c7480d448c32af3c9c81c6c | refs/heads/master | 2020-04-02T19:27:55.048835 | 2019-01-28T01:00:39 | 2019-01-28T01:00:39 | 154,734,771 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | package com.blak.controllers;
import com.blak.service.ResourceCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.nio.file.Path;
import java.nio.file.Paths;
@RestController
@CrossOrigin
public class RestResourceCategoryController {
@Autowired
private ResourceCategoryService resourceCategoryService;
@GetMapping("/rescat/csv")
public void getCSVResCat() throws Exception {
Path p1 = Paths.get("/tmp/foo");
resourceCategoryService.getCSVResCat(p1);
}
}
| [
"jaroslaw.blak@gmail.com"
] | jaroslaw.blak@gmail.com |
340866bc1088351201d6ea1b522adeda93976f44 | 198b020a82e4c75365c6aec9aa4a4cac53e5aaa8 | /DriverService3.0/src/com/cy/driver/pactDriver/service/impl/PactDriverInfoServiceImpl.java | 57d301159f66285f53021a062e0337bca527fc59 | [] | no_license | kenjs/Java | 8cc2a6c4a13bddc12f15d62350f3181acccc48ec | 8cb9c7c93bc0cfa57d77cf3805044e5fe18778f2 | refs/heads/master | 2020-12-14T09:46:07.493930 | 2015-08-19T08:11:59 | 2015-08-19T08:11:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,037 | java | package com.cy.driver.pactDriver.service.impl;
import java.util.List;
import java.util.Map;
import com.cy.common.bo.PactDriverInfo;
import com.cy.driver.pactDriver.dao.PactDriverInfoDao;
import com.cy.driver.pactDriver.domain.PactDriverInfoDomain;
import com.cy.driver.pactDriver.service.PactDriverInfoService;
/**
* @description 会员操作service实现类
* @author haoy
*
*/
public class PactDriverInfoServiceImpl implements PactDriverInfoService{
private PactDriverInfoDao pactDriverInfoDao;
public void setPactDriverInfoDao(PactDriverInfoDao pactDriverInfoDao) {
this.pactDriverInfoDao = pactDriverInfoDao;
}
public PactDriverInfoServiceImpl() {
}
@Override
public List<PactDriverInfoDomain> selectPactDriverInfoList(
Map<String, String> map) throws Exception {
return pactDriverInfoDao.selectPactDriverInfoList(map);
}
@Override
public int updatePactDriverInfo(PactDriverInfo info) throws Exception {
return pactDriverInfoDao.updatePactDriverInfo(info);
}
}
| [
"haoyongvv@163.com"
] | haoyongvv@163.com |
bdddc625b9edd29bc40286374ed6d4a48c40d418 | 0ad50b07bb6c4bff09f7886c08e5d406a19a7e08 | /src/main/java/com/wd/front/bo/DocTypeInfo.java | f40f05a07a6eb366e7c745fdd3523e35b1ebe6d1 | [] | no_license | javaContent/spischolar | bef6066f1fddcc0887483d7379b4217f15a583bc | d7da97b6c004e14914a1eca8af497948816c10c9 | refs/heads/master | 2020-03-29T21:57:09.153551 | 2018-09-26T08:09:28 | 2018-09-26T08:09:28 | 150,396,031 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 494 | java | package com.wd.front.bo;
public class DocTypeInfo {
private int flag;
private String fieldName;
private String text;
public DocTypeInfo() {
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
}
| [
"yangshuaifei@hnwdkj.com"
] | yangshuaifei@hnwdkj.com |
64958f7eb00c90f6e99afcb2737cb900dd1bbe13 | a7c2008953c85f019c0558e6b4172d71217ba61d | /src/test/java/com/github/jonahwh/tesla_api_client/AuthenticationApiTest.java | 6c8d834a21aeb2fe555d51ef92c816aa35267b29 | [] | no_license | jonahwh/tesla-api-client | c71a462c2279de6ea2ed71306cb7eaa012a9b59a | fda97859f80583195a002916433f16891a2841e6 | refs/heads/master | 2023-02-22T01:43:26.428921 | 2023-02-21T01:46:26 | 2023-02-21T01:46:26 | 125,715,557 | 17 | 12 | null | 2023-02-21T01:25:31 | 2018-03-18T10:55:23 | Java | UTF-8 | Java | false | false | 1,386 | java | package com.github.jonahwh.tesla_api_client;
import com.github.jonahwh.ApiClient;
import com.github.jonahwh.tesla_api_client.model.CreateAccessTokenRequest;
import com.github.jonahwh.tesla_api_client.model.CreateAccessTokenResponse;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for AuthenticationApi
*/
public class AuthenticationApiTest {
private AuthenticationApi api;
@Before
public void setup() {
api = new ApiClient().createService(AuthenticationApi.class);
}
/**
* Get an Access Token
*
* Performs the login. Takes in an plain text email and password, matching the owner's login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login). Returns a `access_token` which is passed along as a header with all future requests to authenticate the user. You must provide the `Authorization: Bearer {access_token}` header in all other requests. The current client ID and secret are [available here](http://pastebin.com/YiLPDggh)
*/
@Test
public void createOauthTokenTest() {
CreateAccessTokenRequest body = null;
// CreateAccessTokenResponse response = api.createOauthToken(body);
// TODO: test validations
}
}
| [
"jonahwh@gmail.com"
] | jonahwh@gmail.com |
eef25eea2d7f9ca8fdb568caecaf71ffbab9c067 | a2b181e45252691cc907da7f6c5488cc95bae183 | /src/main/java/com/wladek/realestate/domain/User.java | 9d0759296d76128b4b246c0cbf80cf0287bd5390 | [] | no_license | wladekAiro/ChaturGroup | 13958e5466e86253a2c93aacec2c0122d31a0537 | 315d149120d5a2059abbeed419fc8f9890fbfa27 | refs/heads/master | 2021-01-01T04:00:56.588769 | 2016-05-19T09:18:54 | 2016-05-19T09:18:54 | 56,929,207 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,911 | java | /**
* Yobi, Project Hosting SW
*
* Copyright 2012 NAVER Corp.
* http://yobi.io
*
* @Author Ahn Hyeok Jun
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.wladek.realestate.domain;
import com.wladek.realestate.domain.enumeration.UserRole;
import com.wladek.realestate.domain.enumeration.UserState;
import com.wladek.realestate.domain.realestate.Enquiry;
import com.wladek.realestate.domain.realestate.FeedBack;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import javax.persistence.*;
import javax.validation.constraints.Pattern;
import java.util.List;
import java.util.Set;
@Entity
@Table(name="users")
public class User extends AbstractModel{
public static final String LOGIN_ID_PATTERN = "^[a-zA-Z0-9-]+([_.][a-zA-Z0-9-]+)*$";
@NotEmpty(message = "Provide name")
private String name;
@Column(unique = true, nullable = false)
@NotEmpty(message = "Provide a user name")
@Pattern(regexp = LOGIN_ID_PATTERN, message = "Provide a valid username")
private String loginId;
@Column(nullable = false)
private String password;
@Column(unique = true)
@Email(message = "Provide a valid email")
@NotEmpty(message = "Provide an email address")
private String email;
private String lang;
private String url;
@Enumerated(EnumType.STRING)
private UserRole userRole;
@Enumerated(EnumType.STRING)
private UserState userState;
@OneToMany(mappedBy = "enquirer", fetch = FetchType.LAZY)
private List<Enquiry> enquiries;
@OneToMany(mappedBy = "sender", fetch = FetchType.LAZY)
private List<FeedBack> feedBacks;
@ManyToMany(mappedBy = "users",fetch = FetchType.EAGER)
private Set<Role> roles;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLoginId() {
return loginId;
}
public void setLoginId(String loginId) {
this.loginId = loginId;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public UserState getUserState() {
return userState;
}
public UserRole getUserRole() {
return userRole;
}
public void setUserRole(UserRole userRole) {
this.userRole = userRole;
}
public void setUserState(UserState userState) {
this.userState = userState;
}
public Set<Role> getRoles() {
return roles;
}
public void setRoles(Set<Role> roles) {
this.roles = roles;
}
public List<Enquiry> getEnquiries() {
return enquiries;
}
public void setEnquiries(List<Enquiry> enquiries) {
this.enquiries = enquiries;
}
public List<FeedBack> getFeedBacks() {
return feedBacks;
}
public void setFeedBacks(List<FeedBack> feedBacks) {
this.feedBacks = feedBacks;
}
}
| [
"wladek.airo@gmail.com"
] | wladek.airo@gmail.com |
505016646209f726c32e6c4cdd8b5baa8716b14e | 4c86a2593ffca1ad2b7349e87fef8872a4005934 | /web1/src/com/web1/DemoServlet.java | 120c0da7b1d91d05005e020ddd625b5190bc05d4 | [] | no_license | miyamotok0105/rtm_training | 47360557d78e17e8327cf792ec3d8bc91f7d7e81 | 3d3bccf6fbe502e16a2aa1b79fb586aa72eca981 | refs/heads/master | 2020-04-09T01:20:09.793459 | 2019-07-06T03:23:18 | 2019-07-06T03:23:18 | 159,900,304 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 966 | java | package com.web1;
//この辺りのパッケージがない。
//初めのプロジェクト作成時にミスってるのでは。
//import java.io.IOException;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
public class DemoServlet {
}
//
//@WebServlet("/Test1")
//public class Test1 extends HttpServlet {
// private static final long serialVersionUID = 1L;
//
// public Test1() {
// super();
// }
//
// protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// response.getWriter().append("Hello Servlet");
// }
//
// protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// doGet(request, response);
// }
//} | [
"miyamotok0105@gmail.com"
] | miyamotok0105@gmail.com |
928d2801191304133db42b3bc5b3f15df5b19431 | 382c8f2cdfab1b1a256b62926d304f1e2a81cafb | /Easylogger/src/main/java/com/deepaksharma/webaddicted/formatter/message/throwable/ThrowableFormatter.java | 4633e0e86668a9c972f71f32f3cb54227b1132c8 | [] | no_license | webaddicted/EasyLogger | 11684994a127b8bb26402b6a34fa1afcd75acc44 | 9f4b8a3318ef511730f9e238be20cb17a895359b | refs/heads/master | 2020-03-27T12:37:01.329988 | 2018-08-29T06:44:30 | 2018-08-29T06:44:30 | 146,556,802 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 888 | java | /*
* Copyright 2015 Elvis Hew
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.deepaksharma.webaddicted.formatter.message.throwable;
import com.deepaksharma.webaddicted.formatter.Formatter;
/**
* The throwable formatter used to format the throwable when log a message with throwable.
*/
public interface ThrowableFormatter extends Formatter<Throwable> {
}
| [
"deepak.sharma@techaheadcorp.com"
] | deepak.sharma@techaheadcorp.com |
f9db9d6dc5740047aedc7c600fe92c2929ce5370 | b2ac73870276533b58473e0f2be097318f0ed7c4 | /auth-service/src/main/java/com/techiprimers/authorization/authservice/config/ResourceServiceConfig.java | 83926028e0bec84b466b0778b22633e22768d9e5 | [] | no_license | nuwan-git/techiprimers-microserviceapplication-security-production-ready | 1d3b2e39a3ec1a6941f2e8f01828db138cbb5b73 | ebe9491eaf20fa1e7df07986af3601ecc18a2a5f | refs/heads/master | 2022-12-31T13:04:31.589930 | 2020-09-15T13:07:39 | 2020-09-15T13:07:39 | 295,730,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 156 | java | /**
* Created by: nuwan_r
* Created on: 9/13/2020
**/
package com.techiprimers.authorization.authservice.config;
public class ResourceServiceConfig {
}
| [
"nuwan_r@epiclanka.net"
] | nuwan_r@epiclanka.net |
f12ea46e5939055d0a4e31ed6b358683ab25ef9c | e71119e22a67174546a1f7b64e28ac2fecff9652 | /src/main/java/com/softage/epurchase/config/audit/package-info.java | f9186d0cf6e14c3d24e8012a83be9dd5644bfc71 | [] | no_license | BulkSecurityGeneratorProject/epurchage | 3a0b46b794aeb3a07e9594c0946b8d48c2aa98af | 1d222705ede7a43b0835a13f36d1ec42ce2cc804 | refs/heads/master | 2022-12-24T19:26:51.590638 | 2017-03-24T06:25:57 | 2017-03-24T06:28:37 | 296,601,886 | 0 | 0 | null | 2020-09-18T11:30:18 | 2020-09-18T11:30:17 | null | UTF-8 | Java | false | false | 76 | java | /**
* Audit specific code.
*/
package com.softage.epurchase.config.audit;
| [
"sunny.bhattacharjee@softageindia.com"
] | sunny.bhattacharjee@softageindia.com |
6513aa2e8b6ac33da0cb5f65406086c501acbf13 | e8f8f4a5aac47b2cd70878e309fba9de84e13743 | /src/main/java/com/example/airmin/rest/dto/PageableDto.java | b4d4877dcc08e4636038b9e9ed61cd15e0258578 | [] | no_license | dejanos-pocket/airmin | e54d92ca5027cef967b5007e07e39a3573998b54 | 965ac33a4b29c510b081a958adbdda3577eb8fd7 | refs/heads/master | 2023-07-09T15:01:46.023566 | 2020-11-18T18:10:37 | 2020-11-18T18:10:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | package com.example.airmin.rest.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import java.util.Collection;
/**
* Wraps results with additional data useful for pagination.
*
* @param <T> type of resulting collection
*/
@Getter
@Setter
@AllArgsConstructor
public class PageableDto<T> {
private Meta meta;
private Collection<T> results;
@Getter
@Setter
@AllArgsConstructor
public static class Meta {
private long length;
private int limit;
private int page;
}
}
| [
"dejan@referrizer.com"
] | dejan@referrizer.com |
e82e2577c7b463eca187793e669698c66b892996 | 647b60b3226f32aea22235ffe4ff2f9a9f5c8442 | /my-security-authorize/src/main/java/cn/qp/security/rbac/repository/support/AbstractConditionBuilder.java | b3d5a12133ca7d4d3ccc635ba1877de8251c02a0 | [] | no_license | baozi1110/spring-security | bd4a1d4fc25c2fcdbe917def174f9e79bce3e26c | b8613aeec1b5b802e634ed7d45e5fddc337ffd6d | refs/heads/master | 2020-08-02T04:18:08.057086 | 2019-10-30T02:26:20 | 2019-10-30T02:26:20 | 211,231,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,955 | java | package cn.qp.security.rbac.repository.support;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.Collection;
import java.util.Date;
/**
* <pre>
*
* <pre>
* @author jojo 2014-8-12 下午2:57:22
*
*/
public abstract class AbstractConditionBuilder<T> {
/**
* 添加in条件
*
* @param queryWraper
* @param values
*/
protected void addInConditionToColumn(QueryWraper<T> queryWraper, String column, Object values) {
if (needAddCondition(values)) {
Path<?> fieldPath = getPath(queryWraper.getRoot(), column);
if(values.getClass().isArray()) {
queryWraper.addPredicate(fieldPath.in((Object[])values));
}else if(values instanceof Collection) {
queryWraper.addPredicate(fieldPath.in((Collection<?>)values));
}
}
}
/**
* 添加between条件查询
* @param queryWraper
* @param experssion
* @param minValue 范围下限
* @param maxValue 范围上限
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void addBetweenConditionToColumn(QueryWraper<T> queryWraper, String column, Comparable minValue, Comparable maxValue) {
if (minValue != null || maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWraper.getRoot(), column);
if(minValue != null && maxValue != null){
queryWraper.addPredicate(queryWraper.getCb().between(fieldPath, minValue, processMaxValueOnDate(maxValue)));
}else if(minValue != null){
queryWraper.addPredicate(queryWraper.getCb().greaterThanOrEqualTo(fieldPath, minValue));
}else if(maxValue != null){
queryWraper.addPredicate(queryWraper.getCb().lessThanOrEqualTo(fieldPath, processMaxValueOnDate(maxValue)));
}
}
}
/**
* 当范围查询的条件是小于,并且值的类型是Date时,将传入的Date值变为当天的夜里12点的值。
* @param maxValue
* @return
* @author zhailiang
* @since 2016年12月14日
*/
@SuppressWarnings("rawtypes")
private Comparable processMaxValueOnDate(Comparable maxValue) {
if(maxValue instanceof Date) {
maxValue = new DateTime(maxValue).withTimeAtStartOfDay().plusDays(1).plusSeconds(-1).toDate();
}
return maxValue;
}
/**
* 添加大于条件查询
* @param queryWraper
* @param experssion
* @param minValue
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void addGreaterThanConditionToColumn(QueryWraper<T> queryWraper, String column, Comparable minValue) {
if (minValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().greaterThan(fieldPath, minValue));
}
}
/**
* 添加大于等于条件查询
* @param queryWraper
* @param experssion
* @param minValue
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void addGreaterThanOrEqualConditionToColumn(QueryWraper<T> queryWraper, String column, Comparable minValue) {
if (minValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().greaterThanOrEqualTo(fieldPath, minValue));
}
}
/**
* 添加小于条件查询
* @param queryWraper
* @param experssion
* @param maxValue
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
protected void addLessThanConditionToColumn(QueryWraper<T> queryWraper, String column, Comparable maxValue) {
if (maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().lessThan(fieldPath, processMaxValueOnDate(maxValue)));
}
}
/**
* 添加小于等于条件查询
* @param queryWraper
* @param experssion
* @param maxValue
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
protected void addLessThanOrEqualConditionToColumn(QueryWraper<T> queryWraper, String column, Comparable maxValue) {
if (maxValue != null) {
Path<? extends Comparable> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().lessThanOrEqualTo(fieldPath, processMaxValueOnDate(maxValue)));
}
}
/**
* <pre>
* 添加like条件
* <pre>
* @param queryWraper
* @param column
* @param value
* @author jojo 2014-8-12 下午3:13:44
*/
protected void addLikeConditionToColumn(QueryWraper<T> queryWraper, String column, String value) {
if (StringUtils.isNotBlank(value)) {
queryWraper.addPredicate(createLikeCondition(queryWraper, column, value));
}
}
/**
* @param queryWraper
* @param column
* @param value
* @return
* @author zhailiang
* @since 2016年12月13日
*/
@SuppressWarnings("unchecked")
protected Predicate createLikeCondition(QueryWraper<T> queryWraper, String column, String value) {
Path<String> fieldPath = getPath(queryWraper.getRoot(), column);
Predicate condition = queryWraper.getCb().like(fieldPath, "%" + value + "%");
return condition;
}
/**
* <pre>
* 添加like条件
* <pre>
* @param queryWraper
* @param column
* @param value
* @author jojo 2014-8-12 下午3:13:44
*/
@SuppressWarnings("unchecked")
protected void addStartsWidthConditionToColumn(QueryWraper<T> queryWraper, String column, String value) {
if (StringUtils.isNotBlank(value)) {
Path<String> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().like(fieldPath, value + "%"));
}
}
/**
* 添加等于条件
* @param queryWraper
* @param column 指出要向哪个字段添加条件
* @param value 指定字段的值
*/
protected void addEqualsConditionToColumn(QueryWraper<T> queryWraper, String column, Object value) {
if(needAddCondition(value)) {
Path<?> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().equal(fieldPath, value));
}
}
/**
* 添加不等于条件
* @param queryWraper
* @param column 指出要向哪个字段添加条件
* @param value 指定字段的值
*/
protected void addNotEqualsConditionToColumn(QueryWraper<T> queryWraper, String column, Object value) {
if(needAddCondition(value)) {
Path<?> fieldPath = getPath(queryWraper.getRoot(), column);
queryWraper.addPredicate(queryWraper.getCb().notEqual(fieldPath, value));
}
}
/**
* <pre>
*
* <pre>
* @param root
* @param property
* @return
* @author jojo 2014-8-12 下午3:06:58
*/
@SuppressWarnings("rawtypes")
protected Path getPath(Root root, String property){
String[] names = StringUtils.split(property, ".");
Path path = root.get(names[0]);
for (int i = 1; i < names.length; i++) {
path = path.get(names[i]);
}
return path;
}
/**
* <pre>
* 判断是否需要添加where条件
* <pre>
* @param value
* @return
* @author jojo 2014-8-12 下午3:07:00
*/
@SuppressWarnings("rawtypes")
protected boolean needAddCondition(Object value) {
boolean addCondition = false;
if (value != null) {
if(value instanceof String) {
if(StringUtils.isNotBlank(value.toString())) {
addCondition = true;
}
}else if(value.getClass().isArray()) {
if(ArrayUtils.isNotEmpty((Object[]) value)) {
addCondition = true;
}
}else if(value instanceof Collection) {
if(CollectionUtils.isNotEmpty((Collection) value)) {
addCondition = true;
}
}else {
addCondition = true;
}
}
return addCondition;
}
}
| [
"743604512@qq.com"
] | 743604512@qq.com |
f0753b3c34500a225d20def6b72610fe953b53dd | 4e3bce973db2abf6883fa38b4aa80e9e77f70be8 | /3.JavaMultithreading/src/com/javarush/task/task36/task3608/view/View.java | fe814f73ca8973155a394cc4837ae0180ef70c73 | [] | no_license | sergei00787/JavaRushTasks | 462fcd29dca26ecbd93486c95a8e0ea7748e8e38 | 5389004d10fa3496bea9d21eaf68b69e96638d26 | refs/heads/master | 2023-05-20T03:23:56.882693 | 2021-06-11T04:31:58 | 2021-06-11T04:31:58 | 345,182,963 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package com.javarush.task.task36.task3608.view;
import com.javarush.task.task36.task3608.controller.Controller;
import com.javarush.task.task36.task3608.model.ModelData;
public interface View {
public void refresh(ModelData modelData);
public void setController(Controller controller);
}
| [
"sergei007_87@mail.ru"
] | sergei007_87@mail.ru |
1ff69800b16f1f6af38c94919df12c61cbfa76ce | 8ef72de70772d2921b6547ff6255db705b5db337 | /src/main/java/com/yeguo/server/model/User.java | a77ed27c96e81e9562542175a9753caabe79e248 | [] | no_license | huangmiao1986/yeguo-server | 3956198f7c9941c3f6d9318f3399856af92731e4 | 7f6712cf7708547f6d8d58f5bd76242094a1af38 | refs/heads/master | 2021-01-17T20:32:37.829269 | 2016-08-12T11:37:44 | 2016-08-12T11:37:44 | 65,548,746 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,162 | java | package com.yeguo.server.model;
import java.util.Date;
public class User {
private long userId;
private String openId;
private String userName;
private String headImgUrl;
private String city;
private String province;
private short sex;
private String phoneNum;
private String signature;
private short type;
private Date createTime;
private Date updateTime;
public long getUserId() {
return userId;
}
public void setUserId(long userId) {
this.userId = userId;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getHeadImgUrl() {
return headImgUrl;
}
public void setHeadImgUrl(String headImgUrl) {
this.headImgUrl = headImgUrl;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public short getSex() {
return sex;
}
public void setSex(short sex) {
this.sex = sex;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getSignature() {
return signature;
}
public void setSignature(String signature) {
this.signature = signature;
}
public short getType() {
return type;
}
public void setType(short type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
| [
"huangmiao21com@sina.com"
] | huangmiao21com@sina.com |
d1da79f778afd565556a546ca6892eeb2da7ba11 | 251143bb7963caee8b5139a6c20c827625f0a821 | /src/main/java/frc/robot/Subsystems/DriveTrain.java | 6886c25c62d13adeba4ee6848fd13e147b4e5607 | [] | no_license | MorinehtarBlue/InfiniteRechargeMentor | a6576ad88db8df1fdfc42e9d80909dfdb2e6db2b | a4c89f3c0e8264a786b079548f5c0b1ff769401b | refs/heads/master | 2020-12-26T19:48:39.968967 | 2020-02-13T01:50:25 | 2020-02-13T01:50:25 | 237,621,174 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,706 | java | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot.subsystems;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
import edu.wpi.first.wpilibj.ADXRS450_Gyro;
import edu.wpi.first.wpilibj.drive.MecanumDrive;
import edu.wpi.first.wpilibj.interfaces.Gyro;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class DriveTrain extends SubsystemBase {
private final WPI_TalonFX leftFront = new WPI_TalonFX(1);
private final WPI_TalonFX leftRear = new WPI_TalonFX(2);
private final WPI_TalonFX rightFront = new WPI_TalonFX(3);
private final WPI_TalonFX rightRear = new WPI_TalonFX(4);
private final MecanumDrive m_drive;
// Encoders on DriveTrain motors
public double leftFrontEncoder = 0;
public double leftRearEncoder = 0;
public double rightFrontEncoder = 0;
public double rightRearEncoder = 0;
// Gyro Sensor
public Gyro rioGyro;
/**
* Creates a new DriveTrain.
*/
public DriveTrain() {
rioGyro = new ADXRS450_Gyro();
m_drive = new MecanumDrive(leftFront, leftRear, rightFront, rightRear);
m_drive.setDeadband(.05);
resetLeftFrontEncoder();
resetLeftRearEncoder();
resetRightFrontEncoder();
resetRightRearEncoder();
}
public void resetLeftFrontEncoder(){
leftFront.getSensorCollection().setIntegratedSensorPosition(0, 2);
}
public void resetLeftRearEncoder(){
leftRear.getSensorCollection().setIntegratedSensorPosition(0, 2);
}
public void resetRightFrontEncoder(){
rightFront.getSensorCollection().setIntegratedSensorPosition(0, 2);
}
public void resetRightRearEncoder(){
rightRear.getSensorCollection().setIntegratedSensorPosition(0, 2);
}
public void driveByStick(final double liveX, final double liveY, final double liveZ) {
m_drive.driveCartesian(liveX, liveY, liveZ);
}
@Override
public void periodic() {
// This method will be called once per scheduler run
leftFrontEncoder = leftFront.getSensorCollection().getIntegratedSensorPosition();
leftRearEncoder = leftRear.getSensorCollection().getIntegratedSensorPosition();
rightFrontEncoder = rightFront.getSensorCollection().getIntegratedSensorPosition();
rightRearEncoder = rightRear.getSensorCollection().getIntegratedSensorPosition();
}
}
| [
"jimdh76@gmail.com"
] | jimdh76@gmail.com |
8cc82ffa9f0ea2b76aa8f933c739fc70a671ab65 | 96c0a28308c524725c3cdfc78d173ac25456919e | /test1/src/test/java/uz/developer/security/DomainUserDetailsServiceIT.java | 2c401dba6f37eb9c56d720eeffaa86ac6096b31c | [] | no_license | Axrorov1888/WebFlux | 1bdb28b226af6e4c1a3876a8fdafde21b7e0c466 | b3de9cf40832db19ce80614886d3409513790042 | refs/heads/main | 2023-08-14T01:58:17.266439 | 2021-09-23T09:53:55 | 2021-09-23T09:53:55 | 406,724,782 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,281 | java | package uz.developer.security;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import java.util.Locale;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.transaction.annotation.Transactional;
import uz.developer.IntegrationTest;
import uz.developer.domain.User;
import uz.developer.repository.UserRepository;
/**
* Integrations tests for {@link DomainUserDetailsService}.
*/
@Transactional
@IntegrationTest
class DomainUserDetailsServiceIT {
private static final String USER_ONE_LOGIN = "test-user-one";
private static final String USER_ONE_EMAIL = "test-user-one@localhost";
private static final String USER_TWO_LOGIN = "test-user-two";
private static final String USER_TWO_EMAIL = "test-user-two@localhost";
private static final String USER_THREE_LOGIN = "test-user-three";
private static final String USER_THREE_EMAIL = "test-user-three@localhost";
@Autowired
private UserRepository userRepository;
@Autowired
private UserDetailsService domainUserDetailsService;
@BeforeEach
public void init() {
User userOne = new User();
userOne.setLogin(USER_ONE_LOGIN);
userOne.setPassword(RandomStringUtils.random(60));
userOne.setActivated(true);
userOne.setEmail(USER_ONE_EMAIL);
userOne.setFirstName("userOne");
userOne.setLastName("doe");
userOne.setLangKey("en");
userRepository.save(userOne);
User userTwo = new User();
userTwo.setLogin(USER_TWO_LOGIN);
userTwo.setPassword(RandomStringUtils.random(60));
userTwo.setActivated(true);
userTwo.setEmail(USER_TWO_EMAIL);
userTwo.setFirstName("userTwo");
userTwo.setLastName("doe");
userTwo.setLangKey("en");
userRepository.save(userTwo);
User userThree = new User();
userThree.setLogin(USER_THREE_LOGIN);
userThree.setPassword(RandomStringUtils.random(60));
userThree.setActivated(false);
userThree.setEmail(USER_THREE_EMAIL);
userThree.setFirstName("userThree");
userThree.setLastName("doe");
userThree.setLangKey("en");
userRepository.save(userThree);
}
@Test
void assertThatUserCanBeFoundByLogin() {
UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN);
assertThat(userDetails).isNotNull();
assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN);
}
@Test
void assertThatUserCanBeFoundByLoginIgnoreCase() {
UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN.toUpperCase(Locale.ENGLISH));
assertThat(userDetails).isNotNull();
assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN);
}
@Test
void assertThatUserCanBeFoundByEmail() {
UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL);
assertThat(userDetails).isNotNull();
assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN);
}
@Test
void assertThatUserCanBeFoundByEmailIgnoreCase() {
UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL.toUpperCase(Locale.ENGLISH));
assertThat(userDetails).isNotNull();
assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN);
}
@Test
void assertThatEmailIsPrioritizedOverLogin() {
UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_EMAIL);
assertThat(userDetails).isNotNull();
assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN);
}
@Test
void assertThatUserNotActivatedExceptionIsThrownForNotActivatedUsers() {
assertThatExceptionOfType(UserNotActivatedException.class)
.isThrownBy(() -> domainUserDetailsService.loadUserByUsername(USER_THREE_LOGIN));
}
}
| [
"axrorovshaxobiddin@gmail.com"
] | axrorovshaxobiddin@gmail.com |
4e31e9d85ebe29990b625eb0636199e14a1e499f | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-imagebuilder/src/main/java/com/amazonaws/services/imagebuilder/model/ListComponentBuildVersionsRequest.java | da6e08214c785a923dbb01e770ab9d0f23f867d1 | [
"Apache-2.0"
] | permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 7,587 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.imagebuilder.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/imagebuilder-2019-12-02/ListComponentBuildVersions"
* target="_top">AWS API Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListComponentBuildVersionsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The component version Amazon Resource Name (ARN) whose versions you want to list.
* </p>
*/
private String componentVersionArn;
/**
* <p>
* The maximum items to return in a request.
* </p>
*/
private Integer maxResults;
/**
* <p>
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
* </p>
*/
private String nextToken;
/**
* <p>
* The component version Amazon Resource Name (ARN) whose versions you want to list.
* </p>
*
* @param componentVersionArn
* The component version Amazon Resource Name (ARN) whose versions you want to list.
*/
public void setComponentVersionArn(String componentVersionArn) {
this.componentVersionArn = componentVersionArn;
}
/**
* <p>
* The component version Amazon Resource Name (ARN) whose versions you want to list.
* </p>
*
* @return The component version Amazon Resource Name (ARN) whose versions you want to list.
*/
public String getComponentVersionArn() {
return this.componentVersionArn;
}
/**
* <p>
* The component version Amazon Resource Name (ARN) whose versions you want to list.
* </p>
*
* @param componentVersionArn
* The component version Amazon Resource Name (ARN) whose versions you want to list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListComponentBuildVersionsRequest withComponentVersionArn(String componentVersionArn) {
setComponentVersionArn(componentVersionArn);
return this;
}
/**
* <p>
* The maximum items to return in a request.
* </p>
*
* @param maxResults
* The maximum items to return in a request.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
* <p>
* The maximum items to return in a request.
* </p>
*
* @return The maximum items to return in a request.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
* <p>
* The maximum items to return in a request.
* </p>
*
* @param maxResults
* The maximum items to return in a request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListComponentBuildVersionsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
* <p>
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
* </p>
*
* @param nextToken
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
* <p>
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
* </p>
*
* @return A token to specify where to start paginating. This is the NextToken from a previously truncated response.
*/
public String getNextToken() {
return this.nextToken;
}
/**
* <p>
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
* </p>
*
* @param nextToken
* A token to specify where to start paginating. This is the NextToken from a previously truncated response.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListComponentBuildVersionsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getComponentVersionArn() != null)
sb.append("ComponentVersionArn: ").append(getComponentVersionArn()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListComponentBuildVersionsRequest == false)
return false;
ListComponentBuildVersionsRequest other = (ListComponentBuildVersionsRequest) obj;
if (other.getComponentVersionArn() == null ^ this.getComponentVersionArn() == null)
return false;
if (other.getComponentVersionArn() != null && other.getComponentVersionArn().equals(this.getComponentVersionArn()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getComponentVersionArn() == null) ? 0 : getComponentVersionArn().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListComponentBuildVersionsRequest clone() {
return (ListComponentBuildVersionsRequest) super.clone();
}
}
| [
""
] | |
81b6a5fc171fcb40774d2155e26b6677216aaea0 | 9c52a921351f6d1fec569b443cd9d17b864fb996 | /mtsj/core/src/main/java/com/devonfw/application/mtsj/general/common/impl/security/PrincipalAccessControlProviderImpl.java | 6b4317f1fad1ab2ae2293eab576dfadd735ebbba | [
"Apache-2.0"
] | permissive | devonfw-forge/mts-gigaspaces | d0ba704a43dc138092d93d2ebb5d299b5b42bfdf | 883badabc21c39ec3e6c5305ef07a56ffc4b3aa9 | refs/heads/master | 2023-08-31T15:44:24.937072 | 2021-10-08T10:23:40 | 2021-10-08T10:23:40 | 322,366,359 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,254 | java | package com.devonfw.application.mtsj.general.common.impl.security;
import java.util.Arrays;
import java.util.Collection;
import javax.inject.Named;
import com.devonfw.application.mtsj.general.common.api.UserProfile;
import com.devonfw.module.security.common.api.accesscontrol.PrincipalAccessControlProvider;
/**
* The implementation of {@link PrincipalAccessControlProvider} for this sample application.<br/>
* ATTENTION:<br/>
* In reality you would typically receive the user-profile from the central identity-management (via LDAP) and the roles
* (and groups) from a central access manager (that might also implement the identify-management). This design was only
* chosen to keep our sample application simple. Otherwise one would have to start a separate external server
* application to make everything work what would be too complicated to get things running easily.
*
*/
@Named
public class PrincipalAccessControlProviderImpl implements PrincipalAccessControlProvider<UserProfile> {
/**
* The constructor.
*/
public PrincipalAccessControlProviderImpl() {
super();
}
@Override
public Collection<String> getAccessControlIds(UserProfile principal) {
return Arrays.asList(principal.getRole().getName());
}
}
| [
"dejan.patesan@capgemini.com"
] | dejan.patesan@capgemini.com |
4edf13163593b6ef07bccd5dda9bbc1dab76b033 | 6df8ca5c1dc0c44958354db9c151e75efe55c4b4 | /Mobile Gateway branch/app/src/main/java/rvo/mobilegateway/SystemVerificationManager.java | 0011c9658a4140844fe6527d5f9ee4191fcc0a58 | [] | no_license | voicurobert/AndroidStudioProjects | cf719d9f3c608c1307724b0abd1ea767f1fde99e | cf9dd34b874d2b92c3fd5c8c0f34f8887a82b0e9 | refs/heads/master | 2022-04-13T01:09:22.650889 | 2020-03-11T07:30:43 | 2020-03-11T07:30:43 | 237,033,846 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,447 | java | package rvo.mobilegateway;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.support.v4.net.ConnectivityManagerCompat;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import java.util.List;
import rvo.mobilegateway.connectivity_activity.SetOnInitialisationCompleteListener;
import rvo.mobilegateway.engines.SetOnTaskCompleteListener;
import rvo.mobilegateway.engines.ServiceRequest;
import rvo.mobilegateway.engines.SmallworldServicesDelegate;
/**
* Created by Robert on 7/3/2015.
*/
public class SystemVerificationManager{
public static final SystemVerificationManager instance = new SystemVerificationManager( );
private boolean networkStatus = false;
private boolean gssServer = false;
private boolean locationService = false;
private boolean googlePlayService = false;
private SystemVerificationManager( ){
}
public static void verify( final Context context ){
instance.checkForInternetConnection( context );
//instance.checkForGooglePlayServices( context );
instance.checkForActiveGPS( context );
// checking connection to GSS/JBOSS server
SmallworldServicesDelegate.instance.callGSSDescribe( context, new SetOnInitialisationCompleteListener( ){
@Override
public void onInitialiseComplete( boolean complete, List< HashMap< String, String > > result ) {
if( complete ) {
instance.gssServer = true;
} else {
L.t( context, "No response from GSS server. Consult your system administrator!" );
Intent settingsIntent = new Intent( context, SettingsActivity.class );
context.startActivity( settingsIntent );
}
}
@Override
public void onEquipmentsInitialisationComplete( boolean initialised ){
}
@Override
public void onConnectedCablesInitialisationComplete( boolean initialised ){
}
@Override
public void onLogicalObjectsInitialisationComplete( boolean initialised ){
}
@Override
public void onPortsInitialisationComplete( boolean initialised ){
}
} );
}
private void checkForInternetConnection( Context context ) {
ConnectivityManager cm = ( ConnectivityManager ) context.getSystemService( context.CONNECTIVITY_SERVICE );
NetworkInfo networkInfo = cm.getActiveNetworkInfo( );
if( ( networkInfo == null ) || ( !networkInfo.isConnectedOrConnecting() ) ){
networkStatus = true;
L.t( context, "No Internet connection..." );
}
}
private void checkForGooglePlayServices( Context context ){
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable( context );
if( resultCode != ConnectionResult.SUCCESS ){
L.t( context, "No Google Play Services..." );
}else{
googlePlayService = true;
}
}
private void checkForActiveGPS( Context context ){
LocationManager locationManager = ( LocationManager ) context.getSystemService( Context.LOCATION_SERVICE );
if( !locationManager.isProviderEnabled( LocationManager.GPS_PROVIDER ) ){
L.t( context, "No GPS Service..." );
}else{
locationService = true;
}
}
public boolean isNetworkStatus( ) {
return networkStatus;
}
public boolean isGooglePlayService( ) {
return googlePlayService;
}
public boolean isGssServer( ) {
return gssServer;
}
public boolean isLocationService( ) {
return locationService;
}
public void setGssServer( boolean gssServer ){
this.gssServer = gssServer;
}
}
| [
"voicu.eduardrobert@gmail.com"
] | voicu.eduardrobert@gmail.com |
1aa83660aeb61158c4f4d4da12c4b667c2f59aef | 7901eb7007d21f26423bc805295d418ac5d87077 | /Assignment 5/DeckOrHandEmptyException.java | b155414d07e93a37e9538d3a1a2caac8b176794d | [] | no_license | HanlonsStraightRazor/cs262 | 9b2adc30dd5f377a8bdd5b1cc83422028aa6298c | 0c64a53e67ed112d32b0b6c7d803cd4cf12cfc46 | refs/heads/master | 2022-04-08T07:57:24.574936 | 2020-03-04T01:09:00 | 2020-03-04T01:09:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 150 | java | public class DeckOrHandEmptyException extends CardException{
public DeckOrHandEmptyException() {
super("Deck or Hand empty");
}
}
| [
"muellm79@uwosh.edu"
] | muellm79@uwosh.edu |
22ab41cae083c2864402ea39f45780fb81fdfa7c | 302af4aa0bf08a66dde5fa95bc6e8992e4505c7d | /com.cygery.repetitouch.pro/java/com/cygery/repetitouch/pro/d.java | d3c6ee6e0aab3ac209a515ad3f3160333ea84496 | [] | no_license | hakat0m/Chessboxing | 0f5ce696a55a5b40f1d8fa226bbdc5673ef5dbc5 | 0a576dec5aaafa219c340a013726037d852b91a2 | refs/heads/master | 2021-01-19T08:51:23.932830 | 2017-04-09T06:48:44 | 2017-04-09T06:48:44 | 87,688,753 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,165 | java | /*
* Decompiled with CFR 0_110.
*
* Could not load the following classes:
* android.annotation.SuppressLint
* android.app.Activity
* android.app.AlertDialog
* android.app.AlertDialog$Builder
* android.app.Dialog
* android.content.Context
* android.content.DialogInterface
* android.content.DialogInterface$OnClickListener
* android.content.DialogInterface$OnDismissListener
* android.content.SharedPreferences
* android.content.SharedPreferences$OnSharedPreferenceChangeListener
* android.os.Build
* android.os.Build$VERSION
* android.os.Bundle
* android.preference.CheckBoxPreference
* android.preference.EditTextPreference
* android.preference.Preference
* android.preference.PreferenceFragment
* android.preference.PreferenceManager
* android.preference.PreferenceScreen
* android.util.Pair
* android.widget.EditText
* java.lang.CharSequence
* java.lang.Integer
* java.lang.Object
* java.lang.String
* java.util.ArrayList
* java.util.Collections
* java.util.Comparator
* java.util.Iterator
* java.util.List
*/
package com.cygery.repetitouch.pro;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.util.Pair;
import android.widget.EditText;
import com.cygery.repetitouch.n;
import com.cygery.repetitouch.pro.TranslucentActivityPro;
import com.cygery.repetitouch.pro.e;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@SuppressLint(value={"NewApi"})
public class d
extends n
implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String d = d.class.getName();
private e e;
/*
* Enabled aggressive block sorting
*/
@Override
public void onCreate(Bundle bundle) {
Preference preference;
this.a = TranslucentActivityPro.class;
super.onCreate(bundle);
this.e = new e((Context)this.getActivity());
this.e.a((PreferenceFragment)this);
this.e.d = (CheckBoxPreference)this.findPreference((CharSequence)"enableLocaleSupport");
this.e.e = (CheckBoxPreference)this.findPreference((CharSequence)"ignoreCallState");
this.e.f = (EditTextPreference)this.findPreference((CharSequence)"loopTimes");
this.e.g = (EditTextPreference)this.findPreference((CharSequence)"replaySpeed");
SharedPreferences sharedPreferences = this.b.getSharedPreferences();
int n2 = sharedPreferences != null ? sharedPreferences.getInt("numberOfAdditionalEventIndizes", 0) : 0;
PreferenceScreen preferenceScreen = (PreferenceScreen)this.findPreference((CharSequence)"additional_events_preferencescreen");
if (preferenceScreen != null) {
preferenceScreen.removeAll();
if (n2 > 0 && this.getActivity() != null) {
preferenceScreen.setEnabled(true);
ArrayList arrayList = new ArrayList();
for (int i2 = 0; i2 < n2; ++i2) {
String string = sharedPreferences.getString("additionalEventName_" + i2, "");
String string2 = sharedPreferences.getString("additionalEventIndexString_" + i2, "");
CheckBoxPreference checkBoxPreference = new CheckBoxPreference((Context)this.getActivity());
checkBoxPreference.setKey("additionalEventEnabled_" + i2);
checkBoxPreference.setDefaultValue((Object)false);
checkBoxPreference.setTitle((CharSequence)(string2 + " : " + string));
arrayList.add((Object)new Pair((Object)Integer.parseInt((String)string2), (Object)checkBoxPreference));
}
Collections.sort((List)arrayList, (Comparator)new Comparator<Pair<Integer, Preference>>(){
public int a(Pair<Integer, Preference> pair, Pair<Integer, Preference> pair2) {
return (Integer)pair.first - (Integer)pair2.first;
}
public /* synthetic */ int compare(Object object, Object object2) {
return this.a((Pair)object, (Pair)object2);
}
});
Iterator iterator = arrayList.iterator();
while (iterator.hasNext()) {
preferenceScreen.addPreference((Preference)((Pair)iterator.next()).second);
}
} else {
preferenceScreen.setEnabled(false);
}
}
CheckBoxPreference checkBoxPreference = (CheckBoxPreference)this.findPreference((CharSequence)"dimScreenOnReplay");
boolean bl = false;
if (checkBoxPreference != null) {
boolean bl2 = checkBoxPreference.isChecked();
bl = false;
if (bl2) {
bl = true;
}
}
Preference preference2 = this.findPreference((CharSequence)"dimScreenPercentageInt");
Preference preference3 = this.findPreference((CharSequence)"dimDelaySeconds");
if (preference2 != null) {
preference2.setEnabled(bl);
}
if (preference3 != null) {
preference3.setEnabled(bl);
}
if (Build.VERSION.SDK_INT < 16 && (preference = this.findPreference((CharSequence)"notificationPriority")) != null && this.getPreferenceScreen() != null) {
this.getPreferenceScreen().removePreference(preference);
}
this.e.a();
}
public void onPause() {
super.onPause();
if (this.getPreferenceScreen().getSharedPreferences() != null) {
this.getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener((SharedPreferences.OnSharedPreferenceChangeListener)this);
}
}
/*
* Enabled aggressive block sorting
*/
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (preference == this.e.d) {
if (!this.e.d.isChecked()) return false;
{
if (this.getActivity() == null) {
((CheckBoxPreference)preference).setChecked(false);
return false;
}
this.e.h = new AlertDialog.Builder((Context)this.getActivity()).setMessage(2131165308).setTitle(2131165309).setIconAttribute(16843605).setPositiveButton(17039379, (DialogInterface.OnClickListener)this.e).setNegativeButton(17039369, (DialogInterface.OnClickListener)this.e).show();
this.e.h.setOnDismissListener((DialogInterface.OnDismissListener)this.e);
return false;
}
} else if (preference == this.e.e) {
if (!this.e.e.isChecked()) return false;
{
if (this.getActivity() != null) {
this.e.i = new AlertDialog.Builder((Context)this.getActivity()).setMessage(2131165230).setTitle(2131165231).setIconAttribute(16843605).setPositiveButton(17039379, (DialogInterface.OnClickListener)this.e).setNegativeButton(17039369, (DialogInterface.OnClickListener)this.e).show();
this.e.i.setOnDismissListener((DialogInterface.OnDismissListener)this.e);
return false;
}
((CheckBoxPreference)preference).setChecked(false);
return false;
}
} else if (preference == this.findPreference((CharSequence)"dimScreenOnReplay")) {
boolean bl = ((CheckBoxPreference)preference).isChecked();
Preference preference2 = this.findPreference((CharSequence)"dimScreenPercentageInt");
Preference preference3 = this.findPreference((CharSequence)"dimDelaySeconds");
if (preference2 != null) {
preference2.setEnabled(bl);
}
if (preference3 == null) return false;
{
preference3.setEnabled(bl);
return false;
}
} else {
if (preference != this.e.f) return false;
{
this.e.f.getEditText().setSelection(this.e.f.getText().length());
return false;
}
}
}
public void onResume() {
super.onResume();
if (this.getPreferenceScreen().getSharedPreferences() != null) {
this.getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener((SharedPreferences.OnSharedPreferenceChangeListener)this);
}
}
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String string) {
this.e.a(sharedPreferences, string);
}
}
| [
"vuesz@outlook.com"
] | vuesz@outlook.com |
1505a213de536ca2cf25f17569715712f7e60a79 | ef118e37509b55227a349426951af3e47f6c7f5b | /mldnmybatis-ssm/src/test/java/cn/mldn/ssm/test/TestEmpService.java | 8084b0a5b662b3a49a3d724c5452427c2106cef7 | [] | no_license | xintyan/mldnmybatis-master | d7689a23fa34f1f97193441888466eb1f33736e3 | 15e28e43977538caf6f31a7efcaeaf161f6d9168 | refs/heads/master | 2020-03-21T02:16:38.827881 | 2018-06-20T06:38:44 | 2018-06-20T06:38:44 | 137,990,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,459 | java | package cn.mldn.ssm.test;
import java.util.Map;
import java.util.Random;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import cn.mldn.ssm.service.IEmpService;
import cn.mldn.ssm.vo.Emp;
@ContextConfiguration(locations= {"classpath:spring-test.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
public class TestEmpService {
private Random rand = new Random() ;
@Autowired
private IEmpService empService ;
private long currentPage = 1 ;
private int lineSize = 2 ;
private String column = null ;
private String keyWord = "强" ;
@Test
public void testList() {
Map<String, Object> map = this.empService.list(currentPage, lineSize, column, keyWord);
System.out.println(map);
}
@Test
public void testAdd() {
for (int x = 0 ; x < 10 ; x ++) {
Emp vo = new Emp() ;
vo.setEmpno(7388L + x );
vo.setName("强子");
vo.setJob("某商场团购代表");
vo.setSalary(8000.0);
vo.setPhoto("nophoto.jpg");
System.out.println(this.empService.add(vo));
}
}
@Test
public void testEdit() {
Emp vo = new Emp() ;
vo.setEmpno(7369L);
vo.setJob("某天茂的间谍");
System.out.println(this.empService.edit(vo));
}
@Test
public void testPreEdit() {
Emp vo = this.empService.preEdit(7369L) ;
System.out.println(vo);
}
}
| [
"xin6786@yahoo.com"
] | xin6786@yahoo.com |
a8279de99aaa5c333f73a5231fe182abbc0cd9e8 | e5a878f0da90edd07c707b0a77330c0b942e1add | /app/build/generated/not_namespaced_r_class_sources/debug/r/androidx/navigation/common/R.java | 42875d115acfb41bdcf10170392cc234cf953400 | [] | no_license | harshilr/Firebase | f174ad5308253467d89a10cd296caf33eb31a40c | 3b7fb405aee810e480d10ca9ef23e52ae849e809 | refs/heads/master | 2020-09-28T04:02:06.093634 | 2020-01-18T22:27:00 | 2020-01-18T22:27:00 | 226,681,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,706 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package androidx.navigation.common;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f030028;
public static final int argType = 0x7f03002a;
public static final int destination = 0x7f0300b4;
public static final int enterAnim = 0x7f0300c8;
public static final int exitAnim = 0x7f0300cb;
public static final int font = 0x7f0300e2;
public static final int fontProviderAuthority = 0x7f0300e4;
public static final int fontProviderCerts = 0x7f0300e5;
public static final int fontProviderFetchStrategy = 0x7f0300e6;
public static final int fontProviderFetchTimeout = 0x7f0300e7;
public static final int fontProviderPackage = 0x7f0300e8;
public static final int fontProviderQuery = 0x7f0300e9;
public static final int fontStyle = 0x7f0300ea;
public static final int fontVariationSettings = 0x7f0300eb;
public static final int fontWeight = 0x7f0300ec;
public static final int launchSingleTop = 0x7f03011e;
public static final int nullable = 0x7f03017a;
public static final int popEnterAnim = 0x7f030189;
public static final int popExitAnim = 0x7f03018a;
public static final int popUpTo = 0x7f03018b;
public static final int popUpToInclusive = 0x7f03018c;
public static final int startDestination = 0x7f0301b7;
public static final int ttcIndex = 0x7f030220;
public static final int uri = 0x7f030221;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f050075;
public static final int notification_icon_bg_color = 0x7f050076;
public static final int ripple_material_light = 0x7f050081;
public static final int secondary_text_default_material_light = 0x7f050083;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f06004e;
public static final int compat_button_inset_vertical_material = 0x7f06004f;
public static final int compat_button_padding_horizontal_material = 0x7f060050;
public static final int compat_button_padding_vertical_material = 0x7f060051;
public static final int compat_control_corner_material = 0x7f060052;
public static final int compat_notification_large_icon_max_height = 0x7f060053;
public static final int compat_notification_large_icon_max_width = 0x7f060054;
public static final int notification_action_icon_size = 0x7f0600c0;
public static final int notification_action_text_size = 0x7f0600c1;
public static final int notification_big_circle_margin = 0x7f0600c2;
public static final int notification_content_margin_start = 0x7f0600c3;
public static final int notification_large_icon_height = 0x7f0600c4;
public static final int notification_large_icon_width = 0x7f0600c5;
public static final int notification_main_column_padding_top = 0x7f0600c6;
public static final int notification_media_narrow_margin = 0x7f0600c7;
public static final int notification_right_icon_size = 0x7f0600c8;
public static final int notification_right_side_padding_top = 0x7f0600c9;
public static final int notification_small_icon_background_padding = 0x7f0600ca;
public static final int notification_small_icon_size_as_large = 0x7f0600cb;
public static final int notification_subtext_size = 0x7f0600cc;
public static final int notification_top_pad = 0x7f0600cd;
public static final int notification_top_pad_large_text = 0x7f0600ce;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f070081;
public static final int notification_bg = 0x7f070082;
public static final int notification_bg_low = 0x7f070083;
public static final int notification_bg_low_normal = 0x7f070084;
public static final int notification_bg_low_pressed = 0x7f070085;
public static final int notification_bg_normal = 0x7f070086;
public static final int notification_bg_normal_pressed = 0x7f070087;
public static final int notification_icon_background = 0x7f070088;
public static final int notification_template_icon_bg = 0x7f070089;
public static final int notification_template_icon_low_bg = 0x7f07008a;
public static final int notification_tile_bg = 0x7f07008b;
public static final int notify_panel_notification_icon_bg = 0x7f07008c;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f08002f;
public static final int action_divider = 0x7f080031;
public static final int action_image = 0x7f080032;
public static final int action_text = 0x7f080038;
public static final int actions = 0x7f080039;
public static final int async = 0x7f080041;
public static final int blocking = 0x7f080045;
public static final int chronometer = 0x7f08004e;
public static final int forever = 0x7f080075;
public static final int icon = 0x7f08007e;
public static final int icon_group = 0x7f08007f;
public static final int info = 0x7f080083;
public static final int italic = 0x7f080085;
public static final int line1 = 0x7f08008b;
public static final int line3 = 0x7f08008c;
public static final int normal = 0x7f0800a0;
public static final int notification_background = 0x7f0800a1;
public static final int notification_main_column = 0x7f0800a2;
public static final int notification_main_column_container = 0x7f0800a3;
public static final int right_icon = 0x7f0800b3;
public static final int right_side = 0x7f0800b4;
public static final int tag_transition_group = 0x7f0800e8;
public static final int tag_unhandled_key_event_manager = 0x7f0800e9;
public static final int tag_unhandled_key_listeners = 0x7f0800ea;
public static final int text = 0x7f0800eb;
public static final int text2 = 0x7f0800ec;
public static final int time = 0x7f0800f6;
public static final int title = 0x7f0800f7;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f090010;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f0b0031;
public static final int notification_action_tombstone = 0x7f0b0032;
public static final int notification_template_custom_big = 0x7f0b0039;
public static final int notification_template_icon_group = 0x7f0b003a;
public static final int notification_template_part_chronometer = 0x7f0b003e;
public static final int notification_template_part_time = 0x7f0b003f;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f0e0054;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f0f0115;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0f0116;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0f0118;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0f011b;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0f011d;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0f01c4;
public static final int Widget_Compat_NotificationActionText = 0x7f0f01c5;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f030028 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] FontFamily = { 0x7f0300e4, 0x7f0300e5, 0x7f0300e6, 0x7f0300e7, 0x7f0300e8, 0x7f0300e9 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f0300e2, 0x7f0300ea, 0x7f0300eb, 0x7f0300ec, 0x7f030220 };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
public static final int[] NavAction = { 0x10100d0, 0x7f0300b4, 0x7f0300c8, 0x7f0300cb, 0x7f03011e, 0x7f030189, 0x7f03018a, 0x7f03018b, 0x7f03018c };
public static final int NavAction_android_id = 0;
public static final int NavAction_destination = 1;
public static final int NavAction_enterAnim = 2;
public static final int NavAction_exitAnim = 3;
public static final int NavAction_launchSingleTop = 4;
public static final int NavAction_popEnterAnim = 5;
public static final int NavAction_popExitAnim = 6;
public static final int NavAction_popUpTo = 7;
public static final int NavAction_popUpToInclusive = 8;
public static final int[] NavArgument = { 0x1010003, 0x10101ed, 0x7f03002a, 0x7f03017a };
public static final int NavArgument_android_name = 0;
public static final int NavArgument_android_defaultValue = 1;
public static final int NavArgument_argType = 2;
public static final int NavArgument_nullable = 3;
public static final int[] NavDeepLink = { 0x10104ee, 0x7f030221 };
public static final int NavDeepLink_android_autoVerify = 0;
public static final int NavDeepLink_uri = 1;
public static final int[] NavGraphNavigator = { 0x7f0301b7 };
public static final int NavGraphNavigator_startDestination = 0;
public static final int[] Navigator = { 0x1010001, 0x10100d0 };
public static final int Navigator_android_label = 0;
public static final int Navigator_android_id = 1;
}
}
| [
"hramswaroop@gmail.com"
] | hramswaroop@gmail.com |
4c5951f6dc1d15b50ded1422f33d6f8a409b5d46 | 721ba2cd86069533511160d59185250f43b8e337 | /android/app/src/main/java/com/path_timer/MainActivity.java | a0dcdadbb51610ec6f729a560a7ad9e68e4048b8 | [] | no_license | FastestPath/client | 8d080991a32aa9acecf03b28d0b625aafcecd504 | ba88c13091f2144e0c191b248398f35e3b06b2d9 | refs/heads/master | 2021-05-01T21:43:32.752710 | 2017-03-19T19:13:11 | 2017-03-19T19:13:11 | 67,046,952 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 365 | java | package com.path_timer;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "path_timer";
}
}
| [
"tim@ticketevolution.com"
] | tim@ticketevolution.com |
b101f1782ddc7f3cf881914ebb991a1e9e7f14e4 | 5ccc001ee4ed4dd0e45831860b7fb2a8818aaaa1 | /app/src/main/java/com/example/wyz/schedulesign/Mvp/Entity/PeopleEntity.java | 3ac48fa164c14a12aae7f3fefd9085994ca7f0aa | [] | no_license | showdpro/JuniorYearScheduleSign | 5ae8da82d25e6dc529afe433188f1a037168fe2b | 5a4c33bc05f6c5ebceb6b627f995a440e1c50968 | refs/heads/master | 2021-07-15T22:42:18.712850 | 2017-06-23T09:17:11 | 2017-06-23T09:17:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,353 | java | package com.example.wyz.schedulesign.Mvp.Entity;
import java.util.List;
/**
* Created by WYZ on 2017/5/15.
*/
public class PeopleEntity {
private String username;
private String password;
private boolean Result;
private List<MDetail> Detail;
public static class MDetail{
private int status;
private int emp_id;
private String emp_no;
private String emp_name;
private String emp_tel_num;
private String emp_addr;
private String emp_email;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getEmp_id() {
return emp_id;
}
public String getEmp_no() {
return emp_no;
}
public String getEmp_addr() {
return emp_addr;
}
public String getEmp_email() {
return emp_email;
}
public String getEmp_name() {
return emp_name;
}
public String getEmp_tel_num() {
return emp_tel_num;
}
public void setEmp_addr(String emp_addr) {
this.emp_addr = emp_addr;
}
public void setEmp_id(int emp_id) {
this.emp_id = emp_id;
}
public void setEmp_email(String emp_email) {
this.emp_email = emp_email;
}
public void setEmp_name(String emp_name) {
this.emp_name = emp_name;
}
public void setEmp_no(String emp_no) {
this.emp_no = emp_no;
}
public void setEmp_tel_num(String emp_tel_num) {
this.emp_tel_num = emp_tel_num;
}
}
public List<MDetail> getDetail() {
return Detail;
}
public void setDetail(List<MDetail> detail) {
Detail = detail;
}
public boolean isResult() {
return Result;
}
public void setResult(boolean result) {
Result = result;
}
public void setPassword(String password) {
this.password = password;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public String getUsername() {
return username;
}
}
| [
"745322878@qq.com"
] | 745322878@qq.com |
57ab94efcadc307364c66bd25fbc5e730ba3b700 | de6c78394d7a4d971a749f6099216e448798bfc8 | /src/test/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java | df579a3566edf6d898bbf74c41a57394afddbdb3 | [] | no_license | rbirene/mental-health-forum | 1ef46190e57cea6f2e510a0ece19363dec94bdee | a576a169365208066378ba5fca96d89a248b9e37 | refs/heads/master | 2020-06-01T18:51:48.954468 | 2019-07-15T19:38:44 | 2019-07-15T19:38:44 | 190,890,124 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,511 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.fileupload.disk;
import java.io.File;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.io.FileCleaningTracker;
/**
* <p>The default {@link org.apache.commons.fileupload.FileItemFactory}
* implementation. This implementation creates
* {@link org.apache.commons.fileupload.FileItem} instances which keep their
* content either in memory, for smaller items, or in a temporary file on disk,
* for larger items. The size threshold, above which content will be stored on
* disk, is configurable, as is the directory in which temporary files will be
* created.</p>
*
* <p>If not otherwise configured, the default configuration values are as
* follows:</p>
* <ul>
* <li>Size threshold is 10KB.</li>
* <li>Repository is the system default temp directory, as returned by
* <code>System.getProperty("java.io.tmpdir")</code>.</li>
* </ul>
* <p>
* <b>NOTE</b>: Files are created in the system default temp directory with
* predictable names. This means that a local attacker with write access to that
* directory can perform a TOUTOC attack to replace any uploaded file with a
* file of the attackers choice. The implications of this will depend on how the
* uploaded file is used but could be significant. When using this
* implementation in an environment with local, untrusted users,
* {@link #setRepository(File)} MUST be used to configure a repository location
* that is not publicly writable. In a Servlet container the location identified
* by the ServletContext attribute <code>javax.servlet.context.tempdir</code>
* may be used.
* </p>
*
* <p>Temporary files, which are created for file items, should be
* deleted later on. The best way to do this is using a
* {@link FileCleaningTracker}, which you can set on the
* {@link DiskFileItemFactory}. However, if you do use such a tracker,
* then you must consider the following: Temporary files are automatically
* deleted as soon as they are no longer needed. (More precisely, when the
* corresponding instance of {@link File} is garbage collected.)
* This is done by the so-called reaper thread, which is started and stopped
* automatically by the {@link FileCleaningTracker} when there are files to be
* tracked.
* It might make sense to terminate that thread, for example, if
* your web application ends. See the section on "Resource cleanup"
* in the users guide of commons-fileupload.</p>
*
* @since FileUpload 1.1
*
* @version $Id: DiskFileItemFactory.java 1564788 2014-02-05 14:36:41Z markt $
*/
public class DiskFileItemFactory implements FileItemFactory {
// ----------------------------------------------------- Manifest constants
/**
* The default threshold above which uploads will be stored on disk.
*/
public static final int DEFAULT_SIZE_THRESHOLD = 10240;
// ----------------------------------------------------- Instance Variables
/**
* The directory in which uploaded files will be stored, if stored on disk.
*/
private File repository;
/**
* The threshold above which uploads will be stored on disk.
*/
private int sizeThreshold = DEFAULT_SIZE_THRESHOLD;
/**
* <p>The instance of {@link FileCleaningTracker}, which is responsible
* for deleting temporary files.</p>
* <p>May be null, if tracking files is not required.</p>
*/
private FileCleaningTracker fileCleaningTracker;
// ----------------------------------------------------------- Constructors
/**
* Constructs an unconfigured instance of this class. The resulting factory
* may be configured by calling the appropriate setter methods.
*/
public DiskFileItemFactory() {
this(DEFAULT_SIZE_THRESHOLD, null);
}
/**
* Constructs a preconfigured instance of this class.
*
* @param sizeThreshold The threshold, in bytes, below which items will be
* retained in memory and above which they will be
* stored as a file.
* @param repository The data repository, which is the directory in
* which files will be created, should the item size
* exceed the threshold.
*/
public DiskFileItemFactory(int sizeThreshold, File repository) {
this.sizeThreshold = sizeThreshold;
this.repository = repository;
}
// ------------------------------------------------------------- Properties
/**
* Returns the directory used to temporarily store files that are larger
* than the configured size threshold.
*
* @return The directory in which temporary files will be located.
*
* @see #setRepository(File)
*
*/
public File getRepository() {
return repository;
}
/**
* Sets the directory used to temporarily store files that are larger
* than the configured size threshold.
*
* @param repository The directory in which temporary files will be located.
*
* @see #getRepository()
*
*/
public void setRepository(File repository) {
this.repository = repository;
}
/**
* Returns the size threshold beyond which files are written directly to
* disk. The default value is 10240 bytes.
*
* @return The size threshold, in bytes.
*
* @see #setSizeThreshold(int)
*/
public int getSizeThreshold() {
return sizeThreshold;
}
/**
* Sets the size threshold beyond which files are written directly to disk.
*
* @param sizeThreshold The size threshold, in bytes.
*
* @see #getSizeThreshold()
*
*/
public void setSizeThreshold(int sizeThreshold) {
this.sizeThreshold = sizeThreshold;
}
// --------------------------------------------------------- Public Methods
/**
* Create a new {@link DiskFileItem}
* instance from the supplied parameters and the local factory
* configuration.
*
* @param fieldName The name of the form field.
* @param contentType The content type of the form field.
* @param isFormField <code>true</code> if this is a plain form field;
* <code>false</code> otherwise.
* @param fileName The name of the uploaded file, if any, as supplied
* by the browser or other client.
*
* @return The newly created file item.
*/
public FileItem createItem(String fieldName, String contentType,
boolean isFormField, String fileName) {
DiskFileItem result = new DiskFileItem(fieldName, contentType,
isFormField, fileName, sizeThreshold, repository);
FileCleaningTracker tracker = getFileCleaningTracker();
if (tracker != null) {
tracker.track(result.getTempFile(), result);
}
return result;
}
/**
* Returns the tracker, which is responsible for deleting temporary
* files.
*
* @return An instance of {@link FileCleaningTracker}, or null
* (default), if temporary files aren't tracked.
*/
public FileCleaningTracker getFileCleaningTracker() {
return fileCleaningTracker;
}
/**
* Sets the tracker, which is responsible for deleting temporary
* files.
*
* @param pTracker An instance of {@link FileCleaningTracker},
* which will from now on track the created files, or null
* (default), to disable tracking.
*/
public void setFileCleaningTracker(FileCleaningTracker pTracker) {
fileCleaningTracker = pTracker;
}
}
| [
"irene.bhuiyan@gmail.com"
] | irene.bhuiyan@gmail.com |
44b663ea4b9d998d39d4cb0e29e0c79b7ec27ace | 11b9746abc1f853850e19b9d32b0d9484606dfaf | /FastPos/src/main/java/com/witty/model/conexion/Llaves.java | 479c10b5480451552fedb5a4e805da017041f77b | [] | no_license | andruco3/FastPos | 312b4dec71184caff92eb45f168af7badd7ddcdd | f306841bd8ce45c8e4adff92469c383841ea8bbd | refs/heads/master | 2020-03-27T08:18:52.444760 | 2018-11-14T05:55:44 | 2018-11-14T05:55:44 | 145,168,072 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 255 | java | package com.witty.model.conexion;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.Table;
public class Llaves {
private int idLlaves;
private String idProceso;
}
| [
"andruco3@gmail.com"
] | andruco3@gmail.com |
0e223bb2620221aac2681a036d5c6474bc676065 | 2133a7813904b7312ea2cd58b20e3e0e93869004 | /capitulo11-projeto/financeiro/src/main/java/br/com/javaparaweb/financeiro/lancamento/LancamentoDAOHibernate.java | 605a582bbbf96e780349dc1d8e375157c3325788 | [] | no_license | decioluckow/javaparaweb2d | f667f2c3f43f97dec066fdd98051e0e721dbd7a5 | d538cd7218093fef30e86bbb52f9a3bc0d9e5c03 | refs/heads/master | 2021-01-17T01:19:46.185734 | 2017-08-31T01:32:09 | 2017-08-31T01:32:09 | 61,677,488 | 13 | 15 | null | null | null | null | UTF-8 | Java | false | false | 2,026 | java | package br.com.javaparaweb.financeiro.lancamento;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import br.com.javaparaweb.financeiro.conta.Conta;
public class LancamentoDAOHibernate implements LancamentoDAO {
private Session session;
public void setSession(Session session) {
this.session = session;
}
public void salvar(Lancamento lancamento) {
this.session.saveOrUpdate(lancamento);
}
public void excluir(Lancamento lancamento) {
this.session.delete(lancamento);
}
public Lancamento carregar(Integer lancamento) {
return (Lancamento) this.session.get(Lancamento.class, lancamento);
}
@SuppressWarnings("unchecked")
@Override
public List<Lancamento> listar(Conta conta, Date dataInicio, Date dataFim) {
Criteria criteria = this.session.createCriteria(Lancamento.class);
if (dataInicio != null && dataFim != null) {
criteria.add(Restrictions.between("data", dataInicio, dataFim));
} else if (dataInicio != null) {
criteria.add(Restrictions.ge("data", dataInicio));
} else if (dataFim != null) {
criteria.add(Restrictions.le("data", dataFim));
}
criteria.add(Restrictions.eq("conta", conta));
criteria.addOrder(Order.asc("data"));
return criteria.list();
}
public float saldo(Conta conta, Date data) {
StringBuffer sql = new StringBuffer();
sql.append("select sum(l.valor * c.fator)");
sql.append(" from LANCAMENTO l,");
sql.append(" CATEGORIA c");
sql.append(" where l.categoria = c.codigo");
sql.append(" and l.conta = :conta");
sql.append(" and l.data <= :data");
SQLQuery query = this.session.createSQLQuery(sql.toString());
query.setParameter("conta", conta.getConta());
query.setParameter("data", data);
BigDecimal saldo = (BigDecimal) query.uniqueResult();
if (saldo != null) {
return saldo.floatValue();
}
return 0f;
}
}
| [
"decioluckow@gmail.com"
] | decioluckow@gmail.com |
8be165958a481cc9c85f55ed867be385324c37cb | e1f5849f165ad03b1f255d07aad0cb6d6486ca79 | /src/main/java/com/yin/another/service/Test.java | dd239ec506cb4dd059ccf5fabfc139edaa115d97 | [] | no_license | easonsynnex/my-javacode | 27dad77e3ffd209c88aae80cd0f70c9f7feaace0 | 68dac01ce90c6a602c2f77e3d4089c7871cad62a | refs/heads/master | 2022-06-26T15:33:33.278741 | 2019-10-18T01:01:07 | 2019-10-18T01:01:07 | 140,171,350 | 0 | 0 | null | 2022-06-20T23:31:31 | 2018-07-08T13:44:44 | Java | UTF-8 | Java | false | false | 334 | java | package com.yin.another.service;
import com.yin.another.service.impls.TCPService;
import com.yin.another.service.impls.UDPService;
public class Test {
public static void main(String[] args) {
TCPService tcp = new TCPService();
UDPService udp = new UDPService();
tcp.start();
udp.start();
}
}
| [
"1070388550@qq.com"
] | 1070388550@qq.com |
0c93a83c0af6918c2f3ffdadbb641da4ac8b6124 | 13bffd71a9f5e99b9205d6f55ed423af48185487 | /DP_结构型模式/src/main/java/S_05_Facade/HardDrive.java | 33f904dd5edd207e7e9c6759b792714c2ed3c110 | [] | no_license | cianfree/JavaStudyParent | dba32d81b6754ce52d4d6710492d742b20f86f4e | 9bacc52e0089b20d862b2c184aaa97bffc66a2cd | refs/heads/master | 2021-01-20T20:14:34.579620 | 2017-03-10T03:21:22 | 2017-03-10T03:21:22 | 61,590,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 186 | java | package S_05_Facade;
/**
* Created by Arvin on 2016/4/26.
*/
public class HardDrive {
public void readData() {
System.out.println("Hard Device read data......");
}
}
| [
"xiajiqiu1990@163.com"
] | xiajiqiu1990@163.com |
26384c1550aacf1787969aba5b553cda0dc818c9 | cc4219a3d116ed9778a0348fd334c82590d7612c | /auth/testsrc/no/mnemonic/act/platform/auth/properties/internal/IdMapperTest.java | 7ca957ff6e5953b1b42878c3a90b15964f83d1eb | [
"ISC",
"LicenseRef-scancode-free-unknown"
] | permissive | frbor/act-platform | ca86e4d74ba5429e8a6ce274dab55de493a5dbc7 | 45b344ebad0b8657a95c1e43ea5bc98c3d75d14b | refs/heads/master | 2022-11-07T06:32:16.661560 | 2022-10-18T11:41:58 | 2022-10-18T11:41:58 | 179,058,513 | 0 | 0 | ISC | 2019-04-02T10:57:42 | 2019-04-02T10:57:42 | null | UTF-8 | Java | false | false | 1,116 | java | package no.mnemonic.act.platform.auth.properties.internal;
import org.junit.Test;
import java.util.UUID;
import static org.junit.Assert.assertEquals;
public class IdMapperTest {
@Test
public void testToGlobalId() {
assertEquals(UUID.fromString("00000000-0000-0000-0000-000000000001"), IdMapper.toGlobalID(1));
}
@Test(expected = IllegalArgumentException.class)
public void testToGlobalIdNegativeIdThrowsException() {
IdMapper.toGlobalID(-1);
}
@Test
public void testToInternalId() {
assertEquals(1, IdMapper.toInternalID(UUID.fromString("00000000-0000-0000-0000-000000000001")));
}
@Test(expected = IllegalArgumentException.class)
public void testToInternalIdNullIdThrowsException() {
IdMapper.toInternalID(null);
}
@Test(expected = IllegalArgumentException.class)
public void testToInternalIdMostSignificantBitsSetThrowsException() {
IdMapper.toInternalID(new UUID(1, 1));
}
@Test(expected = IllegalArgumentException.class)
public void testToInternalIdLeastSignificantBitsNegativeThrowsException() {
IdMapper.toInternalID(new UUID(0, -1));
}
}
| [
"konstantin@mnemonic.no"
] | konstantin@mnemonic.no |
2db2040a0773c36529e653e00ba85e38e828c822 | ea0a55bad0971730d7102fd8bf2b9475dc35a1a5 | /src/test/java/com/qa/utils/Screenshots.java | 2c4e4f061bad175dcd2d01e7667467198a45cefe | [] | no_license | JyothiJain/ClearTrip_GUIAutomation | ffe6707a9dfbeabafaa1e2ec304b1dd5e236412b | f8dcb3ef7917a2be87c64dee87d86ebcdd9b09e4 | refs/heads/master | 2020-04-01T00:43:23.679302 | 2018-10-12T07:25:04 | 2018-10-12T07:25:04 | 152,710,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package com.qa.utils;
import com.qa.commons.BaseSetup;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.io.FileHandler;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Screenshots extends BaseSetup {
//take a screenshot
public static void getScreenshots() throws IOException {
File sourceFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
//Store the screenshot in a location required
File destinationFile = new File("/home/jyothi/IdeaProjects/Automation/src/test/java/com/qa/screenshots/cleartrip" + System.currentTimeMillis() + ".png");
//copy the screenshots frrom source to destination
FileHandler.copy(sourceFile, destinationFile);
}
}
| [
"Jyothi92.jain@gmail.om"
] | Jyothi92.jain@gmail.om |
4b481b44d6fb32f5852efe0b2d92998ec15376a1 | d8bb9e4440fc83ae4a0cf96b5344675524788a93 | /app/src/main/java/daniel/cn/dhimagekitandroid/DHFilters/base/interfaces/IDHImagePictureCallback.java | bae84f327a0b0f5344076b69cb42f8f7c1173142 | [] | no_license | XiaolinSh/DHImageKit-Android | cada8445e3ed69e07916d4dca1a3ae4b5a594e4e | af5c9f49bbcf7e163050072223b982620de4f3ef | refs/heads/master | 2021-09-03T10:04:19.481161 | 2018-01-08T07:57:47 | 2018-01-08T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 289 | java | package daniel.cn.dhimagekitandroid.DHFilters.base.interfaces;
import android.graphics.Bitmap;
/**
* Created by huanghongsen on 2017/12/8.
*/
public interface IDHImagePictureCallback {
public void onImageProcessFinished();
public void onImageProcessFinished(Bitmap bitmap);
}
| [
"Danielhhs@163.com"
] | Danielhhs@163.com |
9ec1f35bec3e0a98cd1cc20fee0b468ee3428892 | 2122d24de66635b64ec2b46a7c3f6f664297edc4 | /spring/spring/spring-di-setter-method-sample/src/main/java/com/mkyong/output/OutputHelper.java | 5917d7775f1ab52ad4d87b4319516d577ffd62d3 | [] | no_license | yiminyangguang520/Java-Learning | 8cfecc1b226ca905c4ee791300e9b025db40cc6a | 87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25 | refs/heads/master | 2023-01-10T09:56:29.568765 | 2022-08-29T05:56:27 | 2022-08-29T05:56:27 | 92,575,777 | 5 | 1 | null | 2023-01-05T05:21:02 | 2017-05-27T06:16:40 | Java | UTF-8 | Java | false | false | 391 | java | package com.mkyong.output;
/**
* @author min
*/
public class OutputHelper {
private IOutputGenerator outputGenerator;
public void generateOutput() {
outputGenerator.generateOutput();
}
/**
* DI via setter method
* @param outputGenerator param
*/
public void setOutputGenerator(IOutputGenerator outputGenerator) {
this.outputGenerator = outputGenerator;
}
} | [
"litz-a@glodon.com"
] | litz-a@glodon.com |
b62e8fbd5d55820da90a29bf6d068c76590219c4 | 94c58f1641e6312a10271c7239f197baf1befab9 | /src/test/java/Project_Test1/homepage.java | 4e0e5ed6df8089803c2745640886c8382bada23a | [] | no_license | gupteswaro/COM.QA.CompleteProjectFlow | 6288403b42b70e19b247d071fb2540a16cb747f2 | bbb7edea1cc1ac85e0e75d31d053e6bdc106cf0f | refs/heads/master | 2023-05-15T01:46:28.516565 | 2019-11-02T12:28:09 | 2019-11-02T12:28:09 | 219,043,417 | 0 | 0 | null | 2023-05-09T18:20:36 | 2019-11-01T18:44:22 | HTML | UTF-8 | Java | false | false | 1,022 | java | package Project_Test1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class homepage {
WebDriver driver;
@BeforeClass
public void setup()
{
System.setProperty("webdriver.chrome.driver",System.getProperty("user.dir")+"//src//test//resources//chromedriver.exe");
driver= new ChromeDriver();
}
@Test
public void launchbrowser()
{
driver.get("http://www.google.com");
System.out.println("Url opened");
}
@Test
public void verifyurl()
{
String url=driver.getCurrentUrl();
System.out.println("Current url is "+ url);
//Assert.assertEquals(url,"http://www.google.com");
}
@Test
public void verifyTitle()
{
String title=driver.getTitle();
System.out.println("Title is "+title);
}
@AfterClass
public void tearDown()
{
driver.close();
}
}
| [
"ADMIN@ADMIN-PC"
] | ADMIN@ADMIN-PC |
cf21e6598926721fb4474a85b56e4e58a70a9c00 | 3b00a20c5d8c230899caf0c0bc800e46587cf764 | /packManagement/src/com/coretek/pack/internal/handler/x86/X86PluginsExportHandler.java | 66419cd963da97d4d2cfb3ff8782ce4a775d71ac | [] | no_license | TiMiWang/packManager | 2674164e0eb1b63af0fa978556752c456ae4ed20 | b66366d57184435728730fce56d4bd64b30de6a2 | refs/heads/master | 2021-09-06T04:25:42.895505 | 2018-02-02T09:50:34 | 2018-02-02T09:50:34 | 113,986,126 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,084 | java | package com.coretek.pack.internal.handler.x86;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.List;
import com.coretek.pack.internal.handler.AbstractPluginsExportHandler;
import com.coretek.pack.util.FileUtils;
public class X86PluginsExportHandler extends AbstractPluginsExportHandler {
public final String platformType = "x86";
private String dspP2RepoPath = P2RepoPath+"/"+platformType;
private String dspparentModulePath = parentModulePath+"/"+platformType;
private String dspbuildModulePath = buildModulePath+"/"+platformType;
private String groupName = "com.coretek.dsp.group";
@Override
public boolean MVNParentModuleModify() {
boolean status = true;
String dspParentPomPath = dspparentModulePath+"/pom.xml";
String linesepar = System.getProperty("line.separator");
File dspParentPomFile = new File(dspParentPomPath);
try{
if(dspParentPomFile.exists()){
StringBuffer buffer = new StringBuffer();
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(dspParentPomFile)));
String bufferline = "";
while((bufferline = reader.readLine())!=null){
if(bufferline.contains("<url>")){
bufferline = "<url>file:///"+dspP2RepoPath+"</url>";
}
buffer.append(bufferline);
buffer.append(linesepar);
}
reader.close();
dspParentPomFile.delete();
dspParentPomFile.createNewFile();
PrintWriter writer = new PrintWriter(new FileOutputStream(dspParentPomFile));
writer.write(buffer.toString());
writer.flush();
writer.close();
}else{
status = false;
}
}catch(Exception ex){
status = false;
}
return status;
}
@Override
public boolean MVNParentModuleBuild() {
boolean status = true;
try {
String[] commands = {MVNPath+"/bin/mvn.cmd","clean","install"};
ProcessBuilder processtest = new ProcessBuilder(commands);
processtest.directory(new File(dspparentModulePath));
processtest.redirectErrorStream(true);
Process process;
process = processtest.start();
BufferedReader br = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String line = br.readLine();
while (line != null) {
System.out.print(line);
line = br.readLine();
}
if ((process.waitFor() != 0)) {
System.out.println("error");
status = false;
}
} catch (Exception e) {
status = false;
e.printStackTrace();
}
return status;
}
@Override
public boolean pluginsBuildAndInstall(String pluginsSrcPath) {
boolean status = true;
FileUtils.copyFolder(dspbuildModulePath, pluginsSrcPath+"/"+platformType);
File tmpBuildFile = new File(pluginsSrcPath+"/"+platformType);
if(tmpBuildFile.exists()){
try {
String[] commands = {MVNPath+"/bin/mvn.cmd","clean","install"};
ProcessBuilder processtest = new ProcessBuilder(commands);
processtest.directory(tmpBuildFile);
processtest.redirectErrorStream(true);
Process process;
process = processtest.start();
BufferedReader br = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String line = br.readLine();
while (line != null) {
System.out.print(line);
line = br.readLine();
}
if ((process.waitFor() != 0)) {
System.out.println("error");
status = false;
}
} catch (Exception e) {
status = false;
e.printStackTrace();
}
}
return status;
}
@Override
public boolean redirectPLuginsToPlatform(String platformPluginsPath) {
boolean status = true;
try{
String dspGroupPath = commonRepoPath+"/"+groupName.replace(".", "/");
File dspGroupFile = new File(dspGroupPath);
if(dspGroupFile.exists() && dspGroupFile.isDirectory()){
List<File> jarList = FileUtils.fileFilter(dspGroupFile, ".jar");
if(jarList.size()>0){
for (File file : jarList)
{
String destFilePath = platformPluginsPath+"/"+file.getName().replace("-", "_");
if(file.getName().contains("net.mbl.ide.project.templates") || file.getName().contains("com.windriver.jsqlite")){
FileUtils.zipToFile(file.getAbsolutePath(), destFilePath.replace(".jar", ""));
}else{
FileUtils.copyFileAndReName(file.getAbsolutePath(), destFilePath);
}
}
//TODO 需要对需要解压的jar进行解压操作
}else{
status = false;
}
FileUtils.delAllFile(dspGroupPath);
}
}catch(Exception ex){
ex.getStackTrace();
status = false;
}
return status;
}
// public static void main(String[] args){
// try {
// FileUtils.zipToFile("D:/xampp/tomcat/pluginsExportTools/.m2/repository/com/coretek/dsp/group/net.mbl.ide.project.templates/1.0.0/net.mbl.ide.project.templates-1.0.0.jar", "D:/xampp/tomcat/pluginsExportTools/.m2/repository/com/coretek/dsp/group/net.mbl.ide.project.templates/1.0.0/net.mbl.ide.project.templates_1.0.0");
// System.out.println();
// } catch (Exception e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
}
| [
"110"
] | 110 |
214236438ff4c8367bc052017c0eacca779536f2 | bf9155bd149c102fa604dd5e8f1e56684111b718 | /src/main/java/com/netty/edu/day2/EventLoopServer.java | 1a7d5c2404900ebbd0ea6cca3b972b0da3400f65 | [] | no_license | ki2ty/DODO | 739362a11adda6784caae2ad097bb7f96ca90f49 | 3d69a7c304b0ce91cfc857938626daf2dbd69528 | refs/heads/master | 2023-08-28T15:46:00.152401 | 2021-10-09T11:33:17 | 2021-10-09T11:33:17 | 401,659,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,479 | java | package com.netty.edu.day2;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.util.CharsetUtil;
import lombok.extern.slf4j.Slf4j;
import java.net.InetSocketAddress;
/**
* @ClassName EventLoopServer
* @Author zlc
* @Date 2021/9/8 下午9:21
* @Description EventLoopServer
* @Version 1.0
*/
@Slf4j
public class EventLoopServer {
public static void main(String[] args) throws InterruptedException {
//创建一个独立的EventLoopGroup执行耗时操作
EventLoopGroup worker1 = new DefaultEventLoopGroup();
EventLoopGroup boss = new NioEventLoopGroup();
EventLoopGroup worker = new NioEventLoopGroup();
ServerBootstrap b = new ServerBootstrap();
b.group(boss, worker)
.channel(NioServerSocketChannel.class)
.childHandler(new ChannelInitializer<NioSocketChannel>() {
@Override
protected void initChannel(NioSocketChannel channel) throws Exception {
ChannelPipeline p = channel.pipeline();
p.addLast(new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
ByteBuf byteBuf = (ByteBuf) msg;
log.info(byteBuf.toString(CharsetUtil.UTF_8));
//将消息传递给下一个handler
ctx.fireChannelRead(msg);
}
});
p.addLast(worker1, "worker1", new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
ByteBuf byteBuf = (ByteBuf) msg;
log.info(byteBuf.toString(CharsetUtil.UTF_8));
}
});
}
});
ChannelFuture f = b.bind(new InetSocketAddress(8081)).sync();
f.channel().closeFuture().sync();
}
}
| [
"zhulichen@sequoiadb.com"
] | zhulichen@sequoiadb.com |
092459bf08d46b8910e328e6161ec8595cd20c49 | f5733f6e5b2504d85185c575e28fa0e7c4276792 | /1.JavaSyntax/src/com/javarush/task/task07/task0710/Solution.java | 10b423d0a543555b2c620a0e0c571638651d4a37 | [] | no_license | DJ-Tommy/JavaRushTasks | d09e62f3e9b5eee4dab832e46cb33eff4568a5b8 | 199c66a295b6a8ac6c4c66080a3f55a03beada24 | refs/heads/master | 2021-07-07T02:50:26.545770 | 2020-09-06T13:21:53 | 2020-09-06T13:21:53 | 171,805,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 637 | java | package com.javarush.task.task07.task0710;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
В начало списка
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> strings = new ArrayList<>();
for (int i = 0; i < 10; i++) {
strings.add(0, reader.readLine());
}
for (String s : strings) {
System.out.println(s);
}
//напишите тут ваш код
}
}
| [
"mymail@email.mail"
] | mymail@email.mail |
92da127d0c1f5d886b24c59abf6b0ea179fa6095 | 8ced2912e1a79dd2262bfab1bf18eaf2b710e5df | /build/generated/source/proto/main/javalite/com/heroiclabs/nakama/api/StorageObjectList.java | a1194b41734e205e0448ec929e937a2f7f3c8274 | [
"Apache-2.0"
] | permissive | ttreg/nakama-java | 723048fd497de26f4bf99c258d73169d95af87dd | 063d4a332231b6e117c1ad27e3c3a6967b402d9c | refs/heads/master | 2020-04-10T04:36:39.421002 | 2018-12-07T13:22:36 | 2018-12-07T13:22:36 | 160,803,105 | 0 | 0 | null | 2018-12-07T09:38:38 | 2018-12-07T09:38:37 | null | UTF-8 | Java | false | true | 20,087 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: api.proto
package com.heroiclabs.nakama.api;
/**
* <pre>
* List of storage objects.
* </pre>
*
* Protobuf type {@code nakama.api.StorageObjectList}
*/
public final class StorageObjectList extends
com.google.protobuf.GeneratedMessageLite<
StorageObjectList, StorageObjectList.Builder> implements
// @@protoc_insertion_point(message_implements:nakama.api.StorageObjectList)
StorageObjectListOrBuilder {
private StorageObjectList() {
objects_ = emptyProtobufList();
cursor_ = "";
}
private int bitField0_;
public static final int OBJECTS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.ProtobufList<com.heroiclabs.nakama.api.StorageObject> objects_;
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public java.util.List<com.heroiclabs.nakama.api.StorageObject> getObjectsList() {
return objects_;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public java.util.List<? extends com.heroiclabs.nakama.api.StorageObjectOrBuilder>
getObjectsOrBuilderList() {
return objects_;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public int getObjectsCount() {
return objects_.size();
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public com.heroiclabs.nakama.api.StorageObject getObjects(int index) {
return objects_.get(index);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder(
int index) {
return objects_.get(index);
}
private void ensureObjectsIsMutable() {
if (!objects_.isModifiable()) {
objects_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(objects_);
}
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void setObjects(
int index, com.heroiclabs.nakama.api.StorageObject value) {
if (value == null) {
throw new NullPointerException();
}
ensureObjectsIsMutable();
objects_.set(index, value);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void setObjects(
int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
ensureObjectsIsMutable();
objects_.set(index, builderForValue.build());
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void addObjects(com.heroiclabs.nakama.api.StorageObject value) {
if (value == null) {
throw new NullPointerException();
}
ensureObjectsIsMutable();
objects_.add(value);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void addObjects(
int index, com.heroiclabs.nakama.api.StorageObject value) {
if (value == null) {
throw new NullPointerException();
}
ensureObjectsIsMutable();
objects_.add(index, value);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void addObjects(
com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
ensureObjectsIsMutable();
objects_.add(builderForValue.build());
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void addObjects(
int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
ensureObjectsIsMutable();
objects_.add(index, builderForValue.build());
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void addAllObjects(
java.lang.Iterable<? extends com.heroiclabs.nakama.api.StorageObject> values) {
ensureObjectsIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, objects_);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void clearObjects() {
objects_ = emptyProtobufList();
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
private void removeObjects(int index) {
ensureObjectsIsMutable();
objects_.remove(index);
}
public static final int CURSOR_FIELD_NUMBER = 2;
private java.lang.String cursor_;
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public java.lang.String getCursor() {
return cursor_;
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public com.google.protobuf.ByteString
getCursorBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
private void setCursor(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cursor_ = value;
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
private void clearCursor() {
cursor_ = getDefaultInstance().getCursor();
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
private void setCursorBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cursor_ = value.toStringUtf8();
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < objects_.size(); i++) {
output.writeMessage(1, objects_.get(i));
}
if (!cursor_.isEmpty()) {
output.writeString(2, getCursor());
}
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < objects_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, objects_.get(i));
}
if (!cursor_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(2, getCursor());
}
memoizedSerializedSize = size;
return size;
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObjectList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
* <pre>
* List of storage objects.
* </pre>
*
* Protobuf type {@code nakama.api.StorageObjectList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.heroiclabs.nakama.api.StorageObjectList, Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.StorageObjectList)
com.heroiclabs.nakama.api.StorageObjectListOrBuilder {
// Construct using com.heroiclabs.nakama.api.StorageObjectList.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public java.util.List<com.heroiclabs.nakama.api.StorageObject> getObjectsList() {
return java.util.Collections.unmodifiableList(
instance.getObjectsList());
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public int getObjectsCount() {
return instance.getObjectsCount();
}/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public com.heroiclabs.nakama.api.StorageObject getObjects(int index) {
return instance.getObjects(index);
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder setObjects(
int index, com.heroiclabs.nakama.api.StorageObject value) {
copyOnWrite();
instance.setObjects(index, value);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder setObjects(
int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
copyOnWrite();
instance.setObjects(index, builderForValue);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder addObjects(com.heroiclabs.nakama.api.StorageObject value) {
copyOnWrite();
instance.addObjects(value);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder addObjects(
int index, com.heroiclabs.nakama.api.StorageObject value) {
copyOnWrite();
instance.addObjects(index, value);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder addObjects(
com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
copyOnWrite();
instance.addObjects(builderForValue);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder addObjects(
int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) {
copyOnWrite();
instance.addObjects(index, builderForValue);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder addAllObjects(
java.lang.Iterable<? extends com.heroiclabs.nakama.api.StorageObject> values) {
copyOnWrite();
instance.addAllObjects(values);
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder clearObjects() {
copyOnWrite();
instance.clearObjects();
return this;
}
/**
* <pre>
* The list of storage objects.
* </pre>
*
* <code>repeated .nakama.api.StorageObject objects = 1;</code>
*/
public Builder removeObjects(int index) {
copyOnWrite();
instance.removeObjects(index);
return this;
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public java.lang.String getCursor() {
return instance.getCursor();
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public com.google.protobuf.ByteString
getCursorBytes() {
return instance.getCursorBytes();
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public Builder setCursor(
java.lang.String value) {
copyOnWrite();
instance.setCursor(value);
return this;
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public Builder clearCursor() {
copyOnWrite();
instance.clearCursor();
return this;
}
/**
* <pre>
* The cursor associated with the query a page of results.
* </pre>
*
* <code>optional string cursor = 2;</code>
*/
public Builder setCursorBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setCursorBytes(value);
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.StorageObjectList)
}
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.heroiclabs.nakama.api.StorageObjectList();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
objects_.makeImmutable();
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
com.heroiclabs.nakama.api.StorageObjectList other = (com.heroiclabs.nakama.api.StorageObjectList) arg1;
objects_= visitor.visitList(objects_, other.objects_);
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
!other.cursor_.isEmpty(), other.cursor_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!objects_.isModifiable()) {
objects_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(objects_);
}
objects_.add(
input.readMessage(com.heroiclabs.nakama.api.StorageObject.parser(), extensionRegistry));
break;
}
case 18: {
String s = input.readStringRequireUtf8();
cursor_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
throw new RuntimeException(
new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this));
} finally {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (com.heroiclabs.nakama.api.StorageObjectList.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:nakama.api.StorageObjectList)
private static final com.heroiclabs.nakama.api.StorageObjectList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new StorageObjectList();
DEFAULT_INSTANCE.makeImmutable();
}
public static com.heroiclabs.nakama.api.StorageObjectList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser<StorageObjectList> PARSER;
public static com.google.protobuf.Parser<StorageObjectList> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
| [
"mo@heroiclabs.com"
] | mo@heroiclabs.com |
b35cfa048902675985516fdc73441e061a2ce404 | 7c236e79fc66bdfd966bc76a654073f4e3310e20 | /src/view/ProveedorBuscarArticulo.java | 7d98336e7a1c17660440f59494d46882d8e245e7 | [] | no_license | tammy-mendez/Proyecto | edce06da2bf89d146a4ade4272546fd0b2d13dac | ccd7a0739a8b54e3de4e4df6252be0ebebc676b8 | refs/heads/master | 2020-05-19T11:12:58.182767 | 2015-08-23T02:36:19 | 2015-08-23T02:36:19 | 41,232,632 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 21,014 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package view;
import bean.Proveedor;
import java.awt.EventQueue;
import java.beans.Beans;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.RollbackException;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
/**
*
* @author tammy
*/
public class ProveedorBuscarArticulo extends javax.swing.JFrame {
private char ch;
private int id;
private int fila;
public static int codigo;
private String email;
public String nombre;
private String cedula;
private String ruc;
private String tipo;
private int telef;
private String dire;
public ProveedorBuscarArticulo() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("proyectoPU").createEntityManager();
query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery("SELECT p FROM Proveedor p");
list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(query.getResultList());
jScrollPane1 = new javax.swing.JScrollPane();
jTextPane1 = new javax.swing.JTextPane();
masterScrollPane = new javax.swing.JScrollPane();
masterTable = new javax.swing.JTable();
jPanel3 = new javax.swing.JPanel();
lbl_buscarC = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
lbl_valor = new javax.swing.JLabel();
tf_valor = new javax.swing.JTextField();
lbl_filtro = new javax.swing.JLabel();
list_filtros = new javax.swing.JComboBox();
btn_buscar = new javax.swing.JButton();
btn_cancelar = new javax.swing.JButton();
FormListener formListener = new FormListener();
jScrollPane1.setViewportView(jTextPane1);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);
org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable);
org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${codigoProveedor}"));
columnBinding.setColumnName("Codigo Proveedor");
columnBinding.setColumnClass(Integer.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${tipo}"));
columnBinding.setColumnName("Tipo");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${razonSocial}"));
columnBinding.setColumnName("Razon Social");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${ruc}"));
columnBinding.setColumnName("Ruc");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${cedula}"));
columnBinding.setColumnName("Cedula");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${email}"));
columnBinding.setColumnName("Email");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${direccion}"));
columnBinding.setColumnName("Direccion");
columnBinding.setColumnClass(String.class);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${telefono}"));
columnBinding.setColumnName("Telefono");
columnBinding.setColumnClass(Integer.class);
bindingGroup.addBinding(jTableBinding);
masterTable.addMouseListener(formListener);
masterScrollPane.setViewportView(masterTable);
jPanel3.setBackground(new java.awt.Color(0, 153, 255));
jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
lbl_buscarC.setFont(new java.awt.Font("Corbel", 1, 30)); // NOI18N
lbl_buscarC.setForeground(new java.awt.Color(255, 255, 255));
lbl_buscarC.setText("Seleccionar Proveedor");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(145, 145, 145)
.addComponent(lbl_buscarC, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(lbl_buscarC)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1.setBackground(new java.awt.Color(204, 204, 204));
jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
lbl_valor.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
lbl_valor.setText("Valor:");
tf_valor.addKeyListener(formListener);
lbl_filtro.setFont(new java.awt.Font("Candara", 0, 14)); // NOI18N
lbl_filtro.setText("Buscar por:");
list_filtros.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Código", "Nombre", "Tipo", " " }));
btn_buscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/zoom.png"))); // NOI18N
btn_buscar.setText("Buscar");
btn_buscar.addActionListener(formListener);
btn_buscar.addFocusListener(formListener);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(36, 36, 36)
.addComponent(lbl_filtro)
.addGap(18, 18, 18)
.addComponent(list_filtros, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)
.addComponent(lbl_valor)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(tf_valor, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btn_buscar)
.addGap(36, 36, 36))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_filtro)
.addComponent(list_filtros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lbl_valor)
.addComponent(tf_valor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btn_buscar))
.addContainerGap())
);
btn_cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/delete.png"))); // NOI18N
btn_cancelar.setText("Cancelar");
btn_cancelar.addActionListener(formListener);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(masterScrollPane))
.addGroup(layout.createSequentialGroup()
.addGap(41, 41, 41)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addGap(266, 266, 266)
.addComponent(btn_cancelar)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(22, 22, 22)
.addComponent(masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btn_cancelar)
.addGap(24, 24, 24))
);
bindingGroup.bind();
pack();
}
// Code for dispatching events from components to event handlers.
private class FormListener implements java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener {
FormListener() {}
public void actionPerformed(java.awt.event.ActionEvent evt) {
if (evt.getSource() == btn_buscar) {
ProveedorBuscarArticulo.this.btn_buscarActionPerformed(evt);
}
else if (evt.getSource() == btn_cancelar) {
ProveedorBuscarArticulo.this.btn_cancelarActionPerformed(evt);
}
}
public void focusGained(java.awt.event.FocusEvent evt) {
}
public void focusLost(java.awt.event.FocusEvent evt) {
if (evt.getSource() == btn_buscar) {
ProveedorBuscarArticulo.this.btn_buscarFocusLost(evt);
}
}
public void keyPressed(java.awt.event.KeyEvent evt) {
}
public void keyReleased(java.awt.event.KeyEvent evt) {
}
public void keyTyped(java.awt.event.KeyEvent evt) {
if (evt.getSource() == tf_valor) {
ProveedorBuscarArticulo.this.tf_valorKeyTyped(evt);
}
}
public void mouseClicked(java.awt.event.MouseEvent evt) {
if (evt.getSource() == masterTable) {
ProveedorBuscarArticulo.this.masterTableMouseClicked(evt);
}
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
}
public void mouseExited(java.awt.event.MouseEvent evt) {
}
public void mousePressed(java.awt.event.MouseEvent evt) {
}
public void mouseReleased(java.awt.event.MouseEvent evt) {
}
}// </editor-fold>//GEN-END:initComponents
private void tf_valorKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tf_valorKeyTyped
// TODO add your handling code here:
if(list_filtros.getSelectedItem()=="Nombre" || list_filtros.getSelectedItem()=="Tipo"){
ch=evt.getKeyChar();
if(Character.isDigit(ch)){
getToolkit().beep();
evt.consume();
}
}else{
if(list_filtros.getSelectedItem()=="Código"){
ch=evt.getKeyChar();
if(!Character.isDigit(ch)){
getToolkit().beep();
evt.consume();
}
}
}
}//GEN-LAST:event_tf_valorKeyTyped
private void btn_buscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_buscarActionPerformed
// TODO add your handling code here:
if (tf_valor.getText().length()==0){
JOptionPane.showMessageDialog(null,"Ingrese algún valor para efectuar la búsqueda", "Advertencia",JOptionPane.ERROR_MESSAGE);
return;
}else{
if(list_filtros.getSelectedItem()=="Código"){
id=Integer.parseInt(tf_valor.getText());
query=entityManager.createNamedQuery( "Proveedor.findByCodigoProveedor");
query.setParameter("codigoProveedor", id);
List<Proveedor> p=query.getResultList();
if (p.isEmpty()){
JOptionPane.showMessageDialog(null,"Código inexistente", "Error",JOptionPane.ERROR_MESSAGE);
tf_valor.setText(null);
return;
}
list.clear();
list.addAll(p);
}
if(list_filtros.getSelectedItem()=="Nombre"){
query = entityManager.createNativeQuery( "SELECT * FROM proveedor WHERE razonSocial LIKE "
+"'%"+tf_valor.getText()+"%'", Proveedor.class);
List<Proveedor> p=query.getResultList();
if (p.size()==0){
JOptionPane.showMessageDialog(null,"Nombre de proveedor inexistente", "Error",JOptionPane.ERROR_MESSAGE);
tf_valor.setText(null);
return;
}
list.clear();
list.addAll(p);
}
if(list_filtros.getSelectedItem()=="Tipo"){
query = entityManager.createNativeQuery( "SELECT * FROM proveedor WHERE tipo LIKE "
+"'%"+tf_valor.getText()+"%'", Proveedor.class);
List<Proveedor> p=query.getResultList();
if (p.size()==0){
JOptionPane.showMessageDialog(null,"Tipo de Proveedor inexistente", "Error",JOptionPane.ERROR_MESSAGE);
tf_valor.setText(null);
return;
}
list.clear();
list.addAll(p);
}
}
}//GEN-LAST:event_btn_buscarActionPerformed
private void btn_buscarFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_btn_buscarFocusLost
// TODO add your handling code here:
tf_valor.setText(null);
}//GEN-LAST:event_btn_buscarFocusLost
/* public String devolverNombreProveedor (int codigo){
String nombre = null;
return (tf_razon);
}*/
private void btn_cancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_cancelarActionPerformed
// TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_btn_cancelarActionPerformed
private void masterTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_masterTableMouseClicked
/*fila=masterTable.getSelectedRow();
codigo=(Integer) masterTable.getValueAt(fila, 0);
nombre=(String)masterTable.getValueAt(fila, 2);*/
/* fila=masterTable.getSelectedRow();
codigo=(Integer) masterTable.getValueAt(fila, 0);
nombre=(String)masterTable.getValueAt(fila, 2);
JFrame fr= new ArticuloCreate();
ArticuloCreate.tf_codigoProveedor.setText(Integer.toString(codigo));
ArticuloCreate.tf_nombreproveedor.setText(nombre);
fr.setVisible(true);
fr.setTitle("Crear Articulo");
fr.setLocationRelativeTo(null);
fr.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setVisible(false);
*/
// TODO add your handling code here:
}//GEN-LAST:event_masterTableMouseClicked
public int getCodigo() {
return codigo;
}
public void setCodigo(int codigo) {
this.codigo = codigo;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btn_buscar;
private javax.swing.JButton btn_cancelar;
private javax.persistence.EntityManager entityManager;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextPane jTextPane1;
private javax.swing.JLabel lbl_buscarC;
private javax.swing.JLabel lbl_filtro;
private javax.swing.JLabel lbl_valor;
private java.util.List<bean.Proveedor> list;
private javax.swing.JComboBox list_filtros;
private javax.swing.JScrollPane masterScrollPane;
public javax.swing.JTable masterTable;
private javax.persistence.Query query;
private javax.swing.JTextField tf_valor;
private org.jdesktop.beansbinding.BindingGroup bindingGroup;
// End of variables declaration//GEN-END:variables
public static void main(String[] args) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(ProveedorBuscarArticulo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(ProveedorBuscarArticulo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(ProveedorBuscarArticulo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(ProveedorBuscarArticulo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
// EventQueue.invokeLater(new Runnable() {
java.awt.EventQueue.invokeLater(new Runnable(){
public void run() {
JFrame frame=new ProveedorBuscarArticulo();
frame.setVisible(true);
frame.setTitle("Buscar Proveedor");
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}
});
}
}
| [
"elypekis@gmail.com"
] | elypekis@gmail.com |
f1ae38dbc54ac32657d99f013e2e8570dd794ad7 | d0a04172dd26728b37e2b6f2889c774f8a1e88b5 | /src/Aggregator/Orders.java | f5f54a9632a223f16d2ee1aacd6f7447e47078f8 | [] | no_license | jpugs1527/Basic-Restaurant-System | 42afd971445ea12ea1d91c1d4b33728b5bb09c8b | 033c2ae868bf9ffc7cdf62bc3d9c00dc9b469f90 | refs/heads/master | 2020-04-03T14:09:44.883848 | 2018-11-01T02:01:18 | 2018-11-01T02:01:18 | 155,313,060 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,106 | java | package Aggregator;
public class Orders {
private OrderItem[] order_items;
private int current;
public Orders() {
order_items = new OrderItem[10];
initOrders();
}
// public Orders(Orders otherOrder) {
// System.arraycopy(otherOrder.order_items, 0, order_items, 0, order_items.length);
// }
public void addOrder(OrderItem order) {
order_items[findAvailIndex()] = order;
}
public void reset() {
current = 0;
}
public boolean hasNext() {
if (current == order_items.length - 1) {
return false;
}
return order_items[current + 1] != null;
}
public OrderItem getNextOrder() {
return order_items[current++];
}
// private methods
private void initOrders() {
for (int i = 0; i < order_items.length; i++) {
order_items[i] = null;
}
}
private int findAvailIndex() {
int i = 0;
while (order_items[i] != null) {
i++;
}
return i;
}
}
| [
"jpugs1527@yahoo.com"
] | jpugs1527@yahoo.com |
c2022e6eb0a303b2d6b998f98af9f6dc8e768287 | 60b010eabd85d21968727276080d2f4a5394612f | /rpc/grpc/src/main/java/com/bruce/grpc/lib/device/booleanReply.java | a636f5f10c44dbba07edd28f8ecee0d0084a45f2 | [] | no_license | BruceWhiteBai/bruceBoot | ae4eed48ff6762b34b62d366cf0e54c26f4d1dc7 | 0e2212b665094c985c85d80932ea9d62754927a4 | refs/heads/master | 2022-11-27T02:13:59.708305 | 2019-12-06T10:13:37 | 2019-12-06T10:13:37 | 143,003,062 | 0 | 1 | null | 2022-11-16T12:22:39 | 2018-07-31T11:06:40 | Java | UTF-8 | Java | false | true | 15,756 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: device.proto
package com.bruce.grpc.lib.device;
/**
* <pre>
* The response message
* </pre>
*
* Protobuf type {@code device.booleanReply}
*/
public final class booleanReply extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:device.booleanReply)
booleanReplyOrBuilder {
private static final long serialVersionUID = 0L;
// Use booleanReply.newBuilder() to construct.
private booleanReply(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private booleanReply() {
reply_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private booleanReply(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
reply_ = input.readBool();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.bruce.grpc.lib.device.DeviceFixProto.internal_static_device_booleanReply_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.bruce.grpc.lib.device.DeviceFixProto.internal_static_device_booleanReply_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.bruce.grpc.lib.device.booleanReply.class, com.bruce.grpc.lib.device.booleanReply.Builder.class);
}
public static final int REPLY_FIELD_NUMBER = 1;
private boolean reply_;
/**
* <code>bool reply = 1;</code>
*/
public boolean getReply() {
return reply_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (reply_ != false) {
output.writeBool(1, reply_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (reply_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, reply_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.bruce.grpc.lib.device.booleanReply)) {
return super.equals(obj);
}
com.bruce.grpc.lib.device.booleanReply other = (com.bruce.grpc.lib.device.booleanReply) obj;
boolean result = true;
result = result && (getReply()
== other.getReply());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REPLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReply());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.bruce.grpc.lib.device.booleanReply parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.bruce.grpc.lib.device.booleanReply parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.bruce.grpc.lib.device.booleanReply parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.bruce.grpc.lib.device.booleanReply prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* The response message
* </pre>
*
* Protobuf type {@code device.booleanReply}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:device.booleanReply)
com.bruce.grpc.lib.device.booleanReplyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.bruce.grpc.lib.device.DeviceFixProto.internal_static_device_booleanReply_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.bruce.grpc.lib.device.DeviceFixProto.internal_static_device_booleanReply_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.bruce.grpc.lib.device.booleanReply.class, com.bruce.grpc.lib.device.booleanReply.Builder.class);
}
// Construct using com.bruce.grpc.lib.device.booleanReply.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
reply_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.bruce.grpc.lib.device.DeviceFixProto.internal_static_device_booleanReply_descriptor;
}
@java.lang.Override
public com.bruce.grpc.lib.device.booleanReply getDefaultInstanceForType() {
return com.bruce.grpc.lib.device.booleanReply.getDefaultInstance();
}
@java.lang.Override
public com.bruce.grpc.lib.device.booleanReply build() {
com.bruce.grpc.lib.device.booleanReply result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.bruce.grpc.lib.device.booleanReply buildPartial() {
com.bruce.grpc.lib.device.booleanReply result = new com.bruce.grpc.lib.device.booleanReply(this);
result.reply_ = reply_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.bruce.grpc.lib.device.booleanReply) {
return mergeFrom((com.bruce.grpc.lib.device.booleanReply)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.bruce.grpc.lib.device.booleanReply other) {
if (other == com.bruce.grpc.lib.device.booleanReply.getDefaultInstance()) return this;
if (other.getReply() != false) {
setReply(other.getReply());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.bruce.grpc.lib.device.booleanReply parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.bruce.grpc.lib.device.booleanReply) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean reply_ ;
/**
* <code>bool reply = 1;</code>
*/
public boolean getReply() {
return reply_;
}
/**
* <code>bool reply = 1;</code>
*/
public Builder setReply(boolean value) {
reply_ = value;
onChanged();
return this;
}
/**
* <code>bool reply = 1;</code>
*/
public Builder clearReply() {
reply_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:device.booleanReply)
}
// @@protoc_insertion_point(class_scope:device.booleanReply)
private static final com.bruce.grpc.lib.device.booleanReply DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.bruce.grpc.lib.device.booleanReply();
}
public static com.bruce.grpc.lib.device.booleanReply getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<booleanReply>
PARSER = new com.google.protobuf.AbstractParser<booleanReply>() {
@java.lang.Override
public booleanReply parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new booleanReply(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<booleanReply> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<booleanReply> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.bruce.grpc.lib.device.booleanReply getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
| [
"1258444549@qq.com"
] | 1258444549@qq.com |
9dc29722bcf3471a786fcacbf73fd60aa1e90cf7 | e366d11a55555fbe267a69cc7e49c8c04c878581 | /SpringCore&AOP/SpringQ1/src/com/au/spring/DrawingApplication.java | 2a23b550c9f6498a292a46f1d8331bf291608b1d | [] | no_license | Himanisharmaaccolite/SAU-2021-Jan-Batch-Delhi | 749636c0e0e1f6f63e2a7ffc62c5949f61d4f0f6 | 6a5b2736a6770c58cdb9bee95ad122cb24c739d4 | refs/heads/main | 2023-02-26T03:12:39.040381 | 2021-02-01T09:19:14 | 2021-02-01T09:19:14 | 328,726,723 | 0 | 0 | null | 2021-01-11T16:35:32 | 2021-01-11T16:35:31 | null | UTF-8 | Java | false | false | 463 | java | package com.au.spring;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public class DrawingApplication {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Triangle t = new Triangle();
ApplicationContext factory = new FileSystemXmlApplicationContext("spring.xml");
Student s1 = (Student) factory.getBean("StudentBean");
s1.show();
}
}
| [
"sharma.himani@accolitedigital.com"
] | sharma.himani@accolitedigital.com |
b3b6305f97bfa459da55c92ab9bf05d64281ee5c | 2d92ec76154baf08ab8b265fd533ea0457a241f8 | /src/main/java/com/theme/repository/CategoriesRepository.java | 880f20df7c49b38067a2ad75100fb5f663f8b50f | [] | no_license | mdtofayel/shadowhite | d913f5e0305bf81536e8b9d2b93a314d7dc749d3 | de7403121353a3c3a71bfc571719dcd7bd3a9997 | refs/heads/master | 2022-11-19T23:13:07.691226 | 2020-07-22T11:58:35 | 2020-07-22T11:58:35 | 281,577,691 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 630 | java | package com.theme.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.theme.domain.Categories;
@Repository("categoriesRepository")
public interface CategoriesRepository extends JpaRepository<Categories,Integer> {
Categories findById(Integer id);
Categories findByName(String name);
@Query(
value = "SELECT name FROM categories",
nativeQuery=true
)
Optional<List<String>> findAllName();
}
| [
"tofayel35-499@diu.edu.bd"
] | tofayel35-499@diu.edu.bd |
696f3ce9a4da3f4213ddf46589bbae341ce0fc14 | aa6997aba1475b414c1688c9acb482ebf06511d9 | /src/com/sun/corba/se/spi/ior/ObjectAdapterId.java | 49624afdef26bcae8a96ecf4a198ddc884ea4507 | [] | no_license | yueny/JDKSource1.8 | eefb5bc88b80ae065db4bc63ac4697bd83f1383e | b88b99265ecf7a98777dd23bccaaff8846baaa98 | refs/heads/master | 2021-06-28T00:47:52.426412 | 2020-12-17T13:34:40 | 2020-12-17T13:34:40 | 196,523,101 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | /*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.corba.se.spi.ior;
import java.util.Iterator;
/**
* This is the object adapter ID for an object adapter.
* Typically this is the path of strings starting from the
* Root POA to get to a POA, but other implementations are possible.
*/
public interface ObjectAdapterId extends Writeable {
/**
* Return the number of elements in the adapter ID.
*/
int getNumLevels();
/**
* Return an iterator that iterates over the components
* of this adapter ID. Each element is returned as a String.
*/
Iterator iterator();
/**
* Get the adapter name simply as an array of strings.
*/
String[] getAdapterName();
}
| [
"yueny09@163.com"
] | yueny09@163.com |
e86ea2ba16fda1c5d0a7224eec689288d900dc45 | 4efd8eb091503035dc4c657d9ffe527b45add592 | /ju_2nd_year/Second Sem/java1/q5.java | 488b963dba5e8dd2cf07c1e60958ca9b1aec39db | [] | no_license | TheSYNcoder/jucse_prac | 9e59f559310303a9b68836ed58444f73de412252 | 3de84bdd65af3919ed05245ff91ba517460c5afa | refs/heads/master | 2022-12-23T20:19:55.437975 | 2021-06-08T04:56:04 | 2021-06-08T04:56:04 | 148,623,407 | 0 | 2 | null | 2022-12-14T01:51:10 | 2018-09-13T10:42:47 | JavaScript | UTF-8 | Java | false | false | 456 | java | import java.util.*;
class Test{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
System.out.println("Enter the string 1 and string 2 : ");
String a = in.nextLine();
String b = in.nextLine();
boolean res1 = a == b;
boolean res2 = a.equals(b);
System.out.println("a == b :" + res1 );
System.out.println("a.equals(b) :" + res2 );
}
}
| [
"shuvayan@Shuvayans-MacBook-Air.local"
] | shuvayan@Shuvayans-MacBook-Air.local |
34c3839b16cd19f45e739d861044339663f7de1f | 17fe8876edbda43f8b102c280d831deb362eb19b | /src/generated/SQLListener.java | eefb21085d5ca33c9b50dee184e40f69e0ed6ab6 | [] | no_license | alaa-alkheder/Compiler1 | ed2841b14e307f1d802dd96fbb2974dcd77c7eb8 | 4d409b704465323306b496f047c90a3c63d71455 | refs/heads/master | 2021-08-17T19:25:23.331646 | 2020-12-04T17:14:42 | 2020-12-04T17:14:42 | 231,866,038 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 44,527 | java | // Generated from C:/Users/Eng Alaa Alkheder/IdeaProjects/Compiler\SQL.g4 by ANTLR 4.7.2
package generated;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link SQLParser}.
*/
public interface SQLListener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link SQLParser#parse}.
* @param ctx the parse tree
*/
void enterParse(SQLParser.ParseContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#parse}.
* @param ctx the parse tree
*/
void exitParse(SQLParser.ParseContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#error}.
* @param ctx the parse tree
*/
void enterError(SQLParser.ErrorContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#error}.
* @param ctx the parse tree
*/
void exitError(SQLParser.ErrorContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#sql_stmt_list}.
* @param ctx the parse tree
*/
void enterSql_stmt_list(SQLParser.Sql_stmt_listContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#sql_stmt_list}.
* @param ctx the parse tree
*/
void exitSql_stmt_list(SQLParser.Sql_stmt_listContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#sql_stmt}.
* @param ctx the parse tree
*/
void enterSql_stmt(SQLParser.Sql_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#sql_stmt}.
* @param ctx the parse tree
*/
void exitSql_stmt(SQLParser.Sql_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#stat_forloop}.
* @param ctx the parse tree
*/
void enterStat_forloop(SQLParser.Stat_forloopContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#stat_forloop}.
* @param ctx the parse tree
*/
void exitStat_forloop(SQLParser.Stat_forloopContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#json_st}.
* @param ctx the parse tree
*/
void enterJson_st(SQLParser.Json_stContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#json_st}.
* @param ctx the parse tree
*/
void exitJson_st(SQLParser.Json_stContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#json_atmt}.
* @param ctx the parse tree
*/
void enterJson_atmt(SQLParser.Json_atmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#json_atmt}.
* @param ctx the parse tree
*/
void exitJson_atmt(SQLParser.Json_atmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#higer_order_function_stmt_head}.
* @param ctx the parse tree
*/
void enterHiger_order_function_stmt_head(SQLParser.Higer_order_function_stmt_headContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#higer_order_function_stmt_head}.
*
* @param ctx the parse tree
*/
void exitHiger_order_function_stmt_head(SQLParser.Higer_order_function_stmt_headContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#higer_order_function_stmt}.
* @param ctx the parse tree
*/
void enterHiger_order_function_stmt(SQLParser.Higer_order_function_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#higer_order_function_stmt}.
* @param ctx the parse tree
*/
void exitHiger_order_function_stmt(SQLParser.Higer_order_function_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#x}.
*
* @param ctx the parse tree
*/
void enterX(SQLParser.XContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#x}.
*
* @param ctx the parse tree
*/
void exitX(SQLParser.XContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#arr_stmt}.
* @param ctx the parse tree
*/
void enterArr_stmt(SQLParser.Arr_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#arr_stmt}.
* @param ctx the parse tree
*/
void exitArr_stmt(SQLParser.Arr_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#var_stmt}.
* @param ctx the parse tree
*/
void enterVar_stmt(SQLParser.Var_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#var_stmt}.
* @param ctx the parse tree
*/
void exitVar_stmt(SQLParser.Var_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#var_body}.
* @param ctx the parse tree
*/
void enterVar_body(SQLParser.Var_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#var_body}.
* @param ctx the parse tree
*/
void exitVar_body(SQLParser.Var_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#print_stmt}.
* @param ctx the parse tree
*/
void enterPrint_stmt(SQLParser.Print_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#print_stmt}.
* @param ctx the parse tree
*/
void exitPrint_stmt(SQLParser.Print_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#call_array}.
*
* @param ctx the parse tree
*/
void enterCall_array(SQLParser.Call_arrayContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#call_array}.
*
* @param ctx the parse tree
*/
void exitCall_array(SQLParser.Call_arrayContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#call_json}.
*
* @param ctx the parse tree
*/
void enterCall_json(SQLParser.Call_jsonContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#call_json}.
*
* @param ctx the parse tree
*/
void exitCall_json(SQLParser.Call_jsonContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#print_body}.
*
* @param ctx the parse tree
*/
void enterPrint_body(SQLParser.Print_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#print_body}.
*
* @param ctx the parse tree
*/
void exitPrint_body(SQLParser.Print_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#function_head}.
* @param ctx the parse tree
*/
void enterFunction_head(SQLParser.Function_headContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#function_head}.
* @param ctx the parse tree
*/
void exitFunction_head(SQLParser.Function_headContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#function_body}.
* @param ctx the parse tree
*/
void enterFunction_body(SQLParser.Function_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#function_body}.
* @param ctx the parse tree
*/
void exitFunction_body(SQLParser.Function_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#function_stmt}.
* @param ctx the parse tree
*/
void enterFunction_stmt(SQLParser.Function_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#function_stmt}.
* @param ctx the parse tree
*/
void exitFunction_stmt(SQLParser.Function_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#function_call_stmt}.
* @param ctx the parse tree
*/
void enterFunction_call_stmt(SQLParser.Function_call_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#function_call_stmt}.
* @param ctx the parse tree
*/
void exitFunction_call_stmt(SQLParser.Function_call_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#params_stmt}.
* @param ctx the parse tree
*/
void enterParams_stmt(SQLParser.Params_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#params_stmt}.
* @param ctx the parse tree
*/
void exitParams_stmt(SQLParser.Params_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#arguments_body_defult_paremeter}.
*
* @param ctx the parse tree
*/
void enterArguments_body_defult_paremeter(SQLParser.Arguments_body_defult_paremeterContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#arguments_body_defult_paremeter}.
*
* @param ctx the parse tree
*/
void exitArguments_body_defult_paremeter(SQLParser.Arguments_body_defult_paremeterContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#arguments_body}.
*
* @param ctx the parse tree
*/
void enterArguments_body(SQLParser.Arguments_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#arguments_body}.
* @param ctx the parse tree
*/
void exitArguments_body(SQLParser.Arguments_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#arguments_stmt}.
* @param ctx the parse tree
*/
void enterArguments_stmt(SQLParser.Arguments_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#arguments_stmt}.
*
* @param ctx the parse tree
*/
void exitArguments_stmt(SQLParser.Arguments_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#loop_Bady}.
*
* @param ctx the parse tree
*/
void enterLoop_Bady(SQLParser.Loop_BadyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#loop_Bady}.
*
* @param ctx the parse tree
*/
void exitLoop_Bady(SQLParser.Loop_BadyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#increment}.
*
* @param ctx the parse tree
*/
void enterIncrement(SQLParser.IncrementContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#increment}.
* @param ctx the parse tree
*/
void exitIncrement(SQLParser.IncrementContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#for_stmt}.
* @param ctx the parse tree
*/
void enterFor_stmt(SQLParser.For_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#for_stmt}.
* @param ctx the parse tree
*/
void exitFor_stmt(SQLParser.For_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#do_while_stmt}.
* @param ctx the parse tree
*/
void enterDo_while_stmt(SQLParser.Do_while_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#do_while_stmt}.
* @param ctx the parse tree
*/
void exitDo_while_stmt(SQLParser.Do_while_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#while_stmt}.
* @param ctx the parse tree
*/
void enterWhile_stmt(SQLParser.While_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#while_stmt}.
* @param ctx the parse tree
*/
void exitWhile_stmt(SQLParser.While_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#condition_block}.
* @param ctx the parse tree
*/
void enterCondition_block(SQLParser.Condition_blockContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#condition_block}.
*
* @param ctx the parse tree
*/
void exitCondition_block(SQLParser.Condition_blockContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_body}.
*
* @param ctx the parse tree
*/
void enterIf_body(SQLParser.If_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_body}.
* @param ctx the parse tree
*/
void exitIf_body(SQLParser.If_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_else_if}.
*
* @param ctx the parse tree
*/
void enterIf_else_if(SQLParser.If_else_ifContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_else_if}.
*
* @param ctx the parse tree
*/
void exitIf_else_if(SQLParser.If_else_ifContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_else}.
* @param ctx the parse tree
*/
void enterIf_else(SQLParser.If_elseContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_else}.
* @param ctx the parse tree
*/
void exitIf_else(SQLParser.If_elseContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_stmt}.
* @param ctx the parse tree
*/
void enterIf_stmt(SQLParser.If_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_stmt}.
* @param ctx the parse tree
*/
void exitIf_stmt(SQLParser.If_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_stmt_short}.
* @param ctx the parse tree
*/
void enterIf_stmt_short(SQLParser.If_stmt_shortContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_stmt_short}.
* @param ctx the parse tree
*/
void exitIf_stmt_short(SQLParser.If_stmt_shortContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_stmt_short_head}.
* @param ctx the parse tree
*/
void enterIf_stmt_short_head(SQLParser.If_stmt_short_headContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_stmt_short_head}.
* @param ctx the parse tree
*/
void exitIf_stmt_short_head(SQLParser.If_stmt_short_headContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#if_stmt_short_body}.
* @param ctx the parse tree
*/
void enterIf_stmt_short_body(SQLParser.If_stmt_short_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#if_stmt_short_body}.
* @param ctx the parse tree
*/
void exitIf_stmt_short_body(SQLParser.If_stmt_short_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#switch_stmt}.
* @param ctx the parse tree
*/
void enterSwitch_stmt(SQLParser.Switch_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#switch_stmt}.
* @param ctx the parse tree
*/
void exitSwitch_stmt(SQLParser.Switch_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#case_stmt}.
* @param ctx the parse tree
*/
void enterCase_stmt(SQLParser.Case_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#case_stmt}.
* @param ctx the parse tree
*/
void exitCase_stmt(SQLParser.Case_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#return_stmt}.
* @param ctx the parse tree
*/
void enterReturn_stmt(SQLParser.Return_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#return_stmt}.
*
* @param ctx the parse tree
*/
void exitReturn_stmt(SQLParser.Return_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#array1}.
* @param ctx the parse tree
*/
void enterArray1(SQLParser.Array1Context ctx);
/**
* Exit a parse tree produced by {@link SQLParser#array1}.
* @param ctx the parse tree
*/
void exitArray1(SQLParser.Array1Context ctx);
/**
* Enter a parse tree produced by {@link SQLParser#one_line_instruction}.
* @param ctx the parse tree
*/
void enterOne_line_instruction(SQLParser.One_line_instructionContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#one_line_instruction}.
* @param ctx the parse tree
*/
void exitOne_line_instruction(SQLParser.One_line_instructionContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_op0}.
* @param ctx the parse tree
*/
void enterMath_op0(SQLParser.Math_op0Context ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_op0}.
* @param ctx the parse tree
*/
void exitMath_op0(SQLParser.Math_op0Context ctx);
/**
* Enter a parse tree produced by {@link SQLParser#identifier}.
* @param ctx the parse tree
*/
void enterIdentifier(SQLParser.IdentifierContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#identifier}.
* @param ctx the parse tree
*/
void exitIdentifier(SQLParser.IdentifierContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr_Add_one}.
* @param ctx the parse tree
*/
void enterMath_expr_Add_one(SQLParser.Math_expr_Add_oneContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr_Add_one}.
* @param ctx the parse tree
*/
void exitMath_expr_Add_one(SQLParser.Math_expr_Add_oneContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr_Add_one_increment}.
* @param ctx the parse tree
*/
void enterMath_expr_Add_one_increment(SQLParser.Math_expr_Add_one_incrementContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr_Add_one_increment}.
* @param ctx the parse tree
*/
void exitMath_expr_Add_one_increment(SQLParser.Math_expr_Add_one_incrementContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr_Add_one_dencrement}.
* @param ctx the parse tree
*/
void enterMath_expr_Add_one_dencrement(SQLParser.Math_expr_Add_one_dencrementContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr_Add_one_dencrement}.
* @param ctx the parse tree
*/
void exitMath_expr_Add_one_dencrement(SQLParser.Math_expr_Add_one_dencrementContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#alter_table_stmt}.
* @param ctx the parse tree
*/
void enterAlter_table_stmt(SQLParser.Alter_table_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#alter_table_stmt}.
* @param ctx the parse tree
*/
void exitAlter_table_stmt(SQLParser.Alter_table_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#alter_table_add_constraint}.
* @param ctx the parse tree
*/
void enterAlter_table_add_constraint(SQLParser.Alter_table_add_constraintContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#alter_table_add_constraint}.
* @param ctx the parse tree
*/
void exitAlter_table_add_constraint(SQLParser.Alter_table_add_constraintContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#alter_table_add}.
* @param ctx the parse tree
*/
void enterAlter_table_add(SQLParser.Alter_table_addContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#alter_table_add}.
* @param ctx the parse tree
*/
void exitAlter_table_add(SQLParser.Alter_table_addContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#create_table_stmt}.
* @param ctx the parse tree
*/
void enterCreate_table_stmt(SQLParser.Create_table_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#create_table_stmt}.
* @param ctx the parse tree
*/
void exitCreate_table_stmt(SQLParser.Create_table_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#delete_stmt}.
* @param ctx the parse tree
*/
void enterDelete_stmt(SQLParser.Delete_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#delete_stmt}.
* @param ctx the parse tree
*/
void exitDelete_stmt(SQLParser.Delete_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#drop_table_stmt}.
* @param ctx the parse tree
*/
void enterDrop_table_stmt(SQLParser.Drop_table_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#drop_table_stmt}.
* @param ctx the parse tree
*/
void exitDrop_table_stmt(SQLParser.Drop_table_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#factored_select_stmt}.
* @param ctx the parse tree
*/
void enterFactored_select_stmt(SQLParser.Factored_select_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#factored_select_stmt}.
* @param ctx the parse tree
*/
void exitFactored_select_stmt(SQLParser.Factored_select_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#insert_stmt}.
* @param ctx the parse tree
*/
void enterInsert_stmt(SQLParser.Insert_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#insert_stmt}.
* @param ctx the parse tree
*/
void exitInsert_stmt(SQLParser.Insert_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#select_stmt}.
* @param ctx the parse tree
*/
void enterSelect_stmt(SQLParser.Select_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#select_stmt}.
* @param ctx the parse tree
*/
void exitSelect_stmt(SQLParser.Select_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#select_or_values}.
* @param ctx the parse tree
*/
void enterSelect_or_values(SQLParser.Select_or_valuesContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#select_or_values}.
*
* @param ctx the parse tree
*/
void exitSelect_or_values(SQLParser.Select_or_valuesContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#call_expr}.
* @param ctx the parse tree
*/
void enterCall_expr(SQLParser.Call_exprContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#call_expr}.
* @param ctx the parse tree
*/
void exitCall_expr(SQLParser.Call_exprContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#update_stmt}.
* @param ctx the parse tree
*/
void enterUpdate_stmt(SQLParser.Update_stmtContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#update_stmt}.
* @param ctx the parse tree
*/
void exitUpdate_stmt(SQLParser.Update_stmtContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_def}.
* @param ctx the parse tree
*/
void enterColumn_def(SQLParser.Column_defContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_def}.
* @param ctx the parse tree
*/
void exitColumn_def(SQLParser.Column_defContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#type_name}.
*
* @param ctx the parse tree
*/
void enterType_name(SQLParser.Type_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#type_name}.
*
* @param ctx the parse tree
*/
void exitType_name(SQLParser.Type_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#type_name_value}.
* @param ctx the parse tree
*/
void enterType_name_value(SQLParser.Type_name_valueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#type_name_value}.
* @param ctx the parse tree
*/
void exitType_name_value(SQLParser.Type_name_valueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_constraint}.
* @param ctx the parse tree
*/
void enterColumn_constraint(SQLParser.Column_constraintContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_constraint}.
* @param ctx the parse tree
*/
void exitColumn_constraint(SQLParser.Column_constraintContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_constraint_primary_key}.
* @param ctx the parse tree
*/
void enterColumn_constraint_primary_key(SQLParser.Column_constraint_primary_keyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_constraint_primary_key}.
* @param ctx the parse tree
*/
void exitColumn_constraint_primary_key(SQLParser.Column_constraint_primary_keyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_constraint_foreign_key}.
* @param ctx the parse tree
*/
void enterColumn_constraint_foreign_key(SQLParser.Column_constraint_foreign_keyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_constraint_foreign_key}.
* @param ctx the parse tree
*/
void exitColumn_constraint_foreign_key(SQLParser.Column_constraint_foreign_keyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_constraint_not_null}.
* @param ctx the parse tree
*/
void enterColumn_constraint_not_null(SQLParser.Column_constraint_not_nullContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_constraint_not_null}.
* @param ctx the parse tree
*/
void exitColumn_constraint_not_null(SQLParser.Column_constraint_not_nullContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_constraint_null}.
* @param ctx the parse tree
*/
void enterColumn_constraint_null(SQLParser.Column_constraint_nullContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_constraint_null}.
* @param ctx the parse tree
*/
void exitColumn_constraint_null(SQLParser.Column_constraint_nullContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_default}.
* @param ctx the parse tree
*/
void enterColumn_default(SQLParser.Column_defaultContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_default}.
* @param ctx the parse tree
*/
void exitColumn_default(SQLParser.Column_defaultContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_default_value}.
*
* @param ctx the parse tree
*/
void enterColumn_default_value(SQLParser.Column_default_valueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_default_value}.
*
* @param ctx the parse tree
*/
void exitColumn_default_value(SQLParser.Column_default_valueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#array_json}.
*
* @param ctx the parse tree
*/
void enterArray_json(SQLParser.Array_jsonContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#array_json}.
*
* @param ctx the parse tree
*/
void exitArray_json(SQLParser.Array_jsonContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#expr_condition}.
*
* @param ctx the parse tree
*/
void enterExpr_condition(SQLParser.Expr_conditionContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#expr_condition}.
*
* @param ctx the parse tree
*/
void exitExpr_condition(SQLParser.Expr_conditionContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr_EQ}.
*
* @param ctx the parse tree
*/
void enterMath_expr_EQ(SQLParser.Math_expr_EQContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr_EQ}.
*
* @param ctx the parse tree
*/
void exitMath_expr_EQ(SQLParser.Math_expr_EQContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr}.
*
* @param ctx the parse tree
*/
void enterMath_expr(SQLParser.Math_exprContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr}.
*
* @param ctx the parse tree
*/
void exitMath_expr(SQLParser.Math_exprContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#math_expr_logic}.
* @param ctx the parse tree
*/
void enterMath_expr_logic(SQLParser.Math_expr_logicContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#math_expr_logic}.
*
* @param ctx the parse tree
*/
void exitMath_expr_logic(SQLParser.Math_expr_logicContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#expr}.
*
* @param ctx the parse tree
*/
void enterExpr(SQLParser.ExprContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#expr}.
* @param ctx the parse tree
*/
void exitExpr(SQLParser.ExprContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#foreign_key_clause_value}.
* @param ctx the parse tree
*/
void enterForeign_key_clause_value(SQLParser.Foreign_key_clause_valueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#foreign_key_clause_value}.
* @param ctx the parse tree
*/
void exitForeign_key_clause_value(SQLParser.Foreign_key_clause_valueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#foreign_key_clause}.
* @param ctx the parse tree
*/
void enterForeign_key_clause(SQLParser.Foreign_key_clauseContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#foreign_key_clause}.
* @param ctx the parse tree
*/
void exitForeign_key_clause(SQLParser.Foreign_key_clauseContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#fk_target_column_name}.
* @param ctx the parse tree
*/
void enterFk_target_column_name(SQLParser.Fk_target_column_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#fk_target_column_name}.
* @param ctx the parse tree
*/
void exitFk_target_column_name(SQLParser.Fk_target_column_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#indexed_column}.
* @param ctx the parse tree
*/
void enterIndexed_column(SQLParser.Indexed_columnContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#indexed_column}.
* @param ctx the parse tree
*/
void exitIndexed_column(SQLParser.Indexed_columnContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_constraint}.
* @param ctx the parse tree
*/
void enterTable_constraint(SQLParser.Table_constraintContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_constraint}.
* @param ctx the parse tree
*/
void exitTable_constraint(SQLParser.Table_constraintContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_constraint_primary_key}.
* @param ctx the parse tree
*/
void enterTable_constraint_primary_key(SQLParser.Table_constraint_primary_keyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_constraint_primary_key}.
* @param ctx the parse tree
*/
void exitTable_constraint_primary_key(SQLParser.Table_constraint_primary_keyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_constraint_foreign_key}.
* @param ctx the parse tree
*/
void enterTable_constraint_foreign_key(SQLParser.Table_constraint_foreign_keyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_constraint_foreign_key}.
* @param ctx the parse tree
*/
void exitTable_constraint_foreign_key(SQLParser.Table_constraint_foreign_keyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_constraint_unique}.
* @param ctx the parse tree
*/
void enterTable_constraint_unique(SQLParser.Table_constraint_uniqueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_constraint_unique}.
* @param ctx the parse tree
*/
void exitTable_constraint_unique(SQLParser.Table_constraint_uniqueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_constraint_key}.
* @param ctx the parse tree
*/
void enterTable_constraint_key(SQLParser.Table_constraint_keyContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_constraint_key}.
* @param ctx the parse tree
*/
void exitTable_constraint_key(SQLParser.Table_constraint_keyContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#fk_origin_column_name}.
* @param ctx the parse tree
*/
void enterFk_origin_column_name(SQLParser.Fk_origin_column_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#fk_origin_column_name}.
* @param ctx the parse tree
*/
void exitFk_origin_column_name(SQLParser.Fk_origin_column_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#qualified_table_name}.
* @param ctx the parse tree
*/
void enterQualified_table_name(SQLParser.Qualified_table_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#qualified_table_name}.
* @param ctx the parse tree
*/
void exitQualified_table_name(SQLParser.Qualified_table_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#ordering_term}.
* @param ctx the parse tree
*/
void enterOrdering_term(SQLParser.Ordering_termContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#ordering_term}.
* @param ctx the parse tree
*/
void exitOrdering_term(SQLParser.Ordering_termContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#pragma_value}.
* @param ctx the parse tree
*/
void enterPragma_value(SQLParser.Pragma_valueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#pragma_value}.
* @param ctx the parse tree
*/
void exitPragma_value(SQLParser.Pragma_valueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#common_table_expression}.
* @param ctx the parse tree
*/
void enterCommon_table_expression(SQLParser.Common_table_expressionContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#common_table_expression}.
* @param ctx the parse tree
*/
void exitCommon_table_expression(SQLParser.Common_table_expressionContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#result_column}.
* @param ctx the parse tree
*/
void enterResult_column(SQLParser.Result_columnContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#result_column}.
* @param ctx the parse tree
*/
void exitResult_column(SQLParser.Result_columnContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_or_subquery}.
* @param ctx the parse tree
*/
void enterTable_or_subquery(SQLParser.Table_or_subqueryContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_or_subquery}.
* @param ctx the parse tree
*/
void exitTable_or_subquery(SQLParser.Table_or_subqueryContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#join_clause}.
* @param ctx the parse tree
*/
void enterJoin_clause(SQLParser.Join_clauseContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#join_clause}.
* @param ctx the parse tree
*/
void exitJoin_clause(SQLParser.Join_clauseContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#join_operator}.
* @param ctx the parse tree
*/
void enterJoin_operator(SQLParser.Join_operatorContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#join_operator}.
* @param ctx the parse tree
*/
void exitJoin_operator(SQLParser.Join_operatorContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#join_constraint}.
* @param ctx the parse tree
*/
void enterJoin_constraint(SQLParser.Join_constraintContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#join_constraint}.
*
* @param ctx the parse tree
*/
void exitJoin_constraint(SQLParser.Join_constraintContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#select_core}.
*
* @param ctx the parse tree
*/
void enterSelect_core(SQLParser.Select_coreContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#select_core}.
*
* @param ctx the parse tree
*/
void exitSelect_core(SQLParser.Select_coreContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#group_expr}.
*
* @param ctx the parse tree
*/
void enterGroup_expr(SQLParser.Group_exprContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#group_expr}.
* @param ctx the parse tree
*/
void exitGroup_expr(SQLParser.Group_exprContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#values_selectCore}.
* @param ctx the parse tree
*/
void enterValues_selectCore(SQLParser.Values_selectCoreContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#values_selectCore}.
* @param ctx the parse tree
*/
void exitValues_selectCore(SQLParser.Values_selectCoreContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#cte_table_name}.
* @param ctx the parse tree
*/
void enterCte_table_name(SQLParser.Cte_table_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#cte_table_name}.
* @param ctx the parse tree
*/
void exitCte_table_name(SQLParser.Cte_table_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#signed_number}.
* @param ctx the parse tree
*/
void enterSigned_number(SQLParser.Signed_numberContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#signed_number}.
* @param ctx the parse tree
*/
void exitSigned_number(SQLParser.Signed_numberContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#literal_value}.
* @param ctx the parse tree
*/
void enterLiteral_value(SQLParser.Literal_valueContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#literal_value}.
* @param ctx the parse tree
*/
void exitLiteral_value(SQLParser.Literal_valueContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#unary_operator}.
* @param ctx the parse tree
*/
void enterUnary_operator(SQLParser.Unary_operatorContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#unary_operator}.
* @param ctx the parse tree
*/
void exitUnary_operator(SQLParser.Unary_operatorContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#error_message}.
* @param ctx the parse tree
*/
void enterError_message(SQLParser.Error_messageContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#error_message}.
* @param ctx the parse tree
*/
void exitError_message(SQLParser.Error_messageContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#module_argument}.
* @param ctx the parse tree
*/
void enterModule_argument(SQLParser.Module_argumentContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#module_argument}.
* @param ctx the parse tree
*/
void exitModule_argument(SQLParser.Module_argumentContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_alias}.
* @param ctx the parse tree
*/
void enterColumn_alias(SQLParser.Column_aliasContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_alias}.
* @param ctx the parse tree
*/
void exitColumn_alias(SQLParser.Column_aliasContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#keyword}.
* @param ctx the parse tree
*/
void enterKeyword(SQLParser.KeywordContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#keyword}.
* @param ctx the parse tree
*/
void exitKeyword(SQLParser.KeywordContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#name}.
* @param ctx the parse tree
*/
void enterName(SQLParser.NameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#name}.
* @param ctx the parse tree
*/
void exitName(SQLParser.NameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#function_name}.
* @param ctx the parse tree
*/
void enterFunction_name(SQLParser.Function_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#function_name}.
* @param ctx the parse tree
*/
void exitFunction_name(SQLParser.Function_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#database_name}.
* @param ctx the parse tree
*/
void enterDatabase_name(SQLParser.Database_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#database_name}.
* @param ctx the parse tree
*/
void exitDatabase_name(SQLParser.Database_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#source_table_name}.
* @param ctx the parse tree
*/
void enterSource_table_name(SQLParser.Source_table_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#source_table_name}.
* @param ctx the parse tree
*/
void exitSource_table_name(SQLParser.Source_table_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_name}.
* @param ctx the parse tree
*/
void enterTable_name(SQLParser.Table_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_name}.
* @param ctx the parse tree
*/
void exitTable_name(SQLParser.Table_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_or_index_name}.
* @param ctx the parse tree
*/
void enterTable_or_index_name(SQLParser.Table_or_index_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_or_index_name}.
* @param ctx the parse tree
*/
void exitTable_or_index_name(SQLParser.Table_or_index_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#new_table_name}.
* @param ctx the parse tree
*/
void enterNew_table_name(SQLParser.New_table_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#new_table_name}.
* @param ctx the parse tree
*/
void exitNew_table_name(SQLParser.New_table_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#column_name}.
* @param ctx the parse tree
*/
void enterColumn_name(SQLParser.Column_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#column_name}.
* @param ctx the parse tree
*/
void exitColumn_name(SQLParser.Column_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#collation_name}.
* @param ctx the parse tree
*/
void enterCollation_name(SQLParser.Collation_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#collation_name}.
* @param ctx the parse tree
*/
void exitCollation_name(SQLParser.Collation_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#foreign_table}.
* @param ctx the parse tree
*/
void enterForeign_table(SQLParser.Foreign_tableContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#foreign_table}.
* @param ctx the parse tree
*/
void exitForeign_table(SQLParser.Foreign_tableContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#index_name}.
* @param ctx the parse tree
*/
void enterIndex_name(SQLParser.Index_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#index_name}.
* @param ctx the parse tree
*/
void exitIndex_name(SQLParser.Index_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#trigger_name}.
* @param ctx the parse tree
*/
void enterTrigger_name(SQLParser.Trigger_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#trigger_name}.
* @param ctx the parse tree
*/
void exitTrigger_name(SQLParser.Trigger_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#view_name}.
* @param ctx the parse tree
*/
void enterView_name(SQLParser.View_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#view_name}.
* @param ctx the parse tree
*/
void exitView_name(SQLParser.View_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#module_name}.
* @param ctx the parse tree
*/
void enterModule_name(SQLParser.Module_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#module_name}.
* @param ctx the parse tree
*/
void exitModule_name(SQLParser.Module_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#pragma_name}.
* @param ctx the parse tree
*/
void enterPragma_name(SQLParser.Pragma_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#pragma_name}.
* @param ctx the parse tree
*/
void exitPragma_name(SQLParser.Pragma_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#savepoint_name}.
* @param ctx the parse tree
*/
void enterSavepoint_name(SQLParser.Savepoint_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#savepoint_name}.
* @param ctx the parse tree
*/
void exitSavepoint_name(SQLParser.Savepoint_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#table_alias}.
* @param ctx the parse tree
*/
void enterTable_alias(SQLParser.Table_aliasContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#table_alias}.
* @param ctx the parse tree
*/
void exitTable_alias(SQLParser.Table_aliasContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#transaction_name}.
* @param ctx the parse tree
*/
void enterTransaction_name(SQLParser.Transaction_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#transaction_name}.
* @param ctx the parse tree
*/
void exitTransaction_name(SQLParser.Transaction_nameContext ctx);
/**
* Enter a parse tree produced by {@link SQLParser#any_name}.
* @param ctx the parse tree
*/
void enterAny_name(SQLParser.Any_nameContext ctx);
/**
* Exit a parse tree produced by {@link SQLParser#any_name}.
* @param ctx the parse tree
*/
void exitAny_name(SQLParser.Any_nameContext ctx);
} | [
"alaa-alkheder@outlook.com"
] | alaa-alkheder@outlook.com |
72df09bfb0c935066c3c1dd4ca4adc94a1244b15 | addf38184c8e3aa3129bdfeedaa482de4af8d4ef | /src/main/java/za/co/bank/discovery/repository/IClientAccount.java | cd76702849540c1937f5c87827f141ad1b13217b | [] | no_license | mark-mngoma/bank-balance-server-api | 3f53d24698ce0ece472a9ceb837fb7bb718a149b | 564b592adcc397cdedc3bddbb73d7758d3eeea08 | refs/heads/main | 2023-03-10T14:34:20.658134 | 2021-02-15T17:38:35 | 2021-02-15T17:38:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,251 | java | package za.co.bank.discovery.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import za.co.bank.discovery.domain.ClientAccount;
import za.co.bank.discovery.service.dto.AccountReportAggregationDto;
import za.co.bank.discovery.service.dto.AccountReportsDto;
import za.co.bank.discovery.service.dto.ClientAccountsDto;
import za.co.bank.discovery.service.dto.ExchangeAccountsDto;
import java.math.BigDecimal;
import java.util.List;
@Repository
public interface IClientAccount extends JpaRepository<ClientAccount, String> {
@Query(name = "clientAccount.searchTransactionalAccountsByClientId", nativeQuery = true)
List<ClientAccountsDto> findTransactionalAccountsByClientId(@Param("clientId") Integer clientId,
@Param("transactional") boolean transactional);
@Query(name = "currencyAccount.searchTransactionalAccountsByCurrencyValue", nativeQuery = true)
List<ExchangeAccountsDto> searchTransactionalAccountsByCurrencyValue(@Param("clientId") Integer clientId,
@Param("transactional") boolean transactional);
@Query(name = "reporting.searchAllAccountsByBalanceCount", nativeQuery = true)
List<AccountReportsDto> searchAllAccountsByBalanceCount();
@Query(name = "aggregationQuery.findFinancialStandingById", nativeQuery = true)
AccountReportAggregationDto findFinancialStandingById(@Param("clientId") Integer clientId);
@Query(name = "transactionalQuery.isTransactionalAccount", nativeQuery = true)
Boolean isTransactionalAccount(@Param("accountNumber") String accountNumber);
@Query(name = "clientAccount.findAccountTypeCode", nativeQuery = true)
String getAccountTypeCode(@Param("accountNumber") String accountNumber);
ClientAccount findByClientAccountNumber(String accountNumber);
@Modifying
@Transactional
@Query(name = "updateClientAccountBalance", nativeQuery = true)
void updateClientAccountBalance(@Param("accountNumber") String accountNumber,
@Param("remainingBalance") BigDecimal remainingBalance);
}
| [
"markmngoma@outlook.com"
] | markmngoma@outlook.com |
1136416884aa94a336623830fa244c2c576f22af | 19651578c335569ef2931390d910d7e3b16b4489 | /cis298-inclass-4-dgarson3196/app/src/main/java/edu/kvcc/cis298/criminalintent/CrimeActivity.java | aa3e750dc3c50a39bcbe172a4234d98cf7ea6636 | [] | no_license | dagarson/Mobile-app | 8abc60da1fb1bd482681be6baa5efc657ffbe793 | d98737e58a9b9ee79788b9544d2a0da64be9de64 | refs/heads/master | 2020-05-16T13:05:29.438744 | 2019-04-29T17:08:05 | 2019-04-29T17:08:05 | 183,065,184 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,234 | java | package edu.kvcc.cis298.criminalintent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import java.util.UUID;
public class CrimeActivity extends SingleFragmentActivity {
private static final String EXTRA_CRIME_ID =
"edu.kvcc.cis298.criminalintent.crime_id";
public static Intent newIntent(
Context packageContext,
UUID crimeId
) {
Intent intent = new Intent(packageContext, CrimeActivity.class);
intent.putExtra(EXTRA_CRIME_ID, crimeId);
return intent;
}
@Override
protected Fragment createFragment() {
// Get the crimeId out of the intent that was used to get this activity started.
UUID crimeId = (UUID) getIntent().getSerializableExtra(EXTRA_CRIME_ID);
// Ask CrimeFragment to give us a new instance of itself. We send the
// UUID we just got out over as a param that will then be available in the
// fragment that gets created.
return CrimeFragment.newInstance(crimeId);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
226d54ff92932724653afd8d61a57afda3e94aa1 | 8426bdf07c8b0d6fa542806da250b92f545066c7 | /Java Exercises/src/string/Exercise08.java | 30f6ced72d337d0bf7f57af4b2842a8faa116841 | [] | no_license | Josip-github/Java-exercises | ef1f223ce5ea360413764b4f379ff5c0fd875ebe | 0e15ac33667be5e4b5020774691638f4eaf9c319 | refs/heads/master | 2023-07-16T03:41:50.223205 | 2021-09-03T16:04:51 | 2021-09-03T16:04:51 | 375,904,770 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package string;
public class Exercise08 {
// Write a Java program to test
// if a given string contains the specified sequence of char values.
private static boolean contains(String str1, String str2) {
boolean contain = str1.contains(str2);
if (contain) {
return true;
}else {
return false;
}
}
public static void main(String[] args) {
System.out.println(contains("Nogomet", "Noga"));
}
}
| [
"josipcota1@gmail.com"
] | josipcota1@gmail.com |
b1174d35a6f1d4c2f613983b915dc5a30f28a849 | ba4f96585dd31e985937c0f2e842a77e3b0dc27f | /src/rs/ac/bg/etf/pp1/ast/DesignatorAssignExpr.java | 49133c75eeef24949b812ccd120d744825acce8f | [] | no_license | mmarti98/MJCompiler | 4582dacad234754278306b94cf2fca3252bb68f3 | c01f24305973b0e9ad6086870dfde6cfdaa81c91 | refs/heads/main | 2023-03-05T01:51:06.642533 | 2021-02-15T15:11:48 | 2021-02-15T15:11:48 | 339,108,028 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,957 | java | // generated with ast extension for cup
// version 0.8
// 15/1/2021 15:30:41
package rs.ac.bg.etf.pp1.ast;
public class DesignatorAssignExpr extends DesignatorStatement {
private DesignatorBeforeAssign DesignatorBeforeAssign;
private Assignop Assignop;
private Expr Expr;
public DesignatorAssignExpr (DesignatorBeforeAssign DesignatorBeforeAssign, Assignop Assignop, Expr Expr) {
this.DesignatorBeforeAssign=DesignatorBeforeAssign;
if(DesignatorBeforeAssign!=null) DesignatorBeforeAssign.setParent(this);
this.Assignop=Assignop;
if(Assignop!=null) Assignop.setParent(this);
this.Expr=Expr;
if(Expr!=null) Expr.setParent(this);
}
public DesignatorBeforeAssign getDesignatorBeforeAssign() {
return DesignatorBeforeAssign;
}
public void setDesignatorBeforeAssign(DesignatorBeforeAssign DesignatorBeforeAssign) {
this.DesignatorBeforeAssign=DesignatorBeforeAssign;
}
public Assignop getAssignop() {
return Assignop;
}
public void setAssignop(Assignop Assignop) {
this.Assignop=Assignop;
}
public Expr getExpr() {
return Expr;
}
public void setExpr(Expr Expr) {
this.Expr=Expr;
}
public void accept(Visitor visitor) {
visitor.visit(this);
}
public void childrenAccept(Visitor visitor) {
if(DesignatorBeforeAssign!=null) DesignatorBeforeAssign.accept(visitor);
if(Assignop!=null) Assignop.accept(visitor);
if(Expr!=null) Expr.accept(visitor);
}
public void traverseTopDown(Visitor visitor) {
accept(visitor);
if(DesignatorBeforeAssign!=null) DesignatorBeforeAssign.traverseTopDown(visitor);
if(Assignop!=null) Assignop.traverseTopDown(visitor);
if(Expr!=null) Expr.traverseTopDown(visitor);
}
public void traverseBottomUp(Visitor visitor) {
if(DesignatorBeforeAssign!=null) DesignatorBeforeAssign.traverseBottomUp(visitor);
if(Assignop!=null) Assignop.traverseBottomUp(visitor);
if(Expr!=null) Expr.traverseBottomUp(visitor);
accept(visitor);
}
public String toString(String tab) {
StringBuffer buffer=new StringBuffer();
buffer.append(tab);
buffer.append("DesignatorAssignExpr(\n");
if(DesignatorBeforeAssign!=null)
buffer.append(DesignatorBeforeAssign.toString(" "+tab));
else
buffer.append(tab+" null");
buffer.append("\n");
if(Assignop!=null)
buffer.append(Assignop.toString(" "+tab));
else
buffer.append(tab+" null");
buffer.append("\n");
if(Expr!=null)
buffer.append(Expr.toString(" "+tab));
else
buffer.append(tab+" null");
buffer.append("\n");
buffer.append(tab);
buffer.append(") [DesignatorAssignExpr]");
return buffer.toString();
}
}
| [
"mm170672d@student.etf.bg.ac.rs"
] | mm170672d@student.etf.bg.ac.rs |
dd1a8197d19b85d366c331a124ee59c74877ee1f | 330d37803985877ec84545f3fbc10b151d39cf35 | /src/main/java/com/example/petstore/sale/SaleEditView.java | 417ca0ca6008ae8a7fe04fa37aae2886312a5295 | [] | no_license | superfaco/petstore | 8d10cd78c3a87ffa6b8c2cd71c3d275a519693b8 | 2f78cb92b164b81b6f07ad8e1d373d7b7e50f3da | refs/heads/master | 2023-07-29T22:00:49.782765 | 2021-09-12T00:46:10 | 2021-09-12T00:46:10 | 405,513,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,413 | java | package com.example.petstore.sale;
import com.example.petstore.customer.Customer;
import com.example.petstore.customer.CustomerRepository;
import com.example.petstore.pet.Pet;
import com.example.petstore.pet.PetRepository;
import com.example.petstore.util.ConfirmDialog;
import com.vaadin.flow.component.KeyNotifier;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.datetimepicker.DateTimePicker;
import com.vaadin.flow.component.icon.VaadinIcon;
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.select.Select;
import com.vaadin.flow.data.binder.Binder;
import com.vaadin.flow.spring.annotation.SpringComponent;
import com.vaadin.flow.spring.annotation.UIScope;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@SpringComponent
@UIScope
public class SaleEditView extends VerticalLayout implements KeyNotifier {
private final SaleRepository saleRepository;
private final CustomerRepository customerRepository;
private final PetRepository petRepository;
private Sale sale;
private final Button saveButton;
private final Button deleteButton;
private final Button cancelButton;
private final HorizontalLayout buttonsHorizontalLayout;
private SaleEditViewHandler saleEditViewHandler;
private final DateTimePicker saleDate;
private final Select<Customer> customer;
private final Select<Pet> pet;
private final ConfirmDialog confirmDialog;
private final Binder<Sale> binder;
@Autowired
public SaleEditView(SaleRepository saleRepository, CustomerRepository customerRepository, PetRepository petRepository){
this.saleRepository = saleRepository;
this.customerRepository = customerRepository;
this.petRepository = petRepository;
this.saveButton = new Button("Save", VaadinIcon.CHECK.create());
this.deleteButton = new Button("Delete", VaadinIcon.TRASH.create());
this.cancelButton = new Button("Cancel");
this.saveButton.getElement().getThemeList().add("primary");
this.deleteButton.getElement().getThemeList().add("error");
this.cancelButton.getElement().getThemeList().add("warning");
this.saveButton.addClickListener(e -> save());
this.deleteButton.addClickListener(e -> delete());
this.cancelButton.addClickListener(e -> cancel());
this.buttonsHorizontalLayout = new HorizontalLayout(this.saveButton, this.deleteButton, this.cancelButton);
this.saleDate = new DateTimePicker("Sale Date: ");
this.customer = new Select<>();
this.pet = new Select<>();
this.customer.setLabel("Customer: ");
this.pet.setLabel("Pet: ");
this.customer.setItemLabelGenerator(Customer::getName);
this.pet.setItemLabelGenerator(Pet::getName);
this.customer.setItems(this.customerRepository.findAll());
this.pet.setItems(this.petRepository.findAll());
this.binder = new Binder<>(Sale.class);
this.binder.bindInstanceFields(this);
this.confirmDialog = new ConfirmDialog("Are you sure you want to delete the item?", e -> {
this.saleRepository.delete(this.sale);
this.saleEditViewHandler.onChange();
});
this.add(this.saleDate);
this.add(this.customer);
this.add(this.pet);
this.add(this.buttonsHorizontalLayout);
}
private void save(){
this.saleRepository.save(sale);
this.saleEditViewHandler.onChange();
}
private void delete(){
this.confirmDialog.open();
}
private void cancel(){
this.saleEditViewHandler.onChange();
}
public void setSale(Sale sale){
if(sale != null){
if(sale.getId() != null){
this.sale = saleRepository.findById(sale.getId()).get();
}else{
this.sale = sale;
}
this.binder.setBean(this.sale);
this.saleDate.focus();
this.setVisible(true);
}else{
this.sale = null;
}
}
public void setSaleEditViewHandler(SaleEditViewHandler saleEditViewHandler){
this.saleEditViewHandler = saleEditViewHandler;
}
public interface SaleEditViewHandler{
void onChange();
}
}
| [
"superfaco1@gmail.com"
] | superfaco1@gmail.com |
e33a0adc0d64f097389cc598dc1b7367bcec36bc | 89e623815feb73650630b4b252f50a6b24d187f4 | /src/main/java/com/yundao/tenant/model/base/customer/BaseCustomerBackExamineExample.java | 77ecfd380f3cf37f441d36c55edb22cc6cb675c9 | [] | no_license | wucaiqiang/yundao-tenant | 19b673eabdd79df9680bd6738eea283b9d696c31 | 660eea5ce4e324d3b4db538ee26ecbf83241043a | refs/heads/master | 2021-08-30T20:53:00.708567 | 2017-12-19T11:35:36 | 2017-12-19T11:35:36 | 114,628,331 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 29,359 | java | package com.yundao.tenant.model.base.customer;
import com.yundao.core.utils.Limit;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class BaseCustomerBackExamineExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = 0;
protected int limitEnd = 0;
protected Limit limit;
public BaseCustomerBackExamineExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
criteria.andIsDeleteEqualTo(0);
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setLimitEnd(int limitEnd) {
this.limitEnd=limitEnd;
}
public int getLimitEnd() {
return limitEnd;
}
public BaseCustomerBackExamineExample setLimit(Limit limit) {
this.limit=limit;
return this;
}
public Limit getLimit() {
return limit;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andCustomerIdIsNull() {
addCriterion("customer_id is null");
return (Criteria) this;
}
public Criteria andCustomerIdIsNotNull() {
addCriterion("customer_id is not null");
return (Criteria) this;
}
public Criteria andCustomerIdEqualTo(Long value) {
addCriterion("customer_id =", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdNotEqualTo(Long value) {
addCriterion("customer_id <>", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdGreaterThan(Long value) {
addCriterion("customer_id >", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdGreaterThanOrEqualTo(Long value) {
addCriterion("customer_id >=", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdLessThan(Long value) {
addCriterion("customer_id <", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdLessThanOrEqualTo(Long value) {
addCriterion("customer_id <=", value, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdIn(List<Long> values) {
addCriterion("customer_id in", values, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdNotIn(List<Long> values) {
addCriterion("customer_id not in", values, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdBetween(Long value1, Long value2) {
addCriterion("customer_id between", value1, value2, "customerId");
return (Criteria) this;
}
public Criteria andCustomerIdNotBetween(Long value1, Long value2) {
addCriterion("customer_id not between", value1, value2, "customerId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andReasonIsNull() {
addCriterion("reason is null");
return (Criteria) this;
}
public Criteria andReasonIsNotNull() {
addCriterion("reason is not null");
return (Criteria) this;
}
public Criteria andReasonEqualTo(String value) {
addCriterion("reason =", value, "reason");
return (Criteria) this;
}
public Criteria andReasonNotEqualTo(String value) {
addCriterion("reason <>", value, "reason");
return (Criteria) this;
}
public Criteria andReasonGreaterThan(String value) {
addCriterion("reason >", value, "reason");
return (Criteria) this;
}
public Criteria andReasonGreaterThanOrEqualTo(String value) {
addCriterion("reason >=", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLessThan(String value) {
addCriterion("reason <", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLessThanOrEqualTo(String value) {
addCriterion("reason <=", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLike(String value) {
addCriterion("reason like", value, "reason");
return (Criteria) this;
}
public Criteria andReasonNotLike(String value) {
addCriterion("reason not like", value, "reason");
return (Criteria) this;
}
public Criteria andReasonIn(List<String> values) {
addCriterion("reason in", values, "reason");
return (Criteria) this;
}
public Criteria andReasonNotIn(List<String> values) {
addCriterion("reason not in", values, "reason");
return (Criteria) this;
}
public Criteria andReasonBetween(String value1, String value2) {
addCriterion("reason between", value1, value2, "reason");
return (Criteria) this;
}
public Criteria andReasonNotBetween(String value1, String value2) {
addCriterion("reason not between", value1, value2, "reason");
return (Criteria) this;
}
public Criteria andApplicationDateIsNull() {
addCriterion("application_date is null");
return (Criteria) this;
}
public Criteria andApplicationDateIsNotNull() {
addCriterion("application_date is not null");
return (Criteria) this;
}
public Criteria andApplicationDateEqualTo(Date value) {
addCriterion("application_date =", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateNotEqualTo(Date value) {
addCriterion("application_date <>", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateGreaterThan(Date value) {
addCriterion("application_date >", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateGreaterThanOrEqualTo(Date value) {
addCriterion("application_date >=", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateLessThan(Date value) {
addCriterion("application_date <", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateLessThanOrEqualTo(Date value) {
addCriterion("application_date <=", value, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateIn(List<Date> values) {
addCriterion("application_date in", values, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateNotIn(List<Date> values) {
addCriterion("application_date not in", values, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateBetween(Date value1, Date value2) {
addCriterion("application_date between", value1, value2, "applicationDate");
return (Criteria) this;
}
public Criteria andApplicationDateNotBetween(Date value1, Date value2) {
addCriterion("application_date not between", value1, value2, "applicationDate");
return (Criteria) this;
}
public Criteria andExamineDateIsNull() {
addCriterion("examine_date is null");
return (Criteria) this;
}
public Criteria andExamineDateIsNotNull() {
addCriterion("examine_date is not null");
return (Criteria) this;
}
public Criteria andExamineDateEqualTo(Date value) {
addCriterion("examine_date =", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateNotEqualTo(Date value) {
addCriterion("examine_date <>", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateGreaterThan(Date value) {
addCriterion("examine_date >", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateGreaterThanOrEqualTo(Date value) {
addCriterion("examine_date >=", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateLessThan(Date value) {
addCriterion("examine_date <", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateLessThanOrEqualTo(Date value) {
addCriterion("examine_date <=", value, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateIn(List<Date> values) {
addCriterion("examine_date in", values, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateNotIn(List<Date> values) {
addCriterion("examine_date not in", values, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateBetween(Date value1, Date value2) {
addCriterion("examine_date between", value1, value2, "examineDate");
return (Criteria) this;
}
public Criteria andExamineDateNotBetween(Date value1, Date value2) {
addCriterion("examine_date not between", value1, value2, "examineDate");
return (Criteria) this;
}
public Criteria andExamineUserIdIsNull() {
addCriterion("examine_user_id is null");
return (Criteria) this;
}
public Criteria andExamineUserIdIsNotNull() {
addCriterion("examine_user_id is not null");
return (Criteria) this;
}
public Criteria andExamineUserIdEqualTo(Long value) {
addCriterion("examine_user_id =", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdNotEqualTo(Long value) {
addCriterion("examine_user_id <>", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdGreaterThan(Long value) {
addCriterion("examine_user_id >", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("examine_user_id >=", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdLessThan(Long value) {
addCriterion("examine_user_id <", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdLessThanOrEqualTo(Long value) {
addCriterion("examine_user_id <=", value, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdIn(List<Long> values) {
addCriterion("examine_user_id in", values, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdNotIn(List<Long> values) {
addCriterion("examine_user_id not in", values, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdBetween(Long value1, Long value2) {
addCriterion("examine_user_id between", value1, value2, "examineUserId");
return (Criteria) this;
}
public Criteria andExamineUserIdNotBetween(Long value1, Long value2) {
addCriterion("examine_user_id not between", value1, value2, "examineUserId");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andRejectReasonIsNull() {
addCriterion("reject_reason is null");
return (Criteria) this;
}
public Criteria andRejectReasonIsNotNull() {
addCriterion("reject_reason is not null");
return (Criteria) this;
}
public Criteria andRejectReasonEqualTo(String value) {
addCriterion("reject_reason =", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonNotEqualTo(String value) {
addCriterion("reject_reason <>", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonGreaterThan(String value) {
addCriterion("reject_reason >", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonGreaterThanOrEqualTo(String value) {
addCriterion("reject_reason >=", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonLessThan(String value) {
addCriterion("reject_reason <", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonLessThanOrEqualTo(String value) {
addCriterion("reject_reason <=", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonLike(String value) {
addCriterion("reject_reason like", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonNotLike(String value) {
addCriterion("reject_reason not like", value, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonIn(List<String> values) {
addCriterion("reject_reason in", values, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonNotIn(List<String> values) {
addCriterion("reject_reason not in", values, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonBetween(String value1, String value2) {
addCriterion("reject_reason between", value1, value2, "rejectReason");
return (Criteria) this;
}
public Criteria andRejectReasonNotBetween(String value1, String value2) {
addCriterion("reject_reason not between", value1, value2, "rejectReason");
return (Criteria) this;
}
public Criteria andIsDeleteIsNull() {
addCriterion("is_delete is null");
return (Criteria) this;
}
public Criteria andIsDeleteIsNotNull() {
addCriterion("is_delete is not null");
return (Criteria) this;
}
public Criteria andIsDeleteEqualTo(Integer value) {
addCriterion("is_delete =", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotEqualTo(Integer value) {
addCriterion("is_delete <>", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThan(Integer value) {
addCriterion("is_delete >", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
addCriterion("is_delete >=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThan(Integer value) {
addCriterion("is_delete <", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
addCriterion("is_delete <=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteIn(List<Integer> values) {
addCriterion("is_delete in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotIn(List<Integer> values) {
addCriterion("is_delete not in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
addCriterion("is_delete between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
addCriterion("is_delete not between", value1, value2, "isDelete");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | [
"wucaiqiang@zcmall.com"
] | wucaiqiang@zcmall.com |
89f10dfd21fa12d6b12dd2c776ea71ce7b85f059 | 370047bf8b4036a08d95c4ae6cb9d21137610a5a | /src/com/company/WhatsYourName.java | 0a2502c514e1c8638a51105a2a76fd0adfa92a2f | [] | no_license | MartinLichev/Sample-Java-Projects | 86fd0950b2589f6a08b409ea5189e961b1798ffe | c44086b22a91320e7f7fe6c714bf8b6a63d01651 | refs/heads/master | 2022-12-22T16:46:37.793782 | 2020-09-14T09:12:58 | 2020-09-14T09:12:58 | 290,169,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | package com.company;
import java.util.Scanner;
public class WhatsYourName {
public static void main(String[] args) {
Scanner scr = new Scanner(System.in);
System.out.println("Enter name:");
String name = scr.nextLine();
String result = name;
System.out.printf("Your name is:%s",result);
}
}
| [
"martin.lichev1@gmail.com"
] | martin.lichev1@gmail.com |
7a0ddac05bfeba3f795040668000f405740356bb | 22f641a3761b59000d89a7c85b79b982c4b7b842 | /src/net/test/chapter11_container/SimpleCollection.java | 227f301b56379172b945aaec218bf32f41ca49e5 | [] | no_license | wuli2496/ThinkingInJava | 29074a1dde12e7189cec76ddb63fc9974612916c | ed9c126f9d497043f71f7adce2591dc9c0d4900a | refs/heads/master | 2021-01-19T08:04:38.948720 | 2020-11-28T16:14:52 | 2020-11-28T16:14:52 | 87,596,094 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 454 | java | package net.test.chapter11_container;
import net.test.chapter10_innerClasses.InheritInner;
import java.util.Collection;
import java.util.ArrayList;
public class SimpleCollection {
public static void main(String[] args)
{
Collection<Integer> c = new ArrayList<>();
for (int i = 0; i < 10; i++)
{
c.add(i);
}
for (Integer i : c)
{
System.out.println(i);
}
}
}
| [
"wuli2496@163.com"
] | wuli2496@163.com |
b749726bc4cd51f08027a553d4dc86e75ec38fd5 | e968d8ebbe61d1df615e7066b26a2b4709a9a791 | /app/src/main/java/kartify/sql/DatabaseHelper.java | d68fdc2991b8f75fddf42e528cd59f427901d88f | [] | no_license | kapil532/wagonfly_kiosk | bb07d2063d8adecef7bcdfc8fa78f16c517a7f44 | a00cc7b0ffe48f9e5f9b188aed6c731f6aeb8d89 | refs/heads/master | 2020-07-20T22:49:17.982529 | 2019-09-06T05:28:46 | 2019-09-06T05:28:46 | 206,721,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,592 | java | package kartify.sql;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import kartify.model.Beneficiary;
/**
* Created by delaroy on 5/10/17.
*/
public class DatabaseHelper extends SQLiteOpenHelper
{
private DatabaseHelper DBHelper;
private SQLiteDatabase db;
// Database Version
private static final int DATABASE_VERSION = 11;
// Database Name
private static final String DATABASE_NAME = "kartifymanager.db";
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
final String SQL_CREATE_FAVORITE_TABLE = "CREATE TABLE " + BeneficiaryContract.BeneficiaryEntry.TABLE_NAME + " (" +
BeneficiaryContract.BeneficiaryEntry._ID + " TEXT NOT NULL," +
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_BRAND + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_MANUFACTURER + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_WEIGHT + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_CATEGORY_NAME + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_IMAGE_PATH + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_PRICE + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_GST + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_OFFERS + " TEXT NOT NULL, " +
BeneficiaryContract.BeneficiaryEntry.COLUMN_RETAIL_PRICE + " TEXT NOT NULL " +
"); ";
sqLiteDatabase.execSQL(SQL_CREATE_FAVORITE_TABLE);
}
//drop beneficiary table
private String DROP_BENEFICIARY_TABLE = "DROP TABLE IF EXISTS " + BeneficiaryContract.BeneficiaryEntry.TABLE_NAME;
public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
//---opens the database---
public DatabaseHelper open() throws SQLException
{
db = DBHelper.getWritableDatabase();
return this;
}
//---closes the database---
public void close()
{
DBHelper.close();
}
@Override
public void onUpgrade(SQLiteDatabase db1, int oldVersion, int newVersion) {
//Drop User Table if exist
db1.execSQL(DROP_BENEFICIARY_TABLE);
// Create tables again
onCreate(db1);
}
public void deleteCart()
{
SQLiteDatabase db = this.getReadableDatabase();
try {
db.execSQL("DELETE FROM " + BeneficiaryContract.BeneficiaryEntry.TABLE_NAME);
} catch (SQLiteException e) {
e.printStackTrace();
}
}
//Method to create beneficiary records
public void addBeneficiary(Beneficiary beneficiary) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(BeneficiaryContract.BeneficiaryEntry._ID, beneficiary.getId());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME, beneficiary.getName());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID, beneficiary.getCode());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_PRICE, beneficiary.getS_price());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_BRAND, beneficiary.getBrand());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_MANUFACTURER, beneficiary.getManufacturer());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_WEIGHT, beneficiary.getWeight());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_IMAGE_PATH, beneficiary.getProduct_image());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY, beneficiary.getItem_quantity());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_CATEGORY_NAME, beneficiary.getCategory_name());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_GST, beneficiary.getGst());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_OFFERS, beneficiary.getOffer());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_RETAIL_PRICE, beneficiary.getRetail_price());
db.insert(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME, null, values);
db.close();
}
public void updateTable(Beneficiary beneficiary,String id)
{
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values=new ContentValues();
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME, beneficiary.getName());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID, beneficiary.getCode());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_PRICE, beneficiary.getS_price());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_BRAND, beneficiary.getBrand());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_MANUFACTURER, beneficiary.getManufacturer());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_WEIGHT, beneficiary.getWeight());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_IMAGE_PATH, beneficiary.getProduct_image());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY, beneficiary.getItem_quantity());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_CATEGORY_NAME, beneficiary.getCategory_name());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_GST, beneficiary.getGst());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_OFFERS, beneficiary.getOffer());
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_RETAIL_PRICE, beneficiary.getRetail_price());
db.update(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME, values, BeneficiaryContract.BeneficiaryEntry._ID+"=" + id, null);
}
public boolean checkUser(String email)
{
// array of columns to fetch
String[] columns = {
BeneficiaryContract.BeneficiaryEntry._ID
};
SQLiteDatabase db = this.getReadableDatabase();
// selection criteria
String selection = BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID + " = ?";
// selection argument
String[] selectionArgs = {email};
Cursor cursor = db.query(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME, //Table to query
columns, //columns to return
selection, //columns for the WHERE clause
selectionArgs, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
null); //The sort order
int cursorCount = cursor.getCount();
cursor.close();
db.close();
if (cursorCount > 0)
{
return true;
}
return false;
}
public List<Beneficiary> getAllBeneficiary()
{
// array of columns to fetch
String[] columns = {
BeneficiaryContract.BeneficiaryEntry._ID,
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME,
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID,
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_PRICE,
BeneficiaryContract.BeneficiaryEntry.COLUMN_MANUFACTURER,
BeneficiaryContract.BeneficiaryEntry.COLUMN_WEIGHT,
BeneficiaryContract.BeneficiaryEntry.COLUMN_CATEGORY_NAME,
BeneficiaryContract.BeneficiaryEntry.COLUMN_IMAGE_PATH,
BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY,
BeneficiaryContract.BeneficiaryEntry.COLUMN_BRAND,
BeneficiaryContract.BeneficiaryEntry.COLUMN_GST,
BeneficiaryContract.BeneficiaryEntry.COLUMN_OFFERS,
BeneficiaryContract.BeneficiaryEntry.COLUMN_RETAIL_PRICE
};
// sorting orders
String sortOrder =
BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME ;
List<Beneficiary> beneficiaryList = new ArrayList<Beneficiary>();
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.query(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME, //Table to query
columns, //columns to return
null, //columns for the WHERE clause
null, //The values for the WHERE clause
null, //group the rows
null, //filter by row groups
sortOrder); //The sort order
// Traversing through all rows and adding to list
if (cursor.moveToFirst()) {
do {
Beneficiary beneficiary = new Beneficiary();
beneficiary.setId((cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry._ID))));
beneficiary.setName(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_NAME)));
beneficiary.setBrand(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_BRAND)));
beneficiary.setCategory_name(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_CATEGORY_NAME)));
beneficiary.setCode(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID)));
beneficiary.setManufacturer(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_MANUFACTURER)));
beneficiary.setS_price(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_PRICE)));
beneficiary.setProduct_image(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_IMAGE_PATH)));
beneficiary.setItem_quantity(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY)));
beneficiary.setWeight(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_WEIGHT)));
beneficiary.setGst(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_GST)));
beneficiary.setOffer(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_OFFERS)));
beneficiary.setRetail_price(cursor.getString(cursor.getColumnIndex(BeneficiaryContract.BeneficiaryEntry.COLUMN_RETAIL_PRICE)));
// Adding user record to list
beneficiaryList.add(beneficiary);
} while (cursor.moveToNext());
}
cursor.close();
db.close();
// return user list
return beneficiaryList;
}
public void updateParticularData(String quantity,String id)
{
Log.e("DATABASE","DATA-->"+quantity+" id "+id);
ContentValues values = new ContentValues();
values.put(BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY, quantity);
SQLiteDatabase db = this.getReadableDatabase();
// db.execSQL("UPDATE "+BeneficiaryContract.BeneficiaryEntry.TABLE_NAME+" SET "+BeneficiaryContract.BeneficiaryEntry.COLUMN_ITEM_QUANTITY+"='"+quantity+"' WHERE "+BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID+"="+id+"");
db.update(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME,values,BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID + "=?",new String[]{id});
db.close();
}
public void deleteSingleContact(String id){
db = this.getWritableDatabase();
db.delete(BeneficiaryContract.BeneficiaryEntry.TABLE_NAME, BeneficiaryContract.BeneficiaryEntry.COLUMN_PRODUCT_ID + "=?", new String[]{id});
db.close();
//KEY_NAME is a column name
}
}
| [
"kapil.bic@gmail.com"
] | kapil.bic@gmail.com |
224197cef1d8792a34fe3981cb721c7a4a92e430 | 5e09d2d5a40957b478f40c5f0953cc40f69dc231 | /helm-doc-maven-plugin/src/main/java/io/github/aurabhi/mvn/helm/doc/plugin/model/Chart.java | cec48cf4e4aeeb44e399d27ee23a7633747629a3 | [
"MIT"
] | permissive | aurabhi/helm-doc-maven-plugin | 8946bfcaed30623ffd45d836a5a6a7820ca48557 | 587935e900df0adf3ea3746910afd96fdf1005cb | refs/heads/main | 2023-02-17T20:58:45.972678 | 2021-01-02T00:50:57 | 2021-01-02T00:50:57 | 319,957,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,432 | java | package io.github.aurabhi.mvn.helm.doc.plugin.model;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Chart {
private String apiVersion = "";
private String name = "";
private String version = "";
private String kubeVersion = "";
private String description = "";
private String type = "";
private List<String> keywords = null;
private String home = "";
private List<String> sources = null;
private List<Dependency> dependencies = null;
private List<Maintainer> maintainers = null;
private String icon ="";
private String appVersion = "";
private String deprecated = "";
private Annotations annotations;
private Map<String, Object> additionalProperties = new HashMap<>();
public String getApiVersion() {
return apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getKubeVersion() {
return kubeVersion;
}
public void setKubeVersion(String kubeVersion) {
this.kubeVersion = kubeVersion;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<String> getKeywords() {
return keywords;
}
public void setKeywords(List<String> keywords) {
this.keywords = keywords;
}
public String getHome() {
return home;
}
public void setHome(String home) {
this.home = home;
}
public List<String> getSources() {
return sources;
}
public void setSources(List<String> sources) {
this.sources = sources;
}
public List<Dependency> getDependencies() {
return dependencies;
}
public void setDependencies(List<Dependency> dependencies) {
this.dependencies = dependencies;
}
public List<Maintainer> getMaintainers() {
return maintainers;
}
public void setMaintainers(List<Maintainer> maintainers) {
this.maintainers = maintainers;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getAppVersion() {
return appVersion;
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
public String getDeprecated() {
return deprecated;
}
public void setDeprecated(String deprecated) {
this.deprecated = deprecated;
}
public Annotations getAnnotations() {
return annotations;
}
public void setAnnotations(Annotations annotations) {
this.annotations = annotations;
}
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
} | [
"aurabhi@yahoo.com"
] | aurabhi@yahoo.com |
39838bdcfcc7031c58723ec73cb64b95e9d84ae7 | 474214ce1ccccdd84a33c80b3404c059a6d034e8 | /Java_Assignment/src/datagramSocket/ChatClient.java | 8b33db2a17d16f69de5618fde993c24c2ed2d632 | [] | no_license | blackphoenix42/Eclipse-Workbench-Projects | 3c23ddaa373ce201de0319e4cdbd43353bfb4524 | 9f284c50393b6a4f392cea80def80417c4a6e027 | refs/heads/master | 2023-07-03T05:50:35.926851 | 2021-08-07T09:18:50 | 2021-08-07T09:18:50 | 393,635,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,076 | java | package datagramSocket;
import java.io.*;
import java.net.*;
public class ChatClient {
public static void main(String[] args) throws Exception {
Socket sock = new Socket("127.0.0.1", 3000);
// reading from keyboard (keyRead object)
BufferedReader keyRead = new BufferedReader(new InputStreamReader(System.in));
// sending to client (pwrite object)
OutputStream ostream = sock.getOutputStream();
PrintWriter pwrite = new PrintWriter(ostream, true);
// receiving from server (receiveRead object)
InputStream istream = sock.getInputStream();
BufferedReader receiveRead = new BufferedReader(new InputStreamReader(istream));
System.out.println("Start the coomunication, type and press Enter key");
String receiveMessage, sendMessage;
while (true) {
sendMessage = keyRead.readLine(); // keyboard reading
pwrite.println(sendMessage); // sending to server
pwrite.flush(); // flush the data
if ((receiveMessage = receiveRead.readLine()) != null)// receive from server{
System.out.println(receiveMessage); // displaying at DOS prompt
}
}
}
| [
"aayush.sang@gmail.com"
] | aayush.sang@gmail.com |
ed4db45960a69f4b27d4a54ad05756e521c4fd26 | 6d911af01bd543a38271ee504aad7c2c93a1adf6 | /FledRestful/FledRestful/test/com/rf/fledrest/router/_single.java | fc29d074aee8dad0cdc5ac21421a5b3a640983cf | [] | no_license | rexfleischer/misc-projs | 94b9a85c0a149de64228c6406b73a0f15ca23477 | ce47a1392b6192ba8fc5400da63841f3bf26a883 | refs/heads/master | 2021-07-08T05:43:20.337938 | 2020-07-28T14:49:47 | 2020-07-28T14:49:47 | 1,376,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 556 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.rf.fledrest.router;
import com.rf.fledrest.Hook;
import com.rf.fledrest.Param;
import com.rf.fledrest.Requirement;
/**
*
* @author REx
*/
@Requirement.Path.Variable("hello")
public class _single
{
@Requirement.Method.GET
@Requirement.Path.Variable("/world/{note}")
@Hook.Security(RouteSecurity.class)
public Object hello(@Param.Path("note") String note)
{
return String.format("hello world! %s", note);
}
}
| [
"rexfleischer@gmail.com"
] | rexfleischer@gmail.com |
1125d7743207e8491ceb725ab822675a00b9986a | 5229e9699de0e2ee5278062e0323a829ec13a9b2 | /src/main/Main.java | b51d15c4dff7ab9fe9f6264e6df60329ac91fc4a | [
"MIT"
] | permissive | SoboLAN/polynomial-processor | ff3ae1702f5718b8d4b96822bd047b2335abce5d | b411011390e36507d5299e92705d74853fc63dc6 | refs/heads/master | 2021-01-11T06:53:35.125069 | 2016-10-30T20:59:31 | 2016-10-30T20:59:31 | 72,374,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,148 | java | package main;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
/** Contains the main () thread. */
public class Main
{
//specifies minimum major version. Examples: 5 (JRE 5), 6 (JRE 6), 7 (JRE 7) etc.
private static final int MAJOR_VERSION = 6;
//specifies minimum minor version. Examples: 12 (JRE 6u12), 23 (JRE 6u23), 2 (JRE 7u2) etc.
private static final int MINOR_VERSION = 14;
//returns true if the user's screen resolution is big enough to display
//the program's window
private static boolean isOKScreenResolution ()
{
//get the resolution (index 0: width, index 1: height)
int[] resolution = GUIUtilities.getResolution ();
//check if the size of the window would fit on the screen
return (GUI.GUIWIDTH < resolution[0] && GUI.GUIHEIGHT < resolution[1]);
}
//checks if the version of the currently running JVM is bigger than
//the minimum version required to run this program.
//returns true if it's ok, false otherwise
private static boolean checkVersion ()
{
//get the JVM version
String version = System.getProperty ("java.version");
//extract the major version from it
int sys_major_version = Integer.parseInt (String.valueOf (version.charAt (2)));
//if the major version is too low (unlikely !!), it's not good
if (sys_major_version < MAJOR_VERSION)
{
return false;
}
else if (sys_major_version > MAJOR_VERSION)
{
return true;
}
else
{
//find the underline ( "_" ) in the version string
int underlinepos = version.lastIndexOf ("_");
Integer mv;
try
{
//everything after the underline is the minor version.
//extract that
mv = Integer.parseInt (version.substring (underlinepos + 1));
}
//if it's not ok, then the version is probably not good
catch (NumberFormatException e)
{
return false;
}
//if the minor version passes, wonderful
return (mv.intValue () >= MINOR_VERSION);
}
}
//displays an error dialog on the screen using a temporary
//jframe as parent and disposes that jframe when the dialog is
//closed (will exit application if no other non-daemon threads are running (like another JFrame))
//parameters: title (title of the dialog window), message (the error message)
private static void displayErrorDialog (String title, String message)
{
//create temporary jframe
JFrame invisibleparentframe = new JFrame ();
//make it invisible, since we don't need it
invisibleparentframe.setVisible (false);
//display the error message
GUIUtilities.showErrorDialog (invisibleparentframe, message, title);
//dispose of the parent frame
invisibleparentframe.dispose ();
}
/** The main () thread. */
public static void main (String[] args)
{
//check if the minimum version is ok
if (! Main.checkVersion ())
{
String title = "Polynomial Processor Minimum Version Error";
String message = "JVM version detected: " + System.getProperty ("java.version") + ". Minimum version required: " + MAJOR_VERSION + " Update " + MINOR_VERSION + ".";
//display an error message
Main.displayErrorDialog (title, message);
return;
}
//check if the screen resolution is OK
if (! Main.isOKScreenResolution ())
{
String title = "Polynomial Processor Minimum Resolution Error";
String message = "Minimum resolution required: Width = " + GUI.GUIWIDTH + ", Height: " + GUI.GUIHEIGHT + ".";
//display an error message
Main.displayErrorDialog (title, message);
return;
}
//tells whether nimbus lnf was set
boolean lnfset = false;
//attempt to set the Nimbus LookAndFeel (if available)
try
{
//iterate over all installed lookandfeels
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels ())
{
if (info.getName ().equals ("Nimbus"))
{
//set Nimbus
UIManager.setLookAndFeel (info.getClassName ());
//mark that it was set
lnfset = true;
break;
}
}
}
//if there is a problem (shouldn't be), exit application
catch (Exception e2)
{
System.exit (11);
}
//check if nimbus was set
if (! lnfset)
{
//attempt to set the default LNF for this system
try
{
UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ());
}
//if there is a problem (shouldn't be), exit application
catch (Exception e3)
{
System.exit (11);
}
}
//everything that happens on the GUI should run
//on swing's event dispatch thread
javax.swing.SwingUtilities.invokeLater (new Runnable ()
{
@Override public void run ()
{
JFrame.setDefaultLookAndFeelDecorated (true);
//create the GUI
GUI f = GUI.createGUI ();
//get the resolution of the window
int[] resolution = GUIUtilities.getResolution ();
//find the required coordinates
int xlocation = (resolution[0] - GUI.GUIWIDTH) / 2;
int ylocation = (resolution[1] - GUI.GUIHEIGHT) / 2;
//set the window in the middle of the screen
f.setLocation (xlocation, ylocation);
//make it visible
f.setVisible (true);
}
});
}
} | [
"radu.murzea@gmail.com"
] | radu.murzea@gmail.com |
e7f77212851bbd353a1fb0b1547f1cbd0f7a748a | 1a13b7192f90a68aa3dc03fd7165e12845445bfd | /app/src/main/java/alka/heena/swapnali/prajakta/pranav/sareewalaappf/ui/notification/NotificationFragment.java | 3d55a0afdad3ada7f5ad35c224a0577d0bb151c7 | [] | no_license | Heenabaig/SareewalaAppF | 45b839a9748ba2c35d5acb9d21cadc9205905dc8 | b043fa878a5ddd88adbbe931b3b6b8ba9432ee71 | refs/heads/master | 2022-08-31T00:14:57.585319 | 2020-05-27T11:56:36 | 2020-05-27T11:56:36 | 261,766,653 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,157 | java | package alka.heena.swapnali.prajakta.pranav.sareewalaappf.ui.notification;
import androidx.lifecycle.ViewModelProviders;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import alka.heena.swapnali.prajakta.pranav.sareewalaappf.R;
public class NotificationFragment extends Fragment {
private NotificationViewModel mViewModel;
public static NotificationFragment newInstance() {
return new NotificationFragment();
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_notification, container, false);
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = ViewModelProviders.of(this).get(NotificationViewModel.class);
// TODO: Use the ViewModel
}
}
| [
"heenabaig317@gmail.com"
] | heenabaig317@gmail.com |
335e05fedfc8c130a11521544400b3b5f26eb42a | d2fdc3b0fd18d451fbd6562c3dd38f78f015d51b | /CoreJava1/src/designPatterns/CommertialPaln.java | 03aea9c883f21b706b3d60b2fe91f1beff96a526 | [] | no_license | lokeshjava33/lokeshtest | cce8438f84b8c0ce333940c421fe8a2f7a64b09a | cb025e9d6a7598350c15b52e5577f43ce44ea44d | refs/heads/master | 2022-12-23T04:34:10.075380 | 2021-02-12T15:48:02 | 2021-02-12T15:48:02 | 182,819,131 | 0 | 0 | null | 2022-12-16T06:56:48 | 2019-04-22T15:47:43 | Java | UTF-8 | Java | false | false | 113 | java | package designPatterns;
public class CommertialPaln extends Plan {
public void getRate(){
rate=7.25;
}
}
| [
"MetlaVitall@planetonline.com"
] | MetlaVitall@planetonline.com |
1dbc9c1c2b15fcd6f27e5efecfae5da0675b87cc | 8fab8d8e5c34a31783a84e903566847c46719652 | /src/org/sum/obepat/obsever/push/ISubject.java | 145a49051ff230e19010d28810bfb38670d448f2 | [] | no_license | hustszh/despat | 60b3b410e5d8998bee8da17462951345b0c84a9c | f563ea04933c5b3a4538d0551fb6f12ad4b3e249 | refs/heads/master | 2021-01-16T23:21:05.233150 | 2017-02-27T02:10:28 | 2017-02-27T02:10:28 | 82,908,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 184 | java | package org.sum.obepat.obsever.push;
public interface ISubject {
void registerObserver(IObserver oberserver);
void removeObserver(IObserver oberserver);
void notifyObservers();
}
| [
"hustszh@github.com"
] | hustszh@github.com |
12ffae485dc84f1f27ff74b5c51ece62cbc6ccf4 | ad7069494ec45a4f812391c93b2d8f8ffaed61af | /src/main/java/az/Cwiczenie15/repository/TravelOffice.java | e8091aa50a359e7d3a00d2bd0d93e6675c055503 | [] | no_license | Accenture20210412/Lab15_AZ | e38110192afbb1394edf3652994ce63423b7522c | 564e77724a7ed51fb7b7cb2da3181210188da992 | refs/heads/master | 2023-04-18T06:29:08.630740 | 2021-04-26T12:56:27 | 2021-04-26T12:56:27 | 361,676,029 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,696 | java | package az.Cwiczenie15.repository;
import az.Cwiczenie15.model.AbroadTrip;
import az.Cwiczenie15.model.Customer;
import az.Cwiczenie15.model.DomesticTrip;
import az.Cwiczenie15.model.Trip;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Repository
public class TravelOffice {
private List<Customer> customers;
private List<Trip> trips;
public TravelOffice() {
customers = new ArrayList<>();
trips = new ArrayList<>();
AbroadTrip abroadTrip1 = new AbroadTrip(1L,"FloridaTrip",LocalDate.of(2020, 11, 12), LocalDate.of(2020, 12, 12), "Florida", 11000, 500 );
AbroadTrip abroadTrip2 = new AbroadTrip(2L,"Warsaw Dream", LocalDate.of(2020, 3, 10), LocalDate.of(2020, 3, 15), "Warszawa", 1000, 300);
DomesticTrip domesticTrip = new DomesticTrip(3L,"Way to Katowice", LocalDate.of(2021, 9, 12), LocalDate.of(2021, 9, 20), "Katowice", 500, 100);
Customer c1 = new Customer(1L,"Anna", "Kowalska","Naleczowska 10", abroadTrip1);
Customer c2 = new Customer(2L, "Katarzyna", "Walesa", "Piotrkowska 3", abroadTrip2);
Customer c3 = new Customer(3L, "Jakub", "Groch", "al. Jerozolimskie 110", domesticTrip);
customers.add(c1);
customers.add(c2);
customers.add(c3);
trips.add(abroadTrip1);
trips.add(abroadTrip2);
trips.add(domesticTrip);
}
public List<Customer> getCustomers() {
return customers;
}
public List<Trip> getTrips() {
return trips;
}
public Customer getCustomer(Long id){
Optional<Customer> customerById = customers.stream()
.filter(c -> c.getId().equals(id))
.findFirst();
if(customerById.isEmpty()){
return null;
}
return customerById.get();
}
public Customer getCustomer(String name){
Optional<Customer> customerById = customers.stream()
.filter(c -> c.getName() == name)
.findFirst();
if(customerById.isEmpty()){
return null;
}
return customerById.get();
}
public Trip getTrip(Long id){
Optional<Trip> tripById = trips.stream()
.filter(t -> t.getId().equals(id))
.findFirst();
if(tripById.isEmpty()){
return null;
}
return tripById.get();
}
public Trip getTrip(String name){
Optional<Trip> tripByName = trips.stream()
.filter(t -> t.getName().equals(name))
.findFirst();
if(tripByName.isEmpty()){
return null;
}
return tripByName.get();
}
public void addCustomer(Customer newCustomer) {
customers.add(newCustomer);
}
public void addCustomer(Long id, String name, String surname, String address) {
customers.add(new Customer(id, name, surname, address));
}
public void addCustomer(Long id, String name, String surname, String address, Trip trip) {
customers.add(new Customer(id, name, surname, address, trip));
}
public int deleteCustomersByName(String name){
int customersBeforeDeleting = customers.size();
customers = customers.stream()
.filter(c -> !c.getName().contains(name))
.collect(Collectors.toList());
return customersBeforeDeleting - customers.size();
}
public int deleteCustomersBySurname(String surname){
int customersBeforeDeleting = customers.size();
customers = customers.stream()
.filter(c -> !c.getSurname().contains(surname))
.collect(Collectors.toList());
return customersBeforeDeleting - customers.size();
}
public void deleteCustomer(Long id){
customers = customers.stream()
.filter(c -> !c.getId().equals(id))
.collect(Collectors.toList());
}
public void updateCustomer(Customer customer){
deleteCustomer(customer.getId());
customers.add(customer);
}
public void addTripToCustomer(Customer customer, Trip trip){
customer.setTrip(trip);
}
public void addTrip(Trip trip){
trips.add(trip);
}
public void deleteTrip(Long id){
trips = trips.stream()
.filter(t -> !t.getId().equals(id))
.collect(Collectors.toList());
}
public void updateTrip(Trip trip){
deleteTrip(trip.getId());
trips.add(trip);
}
public Trip findTripByName(String tripName) {
Optional<Trip> searchedTrip = trips.stream()
.filter(t -> t.getName() == tripName)
.findFirst();
return searchedTrip.isPresent() ? searchedTrip.get() : null;
}
public List<Trip> findTripsAfter(LocalDate localDate){
List<Trip> searchedTrips = trips.stream()
.filter(t -> t.getStart().isAfter(localDate))
.collect(Collectors.toList());
return searchedTrips;
}
public List<Trip> findTripsByDestination(String destination) {
List<Trip> searchedTrips = trips.stream()
.filter(t -> t.getDestination().contains(destination))
.collect(Collectors.toList());
return searchedTrips;
}
public String getCustomersInfo() {
String text="";
for(Customer customer : customers){
if(customer!=null) {
text += customer.toString();
}
}
return text;
}
}
| [
"agnieszkazabkowicz@gmail.com"
] | agnieszkazabkowicz@gmail.com |
044e89b1f9ead493564ab995b764c88f44a267e7 | 557abcb131f2e0aaa0d053846a2e7e2fa52b3e26 | /src/main/java/com/atguigu/dao/TtravelitemMapper.java | 3455403913f56a92c6d8ed5f1efd2e7eae61273e | [] | no_license | Mr-X-P/mbg | 9967d9bcf39096af5f097861cbbe3f6e035ce98d | 11ab5542ec9ccedcc93aa3be62d409c68b4319fa | refs/heads/master | 2023-02-11T02:42:46.819877 | 2021-01-08T10:41:03 | 2021-01-08T10:41:03 | 327,874,546 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 895 | java | package com.atguigu.dao;
import com.atguigu.pojo.Ttravelitem;
import com.atguigu.pojo.TtravelitemExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TtravelitemMapper {
long countByExample(TtravelitemExample example);
int deleteByExample(TtravelitemExample example);
int deleteByPrimaryKey(Integer id);
int insert(Ttravelitem record);
int insertSelective(Ttravelitem record);
List<Ttravelitem> selectByExample(TtravelitemExample example);
Ttravelitem selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") Ttravelitem record, @Param("example") TtravelitemExample example);
int updateByExample(@Param("record") Ttravelitem record, @Param("example") TtravelitemExample example);
int updateByPrimaryKeySelective(Ttravelitem record);
int updateByPrimaryKey(Ttravelitem record);
} | [
"2846098278@qq.com"
] | 2846098278@qq.com |
da2218f1ecee10350cdac33bbf809f48948e7b95 | 0d5b112bc4fa02dcd2d9b28530b9e92b63e450b0 | /laba2/src/com/company/Sort.java | b94f72564a2dd0371e9294ab6964e9a80e77244e | [] | no_license | zmilens/Zagashtokova_181-321 | 7fc6b141793f42203054676385a2fbb10696d3ff | 1c91c02dd0aaf531ec43cfe714c70e6997d09d17 | refs/heads/master | 2020-07-30T20:36:16.149171 | 2019-09-24T09:09:07 | 2019-09-24T09:09:07 | 210,352,344 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,609 | java | package com.company;
import com.company.Massive;
public class Sort {
private static long array[];
public static long[] SelectionSort(Massive arr) {
long start = System.currentTimeMillis();
Sort.array = arr.sarr().clone();
long min;
int index;
long swap;
for (int i = 0; i < array.length; i++) {
min = array[i];
index = i;
for (int j = i + 1; j < array.length; j++) {
if (array[j] < min) {
min = array[j];
index = j;
}
}
swap = array[index];
array[index] = array[i];
array[i] = swap;
}
System.out.println("Время " + (System.currentTimeMillis() - start));
for(int i=0; i<array.length;i++){
System.out.print(array[i]+" ");
}
return array;
}
public static long[] InsertionSort(Massive arr) {
long start = System.currentTimeMillis();
Sort.array = arr.sarr().clone();
long tmp;
for (int i = 1; i < array.length; i++) {
tmp = array[i];
int j;
for (j = i - 1; j >= 0; j--) {
if (array[j] > tmp) {
array[j + 1] = array[j];
} else break;
}
array[j + 1] = tmp;
}
System.out.println("Время " + (System.currentTimeMillis() - start));
for(int i=0; i<array.length;i++){
System.out.print(array[i]+" ");
}
return array;
}
} | [
"bariatmilena@mail.ru"
] | bariatmilena@mail.ru |
f604f16691686ae9219072456e3a7bc2527ca1ef | a5edbb5df541f1dda979f52c9a14fd6db5112323 | /boot-proj/boot-condition-config/src/main/java/com/boot/condition/bootconditionconfig/convert/EcodingConvert.java | ed9ea107322b297f9da4ccd5cd7dfc2207c412fd | [] | no_license | tuganglei/springboot | 85ffb5d18987802f84e3dd636c1f2879969bf525 | 4db5355706dc69a046725d4fa96a2c85cfe60fbb | refs/heads/master | 2020-04-02T08:33:22.211798 | 2018-11-23T02:49:21 | 2018-11-23T02:49:21 | 154,244,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 148 | java | package com.boot.condition.bootconditionconfig.convert;
/**
* @author tuganglei
* @date 2018/10/18 17:24
*/
public interface EcodingConvert {
}
| [
"1534387366@qq.com"
] | 1534387366@qq.com |
4082aa7f32fb22ff73434239e6c69ce3e0ed68f2 | a9c71c68959aee085361b79fb9740cdadcca5846 | /app/build/generated/not_namespaced_r_class_sources/debug/r/androidx/swiperefreshlayout/R.java | 5ed7fdb03e866372dac01eebed95e0f5f93d3f81 | [
"Apache-2.0"
] | permissive | elijellyeli/DevBytes | 3dfb1581569efd778f1f743985288dceab1bc460 | fef93105b05f6cfa85b6870c5c8c555e58289d52 | refs/heads/master | 2020-12-19T06:22:38.822810 | 2020-01-24T11:02:14 | 2020-01-24T11:02:14 | 235,643,571 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,458 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package androidx.swiperefreshlayout;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f030028;
public static final int font = 0x7f0300e8;
public static final int fontProviderAuthority = 0x7f0300ea;
public static final int fontProviderCerts = 0x7f0300eb;
public static final int fontProviderFetchStrategy = 0x7f0300ec;
public static final int fontProviderFetchTimeout = 0x7f0300ed;
public static final int fontProviderPackage = 0x7f0300ee;
public static final int fontProviderQuery = 0x7f0300ef;
public static final int fontStyle = 0x7f0300f0;
public static final int fontVariationSettings = 0x7f0300f1;
public static final int fontWeight = 0x7f0300f2;
public static final int ttcIndex = 0x7f030227;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f05006b;
public static final int notification_icon_bg_color = 0x7f05006c;
public static final int ripple_material_light = 0x7f050077;
public static final int secondary_text_default_material_light = 0x7f050079;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f060051;
public static final int compat_button_inset_vertical_material = 0x7f060052;
public static final int compat_button_padding_horizontal_material = 0x7f060053;
public static final int compat_button_padding_vertical_material = 0x7f060054;
public static final int compat_control_corner_material = 0x7f060055;
public static final int compat_notification_large_icon_max_height = 0x7f060056;
public static final int compat_notification_large_icon_max_width = 0x7f060057;
public static final int notification_action_icon_size = 0x7f0600c3;
public static final int notification_action_text_size = 0x7f0600c4;
public static final int notification_big_circle_margin = 0x7f0600c5;
public static final int notification_content_margin_start = 0x7f0600c6;
public static final int notification_large_icon_height = 0x7f0600c7;
public static final int notification_large_icon_width = 0x7f0600c8;
public static final int notification_main_column_padding_top = 0x7f0600c9;
public static final int notification_media_narrow_margin = 0x7f0600ca;
public static final int notification_right_icon_size = 0x7f0600cb;
public static final int notification_right_side_padding_top = 0x7f0600cc;
public static final int notification_small_icon_background_padding = 0x7f0600cd;
public static final int notification_small_icon_size_as_large = 0x7f0600ce;
public static final int notification_subtext_size = 0x7f0600cf;
public static final int notification_top_pad = 0x7f0600d0;
public static final int notification_top_pad_large_text = 0x7f0600d1;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f070076;
public static final int notification_bg = 0x7f070077;
public static final int notification_bg_low = 0x7f070078;
public static final int notification_bg_low_normal = 0x7f070079;
public static final int notification_bg_low_pressed = 0x7f07007a;
public static final int notification_bg_normal = 0x7f07007b;
public static final int notification_bg_normal_pressed = 0x7f07007c;
public static final int notification_icon_background = 0x7f07007d;
public static final int notification_template_icon_bg = 0x7f07007e;
public static final int notification_template_icon_low_bg = 0x7f07007f;
public static final int notification_tile_bg = 0x7f070080;
public static final int notify_panel_notification_icon_bg = 0x7f070081;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f08002f;
public static final int action_divider = 0x7f080031;
public static final int action_image = 0x7f080032;
public static final int action_text = 0x7f080038;
public static final int actions = 0x7f080039;
public static final int async = 0x7f08003f;
public static final int blocking = 0x7f080043;
public static final int chronometer = 0x7f08004d;
public static final int forever = 0x7f080073;
public static final int icon = 0x7f08007c;
public static final int icon_group = 0x7f08007d;
public static final int info = 0x7f080080;
public static final int italic = 0x7f080082;
public static final int line1 = 0x7f080088;
public static final int line3 = 0x7f080089;
public static final int normal = 0x7f08009b;
public static final int notification_background = 0x7f08009c;
public static final int notification_main_column = 0x7f08009d;
public static final int notification_main_column_container = 0x7f08009e;
public static final int right_icon = 0x7f0800b1;
public static final int right_side = 0x7f0800b2;
public static final int tag_transition_group = 0x7f0800e5;
public static final int tag_unhandled_key_event_manager = 0x7f0800e6;
public static final int tag_unhandled_key_listeners = 0x7f0800e7;
public static final int text = 0x7f0800e8;
public static final int text2 = 0x7f0800e9;
public static final int time = 0x7f0800f2;
public static final int title = 0x7f0800f3;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f09000e;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f0b0030;
public static final int notification_action_tombstone = 0x7f0b0031;
public static final int notification_template_custom_big = 0x7f0b0038;
public static final int notification_template_icon_group = 0x7f0b0039;
public static final int notification_template_part_chronometer = 0x7f0b003d;
public static final int notification_template_part_time = 0x7f0b003e;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f0e002c;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f0f0116;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0f0117;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0f0119;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0f011c;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0f011e;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0f01c8;
public static final int Widget_Compat_NotificationActionText = 0x7f0f01c9;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f030028 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] FontFamily = { 0x7f0300ea, 0x7f0300eb, 0x7f0300ec, 0x7f0300ed, 0x7f0300ee, 0x7f0300ef };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f0300e8, 0x7f0300f0, 0x7f0300f1, 0x7f0300f2, 0x7f030227 };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
}
}
| [
"elijellyeli@gmail.com"
] | elijellyeli@gmail.com |
4dd98095330ac7c88b2340c8e56a8d3c31fe6ece | 594eeb3f538cfcd9d863e5432ada8a81cadfa1a2 | /cmp-common/cmp-common-util/src/main/java/cmp/common/util/coordinate/CoordinateConvertUtil.java | 6fb4687a6b77e3488c68cbebd07cd2631e11703a | [] | no_license | dmgylm/cmp-parent | 34bce70fa60c7d434c2ba8414a2bb021b8ddc65a | fec879b4b38aa5ea6730a45a0d5a5f13067b3320 | refs/heads/master | 2020-05-17T23:49:42.092156 | 2019-04-30T07:05:23 | 2019-04-30T07:05:23 | 184,043,500 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,924 | java | package cmp.common.util.coordinate;
import java.math.BigDecimal;
/**
* 百度坐标与火星坐标转换
*
* @author lyh
*
*/
public class CoordinateConvertUtil {
private static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
/**
* 对double类型数据保留小数点后多少位 高德地图转码返回的就是 小数点后6位,为了统一封装一下
*
* @param digit
* 位数
* @param in
* 输入
* @return 保留小数位后的数
*/
static double dataDigit(int digit, double in) {
return new BigDecimal(in).setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
}
/**
* 将火星坐标转变成百度坐标
*
* @param lngLat_gd
* 火星坐标(高德、腾讯地图坐标等)
* @return 百度坐标
*/
public static CoordinateVO bd_encrypt(CoordinateVO lngLat_gd) {
double x = lngLat_gd.getLongitude(), y = lngLat_gd.getLantitude();
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
return new CoordinateVO(dataDigit(6, z * Math.cos(theta) + 0.0065), dataDigit(6, z * Math.sin(theta) + 0.006));
}
/**
* 将百度坐标转变成火星坐标
*
* @param lngLat_bd
* 百度坐标(百度地图坐标)
* @return 火星坐标(高德、腾讯地图等)
*/
public static CoordinateVO bd_decrypt(CoordinateVO lngLat_bd) {
double x = lngLat_bd.getLongitude() - 0.0065, y = lngLat_bd.getLantitude() - 0.006;
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
return new CoordinateVO(dataDigit(6, z * Math.cos(theta)), dataDigit(6, z * Math.sin(theta)));
}
// 测试代码
public static void main(String[] args) {
CoordinateVO lngLat_bd = new CoordinateVO(120, 30);
System.out.println(bd_decrypt(lngLat_bd));
}
}
| [
"1479159367@qq.com"
] | 1479159367@qq.com |
7feac4e083b8a45a25fe855505b571f41f91d0ae | 5eae683a6df0c4b97ab1ebcd4724a4bf062c1889 | /bin/ext-commerce/customercouponservices/testsrc/de/hybris/platform/customercouponservices/impl/DefaultCustomerCouponServiceUnitTest.java | 092f5b7feb098811e2c9311aadbb11640e02ebd5 | [] | no_license | sujanrimal/GiftCardProject | 1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb | e0398eec9f4ec436d20764898a0255f32aac3d0c | refs/heads/master | 2020-12-11T18:05:17.413472 | 2020-01-17T18:23:44 | 2020-01-17T18:23:44 | 233,911,127 | 0 | 0 | null | 2020-06-18T15:26:11 | 2020-01-14T18:44:18 | null | UTF-8 | Java | false | false | 5,146 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.customercouponservices.impl;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.basecommerce.model.site.BaseSiteModel;
import de.hybris.platform.core.model.c2l.LanguageModel;
import de.hybris.platform.core.model.user.CustomerModel;
import de.hybris.platform.couponservices.dao.CouponDao;
import de.hybris.platform.customercouponservices.daos.CouponNotificationDao;
import de.hybris.platform.customercouponservices.daos.CustomerCouponDao;
import de.hybris.platform.customercouponservices.model.CouponNotificationModel;
import de.hybris.platform.customercouponservices.model.CustomerCouponModel;
import de.hybris.platform.servicelayer.i18n.CommonI18NService;
import de.hybris.platform.servicelayer.model.ModelService;
import de.hybris.platform.servicelayer.user.UserService;
import de.hybris.platform.site.BaseSiteService;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import junit.framework.Assert;
/**
* Unit test for {@link DefaultCustomerCouponService}
*/
@UnitTest
public class DefaultCustomerCouponServiceUnitTest
{
private DefaultCustomerCouponService customerCouponService;
private static final String COUPON_ID = "TESTID";
private List couponList;
@Mock
private UserService userSerivce;
@Mock
private BaseSiteService baseSiteService;
@Mock
private ModelService modelService;
@Mock
private CouponDao couponDao;
@Mock
private CustomerCouponDao customerCouponDao;
@Mock
private CouponNotificationDao couponNotificationDao;
@Mock
private CommonI18NService commonI18NService;
@Mock
private CouponNotificationModel couponNotificationModel;
@Mock
private CustomerModel Customer;
@Before
public void prepare()
{
MockitoAnnotations.initMocks(this);
customerCouponService = new DefaultCustomerCouponService();
final CustomerModel customerModel = new CustomerModel();
customerModel.setCustomerID("abc");
customerModel.setName("lilei");
final CustomerModel customerTest = new CustomerModel();
customerModel.setCustomerID("abcd");
customerModel.setName("hanmeimei");
Mockito.doReturn(customerModel).when(userSerivce).getCurrentUser();
final BaseSiteModel baseSite = new BaseSiteModel();
baseSite.setUid("electronics");
Mockito.doReturn(baseSite).when(baseSiteService).getCurrentBaseSite();
couponList = new ArrayList();
customerCouponService.setBaseSiteService(baseSiteService);
customerCouponService.setUserService(userSerivce);
customerCouponService.setModelService(modelService);
customerCouponService.setCouponNotificationDao(couponNotificationDao);
customerCouponService.setCustomerCouponDao(customerCouponDao);
final CustomerCouponModel customerCoupon = new CustomerCouponModel();
customerCoupon.setCouponId(COUPON_ID);
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, -10);
customerCoupon.setStartDate(cal.getTime());
customerCoupon.setEndDate(cal.getTime());
final LanguageModel language = new LanguageModel();
language.setIsocode("en");
customerCouponService.setCommonI18NService(commonI18NService);
couponNotificationModel.setCustomer(customerTest);
couponNotificationModel.setCustomerCoupon(customerCoupon);
final List<CouponNotificationModel> couponNotificationList = new ArrayList<CouponNotificationModel>();
couponNotificationList.add(couponNotificationModel);
Mockito.when(couponNotificationModel.getCustomer()).thenReturn(Customer);
Mockito.when(Customer.getCustomerID()).thenReturn("abc");
Mockito.when(commonI18NService.getCurrentLanguage()).thenReturn(language);
Mockito.when(couponNotificationDao.findCouponNotificationByCouponCode(COUPON_ID)).thenReturn(couponNotificationList);
Mockito.doReturn(customerCoupon).when(couponDao).findCouponById(Mockito.anyString());
Mockito.when(customerCouponDao.findAssignableCoupons(Mockito.any(), Mockito.anyString())).thenReturn(couponList);
Mockito.when(customerCouponDao.findAssignedCouponsByCustomer(Mockito.any(), Mockito.anyString())).thenReturn(couponList);
customerCouponService.setCouponDao(couponDao);
}
@Test
public void testSaveCouponNotification()
{
customerCouponService.saveCouponNotification(COUPON_ID);
Mockito.verify(modelService, Mockito.times(1)).save(Mockito.any());
}
@Test
public void testGetCoupon()
{
final CustomerModel customerModel = new CustomerModel();
Assert.assertEquals(couponList, customerCouponService.getAssignableCustomerCoupons(customerModel, COUPON_ID));
Assert.assertEquals(couponList, customerCouponService.getAssignedCustomerCouponsForCustomer(customerModel, COUPON_ID));
}
}
| [
"travis.d.crawford@accenture.com"
] | travis.d.crawford@accenture.com |
77b27f7b9df94ea77d6d7bec8b6d8472d1c3482f | ff093afb62b8bdb37e77120ede4a0c9f7fe2aeca | /src/nandy.java | c64f4fe62905ad965ebfff4b6416c31e604e4549 | [] | no_license | Sakthi-Sekar/Employee-Records | bb0fe803e87722d98d4275425b7abd532557122d | 9c6f1a044beeedc3b9d614bbd6ff772b166e6d17 | refs/heads/master | 2020-06-26T11:08:40.411180 | 2019-07-30T09:08:07 | 2019-07-30T09:08:07 | 199,615,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 296 | java |
public class nandy {
public static void main(String[] args) {
String[] words = new String[3];
words[0] = "Hello";
words[1] = "to";
words[2] = "you";
System.out.println(words[1]);
String[] fruits = {"apple", "grapes", "kiwi", "pear"};
for(String fruit:fruits)
System.out.println(fruit);
}
}
| [
"sakthi.sekar@atmecs.com"
] | sakthi.sekar@atmecs.com |
b6cb8189dadc2fd9a67fa37ad9b243f8bd388c2f | 5479be2cf76924ce400b2d0374717307442d0584 | /src/main/java/com/vooc/Utils/DateCommon.java | c6c668b9a4e31abc1896fd39b5e107e5e6864bb2 | [] | no_license | freeac/voocauto | 8569c74931a4d090143ae5987808289908123424 | 734bb2af030f3282eaf005bba9e33b02ffd895ee | refs/heads/master | 2022-07-08T22:07:22.216994 | 2019-11-12T05:46:08 | 2019-11-12T05:46:08 | 220,907,985 | 0 | 0 | null | 2021-06-04T02:18:28 | 2019-11-11T05:31:12 | HTML | UTF-8 | Java | false | false | 321 | java | package com.vooc.Utils;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateCommon {
public static String DateFormat(String format) {
Date date = new Date();
SimpleDateFormat ft = new SimpleDateFormat(format);
String content = String.format("%s", ft.format(date));
return content;
}
}
| [
"nhanvuong.tbqn@hotmail.com"
] | nhanvuong.tbqn@hotmail.com |
60c0b910b4940812889974433205f1b254f1f43e | de0f1760723398b5f2c233a2e6d8ee05b037da6c | /src/IO/System_IO/SystemIn.java | 41509751a9b9a183dc5c2456b58e24d462ad83cd | [] | no_license | alsdn2025/JavaLearn | ee0d5e2c235360060f3ce67d2058ad6a93883528 | 8a7de2109edb753661a2cdf3a1e58324ea516287 | refs/heads/main | 2023-03-20T23:48:45.881919 | 2021-03-17T12:05:53 | 2021-03-17T12:05:53 | 341,617,058 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 806 | java | package IO.System_IO;
import java.io.IOException;
import java.io.InputStream;
import java.io.SequenceInputStream;
public class SystemIn {
public static void main(String[] args) throws IOException {
System.out.println("==선택==");
System.out.println("1 ==");
System.out.println(" 2 ==");
System.out.println(" 3 ==");
char inputChar = (char)System.in.read();
switch (inputChar) {
case '1' :
System.out.println("1번 선택스");
break;
default:
break;
}
InputStream SystemIn = System.in;
byte[] datas = new byte[100];
System.out.print("이름 : ");
int nameBytes = SystemIn.read(datas);
System.out.printf("중단점");
}
}
| [
"alsdn202530@gmail.com"
] | alsdn202530@gmail.com |
972aea7e6419b04be3b954fa6ec34cdc80bdb42c | a93c579f1bedf2554f6663948a67b4f000e104bd | /CoffeeShop/src/coffeeshop/CaramelSauceAddition.java | 29498db9eeef9d1f6995a73d4b7caa9346a0f543 | [] | no_license | libliuis/CoffeeShop | fafe28098f3c4213368bb1c0686fd161cd290c04 | 8c37d0443acf2edb2310ac387388ece0c1bf3620 | refs/heads/master | 2022-12-10T16:28:08.005666 | 2020-08-27T12:53:19 | 2020-08-27T12:53:19 | 290,773,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package coffeeshop;
public class CaramelSauceAddition extends Addition{
public CaramelSauceAddition(int number) {
this.type = "CaramelSauce";
this.single_price = 9;
this.number = 1;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
1b1a67de4f723143651b303d0c6c765109160ee9 | 55ac4d5f53e1cb911e6c19dcd9bebfabbc291014 | /dao/src/main/java/org/thingsboard/server/dao/model/sql/AssetProfileEntity.java | 36f7b40487866c386d14629e37511478a87a2748 | [
"Apache-2.0"
] | permissive | deaflynx/thingsboard | cdfced7af31b7850f779ca5af1eb7a1d8e564a9a | 4cc7e7b373e55aed49df7df7f97813700dabe2fa | refs/heads/master | 2023-09-01T21:38:17.632010 | 2022-10-24T15:25:16 | 2022-10-24T15:25:16 | 241,882,921 | 0 | 0 | Apache-2.0 | 2022-10-25T08:51:26 | 2020-02-20T12:50:48 | Java | UTF-8 | Java | false | false | 4,907 | java | /**
* Copyright © 2016-2022 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.thingsboard.server.dao.model.sql;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.thingsboard.server.common.data.asset.AssetProfile;
import org.thingsboard.server.common.data.id.AssetProfileId;
import org.thingsboard.server.common.data.id.DashboardId;
import org.thingsboard.server.common.data.id.RuleChainId;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.dao.model.BaseSqlEntity;
import org.thingsboard.server.dao.model.ModelConstants;
import org.thingsboard.server.dao.model.SearchTextEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.UUID;
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = ModelConstants.ASSET_PROFILE_COLUMN_FAMILY_NAME)
public final class AssetProfileEntity extends BaseSqlEntity<AssetProfile> implements SearchTextEntity<AssetProfile> {
@Column(name = ModelConstants.ASSET_PROFILE_TENANT_ID_PROPERTY)
private UUID tenantId;
@Column(name = ModelConstants.ASSET_PROFILE_NAME_PROPERTY)
private String name;
@Column(name = ModelConstants.ASSET_PROFILE_IMAGE_PROPERTY)
private String image;
@Column(name = ModelConstants.ASSET_PROFILE_DESCRIPTION_PROPERTY)
private String description;
@Column(name = ModelConstants.SEARCH_TEXT_PROPERTY)
private String searchText;
@Column(name = ModelConstants.ASSET_PROFILE_IS_DEFAULT_PROPERTY)
private boolean isDefault;
@Column(name = ModelConstants.ASSET_PROFILE_DEFAULT_RULE_CHAIN_ID_PROPERTY, columnDefinition = "uuid")
private UUID defaultRuleChainId;
@Column(name = ModelConstants.ASSET_PROFILE_DEFAULT_DASHBOARD_ID_PROPERTY)
private UUID defaultDashboardId;
@Column(name = ModelConstants.ASSET_PROFILE_DEFAULT_QUEUE_NAME_PROPERTY)
private String defaultQueueName;
@Column(name = ModelConstants.EXTERNAL_ID_PROPERTY)
private UUID externalId;
public AssetProfileEntity() {
super();
}
public AssetProfileEntity(AssetProfile assetProfile) {
if (assetProfile.getId() != null) {
this.setUuid(assetProfile.getId().getId());
}
if (assetProfile.getTenantId() != null) {
this.tenantId = assetProfile.getTenantId().getId();
}
this.setCreatedTime(assetProfile.getCreatedTime());
this.name = assetProfile.getName();
this.image = assetProfile.getImage();
this.description = assetProfile.getDescription();
this.isDefault = assetProfile.isDefault();
if (assetProfile.getDefaultRuleChainId() != null) {
this.defaultRuleChainId = assetProfile.getDefaultRuleChainId().getId();
}
if (assetProfile.getDefaultDashboardId() != null) {
this.defaultDashboardId = assetProfile.getDefaultDashboardId().getId();
}
this.defaultQueueName = assetProfile.getDefaultQueueName();
if (assetProfile.getExternalId() != null) {
this.externalId = assetProfile.getExternalId().getId();
}
}
@Override
public String getSearchTextSource() {
return name;
}
@Override
public void setSearchText(String searchText) {
this.searchText = searchText;
}
public String getSearchText() {
return searchText;
}
@Override
public AssetProfile toData() {
AssetProfile assetProfile = new AssetProfile(new AssetProfileId(this.getUuid()));
assetProfile.setCreatedTime(createdTime);
if (tenantId != null) {
assetProfile.setTenantId(TenantId.fromUUID(tenantId));
}
assetProfile.setName(name);
assetProfile.setImage(image);
assetProfile.setDescription(description);
assetProfile.setDefault(isDefault);
assetProfile.setDefaultQueueName(defaultQueueName);
if (defaultRuleChainId != null) {
assetProfile.setDefaultRuleChainId(new RuleChainId(defaultRuleChainId));
}
if (defaultDashboardId != null) {
assetProfile.setDefaultDashboardId(new DashboardId(defaultDashboardId));
}
if (externalId != null) {
assetProfile.setExternalId(new AssetProfileId(externalId));
}
return assetProfile;
}
}
| [
"ikulikov@thingsboard.io"
] | ikulikov@thingsboard.io |
0c02c6575dc42659b59a6f847d41784f6ca5f3d8 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /DVC-AN20_EMUI10.1.1/src/main/java/android/nfc/tech/NfcF.java | 1e3fa5937099a5b45a335c337874f06dcee3a592 | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,895 | java | package android.nfc.tech;
import android.nfc.Tag;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import java.io.IOException;
public final class NfcF extends BasicTagTechnology {
public static final String EXTRA_PMM = "pmm";
public static final String EXTRA_SC = "systemcode";
private static final String TAG = "NFC";
private byte[] mManufacturer = null;
private byte[] mSystemCode = null;
@Override // android.nfc.tech.BasicTagTechnology, java.io.Closeable, android.nfc.tech.TagTechnology, java.lang.AutoCloseable
public /* bridge */ /* synthetic */ void close() throws IOException {
super.close();
}
@Override // android.nfc.tech.BasicTagTechnology, android.nfc.tech.TagTechnology
public /* bridge */ /* synthetic */ void connect() throws IOException {
super.connect();
}
@Override // android.nfc.tech.BasicTagTechnology, android.nfc.tech.TagTechnology
public /* bridge */ /* synthetic */ Tag getTag() {
return super.getTag();
}
@Override // android.nfc.tech.BasicTagTechnology, android.nfc.tech.TagTechnology
public /* bridge */ /* synthetic */ boolean isConnected() {
return super.isConnected();
}
@Override // android.nfc.tech.BasicTagTechnology, android.nfc.tech.TagTechnology
public /* bridge */ /* synthetic */ void reconnect() throws IOException {
super.reconnect();
}
public static NfcF get(Tag tag) {
if (!tag.hasTech(4)) {
return null;
}
try {
return new NfcF(tag);
} catch (RemoteException e) {
return null;
}
}
public NfcF(Tag tag) throws RemoteException {
super(tag, 4);
Bundle extras = tag.getTechExtras(4);
if (extras != null) {
this.mSystemCode = extras.getByteArray(EXTRA_SC);
this.mManufacturer = extras.getByteArray(EXTRA_PMM);
}
}
public byte[] getSystemCode() {
return this.mSystemCode;
}
public byte[] getManufacturer() {
return this.mManufacturer;
}
public byte[] transceive(byte[] data) throws IOException {
return transceive(data, true);
}
public int getMaxTransceiveLength() {
return getMaxTransceiveLengthInternal();
}
public void setTimeout(int timeout) {
try {
if (this.mTag.getTagService().setTimeout(4, timeout) != 0) {
throw new IllegalArgumentException("The supplied timeout is not valid");
}
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);
}
}
public int getTimeout() {
try {
return this.mTag.getTagService().getTimeout(4);
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);
return 0;
}
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
9587f8907c512107e00ddbff6ed804ae5e7263e1 | d3033d4ebec9cc954abfd06c340171c50b25b771 | /OvertimeRequest/src/models/Sessions.java | 28251215a635f44c3801ff6d0dd3c03a73042ad6 | [] | no_license | bootcamp23-mii/Overtime | 0d37fee3902050314a3da45c1d23a78e3d23628b | cabb8b2bc809543b3bc3ab2256f2b79cc5f7ed44 | refs/heads/master | 2020-04-26T03:07:52.704713 | 2019-03-11T03:48:50 | 2019-03-11T03:48:50 | 173,256,641 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 685 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package models;
/**
*
* @author Lusiana
*/
public class Sessions {
private static String id;
private static String idtab = "";
public Sessions() {
}
public static String getId() {
return id;
}
public static void setId(String id) {
Sessions.id = id;
}
public static String getIdtab() {
return idtab;
}
public static void setIdtab(String idtab) {
Sessions.idtab = idtab;
}
}
| [
"10lestarilusiana@gmail.com"
] | 10lestarilusiana@gmail.com |
f0c8854196461b1448cc562367a232aafdc7eca1 | 2d95c75106821e111ec7d1daea7a60597ae119fe | /spring-official/src/main/java/com/xjj/e_13_async/GitHubLookupService.java | a17515b326ce7e4ee6a38e0ae21429290319c2d7 | [] | no_license | LIJIEJIE519/spring-study | 68fd1817efa7591c391fe28b642cc131284b2f1e | 07376a60b45ec6b4413606a0ef72a03ad924848f | refs/heads/main | 2023-01-22T04:13:47.706613 | 2020-12-05T13:16:28 | 2020-12-05T13:16:28 | 318,780,661 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,125 | java | package com.xjj.e_13_async;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.concurrent.CompletableFuture;
/**
* @Author LJ
* @Date 2020/11/29
* msg
*/
@Service
public class GitHubLookupService {
private static final Logger log = LoggerFactory.getLogger(GitHubLookupService.class);
private final RestTemplate template;
public GitHubLookupService(RestTemplateBuilder template) {
this.template = template.build();
}
@Async
public CompletableFuture<User> findUser(String user) throws InterruptedException {
log.info("查找:" + user);
String url = String.format("https://api.github.com/users/%s", user);
// 请求远程rest服务
User results = template.getForObject(url, User.class);
Thread.sleep(1000L);
// 请求完成
return CompletableFuture.completedFuture(results);
}
}
| [
"991866448@qq.com"
] | 991866448@qq.com |
c980948a3487bf876e84844de6e9720ec7d39643 | a3059984c0f005b54b8010fb25540021f295b368 | /src/sda/com/DesignPatterns/a_creation/AbstractFactory/GraficsUI.java | a0f69d72ccd9a3d1c77842cfdaaf6a8da893bd88 | [] | no_license | TeaIceLemon/Jav21wroP1 | a0d09a7f3aa6e21af41c6e2823344a42baee04dd | 195aa62fa1d53c46b55e2a44c7a87c81ccbea475 | refs/heads/master | 2020-05-30T13:59:25.199954 | 2019-07-06T07:47:56 | 2019-07-06T07:47:56 | 189,775,629 | 0 | 0 | null | 2019-07-06T07:47:57 | 2019-06-01T20:38:46 | Java | UTF-8 | Java | false | false | 200 | java | package sda.com.DesignPatterns.a_creation.AbstractFactory;
public class GraficsUI {
public void drawWindow(AbstractFacoryOfWidgets factory){
Window window = factory.makeWindow();
}
}
| [
"piotr.wieczorek1993@gmail.com"
] | piotr.wieczorek1993@gmail.com |
6bac84f020a091e549760aa0de13aa11f186668b | 4a03170802f721f2fb68bac793551b11ed0728cb | /src/main/java/com/example/rsocket/model/GreetingResponse.java | 7ec1a3bd965221894c562dcdafda6e1a70eddf3b | [] | no_license | Piseth-Khorn/rsocket-server | 8f40542d3c616cf22ebc98735e9991ceff92e693 | 47102bccd09e19c5a5df8e2e5d0ed65a5cef7814 | refs/heads/master | 2023-05-31T11:48:52.470493 | 2021-06-28T19:40:28 | 2021-06-28T19:40:28 | 381,423,774 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 232 | java | package com.example.rsocket.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GreetingResponse {
private String greeting;
}
| [
"piseth.khon@allweb.com.kh"
] | piseth.khon@allweb.com.kh |
d9fc214a51f3a2b45e1555cfd50e31a5ecfded99 | a494b35558bc2bbb0f4c137da934ea86f3c72fe2 | /src/main/java/itgarden/repository/clinic/C_NutritionalStatusRepository.java | b948a4e3eaff89ca4cd8cc7a7d41d8dae3788528 | [] | no_license | belayetsumon/bims | 067487d832dcb1fccbd6da61ee36ec0672bc6879 | 5acc0dee4ebe742cd014230a525d9ef5c0c584d6 | refs/heads/master | 2021-06-28T09:25:03.402445 | 2020-12-31T17:34:26 | 2020-12-31T17:34:26 | 188,711,616 | 0 | 0 | null | 2020-12-31T17:42:59 | 2019-05-26T17:18:37 | HTML | UTF-8 | Java | false | false | 655 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package itgarden.repository.clinic;
import itgarden.model.clinic.C_NutritionalStatus;
import itgarden.model.homevisit.MotherMasterData;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
/**
*
* @author User
*/
public interface C_NutritionalStatusRepository extends JpaRepository<C_NutritionalStatus, Long> {
List<C_NutritionalStatus> findBymotherMasterCode(MotherMasterData motherMasterData);
}
| [
"belayetsumon@gmail.com"
] | belayetsumon@gmail.com |
1788e6e84d44cbbcb0d4714e13ed79f12f219dc2 | 98d313cf373073d65f14b4870032e16e7d5466f0 | /gradle-open-labs/example/src/main/java/se/molybden/Class14042.java | 59c4b43779904fffb661abc7bad83692a9fb61b4 | [] | no_license | Molybden/gradle-in-practice | 30ac1477cc248a90c50949791028bc1cb7104b28 | d7dcdecbb6d13d5b8f0ff4488740b64c3bbed5f3 | refs/heads/master | 2021-06-26T16:45:54.018388 | 2016-03-06T20:19:43 | 2016-03-06T20:19:43 | 24,554,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 110 | java |
public class Class14042{
public void callMe(){
System.out.println("called");
}
}
| [
"jocce.nilsson@gmail.com"
] | jocce.nilsson@gmail.com |
0c4ea0bdd1425ff8b0293249bdd8e36596d6c779 | e1d9c8cf9b42e9dc397b550abe1d4e3a71d29ae5 | /translational-data-analytics-challenge/libraries/mysql-connector-java/src/testsuite/regression/SubqueriesRegressionTest.java | ddec6f46731c3c404bbc780e4d8e2348af63a88c | [] | no_license | ts826848/hacks | 1e56031803f47e0de619eac22d112a1ba6e6def7 | 6c62244133effa57549565839752315d4c9cfad8 | refs/heads/master | 2021-05-30T12:00:01.503633 | 2015-11-20T19:56:40 | 2015-11-20T19:56:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,630 | java | /*
Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
There are special exceptions to the terms and conditions of the GPLv2 as it is applied to
this software, see the FOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception.html>.
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this
program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
Floor, Boston, MA 02110-1301 USA
*/
package testsuite.regression;
import testsuite.BaseTestCase;
/**
* Tests SubQueries on MySQL > 4.1
*/
public class SubqueriesRegressionTest extends BaseTestCase {
private final static int REPETITIONS = 100;
/**
*/
public SubqueriesRegressionTest(String name) {
super(name);
}
/*
* (non-Javadoc)
*
* @see junit.framework.TestCase#setUp()
*/
@Override
public void setUp() throws Exception {
super.setUp();
createTables();
}
/*
* (non-Javadoc)
*
* @see junit.framework.TestCase#tearDown()
*/
@Override
public void tearDown() throws Exception {
super.tearDown();
}
/**
* Runs all test cases in this test suite
*
* @param args
*/
public static void main(String[] args) {
junit.textui.TestRunner.run(SubqueriesRegressionTest.class);
}
public void testSubQuery1() throws Exception {
if (versionMeetsMinimum(4, 1)) {
for (int i = 0; i < REPETITIONS; i++) {
this.rs = this.stmt
.executeQuery("select t3.colA from t3, t1 where t3.colA = 'bbbb' and t3.colB = t1.colA and exists (select 'X' from t2 where t2.colB = t1.colB)");
assertTrue(this.rs.next());
assertTrue("bbbb".equals(this.rs.getString(1)));
assertTrue(!this.rs.next());
}
}
}
public void testSubQuery2() throws Exception {
if (versionMeetsMinimum(4, 1)) {
for (int i = 0; i < REPETITIONS; i++) {
this.rs = this.stmt
.executeQuery("select t3.colA from t3, t1 where t3.colA = 'bbbb' and t3.colB = t1.colA and exists (select 'X' from t2 where t2.colB = 2)");
assertTrue(this.rs.next());
assertTrue("bbbb".equals(this.rs.getString(1)));
assertTrue(!this.rs.next());
}
}
}
public void testSubQuery3() throws Exception {
if (versionMeetsMinimum(4, 1)) {
for (int i = 0; i < REPETITIONS; i++) {
this.rs = this.stmt.executeQuery("select * from t1 where t1.colA = 'efgh' and exists (select 'X' from t2 where t2.colB = t1.colB)");
assertTrue(this.rs.next());
assertTrue("efgh".equals(this.rs.getString(1)));
assertTrue("2".equals(this.rs.getString(2)));
assertTrue(!this.rs.next());
}
}
}
public void testSubQuery4() throws Exception {
// not really a subquery, but we want to have this in our testsuite
if (versionMeetsMinimum(4, 1)) {
for (int i = 0; i < REPETITIONS; i++) {
this.rs = this.stmt.executeQuery("select colA, '' from t2 union select colA, colB from t3");
assertTrue(this.rs.next());
assertTrue("type1".equals(this.rs.getString(1)));
assertTrue("".equals(this.rs.getString(2)));
assertTrue(this.rs.next());
assertTrue("type2".equals(this.rs.getString(1)));
assertTrue("".equals(this.rs.getString(2)));
assertTrue(this.rs.next());
assertTrue("type3".equals(this.rs.getString(1)));
assertTrue("".equals(this.rs.getString(2)));
assertTrue(this.rs.next());
assertTrue("aaaa".equals(this.rs.getString(1)));
assertTrue("'" + this.rs.getString(2) + "' != expected of 'abcd'", "abcd".equals(this.rs.getString(2)));
assertTrue(this.rs.next());
assertTrue("bbbb".equals(this.rs.getString(1)));
assertTrue("efgh".equals(this.rs.getString(2)));
assertTrue(this.rs.next());
assertTrue("cccc".equals(this.rs.getString(1)));
assertTrue("'" + this.rs.getString(2) + "' != expected of 'ijkl'", "ijkl".equals(this.rs.getString(2)));
assertTrue(!this.rs.next());
}
}
}
public void testSubQuery5() throws Exception {
if (versionMeetsMinimum(4, 1)) {
for (int i = 0; i < REPETITIONS; i++) {
this.rs = this.stmt.executeQuery("select t1.colA from t1, t4 where t4.colA = t1.colA and exists (select 'X' from t2 where t2.colA = t4.colB)");
assertTrue(this.rs.next());
assertTrue("abcd".equals(this.rs.getString(1)));
assertTrue(this.rs.next());
assertTrue("efgh".equals(this.rs.getString(1)));
assertTrue(this.rs.next());
assertTrue("ijkl".equals(this.rs.getString(1)));
assertTrue(!this.rs.next());
}
}
}
private void createTables() throws Exception {
createTable("t1", "(colA varchar(10), colB decimal(3,0))");
createTable("t2", "(colA varchar(10), colB varchar(10))");
createTable("t3", "(colA varchar(10), colB varchar(10))");
createTable("t4", "(colA varchar(10), colB varchar(10))");
this.stmt.executeUpdate("insert into t1 values ('abcd', 1), ('efgh', 2), ('ijkl', 3)");
this.stmt.executeUpdate("insert into t2 values ('type1', '1'), ('type2', '2'), ('type3', '3')");
this.stmt.executeUpdate("insert into t3 values ('aaaa', 'abcd'), ('bbbb', 'efgh'), ('cccc', 'ijkl')");
this.stmt.executeUpdate("insert into t4 values ('abcd', 'type1'), ('efgh', 'type2'), ('ijkl', 'type3')");
}
}
| [
"aw1621107@gmail.com"
] | aw1621107@gmail.com |
8588f39ed1b47576dc1cb3a66e89541111a1d6f0 | 83109271e30c688b713d3c9e4083aa347f0fd11a | /creational/abstractFactory/Location.java | 98fb650f2f5459cfac79d8254d1d0e65ffc935c1 | [] | no_license | pulluankur/SingletonDesignPattern | efba7a3254ff6eb4d4e91cc2f98b044f9851380a | 3fc03201e9a3365cc625ce36811bec184dcd79fd | refs/heads/master | 2021-05-19T19:11:18.876734 | 2020-04-13T04:04:23 | 2020-04-13T04:04:23 | 252,077,719 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 94 | java | package com.example.hateoas.abstractFactory;
public enum Location {
DEFAULT, USA, ASIA
}
| [
"mvwt9320@orange.com"
] | mvwt9320@orange.com |
2c381a312957c92cf0520a7d90ce663747c338d0 | 5a87618b2c12074dbce41f3b8b37f8555a135bc0 | /src/main/java/com/zifeiyu/client/service/ShopsService.java | af13fc409dac3c9ea2b7f9c3506dc207aa0f288f | [] | no_license | HelloSummer5/zifeiyu-client | 7fa2677f4100a39a4db1161f1824724d0aab9834 | 3d2087615d7dad7599ebb3734abaaf86f69d68cb | refs/heads/master | 2020-04-14T11:33:57.182787 | 2019-01-16T13:29:11 | 2019-01-16T13:29:11 | 163,817,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package com.zifeiyu.client.service;
import com.zifeiyu.client.model.DO.ShopsDO;
import com.zifeiyu.client.model.DTO.ShopsQueryDTO;
import java.util.List;
public interface ShopsService {
List<ShopsDO> listShopSnapshots(ShopsQueryDTO shopsQuery);
}
| [
"532791689@qq.com"
] | 532791689@qq.com |
374796aa4a96d92487ff9233825de9bd2a9df1ea | d2828acaa7297c0bf5247f64a57b8c14e8f7dcf7 | /afd/SimuladorAFD.java | fe7794166d2916d7a2ec45d8064496022c2eb9d6 | [] | no_license | DiegoBernal17/Automatas | f3025272609092b89fb3c0a9b97cbc8c8098d30e | cd52a8fb36f5c80ffd738013be72b2724b7392cd | refs/heads/master | 2021-08-19T16:08:28.968917 | 2017-11-26T21:01:18 | 2017-11-26T21:01:18 | 105,493,360 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,941 | java | package afd;
import javax.swing.*;
import java.applet.Applet;
import java.awt.*;
import java.awt.geom.*;
public class SimuladorAFD extends Applet {
private boolean aceptacion;
private String cadena;
private String cadena_auxiliar;
private char caracter_siguiente;
private Graphics2D g2;
public SimuladorAFD() {
this.cadena = "ini";
this.cadena_auxiliar = "";
}
public void paint(Graphics g) {
setSize(500,300);
g2 = (Graphics2D) g;
// Estados de aceptacion
g2.setColor(Color.gray);
g2.fill(new Ellipse2D.Double(176,86,38,38));
g2.fill(new Ellipse2D.Double(336,26,38,38));
g2.fill(new Ellipse2D.Double(316,186,38,38));
g2.fill(new Ellipse2D.Double(236,176,38,38));
// Estados
g2.setColor(Color.lightGray);
g2.fill(new Ellipse2D.Double(100,100,30,30));
g2.fill(new Ellipse2D.Double(180,90,30,30));
g2.fill(new Ellipse2D.Double(160,144,30,30));
g2.fill(new Ellipse2D.Double(96,180,30,30));
g2.fill(new Ellipse2D.Double(250,50,30,30));
g2.fill(new Ellipse2D.Double(280,100,30,30));
g2.fill(new Ellipse2D.Double(340,30,30,30));
g2.fill(new Ellipse2D.Double(360,120,30,30));
g2.fill(new Ellipse2D.Double(240,180,30,30));
g2.fill(new Ellipse2D.Double(320,190,30,30));
// Nombre de los estados (q)
g2.setColor(Color.black);
g2.drawString("q0", 108, 120);
g2.drawString("q1", 188, 110);
g2.drawString("q5", 168, 164);
g2.drawString("q6", 104, 200);
g2.drawString("q2", 258, 70);
g2.drawString("q4", 288, 120);
g2.drawString("q3", 348, 50);
g2.drawString("q9", 368, 140);
g2.drawString("q7", 248, 200);
g2.drawString("q8", 328, 210);
// Lineas
g2.draw(new QuadCurve2D.Double(120,100,210,10,338,34)); // q0:q3
g2.drawLine(132,114,174,107); // q0:q1
g2.drawLine(209,90,249,70); // q1:q2
g2.drawLine(282,62,335,48); // q2:q3
g2.drawArc(256,42,18,20,0,180); // q2
g2.drawArc(357,22,18,20,322 ,180); // q5
g2.drawLine(268,80,282,105); // q2:q4
g2.draw(new QuadCurve2D.Double(215,100,290,90,339,58)); // q1:q3
g2.drawLine(215,112,278,114); // q1:q4
g2.drawLine(312,119,359,132); // q4:q9
g2.drawArc(287, 93,18,20,350,180); // q4
g2.drawLine(308,108,348,64); // q4:q3
g2.drawLine(360,65,372,119); // q3:q9
g2.drawLine(348,189,372,151); // q8:q9
g2.drawLine(129,124,162,148); // q0:q5
g2.drawLine(191,164,236,188); // q5:q7
g2.draw(new QuadCurve2D.Double(235,200,206,194,183,173)); // q7:q5
g2.draw(new QuadCurve2D.Double(192,158,280,170,360,144)); // q5:q9
g2.drawLine(275,200,315,206); // q7:q8
g2.draw(new QuadCurve2D.Double(370,58,450,140,360,220)); // parte1> q3> q7:q3
g2.draw(new QuadCurve2D.Double(360,220,310,250,266,212)); // parte2> q7> q7:q3
g2.drawLine(160,167,127,190); // q5:q6
g2.drawArc(102,198,18,20,180,180); // q6
g2.drawArc(379,126,20,18,270,180); // q9
g2.draw(new QuadCurve2D.Double(118,180,140,110,359,138)); // q6:q9
g2.draw(new QuadCurve2D.Double(120,70,200,0,344,28)); // parte1> q3> q6:q3
g2.draw(new QuadCurve2D.Double(102,182,70,120,120,70)); // parte2> q6> q6:q3
if(cadena.equals("ini"))
this.run();
}
public void run() {
this.cadena = "";
this.cadena = JOptionPane.showInputDialog("Inserta la cadena");
if(cadena==null || cadena.equals("")) {
if(JOptionPane.showConfirmDialog(null, "¿Seguro que quieres salir?", "¿Seguro que quieres salir?", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
System.exit(0);
else
this.cadena = JOptionPane.showInputDialog("Inserta la cadena");
}
this.cadena_auxiliar = cadena;
this.q0();
}
public void q0() {
aceptacion = false;
System.out.println("q0");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(100,100,30,30));
g2.setColor(Color.black);
g2.drawString("q0", 108, 120);
try{ Thread.sleep(100); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q1();
} else if(caracter_siguiente == 'b') {
this.q5();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q1() {
aceptacion = true;
System.out.println("q1");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(180,90,30,30));
g2.setColor(Color.black);
g2.drawString("q1", 188, 110);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q2();
} else if(caracter_siguiente == 'b') {
this.q4();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q2() {
aceptacion = false;
System.out.println("q2");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(250,50,30,30));
g2.setColor(Color.black);
g2.drawString("q2", 258, 70);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q2();
} else if(caracter_siguiente == 'b') {
this.q4();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q3() {
aceptacion = true;
System.out.println("q3");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(340,30,30,30));
g2.setColor(Color.black);
g2.drawString("q3", 348, 50);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a' || caracter_siguiente == 'b') {
this.q9();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q4() {
aceptacion = false;
System.out.println("q4");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(280,100,30,30));
g2.setColor(Color.black);
g2.drawString("q4", 288, 120);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q9();
} else if(caracter_siguiente == 'b') {
this.q4();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q5() {
aceptacion = false;
System.out.println("q5");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(160,144,30,30));
g2.setColor(Color.black);
g2.drawString("q5", 168, 164);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q9();
} else if(caracter_siguiente == 'b') {
this.q6();
} else if(caracter_siguiente == 'c') {
this.q7();
}
}
}
public void q6() {
aceptacion = false;
System.out.println("q6");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(96,180,30,30));
g2.setColor(Color.black);
g2.drawString("q6", 104, 200);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q9();
} else if(caracter_siguiente == 'b') {
this.q6();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q7() {
aceptacion = true;
System.out.println("q7");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(240,180,30,30));
g2.setColor(Color.black);
g2.drawString("q7", 248, 200);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a') {
this.q8();
} else if(caracter_siguiente == 'b') {
this.q5();
} else if(caracter_siguiente == 'c') {
this.q3();
}
}
}
public void q8() {
aceptacion = true;
System.out.println("q8");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(320,190,30,30));
g2.setColor(Color.black);
g2.drawString("q7", 248, 200);
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
if(!this.isFinal()) {
this.avanzar();
if(caracter_siguiente == 'a' || caracter_siguiente == 'b' || caracter_siguiente == 'c') {
this.q9();
}
}
}
public void q9() {
aceptacion = false;
System.out.println("q9");
g2.setColor(Color.yellow);
g2.fill(new Ellipse2D.Double(360,120,30,30));
g2.setColor(Color.black);
g2.drawString("q9", 368, 140);
g2.drawString("Incorrecto.", 20, 20);
System.out.println("Incorrecto");
this.cadena = "ini";
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
}
public void avanzar() {
String cadena_auxiliar2 = "";
if(cadena_auxiliar.length() > 0)
caracter_siguiente = cadena_auxiliar.charAt(0);
for(int i=1; i<cadena_auxiliar.length(); i++) {
cadena_auxiliar2 += cadena_auxiliar.charAt(i);
}
cadena_auxiliar = cadena_auxiliar2;
try{ Thread.sleep(1000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
this.refresh();
}
public boolean isFinal() {
if(cadena_auxiliar.length() == 0) {
g2.setFont(new Font("Arial",Font.BOLD,26));
if(aceptacion) {
g2.setColor(Color.green);
g2.drawString("Correcto.", 20, 40);
System.out.println("Correcto");
} else {
g2.setColor(Color.red);
g2.drawString("Incorrecto.", 20, 40);
System.out.println("Incorrecto.");
}
this.cadena = "ini";
try{ Thread.sleep(2000); } catch(InterruptedException e ) { System.out.println("Thread Interrupted"); }
return true;
} else {
repaint();
return false;
}
}
public void refresh() {
g2.setColor(Color.gray);
g2.fill(new Ellipse2D.Double(176,86,38,38));
g2.fill(new Ellipse2D.Double(336,26,38,38));
g2.fill(new Ellipse2D.Double(316,186,38,38));
g2.fill(new Ellipse2D.Double(236,176,38,38));
g2.setColor(Color.lightGray);
g2.fill(new Ellipse2D.Double(100,100,30,30));
g2.fill(new Ellipse2D.Double(180,90,30,30));
g2.fill(new Ellipse2D.Double(160,144,30,30));
g2.fill(new Ellipse2D.Double(96,180,30,30));
g2.fill(new Ellipse2D.Double(250,50,30,30));
g2.fill(new Ellipse2D.Double(280,100,30,30));
g2.fill(new Ellipse2D.Double(340,30,30,30));
g2.fill(new Ellipse2D.Double(360,120,30,30));
g2.fill(new Ellipse2D.Double(240,180,30,30));
g2.fill(new Ellipse2D.Double(320,190,30,30));
g2.setColor(Color.black);
g2.drawString("q0", 108, 120);
g2.drawString("q1", 188, 110);
g2.drawString("q5", 168, 164);
g2.drawString("q6", 104, 200);
g2.drawString("q2", 258, 70);
g2.drawString("q4", 288, 120);
g2.drawString("q3", 348, 50);
g2.drawString("q9", 368, 140);
g2.drawString("q7", 248, 200);
g2.drawString("q8", 328, 210);
}
} | [
"diego.bernal17@gmail.com"
] | diego.bernal17@gmail.com |
19d839597194aaf32bf91f16dd1bf78421830be4 | f1eee5d394b42f01a5ca46e7691779122344810a | /app/src/main/java/com/example/admin/w3d4fragments/RecyclerViewFamouseAdapter.java | 48fc4374ecdfd291bf651c1fe4e02bad48ed93b0 | [] | no_license | LuisMiguelAguirre/W3D4Fragments | f648e8fcb2f2db2356e97851aa5733759732ca34 | 9ff2feda54e2ba2f208651d26e2d5979b34e8d76 | refs/heads/master | 2021-06-26T06:30:03.100653 | 2017-09-15T04:37:50 | 2017-09-15T04:37:50 | 103,578,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,377 | java | package com.example.admin.w3d4fragments;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import java.util.List;
import static android.R.attr.data;
/**
* Created by Luis Aguirre on 9/6/2017.
*/
public class RecyclerViewFamouseAdapter extends RecyclerView.Adapter<RecyclerViewFamouseAdapter.ViewHolder> {
private RecyclerViewFamouseAdapter.OnViewHolderInteractionListener mListener;
public void setListener(RecyclerViewFamouseAdapter.OnViewHolderInteractionListener listener) {
this.mListener = listener;
}
List<Famous> famouses;
Context context;
public RecyclerViewFamouseAdapter(List<Famous> famouses) {
this.famouses = famouses;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
context = parent.getContext();
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.card_view_left_pane_activity, parent, false);
ViewHolder viewHolder = new ViewHolder(view);
return viewHolder;
}
@Override
public void onBindViewHolder(ViewHolder holder, final int position) {
Famous famous = famouses.get(position);
holder.textViewName.setText(famous.getName());
holder.textViewName.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
if(mListener != null) {
mListener.onViewHolderInteraction(String.valueOf(position));
ListArtistFragment l= (ListArtistFragment)mListener;
}
}
});
}
@Override
public int getItemCount() {
return famouses.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView textViewName;
public ViewHolder(final View itemView) {
super(itemView);
textViewName = (TextView) itemView.findViewById(R.id.text_view_left_pane_name);
}
}
public interface OnViewHolderInteractionListener {
void onViewHolderInteraction(String data);
}
}
| [
"kourosvi@gmail.com"
] | kourosvi@gmail.com |
dcfb1cd816275dd3cd095a31fa0f113b042404fa | 96c157c2ba9da195f310da42edf934cdf8b1f6b3 | /java/LeetCode/cn/alfredyuan/java7/dynamics/invoke/Sample.java | bc8b12b6a1d2c68200900507850e2ff57a5ed2a0 | [] | no_license | myhelloos/dailyHacker | dbdb106eb69aaec99270109d4536c3ed31cf5704 | 33467f14c5fcd7f96094c6dc7483b896aa1c5b72 | refs/heads/master | 2021-01-19T01:19:12.483015 | 2016-06-21T14:26:29 | 2016-06-21T14:26:29 | 31,644,644 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 123 | java | package cn.alfredyuan.java7.dynamics.invoke;
public class Sample {
public String name;
public static int value;
}
| [
"yuanxun.cn@gmail.com"
] | yuanxun.cn@gmail.com |
c1eced9584136a5934266eba85db835534083c86 | 3b200bde1216e36a803210a7e9d9f2918c276ca8 | /SeleniumKT/src/schedule2/NewTest.java | 3e56d399ef8a62c3dada6f407375a175e27b26be | [] | no_license | thennarasu1808/Selenium_Tutorial | 9eb63106123c841132787a463310b1f895a46a5e | 5395446d1f4ab7b130fe7d4980b8096a54460c94 | refs/heads/master | 2022-08-07T00:27:52.723986 | 2020-05-28T07:15:13 | 2020-05-28T07:15:13 | 267,505,254 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,324 | java | package schedule2;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterSuite;
public class NewTest {
@Test
public void test1() {
System.out.println("Am test 1");
}
@Test
public void test2() {
System.out.println("Am test 2");
}
@BeforeMethod
public void beforeMethod() {
System.out.println("i am before Method");
}
@AfterMethod
public void afterMethod() {
System.out.println("i am after Method");
}
@BeforeClass
public void beforeClass() {
System.out.println("i am before class");
}
@AfterClass
public void afterClass() {
System.out.println("i am after class");
}
@BeforeTest
public void beforeTest() {
System.out.println("i am before test");
}
@AfterTest
public void afterTest() {
System.out.println("i am after test");
}
@BeforeSuite
public void beforeSuite() {
System.out.println("i am before suite");
}
@AfterSuite
public void afterSuite() {
System.out.println("i am after suite");
}
}
| [
"TKarunakaran@TK-IN-PC.islandpacific.net"
] | TKarunakaran@TK-IN-PC.islandpacific.net |
9f0d53d688a5f4d61dc952f1cc2f4ba22d171ca6 | d543a2daaab2371cdb66bdd7342c37def2d17920 | /Jenasena/src/com/NIRR/jenasena/Chart_D_ItemHistory.java | 4fa7e6895673ecd1eb858fd879752ac1d6717dc6 | [] | no_license | Nuzha/Jinasena_Mobile_App | 97c693e95c4224c73e51bb7d0e6a01cf928aeb95 | e91ab37114ae21672433c03ba74a11db20f7e5f9 | refs/heads/master | 2021-01-19T14:34:08.501730 | 2014-09-29T17:44:50 | 2014-09-29T17:44:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,766 | java | package com.NIRR.jenasena;
import org.achartengine.ChartFactory;
import org.achartengine.GraphicalView;
import org.achartengine.chart.PointStyle;
import org.achartengine.model.CategorySeries;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
import org.achartengine.renderer.XYSeriesRenderer;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.RelativeLayout;
public class Chart_D_ItemHistory extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.chart_viewr);
Intent intent=getIntent();
String s1=intent.getStringExtra(MainDelItemHistory.packagename);
Chart_D_ItemHistory chart = new Chart_D_ItemHistory();
GraphicalView gview = chart.getView(this,s1);
RelativeLayout layout =(RelativeLayout)findViewById(R.id.rl_chartViewer_chart_Isuru);
layout.addView(gview);
}
private GraphicalView getView(Context context,String s1) {
int[] x={10,20,30,40,50,60,70,80,90,100};
int[] y={56,89,4,90,12,67,88,90,100,90};
CategorySeries series = new CategorySeries("");
for(int i=0;i<x.length;i++){
series.add("isuru"+1,y[i]);
}
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
dataset.addSeries(series.toXYSeries());
XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer();
XYSeriesRenderer renderer = new XYSeriesRenderer();
mRenderer.setApplyBackgroundColor(true);
mRenderer.setBackgroundColor(Color.BLACK);
renderer.setColor(Color.GREEN);
renderer.setPointStyle(PointStyle.DIAMOND);
renderer.setPointStrokeWidth(50);
renderer.setFillPoints(true);mRenderer.setZoomButtonsVisible(true);
mRenderer.setXLabels(0);
mRenderer.setChartTitle("Item History");
mRenderer.setChartTitleTextSize(40);
mRenderer.setLabelsTextSize(20);
mRenderer.setXLabelsPadding(10);
mRenderer.setBarSpacing(21.5);
mRenderer.setAxesColor(Color.CYAN);
mRenderer.addSeriesRenderer(renderer);
mRenderer.addXTextLabel(1, "It01");
mRenderer.addXTextLabel(2, "It02");
mRenderer.addXTextLabel(3, "It03");
mRenderer.addXTextLabel(4, "It04");
mRenderer.addXTextLabel(5, "It05");
mRenderer.addXTextLabel(6, "It06");
mRenderer.addXTextLabel(7, "It07");
mRenderer.addXTextLabel(8, "It08");
mRenderer.addXTextLabel(9, "It09");
mRenderer.addXTextLabel(10, "It10");
mRenderer.setXTitle("Month");
mRenderer.setYTitle("Quntity");
return ChartFactory.getLineChartView(context, dataset, mRenderer);
}
}
| [
"fadilanuzha@gmail.com"
] | fadilanuzha@gmail.com |
f4f401652c9b2b98f1b9ad6e8abdd9213df1c9cd | 990022e1a97d68b6c4f10350143169e8ac456908 | /src/main/java/com/project1/taxi/repository/OrderRepository.java | db4e813991533511de61be0b0d2c24e6abe21644 | [] | no_license | mjs2teh/amghezi | d626485fbc5293de5384267ca246099d957ebd7a | 6913823210dbb99a6ef113e4bd47aba720db4737 | refs/heads/main | 2023-06-20T12:01:23.847102 | 2021-07-18T12:58:23 | 2021-07-18T12:58:23 | 377,426,900 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 213 | java | package com.project1.taxi.repository;
import com.project1.taxi.model.Orders;
import org.springframework.data.jpa.repository.JpaRepository;
public interface OrderRepository extends JpaRepository<Orders,Long> {
}
| [
"mj.shirazi2@gmail.com"
] | mj.shirazi2@gmail.com |
0488b8f50d0fb6b948ccc8fdba0e96059ca5dbaf | 1dbe5cdc281a2533d7da300b8298c3534e003e60 | /src/tour/LogoutServlet.java | aa406f2eb1f53e5e99a5b0fc7ffb8d09f8fe2cdf | [] | no_license | DMANSS/cours1 | 3dc80a416c1ca851222b9b8a8baa0977cfb41a34 | 460e704d9116f6c7df2be9f60fbe108fd256a862 | refs/heads/master | 2021-04-30T07:45:03.745204 | 2018-02-13T08:00:41 | 2018-02-13T08:00:41 | 121,355,743 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 951 | java | package tour;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/LogoutServlet")
public class LogoutServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
Cookie loginCookie = null;
Cookie[] cookies = request.getCookies();
if(cookies != null) {
for(Cookie cookie:cookies) {
if(cookie.getName().equals("user")){
loginCookie = cookie;
break;
}
}
}
if(loginCookie != null) {
loginCookie.setMaxAge(0);
response.addCookie(loginCookie);
}
response.sendRedirect("start.html");
}
}
| [
"deadmanss@yandex.ru"
] | deadmanss@yandex.ru |
c72a5a00f95c087f21dab5a70b1827ad42ae5ee7 | ad315316c3b3ef8fa698b66864fd2164386e499d | /devel/projects/spa/src/hr/restart/baza/kreator.java | 8c2f97b71375cc6c3baeeaa890b348a424da3c27 | [] | no_license | apemant/spa | 73c2c5b3f32375990d5410052675b3987f31f4cd | 58f2343aa3415a61b8a3215d09de5dd8e23fab83 | refs/heads/master | 2020-04-18T03:08:47.909138 | 2019-01-24T13:28:09 | 2019-01-24T13:28:09 | 167,188,261 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 50,491 | java | /****license*****************************************************************
** file: kreator.java
** Copyright 2006 Rest Art
**
** 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 hr.restart.baza;
import hr.restart.sisfun.frmTableDataView;
import hr.restart.swing.JDirectoryChooser;
import hr.restart.swing.JraButton;
import hr.restart.swing.JraComboBox;
import hr.restart.swing.JraDialog;
import hr.restart.swing.JraFrame;
import hr.restart.swing.JraScrollPane;
import hr.restart.swing.JraTextField;
import hr.restart.swing.jpCustomAttribDoh;
import hr.restart.util.Aus;
import hr.restart.util.Int2;
import hr.restart.util.OKpanel;
import hr.restart.util.ProcessInterruptException;
import hr.restart.util.Util;
import hr.restart.util.Valid;
import hr.restart.util.VarStr;
import hr.restart.util.lookupData;
import hr.restart.util.raGlob;
import hr.restart.util.raImages;
import hr.restart.util.raProcess;
import hr.restart.util.raStatusBar;
import hr.restart.util.startFrame;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import javax.swing.Box;
import javax.swing.DefaultCellEditor;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumn;
import com.borland.dx.dataset.Column;
import com.borland.dx.dataset.DataSet;
import com.borland.dx.dataset.Locate;
import com.borland.dx.sql.dataset.QueryDataSet;
import com.borland.jbcl.layout.XYConstraints;
import com.borland.jbcl.layout.XYLayout;
/**
* Title: Robno knjigovodstvo
* Description: Projekt je zamišljen kao multiuser-ska verzija robnog knjigovodstva
* Copyright: Copyright (c) 2001
* Company: Rest Art d.o.o.
* @author Tomislav Vidakovi\u0107
* @version 1.0
*/
public class kreator extends JraFrame {
public static int INDEX_ANY = -1;
public static int INDEX_NOP = 0;
public static int INDEX_CREATE = 1;
public static int INDEX_RECREATE = 2;
public static int INDEX_DROP = 3;
public static String[] indexComm = {"Ne diraj", "Kreiraj", "Rekreiraj", "Dropaj"};
public static int TABLE_ANY = -1;
public static int TABLE_NOP = 0;
public static int TABLE_SAVE = 1;
public static int TABLE_LOAD = 2;
public static int TABLE_DELETE = 3;
public static int TABLE_UNLOCK = 4;
public static int TABLE_CHECK = 5;
public static int TABLE_UPDATE = 6;
public static int TABLE_CREATE = 7;
public static int TABLE_RECREATE = 8;
public static int TABLE_DROP = 9;
public static String[] tableComm = {"Ne diraj", "Spremi", "Napuni", "Obriši",
"Otklju\u010Daj", "Provjeri", "Ažuriraj", "Kreiraj", "Rekreiraj", "Dropaj"};
static kreator kr;
String subdir = "";
File loadsave = null;
VarStr command = null;
boolean standalone = false, busy = false;
JPanel jPanel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JraScrollPane jsp = new JraScrollPane();
BorderLayout bljsp = new BorderLayout();
JButton jBCopyRow = new JButton("Kopiraj red");
JButton jBProperties = new JButton("Konekcija");
JButton jbPath = new JButton("Putanja");
Box jPDownPanel = Box.createHorizontalBox();
Box jPControls = Box.createHorizontalBox();
CopyDialog cdsel = new CopyDialog(this);
hr.restart.util.OKpanel oKpanel1 = new hr.restart.util.OKpanel(){
public void jBOK_actionPerformed() {
pressOK();
}
public void jPrekid_actionPerformed() {
pressCancel();
}
};
Boolean istina = new Boolean(true);
Boolean laz = new Boolean(false);
BorderLayout borderLayout2 = new BorderLayout();
BorderLayout borderLayout3 = new BorderLayout();
JTable jTable1;
TableModelZaKreiranje tm;
// hr.restart.baza.BazaOper baza = new hr.restart.baza.BazaOper();
frmTableDataView view = new frmTableDataView(true);
QueryDataSet tab = Tablice.getDataModule().getFilteredDataSet("");
String [] kaption = {"Ime tabele","Klasa","Tabela","Indexe"};
Boolean bl;
// boolean trig;
boolean shiftHeld;
String noteStatus = null;
String [] klase = {
};
public kreator() {
try {
findaj_klase();
jbInit();
// test_me();
}
catch(Exception e) {
e.printStackTrace();
}
}
public kreator(String comm) {
this();
}
public static kreator getKreator() {
if (kr == null) kr = new kreator();
kr.subdir = "";
return kr;
}
/**
* Trebalo bi na\u0107i klase sve koje su instanca od KreirDrop
*/
public void findaj_klase(){
// for int i =0 to
// Class[] klasse = this.getClass().getDeclaredClasses();
// for (int i=0;i< klasse.length;i++){
// System.out.println(klasse[i].getName());
// }
}
public void pressOK() {
disablek();
raProcess.runChild(this, "", " Provjeranje tablice tablica ... ", new Runnable() {
public void run() {
if (command != null)
raProcess.disableInterrupt();
runProcess();
}
});
KreirDrop.removeNotifier();
enablek();
}
private void test_me() {
/* new Thread() {
public void run() {
raLocalTransaction trans = new raLocalTransaction() {
public boolean transaction() throws Exception {
System.err.println("1 getting row");
Connection con = dM.getDataModule().getDatabase1().getJdbcConnection();
Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = st.executeQuery("SELECT * FROM SEQ WHERE OPIS='100OTP2003'");
System.err.println("1 going to sleep");
Thread.sleep(4000);
Random r = new Random();
double br = r.nextInt(100);
rs.updateDouble("BROJ", br);
System.err.println("1 saving "+br);
rs.updateRow();
System.err.println("1 done");
return true;
}
};
trans.execTransaction();
}
}.start();
}*/
/* try {
dM.getDataModule().database1.executeStatement(
" alter procedure getPartner("+
" partner int) returns (naziv char(50))"+
" as"+
" begin"+
" select nazpar from partneri where cpar = :partner into :naziv;"+
" suspend;"+
" end"
);
} catch (Exception e) {
e.printStackTrace();
} */
}
private void disablek() {
busy = true;
jBCopyRow.setEnabled(false);
jBProperties.setEnabled(false);
jbPath.setEnabled(false);
oKpanel1.jBOK.setEnabled(false);
oKpanel1.jPrekid.setEnabled(false);
}
private void enablek() {
busy = false;
jBCopyRow.setEnabled(true);
jBProperties.setEnabled(true);
jbPath.setEnabled(true);
oKpanel1.jBOK.setEnabled(true);
oKpanel1.jPrekid.setEnabled(true);
}
private void jbInit() throws Exception {
tm= new TableModelZaKreiranje();
try {
setTitle("Kreator - " + dM.getDataModule().getDatabase1().getConnection().getConnectionURL());
} catch (Exception e) {
setTitle("Kreator");
}
this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
jTable1= new JTable(tm);
//jTable1.setAutoCreateColumnsFromModel(false);
//jTable1.setModel(tm);
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
for (int k =0;k <tm.m_columns.length; k++) {
/* TableCellRenderer renderer ;
if (k==4)
renderer = new CheckCellRenderer();
else {
DefaultTableCellRenderer renderer1 = new DefaultTableCellRenderer();
renderer=renderer1 ;
renderer.setHorizontalAlignment(tm.m_columns[k].m_alignment); */
//// editor
TableColumn col = jTable1.getColumnModel().getColumn(k);
col.setPreferredWidth(tm.m_columns[k].m_width);
if (k==2)
col.setCellEditor(new DefaultCellEditor(new JraComboBox(indexComm)));
else if (k==3)
col.setCellEditor(new DefaultCellEditor(new JraComboBox(tableComm)));
else if (k!=4)
col.setCellEditor(null);
/*TableColumn column = new TableColumn(k,tm.m_columns[k].m_width, renderer, edit);
jTable1.addColumn(column);*/
}
jTable1.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() {
public Component getTableCellRendererComponent(JTable t, Object v,
boolean sel, boolean foc, int row, int col) {
return super.getTableCellRendererComponent(t, v, sel, false, row, col);
}
});
JTableHeader header = jTable1.getTableHeader();
header.setUpdateTableInRealTime(false);
DefaultTableCellRenderer rend = new DefaultTableCellRenderer() {
int sortFlag;
public Component getTableCellRendererComponent(JTable t, Object v,
boolean sel, boolean foc, int row, int col) {
if (t != null) {
JTableHeader header = t.getTableHeader();
if (header != null) {
setForeground(header.getForeground());
setBackground(header.getBackground());
setFont(header.getFont());
}
if (tm.getSortedColumn() == jTable1.convertColumnIndexToModel(col))
sortFlag = tm.isAscending() ? 1 : -1;
else sortFlag = 0;
}
setText((v == null) ? "" : v.toString());
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
return this;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (sortFlag != 0) {
Image im = raImages.getImageIcon(sortFlag == 1 ? raImages.IMGDOWN : raImages.IMGUP).getImage();
int spc = (this.getHeight() - im.getHeight(this)) / 2;
g.drawImage(im, getWidth() - im.getWidth(this) - spc - 1, spc, this);
}
}
};
rend.setHorizontalAlignment(JLabel.CENTER);
header.setDefaultRenderer(rend);
this.getContentPane().setLayout(borderLayout1);
jPanel1.setLayout(borderLayout3);
this.getContentPane().add(jPanel1, BorderLayout.CENTER);
jPanel1.add(jsp,BorderLayout.CENTER);
// jsp.getViewport().setLayout(bljsp);
jsp.getViewport().add(jTable1, BorderLayout.CENTER);
jTable1.setPreferredScrollableViewportSize(
new Dimension(560,jTable1.getPreferredScrollableViewportSize().height));
// oKpanel1.add(jBCopyRow, BorderLayout.WEST);
jPControls.add(jBCopyRow);
jPControls.add(jBProperties);
jPControls.add(jbPath);
//jPControls.setMaximumSize(jPControls.getPreferredSize());
//oKpanel1.setMaximumSize(oKpanel1.getPreferredSize());
jPDownPanel.add(jPControls);
jPDownPanel.add(Box.createHorizontalGlue());
jPDownPanel.add(oKpanel1);
this.getContentPane().add(jPDownPanel, BorderLayout.SOUTH);
oKpanel1.registerOKPanelKeys(this);
jBCopyRow.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (shiftHeld)
extendedCopyRow();
else
kopirajrow();
}
});
jBCopyRow.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
shiftHeld = e.isShiftDown();
}
public void mouseReleased(MouseEvent e) {
shiftHeld = e.isShiftDown();
}
});
jBProperties.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dM.getDataModule().showParams();
// JOptionPane.showMessageDialog(null, "Potrebito je iza\u0107i iz kretora!", "Upozorenje",JOptionPane.WARNING_MESSAGE);
if (dM.getDataModule().reconnectIfNeeded()) {
// baza= new hr.restart.baza.BazaOper();
// System.out.println("New BazaOper().");
tab = Tablice.getDataModule().getFilteredDataSet("");
}
setTitle("Kreator - " + dM.getDataModule().getDatabase1().getConnection().getConnectionURL());
}
});
jbPath.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// testme();
selectPath();
}
});
tm.addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
if (e.getType() == e.UPDATE && e.getColumn() == 2 || e.getColumn() == 3)
checkValidity(e.getFirstRow(), e.getColumn());
}
});
jTable1.getTableHeader().addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (!busy) headerClicked(jTable1.getTableHeader().columnAtPoint(e.getPoint()));
}
});
jTable1.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 && jTable1.getSelectedColumn() == 0) {
if (!busy) showTableView();
}
}
});
view.jp.getMpTable().setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
// testme();
}
private void testme() {
PlZnacRad.getDataModule();
PlZnacRadData.getDataModule();
ZpZemlje.getDataModule();
Partneri.getDataModule();
PlZnacRad.getDataModule().getQueryDataSet().refresh();
jpCustomAttribDoh jp = new jpCustomAttribDoh();
jp.setTables("PlZnacRad", "PlZnacRadData");
jp.setAttrCols("CZNAC", "ZNACOPIS", "ZNACTIP", "ZNACREQ", "ZNACDOH");
jp.setValueCols("CRADNIK", "VRI");
jp.setDohvatCols("DOHATTR", "DOHCOLS");
jp.setFields();
jp.insert();
JOptionPane.showMessageDialog(this, jp, "Provjera", JOptionPane.PLAIN_MESSAGE);
// TextFile.setEncoding("UTF-8");
// Orgstruktura.getDataModule().dumpTable(new File(""), "orgs");
// TextFile.setSystemEncoding();
// DataSet ds = Orgstruktura.getDataModule().loadData(new File(""), "orgs");
// new sysoutTEST(false).prn(ds);
}
public void show() {
setTitle("Kreator - " + dM.getDataModule().getDatabase1().getConnection().getConnectionURL());
super.show();
}
private void selectPath() {
SelectPathDialog spd = new SelectPathDialog(this);
spd.loadsave = loadsave;
spd.show();
loadsave = spd.loadsave;
}
private void showTableView() {
new Thread() {
public void run() {
QueryDataSet vset = new QueryDataSet();
KreirDrop kdp = KreirDrop.getModule(tm.getValueAt(jTable1.getSelectedRow(), 9).toString());
if (kdp != null) {
view.hide();
view.clearColumns();
hr.restart.sisfun.raDelayWindow refr = hr.restart.sisfun.raDelayWindow.show(250);
kdp.createFilteredDataSet(vset, "");
vset.open();
int[] cols = new int[vset.getColumnCount()];
for (int i = 0; i < vset.getColumnCount(); i++) {
view.addColumn(vset.getColumn(i));
vset.getColumn(i).setVisible(com.borland.jb.util.TriStateProperty.TRUE);
cols[i] = i;
}
view.setDataSet(vset);
view.setTitle("Pregled tablice "+tm.getValueAt(jTable1.getSelectedRow(), 0));
view.setVisibleCols(cols);
// view.jp.getNavBar().getColBean().initialize();
view.show();
refr.close();
// System.out.println(view.jp.getMpTable().getSize().width +" "+ view.jp.getSize().width);
// System.out.println(view.jp.getMpTable().getVisibleRect());
view.resizeLater();
}
}
}.start();
}
private void headerClicked(int col) {
if (col == -1) return;
// System.out.println(col + " " + jTable1.convertColumnIndexToModel(col));
tm.sortColumn(jTable1.convertColumnIndexToModel(col));
}
private void extendedCopyRow() {
int currentRow;
if ((currentRow = jTable1.getSelectedRow()) == -1)
return;
cdsel.show();
if (!cdsel.isOK()) return;
String exp = cdsel.getTab().length() == 0 ? "*" : cdsel.getTab();
raGlob wild = new raGlob(exp.toLowerCase());
String app = cdsel.getApp();
if (app.length() > 0) tab.open();
boolean copy;
for (int y = 0; y < jTable1.getRowCount(); y++) {
copy = false;
if (app.length() == 0)
copy = wild.matches(tm.getValueAt(y, 0).toString().toLowerCase());
// wild.printLastMatch();
else if (lookupData.getlookupData().raLocate(tab, "IMETAB", tm.getValueAt(y, 0).toString()))
copy = wild.matches(tab.getString("IMETAB").toLowerCase()) &&
app.equalsIgnoreCase(tab.getString("APP"));
if (copy)
for (int x = 2; x <= 4; x++)
tm.setValueAt(tm.getValueAt(currentRow, x), y, x);
}
}
private void kopirajrow(){
int currentRow;
if ((currentRow = jTable1.getSelectedRow()) == -1)
return;
for (int y = 0; y < jTable1.getRowCount(); y++)
for (int x = 2; x <= 4; x++)
tm.setValueAt(tm.getValueAt(currentRow, x), y, x);
/* jTable1.revalidate();
jTable1.repaint(); */
}
private void checkValidity(int row, int col) {
int[][] invalid = {
{TABLE_CREATE, INDEX_RECREATE, INDEX_CREATE},
{TABLE_CREATE, INDEX_DROP, INDEX_CREATE},
{TABLE_RECREATE, INDEX_CREATE, INDEX_RECREATE},
{TABLE_SAVE, INDEX_ANY, INDEX_NOP},
{TABLE_LOAD, INDEX_ANY, INDEX_NOP},
{TABLE_DELETE, INDEX_ANY, INDEX_NOP},
{TABLE_CHECK, INDEX_ANY, INDEX_NOP},
{TABLE_UNLOCK, INDEX_ANY, INDEX_NOP},
{TABLE_UPDATE, INDEX_ANY, INDEX_NOP},
{TABLE_DROP, INDEX_ANY, INDEX_DROP},
{TABLE_CREATE, INDEX_NOP, INDEX_CREATE},
{TABLE_RECREATE, INDEX_NOP, INDEX_RECREATE},
{TABLE_NOP, INDEX_ANY, INDEX_NOP}};
/*String[][] invalid = {
{"Kreiraj", "Rekreiraj", "Kreiraj"},
{"Rekreiraj", "Kreiraj", "Rekreiraj"},
{"Spremi", "*", "Ne diraj"},
{"Napuni", "*", "Ne diraj"},
{"Obriši", "*", "Ne diraj"},
{"Provjeri", "*", "Ne diraj"},
{"Otklju\u010Daj", "*", "Ne diraj"},
{"Ažuriraj", "*", "Ne diraj"},
{"Dropaj", "*", "Ne diraj"},
{"Kreiraj", "Ne diraj", "Kreiraj"},
{"Rekreiraj", "Ne diraj", "Rekreiraj"},
{"Ne diraj", "*", "Ne diraj"}}; */
int check = (col == 3 ? invalid.length : 10);
for (int i = 0; i < check; i++)
if (tm.getValueAt(row, 3).equals(tableComm[invalid[i][0]]) &&
(invalid[i][1] == INDEX_ANY ||
tm.getValueAt(row, 2).equals(indexComm[invalid[i][1]])))
tm.setValueAt(indexComm[invalid[i][2]], row, 2);
if (tm.getValueAt(row, 2).equals(indexComm[INDEX_NOP]) &&
tm.getValueAt(row, 3).equals(tableComm[TABLE_NOP]))
tm.setValueAt(laz, row, 4);
else {
tm.setValueAt(istina, row, 4);
tm.setValueAt("Nemam pojma", row, 1);
}
}
public void initialize(startFrame sf) {
hr.restart.sisfun.raDelayWindow dw = null;
String imet;
subdir = "defdata" + System.getProperty("file.separator");
raStatusBar status = null;
if (sf == null) dw = hr.restart.sisfun.raDelayWindow.show(null, "Inicijalizacija baze...", 0);
else sf.statusMSG("Inicijalizacija baze...");
// baza.DajKonekciju();
try {
KreirDrop kdp = (KreirDrop) Class.forName("hr.restart.baza.Parametri").newInstance();
kdp.DropTable();
kdp.KreirTable();
kdp.KreirIdx();
loadData(kdp);
kdp.getQueryDataSet().refresh();
if (sf == null) dw.setMessage("U\u010Ditavanje liste tablica ...", true, 0);
else sf.statusMSG("U\u010Ditavanje liste tablica ...");
kdp = (KreirDrop) Class.forName("hr.restart.baza.Tablice").newInstance();
kdp.DropTable();
kdp.KreirTable();
kdp.KreirIdx();
loadData(kdp);
QueryDataSet tables = kdp.getQueryDataSet();
tables.refresh();
if (sf == null) dw.setMessage("Inicijalizacija tablica ...", false, 0);
else {
sf.statusMSG("Inicijalizacija tablica ...");
status = raStatusBar.getStatusBar();
status.startTask(tables.rowCount() + 2, "");
}
tables.first();
while (tables.inBounds()) {
imet = tables.getString("IMETAB");
if (!imet.equals("Tablice") && !imet.equals("Parametri")) {
if (sf == null) dw.setMessage("Inicijalizacija tablice " + imet + " ...", false, 0);
else status.next("Inicijalizacija tablice " + imet + " ...");
try {
kdp = (KreirDrop) Class.forName(tables.getString("KLASATAB")).newInstance();
kdp.DropTable();
kdp.KreirTable();
kdp.KreirIdx();
loadData(kdp);
} catch (Exception e) {
e.printStackTrace();
}
}
tables.next();
}
} catch (Exception e) {
e.printStackTrace();
// System.out.println(e.getMessage());
}
if (status != null) status.finnishTask();
if (sf == null) dw.close();
else sf.statusMSG();
// baza.ZatvoriKonekciju();
}
private int maxctab;
private boolean tabChanged, checkTab, tabCreated;
private void displayInsertError(String table, HashMap row) {
KreirDrop mod = KreirDrop.getModuleByName(table);
VarStr errlin = new VarStr(table).append(": neuspjesno dodavanje reda - ");
for (Iterator i = row.keySet().iterator(); i.hasNext(); ) {
String coln = (String) i.next();
Column col = mod.getColumn(coln);
if (col != null && col.isRowId())
errlin.append(coln).append('=').append(row.get(coln)).append(';');
}
System.err.println(errlin.chop().toString());
if (row.containsKey(KreirDrop.ERROR_KEY))
System.err.println(row.get(KreirDrop.ERROR_KEY));
}
public void runProcess(){
tabChanged = tabCreated = false;
KreirDrop.installNotifier(new raTransferNotifier() {
private int total, errs;
public void rowTransfered(String table, int action, int row, Object data) {
raProcess.checkClosing();
int ev;
switch (action) {
case raTransferNotifier.INSERT_STARTED:
total = errs = 0;
break;
case raTransferNotifier.DUMP_STARTED:
total = row;
break;
case raTransferNotifier.ROW_INSERT_FAILED:
if (++errs <= 100) {
displayInsertError(table, (HashMap) data);
if (errs == 100) System.err.println("Prikazano prvih 100 grešaka.");
}
case raTransferNotifier.ROW_INSERTED:
ev = Math.min(17, (int) Math.round(Math.sqrt(++total)) + 1);
if (row % ev == 0)
raProcess.setMessage(table + ": napunjeno "+row+"("+total+") redova", false);
break;
case raTransferNotifier.ROW_STORED:
ev = Math.min(17, (int) Math.round(Math.sqrt(total)) + 1);
if (row % ev == 1)
raProcess.setMessage(table + ": spremljeno "+row+"/"+total+" redova", false);
break;
case raTransferNotifier.DUMP_SEGMENT_FINISHED:
raProcess.setMessage(table + ": spremljeno "+row+"/"+total+" redova", false);
break;
case raTransferNotifier.INSERT_FINISHED:
noteStatus = " "+row+"/"+total+ " redova";
break;
case raTransferNotifier.DUMP_FINISHED:
raProcess.setMessage(table + ": spremljeno "+row+"/"+total+" redova", false);
noteStatus = " "+Aus.getRedova(total);
break;
}
}
});
try {
tab.refresh();
Valid.getValid().execSQL("SELECT MAX(ctab) AS maxc FROM tablice");
Valid.getValid().RezSet.open();
maxctab = Valid.getValid().RezSet.getInt("MAXC");
Valid.getValid().RezSet.close();
Valid.getValid().RezSet = null;
} catch (Exception e) {
e.printStackTrace();
maxctab = 0;
}
// dM.getDataModule().getDatabase1().closeConnection();
// baza.DajKonekciju();
try {
for (int x = 0; x<tm.getRowCount();x++){
raProcess.checkClosing();
raProcess.setMessage("Tablica "+tm.getValueAt(x, 0), false);
if (tm.getValueAt(x,4).equals(istina)){
try {
String status = "";
int cidx = INDEX_NOP, ctab = TABLE_NOP;
boolean tabtab = tm.getValueAt(x,0).toString().equalsIgnoreCase("tablice");
KreirDrop kdp = KreirDrop.getModule(tm.getValueAt(x,9).toString());
if (kdp == null) {
System.out.println("HEJ! nema modula!!");
Class klasica = Class.forName(tm.getValueAt(x,9).toString());
kdp = (KreirDrop) klasica.newInstance();
}
checkTab = false;
for (int c = 0; c < indexComm.length; c++)
if (tm.getValueAt(x, 2).equals(indexComm[c])) cidx = c;
for (int c = 0; c < tableComm.length; c++)
if (tm.getValueAt(x, 3).equals(tableComm[c])) ctab = c;
if (cidx == INDEX_DROP || cidx == INDEX_RECREATE ||
ctab == TABLE_DROP || ctab == TABLE_RECREATE) {
if (kdp.DropIdx()) tm.setValueAt("Indeksi dropani!", x, 1);
else tm.setValueAt("Greška!", x, 1);
}
if (ctab == TABLE_DROP || ctab == TABLE_RECREATE) {
raProcess.setMessage("Dropanje tablice "+tm.getValueAt(x, 0), false);
if (!Valid.getValid().runSQL("DELETE FROM "+tm.getValueAt(x, 0)) || !kdp.DropTable()) {
tm.setValueAt("Tablica zauzeta!",x,1);
cidx = INDEX_NOP;
ctab = TABLE_NOP;
/*if (tm.getValueAt(x,3).equals("Dropaj"))
continue; */
} else if (ctab == TABLE_DROP) status = "Tablica dropana";
if (ctab != TABLE_NOP && tabtab) tabCreated = true;
}
if (ctab == TABLE_CREATE || ctab == TABLE_RECREATE) {
raProcess.setMessage("Kreiranje tablice "+tm.getValueAt(x, 0), false);
if (kdp.KreirTable()) {
status = ctab == TABLE_CREATE ? "Tablica iskreirana!" : "Tablica rekreirana!";
if (ctab == TABLE_CREATE) checkTab = true;
if (tabtab) tabCreated = true;
} else {
tm.setValueAt("Tablica zauzeta!",x,1);
continue;
}
}
if (ctab == TABLE_CREATE || ctab == TABLE_RECREATE ||
cidx == INDEX_CREATE || cidx == INDEX_RECREATE) {
if (kdp.KreirIdx()) {
if (status.equals("")) status = "Indeksi iskreirani!";
} else {
if (status.equals("")) status = "Indeksi iskreirani!";
}
}
if (tabtab)
if (ctab == TABLE_LOAD || ctab == TABLE_DELETE || ctab == TABLE_UNLOCK)
tabCreated = true;
if (ctab == TABLE_SAVE)
status = dumpData(kdp) + noteStatus;
if (ctab == TABLE_LOAD)
status = loadData(kdp) + noteStatus;
if (ctab == TABLE_DELETE) {
raProcess.setMessage("Brisanje tablice "+tm.getValueAt(x, 0), false);
if (Valid.getValid().runSQL("DELETE FROM "+tm.getValueAt(x, 0)))
status = "Tablica obrisana!";
else status = "Greška kod brisanja!";
// System.out.println(tm.getValueAt(x, 0)+" obrisan!");
}
if (ctab == TABLE_CHECK) {
raProcess.setMessage("Provjera tablice "+tm.getValueAt(x, 0), false);
status = ConsoleCreator.checkData(kdp, (String) tm.getValueAt(x,0));
checkTab = true;
// checkTableRow(x);
}
if (ctab == TABLE_UNLOCK) {
raProcess.setMessage("Otključavanje tablice "+tm.getValueAt(x, 0), false);
if (Valid.getValid().runSQL("UPDATE "+tm.getValueAt(x, 0)+" SET LOKK='N'"))
status = "Tablica otklju\u010Dana!";
else status = "Greška kod otključavanja!";
}
if (ctab == TABLE_UPDATE) {
raProcess.setMessage("Provjera tablice "+tm.getValueAt(x, 0), false);
status = ConsoleCreator.checkData(kdp, (String) tm.getValueAt(x,0));
if (status.equals("Tablica je OK")) {
status = "Tablica nepromijenjena!";
} else if (ConsoleCreator.fastUpdate(kdp, (String) tm.getValueAt(x,0))) {
status = "Tablica ažurirana! (q)";
} else {
if (!status.equals("Tablica ne postoji!"))
status = dumpData(kdp);
else checkTab = true;
if (!status.endsWith("spremanja!")) {
if (tabtab) tabCreated = true;
raProcess.setMessage("Rekreiranje tablice "+tm.getValueAt(x, 0), false);
if (!kdp.DropTable() && !checkTab) {
status = "Tablica zauzeta!";
} else {
kdp.KreirTable();
kdp.KreirIdx();
if (status.endsWith("spremljen!")) {
status = loadData(kdp);
if (status.equals("Tablica napunjena!"))
status = "Tablica ažurirana!" + noteStatus;
else status = "Tablica rekreirana!";
} else if (checkTab) status = "Tablica kreirana!";
else status = "Tablica rekreirana!";
}
}
}
}
System.out.println(status);
if (tm.getValueAt(x,2).equals(indexComm[INDEX_NOP]) &&
tm.getValueAt(x,3).equals(tableComm[TABLE_NOP]))
status = "Nemam pojma";
if (!status.equals("")) tm.setValueAt(status,x,1);
if (checkTab) checkTableRow(x);
} catch (ProcessInterruptException e) {
throw (ProcessInterruptException) e.fillInStackTrace();
} catch (Exception e) {
e.printStackTrace();
// System.out.println(e.getMessage());
}
}
}
} finally {
try {
raProcess.setMessage("Finaliziranje procesa...", true);
// baza.ZatvoriKonekciju();
if (tabChanged && !tabCreated) {
tab.saveChanges();
dM.getDataModule().getTablice().refresh();
}
if (tabCreated) tab.refresh();
} catch (Exception e) {
e.printStackTrace();
}
}
}
String lastapp = "";
private void checkTableRow(int row) {
if (maxctab == 0) return;
if (!lookupData.getlookupData().raLocate(tab, "IMETAB",
tm.getValueAt(row, 0).toString(), Locate.CASE_INSENSITIVE)) {
System.out.println("Ubacujem tablicu u tablicu tablica");
tab.insertRow(false);
tab.setInt("CTAB", ++maxctab);
tab.setString("KLASATAB", tm.getValueAt(row, 9).toString());
tab.setString("IMETAB", tab.getString("KLASATAB").
substring(tab.getString("KLASATAB").lastIndexOf(".") + 1));
tab.post();
tabChanged = true;
}
if (!tab.getString("IMETAB").equals(tm.getValueAt(row, 0).toString()))
System.out.println("Pogresno ime tablice: " + tm.getValueAt(row, 0));
if (tab.getString("APP") == null || tab.getString("APP").length() == 0) {
// Object app = JOptionPane.showInputDialog(this, "Aplikacija kojoj pripada tablica "+
// tab.getString("IMETAB"), "Unos aplikacije",
// JOptionPane.PLAIN_MESSAGE, null, null, lastapp);
// if (app != null) {
tab.setString("APP", "!undef!");
tab.post();
tabChanged = true;
// }
}
// Valid.getValid().execSQL("SELECT MAX(ctab*1));
}
public void pressCancel(){
this.hide();
if (standalone)
System.exit(0);
}
public static void main(String[] args) {
// new IntParam();
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
getKreator();
if (args.length == 1 && args[0].equalsIgnoreCase("initialize"))
kr.initialize(null);
else {
kr.standalone = true;
if (args.length > 0) {
kr.command = VarStr.join(args, ' ');
kr.addWindowListener(new WindowAdapter() {
public void windowOpened(WindowEvent e) {
kr.performCommand();
}
});
}
kr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
kr.pack();
kr.show();
}
}
// {"Ne diraj", "Spremi", "Napuni", "Obriši",
// "Otklju\u010Daj", "Provjeri", "Ažuriraj", "Kreiraj", "Rekreiraj", "Dropaj"};
private void performCommand() {
String[] com = command.split();
int ncom = -1;
String[] comms = {"nop", "save", "load", "delete", "unlock", "check",
"update", "create", "recreate", "drop"};
for (int i = 0; i < comms.length; i++)
if (comms[i].equalsIgnoreCase(com[0])) ncom = i;
if (ncom <= 0) {
command = null;
System.err.println("Invalid command: "+com[0]);
return;
}
for (int i = 1; i < com.length; i++) {
raGlob g = new raGlob(com[i].toLowerCase());
for (int x = 0; x < tm.getRowCount(); x++)
if (g.matches(tm.getValueAt(x, 0).toString().toLowerCase()))
tm.setValueAt(tableComm[ncom], x, 3);
}
if (com.length == 1)
for (int x = 0; x < tm.getRowCount(); x++)
tm.setValueAt(tableComm[ncom], x, 3);
pressOK();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
pressCancel();
}
});
}
/* private void checkbd() {
String cz = "09";
DataSet zt = dM.getDataModule().getZavtr();
zt.open();
if (!lookupData.getlookupData().raLocate(zt, "CZT", cz)) {
zt.insertRow(false);
zt.setString("CZT", cz);
} else {
zt.deleteRow();
zt.insertRow(false);
zt.setString("CZT", cz);
}
zt.setBigDecimal("IZT", new BigDecimal(0));
zt.setBigDecimal("IZT", new BigDecimal(3245.234363456).setScale(2, BigDecimal.ROUND_HALF_UP));
System.out.println(zt);
System.out.println(zt.getBigDecimal("IZT"));
zt.saveChanges();
zt = Zavtr.getDataModule().getFilteredDataSet("czt='"+cz+"'");
zt.open();
System.out.println(zt);
System.out.println(zt.getBigDecimal("IZT"));
Valid.getValid().execSQL("SELECT * FROM zavtr WHERE czt='"+cz+"'");
Valid.getValid().RezSet.open();
System.out.println(Valid.getValid().RezSet);
System.out.println(Valid.getValid().RezSet.getBigDecimal("IZT"));
Valid.getValid().execSQL("SELECT izt*1 as izt FROM zavtr WHERE czt='"+cz+"'");
Valid.getValid().RezSet.open();
System.out.println(Valid.getValid().RezSet);
System.out.println(Valid.getValid().RezSet.getDouble("IZT"));
} */
public String loadData(KreirDrop kdp) {
try {
noteStatus = "";
File dir = loadsave != null ? loadsave : new File(subdir);
if (kdp.insertData(dir) > 0)
return "Tablica napunjena!";
else return "Datoteka prazna!";
} catch (ProcessInterruptException e) {
throw (ProcessInterruptException) e.fillInStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
return "Datoteka ne postoji!";
} catch (Exception e) {
e.printStackTrace();
return "Greška!";
}
}
public String dumpData(KreirDrop kdp) {
try {
noteStatus = "";
File dir = loadsave != null ? loadsave : new File(subdir);
String tname = kdp.getColumns()[0].getTableName().toLowerCase();
raProcess.setMessage("Provjera opsega tablice "+kdp.Naziv+" ...", false);
int totalRows = kdp.getRowCount();
if (totalRows * kdp.getColumns().length < ConsoleCreator.maxLoad) {
raProcess.setMessage("Otvaranje tablice "+kdp.Naziv+" ...", false);
DataSet ds = Util.getNewQueryDataSet("SELECT * FROM "+tname);
if (kdp.dumpTable(ds, dir) > 0 || (ds.close() && false))
return tname + ".dat - spremljen!";
return "Tablica prazna!";
}
raProcess.setMessage("Segmentiranje tablice "+kdp.Naziv+" ...", false);
Int2 sgt = kdp.findBestKeyForSegments();
if (sgt == null) return "Greška kod spremanja!";
String bestCol = kdp.getColumns()[sgt.one].getColumnName().toLowerCase();
int bestNum = sgt.two;
int minSegments = totalRows * kdp.getColumns().length / ConsoleCreator.maxLoad + 2;
if (bestNum / 10 <= minSegments)
return "Greška kod spremanja!";
raProcess.setMessage("Određivanje uvjeta za " +
Aus.getNum(minSegments, "segment", "segmenta", "segmenata") + " ...", false);
Condition[] conds = kdp.createSegments(bestCol, minSegments);
if (kdp.dumpSegments(dir, conds) > 0)
return tname + ".dat - spremljen!";
return "Greška kod spremanja!";
} catch (ProcessInterruptException e) {
throw (ProcessInterruptException) e.fillInStackTrace();
} catch (Exception e) {
e.printStackTrace();
return "Greška kod spremanja!";
}
}
public static class SelectPathDialog extends JraDialog {
JraTextField path = new JraTextField(48) {
public void focusGained(java.awt.event.FocusEvent e) {}
public boolean maskCheck() { return true; }
};
JraButton doh = new JraButton();
OKpanel okp = new OKpanel() {
public void jBOK_actionPerformed() {
OKPress();
}
public void jPrekid_actionPerformed() {
CancelPress();
}
};
JDirectoryChooser dc = new JDirectoryChooser();
public File loadsave;
File oldls;
public boolean oksel;
public SelectPathDialog(Frame owner, String title) {
super(owner, title, true);
try {
init();
} catch (Exception e) {
e.printStackTrace();
}
}
public SelectPathDialog(Frame owner) {
this(owner, "Putanja za spremanje i dohvat podataka");
}
public SelectPathDialog(Dialog owner, String title) {
super(owner, title, true);
try {
init();
} catch (Exception e) {
e.printStackTrace();
}
}
private void init() throws Exception {
doh.setText("Dohvat");
JPanel up = new JPanel(new FlowLayout(FlowLayout.CENTER, 2, 4));
up.add(path);
okp.add(doh, BorderLayout.WEST);
this.getContentPane().add(up, BorderLayout.NORTH);
this.getContentPane().add(okp, BorderLayout.SOUTH);
this.pack();
this.setLocationRelativeTo(this.getOwner());
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
CancelPress();
}
});
path.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
OKPress();
}
});
path.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == e.VK_F9) {
selectFile();
}
}
});
doh.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
selectFile();
}
});
okp.registerOKPanelKeys(this);
dc.setFileSelectionMode(dc.DIRECTORIES_ONLY);
dc.setDialogTitle("Odabir putanje");
}
private void selectFile() {
try {
File cur = new File(path.getText());
if (cur.exists() && cur.isDirectory())
dc.setCurrentDirectory(cur);
} catch (Exception e) {}
if (dc.showDialog(this) == dc.APPROVE_OPTION) {
path.setText(dc.getSelectedFile().getAbsolutePath());
}
}
private void CancelPress() {
oksel = false;
loadsave = oldls;
if (loadsave!= null && loadsave.equals(Aus.getCurrentDirectory()))
loadsave = null;
dispose();
}
private void OKPress() {
oksel = false;
try {
loadsave = new File(path.getText());
if (loadsave.exists() && loadsave.isDirectory())
oksel = true;
} catch (Exception e) {}
if (!oksel) {
JOptionPane.showMessageDialog(this, "Pogrešna putanja!", "Greška",
JOptionPane.ERROR_MESSAGE);
} else {
if (loadsave.equals(Aus.getCurrentDirectory()))
loadsave = null;
dispose();
}
}
public void show() {
oldls = loadsave;
if (loadsave == null)
loadsave = Aus.getCurrentDirectory();
dc.setCurrentDirectory(loadsave);
path.setText(loadsave.getAbsolutePath());
super.show();
}
}
}
class CopyDialog extends JraDialog {
JPanel jpDetail = new JPanel();
XYLayout lay = new XYLayout();
JLabel jlApp = new JLabel();
JLabel jlImetab = new JLabel();
JTextField jraImetab = new JTextField();
JTextField jlrApp = new JTextField();
OKpanel okp = new OKpanel() {
public void jBOK_actionPerformed() {
OKPress();
}
public void jPrekid_actionPerformed() {
CancelPress();
}
};
boolean ok;
public CopyDialog(kreator kr) {
super(kr, "Kriterij selekcije", true);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
this.setLocationRelativeTo(kr);
}
public void show() {
ok = false;
this.setLocationRelativeTo(kreator.kr);
super.show();
}
private void OKPress() {
ok = true;
this.hide();
}
private void CancelPress() {
this.hide();
}
public boolean isOK() {
return ok;
}
public String getTab() {
return jraImetab.getText().trim();
}
public String getApp() {
return jlrApp.getText().trim();
}
private void jbInit() throws Exception {
jpDetail.setLayout(lay);
lay.setWidth(270);
lay.setHeight(85);
jlApp.setText("Aplikacija");
jlImetab.setText("Tablica");
jpDetail.add(jlApp, new XYConstraints(15, 20, -1, -1));
jpDetail.add(jlImetab, new XYConstraints(15, 45, -1, -1));
jpDetail.add(jlrApp, new XYConstraints(150, 20, 100, -1));
jpDetail.add(jraImetab, new XYConstraints(150, 45, 100, -1));
okp.registerOKPanelKeys(this);
jraImetab.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == e.VK_ENTER)
OKPress();
}
});
jlrApp.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == e.VK_ENTER)
jraImetab.requestFocus();
}
});
this.getContentPane().add(jpDetail, BorderLayout.CENTER);
this.getContentPane().add(okp, BorderLayout.SOUTH);
this.addComponentListener(new ComponentAdapter() {
public void componentShown(ComponentEvent e) {
jraImetab.requestFocus();
}
});
this.pack();
}
}
class TabeleZaKreiranje {
public String ime_tabele;
public String ime_klase;
public String status ;
public String kreat_tabela; /// opcije dropaj, kreiraj, rekreiraj
public String kreat_index; /// opcije dropaj , kreiraj, rekreiraj
public Boolean sto_sad;
public TabeleZaKreiranje(String i_t,String i_k,String stat,String k_t,String k_i,Boolean s_s){
ime_tabele = i_t;
ime_klase = i_k;
status=stat;
kreat_tabela = k_t;
kreat_index = k_i;
sto_sad = s_s;
}
public String getElement(int col) {
if (col == 0) return ime_tabele;
else if (col == 1) return status;
else if (col == 2) return kreat_tabela;
else if (col == 3) return kreat_index;
else if (col == 4) return sto_sad.toString();
else return "";
}
}
class DynamicComparator implements Comparator {
int column, inv = 1;
public DynamicComparator(int col, boolean asc) {
column = col;
inv = !asc ? -1 : 1;
}
// public DynamicComparator(DynamicComparator c) {
// this.column = c.column;
// this.inverse = -1;
// }
public int compare(Object o1, Object o2) {
if (!(o1 instanceof TabeleZaKreiranje) || !(o2 instanceof TabeleZaKreiranje))
throw new RuntimeException("Invalid vector elements");
return ((TabeleZaKreiranje) o1).getElement(column).compareToIgnoreCase(((TabeleZaKreiranje) o2).getElement(column)) * inv;
}
}
class ColumnData {
public String m_title;
public int m_width;
public int m_alignment;
public ColumnData(String title, int width, int alignment) {
m_title = title;
m_width = width;
m_alignment = alignment;
}
}
class TableModelZaKreiranje extends javax.swing.table.AbstractTableModel {
static final public ColumnData m_columns[] = {
new ColumnData( "Tablica", 150, JLabel.LEFT ),
new ColumnData( "Status", 360, JLabel.LEFT ),
new ColumnData( "Indekse", 120, JLabel.LEFT ),
new ColumnData( "Tablice", 120, JLabel.LEFT ),
new ColumnData( "Akcija", 60, JLabel.CENTER)};
java.util.Vector tm_vector;
// BazaOper baza ;
int sortColumn = -1;
boolean ascending;
public TableModelZaKreiranje(){
tm_vector = new java.util.Vector();
// baza= new BazaOper() ;
fillVector(tm_vector);
}
public int getSortedColumn() {
return sortColumn;
}
public boolean isAscending() {
return ascending;
}
public void sortColumn(int col) {
if (col >= 0 && col < 5)
Collections.sort(tm_vector, new DynamicComparator(col,
ascending = !(sortColumn == col && ascending)));
sortColumn = col;
this.fireTableDataChanged();
}
/*
* Ovo je privremeno dok se ne najde rjesenje za punjenje dinamicki vektora
*/
public void fillVector(java.util.Vector vct){
String [] imena_klasa = ConsoleCreator.getModuleClasses();
// Arrays.sort(imena_klasa, new Comparator() {
// public int compare(Object o1, Object o2) {
// return ((String) o1).compareToIgnoreCase((String) o2);
// }
// });
dM.getDataModule();
for (int i = 0; i< imena_klasa.length;i++) {
try {
KreirDrop kd = KreirDrop.getModule(imena_klasa[i].toString());
if (kd == null) {
Class kljasa = Class.forName(imena_klasa[i].toString());
kd= (hr.restart.baza.KreirDrop) kljasa.newInstance() ;
}
// trut=kd.TestTabele(baza) ;
/// ovo je sporo ko pakao
// vct.addElement(new TabeleZaKreiranje(kd.Naziv,imena_klasa[i],trut ? "Tabela - kreirana":"Tabela - neiskreirana",
// trut ?"Dropaj":"Kreiraj",trut ?"Dropaj":"Kreiraj",new java.lang.Boolean("false")));
vct.addElement(new TabeleZaKreiranje(kd.Naziv,imena_klasa[i].toString(),"Nemam pojma","Ne diraj","Ne diraj",new java.lang.Boolean("false")));
} catch (Exception e) {
e.printStackTrace();
System.out.println("Greška u " + e.getMessage()+imena_klasa[i].toString());
}
}
}
public int getRowCount(){
return tm_vector== null ? 0: tm_vector.size();
}
public int getColumnCount(){
return 5;
}
public Object getValueAt(int row,int column){
if (row > getRowCount() || row < 0)
return "";
TabeleZaKreiranje red =(TabeleZaKreiranje)tm_vector.elementAt(row);
switch (column) {
case 0 : return red.ime_tabele;
// case 1 : return red.ime_klase;
case 1 : return red.status;
case 2 : return red.kreat_tabela;
case 3 : return red.kreat_index;
case 4 : return red.sto_sad;
case 9 : return red.ime_klase;
}
return "";
}
public String getColumnName(int column) {
return m_columns[column].m_title;
}
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
public void setValueAt(Object value, int nRow, int nCol){
if (nRow < 0 || nRow>=getRowCount())
return ;
TabeleZaKreiranje red =(TabeleZaKreiranje)tm_vector.elementAt(nRow);
String svalue=value.toString();
boolean changed = true;
switch (nCol) {
case 1 : if (red.status.equals(svalue)) changed = false; red.status = svalue ; break ;
case 2 : if (red.kreat_tabela.equals(svalue)) changed = false; red.kreat_tabela = svalue ; break ;
case 3 : if (red.kreat_index.equals(svalue)) changed = false; red.kreat_index = svalue ; break;
case 4 : if (red.sto_sad.equals((Boolean) value)) changed = false; red.sto_sad = (Boolean) value; break;
default: changed = false;
}
if (changed) fireTableCellUpdated(nRow, nCol);
return ;
}
public boolean isCellEditable(int nRow, int nCol){
return nCol==2 || nCol==3 || nCol==4;
}
}
/*
class CheckCellRenderer extends JCheckBox implements TableCellRenderer {
protected static javax.swing.border.Border m_noFocusBorder;
public CheckCellRenderer() {
super();
m_noFocusBorder = new javax.swing.border.EmptyBorder(1, 2, 1, 2);
setOpaque(true);
setBorder(m_noFocusBorder);
}
public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected, boolean hasFocus,
int row, int column) {
if (value instanceof Boolean) {
Boolean b = (Boolean)value;
setSelected(b.booleanValue());
}
setBackground(isSelected && !hasFocus ?
table.getSelectionBackground() : table.getBackground());
setForeground(isSelected && !hasFocus ?
table.getSelectionForeground() : table.getForeground());
setFont(table.getFont());
setBorder(hasFocus ? UIManager.getBorder("Table.focusCellHighlightBorder") : m_noFocusBorder);
return this;
}
}*/ | [
""
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.