blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
de7d8badd4e6114eaadc5a245462c3d3a2e47f9e
9fd8d096c1081f877366541b3cc1a9cb60eac4f3
/src/main/java/com/zzw/secondkill/po/User.java
03f14b45360cfef6b3d9a2a428f6cb9b342bc216
[]
no_license
zzw999/second-kill
e021b86555e95f77f630fb84fdca9175cc84b45f
af3068a7f4a2c495a8ebb9bd46e83b33496d2f95
refs/heads/master
2020-04-10T16:37:54.737257
2018-12-10T09:59:41
2018-12-10T09:59:41
161,150,993
0
0
null
null
null
null
UTF-8
Java
false
false
121
java
package com.zzw.secondkill.po; import lombok.Data; @Data public class User { private int id; private String name; }
616299f324844c6bee5a99d5bf5d0e5f1d757919
8d498c6da9c68b7cd4bade38850901f603efcea4
/src/com/loiane/cursojava/aula64/Texto.java
13e0f0487d8fabf44ca15dd5393b365c5f5bb040
[]
no_license
Edufreitass/curso-java-intermediario
deffbed7f31945839db4c318994b52caa1b50d46
0c5c85ecfbc0f36d8026f1427ec37ea423291dd0
refs/heads/master
2022-11-28T08:54:28.207457
2020-08-04T23:33:39
2020-08-04T23:33:39
278,142,255
0
0
null
null
null
null
UTF-8
Java
false
false
89
java
package com.loiane.cursojava.aula64; public interface Texto { void imprimeTexto(); }
9b6d64074d5b80ce9e5099dbbb98d9c1f18fbeb6
6744f6013074836a54de34021611255f7a5198a3
/Uber/640. Solve the Equation.java
1a6b8ff87aba251c32ff1ac2f68161e235a24d0d
[]
no_license
wangweisunying/learning
2ff4c898be1eddefc55da73da350ff27b7b9f8f4
d15843546bbd71ba9f77b082dd6982c9ccc54f40
refs/heads/master
2020-03-30T14:44:19.734605
2019-03-16T00:31:01
2019-03-16T00:31:01
151,333,856
0
0
null
null
null
null
UTF-8
Java
false
false
2,928
java
// 640. Solve the Equation // DescriptionHintsSubmissionsDiscussSolution // Solve a given equation and return the value of x in the form of string "x=#value". The equation contains only '+', '-' operation, the variable x and its coefficient. // If there is no solution for the equation, return "No solution". // If there are infinite solutions for the equation, return "Infinite solutions". // If there is exactly one solution for the equation, we ensure that the value of x is an integer. // Example 1: // Input: "x+5-3+x=6+x-2" // Output: "x=2" // Example 2: // Input: "x=x" // Output: "Infinite solutions" // Example 3: // Input: "2x=x" // Output: "x=0" // Example 4: // /"-99x=99" // Your stdout // [-100, 0] // [0, 99] // Your answer // "x=0" class Solution { public String solveEquation(String equation) { String[] arr = equation.split("="); int[] left = helper(arr[0]); int[] right = helper(arr[1]); System.out.println(Arrays.toString(left)); System.out.println(Arrays.toString(right)); if(left[0] == right[0]){ if(left[1] == right[1]) return "Infinite solutions"; else return "No solution"; } else{ if(left[0] < right[0]){ return "x=" + (left[1] - right[1]) / (right[0] - left[0]); } else{ return "x=" + (left[1] - right[1]) / (right[0] - left[0]); } } } private int[] helper(String str){ int sum = 0; int sumX = 0; String oper = ""; for(int i = 0 ; i < str.length() ; i++){ if(Character.isDigit(str.charAt(i))){ int tmp = 0; while(i < str.length() && Character.isDigit(str.charAt(i))){ tmp = tmp * 10 + (str.charAt(i) - '0'); ++i; } if(i < str.length() && str.charAt(i) == 'x'){ if(oper.equals("")) sumX = tmp; if(oper.equals("+")) sumX += tmp; if(oper.equals("-")) sumX -= tmp; } else{ if(oper.equals("")) sum = tmp; if(oper.equals("+")) sum += tmp; if(oper.equals("-")) sum -= tmp; } oper = ""; --i; } else if(str.charAt(i) == '+' || str.charAt(i) == '-'){ oper = "" + str.charAt(i); } else{ if(oper.equals("")){ if(i - 1 >= 0 && str.charAt(i - 1) == '0'){ } else if(sumX == 0 ) sumX = 1; } if(oper.equals("+")) sumX += 1; if(oper.equals("-")) sumX -= 1; } } return new int[]{sumX , sum}; } }
40b1cf585590ab042f6bfb55d9accc43708f7a64
180d0583078f65c46c6d13eda964ac0ea313097a
/src/main/java/com/zumgu/service/ContentService.java
c1511eae596e51d803fbf2503e4610954af7ef6a
[]
no_license
wckhg89/hibernate
01910b9faad77d214e118fb80addc45244da747f
f4686d4d7e7349734b3f23b5a8bab9423c3c7b7d
refs/heads/master
2020-06-12T14:07:13.954838
2017-01-14T07:49:20
2017-01-14T07:49:20
75,806,093
0
0
null
null
null
null
UTF-8
Java
false
false
1,689
java
package com.zumgu.service; import com.google.common.collect.Lists; import com.zumgu.domain.Content; import com.zumgu.domain.Member; import com.zumgu.repository.ContentRepository; import com.zumgu.repository.MemberRepository; import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; /** * Created by 강홍구 on 2017-01-14. */ @Service @Transactional public class ContentService { private static final Logger logger = LoggerFactory.getLogger(ContentService.class); @Autowired private MemberRepository memberRepository; @Autowired private ContentRepository contentRepository; public List<Content> getContents () { return contentRepository.getContents(); } public List<Content> getContentsOfMember (Long memberId) { Member member = memberRepository.getMember(memberId); return member.getContents(); } public List<Content> getContentsOfMemberAfterSpecificDate (Long memberId, DateTime date) { Member member = memberRepository.getMember(memberId); List<Content> contents = member.getContents(); List<Content> specificDateContents = Lists.newArrayList(); for (Content content : contents) { DateTime contentCreatedAt = content.getCreatedAt(); if (contentCreatedAt.isAfter(date)) { specificDateContents.add(content); } } return specificDateContents; } }
c727da7617d27c2de08831d6849576c092e75488
a823d48f9c18a308d389492471f205365bb4e578
/0000-java8-master/src/main/java/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.java
e888f4663ab04718708167a8f7549c8f208ebc16
[]
no_license
liuawen/Learning-Algorithms
3e145915ceecb93e88ca92df5dc1d0bf623db429
983c93a96ce0807534285782a55b22bb31252078
refs/heads/master
2023-07-19T17:04:39.723755
2023-07-14T14:59:03
2023-07-14T14:59:03
200,856,810
16
6
null
2023-04-17T19:13:20
2019-08-06T13:26:41
Java
UTF-8
Java
false
false
2,369
java
/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /** * 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 com.sun.org.apache.xml.internal.security.c14n; import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; public class InvalidCanonicalizerException extends XMLSecurityException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidCanonicalizerException * */ public InvalidCanonicalizerException() { super(); } /** * Constructor InvalidCanonicalizerException * * @param msgID */ public InvalidCanonicalizerException(String msgID) { super(msgID); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param exArgs */ public InvalidCanonicalizerException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param originalException */ public InvalidCanonicalizerException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidCanonicalizerException * * @param msgID * @param exArgs * @param originalException */ public InvalidCanonicalizerException( String msgID, Object exArgs[], Exception originalException ) { super(msgID, exArgs, originalException); } }
3e6aa416028dad20ea113ed3c76c12f85d95dd0b
96583055700c7e589fa5d59d4ff39c016a33c697
/src/main/java/com/ssafy/edu/model/vo/ReviewVo.java
7e9ff4658a1cf53ade073cc10806849c02e26706
[]
no_license
gospel306/webproject
6354d9e233e2c97b0f1d09dc5bc3d3c23312cee7
256f44cb6ed5476fc0b484ac92fbe35b6fbf7317
refs/heads/develop
2021-06-16T20:28:11.396913
2021-06-01T08:36:15
2021-06-01T08:36:15
206,063,544
1
3
null
2020-08-04T07:44:34
2019-09-03T11:41:42
TSQL
UTF-8
Java
false
false
1,381
java
package com.ssafy.edu.model.vo; public class ReviewVo { private int num; private String title; private String content; private String time_Stamp; private String id; private int contentid; public ReviewVo(int num, String title, String content, String time_Stamp,String id,int contentid) { super(); this.num = num; this.title = title; this.content = content; this.time_Stamp = time_Stamp; this.id = id; this.contentid = contentid; } public ReviewVo() { super(); // TODO Auto-generated constructor stub } public int getNum() { return num; } public void setNum(int num) { this.num = num; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getTime_Stamp() { return time_Stamp; } public void setTime_Stamp(String time_Stamp) { this.time_Stamp = time_Stamp; } public String getId() { return id; } public void setId(String id) { this.id = id; } public int getContentid() { return contentid; } public void setContentid(int contentid) { this.contentid = contentid; } @Override public String toString() { return "ReviewVo [num=" + num + ", title=" + title + ", content=" + content + ", time_Stamp=" + time_Stamp + "]"; } }
b885f085dc9d53b43490f25a0078bf95ebf24de8
3f2fe92f11fe6a012ea87936bedbeb08fd392a1a
/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/configuration/XMLUIConfiguration.java
5f7bef60825741a81900651bfc789defd81faedc
[]
no_license
pulipulichen/dspace-dlll
bbb61aa528876e2ce4908fac87bc9b2323baac3c
e9379176291c171c19573f7f6c685b6dc995efe1
refs/heads/master
2022-08-22T21:15:12.751565
2022-07-12T14:50:10
2022-07-12T14:50:10
9,954,185
1
1
null
null
null
null
UTF-8
Java
false
false
6,415
java
/* * XMLUIConfiguration.java * * Version: $Revision: 1.3 $ * * Date: $Date: 2006/01/11 03:06:43 $ * * Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts * Institute of Technology. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of the Hewlett-Packard Company nor the name of the * Massachusetts Institute of Technology nor the names of their * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ package org.dspace.app.xmlui.configuration; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.log4j.Logger; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.jdom.xpath.XPath; /** * This class reads the XMLUI configuration file. * * @author Scott Phillips */ public class XMLUIConfiguration { /** log4j category */ private static Logger log = Logger.getLogger(XMLUIConfiguration.class); /** The configured Aspects */ private static List<Aspect> aspects = new ArrayList<Aspect>(); /** The configured Theme rules */ private static List<Theme> themes = new ArrayList<Theme>(); /** * Initialize the XMLUI Configuration. * * Load and parse the xmlui.xconf configuration file for a list of * installed aspects and themes. Multiple configuration paths may be * supplied but only the first valid file (exists and readable) will * be used. * * @param configPath Multiple paths configuration paths may be specified */ public static void loadConfig(String ... configPaths) throws IOException, JDOMException { if (configPaths == null || configPaths.length == 0) throw new IllegalStateException( "The xmlui configuration path must be defined."); File configFile = null; for (String configPath : configPaths ) { if (configPath != null) configFile = new File(configPath); if (configFile != null && configFile.exists() && configFile.canRead()) { log.info("Loading XMLUI configuration from: "+configPath); break; } else { log.debug("Faild to load XMLUI configuration from: "+configPath); } } if (configFile == null) { String allPaths = ""; boolean first = true; for (String configPath : configPaths) { if (first) first = false; else allPaths += ", "; allPaths += configPath; } throw new IllegalStateException("None of the xmlui configuration paths were valid: "+ allPaths); } // FIXME: Sometime in the future require that the xmlui.xconf be valid. // SAXBuilder builder = new SAXBuilder(true); SAXBuilder builder = new SAXBuilder(); Document config = builder.build(configFile); @SuppressWarnings("unchecked") // This cast is correct List<Element> aspectElements = XPath.selectNodes(config, "//xmlui/aspects/aspect"); @SuppressWarnings("unchecked") // This cast is correct List<Element> themeElements = XPath.selectNodes(config, "//xmlui/themes/theme"); for (Element aspectElement : aspectElements) { String path = aspectElement.getAttributeValue("path"); String name = aspectElement.getAttributeValue("name"); if (path == null || path.length() == 0) throw new IllegalStateException( "All aspects muth define a path"); aspects.add(new Aspect(name, path)); log.info("Aspect Installed: name='"+name+"', path='"+path+"'."); } // Put them in the order that people expect. Collections.reverse(aspects); for (Element themeElement : themeElements) { String name = themeElement.getAttributeValue("name"); String path = themeElement.getAttributeValue("path"); String id = themeElement.getAttributeValue("id"); String regex = themeElement.getAttributeValue("regex"); String handle = themeElement.getAttributeValue("handle"); if (path == null || path.length() == 0) throw new IllegalStateException("All themes muth define a path"); themes.add(new Theme(name, path, id, regex, handle)); log.info("Theme Installed: name='"+name+"', path='"+path+"', id='"+id+"', regex='"+regex+"', handle='"+handle+"'."); } } /** * * @return The configured Aspect chain. */ public static List<Aspect> getAspectChain() { return aspects; } /** * * @return The configured Theme rules. */ public static List<Theme> getThemeRules() { return themes; } }
fd920e38e515056360ea2045c608a64e6acaa453
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/android/support/v7/widget/ab.java
ab510d361dc38164d0e3d17e0922e3712f6e0ab4
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
1,037
java
package android.support.v7.widget; import android.view.View; public abstract class ab { protected final RecyclerView.h QG; int QH = Integer.MIN_VALUE; private ab(RecyclerView.h paramh) { this.QG = paramh; } public abstract int aU(View paramView); public abstract int aV(View paramView); public abstract int aW(View paramView); public abstract int aX(View paramView); public abstract void bj(int paramInt); public final int fr() { if (Integer.MIN_VALUE == this.QH) { return 0; } return fu() - this.QH; } public abstract int fs(); public abstract int ft(); public abstract int fu(); public abstract int fv(); public abstract int getEnd(); public abstract int getEndPadding(); public abstract int getMode(); } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/android/support/v7/widget/ab.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
b3cf2b575a8074f5f39b0288f8c370367e244537
26b7f30c6640b8017a06786e4a2414ad8a4d71dd
/src/number_of_direct_superinterfaces/i9650.java
2e65d6d47326647e6e763cfe481e411e229cc21f
[]
no_license
vincentclee/jvm-limits
b72a2f2dcc18caa458f1e77924221d585f23316b
2fd1c26d1f7984ea8163bc103ad14b6d72282281
refs/heads/master
2020-05-18T11:18:41.711400
2014-09-14T04:25:18
2014-09-14T04:25:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
68
java
package number_of_direct_superinterfaces; public interface i9650 {}
b60abc971ff41221ef88166971cd30c2647a5b98
bccd0b387f574ae2939cb38cc2ff19fa87c8a453
/src/main/java/br/com/isaccanedo/blockchain/BlockchainDemo.java
7bea987a57788a6d88b2423a493d3004a2590887
[ "MIT" ]
permissive
isaccanedo/spring-boot-blockchain
0d5ec7b38a85f7a89d941e2a84b8cf9157fcd445
a019c9e22776c8f1ffb180c02d7f793dc845a846
refs/heads/master
2022-12-29T23:09:30.098202
2020-10-15T18:38:13
2020-10-15T18:38:13
304,417,066
1
0
null
null
null
null
UTF-8
Java
false
false
661
java
package br.com.isaccanedo.blockchain; public class BlockchainDemo { public static void main(String[] args) { Blockchain blockchain = new Blockchain(); blockchain.addBlock(new String[]{"Isac envia 500 bitcoin para Carlos.", "Ricardo envia 100 bitcoin para Isac."}); blockchain.addBlock(new String[]{"Vanessa envia 200 bitcoin para Karina."}); blockchain.addBlock(new String[]{"Santana envia 40 bitcoin para Pedro."}); System.out.println("Hash de blocos:"); for(Block block : blockchain.getBlocks()) { System.out.println("Bloco #" + block.getIndex() + ": " + block.getHash()); } } }
803f13cdbc1e333f836777c03abe109968d01b7c
053aa31c45cb01706f0ec9be9dc523e926807a09
/app/src/main/java/com/alorma/github/ui/activity/issue/IssueAssigneesPresenter.java
d6afac276362236167ec76c421034b62ffa6700c
[ "MIT" ]
permissive
mikepenz/Gitskarios
81d8bf3a7dde4b1e336c8d05f7c52a973933d22b
f888e137bc7aa9fdb986378d56be53c1a11797d5
refs/heads/develop
2021-01-18T19:48:24.243963
2016-07-11T17:15:12
2016-07-11T17:15:12
37,779,386
4
4
null
2015-06-20T17:45:36
2015-06-20T17:45:36
null
UTF-8
Java
false
false
1,591
java
package com.alorma.github.ui.activity.issue; import com.alorma.github.presenter.Presenter; import com.alorma.github.sdk.bean.dto.response.User; import com.alorma.github.sdk.bean.info.IssueInfo; import com.alorma.github.sdk.core.ApiClient; import com.alorma.github.sdk.core.datasource.RestWrapper; import com.alorma.github.sdk.core.repository.GenericRepository; import com.alorma.github.sdk.services.repo.GetRepoCollaboratorsClient; import java.util.List; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; public class IssueAssigneesPresenter extends Presenter<IssueInfo, List<User>> { @Override public void load(IssueInfo issueInfo, Callback<List<User>> listCallback) { GetRepoCollaboratorsClient contributorsClient = new GetRepoCollaboratorsClient(issueInfo.repoInfo); contributorsClient.observable() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnSubscribe(listCallback::showLoading) .doOnCompleted(listCallback::hideLoading) .subscribe(users -> listCallback.onResponse(users, true), Throwable::printStackTrace); } @Override public void loadMore(IssueInfo issueInfo, Callback<List<User>> listCallback) { } @Override protected GenericRepository<IssueInfo, List<User>> configRepository(RestWrapper restWrapper) { return null; } @Override protected RestWrapper getRest(ApiClient apiClient, String token) { return null; } @Override public void action(List<User> users, Callback<List<User>> listCallback, boolean firstTime) { } }
2583dafeb8e65cdbe3db37d317cc99bb4089756d
6156223544215e8751c10339cc32ef1c03053684
/plugin-offline/src/main/java/com/mapbox/mapboxsdk/plugins/offline/model/NotificationOptions.java
9313a45ea1769c3f6e6760c58b897ce8f439892d
[ "BSD-2-Clause" ]
permissive
romatroskin/mapbox-plugins-android
a0a205d65e8663ccac635c1e87f1968a7af56b68
0a4d416b7ba95ea7fabbdf04c3fd8f396fe077e2
refs/heads/master
2021-04-09T16:35:22.105857
2018-03-12T21:30:52
2018-03-12T21:30:52
125,637,497
0
0
BSD-2-Clause
2018-03-17T14:30:32
2018-03-17T14:30:31
null
UTF-8
Java
false
false
1,457
java
package com.mapbox.mapboxsdk.plugins.offline.model; import android.content.Context; import android.os.Parcelable; import android.support.annotation.DrawableRes; import com.google.auto.value.AutoValue; import com.mapbox.mapboxsdk.plugins.offline.R; @AutoValue public abstract class NotificationOptions implements Parcelable { @DrawableRes public abstract int smallIconRes(); abstract String returnActivity(); public Class getReturnActivity() { try { return Class.forName(returnActivity()); } catch (ClassNotFoundException exception) { throw new IllegalArgumentException("The returning class name " + returnActivity() + " cannot be found."); } } public abstract String contentTitle(); public abstract String contentText(); public static Builder builder(Context context) { return new AutoValue_NotificationOptions.Builder() .contentTitle(context.getString(R.string.mapbox_offline_notification_default_content_title)) .contentText(context.getString(R.string.mapbox_offline_notification_default_content_text)); } @AutoValue.Builder public abstract static class Builder { public abstract Builder smallIconRes(int smallIconRes); public abstract Builder returnActivity(String returnActivity); public abstract Builder contentTitle(String contentTitle); public abstract Builder contentText(String contentText); public abstract NotificationOptions build(); } }
c789c3eaf8682d7a5ab31486a853e60cc87d331c
3965a5d2d38f064fafa537904825b49643c5f99d
/src/main/java/com/category/category/listener/HelloListener.java
6ada299811b9ea7045af5716050e383e4fec5fcc
[]
no_license
TheAiolos14/trainingBlibliCategory
35fee3a9dfefbde6fa59cb35bf966040e78a3e72
2646f4994198125d743c35ebc88c2e720dec1b73
refs/heads/master
2020-04-28T15:51:29.548360
2019-03-13T09:45:51
2019-03-13T09:45:51
173,867,170
0
0
null
null
null
null
UTF-8
Java
false
false
692
java
package com.category.category.listener; import com.category.category.entity.Category; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; @Slf4j @Component public class HelloListener { @Autowired private ObjectMapper objectMapper; @KafkaListener(topics = "categories") public void listenTopicBelajar(String body) throws Exception { Category category = objectMapper.readValue(body, Category.class); log.info("Receive Message {}", category); } }
348c771c5f45cca66826b749e6e2d632290011b9
9e2457e08f3e21cde0b02ebd4103a45a117a66f0
/Toir-mobile/app/src/main/java/ru/toir/mobile/multi/MessageInfoActivity.java
5f70623e97082f83016a0e3506981100df0b4d4f
[]
no_license
VitalyLitvinov74/tiirs.mobile
f2019b86f3688eab7b00d55514265ac074af0349
dad53d2b1d5873e5360697a1dd27cda82548a471
refs/heads/main
2023-07-04T15:46:33.437299
2021-08-10T20:53:33
2021-08-10T20:53:41
342,152,079
0
0
null
null
null
null
UTF-8
Java
false
false
5,183
java
package ru.toir.mobile.multi; import android.content.Context; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import io.realm.Realm; import ru.toir.mobile.multi.db.realm.Message; import static ru.toir.mobile.multi.utils.RoundedImageView.getResizedBitmap; public class MessageInfoActivity extends AppCompatActivity { private final static String TAG = "MessageInfo"; private static String message_uuid; private Realm realmDB; private Context context; private ListViewClickListener mainListViewClickListener = new ListViewClickListener(); private ImageView image; private TextView userFrom; private TextView request; private TextView userTo; private TextView date; private TextView text; private Button accept; /* * (non-Javadoc) * * @see * android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, * android.view.ViewGroup, android.os.Bundle) */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = this; realmDB = Realm.getDefaultInstance(); Bundle b = getIntent().getExtras(); if (b != null && b.getString("message_uuid") != null) { message_uuid = b.getString("message_uuid"); } else { finish(); return; } setMainLayout(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); image = findViewById(R.id.user_image); userFrom = findViewById(R.id.user_from); userTo = findViewById(R.id.user_to); date = findViewById(R.id.date); text = findViewById(R.id.text); accept = findViewById(R.id.request); request = findViewById(R.id.request_message); initView(); } void setMainLayout(Bundle savedInstanceState) { setContentView(R.layout.message_layout); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); assert toolbar != null; toolbar.setSubtitle(R.string.menu_messages); ActionBar ab = getSupportActionBar(); if (ab != null) { ab.setTitle(R.string.app_name); } } private void initView() { final Message message = realmDB.where(Message.class).equalTo("uuid", message_uuid).findFirst(); if (message == null) { return; } userFrom.setText(message.getFromUser().getName()); userTo.setText(message.getToUser().getName()); AuthorizedUser authUser = AuthorizedUser.getInstance(); String path = message.getFromUser().getImageFilePath(authUser.getDbName()) + "/"; Bitmap user_bitmap = getResizedBitmap(path, message.getFromUser().getImage(), 0, 70, message.getFromUser().getChangedAt().getTime()); if (user_bitmap != null) { image.setImageBitmap(user_bitmap); } text.setText(message.getText()); String sDate = new SimpleDateFormat("dd.MM.yyyy HH:ss", Locale.US).format(message.getDate()); date.setText(sDate); if (message.getRequestStatus() == -1) { accept.setVisibility(View.GONE); request.setVisibility(View.GONE); } if (message.getRequestStatus() == 0) { accept.setVisibility(View.VISIBLE); accept.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { realmDB.beginTransaction(); message.setRequestStatus(1); message.setChangedAt(new Date()); realmDB.commitTransaction(); accept.setText(R.string.accepted); accept.setBackgroundColor(getResources().getColor(R.color.green)); } }); } if (message.getRequestStatus() == 1) { accept.setVisibility(View.VISIBLE); accept.setText(R.string.accepted); accept.setBackgroundColor(getResources().getColor(R.color.green)); } if (message.getStatus() == Message.Status.MESSAGE_NEW) { realmDB.beginTransaction(); message.setStatus(Message.Status.MESSAGE_READ); message.setChangedAt(new Date()); realmDB.commitTransaction(); } } @Override protected void onDestroy() { super.onDestroy(); realmDB.close(); } private class ListViewClickListener implements AdapterView.OnItemClickListener { @Override public void onItemClick(final AdapterView<?> parent, View selectedItemView, final int position, long id) { } } }
e2cbb8073dae518fd77da9793d421cdb1cd2e7ec
c885ef92397be9d54b87741f01557f61d3f794f3
/results/JacksonDatabind-103/com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer/BBC-F0-opt-40/tests/5/com/fasterxml/jackson/databind/deser/std/StdKeyDeserializer_ESTest.java
9ee1a31c6dbf5836b67f37ca872a49d37ee0bb0d
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
42,499
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 14:35:35 GMT 2021 */ package com.fasterxml.jackson.databind.deser.std; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.core.format.MatchStrength; import com.fasterxml.jackson.core.io.IOContext; import com.fasterxml.jackson.core.json.ReaderBasedJsonParser; import com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer; import com.fasterxml.jackson.core.util.BufferRecycler; import com.fasterxml.jackson.core.util.JsonParserDelegate; import com.fasterxml.jackson.databind.AnnotationIntrospector; import com.fasterxml.jackson.databind.DeserializationConfig; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.InjectableValues; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.cfg.BaseSettings; import com.fasterxml.jackson.databind.cfg.ConfigOverrides; import com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig; import com.fasterxml.jackson.databind.deser.BeanDeserializerFactory; import com.fasterxml.jackson.databind.deser.DefaultDeserializationContext; import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer; import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer; import com.fasterxml.jackson.databind.deser.std.UUIDDeserializer; import com.fasterxml.jackson.databind.introspect.AnnotatedMethod; import com.fasterxml.jackson.databind.introspect.ClassIntrospector; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.jsontype.SubtypeResolver; import com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver; import com.fasterxml.jackson.databind.util.EnumResolver; import com.fasterxml.jackson.databind.util.RootNameLookup; import java.io.IOException; import java.io.PipedReader; import java.io.PipedWriter; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.URI; import java.net.URL; import java.sql.BatchUpdateException; import java.sql.SQLException; import java.sql.SQLInvalidAuthorizationSpecException; import java.util.Calendar; import java.util.Currency; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.UUID; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class StdKeyDeserializer_ESTest extends StdKeyDeserializer_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); Object object0 = stdKeyDeserializer0.deserializeKey("0", (DeserializationContext) null); assertEquals((byte)0, object0); } @Test(timeout = 4000) public void test01() throws Throwable { Class<MatchStrength> class0 = MatchStrength.class; Class<Short> class1 = Short.class; FromStringDeserializer.Std fromStringDeserializer_Std0 = new FromStringDeserializer.Std(class1, 9); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer_Std0); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory((DeserializerFactoryConfig) null); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("@k#IDCQ%NwR6`fDS", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test02() throws Throwable { Class<Long> class0 = Long.TYPE; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(12, class0); Class<?> class1 = stdKeyDeserializer0.getKeyClass(); assertEquals("long", class1.toString()); } @Test(timeout = 4000) public void test03() throws Throwable { Class<Annotation> class0 = Annotation.class; FromStringDeserializer<Currency> fromStringDeserializer0 = (FromStringDeserializer<Currency>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer()); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(240, class0, fromStringDeserializer0); Class<?> class1 = stdKeyDeserializer0.getKeyClass(); assertFalse(class1.isArray()); } @Test(timeout = 4000) public void test04() throws Throwable { Class<MatchStrength> class0 = MatchStrength.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(30, class0); Class<?> class1 = stdKeyDeserializer0.getKeyClass(); assertFalse(class1.isInterface()); } @Test(timeout = 4000) public void test05() throws Throwable { Class<Long> class0 = Long.TYPE; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(12, class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); UUID uUID0 = (UUID)stdKeyDeserializer0.deserializeKey("AnnotationIntrospector.", defaultDeserializationContext_Impl0); assertEquals((-9079256848728588288L), uUID0.getLeastSignificantBits()); } @Test(timeout = 4000) public void test06() throws Throwable { Class<URL> class0 = URL.class; FromStringDeserializer<Boolean> fromStringDeserializer0 = (FromStringDeserializer<Boolean>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer()); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(3600, class0, fromStringDeserializer0); long long0 = stdKeyDeserializer0._parseLong("0"); assertEquals(0L, long0); } @Test(timeout = 4000) public void test07() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(4, class0); long long0 = stdKeyDeserializer0._parseLong("7"); assertEquals(7L, long0); } @Test(timeout = 4000) public void test08() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); int int0 = stdKeyDeserializer0._parseInt("0"); assertEquals(0, int0); } @Test(timeout = 4000) public void test09() throws Throwable { Class<Double> class0 = Double.TYPE; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); int int0 = stdKeyDeserializer_StringKD0._parseInt("3412"); assertEquals(3412, int0); } @Test(timeout = 4000) public void test10() throws Throwable { Class<MatchStrength> class0 = MatchStrength.class; Class<Short> class1 = Short.class; FromStringDeserializer.Std fromStringDeserializer_Std0 = new FromStringDeserializer.Std(class1, 9); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer_Std0); int int0 = stdKeyDeserializer0._parseInt("-8"); assertEquals((-8), int0); } @Test(timeout = 4000) public void test11() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); double double0 = stdKeyDeserializer0._parseDouble("0"); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test12() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); double double0 = stdKeyDeserializer0._parseDouble("3"); assertEquals(3.0, double0, 0.01); } @Test(timeout = 4000) public void test13() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); double double0 = stdKeyDeserializer0._parseDouble("-Infinity"); assertEquals(Double.NEGATIVE_INFINITY, double0, 0.01); } @Test(timeout = 4000) public void test14() throws Throwable { Class<Byte> class0 = Byte.class; FromStringDeserializer<Float> fromStringDeserializer0 = (FromStringDeserializer<Float>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer()); doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class)); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(16, class0, fromStringDeserializer0); Object object0 = stdKeyDeserializer0._parse("overflow, value cannot be represented as 8-bit value", (DeserializationContext) null); assertNull(object0); } @Test(timeout = 4000) public void test15() throws Throwable { Class<Short> class0 = Short.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig(); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); StdSubtypeResolver stdSubtypeResolver0 = new StdSubtypeResolver(); RootNameLookup rootNameLookup0 = new RootNameLookup(); ConfigOverrides configOverrides0 = new ConfigOverrides(); DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, stdSubtypeResolver0, (SimpleMixInResolver) null, rootNameLookup0, configOverrides0); JsonFactory jsonFactory0 = new JsonFactory(); JsonParser jsonParser0 = jsonFactory0.createNonBlockingByteArrayParser(); HashMap<String, Object> hashMap0 = new HashMap<String, Object>(); InjectableValues.Std injectableValues_Std0 = new InjectableValues.Std(hashMap0); DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, jsonParser0, injectableValues_Std0); try { stdKeyDeserializer0.deserializeKey("M=d]*8BQ]*I)j>08B", defaultDeserializationContext0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Cannot deserialize Map key of type `java.lang.Short` from String \"M=d]*8BQ]*I)j>08B\": not a valid representation, problem: (java.lang.NumberFormatException) For input string: \"M=d]*8BQ]*I)j>08B\" // at [Source: UNKNOWN; line: 1, column: 0] // verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e); } } @Test(timeout = 4000) public void test16() throws Throwable { Class<Integer> class0 = Integer.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(3553, class0); DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig(); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); StdSubtypeResolver stdSubtypeResolver0 = new StdSubtypeResolver(); SimpleMixInResolver simpleMixInResolver0 = new SimpleMixInResolver((ClassIntrospector.MixInResolver) null); RootNameLookup rootNameLookup0 = new RootNameLookup(); ConfigOverrides configOverrides0 = new ConfigOverrides(); DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, stdSubtypeResolver0, simpleMixInResolver0, rootNameLookup0, configOverrides0); BufferRecycler bufferRecycler0 = new BufferRecycler(); MatchStrength matchStrength0 = MatchStrength.SOLID_MATCH; IOContext iOContext0 = new IOContext(bufferRecycler0, matchStrength0, false); PipedWriter pipedWriter0 = new PipedWriter(); PipedReader pipedReader0 = new PipedReader(pipedWriter0); ObjectMapper objectMapper0 = new ObjectMapper(); CharsToNameCanonicalizer charsToNameCanonicalizer0 = CharsToNameCanonicalizer.createRoot(); ReaderBasedJsonParser readerBasedJsonParser0 = new ReaderBasedJsonParser(iOContext0, 14, pipedReader0, objectMapper0, charsToNameCanonicalizer0); JsonParserDelegate jsonParserDelegate0 = new JsonParserDelegate(readerBasedJsonParser0); DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, jsonParserDelegate0, (InjectableValues) null); long[] longArray0 = new long[6]; SQLException sQLException0 = new SQLException("com.fasterxml.jackson.databind.ObjectMapper$DefaultTypeResolverBuilder", "trub", 0); BatchUpdateException batchUpdateException0 = new BatchUpdateException("Al2 ]q?`gLW&VSWJl", "trub", 2, longArray0, sQLException0); try { stdKeyDeserializer0._weirdKey(defaultDeserializationContext0, "Al2 ]q?`gLW&VSWJl", batchUpdateException0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Cannot deserialize Map key of type `java.lang.Integer` from String \"Al2 ]q?`gLW&VSWJl\": problem: Al2 ]q?`gLW&VSWJl // at [Source: UNKNOWN; line: 1, column: 0] // verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e); } } @Test(timeout = 4000) public void test17() throws Throwable { Class<Short> class0 = Short.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(17, class0); try { stdKeyDeserializer0._parseInt((String) null); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // null // verifyException("java.lang.Integer", e); } } @Test(timeout = 4000) public void test18() throws Throwable { Class<URI> class0 = URI.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); // Undeclared exception! try { stdKeyDeserializer_StringKD0._parseDouble((String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test(timeout = 4000) public void test19() throws Throwable { Class<Short> class0 = Short.class; Class<AnnotationIntrospector> class1 = AnnotationIntrospector.class; FromStringDeserializer.Std fromStringDeserializer_Std0 = new FromStringDeserializer.Std(class1, 25); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(9, class0, fromStringDeserializer_Std0); try { stdKeyDeserializer0._parse("M*;ur5=MB|X}p]", (DeserializationContext) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Internal error: this code path should never get executed // verifyException("com.fasterxml.jackson.core.util.VersionUtil", e); } } @Test(timeout = 4000) public void test20() throws Throwable { Class<Boolean> class0 = Boolean.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); SimpleMixInResolver simpleMixInResolver0 = new SimpleMixInResolver((ClassIntrospector.MixInResolver) null); RootNameLookup rootNameLookup0 = new RootNameLookup(); ConfigOverrides configOverrides0 = new ConfigOverrides(); DeserializationConfig deserializationConfig0 = new DeserializationConfig((BaseSettings) null, (SubtypeResolver) null, simpleMixInResolver0, rootNameLookup0, configOverrides0); JsonFactory jsonFactory0 = new JsonFactory((ObjectCodec) null); char[] charArray0 = new char[9]; JsonParser jsonParser0 = jsonFactory0.createParser(charArray0, 3687, 2131); InjectableValues.Std injectableValues_Std0 = new InjectableValues.Std(); DefaultDeserializationContext defaultDeserializationContext0 = defaultDeserializationContext_Impl0.createInstance(deserializationConfig0, jsonParser0, injectableValues_Std0); try { stdKeyDeserializer0._parse("maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_YAML_COMMENTS' not enabled for parser)", defaultDeserializationContext0); fail("Expecting exception: IOException"); } catch(IOException e) { // // Cannot deserialize Map key of type `java.lang.Boolean` from String \"maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_YAML_COMMENTS' not enabled for parser)\": value not 'true' or 'false' // at [Source: (char[])\"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\"; line: 1, column: 0] // verifyException("com.fasterxml.jackson.databind.exc.InvalidFormatException", e); } } @Test(timeout = 4000) public void test21() throws Throwable { Class<Object> class0 = Object.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); assertEquals(11, StdKeyDeserializer.TYPE_CALENDAR); } @Test(timeout = 4000) public void test22() throws Throwable { Class<String> class0 = String.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); assertEquals(6, StdKeyDeserializer.TYPE_LONG); } @Test(timeout = 4000) public void test23() throws Throwable { Class<MatchStrength> class0 = MatchStrength.class; AnnotationIntrospector annotationIntrospector0 = AnnotationIntrospector.nopInstance(); EnumResolver enumResolver0 = EnumResolver.constructUnsafeUsingToString(class0, annotationIntrospector0); DeserializerFactoryConfig deserializerFactoryConfig0 = new DeserializerFactoryConfig(); BeanDeserializerFactory beanDeserializerFactory0 = new BeanDeserializerFactory(deserializerFactoryConfig0); DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); StdKeyDeserializer.EnumKD stdKeyDeserializer_EnumKD0 = new StdKeyDeserializer.EnumKD(enumResolver0, (AnnotatedMethod) null); // Undeclared exception! try { stdKeyDeserializer_EnumKD0._parse("j7", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test24() throws Throwable { Class<Character> class0 = Character.class; StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, (JsonDeserializer<?>) null); Object object0 = stdKeyDeserializer_DelegatingKD0.deserializeKey((String) null, (DeserializationContext) null); assertNull(object0); } @Test(timeout = 4000) public void test25() throws Throwable { Class<Long> class0 = Long.class; JsonDeserializer<Short> jsonDeserializer0 = (JsonDeserializer<Short>) mock(JsonDeserializer.class, new ViolatedAssumptionAnswer()); StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, jsonDeserializer0); // Undeclared exception! try { stdKeyDeserializer_DelegatingKD0.deserializeKey("", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$DelegatingKD", e); } } @Test(timeout = 4000) public void test26() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(4, class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); Object object0 = stdKeyDeserializer0.deserializeKey("c", defaultDeserializationContext_Impl0); assertEquals('c', object0); } @Test(timeout = 4000) public void test27() throws Throwable { Class<Short> class0 = Short.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("273470", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test28() throws Throwable { Class<Short> class0 = Short.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertNotNull(stdKeyDeserializer0); Object object0 = stdKeyDeserializer0.deserializeKey("0", (DeserializationContext) null); assertEquals((short)0, object0); } @Test(timeout = 4000) public void test29() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("270", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test30() throws Throwable { Class<Boolean> class0 = Boolean.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); Object object0 = stdKeyDeserializer0._parse("false", (DeserializationContext) null); assertEquals(false, object0); } @Test(timeout = 4000) public void test31() throws Throwable { Class<Long> class0 = Long.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); try { stdKeyDeserializer_StringKD0._parse("n|rcNOWD&rjT&Ol", (DeserializationContext) null); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // Internal error: unknown key type class java.lang.Long // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test32() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(17, class0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey(",", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test33() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(15, class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test34() throws Throwable { Class<Long> class0 = Long.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(8, class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("AnnotationIntrospector.", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test35() throws Throwable { Class<Boolean> class0 = Boolean.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(7, class0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("com.fasterxml.jackson.annotation.JsonCreator$Mode", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test36() throws Throwable { Class<Long> class0 = Long.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test37() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(4, class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("CUpM:", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test38() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("", (DeserializationContext) null); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // For input string: \"\" // verifyException("java.lang.NumberFormatException", e); } } @Test(timeout = 4000) public void test39() throws Throwable { Class<MatchStrength> class0 = MatchStrength.class; FromStringDeserializer<Byte> fromStringDeserializer0 = (FromStringDeserializer<Byte>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer()); doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class)); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(16, class0, fromStringDeserializer0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("0", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test40() throws Throwable { Class<Byte> class0 = Byte.class; FromStringDeserializer<Float> fromStringDeserializer0 = (FromStringDeserializer<Float>) mock(FromStringDeserializer.class, new ViolatedAssumptionAnswer()); doReturn((Object) null).when(fromStringDeserializer0)._deserialize(anyString() , any(com.fasterxml.jackson.databind.DeserializationContext.class)); StdKeyDeserializer stdKeyDeserializer0 = new StdKeyDeserializer(16, class0, fromStringDeserializer0); // Undeclared exception! try { stdKeyDeserializer0.deserializeKey("cjM7\"", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test41() throws Throwable { Class<Currency> class0 = Currency.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("L17P^OYT4*@h[pbY_A", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test42() throws Throwable { Class<Double> class0 = Double.TYPE; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertNull(stdKeyDeserializer0); } @Test(timeout = 4000) public void test43() throws Throwable { Class<URL> class0 = URL.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("p&+", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test44() throws Throwable { Class<URI> class0 = URI.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("not a valid representation", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test45() throws Throwable { Class<Double> class0 = Double.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertEquals(7, StdKeyDeserializer.TYPE_FLOAT); } @Test(timeout = 4000) public void test46() throws Throwable { Class<Locale> class0 = Locale.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse((String) null, (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.FromStringDeserializer$Std", e); } } @Test(timeout = 4000) public void test47() throws Throwable { Class<Float> class0 = Float.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertEquals(15, StdKeyDeserializer.TYPE_CLASS); } @Test(timeout = 4000) public void test48() throws Throwable { Class<Character> class0 = Character.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertEquals(1, StdKeyDeserializer.TYPE_BOOLEAN); } @Test(timeout = 4000) public void test49() throws Throwable { Class<Boolean> class0 = Boolean.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); Object object0 = stdKeyDeserializer0.deserializeKey("true", (DeserializationContext) null); assertEquals(true, object0); } @Test(timeout = 4000) public void test50() throws Throwable { Class<Calendar> class0 = Calendar.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("kg1LJo", (DeserializationContext) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test51() throws Throwable { Class<Date> class0 = Date.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); try { stdKeyDeserializer0._parse("kuJtUi2]", defaultDeserializationContext_Impl0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.DeserializationContext", e); } } @Test(timeout = 4000) public void test52() throws Throwable { Class<Integer> class0 = Integer.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); try { stdKeyDeserializer0._parse("3fyqHlFpRvBS3CdQ~i", (DeserializationContext) null); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // For input string: \"3fyqHlFpRvBS3CdQ~i\" // verifyException("java.lang.NumberFormatException", e); } } @Test(timeout = 4000) public void test53() throws Throwable { Class<UUID> class0 = UUID.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); UUID uUID0 = (UUID)stdKeyDeserializer0._parse("n|rcNOWD&rjT&Ol", (DeserializationContext) null); assertEquals((-9079256848728588288L), uUID0.getLeastSignificantBits()); } @Test(timeout = 4000) public void test54() throws Throwable { Class<Object> class0 = Object.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertEquals(1, StdKeyDeserializer.TYPE_BOOLEAN); } @Test(timeout = 4000) public void test55() throws Throwable { Class<String> class0 = String.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); assertEquals(3, StdKeyDeserializer.TYPE_SHORT); } @Test(timeout = 4000) public void test56() throws Throwable { StdKeyDeserializer.StringFactoryKeyDeserializer stdKeyDeserializer_StringFactoryKeyDeserializer0 = null; try { stdKeyDeserializer_StringFactoryKeyDeserializer0 = new StdKeyDeserializer.StringFactoryKeyDeserializer((Method) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringFactoryKeyDeserializer", e); } } @Test(timeout = 4000) public void test57() throws Throwable { StdKeyDeserializer.StringCtorKeyDeserializer stdKeyDeserializer_StringCtorKeyDeserializer0 = null; try { stdKeyDeserializer_StringCtorKeyDeserializer0 = new StdKeyDeserializer.StringCtorKeyDeserializer((Constructor<?>) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer$StringCtorKeyDeserializer", e); } } @Test(timeout = 4000) public void test58() throws Throwable { Class<Long> class0 = Long.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); Object object0 = stdKeyDeserializer_StringKD0.deserializeKey("n|rcNOWD&rjT&Ol", (DeserializationContext) null); assertEquals("n|rcNOWD&rjT&Ol", object0); } @Test(timeout = 4000) public void test59() throws Throwable { Class<Double> class0 = Double.class; UUIDDeserializer uUIDDeserializer0 = new UUIDDeserializer(); StdKeyDeserializer.DelegatingKD stdKeyDeserializer_DelegatingKD0 = new StdKeyDeserializer.DelegatingKD(class0, uUIDDeserializer0); Class<?> class1 = stdKeyDeserializer_DelegatingKD0.getKeyClass(); StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class1); try { stdKeyDeserializer_StringKD0._parseDouble("]MWuwPTMY|x4"); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { } } @Test(timeout = 4000) public void test60() throws Throwable { Class<Boolean> class0 = Boolean.class; StdKeyDeserializer.StringKD stdKeyDeserializer_StringKD0 = StdKeyDeserializer.StringKD.forType(class0); try { stdKeyDeserializer_StringKD0._parseLong(""); fail("Expecting exception: NumberFormatException"); } catch(NumberFormatException e) { // // For input string: \"\" // verifyException("java.lang.NumberFormatException", e); } } @Test(timeout = 4000) public void test61() throws Throwable { Class<Byte> class0 = Byte.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); SQLInvalidAuthorizationSpecException sQLInvalidAuthorizationSpecException0 = new SQLInvalidAuthorizationSpecException(); // Undeclared exception! try { stdKeyDeserializer0._weirdKey((DeserializationContext) null, ".h8BW?Ty", sQLInvalidAuthorizationSpecException0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer", e); } } @Test(timeout = 4000) public void test62() throws Throwable { Class<Long> class0 = Long.class; StdKeyDeserializer stdKeyDeserializer0 = StdKeyDeserializer.forType(class0); BeanDeserializerFactory beanDeserializerFactory0 = BeanDeserializerFactory.instance; DefaultDeserializationContext.Impl defaultDeserializationContext_Impl0 = new DefaultDeserializationContext.Impl(beanDeserializerFactory0); Object object0 = stdKeyDeserializer0.deserializeKey((String) null, defaultDeserializationContext_Impl0); assertNull(object0); } }
bed0530d61d3d3169269b2a6b7b0e8537ca0e69f
7f747076ac6efaa8b9abdf3ea6dbf699fe75b2ad
/app/src/main/java/com/creative2/masterofcharades/CharadeWordAdapter.java
61976924014ecc67b0299352363bc4dcd3418a9f
[]
no_license
manishshringarpure/mc
993901f6b18fe4e8b6f25ac1a82fe6609455b211
a09f0e77f9165877e8dcfa15e0f16a914357cab5
refs/heads/master
2021-09-02T09:12:56.218137
2018-01-01T09:37:50
2018-01-01T09:37:50
115,906,344
0
0
null
null
null
null
UTF-8
Java
false
false
1,312
java
package com.creative2.masterofcharades; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; /** * Created by Praveen K on 12/27/2017. */ public class CharadeWordAdapter extends BaseAdapter { private Context mContext; public CharadeWordAdapter(Context c) { mContext = c; } @Override public int getCount() { return charadeWords.length; } @Override public Object getItem(int i) { return null; } @Override public long getItemId(int i) { return 0; } @Override public View getView(int i, View convertView, ViewGroup viewGroup) { if (convertView == null) { final LayoutInflater layoutInflater = LayoutInflater.from(mContext); convertView = layoutInflater.inflate(R.layout.linearlayout_category, null); } final TextView charadeTextView = (TextView) convertView.findViewById(R.id.charade_text); charadeTextView.setText((String)getItem(i)); return convertView; } private String[] charadeWords = { "Ek Tha Tiger", "Jab tak hai Jaan", "Lagan", "superman", "spiderman" }; }
7bb975091ed90185bdc64b5fc28ccba4869221d4
7174011f01409210300e8a6e97dbc9c680455efe
/livrariaJSF/src/main/java/br/com/livraria2/dao/CompraDAO.java
38119caab87932b9fa348fcafe70a2a381ef6b4f
[]
no_license
tcelio2/JSFProject
343705426838f8477ea5140f7bdd1f28ceac7c72
cabd11c3fe4aecc45bf08a88c7c39d0f735087d6
refs/heads/master
2020-03-23T04:19:18.248531
2018-07-16T02:22:36
2018-07-16T02:22:36
141,076,233
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package br.com.livraria2.dao; import java.io.Serializable; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import br.com.livraria2.model.Compra; public class CompraDAO implements Serializable{ /** * */ private static final long serialVersionUID = 1L; @PersistenceContext private EntityManager manager; public void salvar(Compra compra){ manager.persist(compra); } }
66b7202298b15959113b289cbc25055e5cf7fcab
7bc4096ca209857d693639183e802e3ae38a1cc7
/app/src/main/java/com/b2infosoft/addley/Splash_1.java
73ea29b980b705af4a34a642d920d8152627166a
[]
no_license
b2infosoftandroid/Addley
0013cb6895787157ad38d133d93da8462de6505d
5087936224a4410da8af367c0fdee419fd353b00
refs/heads/master
2021-01-12T12:57:46.191783
2016-10-06T07:29:54
2016-10-06T07:29:54
70,127,305
0
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
package com.b2infosoft.addley; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; public class Splash_1 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); getSupportActionBar().hide(); setContentView(R.layout.activity_splash_1); zoom_in(); Thread th = new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(5000); } catch (InterruptedException e) { } Intent intent = new Intent(Splash_1.this, Main2.class); startActivity(intent); finish(); } }); th.start(); } public void zoom_in() { ImageView image = (ImageView) findViewById(R.id.imageView2); Animation animation1 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in); image.startAnimation(animation1); } }
93871f482851edd6bc7f8e8ee367c721562689dc
2d98e0136920504cdb6db7d16c3cbd5a27a8ac9c
/Assignment3/src/com/mcda5510/assignment3/connect/MySqlConnectionFactory.java
6d176f9fef64846c988034798697e6d63b2eb506
[]
no_license
sreerajpunnoli/Java_Projects
c22a27a030f9f806848ae32402954a4dc4b3293b
d2324a24da7f219350bb3ad315feab16ce4aa05e
refs/heads/master
2022-07-13T03:18:15.571816
2019-06-18T22:35:56
2019-06-18T22:35:56
147,674,071
0
0
null
2022-06-22T21:08:45
2018-09-06T12:59:14
PowerShell
UTF-8
Java
false
false
198
java
package com.mcda5510.assignment3.connect; public class MySqlConnectionFactory implements ConnectionFactory { @Override public DBConnection getConnection() { return new MySqlConnection(); } }
dfd02a0bf9835e19920ca6f2d018a65a157f0421
206f02a7e06e9c6918b8b641ff9856b18dd033bd
/api/src/main/java/backend/emprego/impl/usecase/BuscarEmpregosPorFaixaSalarial.java
6d2588ecbb6593bb9ae3daf7af02e14ce7f0bbb4
[]
no_license
WellysonM/emprego-api-rest
e2f795c74203a2d476cba8c65e4d4c6f42f3c5e3
0cd6bd08231ecb5244eadaea540a1ca0a16dbd52
refs/heads/master
2020-09-02T09:05:37.371607
2019-11-02T17:11:53
2019-11-02T17:11:53
219,186,036
0
0
null
null
null
null
UTF-8
Java
false
false
1,110
java
package backend.emprego.impl.usecase; import backend.emprego.impl.bo.EmpregoBO; import backend.emprego.spec.dto.EmpregoDTO; import backend.emprego.spec.entity.Emprego; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; @Component public class BuscarEmpregosPorFaixaSalarial { @Autowired private EmpregoBO empregoBO; public List<EmpregoDTO> buscarEmpregosPorFaixaSalarial(float salarioMenor, float salarioMaior) { List<Emprego> empregos = empregoBO.buscarEmpregosPorFaixaSalarial(salarioMenor, salarioMaior); return converterEmpregoParaDTO(empregos); } private List<EmpregoDTO> converterEmpregoParaDTO(List<Emprego> empregos) { List<EmpregoDTO> empregoDTO = new ArrayList<>(); empregos.forEach(emprego -> empregoDTO.add(montarEmpregoDTO(emprego))); return empregoDTO; } private static EmpregoDTO montarEmpregoDTO(Emprego emprego) { EmpregoDTO empregoDTO = new EmpregoDTO(emprego); return empregoDTO; } }
48d7aea45c482d1da15b2cbf265d4aa99237fcad
74b47b895b2f739612371f871c7f940502e7165b
/aws-java-sdk-fis/src/main/java/com/amazonaws/services/fis/model/StartExperimentRequest.java
f99731125da747b15854be37c2122cfeaedf8b7b
[ "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,875
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.fis.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/fis-2020-12-01/StartExperiment" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartExperimentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * </p> */ private String clientToken; /** * <p> * The ID of the experiment template. * </p> */ private String experimentTemplateId; /** * <p> * The tags to apply to the experiment. * </p> */ private java.util.Map<String, String> tags; /** * <p> * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * </p> * * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** * <p> * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * </p> * * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** * <p> * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * </p> * * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExperimentRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** * <p> * The ID of the experiment template. * </p> * * @param experimentTemplateId * The ID of the experiment template. */ public void setExperimentTemplateId(String experimentTemplateId) { this.experimentTemplateId = experimentTemplateId; } /** * <p> * The ID of the experiment template. * </p> * * @return The ID of the experiment template. */ public String getExperimentTemplateId() { return this.experimentTemplateId; } /** * <p> * The ID of the experiment template. * </p> * * @param experimentTemplateId * The ID of the experiment template. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExperimentRequest withExperimentTemplateId(String experimentTemplateId) { setExperimentTemplateId(experimentTemplateId); return this; } /** * <p> * The tags to apply to the experiment. * </p> * * @return The tags to apply to the experiment. */ public java.util.Map<String, String> getTags() { return tags; } /** * <p> * The tags to apply to the experiment. * </p> * * @param tags * The tags to apply to the experiment. */ public void setTags(java.util.Map<String, String> tags) { this.tags = tags; } /** * <p> * The tags to apply to the experiment. * </p> * * @param tags * The tags to apply to the experiment. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExperimentRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see StartExperimentRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public StartExperimentRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap<String, String>(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public StartExperimentRequest clearTagsEntries() { this.tags = null; 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 (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getExperimentTemplateId() != null) sb.append("ExperimentTemplateId: ").append(getExperimentTemplateId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartExperimentRequest == false) return false; StartExperimentRequest other = (StartExperimentRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getExperimentTemplateId() == null ^ this.getExperimentTemplateId() == null) return false; if (other.getExperimentTemplateId() != null && other.getExperimentTemplateId().equals(this.getExperimentTemplateId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getExperimentTemplateId() == null) ? 0 : getExperimentTemplateId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public StartExperimentRequest clone() { return (StartExperimentRequest) super.clone(); } }
[ "" ]
a2815063927955d3a00d2c9a321dd128830b91da
4913189539a6dd09d83262f1bffca3d3a4c1d425
/BackEnd/src/main/java/com/quockhanh/commercemanager/services/ServicesImpl/UserServiceImpl.java
0a4453425ae9fa0c66912c802d233fd62066d5b5
[]
no_license
qkhanh1701/TTTN
c932aa7116e0a771e44356dfaa952d105278a3a1
7b6c978a20a47df82364e993e7f2bbcf54d9cb45
refs/heads/master
2023-07-08T09:29:26.645439
2021-08-04T14:13:44
2021-08-04T14:13:44
392,709,577
0
0
null
null
null
null
UTF-8
Java
false
false
2,558
java
package com.quockhanh.commercemanager.services.ServicesImpl; import com.quockhanh.commercemanager.converter.UserConverter; import com.quockhanh.commercemanager.model.DTO.UserDTO; import com.quockhanh.commercemanager.model.Role; import com.quockhanh.commercemanager.model.User; import com.quockhanh.commercemanager.repository.UserRepository; import com.quockhanh.commercemanager.services.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @Service public class UserServiceImpl implements UserService { @Autowired private UserRepository userRepository; @Autowired UserConverter userConverter; @Override public Optional<User> findById(Long id) { return userRepository.findById(id); } @Override public List<UserDTO> getAllUser() { List<UserDTO> dtoList = new ArrayList<>(); userRepository.findAllByOrderByIdDesc().stream().forEach(s -> { if (s.getDeletestatus() == 0) { UserDTO dto = new UserDTO(); dto = userConverter.toDTO(s); dtoList.add(dto); } }); return dtoList; } boolean isAdmid(Set<Role> set) { AtomicBoolean check = new AtomicBoolean(false); set.stream().forEach(s -> { if (s.getId() == 2) { check.set(true); } }); return check.get(); } @Override public List<UserDTO> getTop5User() { List<UserDTO> dtoList = new ArrayList<>(); userRepository.findAllByOrderByIdDesc().stream().forEach(s -> { if (!isAdmid(s.getRoles())) { UserDTO dto = new UserDTO(); dto = userConverter.toDTO(s); dtoList.add(dto); } }); System.out.println(dtoList); // dtoList = userRepository.findTop5ByOrderByIdDesc(); return dtoList; } @Override public Optional findUserByEmail(String email) { return userRepository.findByEmail(email); } @Override public Optional findUserByResetToken(String resetToken) { return userRepository.findByResetToken(resetToken); } @Override public void save(User user) { userRepository.save(user); } @Override public void delete(Long id) { userRepository.deleteById(id); } }
1d459d93f007b6853c56746720750678e25179f4
b07cdfeb2a1ddf8e8d646695641670b5868a9004
/Locators/src/ChromeLocatorsFaceBook.java
1742279913d39fbc23a11e3e9b111b2ee6d21fb9
[]
no_license
Biniam-44/Selenium
b9dd45cd4a948dc7a35ab8fe33a678f3b349cc8a
1bee3a6a16911648ac855b5e702a6e4775a48553
refs/heads/master
2021-10-09T21:50:55.016218
2019-01-03T20:56:54
2019-01-03T20:56:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,014
java
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class ChromeLocatorsFaceBook { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver", "C:\\Users\\nebiy\\Desktop\\Selenium\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("http://facebook.com"); driver.findElement(By.cssSelector("#email")).sendKeys("test"); //driver.findElement(By.linkText("Forgot account?")).click(); //driver.findElement(By.ByCssSelector) /*driver.findElement(By.name("pass")).sendKeys("123456"); driver.findElement(By.id("email")).sendKeys("[email protected]"); driver.findElement(By.className("inputtext")).sendKeys("123456"); //driver.findElement(By.id("pass")).sendKeys("1234asd"); driver.findElement(By.linkText("Forgot account?")).click(); driver.findElement(By.id("loginbutton")).click(); */ } }
73e59d2e87b86b16efc045aa4c6c5270dd39bc8f
ce5bb66543e0642985d24f3a8ea7f6184bc25ad1
/src/data_structure/TreeNode.java
843a20142c223df1ef9179b0d78c1a177abfee41
[]
no_license
JerkYang/CodeInterview
967df0d3e99b2ac3682ab3d3ac656343946117b3
33209ff2eca29392ff34bddfd0bc7d8c37d3056e
refs/heads/master
2020-08-01T11:06:38.562447
2019-09-26T02:07:33
2019-09-26T02:07:33
210,977,942
1
0
null
null
null
null
UTF-8
Java
false
false
282
java
package data_structure; /** * @Author: JerkYang * @CreateTime: 2019-09-11 14:41 * @Description: 树节点 */ public class TreeNode { public int val; public TreeNode left; public TreeNode right; public TreeNode(int x) { val = x; } }
cee0f435ee287aec1ee42b9b8e4c55d7a8bd2acc
dfc4ebe730314031eb75ae7840d7d5ab489b8c34
/Backend/app/src/test/java/com/duckfunds/duckfunds/ExampleUnitTest.java
3eef6417f246cbf2352a99a84788d42e494ed199
[]
no_license
omkar7296/DuckFunds
275c5a293ed96f947e12d37ae67cb73fc6a767ec
4dbd3d4961e85c1d40345ccad776fb5ed850a1c3
refs/heads/master
2020-04-28T11:42:00.818692
2019-03-13T01:35:38
2019-03-13T01:35:38
175,251,465
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.duckfunds.duckfunds; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
a0f033df989b2d52ad01362fa500189957eb1780
e1a43403ff8d4387de1289db25e1fe34fa0399dc
/app/src/androidTest/java/com/azp/todo_room/ExampleInstrumentedTest.java
6369bb777839bf6654b36fbb8993e60ef21506a3
[]
no_license
aungzinphyo94/ToDo
1dc1fddf3e6b7abddd41d699fc163e3431caee5d
1e1e216c7639739ff9b1fa44b15b858ec0bf27b4
refs/heads/master
2020-05-07T15:58:49.874293
2019-04-10T20:59:08
2019-04-10T20:59:08
180,662,790
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
package com.azp.todo_room; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.azp.todo_room", appContext.getPackageName()); } }
2f1680b77905c794bdae6ff7ad5d75572ce63a6d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_ef313c5eb4ad20788474ea68e28bb7dfbdbf008d/MainFrame/16_ef313c5eb4ad20788474ea68e28bb7dfbdbf008d_MainFrame_t.java
ec847832a7b7923c3ce60dd4062a2a782790772b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
10,635
java
/** * Project Wonderland * * Copyright (c) 2004-2008, Sun Microsystems, Inc., All Rights Reserved * * Redistributions in source code form must reproduce the above * copyright and this condition. * * The contents of this file are subject to the GNU General Public * License, Version 2 (the "License"); you may not use this file * except in compliance with the License. A copy of the License is * available at http://www.opensource.org/licenses/gpl-license.php. * * $Revision$ * $Date$ * $State$ */ package org.jdesktop.wonderland.client.jme; import java.awt.Canvas; import java.awt.Dimension; import java.util.Locale; import java.util.ResourceBundle; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.ToolTipManager; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import org.jdesktop.mtgame.FrameRateListener; import org.jdesktop.mtgame.JBulletPhysicsSystem; import org.jdesktop.mtgame.PhysicsSystem; import org.jdesktop.mtgame.WorldManager; import org.jdesktop.wonderland.client.help.HelpSystem; import org.jdesktop.wonderland.common.LogControl; import java.util.logging.Logger; import javax.swing.UIManager; /** * The Main JFrame for the wonderland jme client * * @author paulby */ public class MainFrame extends javax.swing.JFrame { private static final Logger logger = Logger.getLogger(MainFrame.class.getName()); private static final ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/jdesktop/wonderland/client/jme/resources/bundle", Locale.getDefault()); static { new LogControl(MainFrame.class, "/org/jdesktop/wonderland/client/jme/resources/logging.properties"); } // variables for the location field private String serverURL; private ServerURLListener serverListener; /** Creates new form MainFrame */ public MainFrame(WorldManager wm, int width, int height) { // Workaround for bug 15: Embedded Swing on Mac: SwingTest: radio button image problems // For now, force the cross-platform (metal) LAF to be used try { UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (Exception ex) { logger.warning("Loading of Metal look-and-feel failed, exception = " + ex); } JPopupMenu.setDefaultLightWeightPopupEnabled(false); ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); initComponents(); // Add the help menu to the main menu bar HelpSystem helpSystem = new HelpSystem(); JMenu helpMenu = helpSystem.getHelpJMenu(); mainMenuBar.add(helpMenu); wm.getRenderManager().setFrameRateListener(new FrameRateListener() { public void currentFramerate(float framerate) { fpsLabel.setText("FPS: "+framerate); } }, 100); setTitle(java.util.ResourceBundle.getBundle("org/jdesktop/wonderland/client/jme/resources/bundle").getString("Wonderland")); centerPanel.setMinimumSize(new Dimension(width, height)); centerPanel.setPreferredSize(new Dimension(width, height)); serverField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { checkButtons(); } public void removeUpdate(DocumentEvent e) { checkButtons(); } public void changedUpdate(DocumentEvent e) { checkButtons(); } public void checkButtons() { String cur = serverField.getText(); if (cur != null && cur.length() > 0 && !cur.equals(serverURL)) { goButton.setEnabled(true); } else { goButton.setEnabled(false); } } }); pack(); } /** * Returns the canvas of the frame. */ public Canvas getCanvas () { return ViewManager.getViewManager().getCanvas(); } /** * Returns the panel of the frame in which the 3D canvas resides. */ public JPanel getCanvas3DPanel () { return centerPanel; } /** * Add the specified menu item to the tool menu. * * TODO - design a better way to manage the menus and toolsbars * * @param menuItem */ public void addToToolMenu(JMenuItem menuItem) { toolsMenu.add(menuItem); } /** * Add the specified menu item to the edit menu. * * TODO - design a better way to manage the menus and toolsbars * * @param menuItem */ public void addToEditMenu(JMenuItem menuItem) { editMenu.add(menuItem); } /** * Set the server URL in the location field * @param serverURL the server URL to set */ public void setServerURL(String serverURL) { this.serverURL = serverURL; serverField.setText(serverURL); } public void addServerURLListener(ServerURLListener listener) { serverListener = listener; } public interface ServerURLListener { public void serverURLChanged(String serverURL); public void logout(); } /** 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() { jLabel1 = new javax.swing.JLabel(); serverPanel = new javax.swing.JPanel(); serverLabel = new javax.swing.JLabel(); serverField = new javax.swing.JTextField(); goButton = new javax.swing.JButton(); centerPanel = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); fpsLabel = new javax.swing.JLabel(); mainMenuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); logoutMI = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JSeparator(); exitMI = new javax.swing.JMenuItem(); editMenu = new javax.swing.JMenu(); toolsMenu = new javax.swing.JMenu(); jLabel1.setText("jLabel1"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); serverPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); serverPanel.setLayout(new java.awt.BorderLayout()); serverLabel.setText("Location:"); serverPanel.add(serverLabel, java.awt.BorderLayout.WEST); serverField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { serverFieldActionPerformed(evt); } }); serverPanel.add(serverField, java.awt.BorderLayout.CENTER); goButton.setText("Go!"); goButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { goButtonActionPerformed(evt); } }); serverPanel.add(goButton, java.awt.BorderLayout.EAST); getContentPane().add(serverPanel, java.awt.BorderLayout.NORTH); getContentPane().add(centerPanel, java.awt.BorderLayout.CENTER); fpsLabel.setText("FPS :"); jPanel1.add(fpsLabel); getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END); fileMenu.setText(bundle.getString("File")); // NOI18N logoutMI.setText("Log out"); logoutMI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { logoutMIActionPerformed(evt); } }); fileMenu.add(logoutMI); fileMenu.add(jSeparator1); exitMI.setText(bundle.getString("Exit")); // NOI18N exitMI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitMIActionPerformed(evt); } }); fileMenu.add(exitMI); mainMenuBar.add(fileMenu); editMenu.setText(bundle.getString("Edit")); // NOI18N mainMenuBar.add(editMenu); toolsMenu.setText(bundle.getString("Tools")); // NOI18N mainMenuBar.add(toolsMenu); setJMenuBar(mainMenuBar); pack(); }// </editor-fold>//GEN-END:initComponents private void exitMIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMIActionPerformed // TODO add your handling code here: System.exit(0); }//GEN-LAST:event_exitMIActionPerformed private void serverFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_serverFieldActionPerformed // TODO add your handling code here: }//GEN-LAST:event_serverFieldActionPerformed private void goButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goButtonActionPerformed if (serverListener != null) { serverListener.serverURLChanged(serverField.getText()); } }//GEN-LAST:event_goButtonActionPerformed private void logoutMIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutMIActionPerformed if (serverListener != null) { serverListener.logout(); } }//GEN-LAST:event_logoutMIActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel centerPanel; private javax.swing.JMenu editMenu; private javax.swing.JMenuItem exitMI; private javax.swing.JMenu fileMenu; private javax.swing.JLabel fpsLabel; private javax.swing.JButton goButton; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JSeparator jSeparator1; private javax.swing.JMenuItem logoutMI; private javax.swing.JMenuBar mainMenuBar; private javax.swing.JTextField serverField; private javax.swing.JLabel serverLabel; private javax.swing.JPanel serverPanel; private javax.swing.JMenu toolsMenu; // End of variables declaration//GEN-END:variables }
ea24b5cc8d3f44c365cd80619762c6165c5ce086
4bb30cac05517519daf81d8af29bc6e1072cf620
/lista5/Ex2/Triangulo.java
461196e697e0112a68cd21bb7ca1e199f07fcd5f
[]
no_license
jon27jonathan/atividadesPOO
2b8e1d7d50851a98a634af59befd320dbf8147e3
61dd2026f6bf086eef64610afd7e7fbdfb7f5c34
refs/heads/main
2023-07-02T19:07:14.705637
2021-08-08T22:04:24
2021-08-08T22:04:24
380,594,862
0
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
public class Triangulo extends Figuras { private double ladoA; private double base; private double ladoC; private double altura; private double area; public Triangulo(double ladoA, double base, double ladoC, double altura) { this.ladoA = ladoA; this.ladoC = ladoC; this.base = base; this.altura = altura; } public double verificaTriangulo(double ladoA, double base, double ladoC) { if (ladoA < base + ladoC && base < ladoA + ladoC && ladoC < ladoA + base) { System.out.println("Trata-se de um triangulo"); if (ladoA == base && ladoA == ladoC) { System.out.println("Três lados iguais . Trata-se de um Triangulo Equilatero"); } else if (ladoA == ladoC || ladoA == ladoC) { System.out.println("Dois lados iguais . Trata-se de um Triangulo Isosceles"); } else System.out.println("Três lados diferentes, Trata-se de um Triangulo Escaleno."); } else { System.out.println("Não é um triangulo"); } return 0; } @Override public double calculaArea() { if (ladoA < base + ladoC && base < ladoA + ladoC && ladoC < ladoA + base) { this.area = (this.base * this.altura) / 2; } return 0; } @Override public double impriArea() { System.out.println("A área do triangulo é: " + this.area); return 0; } }
97ba1ae63ce144ce59e14fa4b57b830e84b824e7
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/DynamicDataVO.java
1e7601446de43dd1c415de905bbf0a209bed02fc
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
1,045
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 动态数据VO * * @author auto create * @since 1.0, 2023-04-28 13:56:08 */ public class DynamicDataVO extends AlipayObject { private static final long serialVersionUID = 8779692233697198853L; /** * 动态属性列表,列表类型 */ @ApiListField("attribute_list") @ApiField("dynamic_attribute_v_o") private List<DynamicAttributeVO> attributeList; /** * 商品动态数据查询Order,返回时将入参带回 */ @ApiField("order") private ItemDynamicQueryOrder order; public List<DynamicAttributeVO> getAttributeList() { return this.attributeList; } public void setAttributeList(List<DynamicAttributeVO> attributeList) { this.attributeList = attributeList; } public ItemDynamicQueryOrder getOrder() { return this.order; } public void setOrder(ItemDynamicQueryOrder order) { this.order = order; } }
[ "auto-publish" ]
auto-publish
4616d1f320e5adaff4b3f9d69ffb069e77f13ea1
9568042cd8a05697c4175e58dd3c327922000967
/model/io/src/main/java/org/collada/_2005/_11/colladaschema/GlSampler3D.java
308e8baf7c979c8e95ad545df45be2495b53a76a
[]
no_license
omni360/moredread
c6f447dd1b3bd6b96b4868ef98e33957cd218101
2b5cafb1eb0f7db80efa2c787263c791eaafef71
refs/heads/master
2020-12-24T16:41:18.215717
2011-10-03T14:19:30
2011-10-03T14:19:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,166
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.09.27 at 09:19:50 PM MESZ // package org.collada._2005._11.colladaschema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A three-dimensional texture sampler for the GLSL profile. * * * <p>Java class for gl_sampler3D complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="gl_sampler3D"> * &lt;complexContent> * &lt;extension base="{http://www.collada.org/2005/11/COLLADASchema}fx_sampler3D_common"> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "gl_sampler3D") public class GlSampler3D extends FxSampler3DCommon { }
e3c90c63fc0407c2e2f3b94ce6d6b872b0df67f4
b3f9d0378f43aaf733b065e7e4bd1d0e6419f45e
/Household Enegry Consumption Statistics System/src/dataload/ILoader.java
51c536e18227b24dfdf09033c27322056fa896f4
[]
no_license
ZagorianCoder/ZagorianSoftWorks
a9913ff911b0bc5e9e300c8cf3a44cb62b711003
32554ed80549de1f90f3b717561038d236433acc
refs/heads/master
2021-11-11T16:28:33.894448
2021-11-10T15:11:05
2021-11-10T15:11:05
224,709,938
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package dataload; import java.util.ArrayList; public interface ILoader<E> { /** * Reads the data from the given file and stores them in an ArrayList * * @param fileName: a String with the name of the input file * @param delimeter: a String with the delimeter between columns of the source file * @param hasHeaderLine: specifies whether the file has a header (true) or not (false) * @param numFields: an int with the number of columns in the input file * @param objCollection: and empty list which will be loaded with the data from the input file * * @return the number of rows that are eventually added to objCollection */ int load(String fileName, String delimeter, boolean hasHeaderLine, int numFields, ArrayList<E> objCollection); }
6405a4a89c897186eb74b0237407ba724b79629a
7d839f9a72d743ee435bf4615a47548ce7bf5feb
/NG/src/framework/Client_Dashboard.java
7d31e29f1d5d9018add6c467fefef297c0061c31
[]
no_license
aveeresham530/seleniumprojectCRC
7c905c433cef82acc13ff5de5d6babcd0184331f
7916dce73cc68f0aa36c19e5a10d16750f752a62
refs/heads/master
2020-08-31T01:14:14.836946
2019-11-02T11:41:30
2019-11-02T11:41:30
218,543,200
0
0
null
null
null
null
UTF-8
Java
false
false
5,212
java
package framework; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Client_Dashboard { public static void main(String args[]) throws Exception { System.setProperty("webdriver.chrome.driver","C:\\Users\\krishna\\Desktop\\Driver's\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); //*********Edit Client profile***********************// driver.get("https://app.creditrepaircloud.com/"); Thread.sleep(2000); driver.findElement(By.name("username")).sendKeys("[email protected]"); driver.findElement(By.name("password")).sendKeys("123456"); driver.findElement(By.id("signin")).click(); Thread.sleep(5000); driver.findElement(By.linkText("My Clients")).click(); Thread.sleep(4000); //Selected Client for Editing driver.findElement(By.id("cli_2331")).click(); driver.findElement(By.linkText("View/Edit Profile")).click(); //Select Client_Status=new Select(driver.findElement(By.id("clientstatus_35"))); //Client_Status.selectByValue("104"); //Clicks on selected client driver.findElement(By.name("fname")).clear(); driver.findElement(By.name("fname")).sendKeys("Retestt"); //****Assigned member is trying to cancelling //WebElement Assigned_Member = driver.findElement(By.xpath("//img[@src='https://app.creditrepaircloud.com/application/images/cross.png']")); //Assigned_Member.click(); driver.findElement(By.className("btn-default")).click(); WebElement on_button=driver.findElement(By.id("on")); if(on_button.isSelected()) { System.out.println("Already Assigned a member to Client"); } else { on_button.click(); } //help_for_login_passowrd_issue_popup driver.findElement(By.name("help_for_login_passowrd_issue_popup")).click(); driver.findElement(By.className("ui-icon ui-icon-closethick")).click(); Thread.sleep(2000); //View Agreement driver.findElement(By.linkText("View Agreement")).click(); driver.findElement(By.className("ui-icon ui-icon-closethick")).click(); Thread.sleep(2000); //reset_agreement driver.findElement(By.id("reset_agreement")).click(); driver.findElement(By.className("ui-icon ui-icon-closethick")).click(); Thread.sleep(2000); //*********Import Audit Report from My_Client Dashboard page driver.findElement(By.linkText("Pull reports & create auditt")).click(); driver.findElement(By.linkText("Edit Credentials")).click(); //Select Provider dropdown from the Provider drop down list /* Select Provider=new Select(driver.findElement(By.id("auto_selprovider"))); Provider.selectByVisibleText("Choose Supported Provider"); //Entered provder name driver.findElement(By.id("auto_vcr_username")).sendKeys("TestLead"); driver.findElement(By.id("auto_vcr_password")).sendKeys("123456"); driver.findElement(By.id("auto_vcr_phonenumber")).sendKeys("1234564521"); driver.findElement(By.id("auto_securityword_label")).sendKeys("124578jh"); driver.findElement(By.id("auto_vcr_securityword")).sendKeys("124578jh"); driver.findElement(By.id("auto_vcr_note")).sendKeys("Test"); //****Auto Report Submit button should not submit //driver.findElement(By.id("auto1_btnsubmit_without_pending")).click(); driver.findElement(By.className("ui-icon ui-icon-closethick")).click(); //***********Run Dispute Wizard Create letters and correct errors driver.findElement(By.linkText("Run Dispute Wizard")).click(); driver.findElement(By.linkText("ORDER CREDIT HISTORY REPORTS")).click(); driver.findElement(By.id("btnclose")).click(); driver.navigate().back(); driver.navigate().refresh(); driver.navigate().forward(); driver.findElement(By.id("btnclose")).click(); //ORDER FREE ANNUAL REPORTS BY MAIL driver.findElement(By.linkText("ORDER FREE ANNUAL REPORTS BY MAIL")).click(); driver.findElement(By.id("equifax_1")).click(); driver.findElement(By.linkText("Next")).click(); driver.findElement(By.linkText("EXPORT AS PDF")).click(); driver.findElement(By.id("back")).click(); //*** If possible we can write alert message type here driver.findElement(By.linkText("Leave Page")).click(); driver.findElement(By.id("back")).click(); //ORDER FREE ANNUAL REPORTS ONLINE driver.findElement(By.linkText("ORDER FREE ANNUAL REPORTS ONLINE")).click(); //REQUEST CREDIT REPORTS BY MAIL driver.findElement(By.linkText("REQUEST CREDIT REPORTS BY MAIL")).click(); driver.findElement(By.id("equifax_1")).click(); driver.findElement(By.id("opt3")).click(); //ORDER REPORT FROM MY FAVORITE PROVIDER driver.findElement(By.linkText("ORDER REPORT FROM MY FAVORITE PROVIDER")).click(); ////******************Dispute Items driver.findElement(By.linkText("Dispute Items")).click(); driver.findElement(By.id("add_new_dispute_item")).click(); */ //driver.findElement(By.name("fname")).sendKeys("Retest"); } }
[ "krishna@Veeresham" ]
krishna@Veeresham
0a9f7e6e327c55ffaa0ee6048a57622e63c83eac
53cec3de6aa4aeaef62b1fbec25d15ca7cf329e2
/StringDemo/src/com/cts/string/ImmutableString.java
e1991f98af8d11fafc0f3da70125bd4dc20219fb
[]
no_license
nagatejesh/StringsDemo
770c9d1fc7d8dbb10c1c13bbae97e66ae5c8135c
b1ec916e072ad4302b09596e7dab3470838d3bb4
refs/heads/master
2023-06-30T14:25:42.954386
2021-08-03T11:13:20
2021-08-03T11:13:20
392,288,199
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package com.cts.string; public class ImmutableString { public static void main(String[] args) { String s = "Good"; String s2 = "Good"; s.concat("Morning"); System.out.println(s); System.out.println(System.identityHashCode(s)); s=s.concat("Morning"); System.out.println(s); System.out.println(System.identityHashCode(s)); } }
a7aed33bd2ef60ef7957a5b4ebeb3e3de9e56453
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2009-11-01/seasar2-2.4.40/seasar2/s2-extension/src/main/java/org/seasar/extension/jdbc/types/CalendarTimestampType.java
6c8df77450f8ab7287738c0e745bd933e4f09a37
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
2,063
java
/* * Copyright 2004-2009 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.extension.jdbc.types; import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Calendar; import org.seasar.extension.jdbc.ValueType; import org.seasar.framework.util.CalendarConversionUtil; /** * {@link Timestamp}と互換性をもつ{@link Calendar}用の{@link ValueType}です。 * * @author taedium * */ public class CalendarTimestampType extends TimestampType { public Object getValue(ResultSet resultSet, int index) throws SQLException { return toCalendar(super.getValue(resultSet, index)); } public Object getValue(ResultSet resultSet, String columnName) throws SQLException { return toCalendar(super.getValue(resultSet, columnName)); } public Object getValue(CallableStatement cs, int index) throws SQLException { return toCalendar(super.getValue(cs, index)); } public Object getValue(CallableStatement cs, String parameterName) throws SQLException { return toCalendar(super.getValue(cs, parameterName)); } /** * {@link Calendar}に変換します。 * * @param value * 値 * @return {@link Calendar} */ protected Calendar toCalendar(Object value) { return CalendarConversionUtil.toCalendar(value); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
1bb4ee35c850109bfa731da18d48057b73c9b634
489446925a14133152b0c1059a4179c1885e145e
/src/main/java/com/skill/dto/SeckillResult.java
b01166bfa1bb71af72a18f37c8c67f07267e11c1
[]
no_license
lipeng32768/skillsystem
0e3a3e141acf8f244b904c8607c2894d82f5501e
7ae31ff4881671cb3c7ae8b892b3583fd5d28c3e
refs/heads/master
2020-03-27T21:54:49.028717
2016-08-06T06:27:49
2016-08-06T06:27:49
59,932,698
4
1
null
null
null
null
UTF-8
Java
false
false
872
java
package com.skill.dto; /** * User: [email protected] * Date: 2016/6/20 * Time:20:54 */ //封装json 结果 public class SeckillResult <T> { private boolean success; private T data; private String error; public SeckillResult(boolean success, T data) { this.success = success; this.data = data; } public SeckillResult(boolean success, String error) { this.success = success; this.error = error; } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public T getData() { return data; } public void setData(T data) { this.data = data; } public String getError() { return error; } public void setError(String error) { this.error = error; } }
fda6dcdc961e3a7cd7c23c27d00950472eea7d1d
843d258431b405ea22e8d1c2254dbaca582bfafc
/readingListApplication/src/main/java/com/manning/readingList/controller/ReadingListController.java
05aba40630884aa2d1ae2fcf9284b7545747fa36
[]
no_license
edgardovittoria/learnSpringBoot
c6f7c6489729a55a3f5afb8ef1fff8cff3c985d9
42ea30b644bc78a51f042e7f4be495b8357e9743
refs/heads/master
2022-06-21T00:24:17.255748
2019-07-12T09:39:06
2019-07-12T09:39:06
196,169,785
0
0
null
2022-05-25T23:19:02
2019-07-10T08:54:50
Java
UTF-8
Java
false
false
1,370
java
package com.manning.readingList.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.manning.readingList.domain.Book; import com.manning.readingList.repository.ReadingListRepository; @Controller @RequestMapping("/") public class ReadingListController { private ReadingListRepository readingListRepository; @Autowired public ReadingListController(ReadingListRepository readingListRepository) { this.readingListRepository = readingListRepository; } @RequestMapping(value="/{reader}", method=RequestMethod.GET) public String readersBooks(@PathVariable("reader") String reader, Model model) { List<Book> readingList = readingListRepository.findByReader(reader); if(readingList != null) { model.addAttribute("books", readingList); } return "readingList"; } @RequestMapping(value="/{reader}", method=RequestMethod.POST) public String addToReadingList(@PathVariable("reader") String reader, Book book) { book.setReader(reader); readingListRepository.save(book); return "redirect:/{reader}"; } }
7790a53cf9e30d9349eaf5272640743b1b0e49b0
ad610655aa116e1164db200efa62cfe5d86b3b71
/osa08-Osa08_04.ErilaisiaLaatikoita/src/main/java/MaksimipainollinenLaatikko.java
4f4fbad2ae03114611564dfb7ff12b19b4c3238c
[]
no_license
vaerilius/JavaMooc
0c5f027e24fbfb7dea7c2079f197f7995094e5a3
de0fe00b5be9510d42a907874f885818f9c3078a
refs/heads/master
2021-07-03T21:48:04.604879
2019-06-06T09:28:47
2019-06-06T09:28:47
185,749,287
1
0
null
2020-10-13T13:11:14
2019-05-09T07:32:54
Java
UTF-8
Java
false
false
902
java
import java.util.ArrayList; class MaksimipainollinenLaatikko extends Laatikko { private int maksimipoinollinenLaatikko; private ArrayList<Tavara> tavarat; public MaksimipainollinenLaatikko(int maksimipaino) { this.maksimipoinollinenLaatikko = maksimipaino; this.tavarat = new ArrayList<>(); } @Override public void lisaa(Tavara tavara) { int painoYhteensa = 0; for (Tavara tavara1 : tavarat) { painoYhteensa += tavara1.getPaino(); } if (tavara.getPaino() <= this.maksimipoinollinenLaatikko - painoYhteensa) { this.tavarat.add(tavara); } } @Override public boolean onkoLaatikossa(Tavara tavara) { for (Tavara tamaTavara : tavarat) { if (tamaTavara.equals(tavara)) { return true; } } return false; } }
b9e1e67a7a452dcdfa89133dd84be58951c66bc3
bb283e706e6a142f81fb7107972ae0d2ee1b330b
/app/src/main/java/com/example/akaszuba/datafiledemo/MainActivity.java
0dc45ebff86480b30a65fda0ec6dfefae343b691
[]
no_license
akaszuba/DataFileDemo
c96ee84ad5b83348ef93277d0be98a93019a0f0f
bb78b2f6be689d5c038ed3456966be2f8605c24e
refs/heads/master
2020-05-20T02:18:28.462936
2015-02-26T21:25:48
2015-02-26T21:25:48
31,323,751
0
0
null
null
null
null
UTF-8
Java
false
false
1,553
java
package com.example.akaszuba.datafiledemo; import android.app.Activity; import android.content.Context; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.TextView; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class MainActivity extends Activity { private DataAccess dataAccess; private TextView txtFileContent; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); txtFileContent = (TextView)findViewById(R.id.txtFileContent); dataAccess = new DataAccess(this); } public void onSaveClicked(View view){ String textToSave = txtFileContent.getText().toString(); dataAccess.SaveToFile(textToSave); } public void onReadClicked(View view){ txtFileContent.setText(dataAccess.ReadFromFile()); } public void onClearClicked(View view) { txtFileContent.setText(""); } public void onTestJson(View view){ DataObject dataObj = dataAccess.getFromJson(); if(dataObj != null){ txtFileContent.setText(String.format("%s - %d",dataObj.getName(),dataObj.getQuantity())); } } }
5bc6cf6851cc0c7239efa418c897878c7ccbd44d
b77ea03ae006ee1f4b46815f68d85ef6590f6063
/src/main/java/com/example/demouser/DemouserApplication.java
1a6c01ff4c4f655078426513bacbb64cb96029c8
[]
no_license
fahmielemen1/demouser
50f91ae0749ba340818f98401b0d32726de7210b
4406301e901562fc49cd3d3e478c6622da8bf214
refs/heads/master
2022-04-25T18:39:42.833081
2020-04-28T05:31:34
2020-04-28T05:31:34
259,534,775
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.example.demouser; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemouserApplication { public static void main(String[] args) { SpringApplication.run(DemouserApplication.class, args); } }
ee74c06c35a2ed7dea1d73578f81caa68f6ba8e4
31505bbbd81d179645f909dbe91ca3024af752c7
/src/main/java/m09/s10/AsNavigableSet.java
506a30b5aa0372604c4f499f49fb5860b53fb2f0
[]
no_license
Angelica1030/jse
bbcad5ca8b40c0cbb4a51beac9397556eb9fcc56
6486c1a648438e4d292ba67d0f2024b34c6053f1
refs/heads/master
2023-07-24T01:26:21.010516
2021-04-22T13:38:57
2021-04-22T13:38:57
360,125,006
0
0
null
2021-09-06T10:12:43
2021-04-21T10:20:07
Java
UTF-8
Java
false
false
1,120
java
package m09.s10; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.NavigableSet; import java.util.TreeSet; public class AsNavigableSet { public static void main(String[] args) { Collection<Integer> coll = List.of(5, -3, -1, 12, 27, 5); NavigableSet<Integer> ns = new TreeSet<>(coll); System.out.println(coll + " -> " + ns); System.out.println("Eleven or more: " + ns.ceiling(11)); System.out.println("Zero or less: " + ns.floor(0)); System.out.println("More than -1: " + ns.higher(-1)); System.out.println("Less than -1: " + ns.lower(-1)); System.out.println("Poll the first element: " + ns.pollFirst()); System.out.println("Poll the last element: " + ns.pollLast()); System.out.print("Looping in descending order: "); Iterator<Integer> it = ns.descendingIterator(); while (it.hasNext()) { System.out.print(it.next() + " "); } System.out.println(); System.out.println("The set in descending order: " + ns.descendingSet()); } }
e623f8503f83bd79cb508ff8db0c4e65f0f527c0
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/HDFS-162/375c6b8f2ea934eac4a1e7673479ba20202152c6/~Block.java
939cc4dd63cc03158b127fa9992b5eb64d4055f0
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
6,183
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.hadoop.hdfs.protocol; import java.io.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.hdfs.server.common.GenerationStamp; import org.apache.hadoop.io.*; /************************************************** * A Block is a Hadoop FS primitive, identified by a * long. * **************************************************/ @InterfaceAudience.Private @InterfaceStability.Evolving public class Block implements Writable, Comparable<Block> { public static final String BLOCK_FILE_PREFIX = "blk_"; public static final String METADATA_EXTENSION = ".meta"; static { // register a ctor WritableFactories.setFactory (Block.class, new WritableFactory() { public Writable newInstance() { return new Block(); } }); } public static final Pattern blockFilePattern = Pattern .compile(BLOCK_FILE_PREFIX + "(-??\\d++)$"); public static final Pattern metaFilePattern = Pattern .compile(BLOCK_FILE_PREFIX + "(-??\\d++)_(\\d++)\\" + METADATA_EXTENSION + "$"); public static boolean isBlockFilename(File f) { String name = f.getName(); return blockFilePattern.matcher(name).matches(); } public static long filename2id(String name) { Matcher m = blockFilePattern.matcher(name); return m.matches() ? Long.parseLong(m.group(1)) : 0; } public static boolean isMetaFilename(String name) { return metaFilePattern.matcher(name).matches(); } /** * Get generation stamp from the name of the metafile name */ public static long getGenerationStamp(String metaFile) { Matcher m = metaFilePattern.matcher(metaFile); return m.matches() ? Long.parseLong(m.group(2)) : GenerationStamp.GRANDFATHER_GENERATION_STAMP; } /** * Get the blockId from the name of the metafile name */ public static long getBlockId(String metaFile) { Matcher m = metaFilePattern.matcher(metaFile); return m.matches() ? Long.parseLong(m.group(1)) : 0; } private long blockId; private long numBytes; private long generationStamp; public Block() {this(0, 0, 0);} public Block(final long blkid, final long len, final long generationStamp) { set(blkid, len, generationStamp); } public Block(final long blkid) { this(blkid, 0, GenerationStamp.GRANDFATHER_GENERATION_STAMP); } public Block(Block blk) { this(blk.blockId, blk.numBytes, blk.generationStamp); } /** * Find the blockid from the given filename */ public Block(File f, long len, long genstamp) { this(filename2id(f.getName()), len, genstamp); } public void set(long blkid, long len, long genStamp) { this.blockId = blkid; this.numBytes = len; this.generationStamp = genStamp; } /** */ public long getBlockId() { return blockId; } public void setBlockId(long bid) { blockId = bid; } /** */ public String getBlockName() { return BLOCK_FILE_PREFIX + String.valueOf(blockId); } /** */ public long getNumBytes() { return numBytes; } public void setNumBytes(long len) { this.numBytes = len; } public long getGenerationStamp() { return generationStamp; } public void setGenerationStamp(long stamp) { generationStamp = stamp; } /** */ public String toString() { return getBlockName() + "_" + getGenerationStamp(); } ///////////////////////////////////// // Writable ///////////////////////////////////// @Override // Writable public void write(DataOutput out) throws IOException { writeHelper(out); } @Override // Writable public void readFields(DataInput in) throws IOException { readHelper(in); } final void writeHelper(DataOutput out) throws IOException { out.writeLong(blockId); out.writeLong(numBytes); out.writeLong(generationStamp); } final void readHelper(DataInput in) throws IOException { this.blockId = in.readLong(); this.numBytes = in.readLong(); this.generationStamp = in.readLong(); if (numBytes < 0) { throw new IOException("Unexpected block size: " + numBytes); } } // write only the identifier part of the block public void writeId(DataOutput out) throws IOException { out.writeLong(blockId); out.writeLong(generationStamp); } // Read only the identifier part of the block public void readId(DataInput in) throws IOException { this.blockId = in.readLong(); this.generationStamp = in.readLong(); } @Override // Comparable public int compareTo(Block b) { return blockId < b.blockId ? -1 : blockId > b.blockId ? 1 : 0; } @Override // Object public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Block)) { return false; } return compareTo((Block)o) == 0; } @Override // Object public int hashCode() { //GenerationStamp is IRRELEVANT and should not be used here return (int)(blockId^(blockId>>>32)); } }
f98b70a574e583e4fa3b7a81872e2bb64f6c7957
0bde5bd3149ba8cea8e15ca55d606210cf80c84e
/2.JavaCore/src/com/javarush/task/task14/task1408/BelarusianHen.java
5729ffee42a1b2998fb18336b5e863b174aa1bba
[]
no_license
Rasskopovaa/JavaRush
481922d5626924002a9f22778e1c2844dc7a4df8
8c6f448c3a205f641aee43d4ec09158c85eb89c9
refs/heads/master
2020-06-18T09:04:47.362904
2019-09-06T16:25:06
2019-09-06T16:25:06
195,804,298
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package com.javarush.task.task14.task1408; public class BelarusianHen extends Hen { @Override public int getCountOfEggsPerMonth() { return 5; } @Override public String getDescription() { return super.getDescription() + " Моя страна - " + Country.BELARUS + ". Я несу " + getCountOfEggsPerMonth() + " яиц в месяц."; } }
79cf17a51aea5a5301ccd5bae66cf25b13bfc07a
5ae3df3fc4b678f00e88c86d7ce6b1908acd4573
/eitax-batch-aws/src/main/java/com/eitax/recall/amazon/xsd/ItemLookupRequest.java
2da215bec5a2c942ec37db733f28b7b4d12f4877
[ "Apache-2.0" ]
permissive
shokoro3434/test2
88a8072f9a8ae4d1b0fdf522afeea84a357008d5
499ac8de93f3952bd9f2d81bf0f727ca18e522b3
refs/heads/master
2021-01-21T14:12:19.158142
2016-03-01T23:47:17
2016-03-01T23:47:17
41,813,121
0
0
null
null
null
null
UTF-8
Java
false
false
10,920
java
// // このファイルは、JavaTM Architecture for XML Binding(JAXB) Reference Implementation、v2.2.8-b130911.1802によって生成されました // <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>を参照してください // ソース・スキーマの再コンパイル時にこのファイルの変更は失われます。 // 生成日: 2015.08.14 時間 10:22:22 PM JST // package com.eitax.recall.amazon.xsd; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>ItemLookupRequest complex typeのJavaクラス。 * * <p>次のスキーマ・フラグメントは、このクラス内に含まれる予期されるコンテンツを指定します。 * * <pre> * &lt;complexType name="ItemLookupRequest"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Condition" minOccurs="0"/> * &lt;element name="IdType" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="ASIN"/> * &lt;enumeration value="UPC"/> * &lt;enumeration value="SKU"/> * &lt;enumeration value="EAN"/> * &lt;enumeration value="ISBN"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="MerchantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="ItemId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="ResponseGroup" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="SearchIndex" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="VariationPage" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}positiveIntegerOrAll" minOccurs="0"/> * &lt;element name="RelatedItemPage" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}positiveIntegerOrAll" minOccurs="0"/> * &lt;element name="RelationshipType" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="IncludeReviewsSummary" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="TruncateReviewsAt" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ItemLookupRequest", propOrder = { "condition", "idType", "merchantId", "itemId", "responseGroup", "searchIndex", "variationPage", "relatedItemPage", "relationshipType", "includeReviewsSummary", "truncateReviewsAt" }) public class ItemLookupRequest { @XmlElement(name = "Condition") protected String condition; @XmlElement(name = "IdType") protected String idType; @XmlElement(name = "MerchantId") protected String merchantId; @XmlElement(name = "ItemId") protected List<String> itemId; @XmlElement(name = "ResponseGroup") protected List<String> responseGroup; @XmlElement(name = "SearchIndex") protected String searchIndex; @XmlElement(name = "VariationPage") @XmlSchemaType(name = "anySimpleType") protected String variationPage; @XmlElement(name = "RelatedItemPage") @XmlSchemaType(name = "anySimpleType") protected String relatedItemPage; @XmlElement(name = "RelationshipType") protected List<String> relationshipType; @XmlElement(name = "IncludeReviewsSummary") protected String includeReviewsSummary; @XmlElement(name = "TruncateReviewsAt") @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger truncateReviewsAt; /** * conditionプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getCondition() { return condition; } /** * conditionプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setCondition(String value) { this.condition = value; } /** * idTypeプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getIdType() { return idType; } /** * idTypeプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setIdType(String value) { this.idType = value; } /** * merchantIdプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getMerchantId() { return merchantId; } /** * merchantIdプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setMerchantId(String value) { this.merchantId = value; } /** * Gets the value of the itemId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the itemId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItemId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getItemId() { if (itemId == null) { itemId = new ArrayList<String>(); } return this.itemId; } /** * Gets the value of the responseGroup property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the responseGroup property. * * <p> * For example, to add a new item, do as follows: * <pre> * getResponseGroup().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getResponseGroup() { if (responseGroup == null) { responseGroup = new ArrayList<String>(); } return this.responseGroup; } /** * searchIndexプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getSearchIndex() { return searchIndex; } /** * searchIndexプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setSearchIndex(String value) { this.searchIndex = value; } /** * variationPageプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getVariationPage() { return variationPage; } /** * variationPageプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setVariationPage(String value) { this.variationPage = value; } /** * relatedItemPageプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getRelatedItemPage() { return relatedItemPage; } /** * relatedItemPageプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setRelatedItemPage(String value) { this.relatedItemPage = value; } /** * Gets the value of the relationshipType property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the relationshipType property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRelationshipType().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getRelationshipType() { if (relationshipType == null) { relationshipType = new ArrayList<String>(); } return this.relationshipType; } /** * includeReviewsSummaryプロパティの値を取得します。 * * @return * possible object is * {@link String } * */ public String getIncludeReviewsSummary() { return includeReviewsSummary; } /** * includeReviewsSummaryプロパティの値を設定します。 * * @param value * allowed object is * {@link String } * */ public void setIncludeReviewsSummary(String value) { this.includeReviewsSummary = value; } /** * truncateReviewsAtプロパティの値を取得します。 * * @return * possible object is * {@link BigInteger } * */ public BigInteger getTruncateReviewsAt() { return truncateReviewsAt; } /** * truncateReviewsAtプロパティの値を設定します。 * * @param value * allowed object is * {@link BigInteger } * */ public void setTruncateReviewsAt(BigInteger value) { this.truncateReviewsAt = value; } }
[ "takahiro@ThinkPadX201" ]
takahiro@ThinkPadX201
5460b88fa5b00eabafec6bbfb257c54fd16e0596
d905cecd64a795bdbe2f22b7d299e07005e89ef5
/app/src/androidTest/java/com/example/kyle/shuttleme/ApplicationTest.java
a2b4f02768075f0c71b4353fab2ba29bb1fb7d7d
[]
no_license
KyleJA/ShuttleMe
1240cb62a9d28a1cd1803b42223b4258840444a9
7f8a017b675fff116e97963bba1a7bbcb0486b05
refs/heads/master
2021-01-10T16:47:15.353555
2016-01-22T06:05:42
2016-01-22T06:05:42
50,161,392
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.example.kyle.shuttleme; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
b6778e3dcd81d87de0f7e33d099cddf533ee82d8
0ff70e59ba786bf48a95203cc463353d9163ffe4
/Lecture-8/FindUnique.java
f5d4948ac2c56fbb2f940214795227f735dec678
[]
no_license
daksh-dummy-account/Intro-To-Java
4dd3c0b566d05dab6461b188b19b7d3a671a7d87
9648a4197f411469758ee878bcfa2a5acb32db13
refs/heads/master
2021-03-01T17:57:46.700665
2020-03-15T07:08:00
2020-03-15T07:08:00
245,804,086
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
public class Solution{ public static int findUnique(int[] arr){ for(int i = 0; i < arr.length; i++){ int j; for(j = 0; j < arr.length; j++){ if(i != j){ if(arr[i] == arr[j]){ break; } } } if(j == arr.length){ return arr[i]; } } return Integer.MAX_VALUE; } }
5ddda4dabe95b0f7e70dd3496e7142450105a7f1
9fdab5a0e371188e4cec892f2cac78a3ac7632fb
/proyecto/AplicacionCola/src/fes/aragon/componetes/Caja.java
6401b0356d679d5c05147f0271aa9606dfe085dc
[]
no_license
Areli-vazquez/ESTRUCTRAS-DE-DATOS
53bba462a80c486b7e30aafe4470f677c727ae62
89d427135ba147491ed6eb6969b8a618d33c024a
refs/heads/master
2023-03-03T21:43:55.306269
2021-02-16T06:36:31
2021-02-16T06:36:31
339,304,873
1
0
null
null
null
null
UTF-8
Java
false
false
1,498
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 fes.aragon.componetes; /** * * @author areli */ public class Caja { private boolean semaforo = true; private int tiempoAntender; private int tiempoRestante; private Persona persona; public Caja(int tiempoParaAntender, int tiempoRestante, Persona persona) { this.tiempoAntender = tiempoParaAntender; this.tiempoRestante = tiempoRestante; this.persona = persona; } public boolean isSemaforo() { return semaforo; } public void setSemaforo(boolean semafor) { this.semaforo = semafor; } public int getTiempoAntender() { return tiempoAntender; } public void setTiempoAntender(int tiempoAntender) { this.tiempoAntender = tiempoAntender; } public int getTiempoRestante() { return tiempoRestante; } public void setTiempoRestante(int tiempoRestante) { this.tiempoRestante = tiempoRestante; } public Persona getPersona() { return persona; } public void setPersona(Persona persona) { this.persona = persona; } @Override public String toString() { return "Caja{" + "semaforo=" + semaforo + ", tiempoParaAntender=" + tiempoAntender + ", tiempoRestante=" + tiempoRestante + ", persona=" + persona + '}'; } }
67d546df6038d74b129bc3b779c211f5f179ce17
dfea0040767823854849d2fc6e1d0a0a33bb789d
/src/main/java/com/weatherstation/service/GenerateTableService.java
8e9b1bb01956194f6efc47636f0402c4e5571702
[]
no_license
SCD-Hanyo/eawsi
dfb3dfeb3df6152e31fe45b5c22e864b1c3a9771
8228b0160fc5752e92ec027db8da6a18df665542
refs/heads/master
2021-07-08T04:36:16.503168
2017-10-05T05:56:59
2017-10-05T05:56:59
105,722,799
0
0
null
null
null
null
UTF-8
Java
false
false
21,359
java
package com.weatherstation.service; import com.weatherstation.model.Stations; import com.weatherstation.model.Data; import com.weatherstation.util.HibernateUtil_Stations; import com.weatherstation.util.HibernateUtil_Data; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; public class GenerateTableService { public Stations FindStationByID (String ID) { Session session = HibernateUtil_Stations.openSession(); Transaction tx = null; Stations station = null; try { tx = session.getTransaction(); tx.begin(); Query query = session.createQuery("from Stations where StationID='" + ID+ "' "); station = (Stations)query.uniqueResult(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return station; } public int checkIfUnique (String ID, String Date, String Time) { List<Data> list = new ArrayList<Data>(); Session session = HibernateUtil_Data.openSession(); Transaction tx = null; try { tx = session.getTransaction(); tx.begin(); list = session.createQuery("from Data where StationID='" + ID+ "' AND Date='"+Date+"' AND Time='"+Time+"'").list(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return list.size(); } public List<Data> getListOfData(String ID){ List<Data> list = new ArrayList<Data>(); Session session = HibernateUtil_Data.openSession(); Transaction tx = null; try { tx = session.getTransaction(); tx.begin(); //list = session.createQuery("from Data").list(); //list = session.createQuery("from Data ORDER BY RecordIndex desc").list(); list = session.createQuery("from Data where StationID='" + ID+ "' ORDER BY Date desc,Time desc").list(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return list; } public List<Data> getListOfDataWhereDate(String ID, String Date){ List<Data> list = new ArrayList<Data>(); Session session = HibernateUtil_Data.openSession(); Transaction tx = null; try { tx = session.getTransaction(); tx.begin(); //list = session.createQuery("from Data").list(); //list = session.createQuery("from Data ORDER BY RecordIndex desc").list(); list = session.createQuery("from Data where StationID='" + ID+ "' AND Date='" +Date+"' ORDER BY Date desc,Time desc").list(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return list; } public List<Data> getListOfDataLimited(String ID,String PageIndexString, String PageSizeString){ if (PageIndexString=="" ||PageIndexString==null) { PageIndexString="0"; } int PageSizeInt=(Integer.parseInt(PageSizeString)); int FirstReadingIndex=(Integer.parseInt(PageIndexString))*PageSizeInt; List<Data> list = new ArrayList<Data>(); Session session = HibernateUtil_Data.openSession(); Transaction tx = null; try { tx = session.getTransaction(); tx.begin(); //list = session.createQuery("from Data").list(); //list = session.createQuery("from Data ORDER BY RecordIndex desc").list(); list = (session.createQuery("from Data where StationID='" + ID+ "' ORDER BY Date desc,Time desc").setFirstResult(FirstReadingIndex).setMaxResults(PageSizeInt)).list(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return list; } public Long getNumberOfReadings(String ID){ String CountQueryString="Select count (*) from Data where StationId= '"+ID+"'"; Long numberOfReadings=(long) 3; Session session = HibernateUtil_Data.openSession(); Transaction tx = null; try { tx = session.getTransaction(); tx.begin(); Query CountQuery=session.createQuery(CountQueryString); numberOfReadings=(Long) CountQuery.uniqueResult(); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } finally { session.close(); } return numberOfReadings; } public String GenerateTableHeadArrayMethod(String ID) { if (ID !=null) { String Row1 ="<table id=\"StationTable\" width=\"85%\" border=\"1\" align=\"center\" cellpadding=\"1\" cellspacing=\"1\"> <thead bgcolor=\"#FFFFFF\"> <tr align=\"center\"> <th rowspan=\"2\">Date</th> <th rowspan=\"2\">Time</th>"; String Row2="</tr> <tr align=\"center\" valign=\"middle\">"; Stations station2=new Stations(); station2=FindStationByID(ID); String [] ParameterDescriptionArray = new String [100]; ParameterDescriptionArray[0]=null; ParameterDescriptionArray[1]=station2.getP01(); ParameterDescriptionArray[2]=station2.getP02(); ParameterDescriptionArray[3]=station2.getP03(); ParameterDescriptionArray[4]=station2.getP04(); ParameterDescriptionArray[5]=station2.getP05(); ParameterDescriptionArray[6]=station2.getP06(); ParameterDescriptionArray[7]=station2.getP07(); ParameterDescriptionArray[8]=station2.getP08(); ParameterDescriptionArray[9]=station2.getP09(); ParameterDescriptionArray[10]=station2.getP10(); ParameterDescriptionArray[11]=station2.getP11(); ParameterDescriptionArray[12]=station2.getP12(); ParameterDescriptionArray[13]=station2.getP13(); ParameterDescriptionArray[14]=station2.getP14(); ParameterDescriptionArray[15]=station2.getP15(); ParameterDescriptionArray[16]=station2.getP16(); ParameterDescriptionArray[17]=station2.getP17(); ParameterDescriptionArray[18]=station2.getP18(); ParameterDescriptionArray[19]=station2.getP19(); ParameterDescriptionArray[20]=station2.getP20(); ParameterDescriptionArray[21]=station2.getP21(); ParameterDescriptionArray[22]=station2.getP22(); ParameterDescriptionArray[23]=station2.getP23(); ParameterDescriptionArray[24]=station2.getP24(); ParameterDescriptionArray[25]=station2.getP25(); ParameterDescriptionArray[26]=station2.getP26(); ParameterDescriptionArray[27]=station2.getP27(); ParameterDescriptionArray[28]=station2.getP28(); ParameterDescriptionArray[29]=station2.getP29(); ParameterDescriptionArray[30]=station2.getP30(); ParameterDescriptionArray[31]=station2.getP31(); ParameterDescriptionArray[32]=station2.getP32(); ParameterDescriptionArray[33]=station2.getP33(); ParameterDescriptionArray[34]=station2.getP34(); ParameterDescriptionArray[35]=station2.getP35(); ParameterDescriptionArray[36]=station2.getP36(); ParameterDescriptionArray[37]=station2.getP37(); ParameterDescriptionArray[38]=station2.getP38(); ParameterDescriptionArray[39]=station2.getP39(); ParameterDescriptionArray[40]=station2.getP40(); ParameterDescriptionArray[41]=station2.getP41(); ParameterDescriptionArray[42]=station2.getP42(); ParameterDescriptionArray[43]=station2.getP43(); ParameterDescriptionArray[44]=station2.getP44(); ParameterDescriptionArray[45]=station2.getP45(); ParameterDescriptionArray[46]=station2.getP46(); ParameterDescriptionArray[47]=station2.getP47(); ParameterDescriptionArray[48]=station2.getP48(); ParameterDescriptionArray[49]=station2.getP49(); ParameterDescriptionArray[50]=station2.getP50(); ParameterDescriptionArray[51]=station2.getP51(); ParameterDescriptionArray[52]=station2.getP52(); ParameterDescriptionArray[53]=station2.getP53(); ParameterDescriptionArray[54]=station2.getP54(); ParameterDescriptionArray[55]=station2.getP55(); ParameterDescriptionArray[56]=station2.getP56(); ParameterDescriptionArray[57]=station2.getP57(); ParameterDescriptionArray[58]=station2.getP58(); ParameterDescriptionArray[59]=station2.getP59(); ParameterDescriptionArray[60]=station2.getP60(); ParameterDescriptionArray[61]=station2.getP61(); ParameterDescriptionArray[62]=station2.getP62(); ParameterDescriptionArray[63]=station2.getP63(); ParameterDescriptionArray[64]=station2.getP64(); ParameterDescriptionArray[65]=station2.getP65(); ParameterDescriptionArray[66]=station2.getP66(); ParameterDescriptionArray[67]=station2.getP67(); ParameterDescriptionArray[68]=station2.getP68(); ParameterDescriptionArray[69]=station2.getP69(); ParameterDescriptionArray[70]=station2.getP70(); ParameterDescriptionArray[71]=station2.getP71(); ParameterDescriptionArray[72]=station2.getP72(); ParameterDescriptionArray[73]=station2.getP73(); ParameterDescriptionArray[74]=station2.getP74(); ParameterDescriptionArray[75]=station2.getP75(); ParameterDescriptionArray[76]=station2.getP76(); ParameterDescriptionArray[77]=station2.getP77(); ParameterDescriptionArray[78]=station2.getP78(); ParameterDescriptionArray[79]=station2.getP79(); ParameterDescriptionArray[80]=station2.getP80(); ParameterDescriptionArray[81]=station2.getP81(); ParameterDescriptionArray[82]=station2.getP82(); ParameterDescriptionArray[83]=station2.getP83(); ParameterDescriptionArray[84]=station2.getP84(); ParameterDescriptionArray[85]=station2.getP85(); ParameterDescriptionArray[86]=station2.getP86(); ParameterDescriptionArray[87]=station2.getP87(); ParameterDescriptionArray[88]=station2.getP88(); ParameterDescriptionArray[89]=station2.getP89(); ParameterDescriptionArray[90]=station2.getP90(); ParameterDescriptionArray[91]=station2.getP91(); ParameterDescriptionArray[92]=station2.getP92(); ParameterDescriptionArray[93]=station2.getP93(); ParameterDescriptionArray[94]=station2.getP94(); ParameterDescriptionArray[95]=station2.getP95(); ParameterDescriptionArray[96]=station2.getP96(); ParameterDescriptionArray[97]=station2.getP97(); ParameterDescriptionArray[98]=station2.getP98(); ParameterDescriptionArray[99]=station2.getP99(); String [] Next01_Split = new String [4]; String [] Next02_Split = new String [4]; String NumberofParamsString=station2.getNumberOfParams(); int NumberofParamsInt= Integer.parseInt(NumberofParamsString); for ( char loopcntr=1;loopcntr<=NumberofParamsInt;loopcntr++) { if (((ParameterDescriptionArray[loopcntr])!=null)) { String [] ParameterDescriptionArray_SplitArray = (ParameterDescriptionArray[loopcntr]).split(","); if (ParameterDescriptionArray_SplitArray[2].equalsIgnoreCase("3")) { String Next01=ParameterDescriptionArray[loopcntr+1]; String Next02=ParameterDescriptionArray[loopcntr+2]; Next01_Split = Next01.split(","); Next02_Split = Next02.split(","); Row1+="<th colspan=\"3\">"+ParameterDescriptionArray_SplitArray[0]; Row1+="<br>["+ParameterDescriptionArray_SplitArray[4]+"]</th>"; Row2+="<th>"+ParameterDescriptionArray_SplitArray[3]+"</th> <th>"+Next01_Split[3]+"</th><th>"+Next02_Split[3]+"</th>"; loopcntr+=2; } else { Row1+="<th rowspan=\"2\">"+ParameterDescriptionArray_SplitArray[0]; Row1+="<br>["+ParameterDescriptionArray_SplitArray[4]+"]</th>"; } } else { break; } } boolean ET0_Support_Flag=(station2.getModel()).contains("ET0 Supported"); if (ET0_Support_Flag) { Row1+="<th rowspan=\"2\">"+"ET0"+"</th>"; } return Row1+Row2+"</tr><br><br><br><br><br> </thead>"; } else { return ""; } } public String GenerateTableBodyArrayMethod(String ID,String PageIndexString, String PageSizeString) { String Row1 = "<tbody> <tr>"; Stations station=new Stations(); station=FindStationByID(ID); if (PageIndexString=="" || PageIndexString==null) { PageIndexString="0"; } //List <Data> list=getListOfData(ID); List <Data> list=getListOfDataLimited(ID,PageIndexString,PageSizeString); for(Data d:list) { if ((d.getDate())!=null) { Row1+="<td height=\"21\">"+d.getDate()+"</td>"; } if ((d.getTime())!=null) { Row1+="<td>"+d.getTime()+"</td>"; } if ((d.getP01())!=null) { Row1+="<td>"+d.getP01()+"</td>"; } if ((d.getP02())!=null) { Row1+="<td>"+d.getP02()+"</td>"; } if ((d.getP03())!=null) { Row1+="<td>"+d.getP03()+"</td>"; } if ((d.getP04())!=null) { Row1+="<td>"+d.getP04()+"</td>"; } if ((d.getP05())!=null) { Row1+="<td>"+d.getP05()+"</td>"; } if ((d.getP06())!=null) { Row1+="<td>"+d.getP06()+"</td>"; } if ((d.getP07())!=null) { Row1+="<td>"+d.getP07()+"</td>"; } if ((d.getP08())!=null) { Row1+="<td>"+d.getP08()+"</td>"; } if ((d.getP09())!=null) { Row1+="<td>"+d.getP09()+"</td>"; } if ((d.getP10())!=null) { Row1+="<td>"+d.getP10()+"</td>"; } if ((d.getP11())!=null) { Row1+="<td>"+d.getP11()+"</td>"; } if ((d.getP12())!=null) { Row1+="<td>"+d.getP12()+"</td>"; } if ((d.getP13())!=null) { Row1+="<td>"+d.getP13()+"</td>"; } if ((d.getP14())!=null) { Row1+="<td>"+d.getP14()+"</td>"; } if ((d.getP15())!=null) { Row1+="<td>"+d.getP15()+"</td>"; } if ((d.getP16())!=null) { Row1+="<td>"+d.getP16()+"</td>"; } if ((d.getP17())!=null) { Row1+="<td>"+d.getP17()+"</td>"; } if ((d.getP18())!=null) { Row1+="<td>"+d.getP18()+"</td>"; } if ((d.getP19())!=null) { Row1+="<td>"+d.getP19()+"</td>"; } if ((d.getP20())!=null) { Row1+="<td>"+d.getP20()+"</td>"; } if ((d.getP21())!=null) { Row1+="<td>"+d.getP21()+"</td>"; } if ((d.getP22())!=null) { Row1+="<td>"+d.getP22()+"</td>"; } if ((d.getP23())!=null) { Row1+="<td>"+d.getP23()+"</td>"; } if ((d.getP24())!=null) { Row1+="<td>"+d.getP24()+"</td>"; } if ((d.getP25())!=null) { Row1+="<td>"+d.getP25()+"</td>"; } if ((d.getP26())!=null) { Row1+="<td>"+d.getP26()+"</td>"; } if ((d.getP27())!=null) { Row1+="<td>"+d.getP27()+"</td>"; } if ((d.getP28())!=null) { Row1+="<td>"+d.getP28()+"</td>"; } if ((d.getP29())!=null) { Row1+="<td>"+d.getP29()+"</td>"; } if ((d.getP30())!=null) { Row1+="<td>"+d.getP30()+"</td>"; } if ((d.getP31())!=null) { Row1+="<td>"+d.getP31()+"</td>"; } if ((d.getP32())!=null) { Row1+="<td>"+d.getP32()+"</td>"; } if ((d.getP33())!=null) { Row1+="<td>"+d.getP33()+"</td>"; } if ((d.getP34())!=null) { Row1+="<td>"+d.getP34()+"</td>"; } if ((d.getP35())!=null) { Row1+="<td>"+d.getP35()+"</td>"; } if ((d.getP36())!=null) { Row1+="<td>"+d.getP36()+"</td>"; } if ((d.getP37())!=null) { Row1+="<td>"+d.getP37()+"</td>"; } if ((d.getP38())!=null) { Row1+="<td>"+d.getP38()+"</td>"; } if ((d.getP39())!=null) { Row1+="<td>"+d.getP39()+"</td>"; } if ((d.getP40())!=null) { Row1+="<td>"+d.getP40()+"</td>"; } if ((d.getP41())!=null) { Row1+="<td>"+d.getP41()+"</td>"; } if ((d.getP42())!=null) { Row1+="<td>"+d.getP42()+"</td>"; } if ((d.getP43())!=null) { Row1+="<td>"+d.getP43()+"</td>"; } if ((d.getP44())!=null) { Row1+="<td>"+d.getP44()+"</td>"; } if ((d.getP45())!=null) { Row1+="<td>"+d.getP45()+"</td>"; } if ((d.getP46())!=null) { Row1+="<td>"+d.getP46()+"</td>"; } if ((d.getP47())!=null) { Row1+="<td>"+d.getP47()+"</td>"; } if ((d.getP48())!=null) { Row1+="<td>"+d.getP48()+"</td>"; } if ((d.getP49())!=null) { Row1+="<td>"+d.getP49()+"</td>"; } if ((d.getP50())!=null) { Row1+="<td>"+d.getP50()+"</td>"; } if ((d.getP51())!=null) { Row1+="<td>"+d.getP51()+"</td>"; } if ((d.getP52())!=null) { Row1+="<td>"+d.getP52()+"</td>"; } if ((d.getP53())!=null) { Row1+="<td>"+d.getP53()+"</td>"; } if ((d.getP54())!=null) { Row1+="<td>"+d.getP54()+"</td>"; } if ((d.getP55())!=null) { Row1+="<td>"+d.getP55()+"</td>"; } if ((d.getP56())!=null) { Row1+="<td>"+d.getP56()+"</td>"; } if ((d.getP57())!=null) { Row1+="<td>"+d.getP57()+"</td>"; } if ((d.getP58())!=null) { Row1+="<td>"+d.getP58()+"</td>"; } if ((d.getP59())!=null) { Row1+="<td>"+d.getP59()+"</td>"; } if ((d.getP60())!=null) { Row1+="<td>"+d.getP60()+"</td>"; } if ((d.getP61())!=null) { Row1+="<td>"+d.getP61()+"</td>"; } if ((d.getP62())!=null) { Row1+="<td>"+d.getP62()+"</td>"; } if ((d.getP63())!=null) { Row1+="<td>"+d.getP63()+"</td>"; } if ((d.getP64())!=null) { Row1+="<td>"+d.getP64()+"</td>"; } if ((d.getP65())!=null) { Row1+="<td>"+d.getP65()+"</td>"; } if ((d.getP66())!=null) { Row1+="<td>"+d.getP66()+"</td>"; } if ((d.getP67())!=null) { Row1+="<td>"+d.getP67()+"</td>"; } if ((d.getP68())!=null) { Row1+="<td>"+d.getP68()+"</td>"; } if ((d.getP69())!=null) { Row1+="<td>"+d.getP69()+"</td>"; } if ((d.getP70())!=null) { Row1+="<td>"+d.getP70()+"</td>"; } if ((d.getP71())!=null) { Row1+="<td>"+d.getP71()+"</td>"; } if ((d.getP72())!=null) { Row1+="<td>"+d.getP72()+"</td>"; } if ((d.getP73())!=null) { Row1+="<td>"+d.getP73()+"</td>"; } if ((d.getP74())!=null) { Row1+="<td>"+d.getP74()+"</td>"; } if ((d.getP75())!=null) { Row1+="<td>"+d.getP75()+"</td>"; } if ((d.getP76())!=null) { Row1+="<td>"+d.getP76()+"</td>"; } if ((d.getP77())!=null) { Row1+="<td>"+d.getP77()+"</td>"; } if ((d.getP78())!=null) { Row1+="<td>"+d.getP78()+"</td>"; } if ((d.getP79())!=null) { Row1+="<td>"+d.getP79()+"</td>"; } if ((d.getP80())!=null) { Row1+="<td>"+d.getP80()+"</td>"; } if ((d.getP81())!=null) { Row1+="<td>"+d.getP81()+"</td>"; } if ((d.getP82())!=null) { Row1+="<td>"+d.getP82()+"</td>"; } if ((d.getP83())!=null) { Row1+="<td>"+d.getP83()+"</td>"; } if ((d.getP84())!=null) { Row1+="<td>"+d.getP84()+"</td>"; } if ((d.getP85())!=null) { Row1+="<td>"+d.getP85()+"</td>"; } if ((d.getP86())!=null) { Row1+="<td>"+d.getP86()+"</td>"; } if ((d.getP87())!=null) { Row1+="<td>"+d.getP87()+"</td>"; } if ((d.getP88())!=null) { Row1+="<td>"+d.getP88()+"</td>"; } if ((d.getP89())!=null) { Row1+="<td>"+d.getP89()+"</td>"; } if ((d.getP90())!=null) { Row1+="<td>"+d.getP90()+"</td>"; } if ((d.getP91())!=null) { Row1+="<td>"+d.getP91()+"</td>"; } if ((d.getP92())!=null) { Row1+="<td>"+d.getP92()+"</td>"; } if ((d.getP93())!=null) { Row1+="<td>"+d.getP93()+"</td>"; } if ((d.getP94())!=null) { Row1+="<td>"+d.getP94()+"</td>"; } if ((d.getP95())!=null) { Row1+="<td>"+d.getP95()+"</td>"; } if ((d.getP96())!=null) { Row1+="<td>"+d.getP96()+"</td>"; } if ((d.getP97())!=null) { Row1+="<td>"+d.getP97()+"</td>"; } if ((d.getP98())!=null) { Row1+="<td>"+d.getP98()+"</td>"; } if ((d.getP99())!=null) { Row1+="<td>"+d.getP99()+"</td>"; } boolean ET0_Support_Flag=(station.getModel()).contains("ET0 Supported"); if (ET0_Support_Flag) { if (d.getTime().equals("23:00")) { ET0CalculatorService et0_Calc_Service= new ET0CalculatorService (); String ET0=et0_Calc_Service.ClaculateET0String(ID,d.getDate()); Row1+="<td>"+ET0+"</td>"; } } Row1+="</tr>"; } return Row1+"</tbody> </table> <table id=\"header-fixed\"></table>"; } }
[ "AlienThunder@AlienThunder-PC" ]
AlienThunder@AlienThunder-PC
8ba6c2744701debaeaf24d9ac8b533d7f3f1c7e5
1be5886bed728054520e17b0829fad350acba95b
/app/src/main/java/com/guyu/android/gis/config/LayerConfig.java
eedde8ead80ce5b98406d123245d3273a96eef84
[]
no_license
LangYiZheng/fuzhi
fe733385dc1f4c702d73b33875113c58e3b1cabe
963d4faf9fcbc7497b18d7ea8ef37b6c6230c1ae
refs/heads/master
2020-04-07T08:38:28.490769
2018-11-19T12:27:54
2018-11-19T12:27:54
158,221,934
0
0
null
null
null
null
UTF-8
Java
false
false
2,324
java
package com.guyu.android.gis.config; import org.json.JSONObject; public class LayerConfig { private String label;//图层名字 private String name;//图层中文名字 private String type;//图层类型 tiled 切片;dynamic 矢量;feature 要素 private Boolean visible;//是否可见 private Boolean useoffline;//是否使用离线 private String offlinetype;//离线数据类型 private String url;//图层在线服务路径 private String offlinedata;//图层数据文件(FeatureLayer使用) private String definition;//图层定义文件(FeatureLayer使用) private String[] originalfields;//原始字段 private String[] displayfields;//显示字段 private JSONObject fieldDict; // 字段对应的字典 public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Boolean getVisible() { return visible; } public void setVisible(Boolean visible) { this.visible = visible; } public Boolean getUseoffline() { return useoffline; } public void setUseoffline(Boolean useoffline) { this.useoffline = useoffline; } public String getOfflinetype() { return offlinetype; } public void setOfflinetype(String offlinetype) { this.offlinetype = offlinetype; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getOfflinedata() { return offlinedata; } public void setOfflinedata(String offlinedata) { this.offlinedata = offlinedata; } public String getDefinition() { return definition; } public void setDefinition(String definition) { this.definition = definition; } public String[] getOriginalfields() { return originalfields; } public void setOriginalfields(String[] originalfields) { this.originalfields = originalfields; } public String[] getDisplayfields() { return displayfields; } public void setDisplayfields(String[] displayfields) { this.displayfields = displayfields; } public void setFieldDict(JSONObject fieldDict) { this.fieldDict = fieldDict; } public JSONObject getFieldDict() { return fieldDict; } }
a72842816907e80d77e83f4d7c9acfdfb86c5ba4
d561f8576629d4620493384aa3832df15bae878c
/src/ReplitQuestions/MethodToSumDigitsOfString.java
d332be6fa59ef90eceed7c62baefbdbd5d68b40e
[]
no_license
MrsCenik/learningCoreJava
ccba642caa59f580d027817c84d19166518c2c0e
52009f046a71b0335de90a325442a1aa9a822ea4
refs/heads/main
2023-08-17T16:44:13.017636
2021-09-27T05:04:51
2021-09-27T05:04:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
827
java
package ReplitQuestions; public class MethodToSumDigitsOfString { /* Write a method which accepts a String as parameter and prints the sum of the digits, present in the given string. input : ade1r4d3 output : 8 Hint : Use Character.isDigit() Integer.valueOf() */ public static int sumDigits(String str) { int sum=0; String digits="0"; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); if (Character.isDigit(ch)) digits += ch; else { sum += Integer.valueOf(digits); digits = "0"; } } return sum + Integer.valueOf(digits); } public static void main(String[] args) { String str1 ="ade1r4d3"; System.out.println(sumDigits(str1)); } }
b553f245a359a4eedd088b29f1353303bc5b1ad1
fcbf4f0621588f7c3114916c0b07a65047d5c41b
/src/main/java/com/mkudriavtsev/javacore/chapter15/LambdaDemo3.java
20e9fcbec7773d79d46b2f29cb31c81879874087
[]
no_license
CodeCrunch2/JavaCore
c55c1e7a652b5afbda90725877959ecc680f74bc
e26e2cf0230fe8754592ad0c6e20a30fd8d329a7
refs/heads/master
2023-04-07T08:20:41.990892
2019-12-04T13:51:18
2019-12-04T13:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
495
java
package main.java.com.mkudriavtsev.javacore.chapter15; interface NumericTest2 { boolean test(int n, int d); } class LambdaDemo3 { public static void main(String[] args) { NumericTest2 isFactor = (n, d) -> (n % d) == 0; if (isFactor.test(10, 2)) System.out.println("Число 2 является множителем числа 10"); if (!isFactor.test(10, 3)) System.out.println("Число 3 не является множителем числа 10"); } }
e4d57b146dd668531615c1f3dc2df6e4906bb8ec
882e0d77d6a978f37d4f59b70c8af99b223a47e2
/august/src/main/java/august/protocolnegotiator/simpleprotocolnegotiation/ProtocolNegotiator.java
a58789d904301a121c98a5c4b6013414a08e1fbf
[]
no_license
resinas/NegoFAST
6ac16d9cb64af2e63dcc36aa50442f5c13cccfd1
424658b128caa81277126fdfd15e0ef4fba9c7cf
refs/heads/master
2016-09-06T08:35:47.061151
2012-11-04T13:11:44
2012-11-04T13:11:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
/* * ProtocolNegotiator.java * * Created on August 5, 2007, 6:23 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package august.protocolnegotiator.simpleprotocolnegotiation; import java.net.URI; import java.util.Set; import negofast.core.environment.preferences.IPreferencesResource; import negofast.core.interactions.requestprotocolnegotiation.IProtocolNegotiationRequester; import negofast.core.interactions.requestprotocolnegotiation.IProtocolNegotiator; import negofast.simpleprotocolnegotiation.IProtocolNegotiationResponder; import august.infrastructure.registry.ServiceRegistry; /** * * @author resman */ public class ProtocolNegotiator implements IProtocolNegotiator { private ServiceRegistry registry; /** Creates a new instance of ProtocolNegotiator */ public ProtocolNegotiator(ServiceRegistry registry) { this.registry = registry; // Registers a protocol negotiation responder to start receiving protocol negotiation offers IProtocolNegotiationResponder pnr = new ProtocolNegotiatorResponder(registry); registry.registerExternalService(URI.create("/incoming/protocolNegotiator"), pnr); } public void negotiateProtocol(URI thread, URI party, IProtocolNegotiationRequester requester) { IProtocolNegotiationResponder partyProxy = new ResponderProxy(registry, party); ProtocolNegotiatorInitiator initiator = new ProtocolNegotiatorInitiator(requester, thread, registry); URI initURI = registry.registerExternalService(initiator); IPreferencesResource p = registry.getPreferences(); partyProxy.chooseProtocol(p.getUser(), getProtocolList(), initURI); } private Set<URI> getProtocolList() { return registry.getProtocolsSupported(); } }
fc5964e02ec74bcd73b74d0c497625c59c44058c
8ba67a9dbd5594f26fd3f7ebc0f7946ca37a8dbe
/emf_workspace_v4.240415_DAC15/space exploration/src/org/spiritconsortium/xml/schema/spirit/spirit/impl/PortWireTypeImpl.java
bf9f8cfe97211dce6d67bdcac764d9b657289627
[]
no_license
munishjassi/grip_javaPrj
ab9191d10a29a4b49492b36feccedbb91aa70eb0
62749fe905169a0e8f4862999743d176b7c6bbc9
refs/heads/master
2021-01-12T08:41:40.114135
2016-12-16T16:07:51
2016-12-16T16:07:51
76,664,059
0
0
null
null
null
null
UTF-8
Java
false
false
18,032
java
/** * <copyright> * </copyright> * * $Id$ */ package org.spiritconsortium.xml.schema.spirit.spirit.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.spiritconsortium.xml.schema.spirit.spirit.ComponentPortDirectionType; import org.spiritconsortium.xml.schema.spirit.spirit.ConstraintSetsType; import org.spiritconsortium.xml.schema.spirit.spirit.DriverType; import org.spiritconsortium.xml.schema.spirit.spirit.PortWireType; import org.spiritconsortium.xml.schema.spirit.spirit.VectorType2; import org.spiritconsortium.xml.schema.spirit.spirit.WireTypeDefsType; import org.spiritconsortium.xml.schema.spirit.spirit._1Package; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Port Wire Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#getDirection <em>Direction</em>}</li> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#getVector <em>Vector</em>}</li> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#getWireTypeDefs <em>Wire Type Defs</em>}</li> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#getDriver <em>Driver</em>}</li> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#getConstraintSets <em>Constraint Sets</em>}</li> * <li>{@link org.spiritconsortium.xml.schema.spirit.spirit.impl.PortWireTypeImpl#isAllLogicalDirectionsAllowed <em>All Logical Directions Allowed</em>}</li> * </ul> * </p> * * @generated */ public class PortWireTypeImpl extends EObjectImpl implements PortWireType { /** * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDirection() * @generated * @ordered */ protected static final ComponentPortDirectionType DIRECTION_EDEFAULT = ComponentPortDirectionType.IN_LITERAL; /** * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDirection() * @generated * @ordered */ protected ComponentPortDirectionType direction = DIRECTION_EDEFAULT; /** * This is true if the Direction attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean directionESet; /** * The cached value of the '{@link #getVector() <em>Vector</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getVector() * @generated * @ordered */ protected VectorType2 vector; /** * The cached value of the '{@link #getWireTypeDefs() <em>Wire Type Defs</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWireTypeDefs() * @generated * @ordered */ protected WireTypeDefsType wireTypeDefs; /** * The cached value of the '{@link #getDriver() <em>Driver</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDriver() * @generated * @ordered */ protected DriverType driver; /** * The cached value of the '{@link #getConstraintSets() <em>Constraint Sets</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getConstraintSets() * @generated * @ordered */ protected ConstraintSetsType constraintSets; /** * The default value of the '{@link #isAllLogicalDirectionsAllowed() <em>All Logical Directions Allowed</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isAllLogicalDirectionsAllowed() * @generated * @ordered */ protected static final boolean ALL_LOGICAL_DIRECTIONS_ALLOWED_EDEFAULT = false; /** * The cached value of the '{@link #isAllLogicalDirectionsAllowed() <em>All Logical Directions Allowed</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isAllLogicalDirectionsAllowed() * @generated * @ordered */ protected boolean allLogicalDirectionsAllowed = ALL_LOGICAL_DIRECTIONS_ALLOWED_EDEFAULT; /** * This is true if the All Logical Directions Allowed attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean allLogicalDirectionsAllowedESet; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public PortWireTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return _1Package.eINSTANCE.getPortWireType(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComponentPortDirectionType getDirection() { return direction; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDirection(ComponentPortDirectionType newDirection) { ComponentPortDirectionType oldDirection = direction; direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection; boolean oldDirectionESet = directionESet; directionESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__DIRECTION, oldDirection, direction, !oldDirectionESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetDirection() { ComponentPortDirectionType oldDirection = direction; boolean oldDirectionESet = directionESet; direction = DIRECTION_EDEFAULT; directionESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, _1Package.PORT_WIRE_TYPE__DIRECTION, oldDirection, DIRECTION_EDEFAULT, oldDirectionESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetDirection() { return directionESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public VectorType2 getVector() { return vector; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetVector(VectorType2 newVector, NotificationChain msgs) { VectorType2 oldVector = vector; vector = newVector; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__VECTOR, oldVector, newVector); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setVector(VectorType2 newVector) { if (newVector != vector) { NotificationChain msgs = null; if (vector != null) msgs = ((InternalEObject)vector).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__VECTOR, null, msgs); if (newVector != null) msgs = ((InternalEObject)newVector).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__VECTOR, null, msgs); msgs = basicSetVector(newVector, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__VECTOR, newVector, newVector)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public WireTypeDefsType getWireTypeDefs() { return wireTypeDefs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetWireTypeDefs(WireTypeDefsType newWireTypeDefs, NotificationChain msgs) { WireTypeDefsType oldWireTypeDefs = wireTypeDefs; wireTypeDefs = newWireTypeDefs; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS, oldWireTypeDefs, newWireTypeDefs); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setWireTypeDefs(WireTypeDefsType newWireTypeDefs) { if (newWireTypeDefs != wireTypeDefs) { NotificationChain msgs = null; if (wireTypeDefs != null) msgs = ((InternalEObject)wireTypeDefs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS, null, msgs); if (newWireTypeDefs != null) msgs = ((InternalEObject)newWireTypeDefs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS, null, msgs); msgs = basicSetWireTypeDefs(newWireTypeDefs, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS, newWireTypeDefs, newWireTypeDefs)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DriverType getDriver() { return driver; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetDriver(DriverType newDriver, NotificationChain msgs) { DriverType oldDriver = driver; driver = newDriver; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__DRIVER, oldDriver, newDriver); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDriver(DriverType newDriver) { if (newDriver != driver) { NotificationChain msgs = null; if (driver != null) msgs = ((InternalEObject)driver).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__DRIVER, null, msgs); if (newDriver != null) msgs = ((InternalEObject)newDriver).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__DRIVER, null, msgs); msgs = basicSetDriver(newDriver, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__DRIVER, newDriver, newDriver)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ConstraintSetsType getConstraintSets() { return constraintSets; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetConstraintSets(ConstraintSetsType newConstraintSets, NotificationChain msgs) { ConstraintSetsType oldConstraintSets = constraintSets; constraintSets = newConstraintSets; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS, oldConstraintSets, newConstraintSets); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setConstraintSets(ConstraintSetsType newConstraintSets) { if (newConstraintSets != constraintSets) { NotificationChain msgs = null; if (constraintSets != null) msgs = ((InternalEObject)constraintSets).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS, null, msgs); if (newConstraintSets != null) msgs = ((InternalEObject)newConstraintSets).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS, null, msgs); msgs = basicSetConstraintSets(newConstraintSets, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS, newConstraintSets, newConstraintSets)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isAllLogicalDirectionsAllowed() { return allLogicalDirectionsAllowed; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAllLogicalDirectionsAllowed(boolean newAllLogicalDirectionsAllowed) { boolean oldAllLogicalDirectionsAllowed = allLogicalDirectionsAllowed; allLogicalDirectionsAllowed = newAllLogicalDirectionsAllowed; boolean oldAllLogicalDirectionsAllowedESet = allLogicalDirectionsAllowedESet; allLogicalDirectionsAllowedESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED, oldAllLogicalDirectionsAllowed, allLogicalDirectionsAllowed, !oldAllLogicalDirectionsAllowedESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetAllLogicalDirectionsAllowed() { boolean oldAllLogicalDirectionsAllowed = allLogicalDirectionsAllowed; boolean oldAllLogicalDirectionsAllowedESet = allLogicalDirectionsAllowedESet; allLogicalDirectionsAllowed = ALL_LOGICAL_DIRECTIONS_ALLOWED_EDEFAULT; allLogicalDirectionsAllowedESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED, oldAllLogicalDirectionsAllowed, ALL_LOGICAL_DIRECTIONS_ALLOWED_EDEFAULT, oldAllLogicalDirectionsAllowedESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetAllLogicalDirectionsAllowed() { return allLogicalDirectionsAllowedESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case _1Package.PORT_WIRE_TYPE__VECTOR: return basicSetVector(null, msgs); case _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS: return basicSetWireTypeDefs(null, msgs); case _1Package.PORT_WIRE_TYPE__DRIVER: return basicSetDriver(null, msgs); case _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS: return basicSetConstraintSets(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case _1Package.PORT_WIRE_TYPE__DIRECTION: return getDirection(); case _1Package.PORT_WIRE_TYPE__VECTOR: return getVector(); case _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS: return getWireTypeDefs(); case _1Package.PORT_WIRE_TYPE__DRIVER: return getDriver(); case _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS: return getConstraintSets(); case _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED: return isAllLogicalDirectionsAllowed() ? Boolean.TRUE : Boolean.FALSE; } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case _1Package.PORT_WIRE_TYPE__DIRECTION: setDirection((ComponentPortDirectionType)newValue); return; case _1Package.PORT_WIRE_TYPE__VECTOR: setVector((VectorType2)newValue); return; case _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS: setWireTypeDefs((WireTypeDefsType)newValue); return; case _1Package.PORT_WIRE_TYPE__DRIVER: setDriver((DriverType)newValue); return; case _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS: setConstraintSets((ConstraintSetsType)newValue); return; case _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED: setAllLogicalDirectionsAllowed(((Boolean)newValue).booleanValue()); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case _1Package.PORT_WIRE_TYPE__DIRECTION: unsetDirection(); return; case _1Package.PORT_WIRE_TYPE__VECTOR: setVector((VectorType2)null); return; case _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS: setWireTypeDefs((WireTypeDefsType)null); return; case _1Package.PORT_WIRE_TYPE__DRIVER: setDriver((DriverType)null); return; case _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS: setConstraintSets((ConstraintSetsType)null); return; case _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED: unsetAllLogicalDirectionsAllowed(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case _1Package.PORT_WIRE_TYPE__DIRECTION: return isSetDirection(); case _1Package.PORT_WIRE_TYPE__VECTOR: return vector != null; case _1Package.PORT_WIRE_TYPE__WIRE_TYPE_DEFS: return wireTypeDefs != null; case _1Package.PORT_WIRE_TYPE__DRIVER: return driver != null; case _1Package.PORT_WIRE_TYPE__CONSTRAINT_SETS: return constraintSets != null; case _1Package.PORT_WIRE_TYPE__ALL_LOGICAL_DIRECTIONS_ALLOWED: return isSetAllLogicalDirectionsAllowed(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (direction: "); if (directionESet) result.append(direction); else result.append("<unset>"); result.append(", allLogicalDirectionsAllowed: "); if (allLogicalDirectionsAllowedESet) result.append(allLogicalDirectionsAllowed); else result.append("<unset>"); result.append(')'); return result.toString(); } } //PortWireTypeImpl
afaf2479161a9e8662689dd8ffd76d722c229e16
d3244773f4ac9a90dfe5778869f07763e147a216
/mecasoft/src/banco/modelo/Cep.java
dd595a9485a79b9ef49cb75383415c67ef12dc2b
[]
no_license
cristianoprause/Mecasoft
e48b70cd4daa39b012a70004aef544a969fe7a30
e62c2838f49bdd81358b90a653a764adbc3f9daa
refs/heads/master
2021-01-22T13:58:04.638012
2013-10-16T22:26:47
2013-10-16T22:26:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,463
java
package banco.modelo; import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("webservicecep") public class Cep { @XStreamAlias("uf") private String uf; @XStreamAlias("cidade") private String cidade; @XStreamAlias("bairro") private String bairro; @XStreamAlias("tipo_logradouro") private String tipo_logradouro; @XStreamAlias("logradouro") private String logradouro; @XStreamAlias("resultado") private String resultado; @XStreamAlias("resultado_txt") private String resultado_txt; public String getBairro() { return bairro; } public void setBairro(String bairro) { this.bairro = bairro; } public String getCidade() { return cidade; } public void setCidade(String cidade) { this.cidade = cidade; } public String getLogradouro() { return logradouro; } public void setLogradouro(String logradouro) { this.logradouro = logradouro; } public String getResultado() { return resultado; } public void setResultado(String resultado) { this.resultado = resultado; } public String getResultado_txt() { return resultado_txt; } public void setResultado_txt(String resultado_txt) { this.resultado_txt = resultado_txt; } public String getTipo_logradouro() { return tipo_logradouro; } public void setTipo_logradouro(String tipo_logradouro) { this.tipo_logradouro = tipo_logradouro; } public String getUf() { return uf; } public void setUf(String uf) { this.uf = uf; } }
ebda1adaa73b053626c7f108f9f836a0abfb0c4a
79fcc8b34ded9079087275e53e6156c284eb0f4f
/src/com/selenium/ActionsClassDemo.java
b99a49a53056e6962e9cfcd27a021ac84ea5ad07
[]
no_license
balajibitta/selenium
688f9524d7523e52a97596e2c1462d8f22cc0e8a
479f90d468db44641823680dfb7e5f0a5379e659
refs/heads/master
2020-04-04T02:45:21.319484
2018-11-01T09:55:21
2018-11-01T09:55:21
155,695,452
0
0
null
null
null
null
UTF-8
Java
false
false
1,597
java
package com.selenium; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class ActionsClassDemo { public static void main(String[] args) throws InterruptedException { String cDir = System.getProperty("user.dir"); System.out.println(cDir); System.setProperty("webdriver.chrome.driver", cDir+ "\\chromedriver\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(99, TimeUnit.SECONDS); driver.get("https://www.gmail.com"); Actions actions = new Actions(driver); WebElement useranme = driver.findElement(By.id("identifierId")); actions.sendKeys("[email protected]").build().perform(); WebElement next = driver.findElement(By.id("identifierNext")); actions.click(next).build().perform(); /*WebDriverWait wait = new WebDriverWait(driver, 56); wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.name("password")))).sendKeys("11223344");*/ Thread.sleep(2000); WebElement password = driver.findElement(By.name("password")); actions.sendKeys("11223344").build().perform(); WebElement signIn = driver.findElement(By.id("passwordNext")); actions.click(signIn).build().perform(); } }
ccc752799e6a8db0219378f16647e7f5aef2e785
59e292da993a65f5028554dd5ed478f0adf0dbe5
/config/config-server/test/com/thoughtworks/go/config/serialization/PipelineConfigsTest.java
5431be66dced9adaf15bd7c5a32ac402facda78e
[ "Apache-2.0" ]
permissive
willthames/gocd
e017c14ae642f22e0e195e9c8981571c018fe393
034b713d1c1a657ed63899ff24c2d4f5bdb5d6d7
refs/heads/master
2020-12-25T12:27:43.182428
2014-07-23T16:21:46
2014-07-23T16:21:46
22,195,370
1
0
null
null
null
null
UTF-8
Java
false
false
7,359
java
/*************************GO-LICENSE-START********************************* * Copyright 2014 ThoughtWorks, 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. *************************GO-LICENSE-END***********************************/ package com.thoughtworks.go.config.serialization; import com.thoughtworks.go.config.*; import com.thoughtworks.go.config.MagicalGoConfigXmlWriter; import com.thoughtworks.go.domain.config.Admin; import com.thoughtworks.go.helper.ConfigFileFixture; import com.thoughtworks.go.helper.NoOpMetricsProbeService; import com.thoughtworks.go.helper.PipelineConfigMother; import com.thoughtworks.go.metrics.service.MetricsProbeService; import com.thoughtworks.go.util.ConfigElementImplementationRegistryMother; import com.thoughtworks.go.util.GoConstants; import org.junit.Test; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.junit.Assert.assertThat; import static org.junit.matchers.JUnitMatchers.hasItem; public class PipelineConfigsTest { private MetricsProbeService metricsProbeService = new NoOpMetricsProbeService(); private static final String PIPELINES_WITH_PERMISSION = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<cruise xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + "xsi:noNamespaceSchemaLocation=\"cruise-config.xsd\" schemaVersion=\"" + GoConstants.CONFIG_SCHEMA_VERSION + "\">\n" + " <server artifactsdir=\"other-artifacts\">\n" + " <security>\n" + " <roles>\n" + " <role name=\"admin\" />\n" + " <role name=\"mingle\" />\n" + " </roles>\n" + " </security>\n" + " </server>\n" + " <pipelines group=\"defaultGroup\">\n" + " <authorization>\n" + " %s " + " </authorization>" + " <pipeline name=\"pipeline1\" labeltemplate=\"alpha.${COUNT}\">\n" + " <materials>\n" + " <svn url=\"foobar\" checkexternals=\"true\" />\n" + " </materials>\n" + " <stage name=\"mingle\">\n" + " <jobs>\n" + " <job name=\"functional\">\n" + " <artifacts>\n" + " <artifact src=\"artifact1.xml\" dest=\"cruise-output\" />\n" + " </artifacts>\n" + " </job>\n" + " </jobs>\n" + " </stage>\n" + " </pipeline>\n" + " </pipelines>\n" + "</cruise>\n\n"; private static final String VIEW_PERMISSION = " <view>\n" + " <user>jez</user>\n" + " <user>lqiao</user>\n" + " <role>mingle</role>\n" + " </view>\n"; private static final String OPERATION_PERMISSION = " <operate>\n" + " <user>jez</user>\n" + " <user>lqiao</user>\n" + " <role>mingle</role>\n" + " </operate>\n"; @Test public void shouldWriteOperatePermissionForGroupCorrectly() { OperationConfig operationConfig = new OperationConfig(new AdminUser(new CaseInsensitiveString("jez")), new AdminUser(new CaseInsensitiveString("lqiao")), new AdminRole( new CaseInsensitiveString("mingle"))); Authorization authorization = new Authorization(operationConfig); PipelineConfig pipelineConfig = PipelineConfigMother.pipelineConfig("pipeline1"); PipelineConfigs pipelineConfigs = new PipelineConfigs(authorization, pipelineConfig); MagicalGoConfigXmlWriter xmlWriter = new MagicalGoConfigXmlWriter(new ConfigCache(), ConfigElementImplementationRegistryMother.withNoPlugins(), metricsProbeService); String xml = xmlWriter.toXmlPartial(pipelineConfigs); assertThat(xml, is("<pipelines>\n" + " <authorization>\n" + " <operate>\n" + " <user>jez</user>\n" + " <user>lqiao</user>\n" + " <role>mingle</role>\n" + " </operate>\n" + " </authorization>\n" + " <pipeline name=\"pipeline1\">\n" + " <materials>\n" + " <svn url=\"http://some/svn/url\" dest=\"svnDir\" />\n" + " </materials>\n" + " <stage name=\"mingle\">\n" + " <jobs />\n" + " </stage>\n" + " </pipeline>\n" + "</pipelines>")); } @Test public void shouldLoadOperationPermissionForPipelines() { CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(OPERATION_PERMISSION)); PipelineConfigs group = cruiseConfig.getGroups().first(); assertThat(group.getAuthorization(), instanceOf(Authorization.class)); AdminsConfig actual = group.getAuthorization().getOperationConfig(); assertion(actual); } @Test public void shouldLoadOperationAndViewPermissionForPipelinesNoMatterTheConfigOrder() { CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(OPERATION_PERMISSION + VIEW_PERMISSION)); PipelineConfigs group = cruiseConfig.getGroups().first(); assertThat(group.getAuthorization(), instanceOf(Authorization.class)); AdminsConfig actualView = group.getAuthorization().getViewConfig(); AdminsConfig actualOperation = group.getAuthorization().getOperationConfig(); assertion(actualView); assertion(actualOperation); } @Test public void shouldLoadViewAndOperationPermissionForPipelinesNoMatterTheConfigOrder() { CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(VIEW_PERMISSION + OPERATION_PERMISSION)); PipelineConfigs group = cruiseConfig.getGroups().first(); assertThat(group.getAuthorization(), instanceOf(Authorization.class)); AdminsConfig actualView = group.getAuthorization().getViewConfig(); AdminsConfig actualOperation = group.getAuthorization().getOperationConfig(); assertion(actualView); assertion(actualOperation); } private void assertion(AdminsConfig actualView) { assertThat(actualView, hasItem((Admin) new AdminUser(new CaseInsensitiveString("jez")))); assertThat(actualView, hasItem((Admin) new AdminUser(new CaseInsensitiveString("lqiao")))); assertThat(actualView, hasItem((Admin) new AdminRole(new CaseInsensitiveString("mingle")))); } private String configureAuthorization(String permission) { return String.format(PIPELINES_WITH_PERMISSION, permission); } }
0fb6d326ac21f8de57c7f86eeb591009fda22200
c3f4800a9cac6c1be941e6ee97fee6facd75ee91
/src/test/java/tdd/projektplanung/BlankTest.java
7276d1c46ca13871243292708670349054698854
[]
no_license
SFGrenade/TddProjektplanung
eb85d035a1572aae5702b4cb85a6e7c1316995fb
76831eec3e720cd4c42f42f24ae7da8ff303673c
refs/heads/master
2023-05-06T08:54:54.750748
2021-06-04T08:40:23
2021-06-04T08:40:23
339,980,106
0
0
null
null
null
null
UTF-8
Java
false
false
139
java
package tdd.projektplanung; import org.junit.jupiter.api.Test; public class BlankTest { @Test public void blank() { } }
7958778972eefe949680108e3990a863642fa462
5ee20bac58e7729a36e1870be943f33f70374a2f
/app/src/main/java/com/jet/mvptest/LoginPresenter.java
9af6fb025c18a40ffaf6b6a64bdb8b7849c68998
[]
no_license
zjet888/mvptest
36f99463de1248960b410def8809019be146728d
1c65fe687af0c297caa0bf90074e3142cd144af3
refs/heads/master
2020-08-04T16:28:50.424280
2019-09-14T20:54:55
2019-09-14T20:54:55
212,202,694
0
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
package com.jet.mvptest; public class LoginPresenter implements LoginInteractor.OnLoginFinishedListener { private ILoginView loginView; private LoginInteractor loginInteractor; LoginPresenter(ILoginView loginView, LoginInteractor loginInteractor) { this.loginView = loginView; this.loginInteractor = loginInteractor; } public void validateCredentials(String username, String password) { if (loginView != null) { loginView.showProgress(); } loginInteractor.login(username, password, this); } public void onDestroy() { loginView = null; } @Override public void onUsernameError() { if (loginView != null) { loginView.setUsernameError(); loginView.hideProgress(); } } @Override public void onPasswordError() { if (loginView != null) { loginView.setPasswordError(); loginView.hideProgress(); } } @Override public void onSuccess() { if (loginView != null) { loginView.hideProgress(); loginView.navigateToHome(); } } }
0b8de79abca35c968d4bbe236184d07d0bbf1aa9
69d9ac2a4facea7aa4a2efb02d85731f8c4122c5
/BranchTeam/src/test/java/Branch/ValidateEmployeeDepartmentNames.java
b7e6a8c88b4192b9fcd5193faf4e200f08c234a2
[]
no_license
nmgokhale/BranchAutomation
e0c16ded370d69d5244344bb796ed2ce607794b8
ff583f7244234222033101ef68b5c29870c15b0f
refs/heads/master
2020-03-28T22:18:17.759476
2018-09-18T03:31:33
2018-09-18T03:31:33
149,222,573
0
0
null
null
null
null
UTF-8
Java
false
false
7,699
java
package Branch; import java.io.IOException; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import pageObjects.BranchHomePage; import pageObjects.BranchTeamPage; import pageObjects.GooglePage; import pageObjects.GoogleSearchPage; import resources.Base; // Verify that employee departments are listed correctly between All tab and Department tabs. // B) Verify that employee department name written in description is same as actual department name in All tab and Department tabs // Eg. All employees belonging to Engineering department should have Department Name as 'Engineering' and so on public class ValidateEmployeeDepartmentNames extends Base { @BeforeTest public void initialize() throws IOException { driver = initializeDriver(); driver.get(prop.getProperty("url")); GooglePage google = new GooglePage(driver); google.getSearchBox().sendKeys("branch website"); google.getSearchBox().sendKeys(Keys.TAB); google.getSearchBox().sendKeys(Keys.ENTER); GoogleSearchPage search = new GoogleSearchPage(driver); search.getBranchWebsite().click(); BranchHomePage home = new BranchHomePage(driver); WebDriverWait wait = new WebDriverWait(driver, 20); //here, wait time is 20 seconds wait.until(ExpectedConditions.visibilityOf(home.getCookieAcceptButton())); home.getCookieAcceptButton().click(); home.getTeamPage().click(); } @Test public void validateDataDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getData().click(); // Get the department name of Data department and capitalize first letter only String name = team.getData().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Data Tab List<WebElement> data_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<data_departments.size(); i++) { // Check if department names match with 'Data' Assert.assertEquals(data_departments.get(i).getText(), departmentName); } } @Test public void validateEngineeringDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getEngineering().click(); // Get the department name of Engineering department and capitalize first letter only String name = team.getEngineering().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Engineering Tab List<WebElement> engineering_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<engineering_departments.size(); i++) { // Check if department names match with 'Engineering' Assert.assertEquals(engineering_departments.get(i).getText(), departmentName); } } @Test public void validateMarketingDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getMarketing().click(); // Get the department name of Marketing department and capitalize first letter only String name = team.getMarketing().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Marketing Tab List<WebElement> marketing_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<marketing_departments.size(); i++) { // Check if department names match with 'Marketing' Assert.assertEquals(marketing_departments.get(i).getText(), departmentName); } } @Test public void validateOperationsDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getOperations().click(); // Get the department name of Operations department and capitalize first letter only String name = team.getOperations().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Operations Tab List<WebElement> operations_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<operations_departments.size(); i++) { // Check if department names match with 'Operations' Assert.assertEquals(operations_departments.get(i).getText(), departmentName); } } @Test public void validatePartnerGrowthDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getPartnerGrowth().click(); // Get the department name of Partner Growth department and capitalize first letter only String name = team.getPartnerGrowth().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1,8).toLowerCase()+name.substring(8,9).toUpperCase()+name.substring(9).toLowerCase(); // Get the department names of all employees in Partner Growth Tab List<WebElement> partnerGrowth_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<partnerGrowth_departments.size(); i++) { // Check if department names match with 'Partner Growth' Assert.assertEquals(partnerGrowth_departments.get(i).getText(), departmentName); } } @Test public void validateProductDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getProduct().click(); // Get the department name of Product department and capitalize first letter only String name = team.getProduct().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Product Tab List<WebElement> product_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<product_departments.size(); i++) { // Check if department names match with 'Product' Assert.assertEquals(product_departments.get(i).getText(), departmentName); } } @Test public void validateRecruitingDepartmentNames() throws IOException { BranchTeamPage team = new BranchTeamPage(driver); team.getRecruiting().click(); // Get the department name of Recruiting department and capitalize first letter only String name = team.getRecruiting().getText(); String departmentName = name.substring(0, 1).toUpperCase()+name.substring(1).toLowerCase(); // Get the department names of all employees in Recruiting Tab List<WebElement> recruiting_departments = driver.findElements(By.xpath("//div[@style='display: inline-block;']//div[@class='info-block']/h4")); for(int i=0; i<recruiting_departments.size(); i++) { // Check if department names match with 'Recruiting' Assert.assertEquals(recruiting_departments.get(i).getText(), departmentName); } } @AfterTest public void teardown() { driver.close(); driver=null; } }
b93d5b28ac319203c487df784484cd7ec507528f
c3b9e8a204acdba39ddf3db152c12539bf933a38
/gen/eugen/mymusic/BuildConfig.java
e1e1868476beaf2aa15ab40757da323a7ee86530
[]
no_license
Eugen009/MyMusic
3fcd1bb76bd3c7d1e58200022905b734fa964e8c
8faf3e99953c459c4b63d21e4fa82083f6fa517a
refs/heads/master
2021-01-16T17:45:51.083834
2014-08-17T18:40:43
2014-08-17T18:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
155
java
/** Automatically generated file. DO NOT MODIFY */ package eugen.mymusic; public final class BuildConfig { public final static boolean DEBUG = true; }
5759328ad73a1d29c1d7f3656cee988f2a21458b
c2df766fa8aa78e5286f35252d5004c736fd0981
/src/main/java/牛客/中等/HJ67_2.java
748a7c487ae4db91295529707308318691deae10
[]
no_license
jiatianyao/leetcode
ba8804d5947ca62255557a91d47d5a1bc359a454
7c586a50db943fcac0801b9d8c500cd2fc3be5a5
refs/heads/master
2023-06-29T16:11:05.246916
2021-08-02T15:22:53
2021-08-02T15:22:53
377,647,595
1
0
null
null
null
null
UTF-8
Java
false
false
2,982
java
package 牛客.中等; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; /** * HJ67 24点游戏算法 * * 题目描述 * 问题描述:给出4个1-10的数字,通过加减乘除,得到数字为24就算胜利 * 输入: * 4个1-10的数字。[数字允许重复,但每个数字仅允许使用一次,测试用例保证无异常数字。 * 输出: * true or false * 本题含有多组样例输入。 * 输入描述: * 输入4个int整数 * * 输出描述: * 返回能否得到24点,能输出true,不能输出false * 示例1 * 输入 * 7 2 1 10 * 输出 * true */ public class HJ67_2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { // 初始化数字数组和标志数组 int[] nums = new int[4]; int[] signs = new int[4]; for (int i = 0; i < nums.length; i++) { nums[i] = scanner.nextInt(); } boolean can = false; // 是否能得到24 for (int i = 0; i < nums.length; i++) { signs[i] = 1; if (dfs(nums, signs, nums[i], 24)) { can = true; break; } signs[i] = 0; } System.out.println(can);// 输出结果 } } /** * 深度优先算法逻辑 * * @param nums 输入的4个数字 * @param signs 访问标志数组 * @param v 顶点的值 * @param required 需要通过四则运算得到的数字 * @return */ private static boolean dfs(int[] nums, int[] signs, int v, int required) { boolean allVisited = true;// 四个角均被访问 for (int sign : signs) { if (sign == 0) { allVisited = false; } } if (allVisited) { return v == required; // 在所有节点均被访问的前提下,判断最后的结果是否为所需要的结果。 } // 访问所有的邻接顶点 for (int i = 0; i < nums.length; i++) { if (signs[i] == 0) { signs[i] = 1; if (dfs(nums, signs, v + nums[i], required) // 加法 || dfs(nums, signs, v - nums[i], required) // 减法 || dfs(nums, signs, v * nums[i], required) // 乘法 || nums[i] != 0 && v % nums[i] == 0 && dfs(nums, signs, v / nums[i], required)/* 除法 */) { return true;// 如果可以通过四则运算得到需要的结果,则返回true。 } System.out.println(i); signs[i] = 0; // 如果不能通过四则运算得到,则进行回溯。 } } return false;//当所有情况均得不到需要的结果,返回false。 } }
ee58b207d50586c549e8e2eb9114fc5d6736f6b5
43aa94eb2cca45550bd7cfa0066c84c61dd9e20d
/ServletJSP/DeptEmp/src/net/antra/deptemp/utility/UserUtility.java
27128878e72f8d76edf1d4a7e6f3dfd3cda2bbd8
[]
no_license
owenxbw/SpringHibernateProj
00c62edbe97c61ca00135b117c723a45688ab11d
2ad25b8af06e41e1b73ea3fe6322f9e827e855ec
refs/heads/master
2021-05-15T04:04:02.416639
2018-02-14T21:00:09
2018-02-14T21:00:09
119,705,489
0
0
null
null
null
null
UTF-8
Java
false
false
264
java
package net.antra.deptemp.utility; import javax.servlet.http.HttpServletRequest; public class UserUtility { public static boolean validateUser(String name, String pwd, HttpServletRequest req) { return "David".equalsIgnoreCase(name) && "1".equals(pwd); } }
7eab5ae3a263bc8d68e6ff72cdfc8e9559f7488d
b459860464f7cce806dbcd973f37b41b4dd70c4f
/app/src/main/java/com/uteq/appmoviles/googlemapspractice/Models/Country/CountryOne.java
ce3f18d3a3d9429fbaea2ff1c8aadae9f104f969
[]
no_license
JoseSolorzanoC/GoogleMapsPractice
54173706dd3ac1e0e67c095357bfeb5781d28c2e
a67c3660eb2c7595d0c5fcf918be20addb97cb47
refs/heads/master
2023-07-08T12:36:53.129879
2021-08-20T04:25:03
2021-08-20T04:25:03
398,097,167
0
0
null
null
null
null
UTF-8
Java
false
false
2,844
java
package com.uteq.appmoviles.googlemapspractice.Models.Country; import java.util.Arrays; public class CountryOne { private String Name; private CountryCapital Capital; private CountryGeoRectangle GeoRectangle; private int SeqID; private String[] GeoPt; private String TelPref; private CountryCodes CountryCodes; private String CountryInfo; public CountryOne(String name, CountryCapital capital, CountryGeoRectangle geoRectangle, int seqID, String[] geoPt, String telPref, com.uteq.appmoviles.googlemapspractice.Models.Country.CountryCodes countryCodes, String countryInfo) { Name = name; Capital = capital; GeoRectangle = geoRectangle; SeqID = seqID; GeoPt = geoPt; TelPref = telPref; CountryCodes = countryCodes; CountryInfo = countryInfo; } public String getName() { return Name; } public void setName(String name) { Name = name; } public CountryCapital getCapital() { return Capital; } public void setCapital(CountryCapital capital) { Capital = capital; } public CountryGeoRectangle getGeoRectangle() { return GeoRectangle; } public void setGeoRectangle(CountryGeoRectangle geoRectangle) { GeoRectangle = geoRectangle; } public int getSeqID() { return SeqID; } public void setSeqID(int seqID) { SeqID = seqID; } public String[] getGeoPt() { return GeoPt; } public void setGeoPt(String[] geoPt) { GeoPt = geoPt; } public String getTelPref() { return TelPref; } public void setTelPref(String telPref) { TelPref = telPref; } public com.uteq.appmoviles.googlemapspractice.Models.Country.CountryCodes getCountryCodes() { return CountryCodes; } public void setCountryCodes(com.uteq.appmoviles.googlemapspractice.Models.Country.CountryCodes countryCodes) { CountryCodes = countryCodes; } public String getCountryInfo() { return CountryInfo; } public void setCountryInfo(String countryInfo) { CountryInfo = countryInfo; } @Override public String toString() { return "Info{" + "\n" + "Name='" + Name + "," + '\'' + "\n" + "Capital=" + Capital.toString() + "," + '\'' + "\n" + "GeoRectangle=" + GeoRectangle.toString() + "," + '\'' + "\n" + "SeqID=" + SeqID + "," + '\'' + "\n" + "GeoPt=" + Arrays.toString(GeoPt) + "," + '\'' + "\n" + "TelPref='" + TelPref + "," + '\'' + "\n" + "CountryCodes=" + CountryCodes.toString() + "," + '\'' + "\n" + "CountryInfo='" + CountryInfo + '\'' + "\n" + '}' + "\n"; } }
0f2680cf2f5233713fbcd092acc2296d8864593d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_6234952185dabbf9fc340ec5813fbb79428dd753/ConventConfigurationManager/19_6234952185dabbf9fc340ec5813fbb79428dd753_ConventConfigurationManager_s.java
2149ce779e32dae7304f8766f3197ab9392f9a68
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,776
java
/* * Copyright (c) 2013. ToppleTheNun * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of * the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.conventnunnery.libraries.config; import org.bukkit.plugin.Plugin; import java.io.File; public class ConventConfigurationManager { private final Plugin plugin; /** * Instantiates a new version of the configuration manager for a plugin * * @param plugin Plugin that is using the manager */ public ConventConfigurationManager(Plugin plugin) { this.plugin = plugin; } public ConventConfiguration loadConventConfiguration(File file) throws IllegalArgumentException { if (file == null) { throw new IllegalArgumentException("File cannot be null"); } ConventConfiguration c = null; if (file.getName().endsWith(".yml")) { c = new ConventYamlConfiguration(plugin, file); } return c; } public ConventConfigurationGroup loadConventConfigurationGroup(File directory) throws IllegalArgumentException { if (directory == null) { throw new IllegalArgumentException(directory.getPath() + " cannot be null"); } if (!directory.exists() && directory.getName().endsWith("/")) { directory.mkdirs(); } if (!directory.isDirectory()) { throw new IllegalArgumentException(directory.getPath() + " must be a directory"); } if (!directory.exists() && !directory.getParentFile().mkdirs()) { throw new IllegalArgumentException(directory.getPath() + " does not exist and cannot be made"); } ConventConfigurationGroup ccg = new ConventConfigurationGroup(); for (File file : directory.listFiles()) { if (file.getName().endsWith(".yml")) { ccg.addConventConfiguration(new ConventYamlConfiguration(plugin, file)); } } return ccg; } }
63ea948d5acbd4061493da6bb0f0bc656ecec5cc
3e740a40ecb3d6b4131946176eade2c6f194d3f8
/src/main/java/com/zhoujian/service/IRoleService.java
0d280a725c069a0058858c4734c9f448e804c916
[]
no_license
zhoujain/authoritySystem
8a009b7a977c6050b9328d0d6b125d11fa5a3167
c42de6502cf09a39b8d1d8e65575d7a042775ada
refs/heads/master
2020-07-03T22:30:17.973473
2019-08-29T05:00:39
2019-08-29T05:00:39
202,072,920
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package com.zhoujian.service; import com.zhoujian.domain.Permission; import com.zhoujian.domain.Role; import java.util.List; public interface IRoleService { Role findById(String id) throws Exception; List<Role> findAll(); void save(Role role) throws Exception; List<Permission> findOtherPermission(String id) throws Exception; void addPermissionToRole(String roleId, String[] permissions); }
1250d0129e287f2f1050a873f2954443ea3a7492
3c085723f1732ceb0c2addb47aa4bfaa863d2bc8
/org.t2.domainmodel/xtend-gen/org/example/domainmodel/validation/DomainmodelValidator.java
8421a2a032abc3887b931379870b4b87461e6b7a
[]
no_license
Zanfroni/LingProgT2
76f794d0d9ed459020fb175b2dcda9b2e7007616
aaf0e5cf1a349a6441fa08a6ee2ee8776f4ad37d
refs/heads/master
2020-03-27T16:58:40.676254
2018-09-25T18:06:47
2018-09-25T18:06:47
146,820,744
1
0
null
null
null
null
UTF-8
Java
false
false
403
java
/** * generated by Xtext 2.12.0 */ package org.example.domainmodel.validation; import org.example.domainmodel.validation.AbstractDomainmodelValidator; /** * This class contains custom validation rules. * * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation */ @SuppressWarnings("all") public class DomainmodelValidator extends AbstractDomainmodelValidator { }
1c687bb592360423b04b65fec070f3d88e1fafba
552488975f51d5d6c63c41ff7af17620bfbdab4c
/DevopsTraining/src/main/java/maven/DevopsTraining/MyResource.java
d0604bf401e8c45fea6edb9b114ee1dfecd7fd9a
[]
no_license
rosalinesophia/JenkinsTraining
5fc6bcf99b9bb111d1011b13b25063cb296877dd
ec3c2fce94b64c797e74c892dea5aa6cd297f48e
refs/heads/master
2022-01-18T05:35:36.210960
2019-07-23T09:22:19
2019-07-23T09:22:19
198,211,481
0
0
null
null
null
null
UTF-8
Java
false
false
572
java
package maven.DevopsTraining; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; /** * Root resource (exposed at "myresource" path) */ @Path("myresource") public class MyResource { /** * Method handling HTTP GET requests. The returned object will be sent * to the client as "text/plain" media type. * * @return String that will be returned as a text/plain response. */ @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() { return "Got it!"; } }
82717317879791599003892cf46af54ed059dc10
8ff73d7356a35bbe39245c63e780a491b80862a4
/src/main/java/ru/netology/service/PostService.java
eaf70a30eb56a7ae05a78edc5ac92d2d1ed85b84
[]
no_license
zzaharovs/mvcREST
18f110c6e13e3da9a559d8fa98ad6fac245cce72
47e5778d72d270aad34f7a980e2ac045c0f5926d
refs/heads/master
2023-08-20T01:11:12.054407
2021-10-11T18:38:52
2021-10-11T18:38:52
416,053,621
1
0
null
null
null
null
UTF-8
Java
false
false
795
java
package ru.netology.service; import org.springframework.stereotype.Service; import ru.netology.exception.NotFoundException; import ru.netology.model.Post; import ru.netology.repository.PostRepository; import java.util.List; @Service public class PostService { private final PostRepository repository; public PostService(PostRepository repository) { this.repository = repository; } public List<Post> all() { return repository.all(); } public Post getById(long id) { return repository.getById(id).orElseThrow(() -> new NotFoundException("Post with specified id not found")); } public Post save(Post post) { return repository.save(post); } public void removeById(long id) { repository.removeById(id); } }
e570518664b0e4a8d57e05c5605ee494a2e1628a
06f8424d8d515b5dbf4b75eebfbed8d8b474d881
/gmall-sms/src/main/java/com/atguigu/gmall/sms/mapper/SeckillSkuMapper.java
79b965b70b2d6c6baa9c64735209bbc562ecd749
[ "Apache-2.0" ]
permissive
Cerosg/gmall
03bee1c2f53d941c45fbb83e5b4c7de0c8e308f1
16cbc49ea4e4123b8eae1a92e6622575828f3e46
refs/heads/master
2022-12-14T15:40:23.757565
2020-09-12T03:06:30
2020-09-12T03:06:30
280,999,929
0
0
Apache-2.0
2020-07-20T05:00:23
2020-07-20T03:07:04
JavaScript
UTF-8
Java
false
false
396
java
package com.atguigu.gmall.sms.mapper; import com.atguigu.gmall.sms.entity.SeckillSkuEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 秒杀活动商品关联 * * @author Cerosg * @email [email protected] * @date 2020-07-20 20:51:21 */ @Mapper public interface SeckillSkuMapper extends BaseMapper<SeckillSkuEntity> { }
92694c7526046b9959bf72cbcfbca0a18ec65c08
06f30048d9f0df8aa1a1885ece2c0cfa612133e2
/mongodb_restapi/src/main/java/com/example/demo/repository/PersonRepository.java
1212f954bd90601b0a7827399698eecf4afe3211
[]
no_license
cpshim/RestAPI
3a0c9bb889d24fb286b3a5039c58b7838c532deb
3fd590e6eb4e633016451e9c7bfeeb448590a7e1
refs/heads/master
2020-12-15T01:34:21.668989
2020-01-19T18:37:57
2020-01-19T18:37:57
234,946,414
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.example.demo.repository; import com.example.demo.model.Person; import java.util.List; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; /** * * @author Chris */ @Repository public interface PersonRepository extends MongoRepository<Person, String>{ public Person getByFirstName(String firstName); public List<Person>findByAge(int age); }
b190e7800195a584717935d23be72f9c70adcf5b
acb2757b607d7116ca6f8df0cacf95ec0c0d96ce
/Yamba/src/main/java/com/jkereako/yamba/UpdaterService.java
2a1e68b6c37ef2a53577d53f08c0094954365b99
[ "MIT" ]
permissive
jkereako/Yamba
0b6bcbdf014890b819646bcf1a0a9e71cbb6f4e3
0241e9a23600ddea7471747aed84504fa8a9a555
refs/heads/master
2021-01-10T09:49:29.364124
2016-03-22T16:53:58
2016-03-22T16:53:58
54,436,996
0
0
null
null
null
null
UTF-8
Java
false
false
2,381
java
package com.jkereako.yamba; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.util.Log; /** * Created by jkereakoglow on 8/9/13. */ public class UpdaterService extends Service { private static final String TAG = "UpaterService"; private static final int DELAY = 30; private boolean threadIsRunning = false; @Override public void onCreate() { super.onCreate(); Log.d(TAG, "onCreate() executed"); } @Override public int onStartCommand(Intent intent, int flags, int startId) { final int delay = Integer.parseInt(((YambaApplication) getApplication()).preferences.getString("refresh_interval", "30")); threadIsRunning = true; // Why not subclass AsyncTask? Because we don't need to synchronize the background thread // with the main (UI) thread. Android services do not use UI updates, hence, there is no // need to use AsyncTask. // // A service does not have access to the UI except for a Toast. // This is an Anonymous inner class new Thread() { public void run() { // We wrap this in a try/catch block in case the thread fails for whatever reason. // we want to report this error back to the user. try { // The boolean threadIsRunning is a way to control the this loop, which is in // a background thread, from the main thread. If we didn't have this boolean, // then the background thread would run perpetually, even when we're not using // it. while (threadIsRunning) { ((YambaApplication) getApplication()).pullAndInsert(); Thread.sleep(delay * 1000); } } catch (InterruptedException e) { Log.d(TAG, "Updater interrupted."); } } }.start(); Log.d(TAG, "onStartCommand() executed"); return super.onStartCommand(intent, flags, startId); } @Override public void onDestroy() { threadIsRunning = false; Log.d(TAG, "onDestroy() executed"); super.onDestroy(); } @Override public IBinder onBind(Intent intent) { return null; } }
9706257867ea383aaeedd57e384c55cf1120bb77
405ee2968512d22b15616943504ae40314527136
/src/main/java/com/example/demo/HomeController.java
169d5f796f68b405ec3e39b574d483530ceae6a4
[]
no_license
jcblefler/exercise102
61bf049a9adcd242fab91cdc9cfbcf41f8f78914
7dd20b1dfa1989e1acf54f0a36d890873332b2d0
refs/heads/master
2020-04-28T07:00:49.775800
2019-03-11T20:28:01
2019-03-11T20:28:01
175,077,904
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
package com.example.demo; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HomeController { @RequestMapping("/") public String homePage(Model model){ model.addAttribute("myvarOne", "Say hello to the left."); model.addAttribute("myvarTwo", "Say hello to the right."); return "hometemplate"; } }
58f614b302e8524eeac2210a19b5905e719009db
cffbacf1f9d7906af219793787eb954b50d6d1f4
/HandCopyGWT2/src/java/br/com/i9/aparato/client/AdminHandCopyAccordion.java
f5637836e6bd445cdc46123f1fbfb71c0ec38ea8
[]
no_license
geoleite/HandCopy
538e51504e014a1ac2cdfac7ef7ef48e7da79fe1
2bccc6fa46657a425240931e070968755f6d284c
refs/heads/master
2021-01-12T03:36:19.539034
2017-01-06T20:34:26
2017-01-06T20:34:26
78,234,627
0
0
null
null
null
null
UTF-8
Java
false
false
6,818
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.com.i9.aparato.client; import br.com.easyportal.gwt.client.accordionModel.AMenuHandlerAccordion; import br.com.easyportal.gwt.client.admin.portal.portal.sis_sistema.Sis_sistemaConsultGWT; import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosCadastrados; import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosRequisicoes; import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosRequisicoesPeriodo; import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosSaldo; import br.com.i9.aparato.client.handcopy.handcopy2.req_requisicao.Req_requisicaoConsultGWT; import br.com.i9.aparato.client.handcopy.handcopy2.ser_servico.Ser_servicoConsultGWT; import br.com.i9.aparato.client.handcopy.handcopy2.ser_servico.Ser_servicoConsultSetorGWT; import br.com.i9.aparato.client.handcopy.handcopy2.set_setor.Set_setorConsultGWT; import br.com.i9.aparato.client.handcopy.handcopy2.sol_solicitacao.MinhasSolicitacoesGWT; import br.com.i9.aparato.client.handcopy.handcopy2.sol_solicitacao.Sol_solicitacaoInsertGWT; import br.com.i9.aparato.client.handcopy.handcopy2.vw_col_colaborador.Vw_col_colaboradorConsultGWT; import com.extjs.gxt.ui.client.widget.ContentPanel; import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.TabItem; import com.extjs.gxt.ui.client.widget.Window; import com.extjs.gxt.ui.client.widget.layout.BorderLayout; import com.extjs.gxt.ui.client.widget.layout.FitLayout; import com.google.gwt.user.client.Timer; import java.util.HashMap; /** * * @author geoleite */ public class AdminHandCopyAccordion extends AMenuHandlerAccordion { private HashMap<String, TabItem> itens = new HashMap<String, TabItem>(); public AdminHandCopyAccordion() { setSystem("HANDCOPY"); } @Override public void actionEventMenu(Object me, String acao) { TabItem tabItem = null; tabItem = itens.get(acao); if (tabItem == null) { tabItem = new TabItem(); tabItem.setClosable(true); tabItem.setLayout(new FitLayout()); ContentPanel cp = new ContentPanel(); cp.setFrame(false); cp.setBorders(false); cp.setHeaderVisible(false); cp.setBodyBorder(false); cp.setLayout(new FitLayout()); if ("HANDCOPY.setor".equalsIgnoreCase(acao)) { tabItem.setText("Setores"); cp.add(getSetores()); } else if ("HANDCOPY.Servico".equalsIgnoreCase(acao)) { tabItem.setText("Servicos"); cp.add(getServico()); } else if ("HANDCOPY.AssociarSetorServico".equalsIgnoreCase(acao)) { tabItem.setText("Servicos Setor"); cp.add(getServicoSetor()); } else if ("HANDCOPY.Colaborador".equalsIgnoreCase(acao)) { tabItem.setText("Usuarios"); cp.add(getVW_Colaborador()); } else if ("HANDCOPY.Subordinados".equalsIgnoreCase(acao)) { tabItem.setText("Usuarios"); cp.add(getVW_Colaborador()); } else if ("HANDCOPY.MinhasSolicitacoes".equalsIgnoreCase(acao)) { tabItem.setText("Solicitacoes"); cp.add(getMinhasSolicitacoes()); } else if ("HANDCOPY.Requisicoes".equalsIgnoreCase(acao)) { tabItem.setText("Requisicoes"); cp.add(getRequisicoes()); } else if ("HANDCOPY.UsuCadRel".equalsIgnoreCase(acao)) { //tabItem.setText("Usuarios Cadastrados"); //cp.add(getMinhasSolicitacoes()); relUsuariosCadastrados(); return; } else if ("HANDCOPY.UsuReqPeriodoRel".equalsIgnoreCase(acao)) { //tabItem.setText("Usuarios Cadastrados"); //cp.add(getMinhasSolicitacoes()); relUsuariosRequisicoesPeriodo(); return; } else if ("HANDCOPY.UsuRequisicoesRel".equalsIgnoreCase(acao)) { //tabItem.setText("Usuarios Cadastrados"); //cp.add(getMinhasSolicitacoes()); relUsuariosRequisicoes(); return; } else if ("HANDCOPY.UsuSaldoRel".equalsIgnoreCase(acao)) { //tabItem.setText("Usuarios Cadastrados"); //cp.add(getMinhasSolicitacoes()); relUsuariosSaldo(); return; } else if ("HANDCOPY.NovaSolicitacao".equalsIgnoreCase(acao)) { Sol_solicitacaoInsertGWT sol_solicitacaoInsertGWT = new Sol_solicitacaoInsertGWT(); sol_solicitacaoInsertGWT.setVisible(true); return; } else { MessageBox.alert("Opcão ainda não implementada", "Em breve esta opção estará disponível!", null); } if (cp != null) { tabItem.add(cp); //Adiciona o tabitem se não existir no tabPanel getPortalAccordionGWT().getTabPanel().add(tabItem); itens.put(acao, tabItem); } } else { TabItem tabTemp = getPortalAccordionGWT().getTabPanel().getItemByItemId(acao); if (tabTemp == null) { getPortalAccordionGWT().getTabPanel().add(tabItem); } } getPortalAccordionGWT().getTabPanel().setSelection(tabItem); //getPortalAccordionGWT().setHeight(com.google.gwt.user.client.Window.getClientHeight()-60); getPortalAccordionGWT().layout(); } private void relUsuariosCadastrados() { Rel_UsuariosCadastrados rel = new Rel_UsuariosCadastrados(); rel.setVisible(true); } private void relUsuariosSaldo() { Rel_UsuariosSaldo rel = new Rel_UsuariosSaldo(); rel.setVisible(true); } private void relUsuariosRequisicoes() { Rel_UsuariosRequisicoes rel = new Rel_UsuariosRequisicoes(); rel.setVisible(true); } private void relUsuariosRequisicoesPeriodo() { new Rel_UsuariosRequisicoesPeriodo(); } private ContentPanel getServicoSetor() { return new Ser_servicoConsultSetorGWT(); } private ContentPanel getRequisicoes() { return new Req_requisicaoConsultGWT(); } private ContentPanel getMinhasSolicitacoes() { return new MinhasSolicitacoesGWT(); } private ContentPanel getSetores() { return new Set_setorConsultGWT(); } private ContentPanel getServico() { return new Ser_servicoConsultGWT(); } private ContentPanel getVW_Colaborador() { return new Vw_col_colaboradorConsultGWT(); } }
1b466ff14500fe6de404cf7ac890caa92103f71d
c16a75eb15f43762bb8b321f61bcc71169ab82f0
/src/main/java/edu/seu/gong/serviceImpl/WarehouseBookServiceImpl.java
09da9b8b43a20ef64b6d98e673efe72f84b820f7
[]
no_license
gonghuan/worksApplication
f3b61cc4434b9686f44bb6b7a31a33a8d3fa97b7
08c90c8e04c98282e9b366311f3302982bd24242
refs/heads/master
2021-01-22T17:29:34.197626
2017-07-08T03:06:04
2017-07-08T03:06:04
85,022,301
0
0
null
null
null
null
UTF-8
Java
false
false
1,079
java
package edu.seu.gong.serviceImpl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import edu.seu.gong.mapper.WarehouseBookMapper; import edu.seu.gong.model.WarehouseBook; import edu.seu.gong.model.applicationfromstores; import edu.seu.gong.service.WarehouseBookService; @Service public class WarehouseBookServiceImpl implements WarehouseBookService { @Autowired private WarehouseBookMapper warehouseBookMapper; @Override public List<WarehouseBook> listAllWarning() { // TODO Auto-generated method stub return warehouseBookMapper.selectAllWarehouseBookWarn(); } @Override public List<applicationfromstores> listAllPickupApplication() { // TODO Auto-generated method stub return warehouseBookMapper.selectAllPickupApplication(); } @Override public int updateApplicationFromstores(String id, String transport, double transportPrice) { // TODO Auto-generated method stub return warehouseBookMapper.updateApplicationFromstores(id, transport, transportPrice); } }
e2842465900dfcec33eecfdc101effbbeb104b38
ad1e586f762f094dcbe01c02f504d5d285eb8b4a
/Best Time to Buy and Sell Stock III/src/Solution.java
a5345847a82f0a5c928c4bc6e22ddbe2aae46347
[]
no_license
tanpf5/LeetCode
d30877220952e9b70b793269312896e5baaae2cb
7bfa7d9d55fb2f4d682cd7a7c7b750a844d42938
refs/heads/master
2021-01-24T14:46:31.750492
2016-11-04T19:45:16
2016-11-04T19:45:16
26,680,199
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
public class Solution { public static int maxProfit(int[] prices) { if (prices == null || prices.length < 2) return 0; int n = prices.length; int[][] p = new int[n][n]; int[] a = new int[n]; for (int j = 0; j < n - 1; j++) { int min = prices[j]; for (int i = j + 1; i < n; i++) { if (prices[i] < min) { min = prices[i]; continue; } p[j][i] = Math.max(p[j][i - 1], prices[i] - min); } } for (int i = 1; i < n; i++) { a[i] = p[0][i]; for (int j = 1; j < i; j++) { a[i] = Math.max(a[i], p[0][j] + p[j + 1][i]); } } return a[n - 1]; } public static void main(String[] args) { // TODO Auto-generated method stub int[] a = {2,4,1,4,1,5,3,7,8,7,1,3}; System.out.println(Solution.maxProfit(a)); } }
aeaa3710813207be57ea0794ea55c0f1859aca2a
16473ec7c83093a35646dce56ce67fd518601611
/vanillabench-master/src/main/java/org/vanilladb/bench/rte/TxParamGenerator.java
a0566bd388f754b6a95aa255355005c6602859e5
[ "Apache-2.0" ]
permissive
416014530/CloudDB_final
6b0b252a0fccbba9062c1bfa6606e66f59ca5d05
8c8a38bb6eb15045fcd6a6df0918471127c71276
refs/heads/master
2020-09-21T07:21:05.513115
2017-06-18T16:25:44
2017-06-18T16:25:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
package org.vanilladb.bench.rte; import org.vanilladb.bench.TransactionType; public interface TxParamGenerator { TransactionType getTxnType(); Object[] generateParameter(); }
ff0d0f5509e60ef7c8aa77ee0566de023178fff8
a9ebdc9ced3bff8e8ce77f886c85e21425261ca0
/ParkYourCar/app/src/main/java/ch/fhnw/parking/parkyourcar/GifImageView.java
ad57fd9282431dcb3559e5664b2a7951ba4d9370
[]
no_license
stuckime/workshop_mobileApp
204681a8c00fd23ab7354e35027b3d2fe542d2b7
38a6aab54d456ce250ced88c524fcbb7201b01bf
refs/heads/master
2021-01-20T01:13:51.679600
2017-06-12T14:22:05
2017-06-12T14:22:05
89,242,593
0
0
null
null
null
null
UTF-8
Java
false
false
2,461
java
package ch.fhnw.parking.parkyourcar; import android.view.View; import android.content.Context; import android.graphics.Canvas; import android.graphics.Movie; import android.net.Uri; import android.os.SystemClock; import android.util.AttributeSet; import android.util.Log; import android.view.View; import java.io.FileNotFoundException; import java.io.InputStream; //from http://www.mavengang.com/2016/05/02/gif-animation-android/ public class GifImageView extends View { private InputStream mInputStream; private Movie mMovie; private int mWidth, mHeight; private long mStart; private Context mContext; public GifImageView(Context context) { super(context); this.mContext = context; } public GifImageView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public GifImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); this.mContext = context; if (attrs.getAttributeName(1).equals("background")) { int id = Integer.parseInt(attrs.getAttributeValue(1).substring(1)); setGifImageResource(id); } } private void init() { setFocusable(true); mMovie = Movie.decodeStream(mInputStream); mWidth = mMovie.width(); mHeight = mMovie.height(); requestLayout(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(mWidth, mHeight); } @Override protected void onDraw(Canvas canvas) { long now = SystemClock.uptimeMillis(); if (mStart == 0) { mStart = now; } if (mMovie != null) { int duration = mMovie.duration(); if (duration == 0) { duration = 1000; } int relTime = (int) ((now - mStart) % duration); mMovie.setTime(relTime); mMovie.draw(canvas, 0, 0); invalidate(); } } public void setGifImageResource(int id) { mInputStream = mContext.getResources().openRawResource(id); init(); } public void setGifImageUri(Uri uri) { try { mInputStream = mContext.getContentResolver().openInputStream(uri); init(); } catch (FileNotFoundException e) { Log.e("GIfImageView", "File not found"); } } }
f28a52c92d8231e7ca6a51313f1f112fb4e217f5
a88d5037c0d2de48207c7586fa68047e6fc14fbd
/WeiboSpider/src/com/swust/queue/URLQueue.java
121788dcd58e3eb6c2f2175806aae6c574940620
[]
no_license
pangjuntaoer/sinaWeiboSpider
5b1e151efd4fb2a10095243962692ef1ab858e9b
15c1a19a2d083267f0f3878002dc7ef6947747c0
refs/heads/master
2021-01-02T09:33:11.507170
2014-10-08T06:50:35
2014-10-08T06:50:35
23,389,009
3
4
null
null
null
null
UTF-8
Java
false
false
565
java
package com.swust.queue; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; public class URLQueue<E> { private BlockingQueue<E> urlQueue; public URLQueue(){ urlQueue = new LinkedBlockingQueue<E>(); } public URLQueue(int capacity){ urlQueue = new LinkedBlockingQueue<E>(capacity); } public E getOneURL() throws InterruptedException{ return urlQueue.take(); } public void putOneURL(E e) throws InterruptedException{ urlQueue.put(e); } public void putManyURL(List<E> es){ urlQueue.addAll(es); } }
a32b18650ad60eda1c0525235635d774584616a7
bd556e9a5f84eca9a859ccd32c7fd9db3a148f47
/src/main/java/com/bkhn/master/controller/CompanyProfileController.java
19cf2a6fbccd19e930401e3a393e30d365f74a10
[]
no_license
minhdatplus/fundamental-service
2998f3b6e08cb3b9a52ddd49a99fda87c9dad4a6
c0ec33ca19bff72dfd7158a1f4446d0624f7c84e
refs/heads/master
2023-05-02T13:49:38.438895
2021-05-27T18:25:43
2021-05-27T18:25:43
371,437,464
0
0
null
null
null
null
UTF-8
Java
false
false
6,472
java
package com.bkhn.master.controller; import com.bkhn.master.client.CompanyProfileFeignClient; import com.bkhn.master.model.OperationRequest; import com.bkhn.master.model.request.CompanyProfileRequest; import com.bkhn.master.model.request.LeadershipRequest; import com.bkhn.master.model.request.SimilarIndustryCompanyRequest; import com.bkhn.master.model.request.SubCompanyRequest; import com.bkhn.master.model.request.variable.VariablesCompanyProfileRequest; import com.bkhn.master.model.request.variable.VariablesSimilarRequest; import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; import java.util.Map; @RestController @CrossOrigin(origins = "*") @Slf4j public class CompanyProfileController { private static final Logger LOGGER = LoggerFactory.getLogger(CompanyProfileController.class); @Autowired private CompanyProfileFeignClient profileFeignClient; @CrossOrigin(origins = "*") @PostMapping("companyProfile") public Map<String, Object> companyProfile(@Valid @RequestBody CompanyProfileRequest companyProfileRequest) { LOGGER.info("calling companyProfile"); VariablesCompanyProfileRequest variablesCompanyProfileRequest = new VariablesCompanyProfileRequest(); variablesCompanyProfileRequest.setSymbol(companyProfileRequest.getSymbol()); variablesCompanyProfileRequest.setLanguage("vn"); OperationRequest companyProfile = new OperationRequest(); companyProfile.setOperationName("companyProfile"); companyProfile.setVariables(variablesCompanyProfileRequest); companyProfile.setQuery("query companyProfile($symbol: String!, $language: String) {\n companyProfile(symbol: $symbol, language: $language) {\n symbol\n subsectorcode\n industryname\n supersector\n sector\n subsector\n foundingdate\n chartercapital\n numberofemployee\n banknumberofbranch\n companyprofile\n listingdate\n exchange\n firstprice\n issueshare\n listedvalue\n companyname\n __typename\n }\n companyStatistics(symbol: $symbol) {\n symbol\n ttmtype\n marketcap\n sharesoutstanding\n bv\n beta\n eps\n dilutedeps\n pe\n pb\n dividendyield\n totalrevenue\n profit\n asset\n roe\n roa\n npl\n financialleverage\n __typename\n }\n}\n"); return profileFeignClient.companyProfile(companyProfile); } @CrossOrigin(origins = "*") @PostMapping("subCompany") public Map<String, Object> subCompany(@Valid @RequestBody SubCompanyRequest subCompanyRequest) { LOGGER.info("calling subCompany"); VariablesSimilarRequest variablesSimilarRequest = new VariablesSimilarRequest(); variablesSimilarRequest.setSymbol(subCompanyRequest.getSymbol()); variablesSimilarRequest.setOffset(subCompanyRequest.getOffset()); variablesSimilarRequest.setSize(subCompanyRequest.getSize()); variablesSimilarRequest.setLanguage("vn"); OperationRequest companyProfile = new OperationRequest(); companyProfile.setOperationName("subCompanies"); companyProfile.setVariables(variablesSimilarRequest); companyProfile.setQuery("query subCompanies($symbol: String!, $size: Int, $offset: Int, $language: String) {\n subCompanies(symbol: $symbol, size: $size, offset: $offset, language: $language) {\n datas {\n parentsymbol\n parentcompanyname\n roleid\n childsymbol\n childcompanyname\n chartercapital\n percentage\n rolename\n __typename\n }\n paging {\n pagesize\n currentpage\n totalpage\n totalrow\n __typename\n }\n __typename\n }\n}\n"); return profileFeignClient.companyProfile(companyProfile); } @CrossOrigin(origins = "*") @PostMapping("similarIndustryCompany") public Map<String, Object> similarIndustryCompany(@Valid @RequestBody SimilarIndustryCompanyRequest similarIndustryCompanyRequest) { LOGGER.info("calling similarIndustryCompany"); VariablesSimilarRequest variablesSimilarRequest = new VariablesSimilarRequest(); variablesSimilarRequest.setSymbol(similarIndustryCompanyRequest.getSymbol()); variablesSimilarRequest.setOffset(similarIndustryCompanyRequest.getOffset()); variablesSimilarRequest.setSize(similarIndustryCompanyRequest.getSize()); variablesSimilarRequest.setLanguage("vn"); OperationRequest companyProfile = new OperationRequest(); companyProfile.setOperationName("similarIndustryCompanies"); companyProfile.setVariables(variablesSimilarRequest); companyProfile.setQuery("query similarIndustryCompanies($symbol: String!, $size: Int, $offset: Int, $language: String) {\n similarIndustryCompanies(symbol: $symbol, size: $size, offset: $offset, language: $language)\n}\n"); return profileFeignClient.companyProfile(companyProfile); } @CrossOrigin(origins = "*") @PostMapping("leadership") public Map<String, Object> leadership(@Valid @RequestBody LeadershipRequest leadershipRequest) { LOGGER.info("calling leadership"); VariablesSimilarRequest variablesSimilarRequest = new VariablesSimilarRequest(); variablesSimilarRequest.setSymbol(leadershipRequest.getSymbol()); variablesSimilarRequest.setOffset(leadershipRequest.getOffset()); variablesSimilarRequest.setSize(leadershipRequest.getSize()); variablesSimilarRequest.setLanguage("vn"); OperationRequest companyProfile = new OperationRequest(); companyProfile.setOperationName("leaderships"); companyProfile.setVariables(variablesSimilarRequest); companyProfile.setQuery("query leaderships($symbol: String!, $size: Int, $offset: Int, $order: String, $orderBy: String) {\n leaderships(symbol: $symbol, size: $size, offset: $offset, order: $order, orderBy: $orderBy) {\n datas {\n symbol\n fullname\n positionname\n positionlevel\n __typename\n }\n __typename\n }\n}\n"); return profileFeignClient.companyProfile(companyProfile); } }
23ad3117ec38617c5155063d60d221c3c0ec28a8
aacc70d0cbab7075920923368d98b32dea8a1fd0
/java/warmup-2/stringTimes.java
ccccdfd5b2fefd9128a8895544fb36e61af99f5a
[]
no_license
KolaricK/codingbat
ea2afad3b8a2c6e0121f50022dbe19dfc55f1c35
223584ab38de528a1cfb81eae89d1a7ca08440eb
refs/heads/master
2020-05-02T22:16:03.612800
2019-03-29T09:58:34
2019-03-29T09:58:34
178,246,797
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
/* Given a string and a non-negative int n, return a larger string that is n * copies of the original string. */ public String stringTimes(String str, int n) { String res = ""; for (int i = 0; i < n; i++) { res += str; } return res; }
f5d687f01fac8dcb244da10e4b3c30a1e4fbd6b8
2d415ec03793e424df83fddaceddb638d65b3905
/src/issue/ValuePropagation.java
316b564a6d4bccb4dc133a9414e5316d97b0a949
[]
no_license
fujinjin/data-structures-and-algorithms
13181361bdbd972ddd75547f9ff22ccd8cc2a289
3e73e3f202ccec44681fe624be281dde65694182
refs/heads/master
2021-06-27T06:39:18.579995
2021-05-27T09:31:16
2021-05-27T09:31:16
228,565,458
3
1
null
null
null
null
UTF-8
Java
false
false
1,455
java
package issue; public class ValuePropagation { public static void main(String[] args) { String a = "a"; passString(a); System.out.println(a); User user = new User(); user.setName("xiao"); user.setGender("man"); passObject2(user); System.out.println(user); passObject(user); System.out.println(user); } private static void passObject(User user) { user.setName("guang"); user.setGender("woman"); System.out.println(user); } private static void passObject2(User user) { user = new User(); user.setName("guang"); user.setGender("woman"); System.out.println(user); } private static void passString(String a) { a = "b"; System.out.println(a); } static class User { private String name; private String gender; public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "User{" + "name='" + name + '\'' + ", gender='" + gender + '\'' + '}'; } } }
[ "Fl2011721521j" ]
Fl2011721521j
ec49284b47be1c912a80d3d17b72f32828959b8d
e7d10ce2a60d2f884da0d4bfc8db0a7f1be78b7f
/src/main/java/jenkins/plugins/slack/SlackNotifierBuilder.java
83d5ad62233775920e806a5cfd882cabd622eae1
[]
no_license
sandeepk17/slack-plugin
6dcadb63e7398472efdc6db76e58989b7f5b0315
908fc619fdc8f9857bfc080def8b2ea2b094eaaa
refs/heads/master
2020-07-02T08:31:14.520339
2019-08-09T09:12:52
2019-08-09T09:12:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,714
java
package jenkins.plugins.slack; import jenkins.plugins.slack.matrix.MatrixTriggerMode; public class SlackNotifierBuilder { String baseUrl; String teamDomain; String authToken; String tokenCredentialId; boolean botUser; String room; String sendAs; String iconEmoji; String username; boolean startNotification; boolean notifySuccess; boolean notifyAborted; boolean notifyNotBuilt; boolean notifyUnstable; boolean notifyRegression; boolean notifyFailure; boolean notifyEveryFailure; boolean notifyBackToNormal; boolean notifyRepeatedFailure; boolean includeTestSummary; boolean includeFailedTests; MatrixTriggerMode matrixTriggerMode; CommitInfoChoice commitInfoChoice; boolean includeCustomMessage; String customMessage; String customMessageSuccess; String customMessageAborted; String customMessageNotBuilt; String customMessageUnstable; String customMessageFailure; SlackNotifierBuilder() { } public SlackNotifierBuilder withBaseUrl(String baseUrl) { this.baseUrl = baseUrl; return this; } public SlackNotifierBuilder withTeamDomain(String teamDomain) { this.teamDomain = teamDomain; return this; } public SlackNotifierBuilder withAuthToken(String authToken) { this.authToken = authToken; return this; } public SlackNotifierBuilder withBotUser(boolean botUser) { this.botUser = botUser; return this; } public SlackNotifierBuilder withRoom(String room) { this.room = room; return this; } public SlackNotifierBuilder withSendAs(String sendAs) { this.sendAs = sendAs; return this; } public SlackNotifierBuilder withIconEmoji(String iconEmoji) { this.iconEmoji = iconEmoji; return this; } public SlackNotifierBuilder withUsername(String username) { this.username = username; return this; } public SlackNotifierBuilder withTokenCredentialId(String tokenCredentialId) { this.tokenCredentialId = tokenCredentialId; return this; } public SlackNotifierBuilder withStartNotification(boolean startNotification) { this.startNotification = startNotification; return this; } public SlackNotifierBuilder withNotifyAborted(boolean notifyAborted) { this.notifyAborted = notifyAborted; return this; } public SlackNotifierBuilder withNotifyNotBuilt(boolean notifyNotBuilt) { this.notifyNotBuilt = notifyNotBuilt; return this; } public SlackNotifierBuilder withNotifySuccess(boolean notifySuccess) { this.notifySuccess = notifySuccess; return this; } public SlackNotifierBuilder withNotifyUnstable(boolean notifyUnstable) { this.notifyUnstable = notifyUnstable; return this; } public SlackNotifierBuilder withNotifyRegression(boolean notifyRegression) { this.notifyRegression = notifyRegression; return this; } public SlackNotifierBuilder withNotifyFailure(boolean notifyFailure) { this.notifyFailure = notifyFailure; return this; } public SlackNotifierBuilder withNotifyEveryFailure(boolean notifyEveryFailure) { this.notifyEveryFailure = notifyEveryFailure; return this; } public SlackNotifierBuilder withNotifyBackToNormal(boolean notifyBackToNormal) { this.notifyBackToNormal = notifyBackToNormal; return this; } public SlackNotifierBuilder withNotifyRepeatedFailure(boolean notifyRepeatedFailure) { this.notifyRepeatedFailure = notifyRepeatedFailure; return this; } public SlackNotifierBuilder withIncludeTestSummary(boolean includeTestSummary) { this.includeTestSummary = includeTestSummary; return this; } public SlackNotifierBuilder withIncludeFailedTests(boolean includeFailedTests) { this.includeFailedTests = includeFailedTests; return this; } public SlackNotifierBuilder withMatrixTriggerMode(MatrixTriggerMode matrixTriggerMode) { this.matrixTriggerMode = matrixTriggerMode; return this; } public SlackNotifierBuilder withCommitInfoChoice(CommitInfoChoice commitInfoChoice) { this.commitInfoChoice = commitInfoChoice; return this; } public SlackNotifierBuilder withIncludeCustomMessage(boolean includeCustomMessage) { this.includeCustomMessage = includeCustomMessage; return this; } public SlackNotifierBuilder withCustomMessage(String customMessage) { this.customMessage = customMessage; return this; } public SlackNotifierBuilder withCustomMessageSuccess(String customMessageSuccess) { this.customMessageSuccess = customMessageSuccess; return this; } public SlackNotifierBuilder withCustomMessageAborted(String customMessageAborted) { this.customMessageAborted = customMessageAborted; return this; } public SlackNotifierBuilder withCustomMessageNotBuilt(String customMessageNotBuilt) { this.customMessageNotBuilt = customMessageNotBuilt; return this; } public SlackNotifierBuilder withCustomMessageUnstable(String customMessageUnstable) { this.customMessageUnstable = customMessageUnstable; return this; } public SlackNotifierBuilder withCustomMessageFailure(String customMessageFailure) { this.customMessageFailure = customMessageFailure; return this; } public SlackNotifier build() { return new SlackNotifier(this); } }
317da60c66a8092496bafe0ae2bf76f3b5232ce2
6451c77ce976b7b927b6345e9dd4c586fd15b317
/cgi_kunde2.0_shop/shop/build/hybris/bin/custom/pacoshop/pacoshopfulfilmentprocess/src/com/cgi/pacoshop/fulfilmentprocess/actions/order/OptinSSOAction.java
a2acd4a807379857cf3b5ca2f5209f990ad4ea84
[]
no_license
dixit-anup/maventotalproject
eefae3fbc1de085b3057edd87dcb3605f7e8750b
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
refs/heads/master
2021-01-16T21:57:39.423961
2014-08-21T14:58:18
2014-08-21T14:58:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("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 hybris. * * */ package com.cgi.pacoshop.fulfilmentprocess.actions.order; import com.cgi.pacoshop.fulfilmentprocess.client.ClientStatus; import com.cgi.pacoshop.fulfilmentprocess.service.SSOFulfillmentService; import com.cgi.pacoshop.fulfilmentprocess.util.LogHelper; import de.hybris.platform.orderprocessing.model.OrderProcessModel; import de.hybris.platform.processengine.action.AbstractSimpleDecisionAction; import de.hybris.platform.task.RetryLaterException; import javax.annotation.Resource; import org.apache.log4j.Logger; /** * Action to register a specific customer into the SSO list of "optin". * * @author symmetrics - a CGI Group brand <[email protected]> * @author Phillipe Bergeron <[email protected]> * @author Ivan Vorontsov <[email protected]> * @version 1.0v Mar 04 2014 * @module hybris - pacoshopcore * @link http://www.symmetrics.de/ * @copyright 2014 symmetrics - a CGI Group brand * @see "https://wiki.hybris.com/" */ public class OptinSSOAction extends AbstractSimpleDecisionAction<OrderProcessModel> { private static final Logger LOGGER = Logger.getLogger(OptinSSOAction.class); @Resource private SSOFulfillmentService ssoFulfillmentService; /* * (non-Javadoc) * * @see * de.hybris.platform.processengine.action.AbstractSimpleDecisionAction#executeAction(de.hybris.platform.processengine * .model.BusinessProcessModel) */ @Override public Transition executeAction(final OrderProcessModel orderProcessModel) throws RetryLaterException, Exception { ClientStatus status = ssoFulfillmentService.registerAcceptedTerms(orderProcessModel.getOrder()); Transition result = ClientStatus.SUCCESS == status ? Transition.OK : Transition.NOK; LogHelper.info(LOGGER, result.name()); return result; } }
2041567f3248a57c049d3f172c7d1abe31a114c4
57e8666e223b712c2b7dacba19b631986bafe4e6
/mynews/mynews/src/mynews/Interface_Mynews2.java
e0b762cf5aaf87e22ff0ab74dfb6c1cc225bacdb
[]
no_license
EDDEGHAI/Mynews
cc5e2c83e9a082a866ad0fe719b90c7395d5413a
9db243a64e2d63b7dd897166b4236fcabfa35f37
refs/heads/master
2021-01-22T08:58:55.789885
2013-12-17T16:31:12
2013-12-17T16:31:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
25,599
java
package mynews; import java.awt.Desktop; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JScrollPane; import javax.swing.JTable; import com.mysql.jdbc.Connection; import com.mysql.jdbc.Statement; public class Interface_Mynews2 extends javax.swing.JFrame { /** * */ String Lien[] = new String[5000]; private static final long serialVersionUID = 1L; /** * Creates new form Interface_Mynews */ public Interface_Mynews2() { try { initComponents(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * 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. * @throws SQLException */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() throws SQLException { MouseListener mouseListenerEvents = new MouseAdapter(){ public void mouseClicked(MouseEvent e) { if (e.getClickCount()==1) { // simple click detection JTable target = (JTable)e.getSource(); int row = target.getSelectedRow(); // i just care about rows but i imagine you can get collumns //column = jTable1.getRowSorter().convertRowIndexToModel(column); // sorter is my row sorter. need to map the sort model to the real. if you dont use a row sorter this step is not needed //int index = jTable1.rowAtPoint(e.getPoint()); String url = "jdbc:mysql://localhost/tse?user=root"; //String user = if (target.getSelectedColumn()==0){ try { Connection con = (Connection) DriverManager.getConnection(url); String queryString = "SELECT * FROM journal2"; Statement stm = (Statement) con.createStatement(); ResultSet rs = stm.executeQuery(queryString); int i = 0; while (rs.next()) { Lien[i] = rs.getString("lien"); i++; } URI uri = new URI(Lien[row]); //URL gameIndex = new URL((String)jTable1.getModel().getValueAt(0,column)); Desktop.getDesktop().browse(uri); } catch (MalformedURLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (URISyntaxException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } } }; new javax.swing.JMenuItem(); jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jScrollPane2 = new javax.swing.JScrollPane(); jTable2 = new javax.swing.JTable(); jLabel2 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jCheckBox1 = new javax.swing.JCheckBox(); jCheckBox2 = new javax.swing.JCheckBox(); jCheckBox3 = new javax.swing.JCheckBox(); jCheckBox4 = new javax.swing.JCheckBox(); jCheckBox5 = new javax.swing.JCheckBox(); jCheckBox6 = new javax.swing.JCheckBox(); jCheckBox7 = new javax.swing.JCheckBox(); jCheckBox8 = new javax.swing.JCheckBox(); jCheckBox9 = new javax.swing.JCheckBox(); jCheckBox10 = new javax.swing.JCheckBox(); jLabel4 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jTable1.setModel(new MyTableContactModel()); jTable1.setShowGrid(true); jTable1.setShowVerticalLines(true); jScrollPane1 = new JScrollPane(jTable1); //JFrame frame = new JFrame("Affichage JTable"); //JPanel panel = new JPanel(); //panel.add(pane); //frame.add(panel); //frame.setSize(500, 500); //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //frame.setVisible(true); jTable2.setBackground(new java.awt.Color(255, 255, 204)); jTable2.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null}, {null}, {null}, {null}, {null}, {null}, {null}, {null}, {null}, {null}, {null}, {null} }, new String [] { "Mots" } ) { /** * */ private static final long serialVersionUID = 1L; @SuppressWarnings("rawtypes") Class[] types = new Class [] { java.lang.String.class, java.lang.Object.class }; boolean[] canEdit = new boolean [] { false, false }; @SuppressWarnings("rawtypes") public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane2.setViewportView(jTable2); if (jTable2.getColumnModel().getColumnCount() > 0) { jTable2.getColumnModel().getColumn(0).setResizable(false); } jLabel2.setBackground(new java.awt.Color(255, 255, 255)); jLabel2.setFont(new java.awt.Font("Yu Mincho", 0, 24)); // NOI18N jLabel2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Amine\\Documents\\NetBeansProjects\\Interface_application\\src\\interface_application\\wikipedia.png")); // NOI18N jLabel2.setText("Wikipédia"); jPanel2.setBackground(new java.awt.Color(230, 118, 43)); jCheckBox1.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox1.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox1.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox1.setText("Le Figaro"); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); jCheckBox2.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox2.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox2.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox2.setText("20minutes"); jCheckBox3.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox3.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox3.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox3.setText("Le Monde"); jCheckBox4.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox4.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox4.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox4.setText("Google News"); jCheckBox5.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox5.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox5.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox5.setText("Libération"); jCheckBox6.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox6.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox6.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox6.setText("Rue89"); jCheckBox7.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox7.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox7.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox7.setText("L'équipe"); jCheckBox8.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox8.setFont(new java.awt.Font("Yu Mincho", 2, 11)); // NOI18N jCheckBox8.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox8.setText("Les Echos"); jCheckBox9.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox9.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox9.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox9.setText("L'humanité"); jCheckBox10.setBackground(new java.awt.Color(255, 153, 0)); jCheckBox10.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jCheckBox10.setForeground(new java.awt.Color(255, 255, 255)); jCheckBox10.setText("New York Times"); jLabel4.setFont(new java.awt.Font("Yu Mincho", 0, 28)); // NOI18N jLabel4.setForeground(new java.awt.Color(255, 255, 255)); jLabel4.setText("Bienvenue !"); jLabel1.setFont(new java.awt.Font("Yu Mincho", 0, 16)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 102)); jLabel1.setText("Mes abonnements :"); jLabel6.setIcon(new javax.swing.ImageIcon("C:\\Users\\Amine\\Documents\\NetBeansProjects\\InterfaceGraphique\\src\\interfacegraphique\\logo.jpg")); // NOI18N jButton1.setFont(new java.awt.Font("Yu Mincho", 0, 11)); // NOI18N jButton1.setText("Mon profil"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel6) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(39, 39, 39) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addGap(18, 18, 18) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox5, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox6, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox8, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox7, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox9, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox10) .addGap(18, 18, 18) .addComponent(jButton1) .addContainerGap(28, Short.MAX_VALUE)) ); jLabel8.setFont(new java.awt.Font("Yu Mincho", 0, 10)); // NOI18N jLabel8.setText("© 2013-2014, Amine EDDEGHAI, Yimei LIU, Allachi AKE, Hiba EL MAHFOUDI"); jPanel3.setBackground(new java.awt.Color(51, 51, 255)); jLabel3.setBackground(new java.awt.Color(255, 255, 255)); jLabel3.setFont(new java.awt.Font("Yu Mincho", 0, 28)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Actualité mondiale"); 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(269, 269, 269) .addComponent(jLabel3) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel5.setFont(new java.awt.Font("Yu Mincho", 0, 24)); // NOI18N jLabel5.setForeground(new java.awt.Color(0, 51, 204)); jLabel5.setText("Mes news stockées :"); jButton2.setText("Accéder"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel8) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 548, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2))) .addGap(18, 18, 18) .addComponent(jLabel8)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); jTable1.addMouseListener(mouseListenerEvents); pack(); }// </editor-fold> private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } /** * @param args the command line arguments */ 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(Interface_Mynews2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Interface_Mynews2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Interface_Mynews2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Interface_Mynews2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Interface_Mynews2().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JCheckBox jCheckBox1; private javax.swing.JCheckBox jCheckBox10; private javax.swing.JCheckBox jCheckBox2; private javax.swing.JCheckBox jCheckBox3; private javax.swing.JCheckBox jCheckBox4; private javax.swing.JCheckBox jCheckBox5; private javax.swing.JCheckBox jCheckBox6; private javax.swing.JCheckBox jCheckBox7; private javax.swing.JCheckBox jCheckBox8; private javax.swing.JCheckBox jCheckBox9; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel8; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTable jTable1; private javax.swing.JTable jTable2; // End of variables declaration }
5587ac1b4f03ceb7a1673fbd22e9a67f3bbf199b
822c7a056643e0d8cce0f260b1eef838e29edc30
/src/main/java/fr/team0w/website/security/Clearance.java
8a7a867e92f308ed83f871949a7061600a27dcdc
[]
no_license
Nic0w/Team0wWebsite
ec5d81e593950236693a5de77719077801af569c
dad81622357d2055523b2cbfb8838f803fb37b6f
refs/heads/master
2020-12-30T10:36:54.178045
2013-06-20T22:01:21
2013-06-20T22:01:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
/** * */ package fr.team0w.website.security; /** * @author nic0w * */ public enum Clearance { ANONYMOUS, USER, ADMINISTRATOR }
00628be429515f1556cfbcba4d5e80084b979e38
18d1ff45c6168e3eed0950666c64a71354d86602
/demo/src/main/java/com/github/smartbuf/springcloud/model/UserModel.java
60e6dabe2a8843ba19230f29de41b8b63bf04a1e
[ "MIT" ]
permissive
smartbuf/smartbuf-springcloud
d2f60d415da02593abc5442466035a8cab8cb8ac
3529ad856b7fb9c001116b9271ad81033bebfc0e
refs/heads/master
2022-05-31T12:57:41.969547
2019-11-22T13:53:13
2019-11-22T13:53:13
222,907,922
0
0
MIT
2022-05-20T21:17:03
2019-11-20T10:08:34
Java
UTF-8
Java
false
false
463
java
package com.github.smartbuf.springcloud.model; import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; @Data public class UserModel implements Serializable { private int id; private String token; private String nickname; private String loginIp; private long loginTime; private long createTime; private long updateTime; private List<UserModel> friends = new ArrayList<>(); }
e97ecca984aede58476b2ebcd8e41de8a7d50f7b
5c09497cccdb7734fd87cb56c51ee42bb1bfba9b
/app/src/main/java/com/nxt/ott/view/RxDialogCaptcha.java
61d9c56f0a7a7fe8fd1483daf1ba6e83c860b357
[]
no_license
huqiangqaq/jx12316
a857ed011bdaee9a72846ece190f249d1145f3ba
b0da3d40859f3bffb80b0a42580b46856366cf32
refs/heads/master
2021-01-11T01:42:12.249230
2017-12-19T09:17:06
2017-12-19T09:17:06
69,533,824
0
0
null
null
null
null
UTF-8
Java
false
false
3,052
java
package com.nxt.ott.view; import android.content.Context; import android.content.DialogInterface; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import com.nxt.ott.R; import static com.nxt.ott.view.RxCaptcha.TYPE.CHARS; /** * Created by huqiang on 2017/11/28 11:27. */ public class RxDialogCaptcha extends RxDialog { private ImageView ivcode; private TextView mTvSure; private TextView mTvCancel; private EditText editText; private TextView mTvTitle; public RxDialogCaptcha(Context context, int themeResId) { super(context, themeResId); initView(); } public RxDialogCaptcha(Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener) { super(context, cancelable, cancelListener); initView(); } public RxDialogCaptcha(Context context) { super(context); initView(); } public RxDialogCaptcha(Context context, float alpha, int gravity) { super(context, alpha, gravity); initView(); } public TextView getTitleView() { return mTvTitle; } public void setTitle(String title){ mTvTitle.setText(title); } public EditText getEditText() { return editText; } public TextView getSureView() { return mTvSure; } public void setSure(String strSure) { this.mTvSure.setText(strSure); } public TextView getCancelView() { return mTvCancel; } public void setCancel(String strCancel) { this.mTvCancel.setText(strCancel); } public String getCode(){ return RxCaptcha.build().getCode(); } private void initView() { View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_captcha, null); // mIvLogo = (ImageView) dialogView.findViewById(R.id.iv_logo); mTvTitle = (TextView) dialogView.findViewById(R.id.tv_title); mTvSure = (TextView) dialogView.findViewById(R.id.tv_sure); mTvCancel = (TextView) dialogView.findViewById(R.id.tv_cancle); editText = (EditText) dialogView.findViewById(R.id.editText); ivcode = dialogView.findViewById(R.id.iv_code); RxCaptcha.build() .backColor(0xffffff) .codeLength(4) .fontSize(62) .lineNumber(2) .size(240, 85) .type(CHARS) .into(ivcode); ivcode.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { RxCaptcha.build() .backColor(0xffffff) .codeLength(4) .fontSize(62) .lineNumber(2) .size(240, 85) .type(CHARS) .into(ivcode); } }); setContentView(dialogView); } }
35ce395f5c27813e68b08f84711e821426a8b13a
6b419bda0271dc110c5d8eca4344094ecd239fee
/examples/curator/src/main/java/io/sundr/examples/curator/SetDataOption.java
b85c67e61ce41715922e9671feffbeeed92afbad
[ "Apache-2.0" ]
permissive
janstey/sundrio
320a054f39481008004380d15c510626f5ec7600
2daa650a38c9393ebe49b0b2dfd9b03a9d9b6b2f
refs/heads/master
2021-01-15T13:33:24.123035
2015-09-25T15:48:14
2015-09-25T15:48:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
java
/* * Copyright 2015 The original authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.sundr.examples.curator; import io.sundr.dsl.annotations.Any; import io.sundr.dsl.annotations.Keyword; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) @Keyword @Any(SetDataOption.class) public @interface SetDataOption { }
ca077fb6170847dbfc6ef2a1656403cdcbba6392
58d644f4a8a4e1e0346ada39efac566bf4f4b976
/Day08_ValueTest/src/main/java/com/spring/day8/Main2.java
f7fdd01db28f79e9adcf5cd341f73530f77930c2
[]
no_license
ZinKoWinn/Spring-FrameWork
715c46ed57074488f73d22af90cedf1515c5839f
18c422cd3b92f803b0bd3c9aa98a4d2e9cd678f5
refs/heads/master
2023-06-16T02:52:59.170634
2021-07-08T16:21:45
2021-07-08T16:21:45
299,191,520
1
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package com.spring.day8; import org.springframework.expression.ExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser; import java.util.Arrays; public class Main2 { public static void main(String[] args) { ExpressionParser expressionParser = new SpelExpressionParser(); System.out.println(expressionParser.parseExpression("'Hello'.concat('Spring')").getValue()); System.out.println(expressionParser.parseExpression("'2 + 2 equal ='.concat(2 + 2)").getValue()); System.out.println(expressionParser.parseExpression("new String('Learn Spring Framework'.toUpperCase())").getValue()); System.out.println(expressionParser.parseExpression("20 * 60 ").getValue()); System.out.println(expressionParser.parseExpression("{1, 2, 3}").getValue()); System.out.println(expressionParser.parseExpression("{a:1, b:2, c:3}").getValue()); System.out.println(Arrays.toString((int[])expressionParser.parseExpression("new int[]{1,2,3}").getValue())); System.out.println(expressionParser.parseExpression("3 < 11").getValue()); } }
483ba58509ec2879b595d9bac5cd7ad0560a0b73
6ded8dbdeb0549a0eac65326f2741c287261b1f3
/src/test/java/guru/springframework/controllers/SetterInjectedControllerTest.java
81f3d4129ae458bff976c4a1b3656569936e4c80
[]
no_license
ashuprabhune/di-demo
52d1dc73c12f200682983c468608f0a3cf2b4ae6
7db56b0cbfc835cb9ea8710b75b083fb83e081b6
refs/heads/master
2020-11-26T04:07:27.707273
2019-12-25T01:00:57
2019-12-25T01:00:57
228,960,386
0
0
null
null
null
null
UTF-8
Java
false
false
727
java
package guru.springframework.controllers; import guru.springframework.didemo.controllers.SetterInjectedController; import guru.springframework.didemo.services.GreetingServiceImpl; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; public class SetterInjectedControllerTest { private SetterInjectedController setterInjectedController; @Before public void setUp(){ this.setterInjectedController = new SetterInjectedController(); this.setterInjectedController.setGreetingService(new GreetingServiceImpl()); } @Test public void testGreeting(){ assertEquals(GreetingServiceImpl.HELLO_GURUS,setterInjectedController.sayHello()); } }
cc57640b3ecbcff4c0a97cb326df85c2764f92c0
c23d0dd16db2f37dd393b59c5b55057e2f1c7234
/3.Exercises/4.Fourth/src/utils/SampleLinkedListTest.java
55659ca10ff462143acc6408aa0d768330c8ab00
[]
no_license
Echolz/DSA-FMI
3e96be0a35fd469e05ff24ad94c1e61feb410d44
49ac8430fa7018bbf18cfbb8485304be0916dfcb
refs/heads/master
2021-07-25T23:40:35.773552
2020-04-18T10:42:55
2020-04-18T10:42:55
152,400,751
1
0
null
null
null
null
UTF-8
Java
false
false
1,242
java
package utils; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; public class SampleLinkedListTest { private LinkedList<Integer> list; private java.util.LinkedList<Integer> realList; @Before public void setUp() { list = new LinkedList<>(); realList = new java.util.LinkedList<>(); int n = 10; for (int i = 0; i < n; i++) { list.addLast(i); realList.add(i); } } @Test public void testAdd_CheckIfSizeIsCorrect() { assertEquals(realList.size(), list.getSize()); } @Test public void testRemove_DoesNothingWhenAnyFileIsMissing() { for (int i = 0; i < list.getSize() / 3; i++) { assertEquals(realList.removeLast(), list.removeLast()); } assertEquals(realList.peekLast(), list.seeLast()); for (int i = 0; i < list.getSize() / 3; i++) { assertEquals(realList.removeFirst(), list.removeFirst()); } assertEquals(realList.peekFirst(), list.seeFirst()); assertEquals(realList.peekLast(), list.seeLast()); assertEquals(realList.size(), list.getSize()); } }
7bbcd3eaeeee9eeedf65fddbd29c479b64b44547
51614ac3764a9e53827e649d24eb0e23605067f1
/Weatherapp/app/src/main/java/com/weatherapp/model/Weather.java
3a34d0735c6916dba3434505ace40aae72d61315
[]
no_license
mahmoudmaamounz/Android
9305ce75dc96070d56bac8edc41f003e9075a084
4a51e6420a7eb89f95c638b042349023d7e8f2d0
refs/heads/master
2021-01-19T13:37:22.831614
2017-02-26T18:58:53
2017-02-26T18:58:53
82,402,601
0
0
null
null
null
null
UTF-8
Java
false
false
2,689
java
package com.weatherapp.model; import android.graphics.drawable.Drawable; import java.util.Date; /** * Created by Luci on 1/28/2017. */ public class Weather { String description; String min_temp; String max_temp; Drawable icon; String pressure; String humidity; String updateOn; public Weather(String description, String min_temp, String max_temp, String pressure, String humidity, String updateOn, Drawable icon) { this.min_temp = min_temp; this.max_temp = max_temp; this.description = description; this.icon = icon; this.pressure = pressure; this.humidity = humidity; this.updateOn = updateOn; } public String getUpdateOn() { return updateOn; } public void setUpdateOn(String updateOn) { this.updateOn = updateOn; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getMin_temp() { return min_temp; } public void setMin_temp(String min_temp) { this.min_temp = min_temp; } public String getMax_temp() { return max_temp; } public void setMax_temp(String max_temp) { this.max_temp = max_temp; } public String getHumidity() { return humidity; } public void setHumidity(String humidity) { this.humidity = humidity; } public Drawable getIcon() { return icon; } public void setIcon(Drawable icon) { this.icon = icon; } public String getPressure() { return pressure; } public void setPressure(String pressure) { this.pressure = pressure; } public static String setWeatherIcon(int actualId, long sunrise, long sunset){ int id = actualId / 100; String icon = ""; if(actualId == 800){ long currentTime = new Date().getTime(); if(currentTime>=sunrise && currentTime<sunset) { icon = "&#xf00d;"; } else { icon = "&#xf02e;"; } } else { switch(id) { case 2 : icon = "&#xf01e;"; break; case 3 : icon = "&#xf01c;"; break; case 7 : icon = "&#xf014;"; break; case 8 : icon = "&#xf013;"; break; case 6 : icon = "&#xf01b;"; break; case 5 : icon = "&#xf019;"; break; } } return icon; } }
4b6c9092be465b2f13aeb596424d3989fb6e6c3a
5107d917c5b4395f9f1d1934b5001938b1eea3b8
/src/java/com/ufpr/tads/web2/dao/start_env/data/CreateCadastro.java
f9f6dcca2c46a1fdb6431a1a1896f120e079926c
[]
no_license
wgiacomin/java-ee
523d5e3c0d18df15a4e2f5441dddf3d8dbc037a4
99fe0eafe5847978b47c68446490bddd3b9b0909
refs/heads/main
2023-07-01T10:50:18.767055
2021-08-04T00:00:09
2021-08-04T00:00:09
367,941,971
0
0
null
null
null
null
UTF-8
Java
false
false
6,352
java
package com.ufpr.tads.web2.dao.start_env.data; import com.ufpr.tads.web2.dao.utils.ConnectionFactory; import java.sql.Connection; import java.sql.Statement; public class CreateCadastro { private static Statement query = null; private static Connection con = null; public static void main(String[] args) { String text = null; try (ConnectionFactory factory = new ConnectionFactory()) { con = factory.getConnection(); query = con.createStatement(); query.executeUpdate("INSERT INTO cadastro(fk_login, cpf, nome, email, rua, rua_numero, rua_complemento, bairro, cep, telefone, fk_cidade," + " fk_perfil)" + " SELECT login.id," + " '14233361784'," + " 'Wanderson'," + " '[email protected]'," + " 'R. Prof. Sen. Balconi'," + " 32," + " 'Apto 523'," + " 'Vila Nova'," + " '25413362'," + " '27998544321'," + " cidade.id," + " perfil.id" + " FROM login," + " cidade," + " perfil" + " WHERE login.login = 'wgiacomin'" + " AND cidade.nome = 'Curitiba'" + " AND perfil.descricao = 'Gerente';"); query.executeUpdate("INSERT INTO cadastro(fk_login, cpf, nome, email, rua, rua_numero, rua_complemento, bairro, cep, telefone, fk_cidade," + " fk_perfil)" + " SELECT login.id," + " '14233363784'," + " 'Wanderson'," + " '[email protected]'," + " 'R. Prof. Sen. Balconi'," + " 32," + " 'Apto 523'," + " 'Vila Nova'," + " '25413362'," + " '27998544321'," + " cidade.id," + " perfil.id" + " FROM login," + " cidade," + " perfil" + " WHERE login.login = 'wgiacomin2'" + " AND cidade.nome = 'Curitiba'" + " AND perfil.descricao = 'Gerente';"); query.executeUpdate("INSERT INTO cadastro(fk_login, cpf, nome, email, rua, rua_numero, rua_complemento, bairro, cep, telefone, fk_cidade," + " fk_perfil)" + " SELECT login.id," + " '14233341784'," + " 'Wanderson'," + " '[email protected]'," + " 'R. Prof. Sen. Balconi'," + " 32," + " 'Apto 523'," + " 'Vila Nova'," + " '25413362'," + " '27998544321'," + " cidade.id," + " perfil.id" + " FROM login," + " cidade," + " perfil" + " WHERE login.login = 'nick'" + " AND cidade.nome = 'Curitiba'" + " AND perfil.descricao = 'Cliente';"); query.executeUpdate("INSERT INTO cadastro(fk_login, cpf, nome, email, rua, rua_numero, rua_complemento, bairro, cep, telefone, fk_cidade," + " fk_perfil)" + " SELECT login.id," + " '14233341484'," + " 'Wanderson'," + " '[email protected]'," + " 'R. Prof. Sen. Balconi'," + " 32," + " 'Apto 523'," + " 'Vila Nova'," + " '25413362'," + " '27998544321'," + " cidade.id," + " perfil.id" + " FROM login," + " cidade," + " perfil" + " WHERE login.login = 'wgiacomin3'" + " AND cidade.nome = 'Curitiba'" + " AND perfil.descricao = 'Cliente';"); query.executeUpdate("INSERT INTO cadastro(fk_login, cpf, nome, email, rua, rua_numero, rua_complemento, bairro, cep, telefone, fk_cidade," + " fk_perfil)" + " SELECT login.id," + " '14433361754'," + " 'Wanderson'," + " '[email protected]'," + " 'R. Prof. Sen. Balconi'," + " 32," + " 'Apto 523'," + " 'Vila Nova'," + " '25413362'," + " '27998544321'," + " cidade.id," + " perfil.id" + " FROM login," + " cidade," + " perfil" + " WHERE login.login = 'wgiacomin4'" + " AND cidade.nome = 'Curitiba'" + " AND perfil.descricao = 'Funcionario';"); System.out.println("Cadastros criados com sucesso."); } catch (Exception e) { System.out.println("Erro ao criar ao criar Cadastros." + text); e.printStackTrace(); } finally { if (con != null) { try { con.close(); con = null; } catch (Exception e) { e.printStackTrace(); } } if (query != null) { try { query.close(); query = null; } catch (Exception e) { e.printStackTrace(); } } } } }
038d10f1c702b78ec9a9235af44f190e843dc81a
124e4b4e9a06999c1da7a58820cd1b02bcb64290
/TestFHIR/target/generated-sources/xjc/org/hl7/fhir/model/OrderOutcomeStatus.java
85dc07f878d31819e09054d33ad81d55dae649ba
[]
no_license
Rickeys-playground/bmi591
37e7c065bf5582caeb66b996d0f444e66328e359
b34e909755ed996b0a45843353f1170e18a805a7
refs/heads/master
2016-08-07T05:57:07.707808
2015-09-01T10:02:24
2015-09-01T10:02:24
41,276,769
0
1
null
2015-09-01T10:02:25
2015-08-24T02:12:42
Java
UTF-8
Java
false
false
3,022
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.08.27 at 10:15:25 PM MST // package org.hl7.fhir.model; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; import org.jvnet.jaxb2_commons.lang.ToString; import org.jvnet.jaxb2_commons.lang.ToStringStrategy; import org.jvnet.jaxb2_commons.locator.ObjectLocator; /** * If the element is present, it must have either a @value, an @id, or extensions * * <p>Java class for OrderOutcomeStatus complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="OrderOutcomeStatus"&gt; * &lt;complexContent&gt; * &lt;extension base="{http://hl7.org/fhir}Element"&gt; * &lt;attribute name="value" type="{http://hl7.org/fhir}OrderOutcomeStatus-list" /&gt; * &lt;/extension&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "OrderOutcomeStatus") public class OrderOutcomeStatus extends Element implements ToString { @XmlAttribute(name = "value") protected OrderOutcomeStatusList value; /** * Gets the value of the value property. * * @return * possible object is * {@link OrderOutcomeStatusList } * */ public OrderOutcomeStatusList getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link OrderOutcomeStatusList } * */ public void setValue(OrderOutcomeStatusList value) { this.value = value; } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { OrderOutcomeStatusList theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; } }
f72f5f6c96d5027cf18f61df592d6109851cc5e9
ba5193a7e8086aac8095163e8e01542902dc9245
/src/main/java/webstore/config/JpaConfiguration.java
7f7c15d076d679aac9dd2c84499cb0cf021f5fb0
[]
no_license
HelgaLis/ormwebstore
1fb7ff84d9664624d55145d76d80333d1294b8d9
193c8efd7f25f54dcc88655aaf21d6bc0f79e5c1
refs/heads/master
2020-04-05T17:39:10.789088
2018-11-11T12:11:49
2018-11-11T12:11:49
157,070,150
0
0
null
null
null
null
UTF-8
Java
false
false
1,575
java
package webstore.config; import javax.sql.DataSource; import org.hibernate.dialect.HSQLDialect; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.orm.jpa.JpaVendorAdapter; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; @Configuration public class JpaConfiguration { private JpaVendorAdapter jpaVendorAdapter() { HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); jpaVendorAdapter.setShowSql(true); jpaVendorAdapter.setGenerateDdl(true); jpaVendorAdapter.setDatabasePlatform(HSQLDialect.class.getName()); return jpaVendorAdapter; } @Bean public DataSource dataSource() { EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder(); EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).addScript("/db/sql/create-table.sql").addScript("/db/sql/insert-data.sql").build(); return db; } @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean(); emf.setDataSource(dataSource()); emf.setPackagesToScan("webstore.domain"); emf.setJpaVendorAdapter(jpaVendorAdapter()); return emf; } }
[ "helga@helga-OEM" ]
helga@helga-OEM
c820568edd7f3dcd70684ba7de8f11e1c5247cbd
f5398748ea435d203248eb208850a1d36939e3a8
/EASy-Standalone/EASyCommandLineTest/testdata/elevator/PL_SimElevator2/src/gui/views/outside/ElevatorPanel.java
470172c4c5daa422a1927bf1b3b0fed8cbce3dd2
[ "Apache-2.0" ]
permissive
SSEHUB/EASyProducer
20b5a01019485428b642bf3c702665a257e75d1b
eebe4da8f957361aa7ebd4eee6fff500a63ba6cd
refs/heads/master
2023-06-25T22:40:15.997438
2023-06-22T08:54:00
2023-06-22T08:54:00
16,176,406
12
2
null
null
null
null
ISO-8859-1
Java
false
false
4,891
java
package gui.views.outside; import gui.buttons.$outerview_buttontype; //import gui.buttons.DefaultButton; import gui.views.ScrollPanel; import java.awt.Dimension; import java.awt.Graphics; import java.util.ArrayList; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JLabel; import properties.ProgramSettings; import gui.buttons.EmergencyButton; /** * Eigene Klasse die von JPanel erbt und die einzelnen Etagen aufs Panel * zeichnet. Implementiert Scrollable, damit es Scrollbar ist. * */ public class ElevatorPanel extends ScrollPanel { private static final long serialVersionUID = 1L; private JLabel elevatorImage; private int iElevatorIndex; private ArrayList<$outerview_buttontype> callButtons; private ArrayList<EmergencyButton> emergencyButtons; /** * @return the emergencyButtons */ public ArrayList<EmergencyButton> getEmergencyButtons() { return emergencyButtons; } public ArrayList<$outerview_buttontype> getCallButtons() { return callButtons; } public int getElevatorIndex() { return iElevatorIndex; } /** * @return the elevatorImage */ public JLabel getElevatorImage() { return elevatorImage; } /** * Ueberladener Konstruktor. */ public ElevatorPanel(int iIndex) { this.iElevatorIndex = iIndex; this.callButtons = new ArrayList<$outerview_buttontype>(ProgramSettings.FLOORS); createPanel(); } /** * zeichnet das Panel mit dem Elevator-Image. */ public void createPanel() { this.setLayout(null); /* * Ist f&uuml;r das repaint des Graphic-Objektes nun nicht mehr selber * verantwortlich. */ this.setOpaque(false); this.setPreferredSize(new Dimension(200, Math.max(470, (ProgramSettings.getTotalHeight(ProgramSettings.FLOORS)) + 81))); this.elevatorImage = new JLabel(); Icon icon = new ImageIcon(getClass().getResource("../../../doorsClosed.gif")); this.elevatorImage.setIcon(icon); this.elevatorImage.setBounds(55, this.getPreferredSize().height - 64, 40, 40); this.add(elevatorImage); // anzahl buttons pro etage /* * #if($controller_synchronized == true) */ if (ProgramSettings.FLOORS_BUTTONS == ProgramSettings.ELEVATORS) { createComponents(); } else { int iii = Math.round(ProgramSettings.ELEVATORS / ProgramSettings.FLOORS_BUTTONS); // wenn iii == 1, falls kommazahl und abgerundet wird, dann nur // buttons, wenn kleiner als anzahl knoepfe/etage if ((iii == 1) && iElevatorIndex < ProgramSettings.FLOORS_BUTTONS) { createComponents(); } // wenn iControllerIndex vielfache von iii if ((iii != 1) && ((iElevatorIndex + 1) % iii) == 0) { createComponents(); } } /* * #else */ createComponents(); /* * #end */ } private void createComponents() { createButtons(); createFloorLabels(); if(ProgramSettings.OUTERVIEW_EMERGENCY){ createEmergencyButtons(); } } /** * Diese Methode added Buttons zum hoch oder runterfahren neben die * Fahrstuehle. */ public void createButtons() { // Rufbuttons erzeugen for (int i = 0; i < ProgramSettings.FLOORS; i++) { $outerview_buttontype tmpButton = new $outerview_buttontype(i, iElevatorIndex); tmpButton.setBounds(110, this.getPreferredSize().height - (i * ProgramSettings.FLOORS_HEIGHT) - 45, 50, 20); callButtons.add(tmpButton); this.add(tmpButton); } } private void createFloorLabels() { for(int i = 0; i < ProgramSettings.FLOORS; i++) { // Label für Etagennummer initialisieren JLabel lblFloor = new JLabel(Integer.toString(i)); lblFloor.setText(Integer.toString(i)); lblFloor.setPreferredSize(new Dimension(10, 5)); lblFloor.setBounds(35 - (5 * lblFloor.getText().length()), this.getPreferredSize().height - (i * ProgramSettings.FLOORS_HEIGHT) - 55, lblFloor.getText().length() * 10, 45); this.add(lblFloor); } } /** * Diese Methode erzeugt neben jeder Etage einen Notruf-Button */ private void createEmergencyButtons() { this.emergencyButtons = new ArrayList<EmergencyButton>(); for (int i = 0; i < ProgramSettings.FLOORS; i++) { EmergencyButton emButton = new EmergencyButton(i, iElevatorIndex, false); emButton.setBounds(170, this.getPreferredSize().height - (i * ProgramSettings.FLOORS_HEIGHT) - 45, 20, 20); emergencyButtons.add(emButton); this.add(emButton); } } /** * Diese Methode zeichnet die Rechtecke fuer die Etagen. * * @param g * die gezeichnete Grafik */ public void paintComponent(Graphics g) { for (int i = 0; i < ProgramSettings.FLOORS; i++) { g.drawRect(ProgramSettings.FLOORS_HEIGHT, this .getPreferredSize().height - (i * ProgramSettings.FLOORS_HEIGHT) - 70, ProgramSettings.FLOORS_HEIGHT, ProgramSettings.FLOORS_HEIGHT); } } }
9ce6bcd5ed6e6dc1f1865167952cf69e3fa185b5
46d2123b581e6fb4326d3262422e55395defc1e3
/.svn/pristine/9c/9ce6bcd5ed6e6dc1f1865167952cf69e3fa185b5.svn-base
af1010460789fef704f6dfc06c10f44e35d1b66b
[]
no_license
Mxtreme1/Java-Exercises
e24532837cc0e0a16f62196a91aa7b6db1828b2c
e8b033385f2a91b503ec2ea0429b60b805eb856f
refs/heads/master
2021-06-23T13:21:14.752802
2017-07-31T18:22:05
2017-07-31T18:22:05
89,339,604
0
0
null
null
null
null
UTF-8
Java
false
false
626
package convertunits; public class Conversions { public static double km2miles(double x) { // returns converted value (1km = 0.62137 miles) return x * 0.62137; } public static double miles2km(double x) { //returns converted value miles to km return x * 1.61; } public static double celsius2fahrenheit(double x) { //returns converted value celsius to fahrenheit return 32.0 + x * 1.8; } public static double fahrenheit2celsius(double x) { //returns converted value fahrenheit to celsius return (x - 32) / 1.8; } }
8ccc6e1eb225c4853aa88da1ec367b04005a92c9
1bde23a25a0d6157d8ee661b201ea1487ba33b0e
/app/src/main/java/com/example/fariscare/ProfilePage.java
55b7ddbd8ed7c72b3fba5ce8ffedef63d97e8ad2
[]
no_license
Kwongmingwei/FarisCare
4d6b78da43a298fa0d596fbc95f0b4783212b247
bedc35f81a8fa0db9c0f2dc72e5fcedc50c2523e
refs/heads/master
2023-02-25T09:30:38.291425
2021-02-02T08:59:32
2021-02-02T08:59:32
308,499,645
0
0
null
null
null
null
UTF-8
Java
false
false
2,808
java
package com.example.fariscare; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.provider.Telephony; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.google.firebase.auth.FirebaseAuth; 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; import org.w3c.dom.Text; public class ProfilePage extends AppCompatActivity { TextView Name,DOB,Address,EmergencyContact,Edit; Button RegisterButton; FirebaseAuth Auth; DatabaseReference databaseReference; Member member; String userid; private static final String TAG = "ProfilePage"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_profile_page); Name=findViewById(R.id.Name); Address=findViewById(R.id.Address); DOB =findViewById(R.id.dob); EmergencyContact=findViewById(R.id.emergency); Edit=findViewById(R.id.edit); Bundle bundle = getIntent().getExtras(); userid=bundle.getString("uid"); databaseReference= FirebaseDatabase.getInstance().getReference().child("Member").child(userid); databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { String n = dataSnapshot.child("name").getValue().toString(); String birth = dataSnapshot.child("dob").getValue().toString(); String address = dataSnapshot.child("address").getValue().toString(); String emergency = dataSnapshot.child("emergencyContact").getValue().toString(); Name.setText(n); Address.setText(address); DOB.setText(birth); EmergencyContact.setText(emergency); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); Edit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent EditProfile=new Intent(ProfilePage.this,EditProfilePage.class); EditProfile.putExtra("uid", userid); startActivity(EditProfile); finish(); } }); } }
f78d7c26f7d29ba64a7ad3ee84d6e595349ee072
43257f4a7152b0f3c58b39d3834e8f60556c6cb2
/src/regmach/MainProgram.java
dec5516b3d10fd4fba4de6c82548859749a393f9
[ "MIT" ]
permissive
andylshort/register-machines
5839143b8c8c3ec38ccae6b167d3dcd5715a961b
7a615834013164395b451a368aa5b75dbdc6e870
refs/heads/master
2021-06-07T15:11:42.242028
2016-11-11T20:53:24
2016-11-11T20:53:24
38,259,138
1
0
null
null
null
null
UTF-8
Java
false
false
2,113
java
package regmach; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class MainProgram { public static void main(String[] args) { RegisterSet registers = loadInitialRegisterSet(); Program program = loadProgramFromFile(args[0]); // Execute the program with the initial configuration RegisterMachine rm = new RegisterMachine(registers); rm.runProgram(program); } @SuppressWarnings("resource") private static RegisterSet loadInitialRegisterSet() { RegisterSet initialConfiguration = new RegisterSet(); // Load the registers first with an initial configuration System.out.println("Enter initial, space-separated configuration:"); Scanner input = new Scanner(System.in); String initialConfig = input.nextLine(); String[] regValues = initialConfig.split(" "); for (int i = 0; i < regValues.length; i++) { int value = Integer.parseInt(regValues[i]); initialConfiguration.addRegister(value); } if (initialConfiguration.registerCount() < 1) { throw new RuntimeException("At least 1 register must be specified."); } return initialConfiguration; } @SuppressWarnings("resource") private static Program loadProgramFromFile(String filePath) { Program program = new Program(); // Load program in from file if (filePath == null || filePath.isEmpty()) { System.err.println("No input file."); System.exit(0); } // Can do extra checks here: file exists etc... try { Scanner fileInput = new Scanner(new File(filePath)); while (fileInput.hasNextLine()) { String currentLine = fileInput.nextLine(); Integer index = Integer.parseInt(currentLine.split(":\\s*")[0]); String instr = currentLine.split(":\\s*")[1]; program.putInstruction(index, instr); } } catch (FileNotFoundException e) { e.printStackTrace(); } return program; } }
ed1166293bc8455df566552201ea85ab94bd71cd
cbc4fe218249880f628186828505295519d37c6c
/demo/react-native/m-app3/android/app/src/debug/java/com/xutongbao/mapp3/ReactNativeFlipper.java
cee924518c701f12849175ff1cd03e3d92e1ea55
[]
no_license
baweireact/m-apps
a6b6107c3507284c8207b8796d5c9cf77724c7a0
bc816bd5bdc6b43baa168d449d14bbb41e3ab3b5
refs/heads/master
2023-05-28T10:03:36.013553
2023-05-20T09:19:57
2023-05-20T09:19:57
224,748,045
1
1
null
2022-06-07T08:10:37
2019-11-29T00:17:32
JavaScript
UTF-8
Java
false
false
3,266
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * <p>This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ package com.xutongbao.mapp3; import android.content.Context; import com.facebook.flipper.android.AndroidFlipperClient; import com.facebook.flipper.android.utils.FlipperUtils; import com.facebook.flipper.core.FlipperClient; import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; import com.facebook.flipper.plugins.inspector.DescriptorMapping; import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; import okhttp3.OkHttpClient; public class ReactNativeFlipper { public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { if (FlipperUtils.shouldEnableFlipper(context)) { final FlipperClient client = AndroidFlipperClient.getInstance(context); client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); client.addPlugin(new ReactFlipperPlugin()); client.addPlugin(new DatabasesFlipperPlugin(context)); client.addPlugin(new SharedPreferencesFlipperPlugin(context)); client.addPlugin(CrashReporterPlugin.getInstance()); NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); NetworkingModule.setCustomClientBuilder( new NetworkingModule.CustomClientBuilder() { @Override public void apply(OkHttpClient.Builder builder) { builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); } }); client.addPlugin(networkFlipperPlugin); client.start(); // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized // Hence we run if after all native modules have been initialized ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( new ReactInstanceManager.ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); reactContext.runOnNativeModulesQueueThread( new Runnable() { @Override public void run() { client.addPlugin(new FrescoFlipperPlugin()); } }); } }); } else { client.addPlugin(new FrescoFlipperPlugin()); } } } }
950c411a7ed8154fe305cf93ce244588430e9709
e36f8cc8fd5b0e27f7887886334e3790f1d806ac
/src/main/java/com/liujie/server/controller/EmployeeController.java
86621f7c89afc0d6696b11e77fca72634661f6c3
[]
no_license
liujie1122/spring_cache
ce5b8dd7e1625190de966417dce2f20a90534c16
131cb8e1a8d70c98c8f0a2fb301bd6c99790575c
refs/heads/master
2022-06-25T00:00:04.188868
2019-11-26T00:59:03
2019-11-26T00:59:03
223,835,778
0
0
null
2022-06-17T02:41:40
2019-11-25T01:12:21
Java
UTF-8
Java
false
false
1,455
java
package com.liujie.server.controller; import com.liujie.server.bean.Employee; import com.liujie.server.mapper.EmployeeMapper; import com.liujie.server.service.EmployeeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @program: spring_cache * @description: * @author: LiuJie * @create: 2019-11-21 11:20 **/ @RestController @RequestMapping("/employee") public class EmployeeController { @Autowired private EmployeeService employeeService; @GetMapping("/getById/{id}") public Employee getById(@PathVariable Integer id){ return employeeService.getById(id); } @GetMapping("/addEmp") public Employee addEmp(){ Employee employee = employeeService.addEmp(null); return employee; } @GetMapping("/updateEmp") public Employee updateEmp(Employee employee){ return employeeService.updateEmp(employee); } @GetMapping("/deleteEmp/{id}") public int deleteEmp(@PathVariable Integer id){ return employeeService.deleteEmp(id); } @GetMapping("/getEmpByName/{name}") public Employee getEmpByName(@PathVariable String name){ return employeeService.getEmpByName(name); } }