blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
186def8535896e5f41ef447918c4055df723072c
2b3cd9fb51b73042471f88ea2e84d3d70ae5bca9
/core/src/BountyHunterSurvival/TitleScreen.java
ea5c4cab10c13c401aca1bb65818f566369e4831
[]
no_license
UCUDProgram/Bounty-Hunter-Survival
099fc2f0516b4231e1e996c865ced67978d5c45a
991fc0f3beda7dd4d40d1a2258e4abfd6fdf1c9f
refs/heads/master
2021-01-10T15:20:55.735196
2016-02-25T18:02:08
2016-02-25T18:02:08
46,187,883
0
0
null
null
null
null
UTF-8
Java
false
false
4,198
java
package BountyHunterSurvival; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.Screen; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; public class TitleScreen implements Screen, InputProcessor, ApplicationListener { private BountySurvival BHGame; private SpriteBatch batch; private float screenHeight, screenWidth,scaleX, scaleY; private Texture background, hunter; private String title; private BitmapFont titleFont; private Stage stage; private Table table; private Skin skin; /* * Constructor for the Title Screen Class */ public TitleScreen(BountySurvival game){ BHGame = game; } @Override public void create() { batch = new SpriteBatch(); screenHeight = Gdx.graphics.getHeight(); screenWidth = Gdx.graphics.getWidth(); FileHandle file = Gdx.files.internal("Mole/Mole-Stance.png"); hunter = new Texture(file); title = "Bounty Hunter Survival"; titleFont = new BitmapFont(); stage = new Stage(); skin = new Skin(Gdx.files.internal("uiskin.json")); table = new Table(skin); scaleX = screenWidth/640; scaleY = screenHeight/480; addMenuButton(); table.setFillParent(true); table.right(); stage.addActor(table); Gdx.input.setInputProcessor(this); Gdx.input.setInputProcessor(stage); } @Override public void render(float delta) { batch.begin(); Gdx.gl.glClearColor(0, 0, 0, 0); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.draw(hunter, 50, 50, screenWidth/3, screenHeight/2); titleFont.setScale(3, 3); titleFont.draw(batch, title, 20,(int) (screenHeight - 100)); batch.end(); stage.draw(); } /* * Adds the Main Menu button to the Title Screen */ public void addMenuButton(){ final TextButton button = new TextButton("Main Menu",skin); button.setName("Main Menu"); table.add(button).width(button.getWidth()*scaleX).height(button.getHeight()*scaleY); table.row(); button.addListener(new ClickListener(){ // @Override public void clicked(InputEvent event, float x, float y) { BHGame.switchScreens(2); } }); } @Override public boolean keyDown(int keycode) { // TODO Auto-generated method stub return false; } @Override public boolean keyUp(int keycode) { // TODO Auto-generated method stub // BHGame.switchScreens(2); return false; } @Override public boolean keyTyped(char character) { // TODO Auto-generated method stub return false; } @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { // TODO Auto-generated method stub // BHGame.switchScreens(2); return false; } @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { // TODO Auto-generated method stub return false; } @Override public boolean touchDragged(int screenX, int screenY, int pointer) { // TODO Auto-generated method stub return false; } @Override public boolean mouseMoved(int screenX, int screenY) { // TODO Auto-generated method stub return false; } @Override public boolean scrolled(int amount) { // TODO Auto-generated method stub return false; } @Override public void render() { // TODO Auto-generated method stub } @Override public void resize(int width, int height) { // TODO Auto-generated method stub } @Override public void show() { // TODO Auto-generated method stub } @Override public void hide() { // TODO Auto-generated method stub } @Override public void pause() { // TODO Auto-generated method stub } @Override public void resume() { // TODO Auto-generated method stub } @Override public void dispose() { // TODO Auto-generated method stub } }
[ "dlaw@udel.edu" ]
dlaw@udel.edu
cb5b2d91454d31fd75f5de1c34f7f502fa387dd0
4351490d151b8b1409bb13b65bc627c121085af0
/app/src/main/java/com/example/jiangyue/androidap/util/AnimatorUtil.java
fa1fbb8b7971da6013c2ecf245dfa7ed410913fa
[]
no_license
hun123456/android_aps
aed19413de1cb0f7fd1666bcdbf93c83eada590a
d523226bafa9beed5632d6862ef8dc290580dbb4
refs/heads/master
2020-04-15T05:22:35.610791
2017-04-10T07:49:04
2017-04-10T07:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,475
java
/* * Copyright 2014 Niek Haarman * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.jiangyue.androidap.util; import android.support.annotation.NonNull; import com.nineoldandroids.animation.Animator; public class AnimatorUtil { private AnimatorUtil() { } /** * Merges given Animators into one array. */ @NonNull public static Animator[] concatAnimators(@NonNull final Animator[] childAnimators, @NonNull final Animator[] animators, @NonNull final Animator alphaAnimator) { Animator[] allAnimators = new Animator[childAnimators.length + animators.length + 1]; int i; for (i = 0; i < childAnimators.length; ++i) { allAnimators[i] = childAnimators[i]; } for (Animator animator : animators) { allAnimators[i] = animator; ++i; } allAnimators[allAnimators.length - 1] = alphaAnimator; return allAnimators; } }
[ "454976341@qq.com" ]
454976341@qq.com
07aa5c0cc8a5b2c347d1dd446a16636d749684c1
c943093cbe507645f989e20339710e44b6aa74d7
/src/test/java/br/ucdb/TestEntityManager.java
86f04e8004fe1621ec20c92699ef9efcfe1082bf
[]
no_license
virmerson/tap2_ucdb
fc3113ee28eed2bc348ad658831b2e701a18fe9e
83d7dfe3927f9a37b49b4e8ccceb19905a177010
refs/heads/master
2021-01-01T06:55:09.868888
2015-07-28T02:28:09
2015-07-28T02:28:09
39,808,719
0
0
null
null
null
null
UTF-8
Java
false
false
727
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 br.ucdb; import junit.framework.TestCase; /** * * @author rf3020 */ public class TestEntityManager extends TestCase { public TestEntityManager(String testName) { super(testName); } @Override protected void setUp() throws Exception { super.setUp(); } @Override protected void tearDown() throws Exception { super.tearDown(); } // TODO add test methods here. The name must begin with 'test'. For example: // public void testHello() {} }
[ "rf3020@C4M01.acad.ucdb.br" ]
rf3020@C4M01.acad.ucdb.br
4f8be96c614052a702078c84aacc96aa07046fde
640fe0b21822629929aa61a74638fde13046da68
/src/main/java/com/vertigrated/db/mssql/SelectBuilder.java
2d38ab4e68ab38b9b1a7e34ea7fc2f8c9cf05d1c
[]
no_license
vinfai/sqlck
814a6c43937781b1eacd32f7fe242571cc443b44
d811a9f4201d1168c6305bd08d11d3f6f5241eba
refs/heads/master
2020-12-24T14:18:00.224639
2011-03-22T17:02:28
2011-03-22T17:02:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,424
java
package com.vertigrated.db.mssql; import com.vertigrated.db.AbstractSelectBuilder; import com.vertigrated.temporal.Date; import java.util.Map; class SelectBuilder extends AbstractSelectBuilder { SelectBuilder(final Database db, final String schemaName, final String tableName) { super(db, schemaName, tableName); } SelectBuilder(final Database db, final String schemaName, final String tableName, final Database.DateTimeFormat dateFormat) { super(db, schemaName, tableName); } public void addDecodeColumnName(final String column, final String alias, final Map<Integer, String> decode, final String elcs) { if (decode.isEmpty()) { throw new RuntimeException("decode map can not be empty"); } final StringBuilder sb = new StringBuilder(); sb.append("CASE "); sb.append(column); for (final int i : decode.keySet()) { sb.append(" WHEN ").append(i).append(" THEN ").append("'").append(decode.get(i)).append("' "); } if (elcs == null || elcs.length() == 0) { sb.append(" ELSE 'UNDEFINED' "); } else { sb.append(" ELSE ").append("'").append(elcs).append("' "); } sb.append("END ").append(" AS ").append(alias); super.columns.add(sb.toString()); } public void addColumnName(final String name, final String isNull) { super.addColumnNameAliasWithIsNull(name, null, "ISNULL", isNull, true); } public void addColumnName(final String name, final String alias, final String isNull) { super.addColumnNameAliasWithIsNull(name, alias, "ISNULL", isNull, true); } public void addColumnName(final String name, final Number isNull) { super.addColumnNameAliasWithIsNull(name, null, "ISNULL", isNull.toString(), false); } public void addColumnName(final String name, final String alias, final Number isNull) { super.addColumnNameAliasWithIsNull(name, alias, "ISNULL", isNull.toString(), false); } public void addColumnName(final String name, final Date isNull) { this.addColumnName(name, null, isNull); } public void addColumnName(final String name, final String alias, final Date isNull) { super.addColumnNameAliasWithIsNull(name, alias, "ISNULL", isNull.toString(), true); } }
[ "jarrod.roberson@itaas.com" ]
jarrod.roberson@itaas.com
9837226c4440e7e0fb5b67d7103517d4156f55c9
7a5d9222a00b5a3d4094476ebd7097b6c59bd234
/java-spi/src/main/java/com/mrl/emulate/spi/HelloSpiJava.java
5aaaffc5934dcc77163ed7a515851b243496a21c
[]
no_license
TinyDataLiu/emulate
1f50a53b5321701878b2628582a81105266a91e6
827d6ad4d92ec84e5c03967a934faa83b5c3fb11
refs/heads/master
2022-07-23T06:53:54.975983
2020-03-28T08:01:27
2020-03-28T08:01:27
137,826,282
0
0
null
2022-07-13T15:30:36
2018-06-19T01:44:59
Java
UTF-8
Java
false
false
124
java
package com.mrl.emulate.spi; /** * 定义接口 */ public interface HelloSpiJava { String sayHello(String name); }
[ "1360737271@qq.com" ]
1360737271@qq.com
45c74938a886fc6623da79cc599897c42fe1cfc1
342742954a6c66a3c042ae810fdaf9d91a67669f
/goja-core/src/main/java/goja/jxls/transformer/Configuration.java
9fbb86e5b08c538c3c6b508da09bb0a39b9a29f9
[ "MIT", "Apache-2.0" ]
permissive
Tifancy/goja
73055812b9a9d3015d65188f6f658ef01f84c443
444e92b88d4b0d6041b00b760934c164782a68fc
refs/heads/master
2021-01-17T23:29:54.321444
2015-05-24T12:40:43
2015-05-24T12:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,055
java
package goja.jxls.transformer; import goja.jxls.tag.JxTaglib; import goja.jxls.tag.TagLib; import org.apache.commons.digester3.Digester; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; /** * Defines configuration properties for XLS transformation * @author Leonid Vysochyn */ public class Configuration { private String metaInfoToken = "//"; private String startExpressionToken = "${"; private String endExpressionToken = "}"; private String startFormulaToken = "$["; private String endFormulaToken = "]"; private String startFormulaPartToken = "{"; private String endFormulaPartToken = "}"; private static final String tagPrefix = "jx:"; private static final String tagPrefixWithBrace = "<jx:"; private static final String forTagName = "forEach"; private static final String forTagItems = "items"; private static final String forTagVar = "var"; boolean isUTF16 = false; private HashMap tagLibs = new HashMap(); private Digester digester; private String jxlsRoot; private boolean encodeXMLAttributes = true; String sheetKeyName = "sheet"; String workbookKeyName = "workbook"; String rowKeyName = "hssfRow"; String cellKeyName = "hssfCell"; private String excludeSheetProcessingMark = "#Exclude"; boolean removeExcludeSheetProcessingMark = false; Set excludeSheets = new HashSet(); public Configuration() { registerTagLib(new JxTaglib(), "jx"); } public Configuration(String startExpressionToken, String endExpressionToken, String startFormulaToken, String endFormulaToken, String metaInfoToken) { this.startExpressionToken = startExpressionToken; this.endExpressionToken = endExpressionToken; this.startFormulaToken = startFormulaToken; this.endFormulaToken = endFormulaToken; this.metaInfoToken = metaInfoToken; registerTagLib(new JxTaglib(), "jx"); } public Configuration(String startExpressionToken, String endExpressionToken, String startFormulaToken, String endFormulaToken, String metaInfoToken, boolean isUTF16) { this.startExpressionToken = startExpressionToken; this.endExpressionToken = endExpressionToken; this.startFormulaToken = startFormulaToken; this.endFormulaToken = endFormulaToken; this.metaInfoToken = metaInfoToken; this.isUTF16 = isUTF16; registerTagLib(new JxTaglib(), "jx"); } public static final String NAMESPACE_URI = "http://jxls.sourceforge.net/jxls"; public static final String JXLS_ROOT_TAG = "jxls"; public static final String JXLS_ROOT_START = "<jx:jxls xmlns:jx=\"" + NAMESPACE_URI + "\">"; public static final String JXLS_ROOT_END = "</jx:jxls>"; private boolean jexlInnerCollectionsAccess; public boolean isJexlInnerCollectionsAccess() { return jexlInnerCollectionsAccess; } public void setJexlInnerCollectionsAccess(boolean jexlInnerCollectionsAccess) { this.jexlInnerCollectionsAccess = jexlInnerCollectionsAccess; } public boolean isUTF16() { return isUTF16; } public void setUTF16(boolean UTF16) { this.isUTF16 = UTF16; } public String getSheetKeyName() { return sheetKeyName; } public void setSheetKeyName(String sheetKeyName) { this.sheetKeyName = sheetKeyName; } public String getWorkbookKeyName() { return workbookKeyName; } public void setWorkbookKeyName(String workbookKeyName) { this.workbookKeyName = workbookKeyName; } public String getRowKeyName() { return rowKeyName; } public void setRowKeyName(String rowKeyName) { this.rowKeyName = rowKeyName; } public String getCellKeyName() { return cellKeyName; } public void setCellKeyName(String cellKeyName) { this.cellKeyName = cellKeyName; } public String getTagPrefix() { return tagPrefix; } public String getTagPrefixWithBrace() { return tagPrefixWithBrace; } public String getForTagName() { return forTagName; } public String getForTagItems() { return forTagItems; } public String getForTagVar() { return forTagVar; } public String getMetaInfoToken() { return metaInfoToken; } public void setMetaInfoToken(String metaInfoToken) { this.metaInfoToken = metaInfoToken; } public String getStartExpressionToken() { return startExpressionToken; } public void setStartExpressionToken(String startExpressionToken) { this.startExpressionToken = startExpressionToken; } public String getEndExpressionToken() { return endExpressionToken; } public void setEndExpressionToken(String endExpressionToken) { this.endExpressionToken = endExpressionToken; } public String getStartFormulaToken() { return startFormulaToken; } public void setStartFormulaToken(String startFormulaToken) { this.startFormulaToken = startFormulaToken; } public String getEndFormulaToken() { return endFormulaToken; } public void setEndFormulaToken(String endFormulaToken) { this.endFormulaToken = endFormulaToken; } public String getStartFormulaPartToken() { return startFormulaPartToken; } public void setStartFormulaPartToken(String startFormulaPartToken) { this.startFormulaPartToken = startFormulaPartToken; } public String getEndFormulaPartToken() { return endFormulaPartToken; } public void setEndFormulaPartToken(String endFormulaPartToken) { this.endFormulaPartToken = endFormulaPartToken; } public String getExcludeSheetProcessingMark() { return excludeSheetProcessingMark; } public void setExcludeSheetProcessingMark(String excludeSheetProcessingMark) { this.excludeSheetProcessingMark = excludeSheetProcessingMark; } public boolean isRemoveExcludeSheetProcessingMark() { return removeExcludeSheetProcessingMark; } public void setRemoveExcludeSheetProcessingMark(boolean removeExcludeSheetProcessingMark) { this.removeExcludeSheetProcessingMark = removeExcludeSheetProcessingMark; } public void registerTagLib(TagLib tagLib, String namespace) { if (this.tagLibs.containsKey(namespace)) { throw new RuntimeException("Duplicate tag-lib namespace: " + namespace); } this.tagLibs.put(namespace, tagLib); } public Digester getDigester() { synchronized (this) { if (digester == null) { initDigester(); } } return digester; } private void initDigester() { digester = new Digester(); digester.setNamespaceAware(true); digester.setValidating(false); StringBuffer sb = new StringBuffer(); sb.append("<jxls "); boolean firstTime = true; Map.Entry entry = null; for (Iterator itr = tagLibs.entrySet().iterator(); itr.hasNext();) { entry = (Map.Entry) itr.next(); String namespace = (String) entry.getKey(); String namespaceURI = Configuration.NAMESPACE_URI + "/" + namespace; digester.setRuleNamespaceURI(namespaceURI); if (firstTime) { firstTime = false; } else { sb.append(" "); } sb.append("xmlns:"); sb.append(namespace); sb.append("=\""); sb.append(namespaceURI); sb.append("\""); TagLib tagLib = (TagLib) entry.getValue(); Map.Entry tagEntry = null; for (Iterator itr2 = tagLib.getTags().entrySet().iterator(); itr2.hasNext();) { tagEntry = (Map.Entry) itr2.next(); digester.addObjectCreate(Configuration.JXLS_ROOT_TAG + "/" + tagEntry.getKey(), (String) tagEntry.getValue()); digester.addSetProperties(Configuration.JXLS_ROOT_TAG + "/" + tagEntry.getKey()); } } sb.append(">"); this.jxlsRoot = sb.toString(); } public String getJXLSRoot() { synchronized(this) { if (jxlsRoot == null) { initDigester(); } } return jxlsRoot; } public Set getExcludeSheets() { return this.excludeSheets; } public void addExcludeSheet(String name) { this.excludeSheets.add(name); } public String getJXLSRootEnd() { return "</jxls>"; } public boolean getEncodeXMLAttributes() { return encodeXMLAttributes; } public void setEncodeXMLAttributes(boolean encodeXMLAttributes) { this.encodeXMLAttributes = encodeXMLAttributes; } }
[ "poplar1123@gmail.com" ]
poplar1123@gmail.com
49acf2b0d1ddad32e60eee90da4afdc239d6cd32
32ad774f5dc75bc74533bb72304d05d6c514e7a8
/03-java-spring/03-spring-data-ii/03-products-and-categories/src/main/java/com/jeremyakatsa/productsandcategories/models/Association.java
c2b8dd4ab7f1dc8fd2ad28d2e013b026e9666a3f
[]
no_license
Java-September-2020/JeremyA-Assignments
4ea768e0253621187baed6185105772848cd680a
b56bec9c41880eca1becb4e4054d5ef36b02e8f3
refs/heads/master
2022-12-30T18:34:59.904635
2020-10-22T01:54:53
2020-10-22T01:54:53
292,137,154
0
1
null
null
null
null
UTF-8
Java
false
false
1,675
java
package com.jeremyakatsa.productsandcategories.models; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.PostPersist; import javax.persistence.PrePersist; import javax.persistence.Table; @Entity @Table(name="associations") public class Association { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; @Column(updatable=false) private Date createdAt; private Date updatedAt; @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="product_id") private Product product; @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="category_id") private Category category; public Association() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } public Category getCategory() { return category; } public void setCategory(Category category) { this.category = category; } @PrePersist protected void onCreate() { this.createdAt = new Date(); } @PostPersist protected void onUpdate() { this.updatedAt = new Date(); } }
[ "jeyakatsa@gmail.com" ]
jeyakatsa@gmail.com
7773f3a4d15812ebdbf300a5bcf0a41d5a1ec2b6
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/mapstruct/learning/7671/ContainerMappingMethod.java
55bcfff75527cbf981c756c7341b62a9db74fe92
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,265
java
/* * Copyright MapStruct Authors. * * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ package org.mapstruct.ap.internal.model; import java.util.Collection; import java.util.List; import java.util.Set; import org.mapstruct.ap.internal.model.common.Assignment; import org.mapstruct.ap.internal.model.common.Parameter; import org.mapstruct.ap.internal.model.common.Type; import org.mapstruct.ap.internal.model.source.Method; import org.mapstruct.ap.internal.model.source.SelectionParameters; import org.mapstruct.ap.internal.util.Strings; /** * A {@link MappingMethod} implemented by a {@link Mapper} class which does mapping of generic types. * For example Iterable or Stream. * The generic elements are mapped either by a {@link TypeConversion} or another mapping method. * * @author Filip Hrisafov */ public abstract class ContainerMappingMethod extends NormalTypeMappingMethod { private final Assignment elementAssignment; private final String loopVariableName; private final SelectionParameters selectionParameters; private final String index1Name; private final String index2Name; private IterableCreation iterableCreation; ContainerMappingMethod(Method method, Collection<String> existingVariables, Assignment parameterAssignment, MethodReference factoryMethod, boolean mapNullToDefault, String loopVariableName, List<LifecycleCallbackMethodReference> beforeMappingReferences, List<LifecycleCallbackMethodReference> afterMappingReferences, SelectionParameters selectionParameters) { super( method, existingVariables, factoryMethod, mapNullToDefault, beforeMappingReferences, afterMappingReferences ); this.elementAssignment = parameterAssignment; this.loopVariableName = loopVariableName; this.selectionParameters = selectionParameters; this.index1Name = Strings.getSafeVariableName( "i", existingVariables ); this.index2Name = Strings.getSafeVariableName( "j", existingVariables ); } public Parameter getSourceParameter() { for ( Parameter parameter : getParameters() ) { if ( !parameter.isMappingTarget() && !parameter.isMappingContext() ) { return parameter; } } throw new IllegalStateException( "Method " + this + " has no source parameter." ); } public IterableCreation getIterableCreation() { if ( iterableCreation == null ) { iterableCreation = IterableCreation.create( this, getSourceParameter() ); } return iterableCreation; } public Assignment getElementAssignment() { return elementAssignment; } @Override public Set<Type> getImportTypes() { Set<Type> types = super.getImportTypes(); if ( elementAssignment != null ) { types.addAll( elementAssignment.getImportTypes() ); } if ( iterableCreation != null ) { types.addAll ( iterableCreation.getImportTypes() ); } return types; } public String getLoopVariableName() { return loopVariableName; } public abstract Type getResultElementType(); public String getIndex1Name() { return index1Name; } public String getIndex2Name() { return index2Name; } @Override public int hashCode() { //Needed for Checkstyle, otherwise it fails due to EqualsHashCode rule return super.hashCode(); } @Override public boolean equals(Object obj) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( getClass() != obj.getClass() ) { return false; } if ( !super.equals( obj ) ) { return false; } ContainerMappingMethod other = (ContainerMappingMethod) obj; if ( this.selectionParameters != null ) { if ( !this.selectionParameters.equals( other.selectionParameters ) ) { return false; } } else if ( other.selectionParameters != null ) { return false; } return true; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
5c0d0a306900a543c6d51f9a8d6ccd47a398d674
b5f8a1631da4cb6a573fe6a6a7a23b7c5d26ce0c
/sdp/src/com/techvalley/sdp/job/Sdp1883Job.java
7d77f5bd869e30ab3b183179ada9982bb10ffa71
[]
no_license
Freduah/sdp_old
41a64406d3e84b4c3b5d7ca49420971665c98c0c
5ffccbe9343383d2cca3a62d0e3bed1b99a95376
refs/heads/master
2021-01-17T21:08:23.327183
2016-07-16T07:59:56
2016-07-16T07:59:56
36,965,744
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package com.techvalley.sdp.job; import java.sql.CallableStatement; import java.sql.ResultSet; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import com.techvalley.sdp.dbcon.SDP1883Connection; import com.techvalley.sdp.sender.Sdp1883Sender; public class Sdp1883Job implements Job { SDP1883Connection sdp1883Connection = new SDP1883Connection(); Sdp1883Sender sdp1883Sender = new Sdp1883Sender(); CallableStatement SDP1883SenderCallableStatement = null; ResultSet SDP1883SenderResult = null; String SDP1883SmsSender = "{ call sp_1883SmsSender() }"; @Override public void execute(JobExecutionContext context) throws JobExecutionException { try{ SDP1883SenderCallableStatement = sdp1883Connection.SDP1883DBConnection().prepareCall(SDP1883SmsSender); SDP1883SenderResult = SDP1883SenderCallableStatement.executeQuery(); while(SDP1883SenderResult.next()) { sdp1883Sender.SmsSender(SDP1883SenderResult.getString("spId"), SDP1883SenderResult.getString("spPassword"), SDP1883SenderResult.getString("serviceId"), SDP1883SenderResult.getString("timeStamp"), SDP1883SenderResult.getString("linkid"), SDP1883SenderResult.getString("msisdn"), SDP1883SenderResult.getString("shortCode"), SDP1883SenderResult.getString("message"), SDP1883SenderResult.getString("correlator")); //sdp1883Sender.SmsSender(spId, spPassword, serviceId, timeStamp, linkid, addresses, senderName, message, correlator); } } catch(Exception ex){ ex.printStackTrace(); } finally{ cleanConnection(); } //System.out.print("SDP 1883 Job is running here ...\n"); } private void cleanConnection() { try{ if (sdp1883Connection.SDP1883DBConnection() != null) { sdp1883Connection.SDP1883DBConnection().close(); } if (SDP1883SenderCallableStatement != null){ SDP1883SenderCallableStatement.close(); } } catch(Exception ex){ ex.printStackTrace(); } } }
[ "freduahamponsah@gmail.com" ]
freduahamponsah@gmail.com
6aafb090282c43c01c006bfaeafd287903848a01
f78f220c9149e530fa7e45eeed5374985fd951e2
/src/main/java/com/thinkgem/jeesite/modules/task/dao/TasksDetailDao.java
1aede80ff87bc54c50542595277f56285579c180
[ "Apache-2.0" ]
permissive
shanshanX/jeesite-master
0112b954e2f3ec5862b6a4d9f04879a1ca58c327
318b52f2271d62703464a5070f44e8ac93b52e6f
refs/heads/master
2020-03-28T18:42:37.753222
2018-09-15T14:06:53
2018-09-15T14:06:53
148,903,362
1
0
null
null
null
null
UTF-8
Java
false
false
504
java
/** * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.thinkgem.jeesite.modules.task.dao; import com.thinkgem.jeesite.common.persistence.CrudDao; import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao; import com.thinkgem.jeesite.modules.task.entity.TasksDetail; /** * 任务DAO接口 * @author Xieshanshan * @version 2018-09-05 */ @MyBatisDao public interface TasksDetailDao extends CrudDao<TasksDetail> { }
[ "1224227491@qq.com" ]
1224227491@qq.com
9a2d7d09ad75b8f449298bc4801974a40ed99eb7
d124bd5327aedbcba7b784f93ac2c766b36d885b
/src/test/java/com/phrase/client/model/KeyPreviewTest.java
24b5512607edae285ea6b3e224cf93851ab3060d
[ "MIT" ]
permissive
AMailanov/phrase-java
3df0b87d0e95f9422f980d8e88f3bdc1c9069d88
ef63c62b3710375bba406192876aea3694fdc22d
refs/heads/master
2023-08-03T02:21:07.031916
2021-10-05T12:08:17
2021-10-05T12:08:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,346
java
/* * Phrase API Reference * * The version of the OpenAPI document: 2.0.0 * Contact: support@phrase.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.phrase.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for KeyPreview */ public class KeyPreviewTest { private final KeyPreview model = new KeyPreview(); /** * Model tests for KeyPreview */ @Test public void testKeyPreview() { // TODO: test KeyPreview } /** * Test the property 'id' */ @Test public void idTest() { // TODO: test id } /** * Test the property 'name' */ @Test public void nameTest() { // TODO: test name } /** * Test the property 'plural' */ @Test public void pluralTest() { // TODO: test plural } }
[ "support@phrase.com" ]
support@phrase.com
9a371675dc84f335e8d072ac05c77bcb0fd07281
a5f45ad19633cd8baa3f3223fffc3db360470bca
/Result_win.java
20516a271c267c6da919f997cc33c28acc5ef0b4
[]
no_license
a101269/Interface-demo-of-Producer-consumer-problem
6eebcdfa10fc8cdf037faa5f378471da7266e49a
285920fe48c942b8f8ef1f1d2476d865edae0e2f
refs/heads/master
2020-03-29T09:30:42.422800
2018-09-21T12:41:03
2018-09-21T12:41:03
149,761,650
1
0
null
null
null
null
UTF-8
Java
false
false
3,786
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 javaapplication7; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author a101269 */ class Result_win extends javax.swing.JFrame { /** * Creates new form Result_win */ BUFFER buff = new BUFFER(); public Result_win() { setTitle("实验数据统计"); initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel5 = new javax.swing.JLabel(); closs_win = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); resultarea = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jLabel5.setText("jLabel5"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); closs_win.setText("关闭"); closs_win.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closs_winActionPerformed(evt); } }); resultarea.setColumns(20); resultarea.setRows(5); jScrollPane1.setViewportView(resultarea); jLabel1.setFont(new java.awt.Font("楷体", 0, 18)); // NOI18N jLabel1.setText("数据统计结果如下:"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(layout.createSequentialGroup() .addGap(99, 99, 99) .addComponent(closs_win) .addContainerGap(117, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closs_win) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void closs_winActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closs_winActionPerformed dispose();// TODO add your handling code here: }//GEN-LAST:event_closs_winActionPerformed /** * @param args the command line arguments */ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton closs_win; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel5; private javax.swing.JScrollPane jScrollPane1; public static javax.swing.JTextArea resultarea; // End of variables declaration//GEN-END:variables }
[ "a1012697417@qq.com" ]
a1012697417@qq.com
a0db6e88df964759593b6369f9990e387860154e
b4cf1c3ec5505911e9733747823c590a7615d1db
/structural-patterns/facade/src/main/java/pub/guoxin/design/User.java
bd36f29d06055591d0775fc54d105ae99e3a949d
[]
no_license
GuoxinL/design-patterns
81b4988adeb8d59907dfbdd140f8f1083c6855ef
891f72f3ec40c9467edb8a7ed8ae71fd15b9f8dc
refs/heads/master
2021-01-23T22:30:23.745055
2017-09-30T01:11:39
2017-09-30T01:11:39
102,936,979
1
0
null
null
null
null
UTF-8
Java
false
false
670
java
package pub.guoxin.design; /** * Created by guoxin on 17-9-11. */ public class User { /** * 如果我们没有Computer类,那么,CPU、Memory、Disk他们之间将会相互持有实例,产生关系,这 * 样会造成严重的依赖,修改一个类,可能会带来其他类的修改,这不是我们想要看到的,有了Computer * 类,他们之间的关系被放在了Computer类里,这样就起到了解耦的作用,这,就是外观模式! * @param args */ public static void main(String[] args) { Computer computer = new Computer(); computer.startup(); computer.shutdown(); } }
[ "lgx31@sina.cn" ]
lgx31@sina.cn
f6509e4530a86f872fe5d7115201257ea4279e69
1f88217ebf3b6ee1274ff263ff5e96a719d46c08
/NodoPilaG.java
eacd91df61d042588ab47723d2437c5f3a2eeba3
[]
no_license
BrayanStewartGuerrero/Pila-Java-
dd96233c29cd096a92e0b5a2b2d7c28e208fa699
d0450e9c3e77855ddc2592c2c99ed543acca3ec8
refs/heads/master
2023-05-03T03:19:51.709004
2021-05-16T23:25:35
2021-05-16T23:25:35
368,004,934
0
0
null
null
null
null
UTF-8
Java
false
false
599
java
public class NodoPilaG <A> { private A informacion; private NodoPilaG <A> siguiente; public NodoPilaG (A informacion, NodoPilaG siguiente){ this.informacion = informacion; this.siguiente = siguiente; } public A getInformacion() { return informacion; } public void setInformacion(A informacion) { this.informacion = informacion; } public NodoPilaG<A> getSiguiente() { return siguiente; } public void setSiguiente(NodoPilaG<A> siguiente) { this.siguiente = siguiente; } }
[ "brayanstewartguor@ufps.edu.co" ]
brayanstewartguor@ufps.edu.co
4527da565b7715faff6e22faa1e131259b157cec
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/23/org/apache/commons/lang3/time/DateUtils_isSameInstant_238.java
3c4b04ce5a17ea6f6170a1d360f59edb73f585c9
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,892
java
org apach common lang3 time suit util surround link java util calendar link java util date object date util dateutil lot common method manipul date calendar method requir extra explan truncat ceil round method consid math floor math ceil math round version date date field bottom order complement method introduc fragment method method date field top order date year valid date decid kind date field result instanc millisecond dai author apach softwar foundat author href mailto sergek lokitech serg knystauta author janek bogucki author href mailto ggregori seagullsw gari gregori author phil steitz author robert scholt author paul benedict version date util dateutil check calendar object repres instant time method compar millisecond time object param cal1 calendar alter param cal2 calendar alter repres millisecond instant illeg argument except illegalargumentexcept date code code instant issameinst calendar cal1 calendar cal2 cal1 cal2 illeg argument except illegalargumentexcept date cal1 time gettim time gettim cal2 time gettim time gettim
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
89183d1d896ece07cc8a09548a5a39bb4a3f5b75
1d45855d0d8feac971a8d797218f4b82785cf1c5
/app/jobs/Bootstrap.java
9bd6a713a771d8bb0959c275f48087e7cea7a1a2
[]
no_license
sanchousese/intor-adminka
8bf9cb29e05a2c843873db21e4611fc558d556a7
b12005a4a3b1b30df195f6e4598575673ed1dc19
refs/heads/master
2021-01-10T20:46:06.957620
2015-06-25T12:49:44
2015-06-25T12:49:44
37,564,622
0
0
null
2015-06-25T10:54:52
2015-06-17T01:06:05
Java
UTF-8
Java
false
false
289
java
package jobs; import play.jobs.Job; import play.jobs.OnApplicationStart; import singletones.ModelSingleton; /** * Created by sancho on 17.06.15. */ @OnApplicationStart public class Bootstrap extends Job { public void initModelApi() { ModelSingleton.getInstance(); } }
[ "saniasutula@gmail.com" ]
saniasutula@gmail.com
295673813a4ace049fb83bb0e16520f8d6edcc18
5b6298d57af4241e8437a30a390bb1c92aa5c254
/src/test/java/com/luxiti/fxtestemv/web/rest/TestUtil.java
5b889aeafe53d1a3c5dca0ac90b1b218ce35608a
[]
no_license
Aqueelone/fx-producer
2ca126878bd54928b412d96203c13f78dff11d69
a8d5793d2c98fb9e597c196647e3f4e48dfc10e2
refs/heads/master
2022-12-14T20:17:01.357827
2020-03-12T15:41:07
2020-03-12T15:41:07
246,870,676
0
0
null
2022-12-10T21:23:42
2020-03-12T15:37:05
Java
UTF-8
Java
false
false
4,348
java
package com.luxiti.fxtestemv.web.rest; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.hamcrest.Description; import org.hamcrest.TypeSafeDiagnosingMatcher; import org.springframework.http.MediaType; import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import static org.assertj.core.api.Assertions.assertThat; /** * Utility class for testing REST controllers. */ public final class TestUtil { private static final ObjectMapper mapper = createObjectMapper(); /** * MediaType for JSON */ public static final MediaType APPLICATION_JSON = MediaType.APPLICATION_JSON; private static ObjectMapper createObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false); mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); mapper.registerModule(new JavaTimeModule()); return mapper; } /** * Convert an object to JSON byte array. * * @param object the object to convert. * @return the JSON byte array. * @throws IOException */ public static byte[] convertObjectToJsonBytes(Object object) throws IOException { return mapper.writeValueAsBytes(object); } /** * Create a byte array with a specific size filled with specified data. * * @param size the size of the byte array. * @param data the data to put in the byte array. * @return the JSON byte array. */ public static byte[] createByteArray(int size, String data) { byte[] byteArray = new byte[size]; for (int i = 0; i < size; i++) { byteArray[i] = Byte.parseByte(data, 2); } return byteArray; } /** * A matcher that tests that the examined string represents the same instant as the reference datetime. */ public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> { private final ZonedDateTime date; public ZonedDateTimeMatcher(ZonedDateTime date) { this.date = date; } @Override protected boolean matchesSafely(String item, Description mismatchDescription) { try { if (!date.isEqual(ZonedDateTime.parse(item))) { mismatchDescription.appendText("was ").appendValue(item); return false; } return true; } catch (DateTimeParseException e) { mismatchDescription.appendText("was ").appendValue(item) .appendText(", which could not be parsed as a ZonedDateTime"); return false; } } @Override public void describeTo(Description description) { description.appendText("a String representing the same Instant as ").appendValue(date); } } /** * Creates a matcher that matches when the examined string represents the same instant as the reference datetime. * * @param date the reference datetime against which the examined string is checked. */ public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { return new ZonedDateTimeMatcher(date); } /** * Verifies the equals/hashcode contract on the domain object. */ public static <T> void equalsVerifier(Class<T> clazz) throws Exception { T domainObject1 = clazz.getConstructor().newInstance(); assertThat(domainObject1.toString()).isNotNull(); assertThat(domainObject1).isEqualTo(domainObject1); assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); // Test with an instance of another class Object testOtherObject = new Object(); assertThat(domainObject1).isNotEqualTo(testOtherObject); assertThat(domainObject1).isNotEqualTo(null); // Test with an instance of the same class T domainObject2 = clazz.getConstructor().newInstance(); assertThat(domainObject1).isNotEqualTo(domainObject2); } private TestUtil() {} }
[ "aqueelone@gmail.com" ]
aqueelone@gmail.com
68db8809702710fa6a7b06322daca8c7066cf287
c1a886ba8ac6b127795d8f354905dc79f52beaa8
/MyAndroidPermission/app/src/androidTest/java/com/faliuta/myandroidpermission/ExampleInstrumentedTest.java
f4d8fc64f500e0a5564cc60a158f14498ade85b3
[]
no_license
FVolodia/MyAndroidPermission
cdb291764ea6f4507b2dcf7257012f19b837e7ad
5ec404606b7b934a549543d64f5d13fdb0031864
refs/heads/master
2021-01-25T04:49:23.385588
2017-08-07T19:35:25
2017-08-07T19:35:25
93,487,281
1
0
null
null
null
null
UTF-8
Java
false
false
766
java
package com.faliuta.myandroidpermission; 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.*; /** * Instrumentation 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() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.faliuta.myandroidpermission", appContext.getPackageName()); } }
[ "falyuta.volodia@gmail.com" ]
falyuta.volodia@gmail.com
e3d0039a54e95f17ac7002718c6743e57ac81a4b
2eac37e1db2a1d823fec8e30aa0375addeec250a
/03. Backups/2016-06-25/BkavSignatures/src/com/bkav/bkavsignature/test/CertificateRevocationTest.java
bc29045e312ede43fa1ec9d000d4464c95389870
[]
no_license
tuanbs232/Digital-Signatures
d9e0cbab1a910ffe0f9643e104d95d0c80d29617
8a531b3fb567cb732bf170435c04ac829931b650
refs/heads/master
2020-12-25T16:55:20.137301
2016-08-09T09:38:55
2016-08-09T09:38:55
53,737,294
2
2
null
null
null
null
UTF-8
Java
false
false
11,596
java
package com.bkav.bkavsignature.test; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.security.interfaces.RSAPublicKey; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; import com.bkav.bkavsignature.utils.BkavSignaturesException; import com.bkav.bkavsignature.utils.CryptoToken; import com.bkav.bkavsignature.utils.CryptoTokenUtil; import com.bkav.bkavsignature.validationservice.CertificateValidator; import com.bkav.bkavsignature.validationservice.OCSPValidator; import com.itextpdf.text.pdf.codec.Base64; public class CertificateRevocationTest { private static final Logger LOG = Logger .getLogger(CertificateRevocationTest.class); static String SUB_RA_CERT_1 = "MIIEHDCCAwSgAwIBAgIQVAMv2cWFTP8PWmh0TMCYxTANBgkqhkiG9w0BAQUFADBJMQswCQYDVQQGEwJWTjEOMAwGA1UEBxMFSGFub2kxGTAXBgNVBAoTEEJrYXYgQ29ycG9yYXRpb24xDzANBgNVBAMTBkJrYXZDQTAeFw0xNTA2MjMxNDIzMjBaFw0xNjA2MjIxNDIzMjBaMIGTMR4wHAYKCZImiZPyLGQBAQwOTVNUOjAyMDEyOTUxMDYxOjA4BgNVBAMMMUPDtG5nIFR5IFROSEggxJDhuqd1IFTGsCBE4buLY2ggVuG7pSBIb8OgbmcgUGjDoXQxETAPBgNVBAcMCEjhuqNpIEFuMRUwEwYDVQQIDAxI4bqjaSBQaMOybmcxCzAJBgNVBAYTAlZOMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMkCd4cDDHKgUoGlp3CXWwbL6Vceid8l4QVh4sohsvUpAMbpHXheIP+YqmLZCcndrnSV4FPo36kxtDLwNt+zIgtbPmYw2WYvuf57CfVNH4ObLX0kIG9cdMQwHhoFYmCswQ7hs/s/lk8PriQqXl+6bor4mce7uduKpxp3PWXnuXyQIDAQABo4IBNzCCATMwMQYIKwYBBQUHAQEEJTAjMCEGCCsGAQUFBzABhhVodHRwOi8vb2NzcC5ia2F2Y2Eudm4wHQYDVR0OBBYEFNizSU2eCIhn0J0sJ3mJnY8b8E+WMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUHrAPSJff0MNnp0aEO1g7iA1TlIYwfwYDVR0fBHgwdjB0oCOgIYYfaHR0cDovL2NybC5ia2F2Y2Eudm4vQmthdkNBLmNybKJNpEswSTEPMA0GA1UEAwwGQmthdkNBMRkwFwYDVQQKDBBCa2F2IENvcnBvcmF0aW9uMQ4wDAYDVQQHDAVIYW5vaTELMAkGA1UEBhMCVk4wDgYDVR0PAQH/BAQDAgeAMB8GA1UdJQQYMBYGCCsGAQUFBwMEBgorBgEEAYI3CgMMMA0GCSqGSIb3DQEBBQUAA4IBAQCPqZU1E3MRNU+jldlfbsUs3ImrTWh4lQSlnax5ytIyLHmShl6LABpkLyFO+yETSlYh6wAei+ERACEd118msatnkxJEfMSrh4QEhQvD/d9WyOVpMIz+Kc+wxgwUP26ow64ot24EUKNg63q9dTVCPRPlUV/nZC1avxCky7BJNaonbBGIpugxkhla0e7YAvIQsOfbo3moUlvltmUAdAuwDVfrzd2DQqpQsg0peJMy2bEQhu3twosl/0T4pukHo4ghivpNJla0mmkcJanCu/JcQv2oE8TBbcZix2/W1UGDtQXJ8C9Rt4UEN383tKgz/Ppp6arWMzCGv0q01Bq9O6dMOZ3m"; static String SUB_RA_CERT_3 = "MIIEGDCCAwCgAwIBAgIQVAMJeRoHzrj4PnxycQ1nfjANBgkqhkiG9w0BAQUFADBJMQswCQYDVQQGEwJWTjEOMAwGA1UEBxMFSGFub2kxGTAXBgNVBAoTEEJrYXYgQ29ycG9yYXRpb24xDzANBgNVBAMTBkJrYXZDQTAeFw0xNTA2MjAyMzI0MDdaFw0xNjA2MTkyMzI0MDdaMIGPMR4wHAYKCZImiZPyLGQBAQwOTVNUOjAyMDA5MDk1OTMxNTAzBgNVBAMMLEPDtG5nIFR5IEPhu5UgUGjhuqduIFRoxrDGoW5nIE3huqFpIFbEqW5oIFZ5MRIwEAYDVQQHDAlMw6ogQ2jDom4xFTATBgNVBAgMDEjhuqNpIFBow7JuZzELMAkGA1UEBhMCVk4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKTPOek4HQ9Chd3Xm+Dy9SgnEmhj0pjIkPNcwnBI5wLa6NQ8VbbLmu2862J05TNsr08/LrsMGKC57g87p7028aLR5HUXrExOK2+YgpaMmZw4VSBhlfPZM/K+ANjRooBN164Nz/8nk/EhxY9VxFgJvwSJNHuX1gcGc2leMl6K0AnfAgMBAAGjggE3MIIBMzAxBggrBgEFBQcBAQQlMCMwIQYIKwYBBQUHMAGGFWh0dHA6Ly9vY3NwLmJrYXZjYS52bjAdBgNVHQ4EFgQUIKt0BcolkINBN6/UlQnvmJPL1bowDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBQesA9Il9/Qw2enRoQ7WDuIDVOUhjB/BgNVHR8EeDB2MHSgI6Ahhh9odHRwOi8vY3JsLmJrYXZjYS52bi9Ca2F2Q0EuY3Jsok2kSzBJMQ8wDQYDVQQDDAZCa2F2Q0ExGTAXBgNVBAoMEEJrYXYgQ29ycG9yYXRpb24xDjAMBgNVBAcMBUhhbm9pMQswCQYDVQQGEwJWTjAOBgNVHQ8BAf8EBAMCB4AwHwYDVR0lBBgwFgYIKwYBBQUHAwQGCisGAQQBgjcKAwwwDQYJKoZIhvcNAQEFBQADggEBAHdy3LzE3+5op+YipX82IP383AlKW0zeK4/K4A+LLdRwpkbahbbYZPsO1J9E3dBY5piKy644Ff/hSwgzfX9ZqiALRf2sGDfoG0DWOLB0sSCsarBsKwmMe5lcQojB3F3C3P5kAqURVYPYGLgUkyjTVFp866fQAPZ6D0I4c832dbD4fPx81OTuXxRSiRG9I3SeGMrxs1cHCAHWALvLwbgI9/NTGqFJMfGY2WGKskNBqydqxEJPiRxCqf2JkVs35wVZofM68r58OYl4SQnJaRySInH9nPvItnFKRYjAI3oiehhdeDzXM763kQjjWE9R/Zb3++INxkNrZJ8t6K33JYvZ58M="; static String SUB_RA_CERT_2 = "MIIEHzCCAwegAwIBAgIQVANw4UlPXfr43CWcIUYVpjANBgkqhkiG9w0BAQUFADBJMQswCQYDVQQGEwJWTjEOMAwGA1UEBxMFSGFub2kxGTAXBgNVBAoTEEJrYXYgQ29ycG9yYXRpb24xDzANBgNVBAMTBkJrYXZDQTAeFw0xNTA2MjAyMzI0MzhaFw0xNjA2MTkyMzI0MzhaMIGWMR4wHAYKCZImiZPyLGQBAQwOTVNUOjAyMDA2NDg3MTExOTA3BgNVBAMMMEPDtG5nIFR5IEPhu5UgUGjhuqduIFRoxrDGoW5nIE3huqFpIE1p4buBbiBC4bqvYzEVMBMGA1UEBwwMTmfDtCBRdXnhu4FuMRUwEwYDVQQIDAxI4bqjaSBQaMOybmcxCzAJBgNVBAYTAlZOMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuONjk43L6lKGYKFGRCx9w/wowfpKM4vPx5SYlNBaiq6C8+H6EHalUMLgYpyob9iPhh+HmKBWDR08FAojrDTpKvAWJBOPG60rkPFoo+NExbIcc61GcdEiBAzOHZEAMI0hoCRA9LLCCMjLU4P0AAaL4H7FCAR8T2GWiqA5IePlRvQIDAQABo4IBNzCCATMwMQYIKwYBBQUHAQEEJTAjMCEGCCsGAQUFBzABhhVodHRwOi8vb2NzcC5ia2F2Y2Eudm4wHQYDVR0OBBYEFK1znt/rvwdaMADClYBIk6V7z1tvMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUHrAPSJff0MNnp0aEO1g7iA1TlIYwfwYDVR0fBHgwdjB0oCOgIYYfaHR0cDovL2NybC5ia2F2Y2Eudm4vQmthdkNBLmNybKJNpEswSTEPMA0GA1UEAwwGQmthdkNBMRkwFwYDVQQKDBBCa2F2IENvcnBvcmF0aW9uMQ4wDAYDVQQHDAVIYW5vaTELMAkGA1UEBhMCVk4wDgYDVR0PAQH/BAQDAgeAMB8GA1UdJQQYMBYGCCsGAQUFBwMEBgorBgEEAYI3CgMMMA0GCSqGSIb3DQEBBQUAA4IBAQB576Qyl7opDWM7BoTvWUeEblRx4D5v5RAoxHrSAi6HrIQbza+8hJU56VqbVJWKHyiaawdJ9GKC8heUc75YzIenqqP7U6/P3pm95VPyHIZXayCtJBS2VHBDwWYSl+cEKBOAJyI8PKiQL1nhix5mFXYlO1i5i4Wc+HuQbadtG473WAXYXgwhx6jr6xCaD3LlwGC5/7JwJNZ1+hLk0yRZbGPYsDa6e500LAz1kQCnKJVczCMomaMB8ePuHLlm6HBa2DWh2A4be/O4X2dgPGCt1J+G7pntKM4Ejswi5eCgtos7GXbBgs26o8Unf4iAKunfiQ+tq4NyBYrs1fqD5Lg5ztgS"; public static void main(String[] args) { testCertOK(); } public static void checkCertificate(String base64CertData) { try { X509Certificate x509Cert = getCertFromBase64(base64CertData); int code = CertificateValidator.verify(x509Cert, null, new Date(), true, CertificateValidator.ONLY_CRL); System.out.println("" + code + ": " + CertificateValidator.getVerifyErrorName(code)); } catch (CertificateException e) { e.printStackTrace(); } catch (BkavSignaturesException e) { e.printStackTrace(); } } private static X509Certificate getCertFromBase64(String input) throws BkavSignaturesException, CertificateException { X509Certificate result = null; if (!isBase64(input)) { LOG.error("Invalid Certificate data"); throw new BkavSignaturesException("Invalid Certificate data"); } byte[] inputBytes = Base64.decode(input); ByteArrayInputStream inStream = new ByteArrayInputStream(inputBytes); try { CertificateFactory factory = CertificateFactory.getInstance("X509"); Certificate cert = factory.generateCertificate(inStream); if (cert instanceof X509Certificate) { result = (X509Certificate) cert; } } catch (CertificateException e) { LOG.error("" + e.getMessage()); throw e; } return result; } private static boolean isBase64(String input) { String pattern = "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$"; Pattern regex = Pattern.compile(pattern); Matcher matcher = regex.matcher(input); return matcher.matches(); } public static void crossCertificateTest1() { String certPath = "S:/WORK/2016/01-2016/ClientCA1.cer"; try { CertificateFactory factory = CertificateFactory.getInstance("X509"); X509Certificate clientCert = (X509Certificate) factory .generateCertificate( new FileInputStream(new File(certPath))); Date signingTime = createDate(2016, 01, 10); int code = CertificateValidator.verify(clientCert, null, signingTime); System.out.println(code); } catch (CertificateException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } public static void crossCertificateTest() { String certPath = "S:/WORK/2016/01-2016/ClientCA1.cer"; String ca2Path = "C:/BkavCA/Certificates/CA2.cer"; try { CertificateFactory factory = CertificateFactory.getInstance("X509"); X509Certificate clientCert = (X509Certificate) factory .generateCertificate( new FileInputStream(new File(certPath))); X509Certificate ca2 = (X509Certificate) factory.generateCertificate( new FileInputStream(new File(ca2Path))); Date signingTime = new Date(); int code = OCSPValidator.getRevocationStatus(clientCert, ca2, signingTime); System.out.println(code); } catch (CertificateException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } public static void testBkavOldAndNew() { String certOldPath = "S:/WORK/2015/12-2015/BkavCA.cer"; String certNewPath = "S:/WORK/2015/12-2015/BkavCA_new.cer"; try { CertificateFactory factory = CertificateFactory.getInstance("X509"); X509Certificate certOld = (X509Certificate) factory .generateCertificate( new FileInputStream(new File(certOldPath))); X509Certificate certNew = (X509Certificate) factory .generateCertificate( new FileInputStream(new File(certNewPath))); RSAPublicKey pubOld = (RSAPublicKey) certOld.getPublicKey(); System.out.println("OLD: " + pubOld.getModulus()); RSAPublicKey pubNew = (RSAPublicKey) certNew.getPublicKey(); System.out.println("NEW: " + pubNew.getModulus()); } catch (CertificateException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } } public static void testCertOK() { String serial = "5403530ff2f88cf3cde9c5d6edb47321"; CryptoToken token = null; try { token = CryptoTokenUtil.initFromTokenCSP(serial); } catch (BkavSignaturesException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Not before: 2015/04/16 Not after: 2015/07/14 Revoked: 2015/05/27 // 16:38:05 if (token != null) { X509Certificate signerCert = token.getSignerCert(); Certificate[] certChain = token.getCertChain(); System.out.println(signerCert.getNotBefore()); System.out.println(signerCert.getNotAfter()); Date signingTime = createDate(2015, 8, 18); CertificateValidator.verify(signerCert, certChain, signingTime, CertificateValidator.ONLY_CRL); } } public static void testCertRevoked() { String keystorePath = "E:\\Company\\BKAV\\Code_Demo\\540346B323887B4E02744AC4EC6D4460_Revoked_d3jpWqicAsRZ.p12"; String keystorePass = "d3jpWqicAsRZ"; // String keystorePath = "S:/WORK/2015/12-2015/BCSE_Client.p12"; // String keystorePass = "12345678"; FileInputStream inStream = null; try { inStream = new FileInputStream(new File(keystorePath)); } catch (FileNotFoundException e) { e.printStackTrace(); } CryptoToken token = null; try { token = CryptoTokenUtil.initFromPkcs12(inStream, keystorePass); } catch (BkavSignaturesException e) { // TODO Auto-generated catch block e.printStackTrace(); } // Not before: 2015/04/16 Not after: 2015/07/14 Revoked: 2015/05/27 // 16:38:05 X509Certificate signerCert = token.getSignerCert(); Certificate[] certChain = token.getCertChain(); System.out.println(signerCert.getNotBefore()); System.out.println(signerCert.getNotAfter()); Date signingTime = createDate(2015, 6, 24); int code = CertificateValidator.verify(signerCert, certChain, signingTime, CertificateValidator.ONLY_OCSP); System.out.println("RESULT: " + code); } private static Date createDate(int year, int month, int day) { String source = year + "/" + month + "/" + day; SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd"); try { return df.parse(source); } catch (ParseException e) { return new Date(); } } }
[ "tuanbs232@users.noreply.github.com" ]
tuanbs232@users.noreply.github.com
38db964a2f29a8652c8e19c4809a4a3c84aaca8a
eaa3517f321315284c77e4b0ebdb0e9692f4bd77
/WebviewDownloadManag/app/src/main/java/com/example/shays/webviewdownloadmanag/MainActivity.java
affe1473889b4232c747e17eb36856906403c6cd
[]
no_license
shayshab/Air_Pollution
3c7b2c9754d58966f6450f81f88eb97d56dd08c3
28cbeb7386796e13123e7ffdd9d96e5dff74559b
refs/heads/master
2020-04-01T10:40:00.334707
2018-11-19T03:59:50
2018-11-19T03:59:50
153,126,338
0
0
null
null
null
null
UTF-8
Java
false
false
9,757
java
package com.example.shays.webviewdownloadmanag; import android.Manifest; import android.app.Activity; import android.app.AlertDialog; import android.app.DownloadManager; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.webkit.DownloadListener; import android.webkit.URLUtil; import android.webkit.WebView; import android.widget.LinearLayout; public class MainActivity extends AppCompatActivity { private Context mContext; private Activity mActivity; private LinearLayout mRootLayout; private WebView mWebView; private static final int MY_PERMISSION_REQUEST_CODE = 123; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Get the application context mContext = getApplicationContext(); mActivity = MainActivity.this; // Get the widget reference from xml layout mRootLayout = findViewById(R.id.root_layout); mWebView = findViewById(R.id.web_view); // Check permission for write external storage checkPermission(); // The target url to surf using web view String url = "http://team-poisoncyber.blogspot.com"; // Load the url in web view mWebView.loadUrl(url); // Enable java script on web view mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDescription, String mimetype, long contentLength) { /* DownloadManager.Request This class contains all the information necessary to request a new download. The URI is the only required parameter. Note that the default download destination is a shared volume where the system might delete your file if it needs to reclaim space for system use. If this is a problem, use a location on external storage (see setDestinationUri(Uri). */ DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); /* void allowScanningByMediaScanner () If the file to be downloaded is to be scanned by MediaScanner, this method should be called before enqueue(Request) is called. */ request.allowScanningByMediaScanner(); /* DownloadManager.Request setNotificationVisibility (int visibility) Control whether a system notification is posted by the download manager while this download is running or when it is completed. If enabled, the download manager posts notifications about downloads through the system NotificationManager. By default, a notification is shown only when the download is in progress. It can take the following values: VISIBILITY_HIDDEN, VISIBILITY_VISIBLE, VISIBILITY_VISIBLE_NOTIFY_COMPLETED. If set to VISIBILITY_HIDDEN, this requires the permission android.permission.DOWNLOAD_WITHOUT_NOTIFICATION. Parameters visibility int : the visibility setting value Returns DownloadManager.Request this object */ request.setNotificationVisibility( DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); /* DownloadManager The download manager is a system service that handles long-running HTTP downloads. Clients may request that a URI be downloaded to a particular destination file. The download manager will conduct the download in the background, taking care of HTTP interactions and retrying downloads after failures or across connectivity changes and system reboots. */ /* String guessFileName (String url, String contentDisposition, String mimeType) Guesses canonical filename that a download would have, using the URL and contentDisposition. File extension, if not defined, is added based on the mimetype Parameters url String : Url to the content contentDisposition String : Content-Disposition HTTP header or null mimeType String : Mime-type of the content or null Returns String : suggested filename */ String fileName = URLUtil.guessFileName(url,contentDescription,mimetype); /* DownloadManager.Request setDestinationInExternalPublicDir (String dirType, String subPath) Set the local destination for the downloaded file to a path within the public external storage directory (as returned by getExternalStoragePublicDirectory(String)). The downloaded file is not scanned by MediaScanner. But it can be made scannable by calling allowScanningByMediaScanner(). Parameters dirType String : the directory type to pass to getExternalStoragePublicDirectory(String) subPath String : the path within the external directory, including the destination filename Returns DownloadManager.Request this object Throws IllegalStateException : If the external storage directory cannot be found or created. */ request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS,fileName); DownloadManager dManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); /* long enqueue (DownloadManager.Request request) Enqueue a new download. The download will start automatically once the download manager is ready to execute it and connectivity is available. Parameters request DownloadManager.Request : the parameters specifying this download Returns long : an ID for the download, unique across the system. This ID is used to make future calls related to this download. */ dManager.enqueue(request); } }); } protected void checkPermission(){ if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.M){ if(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED){ if(shouldShowRequestPermissionRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE)){ // show an alert dialog AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); builder.setMessage("Write external storage permission is required."); builder.setTitle("Please grant permission"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { ActivityCompat.requestPermissions( mActivity, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSION_REQUEST_CODE ); } }); builder.setNeutralButton("Cancel",null); AlertDialog dialog = builder.create(); dialog.show(); }else { // Request permission ActivityCompat.requestPermissions( mActivity, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSION_REQUEST_CODE ); } }else { // Permission already granted } } } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults){ switch(requestCode){ case MY_PERMISSION_REQUEST_CODE:{ if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED){ // Permission granted }else { // Permission denied } } } } }
[ "shayshabazad@gmail.com" ]
shayshabazad@gmail.com
a38c388edd9ba02a4a712ef5b763d358846b7b95
5dac96c3288e48e47b6dcd4a235b90f4e2204504
/Module_11/RoomDemo/app/src/main/java/com/ebookfrenzy/roomdemo/ui/main/MainFragment.java
dd1463b1a93c4cb2fa88c6c279b003a9f7cc7bb8
[]
no_license
BLTinAnnArbor/Android_ThumbDrive
3221c1d1db004b3547aea9a79b7becb5257ff577
6f3f30651c20912592892390613b91706a9ca2b7
refs/heads/master
2022-04-19T10:12:13.178655
2020-04-23T00:45:24
2020-04-23T00:45:24
237,018,592
0
0
null
null
null
null
UTF-8
Java
false
false
4,943
java
package com.ebookfrenzy.roomdemo.ui.main; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.ebookfrenzy.roomdemo.Product; import com.ebookfrenzy.roomdemo.R; import java.util.List; import java.util.Locale; public class MainFragment extends Fragment { private MainViewModel mViewModel; private ProductListAdapter adapter; private TextView productId; private EditText productName; private EditText productQuantity; public static MainFragment newInstance() { return new MainFragment(); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.main_fragment, container, false); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mViewModel = ViewModelProviders.of(this).get(MainViewModel.class); productId = getView().findViewById(R.id.productID); productName = getView().findViewById(R.id.productName); productQuantity = getView().findViewById(R.id.productQuantity); listenerSetup(); observerSetup(); recyclerSetup(); } private void observerSetup() { mViewModel.getAllProducts().observe(getViewLifecycleOwner(), new Observer<List<Product>>() { @Override public void onChanged(@Nullable final List<Product> products) { adapter.setProductList(products); } }); mViewModel.getSearchResults().observe(getViewLifecycleOwner(), new Observer<List<Product>>() { @Override public void onChanged(@Nullable final List<Product> products) { if (products.size() > 0) { productId.setText(String.format(Locale.US, "%d", products.get(0).getId())); productName.setText(products.get(0).getName()); productQuantity.setText(String.format(Locale.US, "%d", products.get(0).getQuantity())); } else { productId.setText("No Match"); } } }); } private void recyclerSetup() { RecyclerView recyclerView; adapter = new ProductListAdapter(R.layout.product_list_item); recyclerView = getView().findViewById(R.id.product_recycler); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); recyclerView.setAdapter(adapter); } private void listenerSetup(){ Button addButton = getView().findViewById(R.id.addButton); Button findButton = getView().findViewById(R.id.findButton); Button deleteButton = getView().findViewById(R.id.deleteButton); addButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String name = productName.getText().toString(); String quantity = productQuantity.getText().toString(); if (!name.equals("") && !quantity.equals("")) { // Input is okay, so create a new product Product product = new Product(name, Integer.parseInt(quantity)); mViewModel.insertProduct(product); // and insert it. clearFields(); } else { productId.setText("Incomplete information"); } } }); findButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mViewModel.findProduct(productName.getText().toString()); } }); deleteButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mViewModel.deleteProduct(productName.getText().toString()); clearFields(); } }); } // listenerSetup() private void clearFields(){ productId.setText(""); productName.setText(""); productQuantity.setText(""); } }
[ "tbl101@wccnet.edu" ]
tbl101@wccnet.edu
f527b6e92a5574c68e7da58af485cbdcd3797d2b
675cbffa1d3e6716f0f89db8ac0ca637105967cf
/app/src/main/java/com/huatu/handheld_huatu/utils/ActivityPermissionDispatcher.java
74d255d831632431655c265ccf53a1b6ec36fbf8
[]
no_license
led-os/HTWorks
d5bd33e7fddf99930c318ced94869c17f7a97836
ee94e8a2678b8a2ea79e73026d665d57f312f7e2
refs/heads/master
2022-04-05T02:56:14.051111
2020-01-21T07:38:25
2020-01-21T07:38:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,077
java
package com.huatu.handheld_huatu.utils; import android.Manifest; import android.app.Activity; import android.content.pm.PackageManager; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; /** * @author zhaodongdong */ public class ActivityPermissionDispatcher { private static ActivityPermissionDispatcher mDispatcher; public static ActivityPermissionDispatcher getInstance() { if (mDispatcher == null) { synchronized (ActivityPermissionDispatcher.class) { if (mDispatcher == null) { mDispatcher = new ActivityPermissionDispatcher(); } } } return mDispatcher; } private PermissionCallback mCallback; public interface PermissionCallback { void onPermissionNeverAskAgain(int request); void onPermissionDenied(int request); void onPermissionSuccess(int request); void onPermissionExplain(int request); } /** * 设置权限回调 * * @param callback 权限回调 */ public void setPermissionCallback(PermissionCallback callback) { mCallback = callback; } public ActivityPermissionDispatcher() { } /** * SD卡读写权限 * * @param activity activity */ public void checkedWithStorage(Activity activity) { checkedWithPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, Constant.PERMISSION_STORAGE_REQUEST_CODE); } /** * camera 权限 * * @param activity activity */ public void checkedWithCamera(Activity activity) { checkedWithPermission(activity, Manifest.permission.CAMERA, Constant.PERMISSION_CAMERA_REQUEST_CODE); } /** * 短信操作权限 * * @param activity activity */ public void checkedWithSMS(Activity activity) { checkedWithPermission(activity, Manifest.permission.READ_SMS, Constant.PERMISSION_SMS_REQUEST_CODE); } /** * 电话权限 * * @param activity activity */ public void checkedWithPhone(Activity activity) { checkedWithPermission(activity, Manifest.permission.READ_PHONE_STATE, Constant.PERMISSION_PHONE_REQUEST_CODE); } /** * 联系人权限 * * @param activity activity */ public void checkedWithContacts(Activity activity) { checkedWithPermission(activity, Manifest.permission.READ_CONTACTS, Constant.PERMISSION_CONTACTS_REQUEST_CODE); } /** * 位置权限 * * @param activity activity */ public void checkedWithLocation(Activity activity) { checkedWithPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION, Constant.PERMISSION_LOCATION_REQUEST_CODE); } /** * 权限处理 * * @param activity activity * @param permission Manifest.permission. * @param request 权限请求码 */ public void checkedWithPermission(Activity activity, String permission, int request) { int hasPermissionStorage = ContextCompat.checkSelfPermission(activity, permission); if (hasPermissionStorage != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(activity, permission)) { mCallback.onPermissionExplain(request); } else { ActivityCompat.requestPermissions(activity, new String[]{permission}, request); } } else { mCallback.onPermissionSuccess(request); } } /** * 权限请求结果处理 * * @param activity activity * @param requestCode 请求码 * @param grantResults result */ public void onRequestPermissionResult(Activity activity, int requestCode, int[] grantResults) { switch (requestCode) { case Constant.PERMISSION_STORAGE_REQUEST_CODE: if (verifyPermission(grantResults)) { mCallback.onPermissionSuccess(requestCode); } else { //denied if (!ActivityCompat.shouldShowRequestPermissionRationale(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE)) { mCallback.onPermissionNeverAskAgain(requestCode); } else { mCallback.onPermissionDenied(requestCode); } } break; } } /** * 验证请求结果 * * @param grantResults result * @return true为通过 */ private boolean verifyPermission(int... grantResults) { if (grantResults.length == 0) { return false; } for (int result : grantResults) { if (result != PackageManager.PERMISSION_GRANTED) { return false; } } return true; } /** * 销毁持有对象,防止内存泄露 */ public void clear() { mCallback = null; } }
[ "yaohu2011@163.com" ]
yaohu2011@163.com
75587115697697e7c27f52f4c11059e39980e9f3
720e257c82b1e4d0498cc440a56299c20c1036c2
/app/src/main/java/com/example/phoneshop/Fragment/FragmentMain.java
e08345a24703f244154c38c91f2d42acb1d76344
[]
no_license
MonipichMP/PhoneShopSemester2
3d05c7f5fafd06bb6a6b9e2a0712349f460cf0d0
d5eaf71b9c319e3481001e9ba2b0e978e73e0072
refs/heads/master
2020-08-05T22:58:19.787640
2019-10-04T05:56:28
2019-10-04T05:56:28
212,745,551
0
0
null
null
null
null
UTF-8
Java
false
false
9,744
java
package com.example.phoneshop.Fragment; import android.graphics.Bitmap; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.util.LruCache; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Toast; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.ImageLoader; import com.android.volley.toolbox.JsonArrayRequest; import com.android.volley.toolbox.Volley; import com.daimajia.slider.library.Animations.DescriptionAnimation; import com.daimajia.slider.library.SliderLayout; import com.daimajia.slider.library.SliderTypes.BaseSliderView; import com.daimajia.slider.library.SliderTypes.TextSliderView; import com.daimajia.slider.library.Tricks.ViewPagerEx; import com.example.phoneshop.AdapterMain; import com.example.phoneshop.R; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.Arrays; import java.util.HashMap; public class FragmentMain extends Fragment implements BaseSliderView.OnSliderClickListener, ViewPagerEx.OnPageChangeListener{ Toolbar toolbar; SliderLayout sliderLayout; HashMap<String, String> HashMapForURL; RecyclerView recyclerView; RecyclerView.LayoutManager layoutManager; AdapterMain adapter; @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_main, container, false); sliderLayout = view.findViewById(R.id.slider); recyclerView = view.findViewById(R.id.recyclerViewMain); Toolbar toolbar = view.findViewById(R.id.toolbarMain); ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar); toolbar.setTitleTextColor(Color.WHITE); AddImagesUrlOnline(); for (String name : HashMapForURL.keySet()) { TextSliderView textSliderView = new TextSliderView(getContext()); textSliderView .description(name) .image(HashMapForURL.get(name)) .setScaleType(BaseSliderView.ScaleType.Fit) .setOnSliderClickListener(this); textSliderView.bundle(new Bundle()); textSliderView.getBundle() .putString("extra", name); sliderLayout.addSlider(textSliderView); } sliderLayout.setPresetTransformer(SliderLayout.Transformer.DepthPage); sliderLayout.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom); sliderLayout.setCustomAnimation(new DescriptionAnimation()); sliderLayout.setDuration(3000); sliderLayout.addOnPageChangeListener(this); layoutManager = new LinearLayoutManager(getActivity()){ @Override public boolean canScrollVertically() { return false; } }; recyclerView.setLayoutManager(layoutManager); adapter = new AdapterMain(); recyclerView.setAdapter(adapter); // adapter.setClick(this); RequestQueue queue = Volley.newRequestQueue(getContext()); //create request String url = "https://api.myjson.com/bins/b772b"; JsonArrayRequest request = new JsonArrayRequest(url, new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray response) { //phone names String[] phoneNames = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneNames[i] = jsonObject.getString("name"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneNames(phoneNames); //phone prices String[] phonePrices = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phonePrices[i] = jsonObject.getString("price"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhonePrices(phonePrices); //phone image url String[] phoneImageUrl = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneImageUrl[i] = jsonObject.getString("image"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneImageUrls(phoneImageUrl); //phone battery String[] phoneBattery = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneBattery[i] = jsonObject.getString("battery"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneBattery(phoneBattery); //phone brand String[] phoneBrand = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneBrand[i] = jsonObject.getString("brand"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneBrand(phoneBrand); //phone memory String[] phoneMemory = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneMemory[i] = jsonObject.getString("memory"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneMemory(phoneMemory); //phone weight String[] phoneWeight = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneWeight[i] = jsonObject.getString("weight"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneWeight(phoneWeight); //phone screenSize String[] phoneScreenSize = new String[response.length()]; for (int i = 0; i <= response.length(); i++) { try { JSONObject jsonObject = response.getJSONObject(i); phoneScreenSize[i] = jsonObject.getString("screensize"); } catch (JSONException e) { e.printStackTrace(); } } adapter.setPhoneScreenSize(phoneScreenSize); Log.d("test0", "data :" + Arrays.toString(phoneImageUrl)); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d("bug", "load data error" + error.getMessage()); } }); queue.add(request); return view; } public void AddImagesUrlOnline() { HashMapForURL = new HashMap<>(); HashMapForURL.put("iphone x", "https://drop.ndtv.com/TECH/product_database/images/913201720152AM_635_iphone_x.jpeg"); HashMapForURL.put("iphone xr", "http://d176tvmxv7v9ww.cloudfront.net/product/cache/12/image/9df78eab33525d08d6e5fb8d27136e95/i/m/img-_0000s_0002_iphone-xr-red-select-201809_av2_geo_emea_1_6.jpg"); HashMapForURL.put("iphone x1", "https://assets.pcmag.com/media/images/608623-iphone-xs-max.jpg?thumb=y"); HashMapForURL.put("iphone x2", "https://assets.pcmag.com/media/images/608709-comparison.jpg?thumb=y&width=980&height=456"); HashMapForURL.put("iphone x3", "https://amp.businessinsider.com/images/5a00bd8258a0c1776f8b4aff-750-500.jpg"); } @Override public void onSliderClick(BaseSliderView slider) { } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { } @Override public void onPageScrollStateChanged(int state) { } }
[ "pichkhmer007@gmail.com" ]
pichkhmer007@gmail.com
47c35a382d3e8c51db3692a69d40cdfb1e2328d9
50597bff5504a44a7ab7dd441a5fcfe8cbc4a23d
/smartag-20180313/src/main/java/com/aliyun/smartag20180313/models/CreateNetworkOptimizationResponse.java
f068add5d57e1f0c7bcc8e522ddca44e1168673e
[ "Apache-2.0" ]
permissive
shayv-123/alibabacloud-java-sdk
63fe9c0f6afe094d9dcfc19bf317e7ef8d5303e1
df7a6f7092f75ea3ba62de2c990dfcd986c3f66f
refs/heads/master
2023-05-05T02:22:41.236951
2021-05-11T09:55:17
2021-05-11T09:55:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.smartag20180313.models; import com.aliyun.tea.*; public class CreateNetworkOptimizationResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public CreateNetworkOptimizationResponseBody body; public static CreateNetworkOptimizationResponse build(java.util.Map<String, ?> map) throws Exception { CreateNetworkOptimizationResponse self = new CreateNetworkOptimizationResponse(); return TeaModel.build(map, self); } public CreateNetworkOptimizationResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public CreateNetworkOptimizationResponse setBody(CreateNetworkOptimizationResponseBody body) { this.body = body; return this; } public CreateNetworkOptimizationResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
c85fa88c23693c6c0d568089eede161dec8cca17
8810496f1e57140c2346b2f298916f7695cb238d
/LPL_XML/src/main/java/com/shiva/generated/LocationRelationshipType.java
0a6eeb1bed51271408f9d0f59d5725babd394f3b
[]
no_license
NairitCh/SystemwareAPI
14b7c5a31179f501351b8415d31bb3b5edb6a7f2
03ad0c9826464fa0aa9fef475c1be0cd3b448206
refs/heads/master
2020-03-19T17:47:16.813258
2018-07-01T07:01:35
2018-07-01T07:01:35
136,777,831
1
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // 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: 2018.07.01 at 09:59:34 AM IST // package com.shiva.generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LocationRelationshipType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LocationRelationshipType"> * &lt;simpleContent> * &lt;extension base="&lt;>OpenEnum"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LocationRelationshipType") public class LocationRelationshipType extends OpenEnum { }
[ "606905@LT036994.cts.com" ]
606905@LT036994.cts.com
4d699d22c5c3edb78c166288899ecce63ae4a518
62517597fc25687e19d58d4120721f33f2505322
/src/main/java/com/evacipated/cardcrawl/mod/bard/cards/MelodyCard.java
3e7947d91d7e1659f5000e1742f330860143bcc5
[]
no_license
Rita-Bernstein/Bard
cee20590b44954d96ae4b5cc2032acdc755b4495
997d39f7e0a05892d4cd64ef532c3196822b1148
refs/heads/master
2020-05-25T15:08:03.407382
2019-06-06T15:21:50
2019-06-06T15:21:50
187,860,907
0
0
null
2019-06-06T15:19:43
2019-05-21T15:02:58
Java
UTF-8
Java
false
false
2,093
java
package com.evacipated.cardcrawl.mod.bard.cards; import basemod.abstracts.CustomCard; import com.evacipated.cardcrawl.mod.bard.BardMod; import com.evacipated.cardcrawl.mod.bard.CardIgnore; import com.evacipated.cardcrawl.mod.bard.characters.Bard; import com.evacipated.cardcrawl.mod.bard.notes.AbstractNote; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.monsters.AbstractMonster; import java.util.List; import java.util.function.Consumer; @CardIgnore public class MelodyCard extends CustomCard { public static final String ID = BardMod.makeID("MelodyCard"); private static final int COST = -2; public List<AbstractNote> notes; public boolean consumeNotes = true; private Consumer<Boolean> playCallback; public MelodyCard(String name, String description, List<AbstractNote> notes, CardType type) { this(name, new RegionName(null), description, notes, type, CardTarget.NONE, null); } public MelodyCard(String name, RegionName img, String description, List<AbstractNote> notes, CardTarget target, Consumer<Boolean> playCallback) { this(name, img, description, notes, CardType.POWER, target, playCallback); } public MelodyCard(String name, RegionName img, String description, List<AbstractNote> notes, CardType type, CardTarget target, Consumer<Boolean> playCallback) { super(ID, name, img, COST, description, type, Bard.Enums.COLOR, CardRarity.SPECIAL, target); this.notes = notes; this.playCallback = playCallback; } @Override public void use(AbstractPlayer p, AbstractMonster m) { if (playCallback != null) { playCallback.accept(consumeNotes); } } @Override public boolean canUpgrade() { return false; } @Override public void upgrade() { } @Override public AbstractCard makeCopy() { return new MelodyCard(name, new RegionName(assetUrl), rawDescription, notes, target, playCallback); } }
[ "kiooeht@gmail.com" ]
kiooeht@gmail.com
16ad430be1e4081df4138f426291ba60a3d588be
cde4358da2cbef4d8ca7caeb4b90939ca3f1f1ef
/java/quantserver/snmpagent/src/main/java/deltix/snmp/mibc/StandardEntityBean.java
029c7fe57c147f7f58515475d90022485c34feb1
[ "Apache-2.0" ]
permissive
ptuyo/TimeBase
e17a33e0bfedcbbafd3618189e4de45416ec7259
812e178b814a604740da3c15cc64e42c57d69036
refs/heads/master
2022-12-18T19:41:46.084759
2020-09-29T11:03:50
2020-09-29T11:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package deltix.snmp.mibc; /** * */ public abstract class StandardEntityBean implements CompiledEntity { private final String id; public StandardEntityBean (String id) { this.id = id; } @Override public String getId () { return (id); } }
[ "akarpovich@deltixlab.com" ]
akarpovich@deltixlab.com
670ca8a2e79edcdf6cd9e8c8440c797ba4ab313b
5855919e4d40aa86463572110a69d3611bd2a495
/src/br/unisul/servlet/autor/EditAutorServlet.java
ad051d8171f79b71e76fc0276ef87684de1aa36d
[]
no_license
fabriciokalbusch/Blog
630ee09e72c0bed808a50fe4653917db41355f1d
986f72856dc8f6c1709d59f067e68fead7c16fd1
refs/heads/master
2016-09-15T03:36:16.684481
2016-05-14T18:41:39
2016-05-14T18:41:39
41,126,654
0
0
null
null
null
null
UTF-8
Java
false
false
2,074
java
package br.unisul.servlet.autor; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import br.unisul.dao.AutorDAO; import br.unisul.dao.UsuarioDAO; import br.unisul.model.Autor; import br.unisul.model.Usuario; import br.unisul.servlet.ServletBase; @WebServlet("/editAutor") public class EditAutorServlet extends ServletBase { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Long id = Long.valueOf(request.getParameter("id")); AutorDAO dao = new AutorDAO(); Autor autor = dao.findById(id); request.setAttribute("autor", autor); request.setAttribute("action", "editAutor"); redirecionaParaPagina(request, response, "/cadAutor.jsp"); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Autor autor = recuperaParametrosEPopulaEntidade(request); atualizaAutor(autor); request.setAttribute("autor", autor); request.setAttribute("action", "editAutor"); mostraMensagemSucessoUpdate(request); redirecionaParaPagina(request, response, "/cadAutor.jsp"); } private void atualizaAutor(Autor autor) { AutorDAO dao = new AutorDAO(); dao.updateAutor(autor); UsuarioDAO daoUser = new UsuarioDAO(); daoUser.updateUsuario(autor.getUsuario()); } private Autor recuperaParametrosEPopulaEntidade(HttpServletRequest request) { Usuario usuario = new Usuario(); usuario.setId(Long.valueOf(request.getParameter("idUsuario"))); usuario.setNome(request.getParameter("autor")); usuario.setLogin(request.getParameter("login")); usuario.setSenha(request.getParameter("senha")); usuario.setTpUsuarioAutor(); Autor autor = new Autor(); autor.setId(Long.valueOf(request.getParameter("id"))); autor.setPerfil(request.getParameter("perfil")); autor.setUsuario(usuario); return autor; } }
[ "fabriciokalbusch@ig.com.br" ]
fabriciokalbusch@ig.com.br
ea90363d9eea52f98a1eb29b4e6093a8b0243c29
26d0ff86f1e97b0a1c8a078812aa29808bb5b35e
/test-customer/src/main/java/test/dubbo/customer/Customer.java
1682f110b27a0cd71ca0a214e9ac448b80d6a0ae
[]
no_license
hcy0411/testDubbo
8b2a01fbbb99fa8dc780cd3f52aacefeff252361
44394ff823de6562c593cecdd50b12be553d4b5f
refs/heads/master
2021-01-24T08:54:32.217389
2017-06-05T10:23:35
2017-06-05T10:23:35
93,392,445
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package test.dubbo.customer; import org.springframework.context.support.ClassPathXmlApplicationContext; import test.dubbo.api.FileOperate; public class Customer { public static void main(String[] args) { ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:applicationContext.xml"); applicationContext.start(); try { FileOperate fileOperate = (FileOperate) applicationContext.getBean("operateServer"); fileOperate.write("test.txt", "haha\r\n"); String context = fileOperate.readOneLine("test.txt",3); System.out.print(context); } catch (Exception e) { e.printStackTrace(); } } }
[ "hanchunyang@weidian.com" ]
hanchunyang@weidian.com
d0f2a12c33bba51e2979da5c60df426990e50347
de806161d50f53f4b4249d5ea53ddddc82bfd3f6
/bench4q/tag/Bench4Q_1.2.1/src/org/bench4Q/common/communication/CommunicationDefaults.java
75ec380f15314176256e1b1e1a3d02dc457baead
[]
no_license
lijianfeng941227/Bench4Q-TPCW
1ad2141fd852ad88c6db3ed8ae89a56f2fdb0ecc
2e1c84d1bf1d6cdad4b19a348daf85b59e4f1ce4
refs/heads/master
2021-01-11T05:43:33.312249
2016-04-07T01:58:01
2016-04-07T01:58:01
71,343,265
1
0
null
2016-10-19T09:55:21
2016-10-19T09:55:21
null
UTF-8
Java
false
false
1,768
java
/** * ========================================================================= * Bench4Q version 1.2.1 * ========================================================================= * * Bench4Q is available on the Internet at http://forge.ow2.org/projects/jaspte * You can find latest version there. * * Distributed according to the GNU Lesser General Public Licence. * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or any * later version. * * SEE Copyright.txt FOR FULL COPYRIGHT INFORMATION. * * This source code is distributed "as is" in the hope that it will be * useful. It comes with no warranty, and no author or distributor * accepts any responsibility for the consequences of its use. * * * This version is a based on the implementation of TPC-W from University of Wisconsin. * This version used some source code of The Grinder. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Initial developer(s): Zhiquan Duan. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package org.bench4Q.common.communication; /** * Default communication constants. */ public final class CommunicationDefaults { private CommunicationDefaults() { } /** Default console host. Bind to all interfaces by default. */ public static final String CONSOLE_HOST = ""; /** Default console port. */ public static final int CONSOLE_PORT = 6372; /** Minimum value for ports. */ public static final int MIN_PORT = 1; /** Maximum value for ports. */ public static final int MAX_PORT = 0xFFFF; }
[ "silenceofdaybreak@gmail.com" ]
silenceofdaybreak@gmail.com
7a1970e58743bfb9e38c2e05cd2520dcf41016ae
eb28a4d77f1c91ffcb9d3560b50cba9873673539
/taskCollections/Task4Tests.java
be81d5c8021e79634bbe467b25ea43535dda77a9
[]
no_license
denmats/Java_2019
ee9de98e13e6bf75de81f221fb2fb05c361b8e23
6f770217b2bec45353bacd4299ec600908621fe4
refs/heads/master
2020-05-15T23:51:19.013238
2019-05-06T08:20:59
2019-05-06T08:20:59
182,563,861
0
0
null
null
null
null
UTF-8
Java
false
false
3,700
java
package taskCollections; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Task4Tests { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { //User give start number of random range. //The program will generate a scope of 49 random numbers //The scope begins from start number given by User System.out.println("Random range from 49 numbers will generated"); System.out.print("Give the start number of this range: "); int startR = 0; int endR; if (sc.hasNextInt()) { startR = sc.nextInt(); } endR = startR + 49; //The program generate a scope of 49 random numbers int count = 0; int[] randArr49 = new int[49]; while (count != 49) { randArr49[count] = startR + (int) (Math.random() * ((endR - startR) + 1)); count++; } //The program shows User these numbers System.out.println("Choose six unique numbers from displayed"); for (Integer x : randArr49) { System.out.print(x + " "); } System.out.println(""); //User choose six numbers from the scope //If User will chose number out of scope //or it will be repeated number //The program makes User repeat the choice int userCount6 = 0; int userInput; Set<Integer> userRange = new HashSet<>(6); while (userRange.size() != 6) { boolean flag = false; System.out.print("your choice: "); if (sc.hasNextInt()) { userInput = sc.nextInt(); for (Integer x : randArr49) { if (userInput == x) { userRange.add(x); userCount6++; flag = true; } } if (flag == false) System.out.println("You've chosen number out of range"); } } //Show numbers are chosen by User System.out.print("The numbers are chosen by you: "); for (Integer x : userRange) System.out.print(x + " "); System.out.println(""); //The program begin generate six random numbers from the scope //Till the all generated numbers will equal User's numbers int compRand; int compCount = 0; Set<Integer> computerCollection = new HashSet<>(6); while (!computerCollection.equals(userRange)) { compRand = startR + (int) (Math.random() * ((endR - startR) + 1)); for (Integer x : userRange) { if (compRand == x) computerCollection.add(compRand); } compCount++; } //Show generated numbers System.out.print("The numbers are generated by the program: "); for (Integer x : computerCollection) System.out.print(x + " "); System.out.println(""); System.out.println("##Numbers of cycles: " + compCount); int year, day = 0; year = compCount / 365; if (compCount % 365 == 0) { System.out.println("The program will generate this numbers by" + " Years: " + year + " Days: " + day); } else if (year < 1) { day = compCount; System.out.println("The program will generate this numbers by" + " Years: " + year + " Days: " + day); } else { day = compCount - 365 * year; System.out.println("The program will generate this numbers by" + " Years: " + year + " Days: " + day); } } }
[ "denys.matsuiev@gmail.com" ]
denys.matsuiev@gmail.com
68c4dd4352a4925534e0ac4b307587223f85d193
fa37e3120232a76b943ff46a89b5f67bf3ed825e
/src/main/scala/exawizards2019/F.java
cd6cf83f7312da719e616bf2a0e7402a5dd52143
[]
no_license
nishiyamayo/atcoder-practice
860a1da653eb1fa5bc36d290b28c269de54824d5
f18d5c544699a99b9c8c11879326d3fea3d870d3
refs/heads/master
2021-06-20T06:00:32.065296
2021-03-15T09:40:28
2021-03-15T09:40:28
174,263,505
0
0
null
null
null
null
UTF-8
Java
false
false
1,709
java
package exawizards2019; import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; import java.util.stream.Collectors; public class F { static void debug(Object...os) { System.err.println(Arrays.deepToString(os)); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = " " + sc.next(); String t = " " + sc.next(); int lens = s.length(), lent = t.length(); int[][] dp = new int[lens][lent]; int[][] path = new int[lens][lent]; dp[0][0] = 0; int[] dx = {1, 0, 1}, dy = {0, 1, 1}; for (int i = 1; i < lens; i++) { for (int j = 1; j < lent; j++) { if (s.charAt(i) == t.charAt(j) && dp[i - 1][j - 1] + 1 > dp[i][j]) { dp[i][j] = dp[i - 1][j - 1] + 1; path[i][j] = 2; } if (dp[i][j] < dp[i - 1][j]) { dp[i][j] = dp[i - 1][j]; path[i][j] = 0; } if (dp[i][j] < dp[i][j - 1]) { dp[i][j] = dp[i][j - 1]; path[i][j] = 1; } } } int ps = lens - 1, pt = lent - 1; LinkedList<Character> sb = new LinkedList<>(); while (ps != 0 && pt != 0) { if (path[ps][pt] == 2) { sb.addFirst(s.charAt(ps)); } int ns = ps - dx[path[ps][pt]]; int nt = pt - dy[path[ps][pt]]; ps = ns; pt = nt; } String ans = sb.stream().map(c -> "" + c).collect(Collectors.joining("", "", "")); System.out.println(ans); } }
[ "nishiyama_yo@cyberagent.co.jp" ]
nishiyama_yo@cyberagent.co.jp
6828d436be9b0fe70592f469719037aca8262f2d
6b8baffe51aa1983615afa7145256973203ec453
/app/src/main/java/com/example/riamon_v/java_epicture_2017/Api/Imgur/Services/EditImageService.java
5c2b87b6caeacad936ee87cffe815f3db0c999e8
[]
no_license
riamon-v/Epicture-Java
a12c11c665437596b9cfb7af28924cb5e49a4d7f
d3ca30477f49194b8c6a480e7406c9f7877cb449
refs/heads/master
2021-01-24T12:23:43.034659
2018-02-18T16:57:12
2018-02-18T16:57:12
123,134,665
0
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package com.example.riamon_v.java_epicture_2017.Api.Imgur.Services; import android.content.Context; import com.example.riamon_v.java_epicture_2017.Api.Imgur.ImgurModel.AllObjects; import com.example.riamon_v.java_epicture_2017.Api.Imgur.ImgurModel.ImgurHandler; import com.example.riamon_v.java_epicture_2017.Api.Imgur.ImgurModel.UploadObject; import com.example.riamon_v.java_epicture_2017.Api.NetworkUtils; import com.example.riamon_v.java_epicture_2017.DatabaseManagment.User; import retrofit.Callback; import retrofit.RestAdapter; /** * Created by riamon_v on 15/02/2018. */ public class EditImageService extends Services { public EditImageService(Context ctx, User u, String id) { super(ctx, u, id); } public void Execute(UploadObject upload, Callback<AllObjects.ManageImg> callback) { final Callback<AllObjects.ManageImg> cb = callback; if (!NetworkUtils.isConnected(mContext.get())) { cb.failure(null); return; } RestAdapter restAdapter = buildRestAdapter(); restAdapter.create(ImgurHandler.class).editImage( mId, "Bearer " + mUser.getTokenImgur(), upload.title, upload.description, cb); } }
[ "vincent.riamon@epitech.eu" ]
vincent.riamon@epitech.eu
413f38d54479cd62f18df3db5f43e7540c5adebd
ae320083b1496bfa5113e2e9982e31c012cceece
/hf_sdk/android/src/main/java/com/ultralinked/voip/rtcapi/eNETRTC_CALL_STATE.java
a928626e4d3dc3af0d462c8a69291b5cba0337df
[ "Apache-2.0" ]
permissive
cdut007/flutter_company_chat
a548f1a19d3c8d418bf31f6de7eeb620118fd5f9
9c8b70a157b9dad2163f46f317b15f5c2ac9df68
refs/heads/master
2020-04-19T02:18:33.335297
2019-04-26T06:46:13
2019-04-26T06:46:13
167,898,037
1
1
null
null
null
null
UTF-8
Java
false
false
1,703
java
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.11 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package com.ultralinked.voip.rtcapi; public enum eNETRTC_CALL_STATE { netrtc_CALL_STATE_IDLE, netrtc_CALL_STATE_INCOMING, netrtc_CALL_STATE_OUTGOING, netrtc_CALL_STATE_ESTABLISHED, netrtc_CALL_STATE_HOLDON; public final int swigValue() { return swigValue; } public static eNETRTC_CALL_STATE swigToEnum(int swigValue) { eNETRTC_CALL_STATE[] swigValues = eNETRTC_CALL_STATE.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (eNETRTC_CALL_STATE swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + eNETRTC_CALL_STATE.class + " with value " + swigValue); } @SuppressWarnings("unused") private eNETRTC_CALL_STATE() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private eNETRTC_CALL_STATE(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private eNETRTC_CALL_STATE(eNETRTC_CALL_STATE swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } }
[ "yongjun@ulralinked.com" ]
yongjun@ulralinked.com
52bd8c4fac14fe6b3e425fb5b47486201e43ca14
cde13ffcc267b720c068711c02c286fc8b9445a8
/src/main/java/com/leeves/springbootdynamicdatasource/config/DynamicDataSourceAspect.java
8f32986a1f15fc2b236382e0276486c62c7a2602
[]
no_license
leevsee/spring-boot-dynamic-datasource
ab115a759c81839cfad4038ffb790cd03404df40
de9116fd8d14bd09e3c50d54ac9f12e2f1d2294d
refs/heads/master
2020-03-24T03:17:17.738903
2018-07-30T14:06:06
2018-07-30T14:06:06
142,412,675
0
0
null
null
null
null
UTF-8
Java
false
false
3,150
java
package com.leeves.springbootdynamicdatasource.config; import com.leeves.springbootdynamicdatasource.annotation.DS; import com.leeves.springbootdynamicdatasource.comm.DataSourceType; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import java.lang.reflect.Method; /** * Description: aop类,用于动态设置数据源 * Package: com.leeves.springbootdynamicdatasource.config * * @author Leeves * @version 1.0.0 2018-07-16 */ @Aspect @Order(-1) @Component public class DynamicDataSourceAspect { private static final Logger logger = LoggerFactory.getLogger(DynamicDataSourceAspect.class); /** * 执行方法前更换数据源 * */ @Before("@annotation(ds)") public void doBefore(JoinPoint joinPoint, DS ds) { DataSourceType dataSourceType = ds.dtaSourceType(); if (dataSourceType == DataSourceType.DB_SLAVE1) { logger.info("设置数据源为:" + DataSourceType.DB_SLAVE1); DynamicDataSourceContextHolder.set(DataSourceType.DB_SLAVE1); } else { logger.info("使用默认数据源:" + DataSourceType.DB_MASTER); DynamicDataSourceContextHolder.set(DataSourceType.DB_MASTER); } } /** * 执行方法后清除数据源设置 * */ @After("@annotation(ds)") public void doAfter(JoinPoint joinPoint, DS ds) { logger.info("当前数据源为:"+ds.dtaSourceType()+"。然后执行清理数据源设置方法"); DynamicDataSourceContextHolder.clear(); } /** * 在service下以query开头的方法,且没有用DS注解,则使用副库 * */ @Before(value = "execution(* com.leeves.springbootdynamicdatasource.service.*.query*(..))") public void doBeforeWithSlave(JoinPoint joinPoint) { MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); //获取当前切点方法对象 Method method = methodSignature.getMethod(); //判断是否为接口方法 if (method.getDeclaringClass().isInterface()) { try { //获取实际类型的方法对象 method = joinPoint.getTarget().getClass() .getDeclaredMethod(joinPoint.getSignature().getName(), method.getParameterTypes()); } catch (NoSuchMethodException e) { logger.error("方法不存在!", e); } } if (null == method.getAnnotation(DS.class)) { DynamicDataSourceContextHolder.setSlave(); } } /** * 在service下以query开头的方法,清除数据源 * */ @After(value = "execution(* com.leeves.springbootdynamicdatasource.service.*.query*(..))") public void doAfter(JoinPoint joinPoint) { DynamicDataSourceContextHolder.clear(); } }
[ "lxsweety@hotmail.com" ]
lxsweety@hotmail.com
efe4ec189bd1cf4436abb0c006caeb346182a808
b2ac3f71573181d16d20230644b12c4e2d3aba08
/src/main/java/adu/controller/HelloController.java
82b460e231bf0dfd04e6d39e1d65364ff581442e
[]
no_license
ADU-21/myspringmvc
a4f3c1a349cf37947095dc7508c42fa84305cb84
4f1b1ffe9853ae56f5a21b9195467da3669fde9e
refs/heads/master
2020-03-16T16:12:28.203447
2018-06-11T12:54:28
2018-06-11T12:54:28
132,776,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package adu.controller; import adu.featuretoggle.FeatureToggle; import adu.featuretoggle.FeatureToggles; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class HelloController { private final FeatureToggles featureToggles; @Autowired public HelloController(FeatureToggles featureToggles) { this.featureToggles = featureToggles; } @RequestMapping(value = "/hello", method = RequestMethod.GET) public String printHello(ModelMap model) { String handlerFeatureToggle = String.valueOf(featureToggles.enabled(FeatureToggles.TEST_TOGGLE)); model.addAttribute("msg", "Spring MVC Hello World"); model.addAttribute("name", "adu"); model.addAttribute("handlerFeatureToggle", handlerFeatureToggle); model.addAttribute("featureToggles", featureToggles); return "hello"; } @FeatureToggle(FeatureToggles.FEATURE_HANDLER_ENABLE) @RequestMapping(value = "/feature", method = RequestMethod.GET) public String getFeature() { return "feature"; } }
[ "LukeDu571@gmail.com" ]
LukeDu571@gmail.com
279f3333f2916b16bd59f217282404bc2c9c1a6f
c8e086c2e3b04b219cfd037835e7150d0daf6c8e
/my-gdx-game-android/src/br/com/gamezes/view/GameStartScreenView.java
59c63943bd0806bd25dcc80264c8692ddcb8dc89
[]
no_license
Jhonnybsg/CleanRameGameSample
47115bced651945001751d72a33a70b99c504cc7
0827acd447cbc4fc0a18622c8a278e80081766e0
refs/heads/master
2021-01-22T23:54:25.749620
2015-03-30T20:50:43
2015-03-30T20:50:43
33,147,352
0
1
null
null
null
null
UTF-8
Java
false
false
554
java
package br.com.gamezes.view; public interface GameStartScreenView { /** * Carrega as imagens necessárias para a tela */ void loadImages(); /** * Carrega os arquivos de som para esta tela */ void loadSounds(); /** * Libera da memória todos os recursos carregados para esta tela */ void disposeAllResources(); /** * Desenha os elementos desta tela */ void drawElements(); /** * Carrega os arquivos de particulas */ void loadParticles(); void moveToLeft(); void moveToRight(); }
[ "jhonnybsg.dev@gmail.com" ]
jhonnybsg.dev@gmail.com
285750bfcff797e0de934fb988f6e4efa7c94e01
0907c886f81331111e4e116ff0c274f47be71805
/sources/androidx/media2/exoplayer/external/extractor/ts/DefaultTsPayloadReaderFactory.java
8d4b7d03e72b97e394916ce9bd774f21a34e6818
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
6,063
java
package androidx.media2.exoplayer.external.extractor.ts; import android.util.SparseArray; import androidx.media2.exoplayer.external.Format; import androidx.media2.exoplayer.external.drm.DrmInitData; import androidx.media2.exoplayer.external.extractor.ts.TsPayloadReader; import androidx.media2.exoplayer.external.text.cea.Cea708InitializationData; import androidx.media2.exoplayer.external.util.ParsableByteArray; import java.util.ArrayList; import java.util.Collections; import java.util.List; public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Factory { private final List<Format> closedCaptionFormats; private final int flags; public DefaultTsPayloadReaderFactory() { this(0); } public DefaultTsPayloadReaderFactory(int i) { this(i, Collections.singletonList(Format.createTextSampleFormat((String) null, "application/cea-608", 0, (String) null))); } public DefaultTsPayloadReaderFactory(int i, List<Format> list) { this.flags = i; this.closedCaptionFormats = list; } public SparseArray<TsPayloadReader> createInitialPayloadReaders() { return new SparseArray<>(); } public TsPayloadReader createPayloadReader(int i, TsPayloadReader.EsInfo esInfo) { if (i == 2) { return new PesReader(new H262Reader(buildUserDataReader(esInfo))); } if (i == 3 || i == 4) { return new PesReader(new MpegAudioReader(esInfo.language)); } if (i != 15) { if (i != 17) { if (i == 21) { return new PesReader(new Id3Reader()); } if (i != 27) { if (i == 36) { return new PesReader(new H265Reader(buildSeiReader(esInfo))); } if (i == 89) { return new PesReader(new DvbSubtitleReader(esInfo.dvbSubtitleInfos)); } if (i != 138) { if (i == 172) { return new PesReader(new Ac4Reader(esInfo.language)); } if (i != 129) { if (i != 130) { if (i != 134) { if (i != 135) { return null; } } else if (isSet(16)) { return null; } else { return new SectionReader(new SpliceInfoSectionReader()); } } else if (!isSet(64)) { return null; } } return new PesReader(new Ac3Reader(esInfo.language)); } return new PesReader(new DtsReader(esInfo.language)); } else if (isSet(4)) { return null; } else { return new PesReader(new H264Reader(buildSeiReader(esInfo), isSet(1), isSet(8))); } } else if (isSet(2)) { return null; } else { return new PesReader(new LatmReader(esInfo.language)); } } else if (isSet(2)) { return null; } else { return new PesReader(new AdtsReader(false, esInfo.language)); } } private SeiReader buildSeiReader(TsPayloadReader.EsInfo esInfo) { return new SeiReader(getClosedCaptionFormats(esInfo)); } private UserDataReader buildUserDataReader(TsPayloadReader.EsInfo esInfo) { return new UserDataReader(getClosedCaptionFormats(esInfo)); } private List<Format> getClosedCaptionFormats(TsPayloadReader.EsInfo esInfo) { int i; String str; List<byte[]> list; if (isSet(32)) { return this.closedCaptionFormats; } ParsableByteArray parsableByteArray = new ParsableByteArray(esInfo.descriptorBytes); List<Format> list2 = this.closedCaptionFormats; while (parsableByteArray.bytesLeft() > 0) { int readUnsignedByte = parsableByteArray.readUnsignedByte(); int position = parsableByteArray.getPosition() + parsableByteArray.readUnsignedByte(); if (readUnsignedByte == 134) { list2 = new ArrayList<>(); int readUnsignedByte2 = parsableByteArray.readUnsignedByte() & 31; for (int i2 = 0; i2 < readUnsignedByte2; i2++) { String readString = parsableByteArray.readString(3); int readUnsignedByte3 = parsableByteArray.readUnsignedByte(); boolean z = true; boolean z2 = (readUnsignedByte3 & 128) != 0; if (z2) { i = readUnsignedByte3 & 63; str = "application/cea-708"; } else { str = "application/cea-608"; i = 1; } byte readUnsignedByte4 = (byte) parsableByteArray.readUnsignedByte(); parsableByteArray.skipBytes(1); if (z2) { if ((readUnsignedByte4 & 64) == 0) { z = false; } list = Cea708InitializationData.buildData(z); } else { list = null; } list2.add(Format.createTextSampleFormat((String) null, str, (String) null, -1, 0, readString, i, (DrmInitData) null, Long.MAX_VALUE, list)); } } parsableByteArray.setPosition(position); } return list2; } private boolean isSet(int i) { return (i & this.flags) != 0; } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
46381861b5d3fc53b50af23bd7fd27a602e03a4b
1a2ce8a16c43c10f4ce1dec4e74b2c1a0134ad89
/src/main/java/com/capacity/planner/dto/SupplyDto.java
1825a0746f4cb9f630de285237b21c26bc4146a5
[]
no_license
ankushagrawal/capacity-planning
f3122cb26656e790b9b40bf4488f397ba1917003
ecc3394e84fb932bd3dfdbfde49457b152bf4160
refs/heads/master
2021-01-21T17:22:27.279836
2017-04-10T11:20:01
2017-04-10T11:20:01
85,180,542
0
0
null
2017-04-10T11:20:01
2017-03-16T09:58:46
Java
UTF-8
Java
false
false
853
java
package com.capacity.planner.dto; import com.capacity.planner.enums.UsecaseEnum; import io.dropwizard.jackson.JsonSnakeCase; import lombok.Data; import java.util.List; /** * Created by ankush.a on 07/04/17. */ @Data @JsonSnakeCase public class SupplyDto { private String channel; private List<UsecaseEnum> usecasesAvailable; private Long manHoursAvailable; private List<AllotmentDto> allocations; @Override public String toString() { return "SupplyDto{" + "channel='" + channel + '\'' + ", usecasesAvailable=" + usecasesAvailable + ", manHoursAvailable=" + manHoursAvailable + ", allocations=" + allocations + '}'; } // private UsecaseEnum usecaseAllocated; // private Long manHoursAllocated; // private Double cost; }
[ "ankush.a@ankush.local" ]
ankush.a@ankush.local
7b930b974663d68f8d0f56669047d48ede80cbba
03af346931a0ffe709893029e62cde771be865bc
/app/src/main/java/com/example/ElectronicsStore/DiscountChain.java
c4a7fb40cdec8f33604994ab60086e79b3c28736
[]
no_license
DannyBrassil/ElectronicsStore
20ce1ee21fd430142f4a786b60f0deb97166955d
07405e6909872cf5ae9461f572cd83108967ec64
refs/heads/master
2023-04-10T08:52:01.202352
2021-04-18T22:02:57
2021-04-18T22:02:57
355,619,569
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
package com.example.ElectronicsStore; public interface DiscountChain { public void setNextChain(DiscountChain nextChain); public abstract boolean apply(DiscountOption option); }
[ "c17351576@mytudublin.ie" ]
c17351576@mytudublin.ie
0e99fe149c58e8bb131070b1296758857f88b54a
ed19e2f1c19d68d0215df75cac9f7f6bfcf41742
/trunk/WEB/src/com/partycommittee/remote/vo/PcStatsVo.java
7a0fb92063f4dd04eeac0bc1f290675afc8b6a80
[]
no_license
BGCX262/zzsh-svn-to-git
064f50b5592cce6271ee0ca305135a5e5c77fed5
98a05351dda45c2d69c6bf98281ba87993230691
refs/heads/master
2021-01-12T13:49:50.693451
2015-08-23T06:48:07
2015-08-23T06:48:07
41,315,383
1
0
null
null
null
null
UTF-8
Java
false
false
8,162
java
package com.partycommittee.remote.vo; import java.io.Serializable; import java.sql.Date; import javax.persistence.Column; import com.partycommittee.persistence.po.PcStats; public class PcStatsVo implements Serializable { private static final long serialVersionUID = -1190776206070964607L; private Integer id; private Integer agencyId; private String name; private Integer codeId; private String code; private Integer parentId; private Integer year; private Integer quarter; private Integer month; private Integer typeId; private Integer total; private Integer totalSuccess; private Integer totalReturn; private Integer totalDelay; private Integer reported; private Double reportedRate; private Double returnRate; private Double delayRate; private Integer attend; private Integer asence; private Double attendRate; private Integer eva; private Double evaRate; private Integer eva1; private Integer eva2; private Integer eva3; private Integer eva4; private Double eva1Rate; private Double eva2Rate; private Double eva3Rate; private Double eva4Rate; private Integer agencyGoodjob; public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } public Integer getAgencyId() { return this.agencyId; } public void setAgencyId(Integer agencyId) { this.agencyId = agencyId; } public Integer getCodeId() { return this.codeId; } public void setCodeId(Integer codeId) { this.codeId = codeId; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Integer getParentId() { return this.parentId; } public void setParentId(Integer parentId) { this.parentId = parentId; } public Integer getQuarter() { return this.quarter; } public void setQuarter(Integer quarter) { this.quarter = quarter; } public Integer getTypeId() { return this.typeId; } public void setTypeId(Integer typeId) { this.typeId = typeId; } public Integer getYear() { return this.year; } public void setYear(Integer year) { this.year = year; } public Integer getTotal() { return total; } public void setTotal(Integer total) { this.total = total; } public Integer getReported() { return reported; } public void setReported(Integer reported) { this.reported = reported; } public Double getReportedRate() { return reportedRate; } public void setReportedRate(Double reportedRate) { this.reportedRate = reportedRate; } public Integer getEva() { return eva; } public void setEva(Integer eva) { this.eva = eva; } public Double getEvaRate() { return evaRate; } public void setEvaRate(Double evaRate) { this.evaRate = evaRate; } public Integer getAttend() { return attend; } public void setAttend(Integer attend) { this.attend = attend; } public Integer getAsence() { return asence; } public void setAsence(Integer asence) { this.asence = asence; } public Double getAttendRate() { return attendRate; } public void setAttendRate(Double attendRate) { this.attendRate = attendRate; } public Integer getAgencyGoodjob() { return agencyGoodjob; } public void setAgencyGoodjob(Integer agencyGoodjob) { this.agencyGoodjob = agencyGoodjob; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public Integer getMonth() { return month; } public void setMonth(Integer month) { this.month = month; } public Integer getTotalSuccess() { return totalSuccess; } public void setTotalSuccess(Integer totalSuccess) { this.totalSuccess = totalSuccess; } public Integer getTotalReturn() { return totalReturn; } public void setTotalReturn(Integer totalReturn) { this.totalReturn = totalReturn; } public Integer getTotalDelay() { return totalDelay; } public void setTotalDelay(Integer totalDelay) { this.totalDelay = totalDelay; } public Double getReturnRate() { return returnRate; } public void setReturnRate(Double returnRate) { this.returnRate = returnRate; } public Double getDelayRate() { return delayRate; } public void setDelayRate(Double delayRate) { this.delayRate = delayRate; } public Integer getEva1() { return eva1; } public void setEva1(Integer eva1) { this.eva1 = eva1; } public Integer getEva2() { return eva2; } public void setEva2(Integer eva2) { this.eva2 = eva2; } public Integer getEva3() { return eva3; } public void setEva3(Integer eva3) { this.eva3 = eva3; } public Integer getEva4() { return eva4; } public void setEva4(Integer eva4) { this.eva4 = eva4; } public Double getEva1Rate() { return eva1Rate; } public void setEva1Rate(Double eva1Rate) { this.eva1Rate = eva1Rate; } public Double getEva2Rate() { return eva2Rate; } public void setEva2Rate(Double eva2Rate) { this.eva2Rate = eva2Rate; } public Double getEva3Rate() { return eva3Rate; } public void setEva3Rate(Double eva3Rate) { this.eva3Rate = eva3Rate; } public Double getEva4Rate() { return eva4Rate; } public void setEva4Rate(Double eva4Rate) { this.eva4Rate = eva4Rate; } public static PcStatsVo fromPcStats(PcStats pevo) { PcStatsVo vo = new PcStatsVo(); vo.setAgencyId(pevo.getAgencyId()); vo.setCodeId(pevo.getCodeId()); vo.setCode(pevo.getCode()); vo.setId(pevo.getId()); vo.setName(pevo.getName()); vo.setParentId(pevo.getParentId()); vo.setQuarter(pevo.getQuarter()); vo.setTypeId(pevo.getTypeId()); vo.setYear(pevo.getYear()); vo.setMonth(pevo.getMonth()); vo.setTotal(pevo.getTotal()); vo.setTotalSuccess(pevo.getTotalSuccess()); vo.setTotalReturn(pevo.getTotalReturn()); vo.setTotalDelay(pevo.getTotalDelay()); vo.setReported(pevo.getReported()); vo.setReportedRate(pevo.getReportedRate()); vo.setReturnRate(pevo.getReturnRate()); vo.setDelayRate(pevo.getDelayRate()); vo.setAttend(pevo.getAttend()); vo.setAsence(pevo.getAsence()); vo.setAttendRate(pevo.getAttendRate()); vo.setEva(pevo.getEva()); vo.setEvaRate(pevo.getEvaRate()); vo.setEva1(pevo.getEva1()); vo.setEva2(pevo.getEva2()); vo.setEva3(pevo.getEva3()); vo.setEva4(pevo.getEva4()); vo.setEva1Rate(pevo.getEva1Rate()); vo.setEva2Rate(pevo.getEva2Rate()); vo.setEva3Rate(pevo.getEva3Rate()); vo.setEva4Rate(pevo.getEva4Rate()); vo.setAgencyGoodjob(pevo.getAgencyGoodjob()); return vo; } public static PcStats toPcStats(PcStatsVo pevo) { PcStats vo = new PcStats(); vo.setAgencyId(pevo.getAgencyId()); vo.setCodeId(pevo.getCodeId()); vo.setCode(pevo.getCode()); vo.setId(pevo.getId()); vo.setName(pevo.getName()); vo.setParentId(pevo.getParentId()); vo.setQuarter(pevo.getQuarter()); vo.setTypeId(pevo.getTypeId()); vo.setYear(pevo.getYear()); vo.setMonth(pevo.getMonth()); vo.setTotal(pevo.getTotal()); vo.setTotalSuccess(pevo.getTotalSuccess()); vo.setTotalReturn(pevo.getTotalReturn()); vo.setTotalDelay(pevo.getTotalDelay()); vo.setReported(pevo.getReported()); vo.setReportedRate(pevo.getReportedRate()); vo.setReturnRate(pevo.getReturnRate()); vo.setDelayRate(pevo.getDelayRate()); vo.setAttend(pevo.getAttend()); vo.setAsence(pevo.getAsence()); vo.setAttendRate(pevo.getAttendRate()); vo.setEva(pevo.getEva()); vo.setEvaRate(pevo.getEvaRate()); vo.setEva1(pevo.getEva1()); vo.setEva2(pevo.getEva2()); vo.setEva3(pevo.getEva3()); vo.setEva4(pevo.getEva4()); vo.setEva1Rate(pevo.getEva1Rate()); vo.setEva2Rate(pevo.getEva2Rate()); vo.setEva3Rate(pevo.getEva3Rate()); vo.setEva4Rate(pevo.getEva4Rate()); vo.setAgencyGoodjob(pevo.getAgencyGoodjob()); return vo; } }
[ "you@example.com" ]
you@example.com
f4bb8edb20baad4c8321ad9ef413264fef1f812c
de367ae1d7986d94c5dd3813e9a675d6137df39a
/src/Telas/EventosRel.java
cd71ba974f53ee9c1260a484512135f88756d696
[]
no_license
Klaillton/CAJAN
c9142bb81c2d90e91029546d5945f0e51d03455f
2f52ab0ffa04ceb1a589c07996a6e00ddbb9fe99
refs/heads/master
2021-01-20T03:04:02.167339
2017-04-26T15:01:08
2017-04-26T15:01:08
89,485,887
0
0
null
null
null
null
UTF-8
Java
false
false
6,319
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 Telas; import Relatorio.RelatorioUtil; import Util.Util; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JFormattedTextField; import javax.swing.text.MaskFormatter; import net.sf.jasperreports.engine.JRException; /** * * @author Klaillton */ public class EventosRel extends javax.swing.JFrame { /** * Creates new form EventosRel */ public EventosRel() { initComponents(); dtinicial.setText(Util.getDate(new java.util.Date()).trim()); dtfinal.setText(Util.getDate(new java.util.Date()).trim()); } /** * 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() { jLabel3 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); dtinicial = new javax.swing.JFormattedTextField(); jLabel2 = new javax.swing.JLabel(); dtfinal = new javax.swing.JFormattedTextField(); jButton1 = new javax.swing.JButton(); setTitle("Eventos"); jLabel3.setText("Escolha a data do relatório:"); jLabel1.setText("Data Inicial:"); dtinicial = new JFormattedTextField(setMascara("##/##/####")); jLabel2.setText("Data Final:"); dtfinal = new JFormattedTextField(setMascara("##/##/####")); jButton1.setText("Gerar Relatório"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton1) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dtinicial, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(dtfinal, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addGap(9, 9, 9) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(dtinicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(dtfinal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: RelatorioUtil rel = new RelatorioUtil(); try { String query = "SELECT * FROM Eventos p" + " WHERE p.dataInicio >= " + Util.getDateUtilUSUnformat(dtinicial.getText()) + " AND p.dataFim <= " + Util.getDateUtilUSUnformat(dtfinal.getText()); String caminho = new File("C:\\cajan\\relatorios\\eventos.jasper").getCanonicalPath(); rel.addParametro("dtinicial", dtinicial.getText()); rel.addParametro("dtfinal", dtfinal.getText()); rel.gerarRelatorio(caminho, /*pesList*/ query); } catch (JRException | IOException ex) { Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex); // status.setText(ex.getMessage()); } }//GEN-LAST:event_jButton1ActionPerformed private MaskFormatter setMascara(String mascara) { MaskFormatter mask = null; try { mask = new MaskFormatter(mascara); } catch (java.text.ParseException ex) { } return mask; } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JFormattedTextField dtfinal; private javax.swing.JFormattedTextField dtinicial; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; // End of variables declaration//GEN-END:variables }
[ "klaillton@gmail.com" ]
klaillton@gmail.com
c1a16660cf2a865f147aae04567e845b2f5e1d5a
7b86b28040c207460afb784fe43f52b8485297f3
/app/src/main/java/paul/gdaib/com/alarmclock/bean/AlarmInstance.java
8647473de0f8c0e646115baf4d74886dcfefbc98
[]
no_license
wangcantian/AlarmClock
81323cb35903acd395db683bd6b60d4376356486
e3ccee817da2cae680e9d1da40fedf6ea48a3935
refs/heads/master
2021-01-12T07:31:51.005436
2016-12-20T16:34:00
2016-12-20T16:34:00
76,972,203
0
0
null
null
null
null
UTF-8
Java
false
false
12,529
java
package paul.gdaib.com.alarmclock.bean; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.media.RingtoneManager; import android.net.Uri; import android.preference.PreferenceManager; import java.util.Calendar; import java.util.LinkedList; import java.util.List; import paul.gdaib.com.alarmclock.R; import paul.gdaib.com.alarmclock.SettingsActivity; /** * Created by Paul on 2016/10/21. */ public class AlarmInstance implements ClockContract.InstanceColumns { public static final String TABLE_NAME = "alarm_instance"; public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY, " + YEAR + " INTEGER NOT NULL, " + MONTH + " INTEGER NOT NULL, " + DAY + " INTEGER NOT NULL, " + HOUR + " INTEGER NOT NULL, " + MINUTES + " INTEGER NOT NULL, " + LABEL + " TEXT NOT NULL, " + VIBRATE + " INTEGER NOT NULL, " + RINGTONE + " TEXT, " + ALARM_STATE + " INTEGER NOT NULL, " + ALARM_ID + " INTEGER REFERENCES " + Alarm.TABLE_NAME + "(" + _ID + ")" + "ON UPDATE CASCADE ON DELETE CASCADE, " + CLOSE_TYPE + " INTEGER NOT NULL, " + STRING_CODE + " TEXT);"; private static final String[] QUERY_COLUMNS = { _ID, YEAR, MONTH, DAY, HOUR, MINUTES, LABEL, VIBRATE, RINGTONE, ALARM_ID, ALARM_STATE, CLOSE_TYPE, STRING_CODE }; /** * 距离闹钟开始时间 */ public static final int LOW_NOTIFUCATION_HOUR_OFFSET = -2; /** * 距离闹钟开始时间 */ public static final int HIGH_NOTIFICATION_MINUTE_OFFSET = -30; /** * 错过通知时间(小时) */ private static final int MISSED_TIME_TO_LIVE_HOUR_OFFSET = 12; /** * 闹钟超时时间(分钟) */ private static final int DEFAULT_ALARM_TIMEOUT_SETTING = 10; // 闹钟intance参数 public long mId; public int mYear; public int mMonth; public int mDay; public int mHour; public int mMinute; public String mLabel; public boolean mVibrate; public Uri mRingtone; public Long mAlarmId; public int mAlarmState; public int mCloseType; public String mStringCode; // 字段索引 private static final int ID_INDEX = 0; private static final int YEAR_INDEX = 1; private static final int MONTH_INDEX = 2; private static final int DAY_INDEX = 3; private static final int HOUR_INDEX = 4; private static final int MINUTES_INDEX = 5; private static final int LABEL_INDEX = 6; private static final int VIBRATE_INDEX = 7; private static final int RINGTONE_INDEX = 8; private static final int ALARM_ID_INDEX = 9; private static final int ALARM_STATE_INDEX = 10; private static final int CLOSE_TYPE_INDEX = 11; private static final int STRING_CODE_INDEX = 12; private static final int COLUMN_COUNT = STRING_CODE_INDEX + 1; public AlarmInstance(Calendar calendar) { mId = INVALID_ID; mLabel = ""; mVibrate = false; mRingtone = null; mAlarmState = SILENT_STATE; this.mCloseType = TYPE_NONE; this.mStringCode = ""; setAlarmTime(calendar); } public AlarmInstance(Calendar calendar, long alarmId) { this(calendar); mAlarmId = alarmId; } public AlarmInstance(Cursor c) { mId = c.getLong(ID_INDEX); mYear = c.getInt(YEAR_INDEX); mMonth = c.getInt(MONTH_INDEX); mDay = c.getInt(DAY_INDEX); mHour = c.getInt(HOUR_INDEX); mMinute = c.getInt(MINUTES_INDEX); mLabel = c.getString(LABEL_INDEX); mVibrate = c.getInt(VIBRATE_INDEX) == 1; if (c.isNull(RINGTONE_INDEX)) { mRingtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); } else { mRingtone = Uri.parse(c.getString(RINGTONE_INDEX)); } if (!c.isNull(ALARM_ID_INDEX)) { mAlarmId = c.getLong(ALARM_ID_INDEX); } mAlarmState = c.getInt(ALARM_STATE_INDEX); this.mCloseType = c.getInt(CLOSE_TYPE_INDEX); if (c.isNull(STRING_CODE_INDEX)) { this.mStringCode = ""; } else { this.mStringCode = c.getString(STRING_CODE_INDEX); } } public void setAlarmTime(Calendar calendar) { mYear = calendar.get(Calendar.YEAR); mMonth = calendar.get(Calendar.MONTH); mDay = calendar.get(Calendar.DAY_OF_MONTH); mHour = calendar.get(Calendar.HOUR_OF_DAY); mMinute = calendar.get(Calendar.MINUTE); } public Calendar getAlarmTime() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, mYear); calendar.set(Calendar.MONTH, mMonth); calendar.set(Calendar.DAY_OF_MONTH, mDay); calendar.set(Calendar.HOUR_OF_DAY, mHour); calendar.set(Calendar.MINUTE, mMinute); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } @Override public boolean equals(Object o) { if (!(o instanceof AlarmInstance)) return false; final AlarmInstance other = (AlarmInstance) o; return mId == other.mId; } @Override public int hashCode() { return Long.valueOf(mId).hashCode(); } public String toString() { return "AlarmInstance{" + "mId=" + mId + ", mYear=" + mYear + ", mMonth=" + mMonth + ", mDay=" + mDay + ", mHour=" + mHour + ", mMinute=" + mMinute + ", mLabel=" + mLabel + ", mVibrate=" + mVibrate + ", mRingtone=" + mRingtone + ", mAlarmId=" + mAlarmId + ", mAlarmState=" + mAlarmState + "}"; } /** * 获得闹钟通知时间 * * @return */ public Calendar getLowNotificationTime() { Calendar calendar = getAlarmTime(); calendar.add(Calendar.HOUR_OF_DAY, LOW_NOTIFUCATION_HOUR_OFFSET); return calendar; } /** * 获得闹钟通知时间 * * @return */ public Calendar getHighNotificationTime() { Calendar calendar = getAlarmTime(); calendar.add(Calendar.MINUTE, HIGH_NOTIFICATION_MINUTE_OFFSET); return calendar; } /** * 获得错过闹钟的通知时间 * * @return */ public Calendar getMissedTimeToLive() { Calendar calendar = getAlarmTime(); calendar.add(Calendar.HOUR, MISSED_TIME_TO_LIVE_HOUR_OFFSET); return calendar; } /** * 闹钟响时,无操作的时间 * * @param context * @return */ public Calendar getTimeout(Context context) { int timeoutMinute = PreferenceManager.getDefaultSharedPreferences(context) .getInt(SettingsActivity.KEY_AUTO_SILENCE, DEFAULT_ALARM_TIMEOUT_SETTING); if (timeoutMinute < 0) { return null; } Calendar calendar = getAlarmTime(); calendar.add(Calendar.MINUTE, timeoutMinute); return calendar; } public String getLabelOrDefault(Context context) { return mLabel.isEmpty() ? context.getString(R.string.default_label) : mLabel; } public static ContentValues createContentValues(AlarmInstance instance) { ContentValues contentValues = new ContentValues(COLUMN_COUNT); if (instance.mId != INVALID_ID) { contentValues.put(_ID, instance.mId); } contentValues.put(YEAR, instance.mYear); contentValues.put(MONTH, instance.mMonth); contentValues.put(DAY, instance.mDay); contentValues.put(HOUR, instance.mHour); contentValues.put(MINUTES, instance.mMinute); contentValues.put(LABEL, instance.mLabel); contentValues.put(VIBRATE, instance.mVibrate ? 1 : 0); if (instance.mRingtone == null) { contentValues.putNull(RINGTONE); } else { contentValues.put(RINGTONE, instance.mRingtone.toString()); } contentValues.put(ALARM_ID, instance.mAlarmId); contentValues.put(ALARM_STATE, instance.mAlarmState); contentValues.put(CLOSE_TYPE, instance.mCloseType); contentValues.put(STRING_CODE, instance.mStringCode); return contentValues; } public static Uri getUri(long intanceId) { return ContentUris.withAppendedId(CONTENT_URI, intanceId); } public static long getId(Uri contentUri) { return ContentUris.parseId(contentUri); } /** * 通过instanceId获取闹钟实例 */ public static AlarmInstance getInstanceById(ContentResolver contentResolver, long intanceId) { Cursor cursor = contentResolver.query(getUri(intanceId), QUERY_COLUMNS, null, null, null); AlarmInstance result = null; if (cursor == null) { return result; } try { if (cursor.moveToFirst()) { result = new AlarmInstance(cursor); } } finally { cursor.close(); } return result; } /** * 指定条件获取闹钟实例 */ public static List<AlarmInstance> getInstances(ContentResolver contentResolver, String selection, String... selectionArgs) { Cursor cursor = contentResolver.query(CONTENT_URI, QUERY_COLUMNS, selection, selectionArgs, null); List<AlarmInstance> result = new LinkedList<>(); if (cursor == null) { return result; } try { if (cursor.moveToFirst()) { do { result.add(new AlarmInstance(cursor)); } while (cursor.moveToNext()); } } finally { cursor.close(); } return result; } /** * 通过alarmId获取闹钟实例 */ public static List<AlarmInstance> getInstanceByAlarmId(ContentResolver contentResolver, long alarmId) { return getInstances(contentResolver, ALARM_ID + "=" + alarmId); } /** * 添加instance * * @param contentResolver * @param alarmInstance * @return */ public static AlarmInstance addInstance(ContentResolver contentResolver, AlarmInstance alarmInstance) { for (AlarmInstance instance : getInstanceByAlarmId(contentResolver, alarmInstance.mAlarmId)) { if (instance.getAlarmTime().equals(alarmInstance.getAlarmTime())) { alarmInstance.mId = instance.mId; updateInstance(contentResolver, alarmInstance); return instance; } } ContentValues contentValues = createContentValues(alarmInstance); Uri uri = contentResolver.insert(CONTENT_URI, contentValues); alarmInstance.mId = getId(uri); return alarmInstance; } /** * 更新instance * * @param contentResolver * @param alarmInstance * @return */ public static boolean updateInstance(ContentResolver contentResolver, AlarmInstance alarmInstance) { if (alarmInstance.mId == INVALID_ID) return false; ContentValues contentValues = createContentValues(alarmInstance); long i = contentResolver.update(getUri(alarmInstance.mId), contentValues, null, null); return i == 1; } /** * 删除闹钟 * * @param contentResolver * @param instance * @return */ public static boolean deleteInstance(ContentResolver contentResolver, AlarmInstance instance) { if (instance.mId == INVALID_ID) return false; long deleteRows = contentResolver.delete(getUri(instance.mId), null, null); return deleteRows == 1; } public static Intent createIntent(String action, long instanceId) { return new Intent(action).setData(getUri(instanceId)); } public static Intent createIntent(Context context, Class<?> cls, long intanceId) { return new Intent(context, cls).setData(getUri(intanceId)); } }
[ "943079241@qq.com" ]
943079241@qq.com
c728cd75395869c01eb07a9babc1c264e5fd004f
dc0c0d8012f2b54ee398a307a9cfc836bf6df261
/src/main/java/org/wecancodeit/librarydemo/Campus.java
8da7cd5e849a6a6b0f879d52c5d126b1516ec25a
[]
no_license
2021-Spring-Part-Time/library-demo-Kouric-Calhoun
6da4eb690d75c12cf22d1257b19ccee07ecd965a
35a03cf177fccf7804807db15f8aba269ba3595a
refs/heads/main
2023-06-03T09:53:18.399412
2021-06-13T02:01:31
2021-06-13T02:01:31
375,844,676
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
package org.wecancodeit.librarydemo; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.OneToMany; import java.util.Collection; import java.util.Objects; @Entity public class Campus { @Id @GeneratedValue private Long id; private String location; @OneToMany(mappedBy = "campus") private Collection<Book> books; public Long getId() { return id; } public Campus(){ } public Campus(String location) { this.location = location; } public Collection<Book>getBooks() { return books; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Campus campus = (Campus) o; return Objects.equals(id, campus.id); } @Override public int hashCode() { return Objects.hash(id); } }
[ "kouriccalhoun@gmail.com" ]
kouriccalhoun@gmail.com
b2b860c18c82ff368919a4e7de9bce2d14a72990
59e76b331f3af8f723b07a757d3848c8ff4141b9
/app/src/androidTest/java/com/example/baiust/ExampleInstrumentedTest.java
ddcecf88be976fb176f00bcbce0e7c2f7c4b4bdb
[]
no_license
mirajhossen/learn-programming
07a91d39c4eefd22a9a19a821b12e064d7df1e68
9d6cbfc7cdaf28d54cd6e522392c86212a17a62a
refs/heads/main
2023-07-18T01:44:09.569968
2021-08-17T11:45:14
2021-08-17T11:45:14
397,157,696
1
0
null
null
null
null
UTF-8
Java
false
false
750
java
package com.example.baiust; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.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.getInstrumentation().getTargetContext(); assertEquals("com.example.baiust", appContext.getPackageName()); } }
[ "ishrafil2233@gmail.com" ]
ishrafil2233@gmail.com
0a5d1a3803aa529bf59faef07cf478b1261647c0
2a1f6afb809b5d3347bd1a4521d2f876665cc2ca
/demo/j2cl/src/main/java/org/treblereel/mvp/presenter/css/ButtonsPresenter.java
9b489faecf5733045e6ea5e692bce818e177f0d6
[ "Apache-2.0" ]
permissive
treblereel/gwtbootstrap3
8ddab0f20a2222be79c44894f202194b4bae6606
f362536b6a0dc4994db5d1bab5bd2d69e49123b4
refs/heads/master
2022-04-30T20:20:58.179484
2022-03-31T04:33:55
2022-03-31T04:33:55
190,029,044
9
0
Apache-2.0
2022-03-31T04:33:55
2019-06-03T15:08:43
Java
UTF-8
Java
false
false
1,150
java
package org.treblereel.mvp.presenter.css; /* * #%L * GwtBootstrap3 * %% * Copyright (C) 2013 - 2021 GwtBootstrap3 * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import org.gwtproject.user.client.ui.Composite; import org.gwtproject.user.client.ui.Panel; import org.treblereel.mvp.presenter.Presenter; import org.treblereel.mvp.view.css.Buttons; /** * @author Dmitrii Tikhomirov * Created by treblereel 7/21/19 */ public class ButtonsPresenter implements Presenter { private Composite display = new Buttons(); @Override public void dispatch(Panel container) { container.add(display); } }
[ "chani.liet@gmail.com" ]
chani.liet@gmail.com
88aee81d61319534ef659e870eece0186e427496
5f19143cd3da1ad2dd355ac8434ac2ff903f776e
/Starfighter/src/OuterSpace.java
3a775462396ca0bd6757ef15d932bf7196e4f82b
[]
no_license
shreysambhwani/sambhwani_shrey_apcsa-p22
111d6bc80328884bbdde6e16d7aae45db46017d2
d35357cc860e6e49fef9399df9e726ef8eb4f8d6
refs/heads/master
2020-04-20T08:33:13.885803
2019-05-22T03:19:40
2019-05-22T03:19:40
168,742,454
0
0
null
null
null
null
UTF-8
Java
false
false
4,028
java
//(c) A+ Computer Science //www.apluscompsci.com //Name - import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.List; import java.awt.Canvas; import java.awt.event.ActionEvent; import java.awt.event.KeyListener; import java.awt.event.KeyEvent; import static java.lang.Character.*; import java.awt.image.BufferedImage; import java.awt.event.ActionListener; import java.util.ArrayList; public class OuterSpace extends Canvas implements KeyListener, Runnable { private Ship ship; private AlienHorde horde; private Bullets shots; private boolean gameOver; private boolean game = true; private boolean[] keys; private BufferedImage back; public OuterSpace() { setBackground(Color.black); keys = new boolean[5]; ship = new Ship(350,500,50,50,4); horde = new AlienHorde(50); shots = new Bullets(); this.addKeyListener(this); new Thread(this).start(); setVisible(true); } public void update(Graphics window) { paint(window); } public void paint( Graphics window ) { //set up the double buffering to make the game animation nice and smooth Graphics2D twoDGraph = (Graphics2D)window; //take a snap shop of the current screen and same it as an image //that is the exact same width and height as the current screen if(back==null) back = (BufferedImage)(createImage(getWidth(),getHeight())); //create a graphics reference to the back ground image //we will draw all changes on the background image Graphics graphToBack = back.createGraphics(); graphToBack.setColor(Color.BLUE); graphToBack.drawString("StarFighter ", 25, 50 ); graphToBack.setColor(Color.BLACK); graphToBack.fillRect(0,0,800,600); ship.draw(graphToBack); horde.drawEmAll(graphToBack); horde.moveEmAll(); horde.removeDeadOnes(shots.getList()); shots.drawEmAll(graphToBack); shots.moveEmAll(); if(keys[0] == true && ship.getX()>ship.getSpeed()) { ship.move("LEFT"); } if (keys[1] == true && ship.getX()<(800-ship.getSpeed()-ship.getWidth())) { ship.move("RIGHT"); } if (keys[2] == true && ship.getY()>ship.getSpeed()) { ship.move("UP"); } if (keys[3] == true && ship.getY()<(600-ship.getSpeed()-ship.getHeight()-20)) { ship.move("DOWN"); } if (keys[4] == true && !gameOver) { shots.add(new Ammo((ship.getX()+ship.getWidth()/2), ship.getY()-5, 5, 5, 5)); keys[4]=false; } if (horde.getList().size()==0) { gameOver=true; ship.setSpeed(0); } if (gameOver) { graphToBack.clearRect(0, 0, 800, 600); graphToBack.setColor(Color.GREEN); graphToBack.drawString("YOU WON!", 350, 350); } if (horde.touchingShip(graphToBack, ship)) { game = false; } if (game == false) { graphToBack.clearRect(0, 0, 800, 600); //setBackground(Color.black); graphToBack.setColor(Color.RED); graphToBack.drawString("YOU LOSE!", 350, 350); } twoDGraph.drawImage(back, null, 0, 0); } public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_LEFT) { keys[0] = true; } if (e.getKeyCode() == KeyEvent.VK_RIGHT) { keys[1] = true; } if (e.getKeyCode() == KeyEvent.VK_UP) { keys[2] = true; } if (e.getKeyCode() == KeyEvent.VK_DOWN) { keys[3] = true; } if (e.getKeyCode() == KeyEvent.VK_SPACE) { keys[4] = true; } repaint(); } public void keyReleased(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_LEFT) { keys[0] = false; } if (e.getKeyCode() == KeyEvent.VK_RIGHT) { keys[1] = false; } if (e.getKeyCode() == KeyEvent.VK_UP) { keys[2] = false; } if (e.getKeyCode() == KeyEvent.VK_DOWN) { keys[3] = false; } if (e.getKeyCode() == KeyEvent.VK_SPACE) { keys[4] = false; } repaint(); } public void keyTyped(KeyEvent e) { //no code needed here } public void run() { try { while(true) { Thread.currentThread().sleep(5); repaint(); } }catch(Exception e) { } } }
[ "shreysambhwani@gmail.com" ]
shreysambhwani@gmail.com
b6ff4f1d96e6d3fafc3941b4784a600b5b2b3bc0
a45df8986a57776282cf836cfb6be06df5854b96
/src/main/java/com/WebPortfolio/Service/MessageService.java
128df0f78c387f304dabc5d8b63278e54c9c9ef0
[]
no_license
kimjy0301/WebPortfolio
fe1dfd72abb693eb6c67acd0386467383e80454e
1b29a480c63ce3500869ef88c14add19477eb1e2
refs/heads/master
2020-04-17T07:19:39.464891
2019-02-01T02:59:19
2019-02-01T02:59:19
166,356,096
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
package com.WebPortfolio.Service; import javax.persistence.NonUniqueResultException; import javax.servlet.http.HttpServletRequest; import javax.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.WebPortfolio.Bean.IpAdressControl; import com.WebPortfolio.Model.Message; import com.WebPortfolio.Model.Visitor; import com.WebPortfolio.Reporitory.MessageRepository; import com.WebPortfolio.Reporitory.VisitorRepository; import lombok.extern.slf4j.Slf4j; @Service @Slf4j public class MessageService { @Autowired MessageRepository messageRepository; @Autowired VisitorRepository visitorRepository; @Autowired IpAdressControl ipAdressControl; public Iterable<Message> getMessageListTop5ByOrderByIdDesc() { return messageRepository.findTop5ByOrderByIdDesc(); } @Transactional public void saveMessage(Message message, HttpServletRequest req) { String reqIp = ipAdressControl.getIp(req); try { messageRepository.save(message); Visitor aVisitor = visitorRepository.findByIp(reqIp); message.setVisitor(aVisitor); log.info("IP : " + reqIp + " Message Save Success.."); }catch(NonUniqueResultException ex) { log.error("IP : " + reqIp + "multiple selected row "); } } }
[ "KimJiYong@125.142.67.246" ]
KimJiYong@125.142.67.246
a468ff1158d4cf95c2f3d2a42058732b27b3b0e9
796d446afac8e5a9ab65cc0111bb1eb336366417
/app/src/main/java/com/example/abhishekkoranne/engineersbook/Adapter/ChatAdapter.java
206a3e180e2c18b2a0bfb7642e3355fac27dbba6
[]
no_license
abhi2496/EngineersBookNew
cda781cc8036336204ffc3dbfbb08c8c87e768c3
1cf9ce7a4d62a2e4d7c59a20339bcfaaf978d6a9
refs/heads/master
2020-03-17T04:13:30.629759
2018-05-13T19:12:24
2018-05-13T19:19:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,935
java
package com.example.abhishekkoranne.engineersbook.Adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.example.abhishekkoranne.engineersbook.R; import com.example.abhishekkoranne.engineersbook.model.Chat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; public class ChatAdapter extends RecyclerView.Adapter<ChatAdapter.ChatViewHolder> { Context cont; ArrayList<Chat> chatList = new ArrayList<>(); int myUserId; int otherUserId; public ChatAdapter(Context cont, ArrayList<Chat> chatList, int myUserId, int otherUserId) { this.cont = cont; this.chatList = chatList; this.myUserId = myUserId; this.otherUserId = otherUserId; } @Override public ChatViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { LayoutInflater myInflater = LayoutInflater.from(cont); View myView = myInflater.inflate(R.layout.layout_chat, parent, false); return new ChatViewHolder(myView); } @Override public void onBindViewHolder(ChatViewHolder holder, int position) { Date date = new Date(chatList.get(position).getTimestamp()); SimpleDateFormat formatter = new SimpleDateFormat("dd-M-yyyy hh:mm"); String strDate= formatter.format(date); if(myUserId==chatList.get(holder.getAdapterPosition()).getUserId()) { holder.layoutChatMe.setVisibility(View.VISIBLE); holder.layoutChatOther.setVisibility(View.GONE); holder.tvMyMessage.setText(chatList.get(position).getMessage()); holder.tvMyTimestamp.setText(strDate); } else { holder.layoutChatMe.setVisibility(View.GONE); holder.layoutChatOther.setVisibility(View.VISIBLE); holder.tvOtherMessage.setText(chatList.get(position).getMessage()); holder.tvOtherTimestamp.setText(strDate); } } @Override public int getItemCount() { return chatList.size(); } public class ChatViewHolder extends RecyclerView.ViewHolder { TextView tvMyMessage, tvMyTimestamp, tvOtherMessage, tvOtherTimestamp; View layoutChatMe, layoutChatOther; public ChatViewHolder(View itemView) { super(itemView); tvMyMessage=(TextView)itemView.findViewById(R.id.tvMyMessage); tvMyTimestamp=(TextView)itemView.findViewById(R.id.tvMyTimestamp); tvOtherMessage=(TextView)itemView.findViewById(R.id.tvOtherMessage); tvOtherTimestamp=(TextView)itemView.findViewById(R.id.tvOtherTimestamp); layoutChatMe=itemView.findViewById(R.id.layoutChatMe); layoutChatOther=itemView.findViewById(R.id.layoutChatOther); } } }
[ "abhishekkoranne2@gmail.com" ]
abhishekkoranne2@gmail.com
bd0d99ade204edbc2e0ca99580c6dab0f890931b
77d8475392b4c322a18e6bafc75fea0af0b77dd3
/src/main/server/com/baidu/hsb/server/response/ShowDataSources.java
e07d802c7f5157d23f3f79c41b2737a1ad8e5590
[ "Apache-2.0" ]
permissive
joliny/heisenberg
071db465401c07981fae0bee9bec5dfd0f396e8a
665f676cafc9be89e3bb20a253753efaab11bc3a
refs/heads/master
2020-04-02T10:01:47.675142
2014-03-16T09:13:10
2014-03-16T09:54:42
18,704,688
2
1
null
null
null
null
UTF-8
Java
false
false
3,537
java
/** * Baidu.com,Inc. * Copyright (c) 2000-2013 All Rights Reserved. */ package com.baidu.hsb.server.response; import java.nio.ByteBuffer; import java.util.Map; import com.baidu.hsb.HeisenbergServer; import com.baidu.hsb.config.Fields; import com.baidu.hsb.config.model.config.DataSourceConfig; import com.baidu.hsb.mysql.MySQLDataNode; import com.baidu.hsb.mysql.MySQLDataSource; import com.baidu.hsb.mysql.PacketUtil; import com.baidu.hsb.net.mysql.EOFPacket; import com.baidu.hsb.net.mysql.FieldPacket; import com.baidu.hsb.net.mysql.ResultSetHeaderPacket; import com.baidu.hsb.net.mysql.RowDataPacket; import com.baidu.hsb.server.ServerConnection; import com.baidu.hsb.util.IntegerUtil; import com.baidu.hsb.util.StringUtil; /** * 查询有效数据节点的当前数据源 * * @author xiongzhao@baidu.com */ public class ShowDataSources { private static final int FIELD_COUNT = 5; private static final ResultSetHeaderPacket header = PacketUtil.getHeader(FIELD_COUNT); private static final FieldPacket[] fields = new FieldPacket[FIELD_COUNT]; private static final EOFPacket eof = new EOFPacket(); static { int i = 0; byte packetId = 0; header.packetId = ++packetId; fields[i] = PacketUtil.getField("NAME", Fields.FIELD_TYPE_VAR_STRING); fields[i++].packetId = ++packetId; fields[i] = PacketUtil.getField("TYPE", Fields.FIELD_TYPE_VAR_STRING); fields[i++].packetId = ++packetId; fields[i] = PacketUtil.getField("HOST", Fields.FIELD_TYPE_VAR_STRING); fields[i++].packetId = ++packetId; fields[i] = PacketUtil.getField("PORT", Fields.FIELD_TYPE_LONG); fields[i++].packetId = ++packetId; fields[i] = PacketUtil.getField("SCHEMA", Fields.FIELD_TYPE_VAR_STRING); fields[i++].packetId = ++packetId; eof.packetId = ++packetId; } public static void response(ServerConnection c) { ByteBuffer buffer = c.allocate(); // write header buffer = header.write(buffer, c); // write field for (FieldPacket field : fields) { buffer = field.write(buffer, c); } // write eof buffer = eof.write(buffer, c); // write rows byte packetId = eof.packetId; Map<String, MySQLDataNode> nodes = HeisenbergServer.getInstance().getConfig().getDataNodes(); for (MySQLDataNode node : nodes.values()) { RowDataPacket row = getRow(node, c.getCharset()); row.packetId = ++packetId; buffer = row.write(buffer, c); } // write last eof EOFPacket lastEof = new EOFPacket(); lastEof.packetId = ++packetId; buffer = lastEof.write(buffer, c); // post write c.write(buffer); } private static RowDataPacket getRow(MySQLDataNode node, String charset) { RowDataPacket row = new RowDataPacket(FIELD_COUNT); row.add(StringUtil.encode(node.getName(), charset)); MySQLDataSource ds = node.getSource(); if (ds != null) { DataSourceConfig dsc = ds.getConfig(); row.add(StringUtil.encode(dsc.getType(), charset)); row.add(StringUtil.encode(dsc.getHost(), charset)); row.add(IntegerUtil.toBytes(dsc.getPort())); row.add(StringUtil.encode(dsc.getDatabase(), charset)); } else { row.add(null); row.add(null); row.add(null); row.add(null); } return row; } }
[ "brucest0078@gmail.com" ]
brucest0078@gmail.com
4dc70246373bc83b42825fbc98613386fc23a902
924debe5f4a5379cec51fc99210f60586a69a3b8
/RoboCode/src/group07test/ST_Q_1vs1SpinBot.java
47b40db6ca8680436e6ca7bd43c081595f678375
[ "MIT" ]
permissive
AzeyZ/RoboCode07
41723a890314fec4cd43df58507888ae0e884100
7863e70fa39908d3f4e88881e127cf3d148a9df4
refs/heads/master
2021-04-12T10:24:37.055539
2018-05-30T13:05:43
2018-05-30T13:05:43
126,352,835
0
0
null
null
null
null
UTF-8
Java
false
false
1,627
java
package group07test; import static org.junit.Assert.assertTrue; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import robocode.control.events.BattleCompletedEvent; import robocode.control.events.BattleMessageEvent; import robocode.control.events.RoundEndedEvent; import robocode.control.events.TurnEndedEvent; import robocode.control.snapshot.IRobotSnapshot; import robocode.control.testing.RobotTestBed; @RunWith(JUnit4.class) public class ST_Q_1vs1SpinBot extends RobotTestBed { private String ROBOT_UNDER_TEST = "group07.MrRobot*"; private String ENEMY_ROBOTS = "sample.SpinBot"; private int NBR_ROUNDS = 1000; private double TRESHHOLD = 1; private boolean PRINT_DEBUG = false; int wins = 0; @Override public String getRobotNames() { return ROBOT_UNDER_TEST + "," + ENEMY_ROBOTS; } @Override public int getNumRounds() { return NBR_ROUNDS; } @Override public String getInitialPositions() { return null; } @Override public boolean isDeterministic() { return true; } @Override protected int getExpectedErrors() { return 0; } @Override protected void runSetup() { } @Override protected void runTeardown() { } @Override public void onBattleCompleted(BattleCompletedEvent event) { wins = event.getIndexedResults()[0].getFirsts(); assertTrue("The Bot suck get more wins: " + wins + " wins. " + event.getIndexedResults()[0].getTeamLeaderName(), wins / (double)NBR_ROUNDS >= TRESHHOLD); } @Override public void onBattleMessage(BattleMessageEvent event) { event.getMessage(); } }
[ "din_dr_elvis@live.se" ]
din_dr_elvis@live.se
86a0a8f7c1fa22f2697afa783d90b764e3c18982
6478a7f9022cd185d9aaeb2a740a8e7df17ca0ec
/vaccination-scheduler-public/src/main/java/com/github/rixwwd/vaccination_scheduler/pub/service/ActionLogService.java
655a927ca04bc21442c501e9cd69f6ac7f977ac9
[ "MIT" ]
permissive
rixwwd/vaccination-scheduler
5484d688cc650ffb8b37cb60679df2bc0073a758
f7c25bd7e1ac0c9fb942989d8aa4495846d6e7c5
refs/heads/main
2023-04-08T21:56:10.206024
2021-04-23T14:28:14
2021-04-23T14:28:14
340,935,853
0
0
MIT
2021-04-23T13:57:49
2021-02-21T15:35:15
Java
UTF-8
Java
false
false
299
java
package com.github.rixwwd.vaccination_scheduler.pub.service; import com.github.rixwwd.vaccination_scheduler.pub.entity.ActionType; import com.github.rixwwd.vaccination_scheduler.pub.entity.PublicUser; public interface ActionLogService { void log(PublicUser publicUser, ActionType actionType); }
[ "rixwwd@users.noreply.github.com" ]
rixwwd@users.noreply.github.com
a9b67814311c2e900d0022625c77f4c0a3098ba1
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/TechriskInnovateMpcpromoSceneReleaseModel.java
c5ad6ad55f6d7f517256a1ec1af7361b47da3978
[ "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,177
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; /** * 场景中商品删除 * * @author auto create * @since 1.0, 2023-06-30 11:52:18 */ public class TechriskInnovateMpcpromoSceneReleaseModel extends AlipayObject { private static final long serialVersionUID = 3832264222767436361L; /** * 商品列表 */ @ApiListField("data_list") @ApiField("string") private List<String> dataList; /** * 坑位码,入参必须为数字或者英文字母 */ @ApiField("position_code") private String positionCode; /** * 场景id */ @ApiField("scene_id") private String sceneId; public List<String> getDataList() { return this.dataList; } public void setDataList(List<String> dataList) { this.dataList = dataList; } public String getPositionCode() { return this.positionCode; } public void setPositionCode(String positionCode) { this.positionCode = positionCode; } public String getSceneId() { return this.sceneId; } public void setSceneId(String sceneId) { this.sceneId = sceneId; } }
[ "auto-publish" ]
auto-publish
f9292a351eaec125880e06fbaed5a385c94537f7
c8da81b849573f9d2f12c5453f7be755e9316b6a
/apiRelish/src/main/java/com/itplus/service/CreatorService.java
91abb5733160692b91a680b894ea7c88dbad71b5
[]
no_license
trungcong1999/myRelish
b36148a2eec1b3eb8b41f818128e4b03e1326682
d75a5490421054b1c0ac2821dc0319d7aa7e2fba
refs/heads/main
2023-02-19T14:18:56.200775
2021-01-16T05:01:50
2021-01-16T05:01:50
324,576,648
0
0
null
2021-01-08T10:58:44
2020-12-26T14:55:43
Java
UTF-8
Java
false
false
206
java
package com.itplus.service; import java.util.List; import org.springframework.stereotype.Service; import com.itplus.entity.Creator; @Service public interface CreatorService { List<Creator> getAll(); }
[ "37680352+trungcong1999@users.noreply.github.com" ]
37680352+trungcong1999@users.noreply.github.com
73bfff321cc584f00af69bf082a71a8309d03a6b
0ac6caed45aaedf8819c3dc8d260be6a2bab9702
/src/main/java/com/lemsviat/lemhomework11/variant2/States.java
6f0c20cf42db9c3b1c097ffb632f1cb79ecfd9db
[]
no_license
lemsviat/lemhomework11
d4d4f7164bc8726038becf0cf79ca147d5ef5fd5
88a67c11b0628add5f41ae9453ae3b33c78d24c3
refs/heads/master
2021-05-21T13:39:44.421698
2020-04-06T15:03:55
2020-04-06T15:03:55
252,669,345
1
0
null
null
null
null
UTF-8
Java
false
false
682
java
package main.java.com.lemsviat.lemhomework11.variant2; public enum States { КАМЕНЬ, НОЖНИЦЫ, БУМАГА; public int compareStates(States otherState) { // Ничья if (this == otherState) return 0; switch (this) { case КАМЕНЬ: return (otherState == НОЖНИЦЫ ? 1 : -1); case БУМАГА: return (otherState == КАМЕНЬ ? 1 : -1); case НОЖНИЦЫ: return (otherState == БУМАГА ? 1 : -1); } // Этот код не должен выполняться никогда return 0; } }
[ "lemsviat@gmail.com" ]
lemsviat@gmail.com
b9dde647fbd4c8d2ef2cb5b7f5e281dad42deeb7
0a2924f4ae6dafaa6aa28e2b947a807645494250
/dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/validation/ValidateValidationCriteriaAction.java
75af2585e691cb9a9bab222e1ceb22fa726561d5
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
filoi/ImmunizationRepository
9483ee02afd0b46d0f321a1e1ff8a0f6d8ca7f71
efb9f2bb9ae3da8c6ac60e5d5661b8a79a6939d5
refs/heads/master
2023-03-16T03:26:34.564453
2023-03-06T08:32:07
2023-03-06T08:32:07
126,012,725
0
0
BSD-3-Clause
2022-12-16T05:59:21
2018-03-20T12:17:24
Java
UTF-8
Java
false
false
4,101
java
package org.hisp.dhis.trackedentity.action.validation; /* * Copyright (c) 2004-2015, University of Oslo * 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 HISP project nor the names of its 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 OWNER 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. */ import org.hisp.dhis.i18n.I18n; import org.hisp.dhis.validation.ValidationCriteria; import org.hisp.dhis.validation.ValidationCriteriaService; import com.opensymphony.xwork2.Action; /** * @author Chau Thu Tran * @version ValidateValidationCriteriaAction.java Apr 29, 2010 10:49:37 AM */ public class ValidateValidationCriteriaAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private ValidationCriteriaService validationCriteriaService; public void setValidationCriteriaService( ValidationCriteriaService validationCriteriaService ) { this.validationCriteriaService = validationCriteriaService; } private I18n i18n; public void setI18n( I18n i18n ) { this.i18n = i18n; } // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- private Integer id; public void setId( Integer id ) { this.id = id; } private String name; public void setName( String name ) { this.name = name; } // ------------------------------------------------------------------------- // Output // ------------------------------------------------------------------------- private String message; public String getMessage() { return message; } // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @Override public String execute() { if ( name == null || name.isEmpty() ) { message = i18n.getString( "specify_name" ); return INPUT; } else { name = name.trim(); if ( name.length() == 0 ) { message = i18n.getString( "specify_name" ); return INPUT; } ValidationCriteria match = validationCriteriaService.getValidationCriteria( name ); if ( match != null && (id == null || match.getId() != id) ) { message = i18n.getString( "name_in_use" ); return INPUT; } } return SUCCESS; } }
[ "neeraj@filoi.in" ]
neeraj@filoi.in
35f12cd1bd68e6d69dd28a79344183f37bc50361
6f8db5f2dbf4ee92730eb852a29c1f3c813cd8c3
/sirproj/src/main/java/com/ars/sirproj/dto/Ocupacion.java
9da1f4eb234a4b28083e1d5f03091815bc266dd3
[]
no_license
soniaGarcia/sirprojbeta-eclipse
24257440310e50fd376a826002b51cfa6acd747a
83b7a5429c80e4c7fd341d89ac8550d3ebbe72ff
refs/heads/master
2021-01-10T03:35:50.560594
2014-07-27T17:14:03
2014-07-27T17:14:03
48,115,747
1
0
null
null
null
null
UTF-8
Java
false
false
2,448
java
package com.ars.sirproj.dto; // Generated 26-feb-2014 12:16:25 by Hibernate Tools 3.6.0 import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; /** * Ocupacion generated by hbm2java */ @Entity @Table(name="ocupacion" ,schema="public" ) public class Ocupacion implements java.io.Serializable { private int idOcupacion; private CtgCatalogo ctgCatalogo; private String descripcionocupacion; private Boolean activo; private Set<Cliente> clientes = new HashSet(0); public Ocupacion() { } public Ocupacion(int idOcupacion) { this.idOcupacion = idOcupacion; } public Ocupacion(int idOcupacion, CtgCatalogo ctgCatalogo, String descripcionocupacion, Boolean activo, Set<Cliente> clientes) { this.idOcupacion = idOcupacion; this.ctgCatalogo = ctgCatalogo; this.descripcionocupacion = descripcionocupacion; this.activo = activo; this.clientes = clientes; } @Id @Column(name="id_ocupacion", unique=true, nullable=false) public int getIdOcupacion() { return this.idOcupacion; } public void setIdOcupacion(int idOcupacion) { this.idOcupacion = idOcupacion; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="ctg_cat_id") public CtgCatalogo getCtgCatalogo() { return this.ctgCatalogo; } public void setCtgCatalogo(CtgCatalogo ctgCatalogo) { this.ctgCatalogo = ctgCatalogo; } @Column(name="descripcionocupacion", length=50) public String getDescripcionocupacion() { return this.descripcionocupacion; } public void setDescripcionocupacion(String descripcionocupacion) { this.descripcionocupacion = descripcionocupacion; } @Column(name="activo") public Boolean getActivo() { return this.activo; } public void setActivo(Boolean activo) { this.activo = activo; } @OneToMany(fetch=FetchType.LAZY, mappedBy="ocupacion") public Set<Cliente> getClientes() { return this.clientes; } public void setClientes(Set<Cliente> clientes) { this.clientes = clientes; } }
[ "sonia.guadalupe.garcia@gmail.com" ]
sonia.guadalupe.garcia@gmail.com
f58b1c70c7d9628de051c045db4c1d323e9721f8
a7214eeb0e7dab722a66941270816ba425ed1769
/base/CharSet1ac.java
9df6fa0ce85e02af4a433141f7921094a9b7df40
[]
no_license
AnderJoeSun/JavaSE-Demos
5f9106ced7d8a00298c8415262cbef5d97d7aec2
ba47fd0638604b8be2971241a709dbb408d0b1a3
refs/heads/master
2020-12-20T04:19:51.583187
2020-01-24T07:45:52
2020-01-24T07:45:52
235,959,429
0
0
null
null
null
null
GB18030
Java
false
false
615
java
import java.util.*; import java.nio.charset.*; public class CharSet1ac{ public static void main(String arg[]) throws Exception{ Properties pps=System.getProperties(); pps.put("file.encoding","IS0-8859-1"); int data; int i=0; byte[] b=new byte[100]; while((data=System.in.read())!='q'){ b[i]=(byte)data; i++; } String str1=new String(b,0,i);//用"IS0-8859-1"解码得字符串 System.out.println(str1);//此字符串先被OUT对象用“GBK”编码成字节数组再打印 /*String str2=new String(str1.getBytes("IS0-8859-1"),"GBK"); System.out.println(str2);*/ } }
[ "abc@abc.com" ]
abc@abc.com
466090bb81b59e805af9e65328b7b0c76a304ee9
2d635bfc08ac6d0c5507e6f7dea90bd311e80fdb
/app/src/main/java/com/perfectdeveloperr/guessauto/MainActivity.java
bead813369a9d41980368c3de10b23ba54e459f5
[ "MIT" ]
permissive
MakmatovNickolai/guessAuto
b7933d110b08f8c65c3e1ff1e2ec77c276570c25
6633f5d06aafdb12251457e14704c48a320e3a0d
refs/heads/master
2021-07-14T07:12:16.633756
2017-10-20T11:27:34
2017-10-20T11:27:34
106,448,967
0
0
null
null
null
null
UTF-8
Java
false
false
11,522
java
package com.perfectdeveloperr.guessauto; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.media.MediaPlayer; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.MobileAds; import com.perfectdev.auto.R; import com.perfectdeveloperr.guessauto.data.DBHelper; import java.util.Random; import java.util.regex.Pattern; public class MainActivity extends AppCompatActivity implements View.OnClickListener { public final static String LOG_TAG="LOG_TAG"; public static final String APP_PREFERENCES = "mysettings"; private static final String APP_PREFERENCES_SCORE = "score" ; public static String PACKAGE_NAME; public SharedPreferences mSettings; private Button button; private Button button5; private Button button3; private Button button4; private ImageView img; private ImageView[] hearts; private TextView txt; private ProgressBar progress; private SharedPreferences.Editor editor; private int nextImage; private Random rnd = new Random(); private String[] images; private DBHelper dbHelper; private SQLiteDatabase db; private int nexim=0; private int score=0; private String but; private String temp; private CountDownTimer timer; private int attempt=0; private AlertDialog.Builder ad; private MediaPlayer mp; @Override protected void onStop(){ super.onStop(); db.close(); dbHelper.close(); } @Override protected void onDestroy(){ super.onDestroy(); timer.cancel(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_main); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); mSettings = getSharedPreferences(APP_PREFERENCES, Context.MODE_PRIVATE); MobileAds.initialize(getApplicationContext(),"ca-app-pub-5215138241700973~4827004632"); AdView adView = (AdView) findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); progress =(ProgressBar) findViewById(R.id.progressBar); button = (Button) findViewById(R.id.button); button5 = (Button) findViewById(R.id.button5); button3 = (Button) findViewById(R.id.button3); button4 = (Button) findViewById(R.id.button4); img = (ImageView) findViewById(R.id.imageView2); txt = (TextView) findViewById(R.id.textView); ImageView heart1 = (ImageView) findViewById((R.id.imageView)); ImageView heart2 = (ImageView) findViewById((R.id.imageView3)); ImageView heart3 = (ImageView) findViewById((R.id.imageView4)); hearts= new ImageView[]{heart1, heart2, heart3}; button.setOnClickListener(this); button5.setOnClickListener(this); button3.setOnClickListener(this); button4.setOnClickListener(this); PACKAGE_NAME = getApplicationContext().getPackageName(); ad = new AlertDialog.Builder(this); ad.setNegativeButton("ОК", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { mp = MediaPlayer.create(MainActivity.this, R.raw.trans); mp.start(); dialog.cancel(); MainActivity.this.finish(); startActivity(new Intent(MainActivity.this,MenuActivity.class)); } }); dbHelper = new DBHelper(this); timer =new CountDownTimer(15000, 50) { public void onTick(long millisUntilFinished) { progress.setProgress((int)millisUntilFinished / 150); } public void onFinish() { img.animate().alpha(0).setDuration(1000); Thread th = new Thread((new Runnable() { @Override public void run() { h.sendEmptyMessageDelayed(1,1000); h.removeCallbacks(null); } Handler h = new Handler() { @Override public void handleMessage(Message msg) { img.animate().alpha(1).setDuration(400); timer.start(); setRandomImage(); setButtonsText(); h.removeCallbacks(null); } }; })); th.start(); loseAttempt(); } }; db = dbHelper.getWritableDatabase(); images = getAuto("autoID"); swapArray(images); setRandomImage(); setButtonsText(); timer.start(); } public void pressButton(final Button x){ if(nexim==51){ attempt=2; loseAttempt(); } timer.cancel(); img.animate().alpha(0).setDuration(1000); Thread th = new Thread((new Runnable() { @Override public void run() { h.sendEmptyMessageDelayed(1,1000); h.removeCallbacks(null); } Handler h = new Handler() { @Override public void handleMessage(Message msg) { setRandomImage(); setButtonsText(); img.animate().alpha(1).setDuration(400); timer.start(); x.setBackgroundResource(R.drawable.button_bg); button.setClickable(true); button3.setClickable(true); button4.setClickable(true); button5.setClickable(true); h.removeCallbacks(null); } }; })); th.start(); String sqlQuery = "select autoDrawableName from mytable where autoID = ?"; Cursor c = db.rawQuery(sqlQuery,new String[]{getResources().getResourceEntryName(nextImage)}); int autoa = c.getColumnIndex("autoDrawableName"); but = x.getText().toString(); if (c.moveToFirst()) { temp =c.getString(autoa); c.close(); } if(but.equals(temp)){ mp = MediaPlayer.create(this, R.raw.success); mp.start(); score+=(progress.getProgress()); txt.setText(getResources().getString(R.string.score)+" "+score); x.setBackgroundResource(R.drawable.buttontrue); } else{ mp = MediaPlayer.create(this, R.raw.fail); mp.start(); x.setBackgroundResource(R.drawable.buttonfalse);; loseAttempt(); } } public void loseAttempt() { attempt++; hearts[attempt-1].setImageResource(R.drawable.heart); if(attempt == 3){ if(!mSettings.contains(APP_PREFERENCES_SCORE)){ editor = mSettings.edit(); editor.putInt(APP_PREFERENCES_SCORE, 0); editor.apply(); } if(score > mSettings.getInt(APP_PREFERENCES_SCORE, 0)){ ad.setIcon(R.drawable.starwin).setTitle(R.string.title).setMessage(getResources().getString(R.string.alert)+" "+score).setCancelable(false); editor = mSettings.edit(); editor.putInt(APP_PREFERENCES_SCORE, score); editor.apply(); attempt=0; AlertDialog alert = ad.create(); alert.show(); return; } else{ ad.setIcon(R.drawable.star).setTitle(R.string.title2).setMessage(getResources().getString(R.string.alert2)+" "+score).setCancelable(false); AlertDialog alert = ad.create(); alert.show(); attempt=0; return; } } } @Override public void onClick(View view) { button.setClickable(false); button3.setClickable(false); button4.setClickable(false); button5.setClickable(false); switch (view.getId()) { case R.id.button: pressButton(button); break; case R.id.button3: pressButton(button3); break; case R.id.button4: pressButton(button4); break; case R.id.button5: pressButton(button5); break; } } public void setRandomImage() { nextImage = getResources().getIdentifier(images[nexim], "drawable", PACKAGE_NAME); img.setImageResource(nextImage); nexim++; } public String[] splitString(){ db = dbHelper.getWritableDatabase(); String sqlQueryww = "select buttons from mytable where autoID = ?"; Cursor c = db.rawQuery(sqlQueryww,new String[]{getResources().getResourceEntryName(nextImage)}); int au = c.getColumnIndex("buttons"); String tempe = new String(); if(c.moveToFirst()){ tempe = c.getString(au);; c.close(); } Pattern pattern = Pattern.compile(","); return pattern.split(tempe); } public void setButtonsText(){ String[] buttons = splitString(); String[] butt= new String[4]; System.arraycopy(buttons,0,butt,0,butt.length); swapArray(butt); button.setText(butt[0]); button3.setText(butt[1]); button4.setText(butt[2]); button5.setText(butt[3]); } public void swapArray(String[] array){ for (int i=array.length-1; i>0; i--) { int j = rnd.nextInt(i+1); String temp = array[i]; array[i] = array[j]; array[j] = temp; } } public String[] getAuto(String x){ SQLiteDatabase db = dbHelper.getWritableDatabase(); String[] temp = new String[51]; Cursor c = db.query("mytable", new String[] {x}, null,null, null, null, null); if (c.moveToFirst()) { int imageColIndex = c.getColumnIndex(x); temp[0] = c.getString(imageColIndex); for (int i = 1;c.moveToNext() ; i++ ){ temp[i]=c.getString(imageColIndex); } } c.close(); return temp; } public void toMenu(View view) { mp = MediaPlayer.create(this, R.raw.trans); mp.start(); startActivity(new Intent(this,MenuActivity.class)); finish(); } }
[ "makamtovkolya@yandex.ru" ]
makamtovkolya@yandex.ru
3e08f5c35fb4c898bc63ed56897d6b174dba1e57
f36f6e1afb9bd8eba88432aa00916dd5ab5268ca
/src/main/java/forumapi/databases/controllers/ServiceController.java
aeee7d026c38d8f9cba6796a35ac1918dc92fdb9
[]
no_license
InfantryMan/tp-database
8256818607d3e8538ccfe2c5701845317976c3ac
ff623ac05e6335f716b8e0ae8eccd03e4ed6243f
refs/heads/master
2020-03-20T19:02:58.410515
2018-06-24T16:34:57
2018-06-24T16:34:57
137,618,552
0
0
null
null
null
null
UTF-8
Java
false
false
1,365
java
package forumapi.databases.controllers; import forumapi.databases.messages.Message; import forumapi.databases.messages.MessageStates; import forumapi.databases.services.ApplicationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; @RestController @RequestMapping(path = "/api/service") public class ServiceController { final private ApplicationService serviceService; @Autowired public ServiceController(ApplicationService serviceService) { this.serviceService = serviceService; } @RequestMapping(path = "/clear", method = RequestMethod.POST) public ResponseEntity clear() { serviceService.truncateTables(); return ResponseEntity.status(HttpStatus.OK).body(new Message(MessageStates.CLEAR_SUCCESSFUL.getMessage())); } @RequestMapping(path = "/status", method = RequestMethod.GET) public ResponseEntity getStatus(){ return ResponseEntity.ok(serviceService.getStatus()); } }
[ "rust-skate@mail.ru" ]
rust-skate@mail.ru
9f27f84cfd9f9a063da4c2352b782ac94c4354f8
1bf76e81e29bb10848ece2c7fe1038b09f7a0aaa
/src/matrix/FriendCircles.java
67eb17bc5416e1002bd9bbf6c862eb9b777ba0be
[]
no_license
Yunfeng1u/LeetCode
b74b4780c3cfa0e1c41f960681cb8b7b54286d14
80c91fd0e945acede495205593ddfa5ed9da0794
refs/heads/master
2021-07-06T18:24:13.750347
2019-05-07T10:29:07
2019-05-07T10:29:07
114,644,924
0
0
null
null
null
null
UTF-8
Java
false
false
1,675
java
package matrix; /** * TODO 547. Friend Circles * <p> * https://leetcode.com/problems/friend-circles/description/ * <p> * There are N students in a class. Some of them are friends, while some are not. * Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, * then A is an indirect friend of C. And we defined a friend circle is a group of students who are direct or indirect friends. * <p> * Given a N*N matrix M representing the friend relationship between students in the class. * If M[i][j] = 1, then the ith and jth students are direct friends with each other, otherwise not. * And you have to output the total number of friend circles among all the students. * <p> * Example 1: * Input: * [[1,1,0], * [1,1,0], * [0,0,1]] * Output: 2 * Explanation:The 0th and 1st students are direct friends, so they are in a friend circle. * The 2nd student himself is in a friend circle. So return 2. * Example 2: * Input: * [[1,1,0], * [1,1,1], * [0,1,1]] * Output: 1 * Explanation:The 0th and 1st students are direct friends, the 1st and 2nd students are direct friends, * so the 0th and 2nd students are indirect friends. All of them are in the same friend circle, so return 1. * Note: * N is in range [1,200]. * M[i][i] = 1 for all students. * If M[i][j] = 1, then M[j][i] = 1. */ public class FriendCircles { public static void main(String[] args) { System.out.println(findCircleNum(new int[][]{ {1, 1, 0}, {1, 1, 1}, {0, 1, 1} })); } public static int findCircleNum(int[][] M) { return 0; } }
[ "414675087@qq.com" ]
414675087@qq.com
10fbbb19715e7cee82089945845031d6f4767587
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-31-1-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/DocumentContentDisplayer_ESTest_scaffolding.java
86114c220504c8ce65e1e82339cfebc0c567fe38
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 08 19:36:32 UTC 2020 */ package org.xwiki.display.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DocumentContentDisplayer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9f66112d2d3c410973665eb7e71498cc9f1766df
8810972d0375c0a853e3a66bd015993932be9fad
/modelicaml/org.openmodelica.modelicaml.editor.xtext.valuebinding.client/src-gen/org/openmodelica/modelicaml/editor/xtext/valuebinding/client/impl/component_referenceImpl.java
7f9f6102923408c313f69a569d41408752e154ab
[]
no_license
OpenModelica/MDT
275ffe4c61162a5292d614cd65eb6c88dc58b9d3
9ffbe27b99e729114ea9a4b4dac4816375c23794
refs/heads/master
2020-09-14T03:35:05.384414
2019-11-27T22:35:04
2019-11-27T23:08:29
222,999,464
3
2
null
2019-11-27T23:08:31
2019-11-20T18:15:27
Java
WINDOWS-1252
Java
false
false
2,745
java
/* * This file is part of OpenModelica. * * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), * c/o Linköpings universitet, Department of Computer and Information Science, * SE-58183 Linköping, Sweden. * * All rights reserved. * * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE * OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE. * * The OpenModelica software and the Open Source Modelica * Consortium (OSMC) Public License (OSMC-PL) are obtained * from OSMC, either from the above address, * from the URLs: http://www.ida.liu.se/projects/OpenModelica or * http://www.openmodelica.org, and in the OpenModelica distribution. * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. * * This program is distributed WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. * * See the full OSMC Public License conditions for more details. * * Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-now * * Contributors: * Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adaptations * Parham Vasaiely, EADS Innovation Works / Hamburg University of Applied Sciences 2009-2011, implementation of simulation plugins */ package org.openmodelica.modelicaml.editor.xtext.valuebinding.client.impl; import org.eclipse.emf.ecore.EClass; import org.openmodelica.modelicaml.editor.xtext.valuebinding.client.ClientPackage; import org.openmodelica.modelicaml.editor.xtext.valuebinding.client.component_reference; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>component reference</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public class component_referenceImpl extends org.openmodelica.modelicaml.editor.xtext.model.modeleditor.impl.component_referenceImpl implements component_reference { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected component_referenceImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ClientPackage.Literals.COMPONENT_REFERENCE; } } //component_referenceImpl
[ "wschamai" ]
wschamai
175edf10086b6761382cec6515bee641b643f911
58d6947e8df55adb2329956ee3be9a74e6f6c2cc
/boboface-design-pattern/src/main/java/observerpattern/weather/push/Client.java
27fc3eab14b3f65b233e79aeb3a23a71fae1aa85
[]
no_license
zowbman/java-study
c38bba5a144322dfff1172d741fabe449d078605
e0dfb38fda7ce112199fd430fa8bcb82655417c2
refs/heads/master
2021-01-20T11:22:39.989711
2017-02-23T04:31:08
2017-02-23T04:31:08
82,781,309
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
package observerpattern.weather.push; /** * Created by zwb on 2017/2/22.推模式 */ public class Client { public static void main(String[] args) { //1、创建目标 ConcreteWeatherSubject weather = new ConcreteWeatherSubject(); //2、创建观察者 ConcreteObserver observerGirl = new ConcreteObserver(); observerGirl.setObserverName("小明的女朋友"); observerGirl.setRemindThing("是我们的第一次约会,地点你家"); ConcreteObserver observerMum = new ConcreteObserver(); observerMum.setObserverName("小明的老妈"); observerMum.setRemindThing("逛街"); //3、注册观察者 weather.attach(observerGirl); weather.attach(observerMum); //4、目标发布天气 weather.setWeatherContent("明天是一个好日子"); //统一通知,分别处理 } }
[ "zhangweibao@kugou.net" ]
zhangweibao@kugou.net
abe32b1c97c99fbbdff128b42c01aa7691bd688e
a79786171538aa07a64e34a13a5ccacd25e5f85d
/dialog/src/main/java/com/binioter/dialog/DialogUtil.java
0b5837f029c44e5dfecb8b68fd673c04dc8c248c
[ "Apache-2.0" ]
permissive
lydialoveslychee/CommonApp
0ec1cedde869dbae4c082b572d900db414d6b20c
97388e33305b326591d827ab1c15e7cde4e0707f
refs/heads/master
2020-12-02T06:27:49.834212
2017-08-30T10:27:15
2017-08-30T10:27:15
96,838,771
0
0
null
2017-07-11T01:52:08
2017-07-11T01:52:08
null
UTF-8
Java
false
false
4,132
java
package com.binioter.dialog; import android.content.Context; import android.content.DialogInterface; import android.text.TextUtils; import android.widget.LinearLayout; /** * 创建时间: 2016/11/18 14:15 <br> * 作者: zhangbin <br> * 描述: dialog工具类 */ public class DialogUtil { /** * 只有msg和一个按钮 * * @param context 上下文 * @param msg 提示信息 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 */ public static CustomDialog createDialogButton(Context context, String msg, String btn1title, DialogInterface.OnClickListener mlistener1) { return createDialog(context, null, msg, btn1title, mlistener1, null, null, null); } /** * 只有msg和两个按钮 * * @param msg 提示信息 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 * @param btn2title 右边按钮名称 * @param mlistener2 右边按钮事件 */ public static CustomDialog createDialog2Button(Context context, String msg, String btn1title, DialogInterface.OnClickListener mlistener1, String btn2title, DialogInterface.OnClickListener mlistener2) { return createDialog(context, null, msg, btn1title, mlistener1, btn2title, mlistener2, null); } /** * 只有title和一个按钮和提示信息 * * @param title 对话框标题 * @param msg 提示信息 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 */ public static CustomDialog createDialogMsg(Context context, String title, String msg, String btn1title, DialogInterface.OnClickListener mlistener1) { return createDialog(context, title, msg, btn1title, mlistener1, null, null, null); } /** * 自定义提示信息部分dialog * * @param contentView 自定义view * @param title 对话框标题 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 * @param btn2title 右边按钮名称 * @param mlistener2 右边按钮事件 */ public static CustomDialog createCustomDialog(Context context, String title, LinearLayout contentView, String btn1title, DialogInterface.OnClickListener mlistener1, String btn2title, DialogInterface.OnClickListener mlistener2) { return createDialog(context, title, null, btn1title, mlistener1, btn2title, mlistener2, contentView); } /** * 有title和两个按钮和提示信息 * * @param title 对话框标题 * @param msg 提示信息 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 * @param btn2title 右边按钮名称 * @param mlistener2 右边按钮事件 */ public static CustomDialog createDialog2ButtonMsg(Context context, String title, String msg, String btn1title, DialogInterface.OnClickListener mlistener1, String btn2title, DialogInterface.OnClickListener mlistener2) { return createDialog(context, title, msg, btn1title, mlistener1, btn2title, mlistener2, null); } /** * 有title和两个按钮和自定义view * * @param title 对话框标题 * @param msg 提示信息 * @param btn1title 左边按钮名称 * @param mlistener1 左边按钮事件 * @param btn2title 右边按钮名称 * @param mlistener2 右边按钮事件 * @param contentView 自定义view */ private static CustomDialog createDialog(Context context, String title, String msg, String btn1title, DialogInterface.OnClickListener mlistener1, String btn2title, DialogInterface.OnClickListener mlistener2, LinearLayout contentView) { CustomDialog.Builder builder = new CustomDialog.Builder(context).setTitle(title); if (!TextUtils.isEmpty(msg)) { builder.setMessage(msg); } if (!TextUtils.isEmpty(btn1title) && !TextUtils.isEmpty(btn2title)) { builder.setRightBtnText(btn2title, mlistener2); builder.setLeftBtnText(btn1title, mlistener1); } else { builder.setRightBtnText(btn1title, mlistener1); } if (null != contentView) { builder.setContentView(contentView); } return builder.create(); } }
[ "bin_iot@163.com" ]
bin_iot@163.com
c9924ae2fd563c685acedec10d11e0b8e0535442
a62ffffdf9e24615aaf5b19eae1d6e3aef26fab8
/task_14/Oleg.Mikhailov/src/main/java/com/hillel/tasks/second/Worker.java
cfeed6f9a659d0f1fd0697c6f28e866516e810f3
[]
no_license
jelem/homework
057511e2c1964161268c78a76424b03b809960c4
667062d8429de89fd90b865134c006df5b5fbc7e
refs/heads/master
2021-01-12T08:29:08.980560
2017-04-01T06:43:21
2017-04-01T06:43:21
76,594,666
1
22
null
2017-04-01T06:43:21
2016-12-15T20:43:28
Java
UTF-8
Java
false
false
100
java
package com.hillel.tasks.second; public interface Worker { void work(); String getName(); }
[ "Oleg Mikhailov" ]
Oleg Mikhailov
3d115a991042f4c5ca467099846032a35742ab86
92d63f3ce37769844c43d11f3e791b020b02befc
/app/src/main/java/me/next/ninepic/TimeLineBean.java
e1048a07dedce81505d4af43e7d12a8d7343d366
[ "Apache-2.0" ]
permissive
kingideayou/NinePicView
167c76a95c886b06376695d8bc238750c20e6430
8bda4478a796b374c57a0fb4a85ccb624ff9761a
refs/heads/master
2021-05-08T05:41:31.726992
2017-10-24T03:54:09
2017-10-24T03:54:09
106,510,504
5
0
null
null
null
null
UTF-8
Java
false
false
627
java
package me.next.ninepic; import java.util.List; /** * Created by NeXT on 17/10/11. */ public class TimeLineBean { public TimeLineBean(String content, List<String> imgList) { this.content = content; this.imgList = imgList; } private String content; private List<String> imgList; public String getContent() { return content; } public void setContent(String content) { this.content = content; } public List<String> getImgList() { return imgList; } public void setImgList(List<String> imgList) { this.imgList = imgList; } }
[ "kingideayou@qq.com" ]
kingideayou@qq.com
dad9e9c52f88b9c418691fab531bce84b399b3f8
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14227-5-30-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/migration/AbstractDataMigrationManager_ESTest_scaffolding.java
df8445a4be80db148066d59741d476a437fbe463
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 18 19:44:11 UTC 2020 */ package com.xpn.xwiki.store.migration; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractDataMigrationManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
adb10d37e4891ce73315488c36395577127285ad
77cb76372ce0a92f1064a1015cc205666d00a4e4
/Syska_hybrid_framework/src/com/syska/testcases/Tc_Login_Accessories.java
0910691833c18d23361130bb3ae950029140e801
[]
no_license
shaan7744/TestingGeeks
0b7f8c7caa04c9ae19720f514a433cd20a211186
8a060b955421ec25f22466f300711615b5b24cd6
refs/heads/master
2020-09-12T04:52:10.940788
2019-11-17T21:50:40
2019-11-17T21:50:40
222,313,294
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package com.syska.testcases; import java.io.IOException; import org.testng.Assert; import org.testng.annotations.Test; import com.syska.baseClass.BaseClass; import com.syska.pageObjects.Accessories_Page; import com.syska.pageObjects.Login_Page; public class Tc_Login_Accessories extends BaseClass{ @Test public void Accessories() throws IOException, InterruptedException { driver.get(url); Thread.sleep(3000); logger.info("Url is opend"); Login_Page lp=new Login_Page(driver); Accessories_Page a=new Accessories_Page(driver); lp.loginClick(); lp.setmail(emailId); logger.info("Entered user name"); lp.setpassword(password); logger.info("Entered password"); lp.clickbtn(); Thread.sleep(5000); a.AccessClick(); a.powerBankClick(); Thread.sleep(5000); } }
[ "shaankhan7744@gmail.com" ]
shaankhan7744@gmail.com
99e8c6fc928c2eceb9175fd0851fa14f306c5cfc
95b0311dbdeb3269fbc94c217e7b3d095b5904df
/app/src/main/java/models/Test.java
eb2d900b946d35f0276c66bf0c53fc6b172339ae
[]
no_license
rohanraarora/Kalpavriksh-Pro
0d71b98fdfbf660a694e07606025ce19212b7470
124070b59c04cc7a95c0c76892958f2a20570a18
refs/heads/master
2020-04-14T20:15:19.492982
2015-11-25T19:41:13
2015-11-25T19:41:13
41,358,576
1
0
null
2020-03-18T07:05:04
2015-08-25T10:51:07
Java
UTF-8
Java
false
false
328
java
package models; /** * Created by Rohan on 8/26/2015. * */ public class Test extends LabItem{ public Test(int id,String name){ this.id = id; this.name = name; this.type = TEST; } public int getId() { return id; } public String getName() { return name; } }
[ "rohanraarora@gmail.com" ]
rohanraarora@gmail.com
93521ff695ce1265e3c4185ae16d0dc4d5e2eab0
e4e91603c1d5750ccdd95486230e978b0f4fa00e
/Selenium/src/main/java/collections/LearnArrays.java
f9f18730f47671568525f60c9b7037100a6a3e81
[]
no_license
Nataraj-Velmurugan/Selenium-Java-Repo
11d187c0bb8c7eb5809c1ec0f95f399c93594c9a
227250087251a1929f055146a1953b8c6d3b6f2f
refs/heads/master
2021-06-18T21:22:05.181842
2017-06-20T13:44:11
2017-06-20T13:44:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
package collections; import java.util.Arrays; public class LearnArrays { /** * Date: 19 Feb 2017 * An array is a container object that holds a fixed number * of values of a single type. * The length of an array is established when the array is * created.After creation, its length is fixed. * * Each item in an array is called an element, and * each element is accessed by its numerical index. * Starting index : 0 * */ /** * @param args */ /** * @param args */ /** * @param args */ public static void main(String[] args) { // It is 6 sized array supports only String String[] mentors = new String[6]; mentors[0] = "Karim"; mentors[1] = "Indhu"; mentors[2] = "Gopi"; mentors[3] = "Sunil"; mentors[4] = "Nesa"; mentors[5] = "Lokesh"; // if not assigned ; so default value is null System.out.println("The number of mentors are :"+mentors.length); System.out.println(mentors[1]); System.out.println(mentors[5]); //System.out.println(mentors[6]); // accessing beyond size, throws exception // Array sort for string throw error Arrays.sort(mentors); System.out.println(mentors[0]); System.out.println(mentors[5]); // Filling an array to place a specific value at each index Arrays.fill(mentors, "Babu"); System.out.println(mentors[0]); // Another way of creating int[] weeks = {10,20,30,40,50,60,100,80,70,90}; System.out.println("int array: "+ weeks[1]); // Searching for a mentor System.out.println("The index of 1 is :" + " :"+Arrays.binarySearch(weeks, 20)); // binarySearch not applicable to String but can be used for character int[] anotherWeek = weeks.clone(); System.out.println(anotherWeek[2]); // Compare 2 arrays System.out.println("The comparison of the 2 int arrays are:" + " clone : "+Arrays.equals(weeks, anotherWeek)); //System.out.println(anotherWeek[2]); int[] nextWeek = Arrays.copyOf(anotherWeek, 5); for (int i = 0; i < nextWeek.length; i++) { System.out.println(nextWeek[i]); } //System.out.println(sort.toString()); } }
[ "raajei50@gmail.com" ]
raajei50@gmail.com
f312e8570a34c4b3513d945c23547a0919038077
f06475ee57e740974cf0b16b2475d36a5712d40c
/blog-core/src/main/java/com/tommonkey/common/mess/dao/ICfgMsgCollectResultDao.java
439ed166ee05e69137d0f1d29516a188d10627ae
[]
no_license
tommonkey321/blog-app
38cf19cf9157e29f3e264d8f8d16daafeedc9ed1
49ad011fad01be824d7656629411249b75578cb0
refs/heads/master
2020-12-03T08:15:34.043664
2018-01-02T09:05:59
2018-01-02T09:05:59
95,672,208
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package com.tommonkey.common.mess.dao; import com.tommonkey.common.persistence.annotation.Dao; import com.tommonkey.common.persistence.dao.CrudDao; import com.tommonkey.common.mess.entity.CfgMsgCollectResultEntity; @Dao(CfgMsgCollectResultEntity.class) public interface ICfgMsgCollectResultDao extends CrudDao<CfgMsgCollectResultEntity,Long>{ }
[ "houyafei110" ]
houyafei110
4fb6e3d65fb7c0902237a666e74c1478f28d5972
b7af29bd772574350fa419ed2682aff43210580b
/javaEE/数据库登录/src/dao/Dao.java
cca77464375ef128edbb182b01c9e6460e19c1f9
[]
no_license
koala0018/java
a1d440a50bce876ee69e6ccaecb578ae47127889
992f7f01353347f79c6c05a4c7081b7aabfcec92
refs/heads/master
2023-01-12T10:13:42.100250
2020-11-22T03:18:20
2020-11-22T03:18:20
296,346,664
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package dao; import java.util.List; public interface Dao <T>{ public abstract void insert(T t); public abstract void update(T t); public abstract void delete(T t); public abstract T selectByname(T t);//只返回查出的一条数据,即表类型的对象 public abstract List<T> selectAll(); }
[ "1403019363@qq.com" ]
1403019363@qq.com
4aea6de83ef8e3e813cbfb5c88656f96556a3ef9
e3c4870c8e8192df2c5735b0c27f51c22e059720
/src/sun/swing/MenuItemCheckIconFactory.java
8e0964c65b7013a53dd4b1a2015a69277231e113
[]
no_license
xiangtch/Java
fec461aee7fd1dfd71dd21a482a75022ce35af9d
64440428d9af03779ba96b120dbb4503c83283b1
refs/heads/master
2020-07-14T01:23:46.298973
2019-08-29T17:49:18
2019-08-29T17:49:18
205,199,738
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package sun.swing; import javax.swing.Icon; import javax.swing.JMenuItem; public abstract interface MenuItemCheckIconFactory { public abstract Icon getIcon(JMenuItem paramJMenuItem); public abstract boolean isCompatible(Object paramObject, String paramString); } /* Location: E:\java_source\rt.jar!\sun\swing\MenuItemCheckIconFactory.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "imsmallmouse@gmail" ]
imsmallmouse@gmail
4fb9b35fd5531a218605ce12f59931c93a4732d0
75cdf3bf18637c168881acf02a047b4f1b655905
/src/main/java/com/pluralsight/conferencedemo/models/Session.java
6086207786d293a525342c75d3de80245973b68f
[]
no_license
javdevV/conference-demo
712766a5b044632f547328f189f6ac576b309136
d09e0b46e7be597caac10641e5690fdcd7e1fa3a
refs/heads/master
2022-04-23T01:49:51.569797
2020-04-25T03:55:10
2020-04-25T03:55:10
258,677,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.pluralsight.conferencedemo.models; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; import java.util.List; @Entity(name = "sessions") @JsonIgnoreProperties({"hibernateLazyInitializer","handler"}) public class Session { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long session_id; private String session_name; private String session_description; private Integer session_length; @ManyToMany @JoinTable( name = "session_speakers", joinColumns = @JoinColumn(name = "session_id"), inverseJoinColumns = @JoinColumn(name = "speaker_id") ) private List<Speaker> speakers; public Session() { } public Long getSession_id() { return session_id; } public void setSession_id(Long session_id) { this.session_id = session_id; } public String getSession_name() { return session_name; } public void setSession_name(String session_name) { this.session_name = session_name; } public String getSession_description() { return session_description; } public void setSession_description(String session_description) { this.session_description = session_description; } public Integer getSession_length() { return session_length; } public void setSession_length(Integer session_length) { this.session_length = session_length; } public List<Speaker> getSpeakers() { return speakers; } public void setSpeakers(List<Speaker> speakers) { this.speakers = speakers; } }
[ "houssem.missaoui@esprit.tn" ]
houssem.missaoui@esprit.tn
ecd96022d2fb7621c60e920f66daa49ab504de78
f546c1dc09f85558727034b40041a7a657ec30f0
/app/src/main/java/com/hannan/movieapp/moviedetails/MovieDetailsActivity.java
e551b98421dceed417fee3593d1ab7719d562137
[]
no_license
HannanShaik/MovieBrowserApp
ee2483713b37e7720a6a14b5d4ce6cc721cbcfce
e1bde6db146a292957d13418c466e082c767405a
refs/heads/master
2021-05-08T13:27:00.676589
2018-02-02T17:58:43
2018-02-02T17:58:43
120,013,080
0
0
null
null
null
null
UTF-8
Java
false
false
2,160
java
package com.hannan.movieapp.moviedetails; import android.os.Bundle; import android.view.MenuItem; import android.widget.ImageView; import android.widget.TextView; import com.hannan.movieapp.R; import com.hannan.movieapp.api.Movie; import com.hannan.movieapp.common.BaseActivity; import com.squareup.picasso.Picasso; import butterknife.BindView; import butterknife.ButterKnife; /** * Created by hannanshaik on 02/02/18. */ public class MovieDetailsActivity extends BaseActivity implements MovieDetailsView { @BindView(R.id.ivMovieBackdrop) ImageView movieBackdrop; @BindView(R.id.tvMovieOverview) TextView movieOverview; @BindView(R.id.tvReleaseDate) TextView releaseDate; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_movie_details); ButterKnife.bind(this); if(getSupportActionBar()!=null){ getSupportActionBar().setDisplayHomeAsUpEnabled(true); } MovieDetailsPresenter movieDetailsPresenter = new MovieDetailsPresenter(); movieDetailsPresenter.attachView(this); Movie movie = (Movie) getIntent().getSerializableExtra("movie"); movieDetailsPresenter.fetchAndDisplayMovieDetails(movie); } @Override public void showProgressDialog(String message) { super.showProgressDialog(message); } @Override public void dismissProgressDialog() { super.dismissProgressDialog(); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case android.R.id.home: finish(); return true; default: return super.onOptionsItemSelected(item); } } @Override public void populateUI(Movie movie) { getSupportActionBar().setTitle(movie.getTitle()); Picasso.with(this).load("http://image.tmdb.org/t/p/w500/"+movie.getBackdropPath()).into(movieBackdrop); movieOverview.setText(movie.getOverview()); releaseDate.setText(movie.getReleaseDate()); } }
[ "hannan.shaik@gmail.com" ]
hannan.shaik@gmail.com
eccdc83816a2d68790313056d60a431dc715b484
e0f9187c3e045beadca449395fef259d0f2090cb
/com.amd.aparapi/src/java/com/amd/aparapi/internal/opencl/OpenCLLoader.java
5618df335ad277607237ad198e73038e86b0d78a
[ "BSD-3-Clause" ]
permissive
agrippa/hadoopcl-aparapi
fa8dc2c9ef05a2dcb5ebfba550d629ca192f85e3
2a4f0ec86f757ce69ef2618a14aa931e091803ea
refs/heads/master
2021-05-28T14:18:29.934859
2014-12-29T06:34:31
2014-12-29T06:34:31
11,885,357
0
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package com.amd.aparapi.internal.opencl; import java.util.logging.Level; import java.util.logging.Logger; import com.amd.aparapi.internal.jni.OpenCLJNI; /** * This class is intended to be a singleton which determines if OpenCL is available upon startup of Aparapi */ public class OpenCLLoader extends OpenCLJNI{ private static boolean openCLAvailable = false; private static final OpenCLLoader instance = new OpenCLLoader(); static { final String arch = System.getProperty("os.arch"); String aparapiLibraryName = null; if (arch.equals("amd64") || arch.equals("x86_64")) { aparapiLibraryName = "aparapi_x86_64"; } else if (arch.equals("x86") || arch.equals("i386")) { aparapiLibraryName = "aparapi_x86"; } if (aparapiLibraryName != null) { try { Runtime.getRuntime().loadLibrary(aparapiLibraryName); openCLAvailable = true; } catch (final UnsatisfiedLinkError e) { System.err.println("Check your environment. Failed to load aparapi native library " + aparapiLibraryName + " or possibly failed to locate opencl native library (opencl.dll/opencl.so)." + " Ensure that both are in your PATH (windows) or in LD_LIBRARY_PATH (linux)."); System.exit(1); } } } /** * Retrieve a singleton instance of OpenCLLoader * * @return A singleton instance of OpenCLLoader */ protected static OpenCLLoader getInstance() { return instance; } /** * Retrieve the status of whether OpenCL was successfully loaded * * @return The status of whether OpenCL was successfully loaded */ public static boolean isOpenCLAvailable() { return openCLAvailable; } }
[ "jmaxg3@gmail.com" ]
jmaxg3@gmail.com
4d01aa2e07bfbac391e1cab5281a9bbb0a9baf1e
f49cf9734b6dad3b637f4e2503b6667a9a86e036
/src/main/java/com/gdut/ExamSystem/model/StudentExamJunction.java
8048ba5e0995e11a1a456a0f430274e7851bb7f5
[]
no_license
WhiteBugs/ExamSystem
bea710405b8a4333ed6243471ad2340e0f0f19a9
5fc0f3ff2bc1c2c6d3a218c11f79e8ca36b5316b
refs/heads/master
2021-01-22T20:35:45.173023
2017-11-05T05:39:51
2017-11-05T05:40:02
85,191,534
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.gdut.ExamSystem.model; public class StudentExamJunction extends StudentExamJunctionKey { private Integer score; public Integer getScore() { return score; } public void setScore(Integer score) { this.score = score; } }
[ "chengjianan1996@gmail.com" ]
chengjianan1996@gmail.com
d1c3436b0bf3502eb2b95d9233257c107b15ace8
422f187b6a01d25c3c063511b9a55a3c7907db0b
/src/main/java/br/com/teste/itau/password/rule/MinDigitsRule.java
11bee08f1d6e0d9060a600be87cea8df45846444
[]
no_license
tiporox/teste-itau
18717da88e8b482370df8b199c0b1dd60219d691
2225d2541e0091d434905ed936b8815db92d3ce3
refs/heads/main
2023-02-12T03:48:15.951106
2021-01-04T12:11:01
2021-01-04T12:11:01
326,204,836
0
0
null
null
null
null
UTF-8
Java
false
false
518
java
package br.com.teste.itau.password.rule; import org.apache.commons.lang3.StringUtils; import br.com.teste.itau.password.enumeration.PasswordRuleError; public class MinDigitsRule implements PasswordRule { private static final Integer MIN_DIGITS = 1; @Override public boolean isValid(final String password) { return StringUtils.isNotBlank(password) && password.replaceAll("[^\\d]", "").length() >= MIN_DIGITS; } @Override public PasswordRuleError getError() { return PasswordRuleError.MIN_DIGITS; } }
[ "tiporox@hotmail.com" ]
tiporox@hotmail.com
1fb3f28cbe61c72ca2005ce439409d80b12a636c
ee59130ea3f21f3155569cfbda6759e1245f8be8
/app/src/main/java/robor/wildfiremapper/di/component/ServiceComponent.java
2eeaca3335eb0fa3c8a911b5f94f8ab3b0c6889b
[]
no_license
Qubiz/WildfireMapper
5c996bb54d653bb59dec861525553da0c65b6ef7
5599b24cb63298fdebf72884db606914e38515f0
refs/heads/master
2020-03-18T09:55:09.842721
2018-05-29T14:51:53
2018-05-29T14:51:53
134,587,278
0
0
null
null
null
null
UTF-8
Java
false
false
564
java
package robor.wildfiremapper.di.component; import dagger.Component; import robor.wildfiremapper.di.PerService; import robor.wildfiremapper.di.module.ServiceModule; import robor.wildfiremapper.service.SyncService; import robor.wildfiremapper.service.bluetooth.mldp.MLDPConnectionService; @PerService @Component(dependencies = ApplicationComponent.class, modules = ServiceModule.class) public interface ServiceComponent { void inject(SyncService service); // void inject(MLDPDataReceiverService service); void inject(MLDPConnectionService service); }
[ "qubizwow@gmail.com" ]
qubizwow@gmail.com
410bb0cb860e3d2e4d9b4394f75a7c1493a61f88
3f92ee07b6120224b1adc7b63b6448af6f351d1a
/app/src/main/java/com/yscall/designmode/strategy/StrategyControl.java
d9a67b1e0ccba485d881af8d0d7b3cde1a40e413
[]
no_license
skymarginal/DesignMode
8a27de723d7be352b0c86a1bea84b49fbd83669a
422026e5831e2c59dd37115ee85f713054572302
refs/heads/master
2020-04-24T13:11:05.572394
2019-02-22T03:17:30
2019-02-22T03:17:30
171,978,687
0
0
null
null
null
null
UTF-8
Java
false
false
1,249
java
package com.yscall.designmode.strategy; import com.yscall.designmode.strategy.base.BaseDuck; import com.yscall.designmode.strategy.behavior.FlyRocketPowered; import com.yscall.designmode.strategy.duck.MallardDuck; import com.yscall.designmode.strategy.duck.ModelDuck; /** * Created by 你的样子 on 2019/2/22. * 策略模式控制器 * * @author gerile */ public class StrategyControl { private static StrategyControl mInstance; public static StrategyControl getInstance() { if (mInstance == null) { synchronized (StrategyControl.class) { if (mInstance == null) { mInstance = new StrategyControl(); } } } return mInstance; } public void execute() { //绿头鸭 BaseDuck mallardDuck = new MallardDuck(); mallardDuck.display(); mallardDuck.performQuack(); mallardDuck.performFly(); //模型鸭 BaseDuck modelDuck = new ModelDuck(); modelDuck.display(); modelDuck.performQuack(); modelDuck.performFly(); //模型鸭具备火箭动力 modelDuck.setFlyBehavior(new FlyRocketPowered()); modelDuck.performFly(); } }
[ "gerile_w@163.com" ]
gerile_w@163.com
f537284f87eb4858b0865057f612a5591dbd21f3
475771ee65ac8e34db22827adf4768e7604e22fa
/src/main/java/com/codegym/model/service/contract/impl/ContractDetailServiceImpl.java
76138c9d1ed44b2fa2215948a87300bb5bebd151
[]
no_license
manhdung98na/C0321G1_NguyenManhDung_CasestudyModule4
a7ccc00c397b92335d80994003a14e8807247225
2d6aa8e4d00fb2deff75bdea1e924d8e8de41332
refs/heads/master
2023-07-02T21:33:27.841583
2021-08-11T08:50:03
2021-08-11T08:50:03
393,383,433
0
0
null
null
null
null
UTF-8
Java
false
false
2,524
java
package com.codegym.model.service.contract.impl; import com.codegym.model.entity.about_contract.ContractDetail; import com.codegym.model.repository.contract.ContractDetailRepository; import com.codegym.model.service.contract.AttachServiceService; import com.codegym.model.service.contract.ContractDetailService; import com.codegym.model.service.contract.ContractService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class ContractDetailServiceImpl implements ContractDetailService { @Autowired private ContractDetailRepository repository; @Autowired private AttachServiceService attachServiceService; @Autowired private ContractService contractService; @Override public Page<ContractDetail> findAll(Pageable pageable) { return repository.findAllByDeletedIsFalse(pageable); } @Override public Optional<ContractDetail> findById(Integer id) { return repository.findById(id); } @Override public ContractDetail save(ContractDetail contractDetail) { if (attachServiceService.decreaseUnit(contractDetail.getAttachService(), contractDetail.getQuantity())) { ContractDetail contractDetailFoundInDB = repository.findByAttachServiceIdAndContractId(contractDetail.getAttachService().getAttachServiceId(), contractDetail.getContract().getContractId()); if (contractDetailFoundInDB != null) { contractDetailFoundInDB.setQuantity(contractDetailFoundInDB.getQuantity() + contractDetail.getQuantity()); repository.save(contractDetailFoundInDB); contractService.calculateToTalMoney(contractDetailFoundInDB.getContract()); return contractDetailFoundInDB; } repository.save(contractDetail); contractService.calculateToTalMoney(contractDetail.getContract()); return contractDetail; } return null; } @Override public void delete(Integer id) { ContractDetail contractDetail = repository.getById(id); contractDetail.setDeleted(true); repository.save(contractDetail); } @Override public Page<ContractDetail> search(String search, Pageable pageable) { return repository.search(search, pageable); } }
[ "md0949470893@gmail.com@github.com" ]
md0949470893@gmail.com@github.com
b25b9c93bbcf73f7d65fe7599d4f95b899beb116
bf2966abae57885c29e70852243a22abc8ba8eb0
/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/NonCompliantSummaryMarshaller.java
caecde2a66d6a6e77794552c440fa2c03daafffe
[ "Apache-2.0" ]
permissive
kmbotts/aws-sdk-java
ae20b3244131d52b9687eb026b9c620da8b49935
388f6427e00fb1c2f211abda5bad3a75d29eef62
refs/heads/master
2021-12-23T14:39:26.369661
2021-07-26T20:09:07
2021-07-26T20:09:07
246,296,939
0
0
Apache-2.0
2020-03-10T12:37:34
2020-03-10T12:37:33
null
UTF-8
Java
false
false
2,406
java
/* * Copyright 2016-2021 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.simplesystemsmanagement.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.simplesystemsmanagement.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * NonCompliantSummaryMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class NonCompliantSummaryMarshaller { private static final MarshallingInfo<Integer> NONCOMPLIANTCOUNT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("NonCompliantCount").build(); private static final MarshallingInfo<StructuredPojo> SEVERITYSUMMARY_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SeveritySummary").build(); private static final NonCompliantSummaryMarshaller instance = new NonCompliantSummaryMarshaller(); public static NonCompliantSummaryMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(NonCompliantSummary nonCompliantSummary, ProtocolMarshaller protocolMarshaller) { if (nonCompliantSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(nonCompliantSummary.getNonCompliantCount(), NONCOMPLIANTCOUNT_BINDING); protocolMarshaller.marshall(nonCompliantSummary.getSeveritySummary(), SEVERITYSUMMARY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
798416f2a19f27e1087d1062ed5464224d7dc91b
a644527247ad9346e7b3cf9dec427b439f0c6bd0
/android_application/build/tmp/kapt3/stubs/aarRelease/com/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView.java
c5aeb40157b4971987f87d1102e2dbfaf570550f
[]
no_license
BreankingBad/bluetooth_mesh
04fac76fb503f9a780a5cb5eb4b99f2436132014
996fae0172714902ca54f548c7d3d71a538b0032
refs/heads/master
2022-01-26T00:27:14.488955
2019-07-15T10:31:09
2019-07-15T10:31:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,100
java
package com.siliconlabs.bluetoothmesh.App.Fragments.Network; import java.lang.System; /** * * @author Comarch S.A. */ @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\bf\u0018\u00002\u00020\u0001:\u0003\u0015\u0016\u0017J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H&J\u0010\u0010\u0006\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\bH&J\u0010\u0010\t\u001a\u00020\u00032\u0006\u0010\n\u001a\u00020\u000bH&J\u0010\u0010\f\u001a\u00020\u00032\u0006\u0010\r\u001a\u00020\u000eH&J\u0010\u0010\u000f\u001a\u00020\u00032\u0006\u0010\u0010\u001a\u00020\u0011H&J\u0010\u0010\u0012\u001a\u00020\u00032\u0006\u0010\u0013\u001a\u00020\u0014H&\u00a8\u0006\u0018"}, d2 = {"Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView;", "", "setActionBarTitle", "", "title", "", "setMeshIconState", "iconState", "Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$MESH_ICON_STATE;", "showConfigDeviceFragment", "deviceInfo", "Lcom/siliconlabs/bluetoothmesh/App/ModelView/MeshNode;", "showErrorToast", "errorType", "Lcom/siliconlab/bluetoothmesh/adk/ErrorType;", "showFragment", "fragment", "Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$FRAGMENT;", "showToast", "toastMessage", "Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$TOAST_MESSAGE;", "FRAGMENT", "MESH_ICON_STATE", "TOAST_MESSAGE", "android_application_aarRelease"}) public abstract interface NetworkView { public abstract void showToast(@org.jetbrains.annotations.NotNull() com.siliconlabs.bluetoothmesh.App.Fragments.Network.NetworkView.TOAST_MESSAGE toastMessage); public abstract void showErrorToast(@org.jetbrains.annotations.NotNull() com.siliconlab.bluetoothmesh.adk.ErrorType errorType); public abstract void setMeshIconState(@org.jetbrains.annotations.NotNull() com.siliconlabs.bluetoothmesh.App.Fragments.Network.NetworkView.MESH_ICON_STATE iconState); public abstract void showConfigDeviceFragment(@org.jetbrains.annotations.NotNull() com.siliconlabs.bluetoothmesh.App.ModelView.MeshNode deviceInfo); public abstract void setActionBarTitle(@org.jetbrains.annotations.NotNull() java.lang.String title); public abstract void showFragment(@org.jetbrains.annotations.NotNull() com.siliconlabs.bluetoothmesh.App.Fragments.Network.NetworkView.FRAGMENT fragment); @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0004\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002\u00a2\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004\u00a8\u0006\u0005"}, d2 = {"Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$FRAGMENT;", "", "(Ljava/lang/String;I)V", "GROUP_LIST", "DEVICE_LIST", "android_application_aarRelease"}) public static enum FRAGMENT { /*public static final*/ GROUP_LIST /* = new GROUP_LIST() */, /*public static final*/ DEVICE_LIST /* = new DEVICE_LIST() */; FRAGMENT() { } } @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002\u00a2\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005\u00a8\u0006\u0006"}, d2 = {"Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$MESH_ICON_STATE;", "", "(Ljava/lang/String;I)V", "DISCONNECTED", "CONNECTING", "CONNECTED", "android_application_aarRelease"}) public static enum MESH_ICON_STATE { /*public static final*/ DISCONNECTED /* = new DISCONNECTED() */, /*public static final*/ CONNECTING /* = new CONNECTING() */, /*public static final*/ CONNECTED /* = new CONNECTED() */; MESH_ICON_STATE() { } } @kotlin.Metadata(mv = {1, 1, 13}, bv = {1, 0, 3}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\f\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002\u00a2\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005j\u0002\b\u0006j\u0002\b\u0007j\u0002\b\bj\u0002\b\tj\u0002\b\nj\u0002\b\u000bj\u0002\b\f\u00a8\u0006\r"}, d2 = {"Lcom/siliconlabs/bluetoothmesh/App/Fragments/Network/NetworkView$TOAST_MESSAGE;", "", "(Ljava/lang/String;I)V", "NO_NODE_IN_NETWORK", "NO_PROXY_NODE_IN_NETWORK", "MESH_NETWORK_DISCONNECTED", "GATT_NOT_CONNECTED", "GATT_PROXY_DISCONNECTED", "GATT_ERROR_DISCOVERING_SERVICES", "PROXY_SERVICE_NOT_FOUND", "PROXY_CHARACTERISTIC_NOT_FOUND", "PROXY_DESCRIPTOR_NOT_FOUND", "CONNECTION_TIMEOUT", "android_application_aarRelease"}) public static enum TOAST_MESSAGE { /*public static final*/ NO_NODE_IN_NETWORK /* = new NO_NODE_IN_NETWORK() */, /*public static final*/ NO_PROXY_NODE_IN_NETWORK /* = new NO_PROXY_NODE_IN_NETWORK() */, /*public static final*/ MESH_NETWORK_DISCONNECTED /* = new MESH_NETWORK_DISCONNECTED() */, /*public static final*/ GATT_NOT_CONNECTED /* = new GATT_NOT_CONNECTED() */, /*public static final*/ GATT_PROXY_DISCONNECTED /* = new GATT_PROXY_DISCONNECTED() */, /*public static final*/ GATT_ERROR_DISCOVERING_SERVICES /* = new GATT_ERROR_DISCOVERING_SERVICES() */, /*public static final*/ PROXY_SERVICE_NOT_FOUND /* = new PROXY_SERVICE_NOT_FOUND() */, /*public static final*/ PROXY_CHARACTERISTIC_NOT_FOUND /* = new PROXY_CHARACTERISTIC_NOT_FOUND() */, /*public static final*/ PROXY_DESCRIPTOR_NOT_FOUND /* = new PROXY_DESCRIPTOR_NOT_FOUND() */, /*public static final*/ CONNECTION_TIMEOUT /* = new CONNECTION_TIMEOUT() */; TOAST_MESSAGE() { } } }
[ "lhduyft15@outlook.com.vn" ]
lhduyft15@outlook.com.vn
5044ed05c927d7acca96f8d36ca46a685ddc53d0
48b6ee4ae77fb460c64bc0ff057614751991593d
/src/coverageqc/data/Base.java
0715ff5433ba2ea370148ec52358767925566375
[ "MIT" ]
permissive
thomasberg01/coverageQc
496ebd24b018fe00d58474a8071e07fdbbf0cf29
b1d8a03bd1fd00faeca479fb61e6280ee125b45d
refs/heads/master
2020-12-25T01:29:38.169562
2015-06-08T04:58:46
2015-06-08T04:58:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,417
java
package coverageqc.data; import java.util.HashSet; import java.util.TreeMap; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlTransient; /** * * @author geoffrey.hughes.smith@gmail.com */ public class Base implements Comparable<Object> { @XmlAttribute public String chr; @XmlAttribute public long pos; @XmlTransient public HashSet<Long> readDepths = new HashSet<Long>(); @XmlAttribute public String variant; // e.g., "A>G" @XmlAttribute public String variantText; // e.g., "A>G (804>34 reads)" @XmlAttribute public String quality; @XmlAttribute public String filter; @java.lang.Override public int compareTo(Object o) { return (new Long(this.pos)).compareTo(new Long(((Base)o).pos)); } /** * @todo This is currently a "max" operation; this relates to how (I think) * indels are represented in the gVCF file, with multiple entries for the * same position. * @return The read depth that will be used for this position. */ @XmlAttribute public long getTotalReadDepth() { long totalReadDepth = 0; for(Long readDepth : readDepths) { if(readDepth.longValue() > totalReadDepth) { totalReadDepth = readDepth.longValue(); } } return totalReadDepth; } /** * * @param vcfLine * @param bases * @return */ public static Base populate(String vcfLine, TreeMap<String, Base> bases) { String[] fields = vcfLine.split("\t"); String chr = fields[0]; long pos = Long.parseLong(fields[1]) - 0; // VCF is base 1, BED is base 0, I am using base 1 // special handling for read depth: // [1] truncate "DP=" prefix // [2] maintaining set of read depths in Base class, since the same // position can appear multiple time in the genomic VCF file; // at this point I am taking the unique read depths for each // position and maxing it - this might be risky long readDepth = Long.parseLong(fields[7].substring(3)); String variant = null; if(fields[9].substring(0, 3).equals("0/1") || fields[9].substring(0, 3).equals("1/1")) { variant = fields[3] + ">" + fields[4]; } Base base = bases.get(chr + "|" + Long.toString(pos)); if(base == null) { base = new Base(); base.chr = chr; base.pos = pos; bases.put(chr + "|" + Long.toString(pos), base); } base.readDepths.add(new Long(readDepth)); if(variant != null) { base.variant = (base.variant == null ? "" : base.variant + ", ") + variant; int quality = Math.round(Float.parseFloat(fields[5])); String filter = fields[6]; int refReads = Integer.parseInt(fields[9].split(":")[2].split(",")[0]); int altReads = Integer.parseInt(fields[9].split(":")[2].split(",")[1]); base.variantText = (base.variantText == null ? pos + ": " : base.variantText + ", ") + "" + variant + " (" + "reads: " + refReads + ">" + altReads + ", filter: " + filter + ", qual: " + quality + ")"; } return base; } }
[ "geoffrey.hughes.smith@gmail.com" ]
geoffrey.hughes.smith@gmail.com
b5bfcbb26084aa1e3f0e53707a24cc3b860a419b
197e87277e49a0a588f23a3fb891c52a763a7ef2
/app/src/main/java/com/bob/bobapp/activities/StopSIPActivity.java
bada1709f139f7bd7d0423e012b378f4f9d74f22
[]
no_license
Shriyansh931/BOBLibrarys
fbaba0bdbea4d2a7d502d0b791eeeafd6e0cf6fd
91bfe6ee9731011499a6eae7d4ce2b9fe40c720d
refs/heads/master
2023-04-09T04:01:42.954006
2021-04-21T08:49:16
2021-04-21T08:49:16
360,089,327
0
0
null
null
null
null
UTF-8
Java
false
false
6,898
java
package com.bob.bobapp.activities; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.RecyclerView; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import com.bob.bobapp.BOBApp; import com.bob.bobapp.R; import com.bob.bobapp.adapters.SIPSWPSTPDueListAdapter; import com.bob.bobapp.adapters.StopSIPListAdapter; import com.bob.bobapp.api.APIInterface; import com.bob.bobapp.api.request_object.SIPSWPSTPRequestBodyModel; import com.bob.bobapp.api.request_object.SIPSWPSTPRequestModel; import com.bob.bobapp.api.response_object.OrderStatusResponse; import com.bob.bobapp.api.response_object.SIPDueReportResponse; import com.bob.bobapp.utility.Constants; import com.bob.bobapp.utility.FontManager; import com.bob.bobapp.utility.SettingPreferences; import com.bob.bobapp.utility.Util; import java.util.ArrayList; import java.util.UUID; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class StopSIPActivity extends BaseActivity { private TextView tvTitle, tvUserHeader, tvBellHeader, tvCartHeader, tvMenu, calender, buy, swp; private RecyclerView rv; private StopSIPListAdapter adapter; private ArrayList<SIPDueReportResponse> sipArrayList = new ArrayList<>(); private ArrayList<SIPDueReportResponse> stpArrayList = new ArrayList<>(); private APIInterface apiInterface; private Util util; private LinearLayout llBuy, llSWP, viewBuy, viewSWP; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_stop_s_i_p); } @Override public void getIds() { calender = findViewById(R.id.calender); tvUserHeader = findViewById(R.id.tvUserHeader); tvBellHeader = findViewById(R.id.tvBellHeader); tvCartHeader = findViewById(R.id.tvCartHeader); tvMenu = findViewById(R.id.menu); tvTitle = findViewById(R.id.title); rv = findViewById(R.id.rv); llBuy = findViewById(R.id.llBuy); llSWP = findViewById(R.id.llSWP); buy = findViewById(R.id.buy); swp = findViewById(R.id.swp); viewBuy = findViewById(R.id.viewBuy); viewSWP = findViewById(R.id.viewSWP); } @Override public void handleListener() { tvMenu.setOnClickListener(this); llBuy.setOnClickListener(this); llSWP.setOnClickListener(this); } @Override void initializations() { tvMenu.setText(getResources().getString(R.string.fa_icon_back)); tvTitle.setText("Stop SIP"); apiInterface = BOBApp.getApi(this, Constants.ACTION_SIP_SWP_STP_DUE); util = new Util(this); getApiCall(); } @Override void setIcon(Util util) { FontManager.markAsIconContainer(tvUserHeader, util.iconFont); FontManager.markAsIconContainer(tvBellHeader, util.iconFont); FontManager.markAsIconContainer(tvCartHeader, util.iconFont); FontManager.markAsIconContainer(tvMenu, util.iconFont); FontManager.markAsIconContainer(calender, util.iconFont); } private void getApiCall() { util.showProgressDialog(this, true); SIPSWPSTPRequestBodyModel requestBodyModel = new SIPSWPSTPRequestBodyModel(); requestBodyModel.setUserId("admin"); requestBodyModel.setUcc("069409856"); requestBodyModel.setClientCode(0); requestBodyModel.setClientType("H"); requestBodyModel.setFamCode(0); requestBodyModel.setFromDate("2020/06/14"); requestBodyModel.setHeadCode(32); requestBodyModel.setReportType("SUMMARY"); requestBodyModel.setToDate("2020/06/21"); SIPSWPSTPRequestModel model = new SIPSWPSTPRequestModel(); model.setRequestBodyObject(requestBodyModel); model.setSource(Constants.SOURCE); UUID uuid = UUID.randomUUID(); String uniqueIdentifier = String.valueOf(uuid); SettingPreferences.setRequestUniqueIdentifier(this, uniqueIdentifier); model.setUniqueIdentifier(uniqueIdentifier); apiInterface.getSIPDueReportApiCall(model).enqueue(new Callback<ArrayList<SIPDueReportResponse>>() { @Override public void onResponse(Call<ArrayList<SIPDueReportResponse>> call, Response<ArrayList<SIPDueReportResponse>> response) { util.showProgressDialog(StopSIPActivity.this, false); if (response.isSuccessful()) { for (SIPDueReportResponse item : response.body()) { if (item.getType().equalsIgnoreCase("stp")) { stpArrayList.add(item); } else if (item.getType().equalsIgnoreCase("SIP")) { sipArrayList.add(item); } } setAdapter(sipArrayList); } else { Toast.makeText(StopSIPActivity.this, response.message(), Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<ArrayList<SIPDueReportResponse>> call, Throwable t) { util.showProgressDialog(StopSIPActivity.this, false); Toast.makeText(StopSIPActivity.this, "Something went wrong", Toast.LENGTH_SHORT).show(); } }); } private void setAdapter(ArrayList<SIPDueReportResponse> arrayList) { if (arrayList != null && arrayList.size() > 0) { adapter = new StopSIPListAdapter(this, arrayList); rv.setAdapter(adapter); } else { Toast.makeText(this, "No data found", Toast.LENGTH_SHORT).show(); } } @Override public void onClick(View view) { switch (view.getId()) { case R.id.menu: finish(); break; case R.id.llBuy: buy.setTextColor(getResources().getColor(R.color.black)); swp.setTextColor(getResources().getColor(R.color.colorGray)); viewBuy.setBackgroundColor(getResources().getColor(R.color.color_light_orange)); viewSWP.setBackgroundColor(getResources().getColor(R.color.colorGray)); adapter.updateList(sipArrayList); break; case R.id.llSWP: buy.setTextColor(getResources().getColor(R.color.colorGray)); swp.setTextColor(getResources().getColor(R.color.black)); viewBuy.setBackgroundColor(getResources().getColor(R.color.colorGray)); viewSWP.setBackgroundColor(getResources().getColor(R.color.color_light_orange)); adapter.updateList(stpArrayList); break; } } }
[ "shriyansh.bhati@ebix.com" ]
shriyansh.bhati@ebix.com
217e3a583028b47bad04726df49b62deef486bc9
e14ec27804fef196de95c3d7f8193010659cb8d6
/src/main/java/br/api/locadora/repository/LocadoraRepository.java
be5423809ee16f510d3ebe82c9a479de1ac047ca
[]
no_license
TarsilaMoreno/becajava.api
64e7cf84347687050936a7dfe4fae2e2fa8d5a8d
68de6d711a2cef611a15874deb6f75c8523ad5d9
refs/heads/master
2023-01-09T03:11:32.416958
2020-11-06T04:33:33
2020-11-06T04:33:33
310,490,694
1
0
null
null
null
null
UTF-8
Java
false
false
281
java
package br.api.locadora.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import br.api.locadora.model.Locadora; @Repository public interface LocadoraRepository extends JpaRepository<Locadora, Long> { }
[ "tmurielm@everis.com" ]
tmurielm@everis.com
9e19a0c016d810a4ffefad0b8ef64760af29b5fc
37fbe5ca85d248d761eb2c22404ab24bafb58c58
/src/main/java/marmot/dataset/DataSetNotFoundException.java
322df0ffd6891893a4ed0dfbc0ee55288c017645
[]
no_license
kwlee0220/marmot.common
1f7950f9c3934ab2f2c9481b15aa096c746af2ce
35bffef62696dc6345848c39d0fc1518b59628c4
refs/heads/master
2023-08-19T04:06:39.589471
2023-08-13T05:29:41
2023-08-13T05:29:41
153,080,188
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package marmot.dataset; /** * * @author Kang-Woo Lee (ETRI) */ public class DataSetNotFoundException extends DataSetException { private static final long serialVersionUID = 6191966431080864900L; public DataSetNotFoundException(String name) { super(name); } }
[ "kwlee@etri.re.kr" ]
kwlee@etri.re.kr
a925109b2549ddb30eec923f9a3d8b39d4c870ec
b9b5a2fc668b120cfbe4afe78c8feaff7731893b
/retrobuilder/src/test/java/site/business/appslandz/retrobuilder/ExampleUnitTest.java
0102b712287845be6dfb06c9e228ec1384f9e014
[ "Apache-2.0" ]
permissive
profahad/RetroBuilder
21702474a18b2dd5c9240b5e85872bfb8e9b9e1c
914354facd7d170d7da41013c11a7051a9672d57
refs/heads/master
2020-12-14T21:44:59.681759
2020-01-22T12:24:06
2020-01-22T12:24:06
234,878,972
0
0
null
null
null
null
UTF-8
Java
false
false
397
java
package site.business.appslandz.retrobuilder; 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); } }
[ "mfahad4010@gmail.com" ]
mfahad4010@gmail.com
aacc029f5a46bc402709477e5c70a36dc29aca4d
72cf1d3d95da67c49c1597c94ef116a5321eaee4
/hybris/bin/custom/ebook/ebookstorefront/web/src/com/ebook/storefront/controllers/pages/PickupInStoreController.java
046825b90acc59c507e0f9476049c9b804817ff6
[]
no_license
vpolinen/hybris6.0
6f6721a930e5f2600d30eecd03d0a99a107f3ce8
4575a46ff5051be42eba4ad6d7ecff6269ad70c1
refs/heads/master
2021-01-13T13:22:23.718493
2016-11-02T11:32:14
2016-11-02T11:32:14
72,435,551
0
0
null
2016-11-02T12:24:55
2016-10-31T12:46:28
Java
UTF-8
Java
false
false
16,424
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 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.ebook.storefront.controllers.pages; import de.hybris.platform.acceleratorfacades.customerlocation.CustomerLocationFacade; import de.hybris.platform.acceleratorservices.store.data.UserLocationData; import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractSearchPageController; import de.hybris.platform.acceleratorstorefrontcommons.controllers.util.GlobalMessages; import de.hybris.platform.acceleratorstorefrontcommons.forms.PickupInStoreForm; import de.hybris.platform.commercefacades.order.CartFacade; import de.hybris.platform.commercefacades.order.data.CartModificationData; import de.hybris.platform.commercefacades.product.ProductFacade; import de.hybris.platform.commercefacades.product.ProductOption; import de.hybris.platform.commercefacades.product.data.ProductData; import de.hybris.platform.commercefacades.storefinder.StoreFinderStockFacade; import de.hybris.platform.commercefacades.storefinder.data.StoreFinderStockSearchPageData; import de.hybris.platform.commercefacades.storelocator.data.PointOfServiceStockData; import de.hybris.platform.commerceservices.order.CommerceCartModificationException; import de.hybris.platform.commerceservices.order.CommerceCartModificationStatus; import de.hybris.platform.commerceservices.store.data.GeoPoint; import de.hybris.platform.servicelayer.config.ConfigurationService; import com.ebook.storefront.controllers.ControllerConstants; import com.ebook.storefront.security.cookie.CustomerLocationCookieGenerator; import java.util.Arrays; import java.util.Collections; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @Controller @Scope("tenant") @RequestMapping("/store-pickup") public class PickupInStoreController extends AbstractSearchPageController { private static final String QUANTITY_REDUCED_NUMBER_OF_ITEMS_ADDED = "basket.information.quantity.reducedNumberOfItemsAdded."; private static final String TYPE_MISMATCH_ERROR_CODE = "typeMismatch"; private static final String ERROR_MSG_TYPE = "errorMsg"; private static final String QUANTITY_INVALID_BINDING_MESSAGE_KEY = "basket.error.quantity.invalid.binding"; private static final String POINTOFSERVICE_DISPLAY_SEARCH_RESULTS_COUNT = "pointofservice.display.search.results.count"; private static final Logger LOG = Logger.getLogger(PickupInStoreController.class); private static final String PRODUCT_CODE_PATH_VARIABLE_PATTERN = "/{productCode:.*}"; private static final String GOOGLE_API_KEY_ID = "googleApiKey"; private static final String GOOGLE_API_VERSION = "googleApiVersion"; @Resource(name = "cartFacade") private CartFacade cartFacade; @Resource(name = "accProductFacade") private ProductFacade productFacade; @Resource(name = "customerLocationFacade") private CustomerLocationFacade customerLocationFacade; @Resource(name = "storeFinderStockFacade") private StoreFinderStockFacade<PointOfServiceStockData, StoreFinderStockSearchPageData<PointOfServiceStockData>> storeFinderStockFacade; @Resource(name = "customerLocationCookieGenerator") private CustomerLocationCookieGenerator cookieGenerator; @Resource(name = "configurationService") private ConfigurationService configurationService; @ModelAttribute("googleApiVersion") public String getGoogleApiVersion() { return configurationService.getConfiguration().getString(GOOGLE_API_VERSION); } @ModelAttribute("googleApiKey") public String getGoogleApiKey(final HttpServletRequest request) { final String googleApiKey = getHostConfigService().getProperty(GOOGLE_API_KEY_ID, request.getServerName()); if (StringUtils.isEmpty(googleApiKey)) { LOG.warn("No Google API key found for server: " + request.getServerName()); } return googleApiKey; } @RequestMapping(value = PRODUCT_CODE_PATH_VARIABLE_PATTERN + "/pointOfServices", method = RequestMethod.POST) public String getPointOfServiceForStorePickupSubmit(@PathVariable("productCode") final String productCode, // NOSONAR @RequestParam(value = "locationQuery", required = false) final String locationQuery, @RequestParam(value = "latitude", required = false) final Double latitude, @RequestParam(value = "longitude", required = false) final Double longitude, @RequestParam(value = "page", defaultValue = "0") final int page, @RequestParam(value = "show", defaultValue = "Page") final AbstractSearchPageController.ShowMode showMode, @RequestParam(value = "sort", required = false) final String sortCode, @RequestParam(value = "cartPage", defaultValue = "Page") final Boolean cartPage, @RequestParam(value = "entryNumber", defaultValue = "0") final Long entryNumber, @RequestParam(value = "qty", defaultValue = "0") final Long qty, final HttpServletResponse response, final Model model) { GeoPoint geoPoint = null; if (longitude != null && latitude != null) { geoPoint = new GeoPoint(); geoPoint.setLongitude(longitude.doubleValue()); geoPoint.setLatitude(latitude.doubleValue()); } model.addAttribute("qty", qty); return getPointOfServiceForStorePickup(productCode, locationQuery, geoPoint, page, showMode, sortCode, cartPage, entryNumber, model, RequestMethod.POST, response); } @RequestMapping(value = PRODUCT_CODE_PATH_VARIABLE_PATTERN + "/pointOfServices", method = RequestMethod.GET) public String getPointOfServiceForStorePickupClick(@PathVariable("productCode") final String productCode, // NOSONAR @RequestParam(value = "page", defaultValue = "0") final int page, @RequestParam(value = "show", defaultValue = "Page") final AbstractSearchPageController.ShowMode showMode, @RequestParam(value = "sort", required = false) final String sortCode, @RequestParam(value = "cartPage") final Boolean cartPage, @RequestParam(value = "entryNumber") final Long entryNumber, final HttpServletResponse response, final Model model) { final UserLocationData userLocationData = customerLocationFacade.getUserLocationData(); String location = ""; GeoPoint geoPoint = null; if (userLocationData != null) { location = userLocationData.getSearchTerm(); geoPoint = userLocationData.getPoint(); } return getPointOfServiceForStorePickup(productCode, location, geoPoint, page, showMode, sortCode, cartPage, entryNumber, model, RequestMethod.GET, response); } protected String getPointOfServiceForStorePickup(final String productCode, final String locationQuery, // NOSONAR final GeoPoint geoPoint, final int page, final AbstractSearchPageController.ShowMode showMode, final String sortCode, final Boolean cartPage, final Long entryNumber, final Model model, final RequestMethod requestMethod, final HttpServletResponse response) { final int pagination = getSiteConfigService().getInt(POINTOFSERVICE_DISPLAY_SEARCH_RESULTS_COUNT, 6); final ProductData productData = new ProductData(); productData.setCode(productCode); final StoreFinderStockSearchPageData<PointOfServiceStockData> storeFinderStockSearchPageData; if (StringUtils.isNotBlank(locationQuery)) { storeFinderStockSearchPageData = storeFinderStockFacade.productSearch(locationQuery, productData, createPageableData(page, pagination, sortCode, showMode)); model.addAttribute("locationQuery", locationQuery.trim()); if (RequestMethod.POST.equals(requestMethod) && storeFinderStockSearchPageData.getPagination().getTotalNumberOfResults() > 0) { final UserLocationData userLocationData = new UserLocationData(); if (geoPoint != null) { userLocationData.setPoint(geoPoint); } userLocationData.setSearchTerm(locationQuery); customerLocationFacade.setUserLocationData(userLocationData); cookieGenerator.addCookie(response, generatedUserLocationDataString(userLocationData)); } } else if (geoPoint != null) { storeFinderStockSearchPageData = storeFinderStockFacade.productSearch(geoPoint, productData, createPageableData(page, pagination, sortCode, showMode)); model.addAttribute("geoPoint", geoPoint); if (RequestMethod.POST.equals(requestMethod) && storeFinderStockSearchPageData.getPagination().getTotalNumberOfResults() > 0) { final UserLocationData userLocationData = new UserLocationData(); userLocationData.setPoint(geoPoint); customerLocationFacade.setUserLocationData(userLocationData); cookieGenerator.addCookie(response, generatedUserLocationDataString(userLocationData)); } } else { storeFinderStockSearchPageData = emptyStoreFinderResult(productData); } populateModel(model, storeFinderStockSearchPageData, showMode); model.addAttribute("cartPage", cartPage); model.addAttribute("entryNumber", entryNumber); return ControllerConstants.Views.Fragments.Product.StorePickupSearchResults; } protected StoreFinderStockSearchPageData<PointOfServiceStockData> emptyStoreFinderResult(final ProductData productData) { final StoreFinderStockSearchPageData<PointOfServiceStockData> storeFinderStockSearchPageData; storeFinderStockSearchPageData = new StoreFinderStockSearchPageData<>(); storeFinderStockSearchPageData.setProduct(productData); storeFinderStockSearchPageData.setResults(Collections.<PointOfServiceStockData> emptyList()); storeFinderStockSearchPageData.setPagination(createEmptyPagination()); return storeFinderStockSearchPageData; } protected String generatedUserLocationDataString(final UserLocationData userLocationData) { final StringBuilder builder = new StringBuilder(); final GeoPoint geoPoint = userLocationData.getPoint(); String latitudeAndLongitudeString = ""; if (geoPoint != null) { latitudeAndLongitudeString = builder.append(geoPoint.getLatitude()) .append(CustomerLocationCookieGenerator.LATITUDE_LONGITUDE_SEPARATOR).append(geoPoint.getLongitude()).toString(); } builder.setLength(0); builder.append(userLocationData.getSearchTerm()).append(CustomerLocationCookieGenerator.LOCATION_SEPARATOR) .append(latitudeAndLongitudeString); return builder.toString(); } @RequestMapping(value = "/cart/add", method = RequestMethod.POST, produces = "application/json") public String addToCartPickup(@RequestParam("productCodePost") final String code, @RequestParam("storeNamePost") final String storeId, final Model model, @Valid final PickupInStoreForm form, final BindingResult bindingErrors) { if (bindingErrors.hasErrors()) { return getViewWithBindingErrorMessages(model, bindingErrors); } final long qty = form.getHiddenPickupQty(); if (qty <= 0) { model.addAttribute(ERROR_MSG_TYPE, "basket.error.quantity.invalid"); return ControllerConstants.Views.Fragments.Cart.AddToCartPopup; } try { final CartModificationData cartModification = cartFacade.addToCart(code, qty, storeId); model.addAttribute("quantity", Long.valueOf(cartModification.getQuantityAdded())); model.addAttribute("entry", cartModification.getEntry()); if (cartModification.getQuantityAdded() == 0L) { model.addAttribute(ERROR_MSG_TYPE, "basket.information.quantity.noItemsAdded." + cartModification.getStatusCode()); } else if (cartModification.getQuantityAdded() < qty) { model.addAttribute(ERROR_MSG_TYPE, QUANTITY_REDUCED_NUMBER_OF_ITEMS_ADDED + cartModification.getStatusCode()); } // Put in the cart again after it has been modified model.addAttribute("cartData", cartFacade.getSessionCart()); } catch (final CommerceCartModificationException ex) { model.addAttribute(ERROR_MSG_TYPE, "basket.error.occurred"); model.addAttribute("quantity", Long.valueOf(0L)); LOG.warn("Couldn't add product of code " + code + " to cart.", ex); } final ProductData productData = productFacade.getProductForCodeAndOptions(code, Arrays.asList(ProductOption.BASIC, ProductOption.PRICE)); model.addAttribute("product", productData); model.addAttribute("cartData", cartFacade.getSessionCart()); return ControllerConstants.Views.Fragments.Cart.AddToCartPopup; } protected String getViewWithBindingErrorMessages(final Model model, final BindingResult bindingErrors) { for (final ObjectError error : bindingErrors.getAllErrors()) { if (isTypeMismatchError(error)) { model.addAttribute(ERROR_MSG_TYPE, QUANTITY_INVALID_BINDING_MESSAGE_KEY); } else { model.addAttribute(ERROR_MSG_TYPE, error.getDefaultMessage()); } } return ControllerConstants.Views.Fragments.Cart.AddToCartPopup; } protected boolean isTypeMismatchError(final ObjectError error) { return error.getCode().equals(TYPE_MISMATCH_ERROR_CODE); } @RequestMapping(value = "/cart/update", method = RequestMethod.POST, produces = "application/json") public String updateCartQuantities(@RequestParam("storeNamePost") final String storeId, @RequestParam("entryNumber") final long entryNumber, @RequestParam("hiddenPickupQty") final long quantity, final RedirectAttributes redirectModel) throws CommerceCartModificationException { final CartModificationData cartModificationData = cartFacade.updateCartEntry(entryNumber, storeId); if (entryNumber == cartModificationData.getEntry().getEntryNumber().intValue()) { final CartModificationData cartModification = cartFacade.updateCartEntry(entryNumber, quantity); if (cartModification.getQuantity() == quantity) { // Success if (cartModification.getQuantity() == 0) { // Success in removing entry GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.CONF_MESSAGES_HOLDER, "basket.page.message.remove"); } else { // Success in update quantity GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.CONF_MESSAGES_HOLDER, "basket.page.message.update.pickupinstoreitem"); } } else { // Less than successful GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.ERROR_MESSAGES_HOLDER, QUANTITY_REDUCED_NUMBER_OF_ITEMS_ADDED + cartModification.getStatusCode()); } } else if (!CommerceCartModificationStatus.SUCCESS.equals(cartModificationData.getStatusCode())) { //When update pickupInStore happens to be same as existing entry with POS and SKU and that merged POS has lower stock GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.ERROR_MESSAGES_HOLDER, QUANTITY_REDUCED_NUMBER_OF_ITEMS_ADDED + cartModificationData.getStatusCode()); } return REDIRECT_PREFIX + "/cart"; } @RequestMapping(value = "/cart/update/delivery", method = { RequestMethod.GET, RequestMethod.POST }) public String updateToDelivery(@RequestParam("entryNumber") final long entryNumber, final RedirectAttributes redirectModel) throws CommerceCartModificationException { final CartModificationData cartModificationData = cartFacade.updateCartEntry(entryNumber, null); if (CommerceCartModificationStatus.SUCCESS.equals(cartModificationData.getStatusCode())) { // Success in update quantity GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.CONF_MESSAGES_HOLDER, "basket.page.message.update.pickupinstoreitem.toship"); } else { // Less than successful GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.ERROR_MESSAGES_HOLDER, QUANTITY_REDUCED_NUMBER_OF_ITEMS_ADDED + cartModificationData.getStatusCode()); } return REDIRECT_PREFIX + "/cart"; } }
[ "venkanna.polineni@capgemini.com" ]
venkanna.polineni@capgemini.com
6f3ca3d06a5590c1e527ce80249cf41538384a05
6d84010d037dbca066ab6c6edcbb88024ca49cba
/coderadar-core/src/main/java/io/reflectoring/coderadar/query/port/driven/GetMetricValuesOfCommitPort.java
c14d6505427767fc627478da466436e4b66aff24
[ "MIT" ]
permissive
cunhazera/coderadar
6e962e255bd2307e79d9ea2845ba9d85388af8be
7be582e73a2a07a0bd118db65c34ea70f0558675
refs/heads/master
2020-08-27T15:10:35.937078
2019-10-11T07:04:13
2019-10-11T07:04:13
217,417,864
0
0
MIT
2019-10-25T00:21:40
2019-10-25T00:21:39
null
UTF-8
Java
false
false
360
java
package io.reflectoring.coderadar.query.port.driven; import io.reflectoring.coderadar.query.domain.MetricValueForCommit; import io.reflectoring.coderadar.query.port.driver.GetMetricsForCommitCommand; import java.util.List; public interface GetMetricValuesOfCommitPort { List<MetricValueForCommit> get(GetMetricsForCommitCommand command, Long projectId); }
[ "Maksim.Atanasov@adesso.de" ]
Maksim.Atanasov@adesso.de
921af90201a5083fe80bdd2c373a2448527ac419
6fc351e4582dfb6360088aa38ac47de2cd08c7de
/src/main/java/driver/SeleniumWebDriver.java
1d20a610cb4115982049239d18d7582795d5bb65
[ "MIT" ]
permissive
juanferr95/Retos-SQA
114cbab74017766b1f3ab885de82f271270beb34
50cbd0b1adfbc47d9e273d752c89902252bd0f7a
refs/heads/main
2023-05-30T01:44:26.421144
2021-06-03T16:02:28
2021-06-03T16:02:28
373,562,863
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package driver; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; public class SeleniumWebDriver { public static WebDriver driver; public static void ChromeWebDriver(String url) { ChromeOptions options = new ChromeOptions(); options.addArguments("--start-maximized"); options.addArguments("--ignore-certificate-errors"); options.addArguments("--disable-infobars"); driver = new ChromeDriver(options); driver.get(url); } }
[ "85304095+juanferr95@users.noreply.github.com" ]
85304095+juanferr95@users.noreply.github.com
284f31babbf272b659971ed1ee5ec88cb7e2b8a5
73fea15631b31be9cf35cf8925ba6f254b5b24ca
/zigBeeDevice/src/zbHouse/service/ModeServiceI.java
f68bb34a30a13904459ce77321b87dd5da838cb2
[]
no_license
chengwangjian/suy
afead663ebcde13feb43a0d4ffbf09ba4f0b42da
14009f415db7b2c95d9d852c039a399126df8b8c
refs/heads/master
2020-12-02T08:02:42.359006
2017-07-10T14:36:30
2017-07-10T14:36:30
96,763,823
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package zbHouse.service; import java.util.Map; import zbHouse.model.Mode; import zbHouse.pageModel.DataGrid; public interface ModeServiceI { public Mode keyUpdate(Mode mode); public Mode saveOrUpdate(Mode mode,Map<String, Object> params); public int delete(Map<String, Object> params); public DataGrid find(Map<String, Object> params); /** * Mode定时保存 */ public int dingshiSave() ; }
[ "wangjian@xample.com" ]
wangjian@xample.com
886ff7fa3a3a8cf3db8249ae030cc2392aa6d214
1221c30d08deb4403c5cff4ecde0458e50152a08
/backend/src/main/java/com/aim/java/polish/WebConfig.java
36ef5c5428f12a99133a014cd0a92b9172510c41
[]
no_license
nicolerenene/polish
dbf965408a4b0090f626957657016ac8c0fe214a
b51cf131c386c52fdc2d960eab57d2b85bdca77f
refs/heads/master
2023-03-12T10:36:32.851065
2021-03-01T08:36:31
2021-03-01T08:36:31
342,681,626
0
1
null
null
null
null
UTF-8
Java
false
false
506
java
package com.aim.java.polish; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @EnableWebMvc public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**"); } }
[ "64162382+nicolerenene@users.noreply.github.com" ]
64162382+nicolerenene@users.noreply.github.com
31f72f06b976a8c3031ce95d3cdf46512249241c
4e9c5e37a4380d5a11a27781187918a6aa31f3f9
/dse-core-6.7.0/com/datastax/bdp/cassandra/auth/LegacyKerberosAuthenticator.java
4e609da3435c13fafa6e8cdc8d60689d9d0f7b6d
[]
no_license
jiafu1115/dse67
4a49b9a0d7521000e3c1955eaf0911929bc90d54
62c24079dd5148e952a6ff16bc1161952c222f9b
refs/heads/master
2021-10-11T15:38:54.185842
2019-01-28T01:28:06
2019-01-28T01:28:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
package com.datastax.bdp.cassandra.auth; import org.apache.cassandra.exceptions.ConfigurationException; public class LegacyKerberosAuthenticator extends DseAuthenticator { public LegacyKerberosAuthenticator() { super(true); } public void validateConfiguration() throws ConfigurationException { this.validateKeytab(); this.defaultScheme = AuthenticationScheme.KERBEROS; this.allowedSchemes.add(this.defaultScheme); } }
[ "superhackerzhang@sina.com" ]
superhackerzhang@sina.com
a3c274a379265850ac4cc156a8821163b88ff64c
e93a819b6ebd0d9e41b5edce2e664ce1315e5f09
/enjoy-mi/mall-order-service/src/main/java/cn/enjoy/users/dbutils/MyRoutingDataSource.java
21238067f58d46f1c399e6a54498e82e96f94b9a
[]
no_license
0katekate0/enjoy-mi
092d3561c759820a5b401ebc572805debc1c21bb
aac33d876adef697269bd3b88e2ec88b348a43b5
refs/heads/master
2022-12-26T14:30:19.474900
2020-10-08T15:32:53
2020-10-08T15:32:53
302,384,383
0
1
null
null
null
null
UTF-8
Java
false
false
419
java
package cn.enjoy.users.dbutils; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; public class MyRoutingDataSource extends AbstractRoutingDataSource { /*在运行时, 根据某种规则,比如key值,比如当前线程的id 来动态切换到真正的DataSource上*/ @Override protected Object determineCurrentLookupKey() { return DBContextHolder.get(); } }
[ "1960779692@qq.com" ]
1960779692@qq.com
5b6a61cc4e65b2d75d777d1a4e64424ee54a988a
1b22e6ee6660f16c539bb11ca4c9d48d1f999416
/src/main/java/com/company/project/mapper/SysReleaseMapper.java
e73b8e13ae1138edfb994c330c37eff995d87822
[ "MIT" ]
permissive
4640396/springboot-manager
0e9020f22669ce968325190aac945fc86998688e
865304b835bad2baa776c8c77ce0b0e96a78adfe
refs/heads/master
2022-12-08T20:03:08.122617
2020-09-08T02:40:19
2020-09-08T02:40:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
216
java
package com.company.project.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.company.project.entity.SysRelease; public interface SysReleaseMapper extends BaseMapper<SysRelease> { }
[ "742193369@qq.com" ]
742193369@qq.com
16b5de10fc4c2e5f7d87c6c517838e3598c5b9f2
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/WeaselWeb/src/com/puttysoftware/weaselweb/maze/objects/TeleportWand.java
fc0a50964e0567b059450fc489c8f4155c0aa12f
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,518
java
/* WeaselWeb: A Maze-Solving Game Copyright (C) 2008-2010 Eric Ahnell Any questions should be directed to the author via email at: products@puttysoftware.com */ package com.puttysoftware.weaselweb.maze.objects; import com.puttysoftware.weaselweb.Application; import com.puttysoftware.weaselweb.WeaselWeb; import com.puttysoftware.weaselweb.maze.generic.GenericWand; import com.puttysoftware.weaselweb.maze.generic.MazeObject; import com.puttysoftware.weaselweb.resourcemanagers.SoundConstants; import com.puttysoftware.weaselweb.resourcemanagers.SoundManager; public class TeleportWand extends GenericWand { public TeleportWand() { super(); } @Override public String getName() { return "Teleport Wand"; } @Override public String getPluralName() { return "Teleport Wands"; } @Override public void useHelper(final int x, final int y, final int z) { this.useAction(null, x, y, z); SoundManager.playSound(SoundConstants.SOUND_CATEGORY_SOLVING_MAZE, SoundConstants.SOUND_TELEPORT); } @Override public void useAction(final MazeObject mo, final int x, final int y, final int z) { final Application app = WeaselWeb.getApplication(); app.getGameManager().updatePositionAbsolute(x, y, z); } @Override public String getDescription() { return "Teleport Wands will teleport you to the target square when used. You cannot teleport to areas you cannot see."; } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
5d134f2e09149484264365844cde79636ecb828c
e3d0f7f75e4356413d05ba78e14c484f8555b2b5
/azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/iothub/implementation/EndpointHealthDataImpl.java
a9cfacc16e7e4cb4aef4de02767b571663f1a532
[ "MIT" ]
permissive
weidongxu-microsoft/azure-stack-java-samples
1df227502c367f128916f121ccc0f5bc77b045e5
afdfd0ed220f2f8a603c6fa5e16311a7842eb31c
refs/heads/main
2023-04-04T12:24:07.405360
2021-04-07T08:06:00
2021-04-07T08:06:00
337,593,216
0
1
null
null
null
null
UTF-8
Java
false
false
1,314
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybrid.iothub.implementation; import com.azure.resourcemanager.hybrid.iothub.fluent.models.EndpointHealthDataInner; import com.azure.resourcemanager.hybrid.iothub.models.EndpointHealthData; import com.azure.resourcemanager.hybrid.iothub.models.EndpointHealthStatus; public final class EndpointHealthDataImpl implements EndpointHealthData { private EndpointHealthDataInner innerObject; private final com.azure.resourcemanager.hybrid.iothub.IotHubManager serviceManager; EndpointHealthDataImpl( EndpointHealthDataInner innerObject, com.azure.resourcemanager.hybrid.iothub.IotHubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } public String endpointId() { return this.innerModel().endpointId(); } public EndpointHealthStatus healthStatus() { return this.innerModel().healthStatus(); } public EndpointHealthDataInner innerModel() { return this.innerObject; } private com.azure.resourcemanager.hybrid.iothub.IotHubManager manager() { return this.serviceManager; } }
[ "weidxu@microsoft.com" ]
weidxu@microsoft.com
d25806c835a3dc52ca1818b1af8a9c80b62fdc26
4041467ad08d92c4f7deff2f6aef3fb07418577d
/src/edu/uog/campus/Semester.java
84f3fc6657ad1eb86c0a0c97bdc0b85749d73127
[]
no_license
SaddamKhalid29/TimeTableManagement
7a50612b7ca8f72315070d9cc2f00a9f5c900c60
1ec0a8d02405244c125d88091e4003f30593dc0e
refs/heads/master
2022-11-13T05:52:28.684689
2020-07-03T18:18:10
2020-07-03T18:18:10
276,827,090
0
0
null
null
null
null
UTF-8
Java
false
false
1,561
java
package edu.uog.campus; public class Semester { private int semester_ID; private String semester_CODE; private String semester_NAME; private String semester_STARTDATE; private String semester_ENDDATE; /** * @return the semester_ID */ public int getSemester_ID() { return semester_ID; } /** * @param semester_ID the semester_ID to set */ public void setSemester_ID(int semester_ID) { this.semester_ID = semester_ID; } /** * @return the semester_CODE */ public String getSemester_CODE() { return semester_CODE; } /** * @param semester_CODE the semester_CODE to set */ public void setSemester_CODE(String semester_CODE) { this.semester_CODE = semester_CODE; } /** * @return the semester_NAME */ public String getSemester_NAME() { return semester_NAME; } /** * @param semester_NAME the semester_NAME to set */ public void setSemester_NAME(String semester_NAME) { this.semester_NAME = semester_NAME; } /** * @return the semester_STARTDATE */ public String getSemester_STARTDATE() { return semester_STARTDATE; } /** * @param semester_STARTDATE the semester_STARTDATE to set */ public void setSemester_STARTDATE(String semester_STARTDATE) { this.semester_STARTDATE = semester_STARTDATE; } /** * @return the semester_ENDDATE */ public String getSemester_ENDDATE() { return semester_ENDDATE; } /** * @param semester_ENDDATE the semester_ENDDATE to set */ public void setSemester_ENDDATE(String semester_ENDDATE) { this.semester_ENDDATE = semester_ENDDATE; } }
[ "19011519-029@uog.edu.pk" ]
19011519-029@uog.edu.pk