blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
29f8ee9ea0fb68d5d52830f03cae09cf66402cd7
ab41b2fe95c948bb29607bd9996b4ecf2bd7df22
/config-servlet-tests/src/test/java/org/ocpsoft/rewrite/servlet/config/QuerySimpleTest.java
4879beb3088f0d75589b0cee1ec0eac66ebde129
[ "Apache-2.0" ]
permissive
mbenson/rewrite
b1361436caf91c330be09a0c089177176f4439a1
6629f79a7141e763806ad49f82836e17ce4673b0
refs/heads/master
2020-12-24T22:59:37.350032
2012-11-09T16:24:22
2012-11-09T16:24:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,964
java
/* * Copyright 2011 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.ocpsoft.rewrite.servlet.config; import javax.servlet.http.HttpServletRequest; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import org.ocpsoft.rewrite.event.Rewrite; import org.ocpsoft.rewrite.mock.MockEvaluationContext; import org.ocpsoft.rewrite.servlet.impl.HttpInboundRewriteImpl; /** * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> * */ public class QuerySimpleTest { private Rewrite rewrite; private HttpServletRequest request; @Before public void before() { request = Mockito.mock(HttpServletRequest.class); Mockito.when(request.getRequestURI()) .thenReturn("/context/application/path"); Mockito.when(request.getQueryString()) .thenReturn("foo=bar&bar=baz"); Mockito.when(request.getContextPath()) .thenReturn("/context"); rewrite = new HttpInboundRewriteImpl(request, null); } @Test public void testQueryStringMatchesLiteral() { Assert.assertTrue(Query.matches("foo=bar&bar=baz").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testQueryStringMatchesPattern() { Assert.assertTrue(Query.matches("foo=bar.*").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testQueryStringParameterExists() { Assert.assertTrue(Query.parameterExists(".oo").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testQueryStringParameterDoesNotExist() { Assert.assertFalse(Query.parameterExists("nothing").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testQueryStringValueExists() { Assert.assertTrue(Query.valueExists(".ar").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testQueryStringValueDoesNotExist() { Assert.assertFalse(Query.valueExists("nothing").evaluate(rewrite, new MockEvaluationContext())); } @Test public void testDoesNotMatchNonHttpRewrites() { Assert.assertTrue(Query.matches(".*bar=baz").evaluate(rewrite, new MockEvaluationContext())); } @Test(expected = IllegalArgumentException.class) public void testNullCausesException() { Query.matches(null); } }
[ "lincolnbaxter@gmail.com" ]
lincolnbaxter@gmail.com
c3b6fa8769c14a2354a0719e11972a5b857a50c4
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/fitlibrary_cluster/2529/src_1.java
42c10e39c8bdbbaa9181beb89b42bf7d968ef335
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,930
java
/* * Copyright (c) 2010 Rick Mugridge, www.RimuResearch.com * Released under the terms of the GNU General Public License version 2 or later. */ package fitlibrary.flow; import java.util.List; import fit.Fixture; import fitlibrary.DefineAction; import fitlibrary.DoFixture; import fitlibrary.DomainFixture; import fitlibrary.SelectFixture; import fitlibrary.SetUpFixture; import fitlibrary.collection.CollectionSetUpTraverse; import fitlibrary.global.TemporaryPlugBoardForRuntime; import fitlibrary.object.DomainCheckTraverse; import fitlibrary.object.DomainFixtured; import fitlibrary.object.DomainInjectionTraverse; import fitlibrary.object.DomainTraverser; import fitlibrary.runResults.ITableListener; import fitlibrary.runResults.TestResults; import fitlibrary.runResults.TestResultsFactory; import fitlibrary.runtime.RuntimeContextInternal; import fitlibrary.suite.SuiteEvaluator; import fitlibrary.table.Cell; import fitlibrary.table.Row; import fitlibrary.table.Table; import fitlibrary.table.Tables; import fitlibrary.traverse.DomainAdapter; import fitlibrary.traverse.Evaluator; import fitlibrary.traverse.RuntimeContextual; import fitlibrary.traverse.TableEvaluator; import fitlibrary.traverse.workflow.DoEvaluator; import fitlibrary.traverse.workflow.DoTraverse; import fitlibrary.traverse.workflow.FlowEvaluator; import fitlibrary.traverse.workflow.PlainTextAnalyser; import fitlibrary.typed.TypedObject; import fitlibrary.utility.option.None; import fitlibrary.utility.option.Option; import fitlibrary.utility.option.Some; /** * This integrates various pieces of functionality: * o Ordinary Do flow * o DomainFixture flow, with switching for 3 phases: inject, do, check. * o SuiteFixture */ public class DoFlow implements DomainTraverser, TableEvaluator { public static final boolean IS_ACTIVE = true; private final FlowEvaluator flowEvaluator; private final IScopeStack scopeStack; private final RuntimeContextInternal runtime; private final SetUpTearDown setUpTearDown = new SetUpTearDown(); private Option<SuiteEvaluator> suiteFixtureOption = None.none(); private DomainInjectionTraverse domainInject = null; private DomainCheckTraverse domainCheck = null; private TableEvaluator current = this; public DoFlow(FlowEvaluator flowEvaluator, IScopeStack scopeStack, RuntimeContextInternal runtime) { this.flowEvaluator = flowEvaluator; this.scopeStack = scopeStack; this.runtime = runtime; } public void runStorytest(Tables tables, ITableListener tableListener) { TestResults testResults = tableListener.getTestResults(); reset(); for (int t = 0; t < tables.size(); t++) { Table table = tables.at(t); if (current == this && table.isPlainTextTable()) { PlainTextAnalyser plainTextAnalyser = new PlainTextAnalyser(runtime,TemporaryPlugBoardForRuntime.definedActionsRepository()); plainTextAnalyser.analyseAndReplaceRowsIn(table, testResults); } if (domainCheck != null) handleDomainPhases(table); current.runTable(table,tableListener); if (t < tables.size() - 1) tearDown(scopeStack.poppedAtEndOfTable(), table.at(0), testResults); else tearDown(scopeStack.poppedAtEndOfStorytest(), table.at(0), testResults); runtime.addAccumulatedFoldingText(table); tableListener.tableFinished(table); } tableListener.storytestFinished(); } private void reset() { runtime.setAbandon(false); runtime.setStopOnError(false); scopeStack.clearAllButSuite(); current = this; domainInject = null; domainCheck = null; if (suiteFixtureOption.isSome()) flowEvaluator.setRuntimeContext(suiteFixtureOption.get().getCopyOfRuntimeContext()); } private void handleDomainPhases(Table table) { int phaseBreaks = table.phaseBoundaryCount(); if (phaseBreaks > 0) { for (int i = 0; i < phaseBreaks; i++) { if (current == domainInject) setCurrentAction(); else if (current == this) setCurrentCheck(); } } } public void runTable(Table table, ITableListener tableListener) { runtime.setCurrentTable(table); TestResults testResults = tableListener.getTestResults(); runtime.pushTestResults(testResults); try { runTable(table, testResults); } finally { runtime.popTestResults(); } } private void runTable(Table table, TestResults testResults) { for (int rowNo = 0; rowNo < table.size(); rowNo++) { Row row = table.at(rowNo); if (row.at(0).hadError()) { // Already failed due to plain text problems } else if (runtime.isAbandoned(testResults)) { // if (!testResults.problems()) row.ignore(testResults); } else if (domainCheck != null && row.size() == 1 && row.text(0, flowEvaluator).equals("checks")) { setCurrentCheck(); // Remove this hack later } else { try { // System.out.println("DoFlow row "+row); final Cell cell = row.at(0); if (cell.hasEmbeddedTables()) { // Doesn't allow for other cells in row... handleInnerTables(cell, testResults); } else { row = mapOddBalls(row,flowEvaluator); runtime.setCurrentRow(row); TypedObject typedResult = flowEvaluator.interpretRow(row,testResults); Object subject = typedResult.getSubject(); // System.out.println("DoFlow got "+subject); setRuntimeContextOf(subject); if (subject == null) { // Can't do anything useful with a null } else if (subject.getClass() == Fixture.class) { // Ignore it, as it does nothing. } else if (subject.getClass() == DoFixture.class || subject.getClass() == DoTraverse.class) { handleActualDoFixture((DoEvaluator)subject,row,testResults); } else if (subject.getClass() == SelectFixture.class) { runtime.showAsAfterTable("warning", "This is no longer needed"); handleActualDoFixture((DoEvaluator)subject,row,testResults); } else if (subject instanceof DomainFixtured || subject instanceof DomainFixture) { handleDomainFixture(typedResult, subject, row, testResults); } else if (subject instanceof SuiteEvaluator) { handleSuiteFixture((SuiteEvaluator)subject, typedResult, row, testResults); } else { if (subject instanceof CollectionSetUpTraverse || subject instanceof SetUpFixture) { handleEvaluator(typedResult, (Evaluator) subject, rowNo, table, testResults); return;// have finished table } else if (subject instanceof DoEvaluator) { pushOnScope(typedResult,row,testResults); } else if (subject instanceof Evaluator) { // Calculate, etc handleEvaluator(typedResult, (Evaluator) subject, rowNo, table, testResults); return; // have finished table } else if (subject instanceof Fixture) { Table remainingTable = tableFromHere(table, rowNo).asTableOnParse(); flowEvaluator.fitHandler().doTable((Fixture) subject,remainingTable,testResults,flowEvaluator); for (int i = 0; i < remainingTable.size(); i++) table.replaceAt(rowNo+i, remainingTable.at(i)); return; // have finished table } } } } catch (Exception ex) { row.error(testResults, ex); } } } } private Table tableFromHere(Table table, int rowNo) { return rowNo == 0 ? table : table.fromAt(rowNo); } private void handleEvaluator(TypedObject typedResult, Evaluator subject, int rowNo, Table table, TestResults testResults) { Table restOfTable = tableFromHere(table, rowNo); int rest = restOfTable.size(); Row row = table.at(rowNo); setRuntimeContextOf(subject); callSetUpSutChain(subject,row,testResults); if (!(subject instanceof DefineAction)) // Don't want this as the storytest's main fixture/object pushOnScope(typedResult,row,testResults); subject.interpretAfterFirstRow(restOfTable, testResults); setUpTearDown.callTearDownSutChain(subject, row, testResults); if (restOfTable != table && restOfTable.size() > rest) for (int i = rest; i < restOfTable.size(); i++) table.add(restOfTable.at(i)); } private void handleInnerTables(final Cell cell, TestResults testResults) { Tables innerTables = cell.getEmbeddedTables(); IScopeState state = scopeStack.currentState(); for (Table iTable: innerTables) { runTable(iTable,testResults); state.restore(); } } private void handleActualDoFixture(DoEvaluator doEvaluator, Row row, TestResults testResults) { // Unwrap an auto-wrap, keeping the type information if (doEvaluator.getSystemUnderTest() != null) { pushOnScope(doEvaluator.getTypedSystemUnderTest(),row,testResults); setRuntimeContextOf(doEvaluator.getSystemUnderTest()); } } private void handleSuiteFixture(SuiteEvaluator suiteEvaluator, TypedObject typedResult, Row row, TestResults testResults) { if (suiteFixtureOption.isNone()) suiteFixtureOption = new Some<SuiteEvaluator>(suiteEvaluator); setRuntimeContextOf(suiteEvaluator); // Subsequent tables are global for now. setUpTearDown.callSuiteSetUp(suiteEvaluator, row, testResults); pushOnScope(typedResult,row,testResults); } private void handleDomainFixture(TypedObject typedResult, Object subject, Row row, TestResults testResults) { TypedObject sut = typedResult; if (subject instanceof DomainFixture) sut = ((DomainFixture)subject).getTypedSystemUnderTest(); pushOnScope(typedResult,row,testResults); domainInject = new DomainInjectionTraverse(this); domainInject.setTypedSystemUnderTest(sut); setRuntimeContextOf(domainInject); domainCheck = new DomainCheckTraverse(this); domainCheck.setTypedSystemUnderTest(sut); setRuntimeContextOf(domainCheck); current = domainInject; } private void setRuntimeContextOf(Object object) { if (object instanceof RuntimeContextual) ((RuntimeContextual)object).setRuntimeContext(flowEvaluator.getRuntimeContext()); if (object instanceof DomainAdapter) setRuntimeContextOf(((DomainAdapter)object).getSystemUnderTest()); } private void pushOnScope(TypedObject typedResult, Row row, TestResults testResults) { scopeStack.push(typedResult); callSetUpSutChain(typedResult.getSubject(), row, testResults); } private void callSetUpSutChain(Object sutInitially, final Row row, final TestResults testResults) { setUpTearDown.callSetUpSutChain(sutInitially, row, testResults); } private void tearDown(List<TypedObject> typedObjects, Row row, TestResults testResults) { for (TypedObject typedObject : typedObjects) setUpTearDown.callTearDownSutChain(typedObject.getSubject(), row, testResults); } @Override public void setCurrentAction() { current = this; } @Override public void setCurrentCheck() { current = domainCheck; } public void exit() { if (suiteFixtureOption.isSome()) setUpTearDown.callSuiteTearDown(suiteFixtureOption.get(),TestResultsFactory.testResults()); } public RuntimeContextInternal getRuntimeContext() { return runtime; } @Override public void addNamedObject(String name, TypedObject typedObject, Row row, TestResults testResults) { callSetUpSutChain(typedObject.getSubject(), row, testResults); scopeStack.addNamedObject(name, typedObject, row, testResults); } @Override public void select(String name) { scopeStack.select(name); } public static Row mapOddBalls(Row row, Evaluator evaluator) { // |add|class|as|name| => |add named|name|class| if (row.size() == 4 && "add".equals(row.text(0,evaluator)) && "as".equals(row.text(2,evaluator))) { String className = row.text(1,evaluator); row.at(0).setText("add named"); row.at(1).setText(row.text(3,evaluator)); row.at(2).setText(className); row.removeElementAt(3); } return row; } }
[ "375833274@qq.com" ]
375833274@qq.com
7a68a37922c6f3b57812553daacd96bb76caefdd
8d275de8a0ef91c38ec614e451b7f60d309f4cd3
/wms-feeds/src/main/java/com/amazonaws/mws/jaxb/entity/BootSizeDimension.java
8593009ac8fe5c95f51862cbc3494dad39d7f383
[]
no_license
owengoodluck/JavaLib2
3d6ed543a3d94dad89c221c3be324baf7f8a3bf9
c1e5576729c826929da3a60017d1faf6ca56b706
refs/heads/master
2021-01-10T05:19:53.303106
2016-02-25T14:02:21
2016-02-25T14:02:21
51,063,234
1
0
null
null
null
null
UTF-8
Java
false
false
2,513
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.10.29 at 10:21:45 PM CST // package com.amazonaws.mws.jaxb.entity; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Java class for BootSizeDimension complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="BootSizeDimension"> * &lt;simpleContent> * &lt;extension base="&lt;>Dimension"> * &lt;attribute name="unitOfMeasure" use="required" type="{}BootSizeUnitOfMeasure" /> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BootSizeDimension", propOrder = { "value" }) public class BootSizeDimension { @XmlValue protected BigDecimal value; @XmlAttribute(name = "unitOfMeasure", required = true) protected BootSizeUnitOfMeasure unitOfMeasure; /** * Gets the value of the value property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setValue(BigDecimal value) { this.value = value; } /** * Gets the value of the unitOfMeasure property. * * @return * possible object is * {@link BootSizeUnitOfMeasure } * */ public BootSizeUnitOfMeasure getUnitOfMeasure() { return unitOfMeasure; } /** * Sets the value of the unitOfMeasure property. * * @param value * allowed object is * {@link BootSizeUnitOfMeasure } * */ public void setUnitOfMeasure(BootSizeUnitOfMeasure value) { this.unitOfMeasure = value; } }
[ "owen.goodluck@gmail.com" ]
owen.goodluck@gmail.com
c345b0c9c29d5869d3888173fc83c3a93a185212
88b106698562f8e2b8114bb5f1a95a1182b44636
/src/Sockets/MessageListener.java
aa33e21dadb92fe10e603e1134dd7b1117b44eaa
[ "MIT" ]
permissive
Tpulls/CD-Archive-Management-System
cac24907bdbe32c512d90ae44b85d269e123a2db
f9e4e99ffcf4d3827285687ee2bf68a599d4a449
refs/heads/main
2023-01-18T16:59:22.722881
2020-11-24T20:24:25
2020-11-24T20:24:25
306,815,266
0
0
MIT
2020-10-24T05:58:30
2020-10-24T05:48:01
null
UTF-8
Java
false
false
425
java
/** * CD Archive Management System - Message Listener * * Version Control: 1.0.2 - 25/11/2020 * refer to: https://github.com/Tpulls/CD-Archive-Management-System * * AUTHOR: Thomas Pullar */ package Sockets; public interface MessageListener { // /** * Constructor to take the message and the details of who sent it * */ void message(String msg, MessageSender sender); }
[ "noreply@github.com" ]
noreply@github.com
a804876b4515aebb79b057600704eb15dc14d4f4
082652bcf701b7994b20be728380a06224578afa
/Void Mod/src/main/java/mod/leer/EventHandler.java
fc0ae2abc7c1a6be6bd0c87ecc3c17f2f8964acf
[]
no_license
GloriousAlpaca/Leer
160c38764ea2e7999de8319c0cbd6f0200a5e5a5
818bf73ec95ac9c97668c10b70f82feafc7f0c1d
refs/heads/master
2020-05-28T03:22:08.232627
2019-11-18T15:39:45
2019-11-18T15:39:45
188,865,828
0
0
null
null
null
null
UTF-8
Java
false
false
1,844
java
package mod.leer; import java.util.Random; import mod.leer.entities.Meteorite; import mod.leer.renderer.Sprites; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.relauncher.Side; @EventBusSubscriber public class EventHandler { private int meteoritetimer = 0; private static float speed = 2; public boolean check=true; private int range=100; @SubscribeEvent public void registerSprite(TextureStitchEvent.Pre event){ LEER.proxy.registerSprites(event); } @SubscribeEvent public void meteoritespawn(TickEvent.WorldTickEvent event){ if(event.side == Side.SERVER) { int temp = event.world.playerEntities.size(); if(meteoritetimer>1200 && check==true &&temp != 0) { Random r = new Random(); //Wird der Meteorit gespawned ? if(r.nextInt(100)<=10) { EntityPlayer player = event.world.playerEntities.get(0); double posx = player.getPosition().getX(); double posz = player.getPosition().getZ(); //Meteorit wird mit random Koordinate in einer range vom Player gespawned.(Random Richtung) event.world.spawnEntity(new Meteorite(event.world, //X-Koordinate posx+(range-r.nextInt(range*2)), //Y-Koordinate 255, //Z-Koordinate posz+(range-r.nextInt(range*2)), //Richtung (speed*(r.nextFloat()-0.5F)*( r.nextBoolean() ? 1 : -1 )),speed*-r.nextFloat(),speed*((r.nextFloat()-0.5F)*( r.nextBoolean() ? 1 : -1 )))); } meteoritetimer=0; } else { meteoritetimer++; } } } }
[ "31967704+GloriousAlpaca@users.noreply.github.com" ]
31967704+GloriousAlpaca@users.noreply.github.com
1558ca754f702683adcfd7f9b7d103c0ab747219
afb9ccb615f4acd2a1716a2666cc46167efc3454
/app/src/main/java/com/example/mamorky/socialplayer/ui/Playlist/AddEditPlaylist/AddEditPresenterImp.java
724dd94742e87514075aa3b89fe468a432106241
[]
no_license
Mamorky/SocialPlayerBeta
d6fb8bde889a21f8e5bb353aa5908b72be877ec5
4ff65f19f311299b6b45907657cdc255f659c8ea
refs/heads/master
2021-09-16T00:20:12.037129
2018-06-13T18:19:16
2018-06-13T18:19:16
108,892,117
0
0
null
null
null
null
UTF-8
Java
false
false
989
java
package com.example.mamorky.socialplayer.ui.Playlist.AddEditPlaylist; import android.graphics.Bitmap; /** * Created by mamorky on 12/01/18. */ public class AddEditPresenterImp implements AddEditPresenter,AddEditInteractor.onValidatePlaylist{ private AddEditView view; private AddEditInteractor interactor; public AddEditPresenterImp(AddEditView view) { this.view = view; this.interactor = new AddEditInteractorImp(this); } @Override public void addPlaylist(String nombre, Bitmap imagen) { interactor.addPlaylist(nombre,imagen,this); } @Override public void editPlaylist(int id, String nombre, Bitmap imagen) { interactor.editPlaylist(id,nombre,imagen,this); } @Override public void onNameEmpty() { view.onSetNameEmpty(); } @Override public void onImageError() { view.onSetImageError(); } @Override public void onSucess() { view.onSuccess(); } }
[ "andres_ball@hotmail.com" ]
andres_ball@hotmail.com
c3fe8a9f7fd682ff29577a508aed5cfd6eb36a62
e47e9b53f967143bc6e3c3d665a52679c2811cd5
/src/test/java/com/springboot/app/uwantit/UwantitApplicationTests.java
2e9c37e910e25e9a601621ffb33ef9c67bb6176c
[]
no_license
clauBenavente/uwantit
77226e41703c3e6c9c8b3aacc311c0299048b42b
dda5a34fb5cc395e7809304ce4f7c5af7a3adabd
refs/heads/master
2022-11-08T07:06:47.015982
2020-06-17T15:49:47
2020-06-17T15:49:47
255,115,072
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package com.springboot.app.uwantit; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class UwantitApplicationTests { @Test void contextLoads() { } }
[ "claumn94@gmail.com" ]
claumn94@gmail.com
6f0aa3a88eb1865a4dc2e874320090040633d4bb
2252763a7be3152dbcaf4aff12c4cb2bf2cd577b
/src/java/com/nomis/ovc/legacydatamanagement/business/LegacyCaregiver.java
5c4cb52619b171e147615895863060fef2ae592d
[]
no_license
ccharlex/nomis3
c9a3ed101bed3b4352343b6b513b711dd0104c85
dfa73b2f63d25c54fe6fd18921f751985829d4ae
refs/heads/master
2023-03-21T14:22:51.827506
2020-12-13T23:28:22
2020-12-13T23:28:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,549
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.nomis.ovc.legacydatamanagement.business; import java.io.Serializable; /** * * @author smomoh */ public class LegacyCaregiver implements Serializable { private LegacyHouseholdEnrollment hhe; private String caregiverId; private String cgEnrollmentId; private String newCaregiverId; private String hhUniqueId; private String caregiverFirstname; private String caregiverLastName; private String caregiverFullName; private String caregiverGender; private LegacyHivStatusUpdate currentHivStatus; private String dateOfCurrentHivStatus; private LegacyHivStatusUpdate activeHivStatus; private int caregiverAge; private int currentAge; private String caregiverPhone; private String caregiverAddress; private String caregiverOccupation; private String caregiverMaritalStatus; private String cgiverHivStatus; private String dateOfEnrollment; private String dateModified; private String enrolledInCare="No"; private String enrolledOnART="No"; private String enrolledOnTreatment="No"; private String facilityId; private String pointOfService="enrollment"; private String householdhead; private boolean active=false; private String withdrawnFromProgram="No"; private String reasonForWithdrawal="Active"; //private String currentCaregiverStatus="Active"; //private String dateOfCurrentCaregiverStatus; private String dateOfWithdrawal; private int markedForDelete; private LegacyReferralDirectory facility; //private HouseholdService hhs=new HouseholdService(); LegacyBeneficiaryResourceManager beneficiary=new LegacyBeneficiaryResourceManager(); public String getCaregiverAddress() { if(caregiverAddress ==null) { //if(beneficiary.getHouseholdHead(hhUniqueId) !=null) //caregiverAddress=beneficiary.getHouseholdHead(hhUniqueId).getAddress(); } return caregiverAddress; } public String getCgEnrollmentId() { return cgEnrollmentId; } public void setCgEnrollmentId(String cgEnrollmentId) { this.cgEnrollmentId = cgEnrollmentId; } public boolean isActive() { return active; } public void setCaregiverAddress(String caregiverAddress) { this.caregiverAddress = caregiverAddress; } public int getCaregiverAge() { return caregiverAge; } public void setCaregiverAge(int caregiverAge) { this.caregiverAge = caregiverAge; } public int getCurrentAge() { return currentAge; } public void setCurrentAge(int currentAge) { this.currentAge = currentAge; } public String getCaregiverFirstname() { return caregiverFirstname; } public void setCaregiverFirstname(String caregiverFirstname) { this.caregiverFirstname = caregiverFirstname; } public void setCaregiverFullName(String caregiverFullName) { this.caregiverFullName = caregiverFullName; } public String getCaregiverFullName() { if(caregiverFullName==null) caregiverFullName=caregiverFirstname+" "+caregiverLastName; return caregiverFullName; } public String getCgiverHivStatus() { return cgiverHivStatus; } public void setCgiverHivStatus(String cgiverHivStatus) { this.cgiverHivStatus = cgiverHivStatus; } public String getCaregiverGender() { return caregiverGender; } public void setCaregiverGender(String caregiverGender) { this.caregiverGender = caregiverGender; } public String getCaregiverId() { return caregiverId; } public void setCaregiverId(String caregiverId) { this.caregiverId = caregiverId; } public String getNewCaregiverId() { return newCaregiverId; } public void setNewCaregiverId(String newCaregiverId) { this.newCaregiverId = newCaregiverId; } public String getCaregiverLastName() { return caregiverLastName; } public void setCaregiverLastName(String caregiverLastName) { this.caregiverLastName = caregiverLastName; } public String getCaregiverOccupation() { return caregiverOccupation; } public void setCaregiverOccupation(String caregiverOccupation) { this.caregiverOccupation = caregiverOccupation; } public String getCaregiverMaritalStatus() { return caregiverMaritalStatus; } public void setCaregiverMaritalStatus(String caregiverMaritalStatus) { this.caregiverMaritalStatus = caregiverMaritalStatus; } public String getCaregiverPhone() { return caregiverPhone; } public void setCaregiverPhone(String caregiverPhone) { this.caregiverPhone = caregiverPhone; } public LegacyHivStatusUpdate getActiveHivStatus() { //HivStatus hsu=new HivStatus(); //activeHivStatus=beneficiary.getActiveHivStatus(caregiverId, dateOfEnrollment); this.enrolledInCare=activeHivStatus.getClientEnrolledInCare(); this.setEnrolledOnART(activeHivStatus.getEnrolledOnART()); return activeHivStatus; } public LegacyHivStatusUpdate getCurrentHivStatus() { LegacyHivStatus hsu=new LegacyHivStatus(); currentHivStatus=hsu.getCurrentHivStatus(caregiverId,dateOfEnrollment); if(currentHivStatus==null) { currentHivStatus=getActiveHivStatus(); } return currentHivStatus; } public String getHhUniqueId() { return hhUniqueId; } public void setHhUniqueId(String hhUniqueId) { this.hhUniqueId = hhUniqueId; } public String getDateOfEnrollment() { return dateOfEnrollment; } public void setDateOfEnrollment(String dateOfEnrollment) { this.dateOfEnrollment = dateOfEnrollment; } public String getDateModified() { return dateModified; } public void setDateModified(String dateModified) { this.dateModified = dateModified; } public String getHouseholdhead() { return householdhead; } public void setHouseholdhead(String householdhead) { this.householdhead = householdhead; } /*public boolean isHouseholdhead() { return householdhead; } public void setHouseholdhead(boolean householdhead) { this.householdhead = householdhead; }*/ public String getEnrolledInCare() { return enrolledInCare; } public void setEnrolledInCare(String enrolledInCare) { this.enrolledInCare = enrolledInCare; } public String getPointOfService() { return pointOfService; } public void setPointOfService(String pointOfService) { this.pointOfService = pointOfService; } public String getDateOfCurrentHivStatus() { return dateOfCurrentHivStatus; } public void setDateOfCurrentHivStatus(String dateOfCurrentHivStatus) { this.dateOfCurrentHivStatus = dateOfCurrentHivStatus; } public String getFacilityId() { return facilityId; } public void setFacilityId(String facilityId) { this.facilityId = facilityId; } public String getDateOfWithdrawal() { LegacyOvcWithdrawal withdrawal=null; //withdrawal=beneficiary.getWithdrawalRecord(caregiverId,getWithdrawnFromProgram()); //if(withdrawal !=null) //dateOfWithdrawal=withdrawal.getDateOfWithdrawal(); return dateOfWithdrawal; } public void setDateOfWithdrawal(String dateOfWithdrawal) { this.dateOfWithdrawal = dateOfWithdrawal; } public String getReasonForWithdrawal() { LegacyOvcWithdrawal withdrawal=null; //withdrawal=beneficiary.getWithdrawalRecord(caregiverId,getWithdrawnFromProgram()); if(withdrawal !=null) reasonForWithdrawal=withdrawal.getReasonWithdrawal(); return reasonForWithdrawal; } public void setReasonForWithdrawal(String reasonForWithdrawal) { this.reasonForWithdrawal = reasonForWithdrawal; } public String getWithdrawnFromProgram() { return withdrawnFromProgram; } public void setWithdrawnFromProgram(String withdrawnFromProgram) { this.withdrawnFromProgram = withdrawnFromProgram; } public String getEnrolledOnART() { return enrolledOnART; } public void setEnrolledOnART(String enrolledOnART) { this.enrolledOnART = enrolledOnART; } public String getEnrolledOnTreatment() { if((getEnrolledOnART() !=null && getEnrolledOnART().equalsIgnoreCase("Yes")) || (getEnrolledInCare() !=null && getEnrolledInCare().equalsIgnoreCase("Yes"))) enrolledOnTreatment="Yes"; return enrolledOnTreatment; } public void setEnrolledOnTreatment(String enrolledOnTreatment) { this.enrolledOnTreatment = enrolledOnTreatment; } public LegacyHouseholdEnrollment getHhe() { //if(hhe==null) //hhe=beneficiary.getHouseholdHead(hhUniqueId); return hhe; } /*public String getCurrentCaregiverStatus() { String cgWithdrawnValue=getReasonForWithdrawal(); if(cgWithdrawnValue !=null) currentCaregiverStatus=cgWithdrawnValue; return currentCaregiverStatus; } public void setCurrentCaregiverStatus(String currentCaregiverStatus) { this.currentCaregiverStatus = currentCaregiverStatus; } public String getDateOfCurrentCaregiverStatus() { String dateWithdrawn=getDateOfWithdrawal(); if(dateWithdrawn !=null) dateOfCurrentCaregiverStatus=dateWithdrawn; return dateOfCurrentCaregiverStatus; } public void setDateOfCurrentCaregiverStatus(String dateOfCurrentCaregiverStatus) { this.dateOfCurrentCaregiverStatus = dateOfCurrentCaregiverStatus; }*/ public int getMarkedForDelete() { return markedForDelete; } public void setMarkedForDelete(int markedForDelete) { this.markedForDelete = markedForDelete; } public LegacyReferralDirectory getFacility() { if(facility==null) { //facility=beneficiary.getReferralDirectory(facilityId); } return facility; } public void setFacility(LegacyReferralDirectory facility) { this.facility = facility; } }
[ "smomoh@ahnigeria.org" ]
smomoh@ahnigeria.org
bafbfd51830ee07f98fcf490981b08f5ce9129a7
1afc67793490d0fbbc96956f3e82537137691639
/concurrency/src/main/java/com/lomoye/concurrency/syncTool/section6/Main.java
64a06424ca129a928ebc47688cb85e4faf54df37
[ "MIT" ]
permissive
lomoye/Learn-Java-7-Concurrency-Cookbook
001a6253c10adf481ec1969b1cbada7c907fe7b0
15fb46af2a24f81bb930641bb97db224f56f0c52
refs/heads/master
2021-01-01T15:37:38.961090
2017-07-26T09:14:11
2017-07-26T09:14:11
97,657,985
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
package com.lomoye.concurrency.syncTool.section6; import com.lomoye.concurrency.syncTool.section7.MyPhaser; import java.util.concurrent.Phaser; /** * Created by lomoye on 2017/7/25. * */ public class Main { public static void main(String[] args) { Phaser phaser = new MyPhaser(); phaser.register();phaser.register();phaser.register(); FileSearch system = new FileSearch("C:\\Windows", "hosts", phaser); FileSearch apps = new FileSearch("C:\\Program Files", "hosts", phaser); FileSearch documents = new FileSearch("C:\\data", "hosts", phaser); Thread systemThread = new Thread(system, "System"); systemThread.start(); Thread appsThread = new Thread(apps, "Apps"); appsThread.start(); Thread documentsThread = new Thread(documents, "Documents"); documentsThread.start(); try { systemThread.join(); appsThread.join(); documentsThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Terminated: " + phaser.isTerminated()); } }
[ "834033206@qq.com" ]
834033206@qq.com
46fda2c0f2be950fbdae59474ee0ee1ab9f9a329
ccb4a94a3cd39e5e9360df6676ee1337d39f66d7
/CrackingTheCodeInterview/src/com/suraj/code/interviewbook/MyStack.java
d00d3a22b860eeba93e10628b23d81ae873c6195
[]
no_license
suraj62300/CrackingTheCodeInterview
d0ec6fcb85caf8683af97a811e4bd643ef9a9c00
be1c3446ab019c8aeb59644f353b4b9212a5f403
refs/heads/master
2022-11-20T05:13:30.992160
2020-07-21T04:37:17
2020-07-21T04:37:17
274,082,890
0
0
null
null
null
null
UTF-8
Java
false
false
1,116
java
package com.suraj.code.interviewbook; import java.util.EmptyStackException; public class MyStack<T> { private static class StackNode<T> { private T data; private StackNode<T> next; public StackNode(T data) { this.data = data; } } private StackNode<T> top; public T pop() { if (top == null) throw new EmptyStackException(); T item = top.data; top= top.next; return item; } public void push(T item) { StackNode<T> t= new StackNode<T>(item); t.next = top; top= t; } public T peek() { if (top == null) throw new EmptyStackException(); return top.data; } public boolean isEmpty() { return top == null; } @Override public String toString() { String string = new String(); while(!isEmpty()) { string = string + " "+ peek(); top = top.next; } return string; } public static void main(String[] args) { MyStack<Integer> myStack = new MyStack<>(); myStack.push(25); myStack.push(35); System.out.println(myStack.peek()); System.out.println(myStack.toString()); } }
[ "suraj gupta@suraj" ]
suraj gupta@suraj
57f9fbfcbfd1bba3fdf05529266141f8a14476f8
ee561d8076f585f8aaba0d727b280e53a6619dd0
/app/src/main/java/com/example/onlychat/util/Util.java
8e1b3b9a6c964c4630975aa0ea2f1ce2d77f0a7e
[]
no_license
Exile-Twilight/OnlyChat
827017965fdf8fdddb071d35f357c76670949a69
4b276ce5ba262eedb60381fb75554dbfb5883554
refs/heads/master
2023-07-18T00:15:19.528667
2021-09-08T07:10:26
2021-09-08T07:10:26
404,243,407
0
0
null
null
null
null
UTF-8
Java
false
false
826
java
package com.example.onlychat.util; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Base64; import java.io.ByteArrayOutputStream; public class Util { public static Bitmap base64ToBitmap(String codeBase64) { byte[] bytes = Base64.decode(codeBase64,Base64.DEFAULT); Bitmap bitmap = BitmapFactory.decodeByteArray(bytes,0,bytes.length); return bitmap; } public static String bitmapTobase64(Bitmap imageBitmap) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); imageBitmap.compress(Bitmap.CompressFormat.JPEG,100,byteArrayOutputStream); byte[] bytes = byteArrayOutputStream.toByteArray(); String base64 = Base64.encodeToString(bytes,Base64.DEFAULT); return base64; } }
[ "xlee.dell@outlook.com" ]
xlee.dell@outlook.com
de09405180cc85b3ebbe21f05aa40dbeb34ef249
219dbab74ad508699b9941c9edce464a7bb6b43a
/src/test/java/Pages/HomePage.java
12ed421c0892de54463e2086834c5e7e56e0dce0
[]
no_license
skatray/Test-Task-QA-Automation-intern-Nikolaienko
ddef9ba0d5960137bc2d6be20367af48d137dacd
6aedd16131b409c6b6ca71c5c4343a0894b35dab
refs/heads/main
2023-03-14T15:28:07.100197
2021-03-09T22:22:23
2021-03-09T22:22:23
345,231,372
0
0
null
null
null
null
UTF-8
Java
false
false
5,677
java
package Pages; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.FindAll; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import java.time.Duration; import java.util.ArrayList; import java.util.List; public class HomePage { public WebDriver driver; WebDriverWait wait; Actions actions; public HomePage(WebDriver driver) { this.driver = driver; wait = new WebDriverWait(driver, 10); actions = new Actions(driver); } @FindBy(css = "#products_on_sale_pagination_contents > div") List<WebElement> products; List<WebElement> badProducts = new ArrayList<>(); private By menuPageInstrumenty = By.xpath("//bdi[text()='Электроинструмент']/../../.."); private By menuPageDrely = By.xpath("//a[text()='Дрели']"); private By menuPagePerforatory = By.xpath("//a[text()='Перфораторы']"); private By countOfProductLocator = By.xpath("//*[@class=\"ty-column3\"]/div/.."); private By productLocator = By.className("ty-column3"); public int countProductOnPage; public void openPage() { driver.get("https://shoptool.com.ua/"); } public void openRandPage(int page) { driver.navigate().to("https://shoptool.com.ua/index.php?dispatch=products.on_sale&page=" + page); } public void openPageInstrumenty() { driver.findElement(menuPageInstrumenty).click(); } public void openPageDrely() { driver.findElement(menuPageDrely).click(); } public void openPagePerforatory(){ driver.findElement(menuPagePerforatory).click(); } public int countProductOnPage() { try { Thread.sleep(2500); } catch (InterruptedException e) { e.printStackTrace(); } wait.until(ExpectedConditions.presenceOfElementLocated(countOfProductLocator)); return countProductOnPage = (int) driver.findElements(countOfProductLocator).size(); } public void changePage(int page) { try { wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".ty-pagination__items > a:nth-child(" + page + ")"))); driver.findElement(By.cssSelector(".ty-pagination__items > a:nth-child(" + page + ")")).click(); }catch (Exception e){ Assert.fail("Page "+page+ " not found"); } } public void addProduct(int i) { wait.until(ExpectedConditions.elementToBeClickable((By.cssSelector("#categories_view_pagination_contents > div:nth-child(" + i + ")")))); try { Thread.sleep(2500); } catch (InterruptedException e) { e.printStackTrace(); } actions.moveToElement(driver.findElement(By.cssSelector("#categories_view_pagination_contents > div:nth-child(" + i + ")"))).build().perform(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } WebElement elBtn = driver.findElement(By.cssSelector("#categories_view_pagination_contents > div:nth-child(" + i + ") [id^='button_cart']")); elBtn.click(); WebElement elPopup = wait .until(ExpectedConditions.elementToBeClickable(By.className("cm-notification-close"))); elPopup.click(); wait.until(ExpectedConditions.stalenessOf(elPopup)); } public void openBasket() { driver.findElement(By.className("ut2-top-cart-content")).click(); driver.findElement(By.cssSelector("div.ty-float-right > a")).click(); } public void openRandProduct(int productNumber) { WebElement product = driver.findElement(By.cssSelector("#products_on_sale_pagination_contents > div:nth-child(" + productNumber + ")")); product.click(); } public void testProduct(int count) { WebElement product = products.get(count); WebElement productName = product.findElement(By.cssSelector("a.product-title")); WebElement productNewPrice = product.findElement(By.cssSelector("span.ty-price-num")); WebElement productOldPrice = product.findElement(By.cssSelector("span.ty-strike span")); WebElement productDiscount = null; try { productDiscount = product.findElement(By.cssSelector("div.ty-product-labels__item--discount em")); }catch (Exception e) { Assert.fail("This Product don't have discount label " + productName.getText()); } Double doubleProductOldPrice = Double.valueOf(productOldPrice.getText().replaceAll("[^\\d\\.]", "")); Double doubleProductDiscount = Double.valueOf(productDiscount.getText().replaceAll("[^\\d\\.]", "")); Double doubleProductNewPrice = Double.valueOf(productNewPrice.getText().replaceAll("[^\\d\\.]", "")); // System.out.println(productName.getText()); System.out.println("Price " + doubleProductOldPrice); System.out.println("Discount " + doubleProductDiscount); System.out.println("Price with discount " + doubleProductNewPrice); // Double calculate = (100 - doubleProductDiscount) / 100 * doubleProductOldPrice; calculate = (double) (Math.round(calculate * 100)) / 100; System.out.println("Calc price " + calculate); System.out.println(""); Assert.assertEquals(calculate, doubleProductNewPrice, productName.getText()); } }
[ "iskatray@gmail.com" ]
iskatray@gmail.com
4a06c9f5079ba99e76dd7c34cb0f202624f81a29
0d7380bde13ec7cff95e85c936c6a08fceeb5c6a
/src/main/java/de/chkal/wjax11/model/AbstractEntity.java
f29b2d0520cd5deaaed8d2099dc71034cfefc45d
[]
no_license
lincolnthree/wjax11-demo
d276f2805343979d4cd8e79f59bd10a4f2c04a83
c27fe8ff53c643941e9411c7f541ecadfa99696c
refs/heads/master
2021-01-19T11:53:21.256780
2011-11-08T18:23:44
2011-11-08T18:23:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package de.chkal.wjax11.model; import java.io.Serializable; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class AbstractEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; public long getId() { return id; } public void setId(long id) { this.id = id; } }
[ "christian@kaltepoth.de" ]
christian@kaltepoth.de
b19c49793f8ef36b22087b575bf30c7955df1071
3fdb2510626eeb1c8d9c521c1a5f921321b24d85
/src/main/java/com/store/pressing/service/ClientService.java
2bf9d06c974d1d3203ba277012736a6172d5c339
[]
no_license
ndiguesene/pressing
ded3589a989c6550967acc5af7f4dd1e0305c957
19223bc981a5ebc9f7d951acc95ffa9e41676cc6
refs/heads/master
2023-05-12T01:22:44.300849
2021-06-02T00:01:51
2021-06-02T00:01:51
372,990,804
0
0
null
null
null
null
UTF-8
Java
false
false
2,622
java
package com.store.pressing.service; import com.store.pressing.domain.Client; import com.store.pressing.repository.ClientRepository; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service Implementation for managing {@link Client}. */ @Service @Transactional public class ClientService { private final Logger log = LoggerFactory.getLogger(ClientService.class); private final ClientRepository clientRepository; public ClientService(ClientRepository clientRepository) { this.clientRepository = clientRepository; } /** * Save a client. * * @param client the entity to save. * @return the persisted entity. */ public Client save(Client client) { log.debug("Request to save Client : {}", client); return clientRepository.save(client); } /** * Partially update a client. * * @param client the entity to update partially. * @return the persisted entity. */ public Optional<Client> partialUpdate(Client client) { log.debug("Request to partially update Client : {}", client); return clientRepository .findById(client.getId()) .map( existingClient -> { if (client.getTelephone() != null) { existingClient.setTelephone(client.getTelephone()); } return existingClient; } ) .map(clientRepository::save); } /** * Get all the clients. * * @param pageable the pagination information. * @return the list of entities. */ @Transactional(readOnly = true) public Page<Client> findAll(Pageable pageable) { log.debug("Request to get all Clients"); return clientRepository.findAll(pageable); } /** * Get one client by id. * * @param id the id of the entity. * @return the entity. */ @Transactional(readOnly = true) public Optional<Client> findOne(Long id) { log.debug("Request to get Client : {}", id); return clientRepository.findById(id); } /** * Delete the client by id. * * @param id the id of the entity. */ public void delete(Long id) { log.debug("Request to delete Client : {}", id); clientRepository.deleteById(id); } }
[ "senendigue@gmail.com" ]
senendigue@gmail.com
1d611ef8af93a6e95802118dcae847b64a36be51
d31562ae76d2f05e664d57072f640d5546fd6f97
/Seminar_23/src/sample4/source_annotations_tools/PropertyForEditor.java
697d554c4caf3b201d34589d011f8c35e49a19ff
[]
no_license
atcherkasov/kurs2_KPO
d35a6ddc1caa4ec7bb5e7bf4f1887121ff66a553
4ec4c20dfa30cf11a52d26eb5fe651aa44c4c92b
refs/heads/master
2022-04-14T09:03:50.493288
2020-04-08T20:28:34
2020-04-08T20:28:34
209,839,350
0
0
null
2020-03-02T18:09:41
2019-09-20T16:51:49
Java
UTF-8
Java
false
false
222
java
package sample4.source_annotations_tools; import java.lang.annotation.*; @Documented @Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) public @interface PropertyForEditor { String editor() default ""; }
[ "atcherkasov@hotmail.com" ]
atcherkasov@hotmail.com
3588a643fe7ab1cb37135bfdfe1cfe757e2ba374
8453d954801ef539dea4990f8323d1774a0413aa
/SpringAOP/src/followSpringAction/Minstrel.java
93153e8232c1f44529772839d77616c4ee151900
[]
no_license
georgezzzh/Spring
c73bcbbb12d48f1befd9aec5d7d782446445181d
4b360a9ffbcb7ec3077cc2a9417f114d66bafd57
refs/heads/master
2023-07-24T05:16:23.746480
2023-07-17T15:01:52
2023-07-17T15:01:52
176,078,564
0
0
null
2023-04-17T17:45:10
2019-03-17T09:08:17
Java
UTF-8
Java
false
false
429
java
package followSpringAction; import java.io.PrintStream; public class Minstrel { private PrintStream stream; public Minstrel(PrintStream stream){ this.stream=stream; } public void singBeforeQuest(){ stream.println("Fa la la,the knight is so brave"); } public void singAfterQuest(){ stream.println("Tee hee hee,the brave knight "+ "did embark on a quest"); } }
[ "usasne@163.com" ]
usasne@163.com
0fea4c5b15b2671a5622427f802a936db53cc7de
5f6d80f7426532e435a48a0050295713ed4255ef
/builder/src/main/java/org/bdgenomics/cannoli/builder/package-info.java
178fdc13b834768fc41feec04919a24225364b89
[ "LicenseRef-scancode-generic-cla", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bigdatagenomics/cannoli
cf663071ed207a68ad87cbaf39d7b1f98378b6a2
787a09a46fc2b74480e8b0bca9b7584b8f03012e
refs/heads/master
2023-04-27T21:07:54.290205
2023-02-23T19:06:50
2023-02-23T19:10:34
78,473,098
38
23
Apache-2.0
2023-04-21T20:48:12
2017-01-09T22:02:42
Scala
UTF-8
Java
false
false
876
java
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Cannoli pipe command builder. */ package org.bdgenomics.cannoli.builder;
[ "heuermh@acm.org" ]
heuermh@acm.org
31924fd1ddee730782ddc5303034164db5216e25
148353d152e1e3f4db238051bb6c28484a6c92fd
/wydlb/app/src/main/java/com/wydlb/first/utils/RxTimeTool.java
2b5d0b2be32fad02d8974dd524deca0577e69ea4
[]
no_license
abliudede/wydlb
5e7d58b573592519fd58223284869cac859934bd
1b18db86406f0e2dc22c608afe9913bbbaa1c883
refs/heads/master
2023-07-19T17:48:53.495198
2021-09-01T02:04:15
2021-09-01T02:04:15
298,725,008
1
1
null
null
null
null
UTF-8
Java
false
false
24,475
java
package com.wydlb.first.utils; import android.annotation.SuppressLint; import android.text.TextUtils; import android.util.Log; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import static com.wydlb.first.utils.RxConstTool.DAY; import static com.wydlb.first.utils.RxConstTool.HOUR; import static com.wydlb.first.utils.RxConstTool.MIN; import static com.wydlb.first.utils.RxConstTool.MSEC; import static com.wydlb.first.utils.RxConstTool.SEC; import static com.wydlb.first.utils.RxConstTool.TimeUnit; import static com.wydlb.first.utils.RxDataTool.stringToInt; /** * Created by vondear on 2016/1/24. * 时间相关工具类 */ public class RxTimeTool { /** * <p>在工具类中经常使用到工具类的格式化描述,这个主要是一个日期的操作类,所以日志格式主要使用 SimpleDateFormat的定义格式.</p> * 格式的意义如下: 日期和时间模式 <br> * <p>日期和时间格式由日期和时间模式字符串指定。在日期和时间模式字符串中,未加引号的字母 'A' 到 'Z' 和 'a' 到 'z' * 被解释为模式字母,用来表示日期或时间字符串元素。文本可以使用单引号 (') 引起来,以免进行解释。"''" * 表示单引号。所有其他字符均不解释;只是在格式化时将它们简单复制到输出字符串,或者在分析时与输入字符串进行匹配。 * </p> * 定义了以下模式字母(所有其他字符 'A' 到 'Z' 和 'a' 到 'z' 都被保留): <br> * <table border="1" cellspacing="1" cellpadding="1" summary="Chart shows pattern letters, date/time component, * presentation, and examples."> * <tr> * <th align="left">字母</th> * <th align="left">日期或时间元素</th> * <th align="left">表示</th> * <th align="left">示例</th> * </tr> * <tr> * <td><code>G</code></td> * <td>Era 标志符</td> * <td>Text</td> * <td><code>AD</code></td> * </tr> * <tr> * <td><code>y</code> </td> * <td>年 </td> * <td>Year </td> * <td><code>1996</code>; <code>96</code> </td> * </tr> * <tr> * <td><code>M</code> </td> * <td>年中的月份 </td> * <td>Month </td> * <td><code>July</code>; <code>Jul</code>; <code>07</code> </td> * </tr> * <tr> * <td><code>w</code> </td> * <td>年中的周数 </td> * <td>Number </td> * <td><code>27</code> </td> * </tr> * <tr> * <td><code>W</code> </td> * <td>月份中的周数 </td> * <td>Number </td> * <td><code>2</code> </td> * </tr> * <tr> * <td><code>D</code> </td> * <td>年中的天数 </td> * <td>Number </td> * <td><code>189</code> </td> * </tr> * <tr> * <td><code>d</code> </td> * <td>月份中的天数 </td> * <td>Number </td> * <td><code>10</code> </td> * </tr> * <tr> * <td><code>F</code> </td> * <td>月份中的星期 </td> * <td>Number </td> * <td><code>2</code> </td> * </tr> * <tr> * <td><code>E</code> </td> * <td>星期中的天数 </td> * <td>Text </td> * <td><code>Tuesday</code>; <code>Tue</code> </td> * </tr> * <tr> * <td><code>a</code> </td> * <td>Am/pm 标记 </td> * <td>Text </td> * <td><code>PM</code> </td> * </tr> * <tr> * <td><code>H</code> </td> * <td>一天中的小时数(0-23) </td> * <td>Number </td> * <td><code>0</code> </td> * </tr> * <tr> * <td><code>k</code> </td> * <td>一天中的小时数(1-24) </td> * <td>Number </td> * <td><code>24</code> </td> * </tr> * <tr> * <td><code>K</code> </td> * <td>am/pm 中的小时数(0-11) </td> * <td>Number </td> * <td><code>0</code> </td> * </tr> * <tr> * <td><code>h</code> </td> * <td>am/pm 中的小时数(1-12) </td> * <td>Number </td> * <td><code>12</code> </td> * </tr> * <tr> * <td><code>m</code> </td> * <td>小时中的分钟数 </td> * <td>Number </td> * <td><code>30</code> </td> * </tr> * <tr> * <td><code>s</code> </td> * <td>分钟中的秒数 </td> * <td>Number </td> * <td><code>55</code> </td> * </tr> * <tr> * <td><code>S</code> </td> * <td>毫秒数 </td> * <td>Number </td> * <td><code>978</code> </td> * </tr> * <tr> * <td><code>z</code> </td> * <td>时区 </td> * <td>General time zone </td> * <td><code>Pacific Standard Time</code>; <code>PST</code>; <code>GMT-08:00</code> </td> * </tr> * <tr> * <td><code>Z</code> </td> * <td>时区 </td> * <td>RFC 822 time zone </td> * <td><code>-0800</code> </td> * </tr> * </table> * <pre> * HH:mm 15:44 * h:mm a 3:44 下午 * HH:mm z 15:44 CST * HH:mm Z 15:44 +0800 * HH:mm zzzz 15:44 中国标准时间 * HH:mm:ss 15:44:40 * yyyy-MM-dd 2016-08-12 * yyyy-MM-dd HH:mm 2016-08-12 15:44 * yyyy-MM-dd HH:mm:ss 2016-08-12 15:44:40 * yyyy-MM-dd HH:mm:ss zzzz 2016-08-12 15:44:40 中国标准时间 * EEEE yyyy-MM-dd HH:mm:ss zzzz 星期五 2016-08-12 15:44:40 中国标准时间 * yyyy-MM-dd HH:mm:ss.SSSZ 2016-08-12 15:44:40.461+0800 * yyyy-MM-dd'T'HH:mm:ss.SSSZ 2016-08-12T15:44:40.461+0800 * yyyy.MM.dd G 'at' HH:mm:ss z 2016.08.12 公元 at 15:44:40 CST * K:mm a 3:44 下午 * EEE, MMM d, ''yy 星期五, 八月 12, '16 * hh 'o''clock' a, zzzz 03 o'clock 下午, 中国标准时间 * yyyyy.MMMMM.dd GGG hh:mm aaa 02016.八月.12 公元 03:44 下午 * EEE, d MMM yyyy HH:mm:ss Z 星期五, 12 八月 2016 15:44:40 +0800 * yyMMddHHmmssZ 160812154440+0800 * yyyy-MM-dd'T'HH:mm:ss.SSSZ 2016-08-12T15:44:40.461+0800 * EEEE 'DATE('yyyy-MM-dd')' 'TIME('HH:mm:ss')' zzzz 星期五 DATE(2016-08-12) TIME(15:44:40) 中国标准时间 * </pre> */ public static final SimpleDateFormat DEFAULT_SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); public static final SimpleDateFormat HHMMSS_SDF = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()); public static final SimpleDateFormat YY_MM_SDF = new SimpleDateFormat("yyyy-MM", Locale.getDefault()); public static final SimpleDateFormat YY_MM_DD_SDF = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); public static final SimpleDateFormat YY_MM_DD_SDF1 = new SimpleDateFormat("yyyy年MM月dd日", Locale.getDefault()); public static final SimpleDateFormat YY_MM_SDF1 = new SimpleDateFormat("yyyy年MM月", Locale.getDefault()); public static final SimpleDateFormat YY_SDF = new SimpleDateFormat("yyyy", Locale.getDefault()); public static final SimpleDateFormat ORDER_NO_SDF = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()); /** * 将时间戳转为时间字符串 * <p>格式为yyyy-MM-dd HH:mm:ss</p> * * @param milliseconds 毫秒时间戳 * @return 时间字符串 */ public static String milliseconds2String(long milliseconds) { return milliseconds2String(milliseconds, DEFAULT_SDF); } public static String milliseconds2YYMMString(long milliseconds) { return milliseconds2String(milliseconds, YY_MM_SDF); } public static String milliseconds2YYMMString1(long milliseconds) { return milliseconds2String(milliseconds, YY_MM_SDF1); } public static String milliseconds2YYMMDDString(long milliseconds) { return milliseconds2String(milliseconds, YY_MM_DD_SDF1); } public static String milliseconds2YYString(long milliseconds) { return milliseconds2String(milliseconds, YY_SDF); } public static String milliseconds2HHMMSSString(long milliseconds) { return milliseconds2String(milliseconds, HHMMSS_SDF); } /** * 将时间戳转为时间字符串 * <p>格式为用户自定义</p> * * @param milliseconds 毫秒时间戳 * @param format 时间格式 * @return 时间字符串 */ public static String milliseconds2String(long milliseconds, SimpleDateFormat format) { return format.format(new Date(milliseconds)); } /** * 将时间字符串转为时间戳 * <p>格式为yyyy-MM-dd HH:mm:ss</p> * * @param time 时间字符串 * @return 毫秒时间戳 */ public static long string2Milliseconds(String time) { return string2Milliseconds(time, DEFAULT_SDF); } public static long stringYY_MM_DD_SDF2Milliseconds(String time) { return string2Milliseconds(time, YY_MM_DD_SDF); } /** * 将时间字符串转为时间戳 * <p>格式为用户自定义</p> * * @param time 时间字符串 * @param format 时间格式 * @return 毫秒时间戳 */ public static long string2Milliseconds(String time, SimpleDateFormat format) { try { return format.parse(time).getTime(); } catch (ParseException e) { e.printStackTrace(); } return -1; } /** * 将时间字符串转为Date类型 * <p>格式为yyyy-MM-dd HH:mm:ss</p> * * @param time 时间字符串 * @return Date类型 */ public static Date string2Date(String time) { return string2Date(time, DEFAULT_SDF); } public static String string2YYMMDate(String time) { return date2YYMMString(string2Date(time, YY_MM_SDF)); } /** * 将时间字符串转为Date类型 * <p>格式为用户自定义</p> * * @param time 时间字符串 * @param format 时间格式 * @return Date类型 */ public static Date string2Date(String time, SimpleDateFormat format) { return new Date(string2Milliseconds(time, format)); } /** * 将Date类型转为时间字符串 * <p>格式为yyyy-MM-dd HH:mm:ss</p> * * @param time Date类型时间 * @return 时间字符串 */ public static String date2String(Date time) { return date2String(time, DEFAULT_SDF); } public static String date2YYMMString(Date time) { return date2String(time, YY_MM_SDF); } /** * 将Date类型转为时间字符串 * <p>格式为用户自定义</p> * * @param time Date类型时间 * @param format 时间格式 * @return 时间字符串 */ public static String date2String(Date time, SimpleDateFormat format) { return format.format(time); } /** * 将Date类型转为时间戳 * * @param time Date类型时间 * @return 毫秒时间戳 */ public static long date2Milliseconds(Date time) { return time.getTime(); } /** * 将时间戳转为Date类型 * * @param milliseconds 毫秒时间戳 * @return Date类型时间 */ public static Date milliseconds2Date(long milliseconds) { return new Date(milliseconds); } /** * 毫秒时间戳单位转换(单位:unit) * * @param milliseconds 毫秒时间戳 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @return unit时间戳 */ private static long milliseconds2Unit(long milliseconds, TimeUnit unit) { switch (unit) { case MSEC: return milliseconds / MSEC; case SEC: return milliseconds / SEC; case MIN: return milliseconds / MIN; case HOUR: return milliseconds / HOUR; case DAY: return milliseconds / DAY; } return -1; } /** * 获取两个时间差(单位:unit) * <p>time1和time2格式都为yyyy-MM-dd HH:mm:ss</p> * * @param time0 时间字符串1 * @param time1 时间字符串2 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @return unit时间戳 */ public static long getIntervalTime(String time0, String time1, TimeUnit unit) { return getIntervalTime(time0, time1, unit, DEFAULT_SDF); } /** * 获取两个时间差(单位:unit) * <p>time1和time2格式都为format</p> * * @param time0 时间字符串1 * @param time1 时间字符串2 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @param format 时间格式 * @return unit时间戳 */ public static long getIntervalTime(String time0, String time1, TimeUnit unit, SimpleDateFormat format) { return Math.abs(milliseconds2Unit(string2Milliseconds(time0, format) - string2Milliseconds(time1, format), unit)); } /** * 获取两个时间差(单位:unit) * <p>time1和time2都为Date类型</p> * * @param time0 Date类型时间1 * @param time1 Date类型时间2 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @return unit时间戳 */ public static long getIntervalTime(Date time0, Date time1, TimeUnit unit) { return Math.abs(milliseconds2Unit(date2Milliseconds(time1) - date2Milliseconds(time0), unit)); } // /* // * 获取XX时XX分格式 // * */ // public static String getHourMinuteTime(int min) { // StringBuilder sb = new StringBuilder(); // if(min <= 60){ // sb.append(min); // sb.append("分"); // }else if(min > 60){ // int hour = min / 60; // sb.append(hour); // sb.append("时"); // sb.append(min - 60*hour); // sb.append("分"); // } // return sb.toString(); // } /* * 获取XX时格式 * */ public static String getHourTime(int min) { StringBuilder sb = new StringBuilder(); if(min <= 60){ sb.append(min); sb.append("分"); }else if(min > 60){ double hour = min / 60d; sb.append(RxDataTool.format1Decimals(hour)); sb.append("时"); } return sb.toString(); } /** * 获取当前时间 * * @return 毫秒时间戳 */ public static long getCurTimeMills() { return System.currentTimeMillis(); } /** * 获取当前时间 * <p>格式为yyyy-MM-dd HH:mm:ss</p> * * @return 时间字符串 */ public static String getCurTimeString() { return date2String(new Date()); } public static String getOrderDateStr() { return date2String(new Date(System.currentTimeMillis()), ORDER_NO_SDF); } /** * 获取当前时间 * <p>格式为用户自定义</p> * * @param format 时间格式 * @return 时间字符串 */ public static String getCurTimeString(SimpleDateFormat format) { return date2String(new Date(), format); } /** * 获取当前时间 * <p>Date类型</p> * * @return Date类型时间 */ public static Date getCurTimeDate() { return new Date(); } /** * 获取与当前时间的差(单位:unit) * <p>time格式为yyyy-MM-dd HH:mm:ss</p> * * @param time 时间字符串 * @param unit <ul> * <li>{@link TimeUnit#MSEC}:毫秒</li> * <li>{@link TimeUnit#SEC }:秒</li> * <li>{@link TimeUnit#MIN }:分</li> * <li>{@link TimeUnit#HOUR}:小时</li> * <li>{@link TimeUnit#DAY }:天</li> * </ul> * @return unit时间戳 */ public static long getIntervalByNow(String time, TimeUnit unit) { return getIntervalByNow(time, unit, DEFAULT_SDF); } /** * 获取与当前时间的差(单位:unit) * <p>time格式为format</p> * * @param time 时间字符串 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @param format 时间格式 * @return unit时间戳 */ public static long getIntervalByNow(String time, TimeUnit unit, SimpleDateFormat format) { return getIntervalTime(getCurTimeString(), time, unit, format); } /** * 获取与当前时间的差(单位:unit) * <p>time为Date类型</p> * * @param time Date类型时间 * @param unit <ul> * <li>{@link TimeUnit#MSEC}: 毫秒</li> * <li>{@link TimeUnit#SEC }: 秒</li> * <li>{@link TimeUnit#MIN }: 分</li> * <li>{@link TimeUnit#HOUR}: 小时</li> * <li>{@link TimeUnit#DAY }: 天</li> * </ul> * @return unit时间戳 */ public static long getIntervalByNow(Date time, TimeUnit unit) { return getIntervalTime(getCurTimeDate(), time, unit); } /** * 判断闰年 * * @param year 年份 * @return {@code true}: 闰年<br>{@code false}: 平年 */ public static boolean isLeapYear(int year) { return year % 4 == 0 && year % 100 != 0 || year % 400 == 0; } /** * 将date转换成format格式的日期 * * @param format 格式 * @param date 日期 * @return */ public static String simpleDateFormat(String format, Date date) { if (TextUtils.isEmpty(format)) { format = "yyyy-MM-dd HH:mm:ss"; } String content = new SimpleDateFormat(format).format(date); return content; } //--------------------------------------------字符串转换成时间戳----------------------------------- /** * 将指定格式的日期转换成时间戳 * * @param mDate * @return */ public static String Date2Timestamp(Date mDate) { return String.valueOf(mDate.getTime()).substring(0, 10); } /** * 将日期字符串 按照 指定的格式 转换成 DATE * 转换失败时 return null; * * @param format * @param datess * @return */ public static Date string2Date(String format, String datess) { SimpleDateFormat sdr = new SimpleDateFormat(format); Date date = null; try { date = sdr.parse(datess); } catch (ParseException e) { e.printStackTrace(); } return date; } /** * 将 yyyy年MM月dd日 转换成 时间戳 * * @param format * @param datess * @return */ public static String string2Timestamp(String format, String datess) { Date date = string2Date(format, datess); return Date2Timestamp(date); } //===========================================字符串转换成时间戳==================================== /** * 获取当前日期时间 / 得到今天的日期 * str yyyyMMddhhMMss 之类的 * * @return */ @SuppressLint("SimpleDateFormat") public static String getCurrentDateTime(String format) { return simpleDateFormat(format, new Date()); } /** * 时间戳 转换成 指定格式的日期 * 如果format为空,则默认格式为 * * @param times 时间戳 * @param format 日期格式 yyyy-MM-dd HH:mm:ss * @return */ @SuppressLint("SimpleDateFormat") public static String getDate(String times, String format) { return simpleDateFormat(format, new Date(stringToInt(times) * 1000L)); } @SuppressLint("SimpleDateFormat") public static String getDate(long times) { return simpleDateFormat("MM月dd日 HH:mm", new Date(times)); } /** * 得到昨天的日期 * * @param format 日期格式 yyyy-MM-dd HH:mm:ss * @return */ public static String getYestoryDate(String format) { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DATE, -1); return simpleDateFormat(format, calendar.getTime()); } /** * 视频时间 转换成 "mm:ss" * * @param milliseconds * @return */ public static String formatTime(long milliseconds) { String format = "mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(format); sdf.setTimeZone(TimeZone.getTimeZone("GMT+0")); String video_time = sdf.format(milliseconds); return video_time; } /** * "mm:ss" 转换成 视频时间 * * @param time * @return */ public static long formatSeconds(String time) { String format = "mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(format); sdf.setTimeZone(TimeZone.getTimeZone("GMT+0")); Date date; long times = 0; try { date = sdf.parse(time); long l = date.getTime(); times = l; Log.d("时间戳", times + ""); } catch (ParseException e) { e.printStackTrace(); } return times; } /** * 根据年 月 获取对应的月份 天数 */ public static int getDaysByYearMonth(int year, int month) { Calendar a = Calendar.getInstance(); a.set(Calendar.YEAR, year); a.set(Calendar.MONTH, month - 1); a.set(Calendar.DATE, 1); a.roll(Calendar.DATE, -1); int maxDate = a.get(Calendar.DATE); return maxDate; } /** * 判断当前日期是星期几 * * @param strDate 修要判断的时间 * @return dayForWeek 判断结果 * @Exception 发生异常<br> */ public static int stringForWeek(String strDate) throws Exception { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); c.setTime(format.parse(strDate)); if (c.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) { return 7; } else { return c.get(Calendar.DAY_OF_WEEK) - 1; } } /** * 判断当前日期是星期几 * * @param strDate 修要判断的时间 * @return dayForWeek 判断结果 * @Exception 发生异常<br> */ public static int stringForWeek(String strDate, SimpleDateFormat simpleDateFormat) throws Exception { Calendar c = Calendar.getInstance(); c.setTime(simpleDateFormat.parse(strDate)); if (c.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) { return 7; } else { return c.get(Calendar.DAY_OF_WEEK) - 1; } } }
[ "abliudede@163.com" ]
abliudede@163.com
140aa0830ba258e3019aa1694be26acff6916136
0dc3990c9ba73ddc0c8f2efa67b0dded5c3b9a28
/src/fraseinvertida/FraseInvertida.java
880e7bffb774a4b059fb9a3e44359601ac3281ae
[]
no_license
solka14/ejercicioFraseInvertida
f219698332a59d11c4ddd65d03b5ac3bb3a6b573
0a423306f6c2bfe85ba66ae2a5b863a14a0c87ad
refs/heads/master
2020-04-04T00:19:24.567718
2018-11-01T01:55:05
2018-11-01T01:55:05
155,646,746
0
0
null
null
null
null
UTF-8
Java
false
false
879
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 fraseinvertida; import java.util.Scanner; /** * * @author karen */ public class FraseInvertida { /** * @param args the command line arguments */ public void invertirCadena(){ Scanner scan= new Scanner(System.in); System.out.println("Ingrese frase"); String frase= scan.nextLine(); String fraseInvertida=""; for (int i=frase.length()-1; i>=0; i--) fraseInvertida = fraseInvertida + frase.charAt(i); System.out.println(fraseInvertida); } public static void main(String[] args) { FraseInvertida obj= new FraseInvertida(); obj.invertirCadena(); } }
[ "karen@LAPTOP-JUOMOI8O.home" ]
karen@LAPTOP-JUOMOI8O.home
a2bdfb1d70a17b0ec98270f0da36205a46dd6586
21fd3e2805671160236045899ef3e51c4c139a67
/Window/src/com/teksystems/windowSample/MyWindow.java
fc6a0ac32ea16ca4da09d6b7a529d94b33df1c63
[]
no_license
ayunas/java
34898e3c7b15237e4e57a7c026c3e947df1834d5
28f32f4ed9cc08efe6c0dbe6af8de0f4b48cc308
refs/heads/master
2021-05-23T13:10:58.396116
2020-06-15T11:30:17
2020-06-15T11:30:17
253,302,309
0
0
null
2020-10-13T22:36:16
2020-04-05T18:19:32
Java
UTF-8
Java
false
false
921
java
package com.teksystems.windowSample; //awt = abstract window toolkit import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class MyWindow extends Frame { public MyWindow(String title) { super(title); super.setSize(500,140); addWindowListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { super.windowClosed(e); System.exit(0); } }); } @Override public void paint(Graphics g) { super.paint(g); Font sansSerifLarge = new Font("SansSerif", Font.BOLD, 18); Font sansSerifSmall = new Font("SansSerif", Font.BOLD, 12); g.setFont(sansSerifLarge); g.drawString("The Complete Java Developer Course",60,60); g.setFont(sansSerifSmall); g.drawString("By Tim Buchalka",60,100); } }
[ "ayunas@agc02mq5ajfd56.fios-router.home" ]
ayunas@agc02mq5ajfd56.fios-router.home
9421ceb842b0c0df6e993bf552291ebefb341ccf
bd03e0af73a36d54bd01e8f56e497992338c83b9
/src/main/java/projeto/api/rest/repository/UsuarioRepository.java
0b8064294b4344c2092525afb5fcc65efbba1b37
[]
no_license
renato-penna/projetospringrestapi
940468848ae8f4eea44d0fc7384a6bf42765888d
bcf3165987f1cb6009c026de306cf668804e2962
refs/heads/master
2022-09-20T15:54:32.290588
2020-04-06T03:19:53
2020-04-06T03:19:53
253,973,102
0
0
null
2022-09-08T01:08:06
2020-04-08T03:13:34
Java
UTF-8
Java
false
false
2,011
java
package projeto.api.rest.repository; import java.util.List; import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import projeto.api.rest.model.Usuario; @Repository public interface UsuarioRepository extends JpaRepository<Usuario, Long> { @Transactional @Query("update Usuario u set u.login=?2 where u.id = ?1") public void atualizarById(Long id, String login); @Query("select u from Usuario u where u.login = ?1") Usuario findUserByLogin(String login); @Query("select u from Usuario u where u.nome like %?1%") List<Usuario> findUserByNameContainingIgnoreCase(String nome); @Query(value = "select constraint_name from information_schema.constraint_column_usage where table_name = 'usuarios_role' and column_name = 'role_id' and constraint_name <> 'unique_role_user';", nativeQuery = true) String consultaConstraintRole(); @Transactional @Modifying @Query(value = "insert into usuarios_role (usuario_id, role_id) values (?1, (select id from role where nome_role = 'ROLE_USER'));", nativeQuery = true) public void insereAcessoRolePadrao(Long usuario_id); default public Page<Usuario> findUserByNamePage(String nome, PageRequest pageRequest) { Usuario usuario = new Usuario(); usuario.setNome(nome); /* configurando para trabalhar com nome e paginacao */ ExampleMatcher exampleMatcher = ExampleMatcher.matchingAny().withMatcher("nome", ExampleMatcher.GenericPropertyMatchers.contains().ignoreCase()); Example<Usuario> example = Example.of(usuario, exampleMatcher); Page<Usuario> page = findAll(example, pageRequest); return page; } }
[ "roberto.murion@hotmail.com" ]
roberto.murion@hotmail.com
83e3c450f839cab82a0e4bebbde2999d31c2f934
86ec842e1496007f6324fa8e7f720916f5ca7d8f
/eventservice/src/main/java/io/pivotal/data/eventservice/App.java
a31aed0a1e4ec43944228866f265bcc31f8911ed
[]
no_license
search4soumya/Realtime-Streaming-DataMicroservices-AppMicroservices
8f5b41fd750fd690a4edc30f35a1568c8af5ee42
a50eff54f489ebf1b006ae186a3959c56d4849f3
refs/heads/master
2023-03-17T03:47:27.729691
2016-10-12T09:15:22
2016-10-12T09:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
627
java
package io.pivotal.data.eventservice; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.Profile; import org.springframework.test.context.ActiveProfiles; /** * Created by cq on 17/9/15. */ @SpringBootApplication @ActiveProfiles @EnableDiscoveryClient public class App { public static void main(String[] args) { SpringApplication.run(App.class, args); } }
[ "kgshukla@yahoo.com" ]
kgshukla@yahoo.com
111e85dbb6779619fbab3fb35daf8061f5db65ca
5a959164902dad87f927d040cb4b243d39b8ebe3
/qafe-core/src/main/java/com/qualogy/qafe/bind/util/Validator.java
24191a1ba2f7a1e889a6cafd9ee912c53f10ff7b
[ "Apache-2.0" ]
permissive
JustusM/qafe-platform
0c8bc824d1faaa6021bc0742f26733bf78408606
0ef3b3d1539bcab16ecd6bfe5485d727606fecf1
refs/heads/master
2021-01-15T11:38:04.044561
2014-09-25T09:20:38
2014-09-25T09:20:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,642
java
/** * Copyright 2008-2014 Qualogy Solutions B.V. * * 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.qualogy.qafe.bind.util; import java.util.Iterator; import java.util.List; import com.qualogy.qafe.bind.Validatable; import com.qualogy.qafe.bind.ValidationException; public class Validator { public final static String BIND_PACKAGE_PRECEDER = "com.qualogy.qafe.bind"; /** * method which performs validation on the given * object and its members recursivly (iow the members of the members, etc.) * @param object * @throws ValidationException - thrown by a validatable in the given GenesisFramework * @throws IllegalArgumentException when object is null */ public static void validate(Object object) throws ValidationException{ if (object == null) throw new IllegalArgumentException("obj is null"); List validatables = InterfaceScanner.scan(object, Validatable.class, BIND_PACKAGE_PRECEDER); for (Iterator iter = validatables.iterator(); iter.hasNext();) { Validatable v = (Validatable) iter.next(); v.validate(); } } }
[ "rkha@f87ad13a-6d31-43dd-9311-282d20640c02" ]
rkha@f87ad13a-6d31-43dd-9311-282d20640c02
f3e10f2c161024aebad4eec10046bae523a94ae2
b466633401875ae4b5e95c2f203112a737862b65
/service/service_yiqing/src/main/java/top/weidaboy/yiqing/model/ProvincePO.java
120be97a951b803bd1609ca8d38cc15e77640328
[]
no_license
VINDA-98/yiqing
fed979b8aae96c3eb008516383f0c5d9717885e4
2b4e9fd94a58b1f28716df34e19b3b64a5919619
refs/heads/master
2023-06-09T01:58:44.989173
2023-05-30T03:51:29
2023-05-30T03:51:29
329,188,957
0
1
null
null
null
null
UTF-8
Java
false
false
661
java
package top.weidaboy.yiqing.model; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; /** * province * @author */ @Data @NoArgsConstructor @AllArgsConstructor @Builder public class ProvincePO implements Serializable { private Integer id; private Date date; private String provinceshortname; private Integer currentconfirmedcount; private Integer confirmedcount; private Integer suspectedcount; private Integer curedcount; private Integer deadcount; private static final long serialVersionUID = 1L; }
[ "760319460@email.com" ]
760319460@email.com
11d15a93a4b63f3bc834fccd6c8abb68df3ac1dd
ff8a6e3b1c673d01cdb381ed104bfadeaaf8e7f8
/test01/src/bitcamp/pms/controller/AuthController.java
7a061648cd1dac255d2e7f66d294e9d84239d02c
[]
no_license
kyeonghunmin/project02
a70a9575bb76d6efb437c756547473f4c3b0555e
138a63fefe710565079d2cbcf2d2762d6a3c86f1
refs/heads/master
2021-01-01T05:12:54.904324
2016-04-21T10:26:13
2016-04-21T10:26:13
56,735,443
0
0
null
null
null
null
UTF-8
Java
false
false
4,682
java
package bitcamp.pms.controller; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; import bitcamp.pms.annotation.Controller; import bitcamp.pms.annotation.RequestMapping; import bitcamp.pms.dao.MemberDao; import bitcamp.pms.domain.Member; import bitcamp.pms.util.CommandUtil; import bitcamp.pms.util.Session; @Controller public class AuthController { Scanner keyScan; MemberDao memberDao; Session session; public void setScanner(Scanner keyScan) { this.keyScan = keyScan; } public void setMemberDao(MemberDao memberDao) { this.memberDao = memberDao; } public void setSession(Session session) { this.session = session; } @RequestMapping("unsubscribe") public void unsubscribe(Session se) { if (CommandUtil.confirm(keyScan, "정말 탈퇴하시겠습니까?")) { try { Member loginUser = (Member)se.getAttribute("loginUser"); memberDao.delete(loginUser.getIno()); System.out.println("회원 정보를 삭제하였습니다. 안녕히 가세요."); } catch (Exception e) { System.out.println("데이터를 저장하는데 실패했습니다."); } } } public void service() { String input = null; while (true) { System.out.println("1) 로그인"); System.out.println("2) 회원가입"); System.out.println("9) 종료"); System.out.print("선택? "); input = keyScan.nextLine(); switch (input) { case "1": if (doLogin()) { return; } break; case "2": doSignUp(); break; case "9": System.out.println("안녕히가세요"); System.exit(0); break; default: System.out.println("올바르지 않은 번호입니다."); } } } private void doSignUp() { Member member = new Member(); System.out.print("이름: "); member.setName(keyScan.nextLine()); member.setAge(0); member.setGender(null); member.setStep(null); String value = null; while (true) { System.out.print("이메일: "); value = keyScan.nextLine(); if (value.matches("[a-zA-Z][\\w\\.]*@([\\w]+\\.)+[a-zA-Z]{2,}")) break; System.out.println("이메일 형식에 맞지 않습니다. 예) aaa.aaa@bbb.com"); } member.setEmail(value); String regex = null; Pattern pattern = null; Matcher matcher = null; while (true) { System.out.print("암호: "); value = keyScan.nextLine(); if (value.length() < 4 || value.length() > 10) { System.out.println("암호는 4 ~ 10자 까지만 가능합니다."); continue; } regex = String.format( "(?=.*\\d)(?=.*[a-zA-Z])(?=.*[!@?])[0-9a-zA-Z!@?]{%d}", value.length()); pattern = Pattern.compile(regex); matcher = pattern.matcher(value); if (matcher.find()) { break; } System.out.println( "최소 알파벳1개, 숫자1개, 특수문자(?,!,@)1개를 반드시 포함해야 합니다."); } member.setPassword(value); while (true) { System.out.print("전화: "); value = keyScan.nextLine(); if (value.matches("(\\d{2,4}-)?\\d{3,4}-\\d{4}")) break; System.out.println("전화 형식에 맞지 않습니다. 예) 02-123-1234"); } member.setTel(value); try { memberDao.insert(member); System.out.println("회원 가입되었습니다."); } catch (Exception e) { System.out.println("회원 가입에 실패했습니다."); } } private boolean doLogin() { System.out.print("이메일: "); String email = keyScan.nextLine(); System.out.print("암호: "); String password = keyScan.nextLine(); Member member = memberDao.selectOneByEmail(email); if (member == null) { System.out.println("등록되지 않은 사용자입니다."); return false; } else if (!member.getPassword().equals(password)) { System.out.println("암호가 맞지 않습니다."); return false; } // 로그인 성공한 회원 정보를 세션에 보관한다. // why? 다른 컨틀롤러가 사용할 수 있도록! session.setAttribute("loginUser", member); System.out.printf("환영합니다. %s님!\n", member.getName()); return true; } }
[ "alsrudgns88@naver.com" ]
alsrudgns88@naver.com
447b3bd2c800f08d8a8c1fd1284c2e8d8a37bc79
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_da48c008d6231fa90cef3accc5906f66c956c5ad/DryRunCacheListener/33_da48c008d6231fa90cef3accc5906f66c956c5ad_DryRunCacheListener_s.java
433a217f6059b1f4d194d3c16b7f799bec2e5ef3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,966
java
/* * SonarQube, open source software quality management tool. * Copyright (C) 2008-2013 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube 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 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.server.platform; import org.sonar.api.config.SettingsChangeHandler; import org.sonar.core.persistence.DryRunDatabaseFactory; import org.sonar.core.resource.ResourceDao; import org.sonar.core.resource.ResourceDto; public class DryRunCacheListener implements SettingsChangeHandler { private final PersistentSettings settings; private final ResourceDao resourceDao; public DryRunCacheListener(PersistentSettings settings, ResourceDao resourceDao) { this.settings = settings; this.resourceDao = resourceDao; } @Override public void onChange(SettingsChange change) { if (change.isGlobal()) { settings.saveProperty(DryRunDatabaseFactory.SONAR_DRY_RUN_CACHE_LAST_UPDATE_KEY, String.valueOf(System.nanoTime())); } else if (change.componentKey() != null) { ResourceDto rootProject = resourceDao.getRootProjectByComponentKey(change.componentKey()); settings.saveProperty(DryRunDatabaseFactory.getCacheLastUpdateKey(rootProject.getId()), String.valueOf(System.nanoTime())); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c185bcbecebaacd9344ff8ce684992bcca750644
94d035d0cd604607333a0f1cffb81cf82accbf19
/src/main/java/com/fpt/edu/common/request_queue_simulate/Message.java
4fc8828b974c0943c59178d1cc6022e0ecd0db6a
[]
no_license
tuhuynh27/legacy-system
94837cea4e80c3ff5d8df41b583620507026ea70
3ae54e1c4b2271732ffbfb06b036b3a5657cdb3b
refs/heads/master
2022-02-18T19:35:33.924710
2019-07-31T09:59:12
2019-07-31T09:59:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package com.fpt.edu.common.request_queue_simulate; public class Message { private String action; private Object message; public Object getMessage() { return message; } public void setMessage(Object message) { this.message = message; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } }
[ "huynhminhtufu@gmail.com" ]
huynhminhtufu@gmail.com
fb818ca2c82dcd09ed6c45eac28e6f546f002c54
158c48d1a4056e7e9a2e64206a00cf16d8304bb1
/addons/common/cloudevents/utils/src/test/java/org/kie/kogito/cloudevents/extension/KogitoProcessExtensionTest.java
2dad346ef7808eefcea5fa046022009db3a89472
[ "Apache-2.0" ]
permissive
Kevin-Mok/kogito-runtimes
6b5b4c721298a0065398d5a0c1e619bcc4f5f382
07bd4c9f75c5f3ef32e8e5772737204caaf90999
refs/heads/master
2023-06-10T03:07:54.285264
2021-06-21T19:17:35
2021-06-21T19:17:35
273,061,193
0
1
Apache-2.0
2020-08-31T20:58:07
2020-06-17T19:27:33
Java
UTF-8
Java
false
false
3,206
java
/* * Copyright 2020 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.kogito.cloudevents.extension; import java.net.URI; import java.util.UUID; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.kie.kogito.event.CloudEventExtensionConstants; import io.cloudevents.CloudEvent; import io.cloudevents.core.builder.CloudEventBuilder; import io.cloudevents.core.provider.ExtensionProvider; import static org.assertj.core.api.Assertions.assertThat; class KogitoProcessExtensionTest { @BeforeAll static void setupTest() { ExtensionProvider.getInstance().registerExtension(KogitoProcessExtension.class, KogitoProcessExtension::new); } @Test void verifyKogitoExtensionCanBeRead() { final KogitoProcessExtension kpe = new KogitoProcessExtension(); kpe.readFrom(getExampleCloudEvent()); assertThat(kpe.getValue(CloudEventExtensionConstants.PROCESS_REFERENCE_ID)).isNotNull().isInstanceOf(String.class).isEqualTo("12345"); assertThat(kpe.getValue(CloudEventExtensionConstants.PROCESS_ID)).isNotNull().isInstanceOf(String.class).isEqualTo("super_process"); assertThat((String) kpe.getValue(CloudEventExtensionConstants.PROCESS_INSTANCE_ID)).isBlank(); assertThat((String) kpe.getValue(CloudEventExtensionConstants.PROCESS_INSTANCE_STATE)).isBlank(); assertThat((String) kpe.getValue(CloudEventExtensionConstants.PROCESS_ROOT_PROCESS_INSTANCE_ID)).isBlank(); assertThat((String) kpe.getValue(CloudEventExtensionConstants.PROCESS_ROOT_PROCESS_ID)).isBlank(); assertThat((String) kpe.getValue(CloudEventExtensionConstants.PROCESS_PARENT_PROCESS_INSTANCE_ID)).isBlank(); assertThat((String) kpe.getValue(CloudEventExtensionConstants.ADDONS)).isBlank(); } @Test void verifyKeysAreSet() { final KogitoProcessExtension kpe = ExtensionProvider.getInstance().parseExtension(KogitoProcessExtension.class, getExampleCloudEvent()); assertThat(kpe).isNotNull(); assertThat(kpe.getKeys()).isNotNull(); assertThat(kpe.getKeys()).isNotEmpty(); } private CloudEvent getExampleCloudEvent() { return CloudEventBuilder.v1() .withId(UUID.randomUUID().toString()) .withType("example.demo") .withSource(URI.create("http://example.com")) .withData("application/json", "{}".getBytes()) .withExtension(CloudEventExtensionConstants.PROCESS_REFERENCE_ID, "12345") .withExtension(CloudEventExtensionConstants.PROCESS_ID, "super_process") .build(); } }
[ "noreply@github.com" ]
noreply@github.com
83d9f9cc3af5036cdf978ad9947f40af803e8c5a
afc93a210c5a87dfad0ebfa5f559bf872f6625e5
/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/UserSessionData.java
e53d4911d185952fbeeca876760ce7ccd6362a8f
[ "Apache-2.0" ]
permissive
Chuhaa/carbon-identity-framework
d1f82ed1c385555304720d99de03ebc8dbb4cdb8
c8c3b2269b01c273274f29815b49e7180a53292b
refs/heads/master
2020-04-01T16:43:56.439357
2018-12-06T14:03:30
2018-12-06T14:03:30
151,404,712
0
0
null
2018-10-03T11:51:48
2018-10-03T11:51:48
null
UTF-8
Java
false
false
1,349
java
package org.wso2.carbon.identity.application.authentication.framework.model; public class UserSessionData { public UserSessionData(){} public UserSessionData(String appId,String subject){ this.appId=appId; this.subject=subject; } private String subject; private String appId; private String userAgent; private String ip; private String loginTime; private String lastAccessTime; public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getUserAgent() { return userAgent; } public void setUserAgent(String userAgent) { this.userAgent = userAgent; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getLoginTime() { return loginTime; } public void setLoginTime(String loginTime) { this.loginTime = loginTime; } public String getLastAccessTime() { return lastAccessTime; } public void setLastAccessTime(String lastAccessTime) { this.lastAccessTime = lastAccessTime; } }
[ "chuhaashanan@yhoo.com" ]
chuhaashanan@yhoo.com
267c22e5ceb66c08e58890d1215ab49fa71e9964
952dc09c3e77016f4991d8b2297de32b3e3b45d8
/apps/bfd-server/bfd-server-war/src/main/java/gov/cms/bfd/server/war/r4/providers/R4EobSamhsaMatcher.java
236cfa977bdc63b2b1da1511e192025828ac5e2c
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
CMSgov/beneficiary-fhir-data
1f3bd5ff9171975bc77e1a4b6971222342bb3bd9
0d170907736c5f957b7545ae26b12ba16e0c2550
refs/heads/master
2023-08-08T12:53:42.348530
2023-08-07T15:27:15
2023-08-07T15:27:15
203,852,942
47
34
NOASSERTION
2023-09-14T18:25:26
2019-08-22T18:41:16
Java
UTF-8
Java
false
false
3,608
java
package gov.cms.bfd.server.war.r4.providers; import gov.cms.bfd.model.codebook.data.CcwCodebookVariable; import gov.cms.bfd.server.war.adapters.CodeableConcept; import gov.cms.bfd.server.war.adapters.Coding; import gov.cms.bfd.server.war.adapters.r4.ExplanationOfBenefitAdapter; import gov.cms.bfd.server.war.commons.AbstractSamhsaMatcher; import gov.cms.bfd.server.war.commons.CCWUtils; import gov.cms.bfd.server.war.commons.TransformerConstants; import gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException; import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; import org.hl7.fhir.r4.model.ExplanationOfBenefit; import org.springframework.stereotype.Component; /** * A {@link Predicate} that, when <code>true</code>, indicates that an {@link ExplanationOfBenefit} * (i.e. claim) is SAMHSA-related. * * <p>See <code>/bluebutton-data-server.git/dev/design-samhsa-filtering.md</code> for details on the * design of this feature. * * <p>This class is designed to be thread-safe, as it's expensive to construct and so should be used * as a singleton. */ @Component public final class R4EobSamhsaMatcher extends AbstractSamhsaMatcher<ExplanationOfBenefit> { /** Valid system url for productOrService coding. */ private static final Set<String> HCPCS_SYSTEM = Set.of(TransformerConstants.CODING_SYSTEM_HCPCS); /** * Additional valid coding system URL for backwards-compatibility. See: * https://jira.cms.gov/browse/BFD-1345. */ private static final Set<String> BACKWARDS_COMPATIBLE_HCPCS_SYSTEM = Set.of( TransformerConstants.CODING_SYSTEM_HCPCS, CCWUtils.calculateVariableReferenceUrl(CcwCodebookVariable.HCPCS_CD)); /** {@inheritDoc} */ // S128 - Fallthrough is intentional. @SuppressWarnings("squid:S128") @Override public boolean test(ExplanationOfBenefit eob) { ExplanationOfBenefitAdapter adapter = new ExplanationOfBenefitAdapter(eob); ClaimTypeV2 claimType = TransformerUtilsV2.getClaimType(eob); boolean containsSamhsa = false; switch (claimType) { case INPATIENT: case OUTPATIENT: case SNF: containsSamhsa = containsSamhsaIcdProcedureCode(adapter.getProcedure()); case CARRIER: case DME: case HHA: case HOSPICE: containsSamhsa = containsSamhsa || containsSamhsaIcdDiagnosisCode(adapter.getDiagnosis()) || containsSamhsaLineItem(adapter.getItem()); case PDE: // There are no SAMHSA fields in PDE claims break; default: throw new BadCodeMonkeyException("Unsupported claim type: " + claimType); } return containsSamhsa; } /** * Checks if the given {@link CodeableConcept} contains only known coding systems. * * <p>For v2 FHIR resources, we include backwards compatability for the * https://bluebutton.cms.gov/resources/variables/hcpcs_cd system. * * @param procedureConcept the procedure {@link CodeableConcept} to check * @return <code>true</code> if the specified procedure {@link CodeableConcept} contains at least * one {@link Coding} and only contains {@link Coding}s that have known coding systems, <code> * false</code> otherwise */ @Override protected boolean containsOnlyKnownSystems(CodeableConcept procedureConcept) { Set<String> codingSystems = procedureConcept.getCoding().stream().map(Coding::getSystem).collect(Collectors.toSet()); return codingSystems.equals(HCPCS_SYSTEM) || codingSystems.equals(BACKWARDS_COMPATIBLE_HCPCS_SYSTEM); } }
[ "noreply@github.com" ]
noreply@github.com
d4413399748b262e5f8addad743904639742287d
a0c9161ea52ceee7d372f09fe0a24108e2b7bd2a
/src/problemsolving/Maps.java
46ffbe03f5b19b608f7ba5bea3acdfe1e382f88e
[]
no_license
mestizoLopez/problem-solving
fab2df5f6b2d2cfe5e17b5520803c8627381bb93
5f090e94f92c5a522c33d3afdb40455668940aaf
refs/heads/master
2021-01-07T11:22:04.692016
2020-02-19T16:57:22
2020-02-19T16:57:22
241,655,826
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package problemsolving; import java.util.HashMap; import java.util.Map; public class Maps { public static void main(String[] args) { Map<String,Integer> map = new HashMap(); map.put("a",2); map.put("n",1); Map<String,Integer> map1 = new HashMap(); map1.put("a",2); map1.put("n",2); System.out.println(map.equals(map1)); } }
[ "ing.javierlg@gmail.com" ]
ing.javierlg@gmail.com
0a86cce12fb4f7ade4fe1d55c67579b28660e89f
3d7390c53b0e36b0bba0928582437896bd0bd400
/application-java/src/main/java/iruiz/app/businesscase/GetSurveysBusinessCase.java
7681157be809a27c33023aebbb7d40dcb4ecfbc8
[]
no_license
varavan/backend-test
7dc0d02d1930595b2471981b23369c850323e2eb
1fc41f990d79024a49edb3e97023ea9569936c6a
refs/heads/master
2021-06-09T12:29:18.902745
2016-11-09T19:23:40
2016-11-09T19:23:40
63,000,129
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package iruiz.app.businesscase; import java.util.ArrayList; import java.util.Iterator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import iruiz.app.dto.SurveyDto; import iruiz.app.factory.SurveyDtoFactory; import iruiz.survey.domain.model.Survey; import iruiz.survey.domain.service.SurveyService; @Component public class GetSurveysBusinessCase { private SurveyService surveyService; private SurveyDtoFactory surveyDtoFactory; @Autowired public void injectSurveyService(SurveyService surveyService){ this.surveyService = surveyService; } @Autowired public void injectSurveyDtoFactory(SurveyDtoFactory surveyDtoFactory){ this.surveyDtoFactory = surveyDtoFactory; } public ArrayList<SurveyDto> getSurveys(){ ArrayList<Survey> surveys = this.surveyService.getSurveys(); ArrayList<SurveyDto> surveysDto = new ArrayList<SurveyDto>(); for(Iterator<Survey> i = surveys.iterator(); i.hasNext(); ){ SurveyDto surveyDto = this.surveyDtoFactory.makeFromSurveyModel(i.next()); surveysDto.add(surveyDto); } return surveysDto; } }
[ "ivan.ruiz.delatorre@gmail.com" ]
ivan.ruiz.delatorre@gmail.com
dada8435f27aa95bfbee3279ca47cfbf51129e9b
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/teenmode/ui/SettingsTeenModeMainBizAcct$2.java
bd74cef3cb1df41df52fad614dd4f592342bac13
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,241
java
package com.tencent.mm.plugin.teenmode.ui; import android.view.View; import android.view.View.OnClickListener; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.hellhoundlib.a.a; import com.tencent.mm.hellhoundlib.b.b; final class SettingsTeenModeMainBizAcct$2 implements View.OnClickListener { SettingsTeenModeMainBizAcct$2(SettingsTeenModeMainBizAcct paramSettingsTeenModeMainBizAcct) {} public final void onClick(View paramView) { AppMethodBeat.i(279002); b localb = new b(); localb.cH(paramView); a.c("com/tencent/mm/plugin/teenmode/ui/SettingsTeenModeMainBizAcct$2", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, localb.aYj()); SettingsTeenModeMainBizAcct.a(this.TaU, 0); SettingsTeenModeMainBizAcct.a(this.TaU); a.a(this, "com/tencent/mm/plugin/teenmode/ui/SettingsTeenModeMainBizAcct$2", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V"); AppMethodBeat.o(279002); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.teenmode.ui.SettingsTeenModeMainBizAcct.2 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
b963cebea40a692a9a31979fcac39990c168b36b
f92ef4d17785c8570c124116ce2cba1f5091503c
/src/test/java/javainterviewtopics/RepeatedMaxCharInString.java
e81bb43565dace0fe57223fc3f93f46a6a11e740
[]
no_license
Qhubaib/SeleniumJavaInterviewExtentReportsCode
ea27e9f2d987cdabade4277ed6a4315353e2ada6
8bdc23cbe0efbefc61b2e948c11086bd7f9c978f
refs/heads/master
2023-05-13T16:31:39.465293
2020-02-02T19:05:40
2020-02-02T19:05:40
228,238,642
0
0
null
2023-05-09T18:17:43
2019-12-15T19:24:08
Java
UTF-8
Java
false
false
907
java
package javainterviewtopics; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class RepeatedMaxCharInString { public static void main(String[] args) { String s = "syedahmedhhhd"; Map<Character,Integer> map = new LinkedHashMap<>(); char c = ' '; int num = 0; int count=0; for(int i=0;i<s.length();i++) { for(int j=0;j<s.length();j++) { if(s.charAt(i) == s.charAt(j)) { count++; } } String rep=String.valueOf(s.charAt(i)); map.put(s.charAt(i), count); s=s.replaceAll(rep, ""); count=0; i--; } System.out.println(map); Set<Entry<Character,Integer>> entry=map.entrySet(); for(Entry<Character,Integer> data:entry) { if(data.getValue()>num) { c = data.getKey(); num=data.getValue(); } } System.out.println("Maximum repeated character is: "+c); } }
[ "ahmed4india@gmail.com" ]
ahmed4india@gmail.com
119955956eb0ac39a0b109e6f4f61fd481dc3fd4
1b4cd0c1d3efcd388a41f4ef95d3670085dc9241
/Application/src/main/java/com/dai/trust/models/property/RrrLog.java
489647a68f7b0de42219d0d8c3b85edef387e8f3
[]
no_license
AlexanderSolovov/trust
e33636d7885bf87aa4805a692dd3c82706dad46f
1b3e7a31367515397dbf8ac40656c664635468d4
refs/heads/master
2022-03-08T10:45:27.354109
2019-07-24T11:35:58
2019-07-24T11:35:58
99,223,206
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package com.dai.trust.models.property; import com.dai.trust.models.AbstractLog; import javax.persistence.Column; import javax.persistence.Entity; @Entity public class RrrLog extends AbstractLog { @Column(name = "status_code") private String statusCode; public RrrLog(){ super(); } public String getStatusCode() { return statusCode; } public void setStatusCode(String statusCode) { this.statusCode = statusCode; } }
[ "a_solovov@yahoo.com" ]
a_solovov@yahoo.com
d032ad36f12f64921c3567137b0bdbe13a1b86c5
94ee9a4a3fcbb76e3165cd1e80876b7ff725e3a1
/PIM/standalone.gef/src/org/eclipse/gef/EditPartFactory.java
72b8014078c38f1c815a7d74bb73590dc0969f59
[ "MIT" ]
permissive
coconutpalm/dot.emacs
f385bfa9bcc63132055209f2fb51e57f48f5234f
6c8f16d06b697141376c1565e3f98a699873da04
refs/heads/master
2023-06-21T01:39:06.281158
2023-06-14T20:27:23
2023-06-14T20:27:23
13,232,581
4
2
null
2023-05-22T16:45:19
2013-10-01T02:05:12
Java
UTF-8
Java
false
false
1,386
java
/******************************************************************************* * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.gef; /** * A factory for creating new EditParts. {@link EditPartViewer EditPartViewers} * can be configured with an <code>EditPartFactory</code>. Whenever an * <code>EditPart</code> in that viewer needs to create another EditPart, it can * use the Viewer's factory. The factory is also used by the viewer whenever * {@link EditPartViewer#setContents(Object)} is called. * * @since 2.0 */ public interface EditPartFactory { /** * Creates a new EditPart given the specified <i>context</i> and * <i>model</i>. * * @param context * The context in which the EditPart is being created, such as * its parent. * @param model * the model of the EditPart being created * @return EditPart the new EditPart */ EditPart createEditPart(EditPart context, Object model); }
[ "djo@coconut-palm-software.com" ]
djo@coconut-palm-software.com
b3c682c46d8e0aecebdf93cccc1aac2c1fd78974
b556a852400fc85a64a5b1a9c7136ee96e92c03d
/src/main/java/pe/edu/unmsm/fisi/biblioteca/controller/admin/encargadoDeArea/AnioIngresoController.java
2c74a3b30bf82aa34ae31ca3a134d68963cdd681
[]
no_license
mariomace20/heroku
0ad7248c894814dfeb7c5df687ee82321c358c91
c6de5e3060b7755c382482db7432f2e81ad90773
refs/heads/master
2020-03-27T05:39:01.962188
2018-08-24T21:59:05
2018-08-24T21:59:05
146,037,250
0
0
null
null
null
null
ISO-8859-10
Java
false
false
1,901
java
package pe.edu.unmsm.fisi.biblioteca.controller.admin.encargadoDeArea; import java.sql.Time; import java.util.ArrayList; import java.util.Date; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.jayway.jsonpath.internal.function.numeric.Max; import java.util.List; import pe.edu.unmsm.fisi.biblioteca.beans.EstadoRecursoGrupal; import pe.edu.unmsm.fisi.biblioteca.beans.EstadoRecursoIndividual; import pe.edu.unmsm.fisi.biblioteca.model.AreaEstudio; import pe.edu.unmsm.fisi.biblioteca.model.Persona; import pe.edu.unmsm.fisi.biblioteca.model.Prestamo; import pe.edu.unmsm.fisi.biblioteca.model.Recurso; import pe.edu.unmsm.fisi.biblioteca.model.TipoRecurso; @Controller @RequestMapping("/siscae") public class AnioIngresoController { public static final String INICIO_VIEW = "content/admin/encargadoDeArea/anio"; @GetMapping("/ebiblioteca/aņoDeIngreso") public ModelAndView inicioBiblioteca(){ ModelAndView mav = new ModelAndView(INICIO_VIEW); AreaEstudio a = new AreaEstudio(1,"Biblioteca"); mav.addObject("areaestudio",a); mav.addObject("tipoUsuario", "EA"); return mav; } @GetMapping("/evideoteca/aņoDeIngreso") public ModelAndView inicioVideoteca(){ ModelAndView mav = new ModelAndView(INICIO_VIEW); AreaEstudio a = new AreaEstudio(2,"Videoteca"); mav.addObject("areaestudio",a); mav.addObject("tipoUsuario", "EA"); return mav; } @GetMapping("/earea_grupal/aņoDeIngreso") public ModelAndView inicioGrupal(){ ModelAndView mav = new ModelAndView(INICIO_VIEW); AreaEstudio a = new AreaEstudio(3,"Aula Grupal"); mav.addObject("areaestudio",a); mav.addObject("tipoUsuario", "EA"); return mav; } }
[ "mario.cortez1@unmsm.edu.pe" ]
mario.cortez1@unmsm.edu.pe
e4f42fd5c8fe2618e59566dbbca49bf046dbadc1
cb5fb09c5969dc660b23fa0c02ecc5d430301602
/Projetos/src/H-Assembler/Assembler/src/main/java/assembler/SymbolTable.java
341cf0e4995c5988614fbad8d78037fd1f3466e2
[ "Unlicense" ]
permissive
liciascl/Z01.1-Licia
3f079a100bb4c1369776ed2fd55846fecfd5d1bc
d44090b39b5893726906d5bc1eedf943ef626277
refs/heads/master
2020-04-12T04:22:38.539498
2019-01-23T13:17:06
2019-01-23T13:17:06
162,293,785
1
0
null
null
null
null
UTF-8
Java
false
false
1,309
java
/** * Curso: Elementos de Sistemas * Arquivo: SymbolTable.java */ package assembler; /** * Mantém uma tabela com a correspondência entre os rótulos simbólicos e endereços numéricos de memória. */ public class SymbolTable { /** * Cria a tabela de símbolos. */ public SymbolTable() { } /** * Insere uma entrada de um símbolo com seu endereço numérico na tabela de símbolos. * @param symbol símbolo a ser armazenado na tabela de símbolos. * @param address símbolo a ser armazenado na tabela de símbolos. */ public void addEntry(String symbol, int address) { } /** * Confere se o símbolo informado já foi inserido na tabela de símbolos. * @param symbol símbolo a ser procurado na tabela de símbolos. * @return Verdadeiro se símbolo está na tabela de símbolos, Falso se não está na tabela de símbolos. */ public Boolean contains(String symbol) { return null; } /** * Retorna o valor númerico associado a um símbolo já inserido na tabela de símbolos. * @param symbol símbolo a ser procurado na tabela de símbolos. * @return valor numérico associado ao símbolo procurado. */ public Integer getAddress(String symbol) { return null; } }
[ "rafael.corsi@insper.edu.br" ]
rafael.corsi@insper.edu.br
21352d3d3b79f9001a5acc916c13a73eb4b7d65a
412cda6c41618f97dfc91ce1900eb5c0583795bf
/app/src/main/java/com/ezhuang/common/CameraPreview.java
f7b429d0af7f606ecabaa896ad255307e860fd2a
[]
no_license
fishCoder/Ezhuang
60f7765591be9911f0acb7462a1e7c7c5d5aa5e9
3bb9edfb66bab7bab20dd8779d098bf9223909f4
refs/heads/master
2020-05-18T16:37:04.205565
2015-07-09T07:41:33
2015-07-09T07:41:33
33,600,023
1
0
null
null
null
null
UTF-8
Java
false
false
3,352
java
package com.ezhuang.common; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.Camera; import android.util.AttributeSet; import android.util.Log; import android.view.Display; import android.view.Surface; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.WindowManager; import java.util.List; /** * Created by chaochen on 15/1/12. */ public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback { public static String TAG = "CameraPreview"; private SurfaceHolder mHolder; private Camera mCamera; public CameraPreview(Context context, AttributeSet attrs) { super(context, attrs); mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceCreated(SurfaceHolder holder) { Log.d(TAG, "created"); } private boolean checkCameraHardware(Context context) { return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); } public Camera getCameraInstance() { try { mCamera = Camera.open(); // attempt to get a Camera instance Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); if (display.getRotation() == Surface.ROTATION_0) { mCamera.setDisplayOrientation(90); } else if (display.getRotation() == Surface.ROTATION_270) { mCamera.setDisplayOrientation(180); } } catch (Exception e) { // Camera is not available (in use or does not exist) } return mCamera; // returns null if camera is unavailable } public void surfaceDestroyed(SurfaceHolder holder) { stopAndReleaseCamera(); Log.d(TAG, "destroy"); } public void stopAndReleaseCamera() { try { if (mCamera != null) { mCamera.stopPreview(); mCamera.release(); mCamera = null; } } catch (Exception e) { } } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { try { Log.d(TAG, "surfaceChanged"); if (checkCameraHardware(getContext())) { mCamera = getCameraInstance(); Camera.Parameters parameters = mCamera.getParameters(); List<Camera.Size> sizes = parameters.getSupportedPreviewSizes(); Camera.Size firstSize = sizes.get(0); Camera.Size lastSize = sizes.get(sizes.size() - 1); Camera.Size minSize = firstSize.width < lastSize.width ? firstSize : lastSize; parameters.setPreviewSize(minSize.width, minSize.height); mCamera.setParameters(parameters); mCamera.setPreviewDisplay(holder); mCamera.startPreview(); } if (mHolder.getSurface() == null) { return; } mCamera.stopPreview(); mCamera.setPreviewDisplay(mHolder); mCamera.startPreview(); } catch (Exception e) { Log.d(TAG, "Error starting camera preview: " + e.getMessage()); } } }
[ "flb1019@gmail.com" ]
flb1019@gmail.com
0175effd558a37b08ab656f32c6e566b1083e689
18de98079819eaadc4421f645814323afe0a4f0b
/springboot_learn/springboot2_mongodb/src/main/java/com/dalaoyang/model/User.java
f9f9d7b2d4d273ba95c50978da274d282cb158a5
[]
no_license
startfire/dalaoyang
3263ada30dd7e1d0f65ad8ebede23114456981da
cfd635f00b6065e3c46de73b2d6c28b14148a0b7
refs/heads/master
2023-07-25T13:27:02.098605
2019-09-25T08:03:14
2019-09-25T08:03:14
210,788,539
1
2
null
null
null
null
UTF-8
Java
false
false
895
java
package com.dalaoyang.model; /** * @author dalaoyang * @Description * @project springboot_learn * @package com.dalaoyang.model * @email yangyang@dalaoyang.cn * @date 2018/9/1 */ public class User { private Long id; private String userName; private String passWord; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } public User(Long id, String userName, String passWord) { this.id = id; this.userName = userName; this.passWord = passWord; } public User() { } }
[ "fangjian@yixin.im" ]
fangjian@yixin.im
1c8c5cf08c2eaa89aa36d98a9713febd5d89b3f2
7893917a3968d0cc7d713e4b4b77e5e6c0883749
/CoffeeType.java
0592a6fd62773ed88cdb9742fa4e92b1fa26c67f
[]
no_license
GeriTopore/Coffee-Machine
8e4933296c69feeba9084d5ec870c783cc9ae03f
759677d1c30407144dd5e84b909ec2cd59a502b7
refs/heads/master
2022-06-19T04:20:43.959205
2020-05-04T17:06:14
2020-05-04T17:06:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
52
java
package machine; public class CoffeeType { }
[ "noreply@github.com" ]
noreply@github.com
42db27fe098dc20545b0e7d4d8100a86280c45a2
10be8d2d94c293eefe9476415d7b65ed7a526e68
/EnterpriseServer/src/models/SfGuardPermission.java
2ed947bfc496cce87154bd2fa9f120439d9c299e
[]
no_license
jaspertomas/Enterprise
52da6126549516336ce625e95e81429dddf40cab
79aaef4161ae98461e21bb6f3efddff3b07c82a9
refs/heads/master
2021-01-22T02:34:19.442773
2014-02-18T16:34:42
2014-02-18T16:34:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,413
java
package models; import java.math.BigDecimal; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Date; import java.sql.Timestamp; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; import utils.MySqlDBHelper; public class SfGuardPermission { //------------FIELDS----------- public static final String tablename="sf_guard_permission"; //field names public static String[] fields={ "id" ,"name" ,"description" ,"created_at" ,"updated_at" }; //field types public static String[] fieldtypes={ "bigint(20)" ,"varchar(255)" ,"text" ,"datetime" ,"datetime" }; //----------------------- public Long id; public String name; public String description; public Timestamp created_at; public Timestamp updated_at; public SfGuardPermission() { } public SfGuardPermission(ResultSet rs) { try { id=rs.getLong("id"); name=rs.getString("name"); description=rs.getString("description"); created_at=rs.getTimestamp("created_at"); updated_at=rs.getTimestamp("updated_at"); } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); } } // public String getUuid() // { // return id.toString()+"-"; // } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Timestamp getCreatedAt() { return created_at; } public void setCreatedAt(Timestamp created_at) { this.created_at = created_at; } public Timestamp getUpdatedAt() { return updated_at; } public void setUpdatedAt(Timestamp updated_at) { this.updated_at = updated_at; } //database functions public ArrayList<String> implodeFieldValuesHelper(boolean withId) { ArrayList<String> values=new ArrayList<String>(); if(withId)values.add(id.toString()); //add values for each field here values.add(id.toString()); values.add(name); values.add(description); values.add(created_at.toString()); values.add(updated_at.toString()); return values; } public void delete() { SfGuardPermission.delete(this); } public void save() { if(id==null || id==0) SfGuardPermission.insert(this); else SfGuardPermission.update(this); } public String toString() { return id.toString(); } //-------------------------TABLE FUNCTIONS--------------------- //-----------getter functions---------- /* public static SfGuardPermission getByName(String name) { HashMap<Long,SfGuardPermission> map=select(" name = '"+name+"'"); for(SfGuardPermission item:map)return item; return null; } */ public static SfGuardPermission getById(Long id) { ArrayList<SfGuardPermission> map=select(" id = '"+id.toString()+"'"); for(SfGuardPermission item:map)return item; return null; } //-----------database functions-------------- public static void delete(Long id) { Connection conn=MySqlDBHelper.getInstance().getConnection(); Statement st = null; try { st = conn.createStatement(); st.executeUpdate("delete from "+tablename+" where id = '"+id.toString()+"';"); } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); } } public static void delete(SfGuardPermission item) { delete(item.getId()); } public static void insert(SfGuardPermission item) { Connection conn=MySqlDBHelper.getInstance().getConnection(); Statement st = null; boolean withid=false; try { st = conn.createStatement(); //for tables with integer primary key if(fieldtypes[0].contentEquals("integer"))withid=false; //for tables with varchar primary key else if(fieldtypes[0].contains("varchar"))withid=true; st.executeUpdate("INSERT INTO "+tablename+" ("+implodeFields(withid)+")VALUES ("+implodeValues(item, withid)+");"); } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); } } public static void update(SfGuardPermission item) { Connection conn=MySqlDBHelper.getInstance().getConnection(); Statement st = null; boolean withid=false; try { st = conn.createStatement(); st.executeUpdate("update "+tablename+" set "+implodeFieldsWithValues(item,false)+" where id = '"+item.getId().toString()+"';"); } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); } } public static Integer count(String conditions) { if(conditions.isEmpty())conditions = "1"; Connection conn=MySqlDBHelper.getInstance().getConnection(); Statement st = null; ResultSet rs = null; try { st = conn.createStatement(); rs = st.executeQuery("SELECT count(*) from "+tablename+" where "+conditions); while (rs.next()) { return rs.getInt(1); } } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); } return null; } public static ArrayList<SfGuardPermission> select(String conditions) { if(conditions.isEmpty())conditions = "1"; Connection conn=MySqlDBHelper.getInstance().getConnection(); Statement st = null; ResultSet rs = null; try { st = conn.createStatement(); rs = st.executeQuery("SELECT * from "+tablename+" where "+conditions); ArrayList<SfGuardPermission> items=new ArrayList<SfGuardPermission>(); while (rs.next()) { items.add(new SfGuardPermission(rs)); //items.put(rs.getLong("id"), new SfGuardPermission(rs)); } return items; } catch (SQLException ex) { Logger.getLogger(SfGuardPermission.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); return null; } } //-----------database helper functions-------------- public static String implodeValues(SfGuardPermission item,boolean withId) { ArrayList<String> values=item.implodeFieldValuesHelper(withId); String output=""; for(String value:values) { if(!output.isEmpty()) output+=","; output+="'"+value+"'"; } return output; } public static String implodeFields(boolean withId) { String output=""; for(String field:fields) { if(!withId && field.contentEquals("id"))continue; if(!output.isEmpty()) output+=","; output+=field; } return output; } public static String implodeFieldsWithValues(SfGuardPermission item,boolean withId) { ArrayList<String> values=item.implodeFieldValuesHelper(true);//get entire list of values; whether the id is included will be dealt with later. if(values.size()!=fields.length) { System.err.println("SfGuardPermission:implodeFieldsWithValues(): ERROR: values length does not match fields length"); } String output=""; for(int i=0;i<fields.length;i++) { if(!withId && fields[i].contentEquals("id"))continue; if(!output.isEmpty()) output+=","; output+=fields[i]+"='"+values.get(i)+"'"; } return output; } public static String implodeFieldsWithTypes() { String output=""; for(int i=0;i<fields.length;i++) { if(fields[i].contentEquals(fields[0]))//fields[0] being the primary key output+=fields[i]+" "+fieldtypes[i]+" PRIMARY KEY"; else output+=","+fields[i]+" "+fieldtypes[i]; } return output; } public static String createTable() { return "CREATE TABLE IF NOT EXISTS "+tablename+" ("+implodeFieldsWithTypes()+" );"; } public static String deleteTable() { return "DROP TABLE IF EXISTS "+tablename; } public static void main(String args[]) { String database="tmcprogram3"; String url = "jdbc:mysql://localhost:3306/"+database+"?zeroDateTimeBehavior=convertToNull"; String username="root"; String password = "password"; boolean result=MySqlDBHelper.init(url, username, password); ArrayList<SfGuardPermission> items=SfGuardPermission.select(""); for(SfGuardPermission item:items) { System.out.println(item); } System.out.println(SfGuardPermission.count("")); } }
[ "jaspertomas@gmail.com" ]
jaspertomas@gmail.com
64d72b1910e0f90d10f1203612e3475f4bea3f5a
8640f8045efe65119faebe1b8f48286995ffbbfc
/src/main/java/com/izibiz/billing/ws/FLAGVALUE.java
1166c4961dbe495de29953a8e2a375c6d651614b
[]
no_license
serdarsanu/izibiz-ws-client-springboot
fc556d7bc808d8e7fd25aee285ac1af31b794fd2
40cf1fa2ad84142b5d37e83cdba07e5009437aaf
refs/heads/master
2022-07-16T01:37:18.154425
2019-12-05T13:56:20
2019-12-05T13:56:20
226,103,051
1
0
null
2022-06-30T14:46:58
2019-12-05T12:59:29
Java
UTF-8
Java
false
false
1,134
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.11.13 at 11:06:13 AM EET // package com.izibiz.billing.ws; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for FLAG_VALUE. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="FLAG_VALUE"&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; * &lt;enumeration value="Y"/&gt; * &lt;enumeration value="N"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "FLAG_VALUE", namespace = "http://schemas.i2i.com/ei/common") @XmlEnum public enum FLAGVALUE { Y, N; public String value() { return name(); } public static FLAGVALUE fromValue(String v) { return valueOf(v); } }
[ "sanuserdar@gmail.com" ]
sanuserdar@gmail.com
07cbeee44d3f6b3d7520d8552965d0301f918549
c46735ffa207db347971060dbc40ebee92f4651d
/app/src/androidTest/java/com/example/android/testing/notes/notes/AppNavigationTest.java
d0a0d07cb25dbd784515b85ca198b16983b64c47
[ "Apache-2.0" ]
permissive
nataratafata/android-testing-step-1-5
15f21627469d4a14ed9d18ba557d1edc3d63a7e8
c457744cc5cf201b322f63000f153755b6f94b87
refs/heads/master
2020-04-13T13:16:26.939985
2018-12-26T23:15:55
2018-12-26T23:15:55
163,225,057
0
0
null
null
null
null
UTF-8
Java
false
false
3,753
java
/* * Copyright 2015, The Android Open Source Project * * 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.android.testing.notes.notes; import com.example.android.testing.notes.R; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import android.support.test.InstrumentationRegistry; import android.support.test.filters.LargeTest; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import android.support.v4.widget.DrawerLayout; import android.view.Gravity; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.contrib.DrawerActions.open; import static android.support.test.espresso.contrib.DrawerMatchers.isClosed; import static android.support.test.espresso.contrib.DrawerMatchers.isOpen; import static android.support.test.espresso.contrib.NavigationViewActions.navigateTo; import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withText; import static org.junit.Assert.fail; /** * Tests for the {@link DrawerLayout} layout component in {@link NotesActivity} which manages * navigation within the app. */ @RunWith(AndroidJUnit4.class) @LargeTest public class AppNavigationTest { /** * {@link ActivityTestRule} is a JUnit {@link Rule @Rule} to launch your activity under test. * * <p> * Rules are interceptors which are executed for each test method and are important building * blocks of Junit tests. */ @Rule public ActivityTestRule<NotesActivity> mActivityTestRule = new ActivityTestRule<>(NotesActivity.class); @Test public void clickOnStatisticsNavigationItem_ShowsStatisticsScreen() { // Open Drawer to click on navigation. onView(withId(R.id.drawer_layout)) .check(matches(isClosed(Gravity.LEFT))) // Left Drawer should be closed. .perform(open()); // Open Drawer // Start statistics screen. onView(withId(R.id.nav_view)) .perform(navigateTo(R.id.statistics_navigation_menu_item)); // Check that statistics Activity was opened. String expectedNoStatisticsText = InstrumentationRegistry.getTargetContext() .getString(R.string.no_statistics_available); onView(withId(R.id.no_statistics)).check(matches(withText(expectedNoStatisticsText))); } @Test public void clickOnAndroidHomeIcon_OpensNavigation() { // Check that left drawer is closed at startup onView(withId(R.id.drawer_layout)) .check(matches(isClosed(Gravity.LEFT))); // Left Drawer should be closed. // Open Drawer onView(withContentDescription("Navigate up")).perform(click()); // Check if drawer is open onView(withId(R.id.drawer_layout)) .check(matches(isOpen(Gravity.LEFT))); // Left drawer is open open. } }
[ "sherdonbrowns88@gmail.com" ]
sherdonbrowns88@gmail.com
b37bd3279e7449ea11cb0c49abccc5e0cc275d66
b04546db09f3ef3e6165da59d760705a9dc0bc14
/20180202/MyServer06.java
832330da3662ae30af12c557153bf20b6d745c26
[]
no_license
MachiCafe/170212
15a65a54a749a91ff4aff035bb6b3d2ccf26bd93
30b2e036f2551ad12d39fb1ab586bb1a9ea0c28c
refs/heads/master
2021-09-06T09:40:23.772566
2018-02-05T03:25:18
2018-02-05T03:25:18
111,863,046
1
0
null
2017-11-27T02:36:32
2017-11-24T01:19:11
Java
UTF-8
Java
false
false
974
java
import java.net.ServerSocket; import java.net.Socket; import java.net.InetAddress; import java.io.IOException; import java.io.OutputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.PrintWriter; public class MyServer06{ public static void main(String[] args) { Socket clientSock = null; ServerSocket servSock = null; InputStream is = null; OutputStream os = null; PrintWriter pw = null; try{ servSock = new ServerSocket(3999,100); while(true){ clientSock = servSock.accept(); is = clientSock.getInputStream(); os = clientSock.getOutputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); pw = new PrintWriter(os); String data = br.readLine(); pw.println(data); pw.flush(); } }catch(IOException e){ System.out.println(e); System.exit(1); } } }
[ "33139373+MachiCafe@users.noreply.github.com" ]
33139373+MachiCafe@users.noreply.github.com
bd03b5f79a7ed7f881c22270d4085ab123315477
753c444be617b72f3efd085b4e1891678ddeb69e
/src/FormTable.java
7a38ec0e5e2f0fe0c2a4250f80fd4bf67ae87fb3
[]
no_license
Razz565/kumar
a23169cb0d54b560ef2efbf44d3d81535150d6ec
375598651775579440f04515235bb874c4b846a0
refs/heads/master
2023-08-25T00:37:24.835783
2020-01-20T08:29:20
2020-01-20T08:29:20
425,700,274
0
0
null
null
null
null
UTF-8
Java
false
false
29
java
public class FormTable { }
[ "768970@cognizant.com" ]
768970@cognizant.com
c53e42cef659770721d1148c7803fcde53ad83ae
59e6dc1030446132fb451bd711d51afe0c222210
/components/stratos/org.wso2.carbon.stratos.cloud.controller/2.2.0/src/main/java/org/wso2/carbon/stratos/cloud/controller/util/CloudControllerUtil.java
64169b66849dff18d179194774b3cf24492ce1a3
[]
no_license
Alsan/turing-chunk07
2f7470b72cc50a567241252e0bd4f27adc987d6e
e9e947718e3844c07361797bd52d3d1391d9fb5e
refs/heads/master
2020-05-26T06:20:24.554039
2014-02-07T12:02:53
2014-02-07T12:02:53
38,284,349
0
1
null
null
null
null
UTF-8
Java
false
false
3,287
java
package org.wso2.carbon.stratos.cloud.controller.util; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import javax.xml.stream.XMLStreamException; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.util.AXIOMUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.stratos.cloud.controller.exception.CloudControllerException; public class CloudControllerUtil { private static final Log log = LogFactory.getLog(CloudControllerUtil.class); public static OMElement serviceCtxtToOMElement(ServiceContext ctxt) throws XMLStreamException{ String xml; xml = ctxt.toXml(); return AXIOMUtil.stringToOM(xml); } public static byte[] getBytesFromFile(String path) { try { return FileUtils.readFileToByteArray(new File(path)); } catch (IOException e) { handleException("Failed to read the file "+path, e); } return new byte[0]; } public static CartridgeInfo toCartridgeInfo(Cartridge cartridge) { CartridgeInfo carInfo = new CartridgeInfo(); carInfo.setType(cartridge.getType()); carInfo.setDisplayName(cartridge.getDisplayName()); carInfo.setDescription(cartridge.getDescription()); carInfo.setHostName(cartridge.getHostName()); carInfo.setDeploymentDirs(cartridge.getDeploymentDirs()); carInfo.setProvider(cartridge.getProvider()); carInfo.setVersion(cartridge.getVersion()); carInfo.setMultiTenant(cartridge.isMultiTenant()); carInfo.setBaseDir(cartridge.getBaseDir()); carInfo.setPortMappings(cartridge.getPortMappings() .toArray(new PortMapping[cartridge.getPortMappings() .size()])); carInfo.setAppTypes(cartridge.getAppTypeMappings() .toArray(new AppType[cartridge.getAppTypeMappings() .size()])); List<Property> propList = new ArrayList<Property>(); for (Iterator<?> iterator = cartridge.getProperties().entrySet().iterator(); iterator.hasNext();) { @SuppressWarnings("unchecked") Map.Entry<String, String> entry = (Entry<String, String>) iterator.next(); Property prop = new Property(entry.getKey(), entry.getValue()); propList.add(prop); } Property[] props = new Property[propList.size()]; carInfo.setProperties(propList.toArray(props)); return carInfo; } public static List<Object> getKeysFromValue(Map<?, ?> hm, Object value) { List<Object> list = new ArrayList<Object>(); for (Object o : hm.keySet()) { if (hm.get(o).equals(value)) { list.add(o); } } return list; } public static void sleep(long time){ try { Thread.sleep(time); } catch (InterruptedException ignore) {} } public static void handleException(String msg, Exception e){ log.error(msg, e); throw new CloudControllerException(msg, e); } public static void handleException(String msg){ log.error(msg); throw new CloudControllerException(msg); } }
[ "malaka@wso2.com" ]
malaka@wso2.com
7ce616fcc198de0c8e7f82cc749e7fdf5939ffbf
816dc74a830265de717fca6dc94f3460e6992fd4
/src/main/java/com/publicissapient/feecalculator/mapper/impl/FeeCalculatorMapperImpl.java
030e358a6464fb3b6ce80770b526a6c4dbbdef81
[]
no_license
DimpleShalini/feecalculator
1b24c0fad0bd03a76c4451d717d454ad5f6727b7
21be7dc06d779f29351fabc1fbc9010d54d2fc62
refs/heads/master
2020-12-22T02:31:29.754222
2020-01-28T03:01:47
2020-01-28T03:01:47
236,644,516
0
0
null
null
null
null
UTF-8
Java
false
false
2,926
java
package com.publicissapient.feecalculator.mapper.impl; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import org.springframework.stereotype.Service; import com.publicissapient.feecalculator.mapper.FeeCalculatorMapper; import com.publicissapient.feecalculator.vo.InputVO; import com.publicissapient.feecalculator.vo.SummaryReportVO; @Service public class FeeCalculatorMapperImpl implements FeeCalculatorMapper { @Override public List<InputVO> getTransactionVOFromWorkBook(File csvFile) throws FileNotFoundException, IOException { List<InputVO> inputVOList = new ArrayList<InputVO>(); BufferedReader csvReader = new BufferedReader(new FileReader("C:\\Users\\Anjali\\Input data.csv")); String row; int i = 0; while ((row = csvReader.readLine()) != null) { String[] data = row.split(","); if (data != null && i!=0) { InputVO inputVO = new InputVO(); if (data[0] != null) inputVO.setExternalTransactionId(data[0]); if (data[1] != null) inputVO.setClientId(data[1]); if (data[2] != null) inputVO.setSecurityId(data[2]); if (data[3] != null) inputVO.setTransactionType(data[3]); if (data[4] != null) { try { inputVO.setTransactionDate(new SimpleDateFormat("MM/dd/yyyy").parse(data[4])); } catch (ParseException e) { e.printStackTrace(); } } if (data[5] != null) inputVO.setMarkteValue(data[5]); if (data[6] != null) inputVO.setPriorityFlag(data[6]); inputVOList.add(inputVO); } i++; } csvReader.close(); return inputVOList; } @Override public SummaryReportVO getSummaryReportFromInputAndFee(InputVO inputVO, BigDecimal fee) { if(inputVO != null){ SummaryReportVO summaryReportVO = new SummaryReportVO(); summaryReportVO.setClientId(inputVO.getClientId()); summaryReportVO.setPriorityFlag(inputVO.getPriorityFlag()); summaryReportVO.setProcesingFee(fee); summaryReportVO.setTransactionDate(inputVO.getTransactionDate()); summaryReportVO.setTransactionType(inputVO.getTransactionType()); return summaryReportVO; } return null; } @Override public String getSummaryReportFromVO(SummaryReportVO summaryReportVO) { if(summaryReportVO != null){ StringBuilder summaryReport = new StringBuilder(); summaryReport.append(summaryReportVO.getClientId()+","); summaryReport.append(summaryReportVO.getTransactionType()+","); summaryReport.append(new SimpleDateFormat("MM/dd/yyyy").format(summaryReportVO.getTransactionDate())+","); summaryReport.append(summaryReportVO.getPriorityFlag()+","); summaryReport.append(summaryReportVO.getProcesingFee()+"\n"); return summaryReport.toString(); } return null; } }
[ "persoanlvijaymca@gmail.com" ]
persoanlvijaymca@gmail.com
fc6060ceb2e81162d59fc3f98659ff6e9c81bfe9
1f9b4d85ae94dc1ecb016a3b65da042d5d3f40b0
/src/Polymorphism1/Boy.java
443e6f39e61107d56a6c01b569ced958fe1d5fe7
[]
no_license
sowmyamuralitharan/ProjectFile
dda4824eb9205d4b05e08773d1b2b037291e6512
77e325f79532263b2e46157b46b9569fd37a193c
refs/heads/master
2022-12-21T06:25:35.754630
2020-09-19T02:56:35
2020-09-19T02:56:35
296,774,043
0
0
null
null
null
null
UTF-8
Java
false
false
205
java
package Polymorphism1; public class Boy { public void girlName() { System.out.println("sowmya"); } public static void main(String[] args) { Boy b = new Boy(); b.girlName(); } }
[ "sowmyakannapiran17@gmail.com" ]
sowmyakannapiran17@gmail.com
3528b9191f67628dd5f2c24b6cfe45e551ff22f9
4127005c984f02174766720cfe876923d0816df9
/src/test/java/uk/ac/nesc/idsd/AbstractTest.java
79063eaa12e2154f52436a21d81fac73f79c547a
[]
no_license
ASOkure/regapp
9dd9b0d4cb88d879ea68e15bec19e1e359dfd4d9
2cf63729861b617b75fc67c28f29b4f15ddadf37
refs/heads/master
2020-04-09T08:23:29.620157
2018-12-18T20:07:50
2018-12-18T20:07:50
160,192,456
0
0
null
null
null
null
UTF-8
Java
false
false
2,636
java
package uk.ac.nesc.idsd; import org.apache.commons.lang3.time.StopWatch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; import uk.ac.nesc.idsd.model.PortalUser; import uk.ac.nesc.idsd.service.UserService; import uk.ac.nesc.idsd.service.exception.ServiceException; /** * Created by jiangj on 03/03/2015. */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:applicationContext.xml"}) //@TransactionConfiguration(transactionManager = "transactionManager") @Transactional public abstract class AbstractTest extends AbstractTransactionalJUnit4SpringContextTests { protected static final Log log = LogFactory.getLog(AbstractTest.class); protected PortalUser portalUser; @Autowired private UserService userService; private StopWatch stopWatch; @Before public void setUp() { stopWatch = new StopWatch(); stopWatch.start(); log.info("Stopwatch started. "); createUser(); } @After public void after() { stopWatch.stop(); logger.info("Time spent: " + stopWatch.getTime() + " ms"); } protected void createUser() { String username = "test_user"; try { portalUser = userService.getPortalUserByUsername(username); } catch (ServiceException e) { log.debug("Portal user dose not exist for username: " + username); } if (portalUser == null) { String defaultPassword = "abc"; String email = "test_user@test.com"; portalUser = new PortalUser(username, username, email, "United Kingdom", "Glasgow"); portalUser.setPassword(defaultPassword); userService.registerPortalUser(portalUser); Authentication authentication = new UsernamePasswordAuthenticationToken(portalUser, defaultPassword); SecurityContextHolder.getContext().setAuthentication(authentication); } } }
[ "Akanimo.Okure@glasgow.ac.uk" ]
Akanimo.Okure@glasgow.ac.uk
f0d26854fd1ca0186cacdf2160436766a1971887
a3603bb2109ddd8544498b3f2bed72bc952c1913
/src/main/java/com/google/code/java/core/parser/DataLongWriter.java
4fdc0e912d98c335dd24cd4a7217d07a81779cc3
[]
no_license
trguduru/java
0956ef993d6c0dae7dd8522baf0512d1a0696df2
bc30f82b70e302bd074e0d73728492e17c68726f
refs/heads/master
2020-04-19T01:34:35.498349
2016-04-22T00:55:54
2016-04-22T00:56:37
167,875,622
0
0
null
null
null
null
UTF-8
Java
false
false
831
java
/* * Copyright (c) 2011. Peter Lawrey * * "THE BEER-WARE LICENSE" (Revision 128) * As long as you retain this notice you can do whatever you want with this stuff. * If we meet some day, and you think this stuff is worth it, you can buy me a beer in return * There is no warranty. */ package com.google.code.java.core.parser; import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; public class DataLongWriter implements LongWriter { private final DataOutputStream out; public DataLongWriter(OutputStream os) { this.out = new DataOutputStream(new BufferedOutputStream(os)); } @Override public void write(long num) throws IOException { out.writeLong(num); } @Override public void close() { ParserUtils.close(out); } }
[ "thirupathi.guduru@cerner.com" ]
thirupathi.guduru@cerner.com
d9f5eca160d49bcf58c2cd28c1cabbdbfc0f5523
5558629d05cda2b5a4ef4386a150e5773cba6f78
/web_team6/src/main/java/com/team6/cinema/coupon/CouponEditOk.java
4a7260f2fcae8d9c725ce4b2b6dd784cc361c666
[]
no_license
hongchanho98/servlet_jsp
6cadf057ecf659d1a6f659066bd2e7fd2b968b45
d4f005ae3b74848efffbdaff9f9f642c159647e9
refs/heads/master
2023-07-14T16:07:46.889326
2021-08-18T10:38:02
2021-08-18T10:38:02
390,298,963
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package com.team6.cinema.coupon; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /*** * 쿠폰 수정 클래스 * @author 6조 * */ @WebServlet("/coupon/couponeditok.do") // web.xml을 작성 안해도됨 public class CouponEditOk extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { RequestDispatcher dispatcher = req.getRequestDispatcher("/WEB-INF/views/coupon/couponeditok.jsp"); dispatcher.forward(req, resp); } }
[ "hongchanho98@gmail.com" ]
hongchanho98@gmail.com
93f2bb9d7d563950a4dd0fc7ad3a2308f45dfad8
ac98e2ec6bd17f5ae68422bbd93e6a51eda43cb7
/com.allen.enhance.hystrix/src/main/java/com/allen/enhance/hystrix/demo/CommandTest.java
b08fd33ec7750608a412be9b89a085bf23305a71
[ "Apache-2.0" ]
permissive
allenfancy/com.allen.enhance
d3dc2a17409fc5479ca66b4619346997b9e59ba6
0b5a17ddd13eee3fd57e9d534fd629714036d915
refs/heads/master
2021-07-13T06:50:35.049247
2020-05-07T14:58:38
2020-05-07T14:58:38
129,202,387
2
0
null
null
null
null
UTF-8
Java
false
false
1,684
java
package com.allen.enhance.hystrix.demo; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.junit.jupiter.api.Test; import rx.Observable; import rx.functions.Action1; public class CommandTest { @Test public void testCommand() throws Exception { CommandHelloWorld chw = new CommandHelloWorld("allen-test"); String run = chw.execute(); System.out.println(run); } @Test public void testCommandAysn() throws InterruptedException, ExecutionException { Future<String> queue = new CommandHelloWorld("aysnc").queue(); System.out.println(queue.get()); } @Test public void testObservable() { CommandHelloWorldObservable chwo = new CommandHelloWorldObservable("allen observable world"); Observable<String> observe = chwo.observe(); observe.subscribe(new Action1<String>() { @Override public void call(String arg0) { System.out.println(arg0); } }); } @Test public void testObservable2() { Observable<String> observe = new CommandHelloWorldObservable("allen observable world").observe(); observe.subscribe((v)->{ System.out.println("onNext:" +v); },(exception)-> { exception.printStackTrace(); }); } @Test public void testObservableBlocking() { Observable<String> observe = new CommandHelloWorldObservable("allen observable world blocking").toObservable(); String single = observe.toBlocking().single(); System.out.println("blocking ... " + single); } }
[ "wutao@bilibili.com" ]
wutao@bilibili.com
753564ce3cbae9d914912fb0d7ff733a8bab7c6e
f22016e5670e437bd7c1338f28aedfe7871580f9
/rest/src/main/java/ru/cg/cda/rest/service/HistoryService.java
a3f4d8cf0adad6498caab870df27a7cbca787e35
[]
no_license
ilgiz-badamshin/cda
4e3c75407a0b2edbb7321b83b66e4cf455157eae
0a16d90fc9be74932ef3df682013b444d425741e
refs/heads/master
2020-05-17T05:34:17.707445
2015-12-18T13:38:49
2015-12-18T13:38:49
39,076,024
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package ru.cg.cda.rest.service; import java.util.List; import ru.cg.cda.database.bean.History; import ru.cg.cda.rest.dto.HistoryDTO; /** * @author Badamshin */ public interface HistoryService { Long getHistoryCount(); List<HistoryDTO> getHistories(int from, int count); Long getHistoryCountByCaller(Long callerId); List<HistoryDTO> getHistoriesByCaller(Long callerId, int from, int count); void addHistory(HistoryDTO historyDTO); HistoryDTO convertHistory(History history); List<HistoryDTO> convertHistories(List<History> histories); }
[ "badamshin.ilgiz@cg.ru" ]
badamshin.ilgiz@cg.ru
e85af81848d477149e8c5c7060c3b3ddc7ef193e
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/internal/zzbop.java
6642f2d4a39bc5b5f6bc4f169ee6b07acdf397cd
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,687
java
package com.google.android.gms.internal; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.common.api.Status; import com.google.android.gms.drive.zza; public abstract class zzbop extends zzee implements zzboo { public zzbop() { attachInterface(this, "com.google.android.gms.drive.internal.IDriveServiceCallbacks"); } public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { if (zza(i, parcel, parcel2, i2)) { return true; } switch (i) { case 1: zza((zzbpd) zzef.zza(parcel, zzbpd.CREATOR)); break; case 2: zza((zzbpl) zzef.zza(parcel, zzbpl.CREATOR)); break; case 3: zza((zzbpf) zzef.zza(parcel, zzbpf.CREATOR)); break; case 4: zza((zzbpq) zzef.zza(parcel, zzbpq.CREATOR)); break; case 5: zza((zzboz) zzef.zza(parcel, zzboz.CREATOR)); break; case 6: onError((Status) zzef.zza(parcel, Status.CREATOR)); break; case 7: onSuccess(); break; case 8: zza((zzbpn) zzef.zza(parcel, zzbpn.CREATOR)); break; case 9: zzef.zza(parcel, zzbpz.CREATOR); break; case 11: zzef.zza(parcel, zzbpp.CREATOR); zzbsx.zzL(parcel.readStrongBinder()); break; case 12: zzef.zza(parcel, zzbpv.CREATOR); break; case 13: zzef.zza(parcel, zzbps.CREATOR); break; case 14: zza((zzbpb) zzef.zza(parcel, zzbpb.CREATOR)); break; case 15: zzag(zzef.zza(parcel)); break; case 16: zzef.zza(parcel, zzbpj.CREATOR); break; case 17: zzef.zza(parcel, zza.CREATOR); break; case 18: zzef.zza(parcel, zzbox.CREATOR); break; case 20: zzef.zza(parcel, zzbok.CREATOR); break; case 21: zzef.zza(parcel, zzbqr.CREATOR); break; case 22: zzef.zza(parcel, zzbpx.CREATOR); break; default: return false; } parcel2.writeNoException(); return true; } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
3b0d034bdb796bb47c187ae406800785f1cc667a
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.token/classes.jar/com/tencent/token/dm.java
034aecb2f2fdddf4f4bf72e3a036bfcf57ecbe37
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,547
java
package com.tencent.token; import android.app.AppOpsManager; import android.content.Context; import android.content.pm.PackageManager; import android.os.Build.VERSION; import android.os.Process; public final class dm { public static int a(Context paramContext, String paramString) { int i = Process.myPid(); int j = Process.myUid(); String str = paramContext.getPackageName(); if (paramContext.checkPermission(paramString, i, j) == -1) { return -1; } if (Build.VERSION.SDK_INT >= 23) { paramString = AppOpsManager.permissionToOp(paramString); } else { paramString = null; } if (paramString != null) { Object localObject = str; if (str == null) { localObject = paramContext.getPackageManager().getPackagesForUid(j); if (localObject != null) { if (localObject.length <= 0) { return -1; } localObject = localObject[0]; } else { return -1; } } if (Build.VERSION.SDK_INT >= 23) { i = ((AppOpsManager)paramContext.getSystemService(AppOpsManager.class)).noteProxyOpNoThrow(paramString, (String)localObject); } else { i = 1; } if (i != 0) { return -2; } } return 0; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.token\classes.jar * Qualified Name: com.tencent.token.dm * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
b3a0ad27d8cb128e4f477176ac808c74157c4b9d
9bfb6e0622d692ad5d7aec08336ab2853cf52e61
/app/src/main/java/ca/ulaval/ima/mp/adapters/RemoteListAdapter.java
2eb1eed013f1817ae06078534ab5645de56e7db7
[]
no_license
painl/GIF3101-MiniP
c4efab27a0ff12d58ed734ccf94d10871ea9dd4a
6252c6c817de91d0eadf4473fbcb24e96454647b
refs/heads/master
2021-04-12T09:15:43.990414
2018-05-05T01:57:39
2018-05-05T01:57:39
126,641,928
0
0
null
2018-04-16T15:47:19
2018-03-24T21:31:31
Java
UTF-8
Java
false
false
1,077
java
package ca.ulaval.ima.mp.adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.util.ArrayList; import ca.ulaval.ima.mp.R; public class RemoteListAdapter extends ArrayAdapter<String> { private final Context mContext; private final ArrayList<String> data; public RemoteListAdapter(Context context, ArrayList<String> values) { super(context, R.layout.adapter_remotelist, values); this.mContext = context; this.data = values; } @Override public View getView(final int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) mContext .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(R.layout.adapter_remotelist, parent, false); TextView textView = rowView.findViewById(R.id.txt); textView.setText(data.get(position)); return rowView; } }
[ "mrraphicci@gmail.com" ]
mrraphicci@gmail.com
0dc95c7d743acfb2a599e87af2c437685aaf9555
fd16405c9f3e68fafc2cd49db72a6abd9e1f5d92
/src/main/java/Leetcode250_/Backspace_String_Compare_844.java
8b876eb42a4c953567c36350d390181cd38f6940
[]
no_license
kangdengfei/LeetCode
bf8fb0b81033c4cc10213bc5359469b4e05358ef
93e34b7a3dd22995cbab8d195f4af81ff508d28e
refs/heads/master
2022-01-15T11:00:23.494255
2019-05-09T10:38:36
2019-05-09T10:38:36
110,225,658
4
0
null
null
null
null
UTF-8
Java
false
false
2,536
java
package Leetcode250_; /** * @program: Code * @author: KDF * @create: 2019-04-03 * * Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. * * Example 1: * * Input: S = "ab#c", T = "ad#c" * Output: true * Explanation: Both S and T become "ac". * Example 2: * * Input: S = "ab##", T = "c#d#" * Output: true * Explanation: Both S and T become "". * Example 3: * * Input: S = "a##c", T = "#a#c" * Output: true * Explanation: Both S and T become "c". * Example 4: * * Input: S = "a#c", T = "b" * Output: false * Explanation: S becomes "c" while T becomes "b". * Note: * * 1 <= S.length <= 200 * 1 <= T.length <= 200 * S and T only contain lowercase letters and '#' characters. * Follow up: * * Can you solve it in O(N) time and O(1) space? **/ public class Backspace_String_Compare_844 { /* 不正确 */ @Deprecated public static boolean backspaceCompare(String S, String T) { int s = S.length()-1; int t = T.length()-1; int a = 0; int b = 0; while (s>=0 || t>=0){ while (s>= 0 && S.charAt(s) == '#'){ s--; a++; } while (a>0 ){ if (s>= 0 && S.charAt(s) == '#'){ s--; a--; }else { a++; s--; } } if (t >= 0 && T.charAt(t) == '#'){ t--; b++; } while (b>0 ){ if (t >= 0 && T.charAt(t) != '#'){ b--; t--; }else if (t >= 0 && T.charAt(t) == '#'){ b++; t--; } } if (s < 0 || t < 0){ if (s>0){ s--; } if (t>0){ t--; } break; } if (s>=0 && t>= 0 && S.charAt(s) != T.charAt(t)){ return false; }else { s--; t--; } } return true; } public static void main(String[] args) { String S1 = "rh"; String T1 = "#rh"; String S2 = "a#c"; String T2 = "b"; String S = "bxj##tw"; String T ="bxo#j##tw"; System.out.println(backspaceCompare(S,T)); } }
[ "393963771@qq.com" ]
393963771@qq.com
d1952c9c84bfc1e64215b7e18824423fa5b24adb
26ed4aa8a543cffe58879c275e779fafcacd5ea0
/src/com/zhongyang/java/system/MStringUtils.java
baa7fceeadc1dd016bde557b7988896df807b04d
[]
no_license
suzhonghe/zyfy_market
e5f21db4dfb925ed893236fb7361d227c29aca73
589549bf49cd6fed47ebdf3156dac14ea2bbc1b9
refs/heads/master
2021-08-28T11:18:57.615579
2017-12-12T03:30:06
2017-12-12T03:30:06
113,938,588
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package com.zhongyang.java.system; public class MStringUtils { /** * 字符串替换加密部分明文信息 * @param source 需要加密的字符串 * @param start 起始索引 * @param end 结束索引 * @param c 替换字符 * @return */ public static String decrypt(String source, int start, int end, char c){ if(source == null || source == "") return null; StringBuilder sb = new StringBuilder(source); for(int i = start; i<end;i++) sb.setCharAt(i-1, c); return sb.toString(); } }
[ "531579110@qq.com" ]
531579110@qq.com
82f43ec82abc1a73594881a33b9a6346553fa1ae
208f8e0cd644dbccfd69ec15fa05bf4b8bb9a942
/webapp/src/main/java/com/pipaw/tv/webapp/ProgressBarView.java
b97ea69ce925a9b4d9120820a9498ac4cf60bd14
[]
no_license
Macke-qi/7724-one-game-pack1
54c84e989554adccf6b6426dc90b81582fb4637b
e48340e4f15f43224a4ee66e45bb18fdb5a5efa2
refs/heads/master
2020-04-14T04:18:25.333780
2017-07-11T02:50:43
2017-07-11T02:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
887
java
package com.pipaw.tv.webapp; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.util.AttributeSet; import android.view.View; public class ProgressBarView extends View { private int newProgress; private Paint mPaint; public ProgressBarView(Context context, AttributeSet attrs) { super(context, attrs); mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setColor(0xff0080ff); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawRect(0, 0, newProgress * getWidth() / 100, getHeight(), mPaint); } public void setProgress(int newProgress) { this.newProgress = newProgress; invalidate(); } @Override public void setVisibility(int visibility) { super.setVisibility(visibility); if (visibility == View.GONE) { newProgress = 0; invalidate(); } } }
[ "813848101@qq.com" ]
813848101@qq.com
986d82271d1de7d059a42bbcd26dc5bcbc3678d5
14b0d82ebbcc4f5df413ff2f8203845c021b1f24
/app/src/main/java/com/kangzhan/student/utils/framework/AppConfig.java
ba8603c92de9958b467c0118cc62d45061029738
[]
no_license
jianghe314/Demo
be2917c17a11b33d7d4cb8fdf90204f7fde56acb
a0e105094b9a696e4daf4550066f6be244cb217a
refs/heads/master
2020-04-07T18:50:21.310619
2018-11-22T01:23:46
2018-11-22T01:23:46
158,625,681
0
0
null
null
null
null
UTF-8
Java
false
false
1,495
java
package com.kangzhan.student.utils.framework; /** * *********************************************** * ** _oo0oo_ ** * ** o8888888o ** * ** 88" . "88 ** * ** (| -_- |) ** * ** 0\ = /0 ** * ** ___/'---'\___ ** * ** .' \\\| |// '. ** * ** / \\\||| : |||// \\ ** * ** / _ ||||| -:- |||||- \\ ** * ** | | \\\\ - /// | | ** * ** | \_| ''\---/'' |_/ | ** * ** \ .-\__ '-' __/-. / ** * ** ___'. .' /--.--\ '. .'___ ** * ** ."" '< '.___\_<|>_/___.' >' "". ** * ** | | : '- \'.;'\ _ /';.'/ - ' : | | ** * ** \ \ '_. \_ __\ /__ _/ .-' / / ** * **====='-.____'.___ \_____/___.-'____.-'=====** * ** '=---=' ** * *********************************************** * ** 佛祖保佑 镇类之宝 ** * *********************************************** * * @author 李玉江[QQ:1032694760] * @since 2014-09-05 11:49 */ public class AppConfig { /** * @see cn.qqtheme.framework.util.LogUtils */ public static final String DEBUG_TAG = "liyujiang";// LogCat的标记 public static final boolean DEBUG_ENABLE = false;// 是否调试模式 }
[ "zheng-xuan@szreach.com" ]
zheng-xuan@szreach.com
0ea73ea6097f9387156e5f1405625d6b5dc9fca5
5c04feb99b673e6b9b43c2417dc3f333ca95873d
/app/src/main/java/com/qtec/homestay/view/lodge/HouseholdDetailView.java
1c191bf872fceb89de9ccd60cb6622a318c91c62
[]
no_license
blueflybee/AndroidHomestay_1
fd2d670cbc127602f5b069508d67a1825c593395
9bb333092413576abf516555ff797619a439d312
refs/heads/master
2020-06-11T04:35:54.712388
2019-06-26T07:19:10
2019-06-26T07:19:10
193,850,990
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.qtec.homestay.view.lodge; import com.qtec.homestay.domain.model.mapp.rsp.CheckInRoomResponse; import com.qtec.homestay.domain.model.mapp.rsp.GetHoldDetailResponse; import com.qtec.homestay.view.LoadDataView; /** * @author shaojun * @name LoginView * @package com.fernandocejas.android10.sample.presentation.view * @date 15-9-10 */ public interface HouseholdDetailView extends LoadDataView { void holdDetail(GetHoldDetailResponse response); }
[ "wusj2017@gmail.com" ]
wusj2017@gmail.com
74ae347ad3db6cae3afbd2b7577882915da5c0f9
e4b1d9b159abebe01b934f0fd3920c60428609ae
/src/main/java/org/proteored/miapeapi/xml/gelml/autogenerated/FuGECommonProtocolActionType.java
ce7f48095a3e965a8c8087617a2f18583543650c
[ "Apache-2.0" ]
permissive
smdb21/java-miape-api
83ba33cc61bf2c43c4049391663732c9cc39a718
5a49b49a3fed97ea5e441e85fe2cf8621b4e0900
refs/heads/master
2022-12-30T15:28:24.384176
2020-12-16T23:48:07
2020-12-16T23:48:07
67,961,174
0
0
Apache-2.0
2022-12-16T03:22:23
2016-09-12T00:01:29
Java
UTF-8
Java
false
false
2,675
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-257 // 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: 2010.09.14 at 07:25:51 PM CEST // package org.proteored.miapeapi.xml.gelml.autogenerated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * An Action is one step of a Protocol. Sets of ordered Actions define the Protocol. Action is abstract and can be extended to specify particular types of steps within a subclass of Protocol. * * <p>Java class for FuGE.Common.Protocol.ActionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="FuGE.Common.Protocol.ActionType"> * &lt;complexContent> * &lt;extension base="{http://www.psidev.info/gelml/1_1candidate}FuGE.Common.IdentifiableType"> * &lt;attribute name="actionOrdinal" type="{http://www.w3.org/2001/XMLSchema}int" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "FuGE.Common.Protocol.ActionType") @XmlSeeAlso({ GelMLSampleLoadingSampleLoadingActionType.class, GelMLSelectSubstanceSubstanceActionType.class, GelMLGel2DProtocolFirstDimensionActionType.class, GelMLOtherGelProtocolInterDimensionActionType.class, GelMLElectrophoresisElectrophoresisActionType.class, GelMLOtherGelProtocolDimensionActionType.class, GelMLElectrophoresisAddBufferActionType.class, FuGECommonProtocolGenericActionType.class, GelMLGel2DProtocolDetectionActionType.class, GelMLGel2DProtocolSecondDimensionActionType.class }) public abstract class FuGECommonProtocolActionType extends FuGECommonIdentifiableType { @XmlAttribute protected Integer actionOrdinal; /** * Gets the value of the actionOrdinal property. * * @return * possible object is * {@link Integer } * */ public Integer getActionOrdinal() { return actionOrdinal; } /** * Sets the value of the actionOrdinal property. * * @param value * allowed object is * {@link Integer } * */ public void setActionOrdinal(Integer value) { this.actionOrdinal = value; } }
[ "salvador@scripps.edu" ]
salvador@scripps.edu
78c3dcc904fa9dbba768b390923e532ad645ebdb
e7c526239eae8a032c8077b59f061a106c490705
/src/com/twitminer/dao/EmoticonDAO.java
f7872ed48e9e5449e71a6a0a7d27f671d9dd1a4d
[]
no_license
kmp091/twitter-miner
f9babee811f6ebe34f4f4852f94f2909659ccbc3
b7ca43ca3ef5fdfa81aea4815fc4409e932fb3fc
refs/heads/master
2021-01-23T13:18:01.657698
2012-08-03T17:40:53
2012-08-03T17:40:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package com.twitminer.dao; import java.util.List; import com.twitminer.beans.Emoticon; import com.twitminer.beans.Emotion; public abstract class EmoticonDAO { public abstract List<String> getEmoticonStrings(); public abstract List<String> getEmoticonStringsByEmotion(int emotion); public List<String> getEmoticonStringsByEmotion(Emotion emotion) { return getEmoticonStringsByEmotion(emotion.getEmotionId()); } public abstract List<Emoticon> getEmoticons(); public abstract List<Emoticon> getEmoticonsByEmotion(int emotion); public List<Emoticon> getEmoticonsByEmotion(Emotion emotion) { return getEmoticonsByEmotion(emotion.getEmotionId()); } public abstract Emoticon getEmoticonByString(String emoticonString); }
[ "kevin.panuelos@gmail.com" ]
kevin.panuelos@gmail.com
44233e59d824c618f4e7243636ca0596bcd839e3
84e4452d49b0ac0f1f2332ddd48c0efe0e9559f2
/src/by/it/sorokoee/jd02_06/SingleLogger.java
702623c324a6f9627219023e15549f60ec08d38a
[]
no_license
loktevalexey/JD2017-02-20
ea2c25203cefc2c139f1277f17d9999e5c8af522
f69c964dc9d651c2acef01e6f177aead182f83b6
refs/heads/master
2020-04-15T00:13:55.277294
2017-06-20T07:53:24
2017-06-20T07:53:24
86,786,465
0
1
null
2017-03-31T06:37:19
2017-03-31T06:37:19
null
UTF-8
Java
false
false
893
java
package by.it.sorokoee.jd02_06; import java.io.BufferedWriter; import java.io.FileWriter; import java.text.DateFormat; import java.util.Date; public class SingleLogger { private static SingleLogger instance; private SingleLogger() { } static SingleLogger getInstance() { if (instance == null) { instance = new SingleLogger(); } return instance; } void log(String message) { String src = System.getProperty("user.dir") + "/src/by/it/sorokoee/"; String fileLog = src + "jd02_06/log.txt"; Date d = new Date(); DateFormat df = DateFormat.getDateInstance(DateFormat.FULL); String line = df.format(d) + " " + message +"\n"; try (BufferedWriter out=new BufferedWriter(new FileWriter(fileLog,true))){ out.write(line); } catch(Exception e) { } } }
[ "sorokoee@gmail.com" ]
sorokoee@gmail.com
452f85a6c9bf4df08111b036756184be68c17fcd
31ac4ae23f70a4a91db140270d0595c52196a65d
/src/test/java/stepDefinitions/US01_SignInStepDef.java
c1318543fb9719348c49a8964c687f145b1acff4
[]
no_license
Sulerbil/CucumberProject
696028f1d52b9fc026ecd9e30ef4e053360ea219
5bed7027c58f7b100f93e7cf3a13cb34f6aa74f3
refs/heads/master
2023-04-12T07:33:39.620388
2021-05-03T21:37:24
2021-05-03T21:37:24
364,067,327
0
0
null
null
null
null
UTF-8
Java
false
false
1,240
java
package stepDefinitions; import io.cucumber.java.en.And; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import org.junit.Assert; import pages.LoginPage; import pages.ProductsPage; import utilities.ConfigurationReader; import utilities.Driver; public class US01_SignInStepDef { LoginPage loginPage = new LoginPage(); ProductsPage productsPage = new ProductsPage(); @Given("user is on the SignIn page") public void user_is_on_the_SignIn_page() { Driver.getDriver().get(ConfigurationReader.getProperty("signIn_url")); } @And("user provides username {string}") public void user_provides_username(String username) { loginPage.userNameTextBox.sendKeys(username); } @And("user provides password {string}") public void user_provides_password(String password) { loginPage.passwordTextBox.sendKeys(password); } @And("user clicks signInButton") public void user_clicks_signInButton() { loginPage.signInButton.click(); } @Then("user must be signIn") public void user_must_be_signIn() { String expectedTitleName = "PRODUCTS"; Assert.assertEquals(expectedTitleName, productsPage.productTitle.getText()); } }
[ "erbilsule@hotmail.com" ]
erbilsule@hotmail.com
a98175136aa0b030de1f82327ecd5acdef9b76db
11458cd94d2e99854e6cfd74bc5fb0ff90832de7
/app/src/main/java/com/ec/managementsystem/clases/ProductDetail.java
2d07bcae521ed3342f7a7f6d729d39aa674a5853
[]
no_license
famgus/ManagementSystem
d8802a5562786675691eeef1d3cd8a4a70c0df6f
711cbd52628fa0f04692fa0c3df66dd6837417fd
refs/heads/master
2022-12-28T02:57:49.323352
2020-10-03T14:26:09
2020-10-03T14:26:09
296,438,639
0
0
null
2020-10-07T00:05:41
2020-09-17T20:46:20
Java
UTF-8
Java
false
false
1,754
java
package com.ec.managementsystem.clases; import com.google.gson.annotations.SerializedName; import java.io.Serializable; public class ProductDetail implements Serializable { @SerializedName("codArticulo") private int codArticulo; @SerializedName("refproveedor") private String refproveedor; @SerializedName("descripcion") private String descripcion; @SerializedName("codBarras") private String codBarras; @SerializedName("talla") private String talla; @SerializedName("color") private String color; @SerializedName("cantidad") private Integer cantidad; public ProductDetail() { } public int getCodArticulo() { return codArticulo; } public void setCodArticulo(int codArticulo) { this.codArticulo = codArticulo; } public String getRefproveedor() { return refproveedor; } public void setRefproveedor(String refproveedor) { this.refproveedor = refproveedor; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public String getCodBarras() { return codBarras; } public void setCodBarras(String codBarras) { this.codBarras = codBarras; } public String getTalla() { return talla; } public void setTalla(String talla) { this.talla = talla; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public Integer getCantidad() { return cantidad; } public void setCantidad(Integer cantidad) { this.cantidad = cantidad; } }
[ "famgusgroup@gmail.com" ]
famgusgroup@gmail.com
d368a54028568e754c5bae3a6cae8b4999d0b2e0
34fde94c998d1544878cb07aab381b4245bb7985
/serviceProject/src/main/java/projService/CarService.java
2882eb59bba25bab771514b6888caa2d00dfbb08
[]
no_license
Nitropav/carProject
847c5d590e7c855becdca167803cee92a79861fa
dd01f8c54e613a60c4ff5dff2829aa012bf1f4e9
refs/heads/master
2023-01-23T15:27:44.203234
2020-12-01T12:25:25
2020-12-01T12:25:25
317,532,709
0
0
null
null
null
null
UTF-8
Java
false
false
1,143
java
package projService; import modelDB.Car; import repos.CarRepo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class CarService { @Autowired private CarRepo carRepo; @Transactional public Iterable<Car> loadCarByVincode(String vincode){ return carRepo.findByVincode(vincode); } @Transactional public Iterable<Car> loadAllCars(){ return carRepo.findAll(); } @Transactional public Iterable<Car> loadCarById(int idcar){ return carRepo.findByIdcar(idcar); } @Transactional public Iterable<Car> loadAllUserCars(Long iduser){ return carRepo.findByIduser(iduser); } @Transactional public Car loadCarBycarnameAndIduser(int iduser, String carname){ return carRepo.findByIduserAndCarname(iduser, carname); } @Transactional public Car saveCar(Car car){ return carRepo.save(car); } @Transactional public void deleteCar(Car car){ carRepo.delete(car); } }
[ "troshko.00@mail.ru" ]
troshko.00@mail.ru
6ee7afad3c67c51172fc7f72ffb0025f4c2904b5
4e2e5e010741c10bec82214cdfeaa53fc27ec8ce
/app/src/main/java/com/startowerstudio/kly/DestinationActivity.java
e835f219d395ddd1ab0fc57c323ed97936f16339
[ "Apache-2.0" ]
permissive
RileyStarTower/1kly
83d5df2d55a07bc9f7444af793040ab5a224da5e
38cb68a29b8ddd041d6f09db8fb7b61dff3f0cf2
refs/heads/master
2020-03-07T18:17:28.425649
2018-05-31T23:33:07
2018-05-31T23:33:07
127,633,520
0
0
null
2018-04-03T18:43:55
2018-04-01T13:50:27
Java
UTF-8
Java
false
false
3,533
java
package com.startowerstudio.kly; import android.content.Context; import android.database.Cursor; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import android.widget.TextView; import com.startowerstudio.kly.db.ManifestQueries; public class DestinationActivity extends KlyActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_destination); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); startCountdown(); if (DateUtils.getInstance().timerActive()) { // If the timer isn't up, display the pre-arrival resident breakdown ResidentAdapter breakdownAdapter = new ResidentAdapter(this, ManifestQueries.getInstance().getResidents(this)); final NonScrollListView listView = findViewById(R.id.residentList); listView.setAdapter(breakdownAdapter); setListViewHeight(listView); } else { // If the timer is up, display the resident breakdown with the passengers accounted for ResidentAdapter breakdownAdapter = new ResidentAdapter(this, ManifestQueries.getInstance().getEndResidents(this)); final NonScrollListView listView = findViewById(R.id.residentList); listView.setAdapter(breakdownAdapter); setListViewHeight(listView); // Set the resident health to Good TextView textView = findViewById(R.id.residentHealthVal); textView.setText(R.string.health_good); textView.setTextColor(getResources().getColor(R.color.greenLight)); } } // This just calls the base function with the specific string public void loginDialog(View v) { super.loginDialog(R.string.login_resident_admin); } private class ResidentAdapter extends CursorAdapter { ResidentAdapter(Context context, Cursor cursor) { super (context, cursor, 0); } @Override public void bindView(View view, final Context context, Cursor cursor) { // Add the resident type to the breakdown view TextView textViewType = view.findViewById(R.id.breakdownName); final String type = cursor.getString(cursor.getColumnIndex("_id")); textViewType.setText(type); textViewType.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { loginDialog(v); } }); // Add the count for the given resident type to the breakdown view TextView textViewCount = view.findViewById(R.id.breakdownCount); final String count = cursor.getString(cursor.getColumnIndex("count")); textViewCount.setText(count); textViewCount.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { loginDialog(v); } }); } @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { return LayoutInflater.from(context).inflate(R.layout.breakdown_adapter, parent, false); } } }
[ "riley.calais@gmail.com" ]
riley.calais@gmail.com
85b6ecf4e10627838b4503c3bbd1ee088327bca9
1b501f5f9827f6c7241fb4bf769a272bb21693d8
/api/src/main/java/dk/wortmann/electro/blink/boundary/BlinksResource.java
bc14d2eb5d5ace0d01aabbf30c0c2004f3bdd82e
[ "MIT" ]
permissive
FuzzyAzurik/electro-api
cce58d045787491860bcb56ee30c8999bc8736e9
eaa952ece21468adf26263bfe8823c1ff56f7f0c
refs/heads/master
2020-03-07T00:25:50.010060
2018-03-28T15:01:37
2018-03-28T15:01:37
127,157,090
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package dk.wortmann.electro.blink.boundary; import dk.wortmann.electro.blink.enitity.Blink; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import java.net.URI; import java.util.List; @Path("blinks") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public class BlinksResource { private static final Logger LOG = LogManager.getLogger(BlinksResource.class); @Inject private BlinkManager manager; @Path("{id}") public BlinkResource find(@PathParam("id") long id) { return new BlinkResource(id, manager); } @GET public List<Blink> all() { return this.manager.all(); } @POST public Response save(Blink blink, @Context UriInfo uriInfo) { LOG.debug(blink); Blink saved = this.manager.save(blink); URI uri = uriInfo.getAbsolutePathBuilder().path("/" + saved.getId()).build(); return Response.created(uri).build(); } }
[ "jacob@wortmann.dk" ]
jacob@wortmann.dk
b2200e14d378cf90eb14862b0da37a0f145b3bfa
acc3d4b6689186a76b8182bf7879ef08c65088df
/src/com/citelic/game/entity/player/content/controllers/impl/distractions/castlewars/CastleWarsWaiting.java
f2dc158ace087b1c0ff08c5a733c678b60382702
[ "MIT" ]
permissive
AkaFluffie/Citelic-742
ec8e6999594cb813e7af86d4d3459f3ca6afb9c1
f80da2cf937578b3401ad2fa4e6ad268065f0875
refs/heads/master
2021-01-16T08:55:24.552787
2015-03-11T17:51:47
2015-03-11T17:51:47
32,622,526
0
1
null
2015-03-21T06:28:56
2015-03-21T06:28:56
null
UTF-8
Java
false
false
2,652
java
package com.citelic.game.entity.player.content.controllers.impl.distractions.castlewars; import com.citelic.game.entity.player.Equipment; import com.citelic.game.entity.player.content.controllers.Controller; import com.citelic.game.entity.player.content.controllers.impl.distractions.pvp.CastleWars; import com.citelic.game.map.objects.GameObject; import com.citelic.game.map.tile.Tile; public class CastleWarsWaiting extends Controller { private int team; @Override public boolean canEquip(int slotId, int itemId) { if (slotId == Equipment.SLOT_CAPE || slotId == Equipment.SLOT_HAT) { player.getPackets().sendGameMessage( "You can't remove your team's colours."); return false; } return true; } // You can't leave just like that! @Override public void forceClose() { leave(); } public void leave() { player.getPackets().closeInterface( player.getInterfaceManager().hasRezizableScreen() ? 34 : 0); CastleWars.removeWaitingPlayer(player, team); } @Override public boolean logout() { player.setLocation(new Tile(CastleWars.LOBBY, 2)); return true; } @Override public void magicTeleported(int type) { removeController(); leave(); } @Override public boolean processButtonClick(int interfaceId, int componentId, int slotId, int packetId) { if (interfaceId == 387) { if (componentId == 37) return false; if (componentId == 9 || componentId == 6) { player.getPackets().sendGameMessage( "You can't remove your team's colours."); return false; } } return true; } @Override public boolean processItemTeleport(Tile toTile) { player.getDialogueManager().startDialogue("SimpleMessage", "You can't leave just like that!"); return false; } @Override public boolean processMagicTeleport(Tile toTile) { player.getDialogueManager().startDialogue("SimpleMessage", "You can't leave just like that!"); return false; } @Override public boolean processObjectClick1(GameObject object) { int id = object.getId(); if (id == 4389 || id == 4390) { removeController(); leave(); return false; } return true; } @Override public boolean processObjectTeleport(Tile toTile) { player.getDialogueManager().startDialogue("SimpleMessage", "You can't leave just like that!"); return false; } @Override public boolean sendDeath() { removeController(); leave(); return true; } @Override public void sendInterfaces() { player.getInterfaceManager().sendTab( player.getInterfaceManager().hasRezizableScreen() ? 34 : 0, 57); } @Override public void start() { team = (int) getArguments()[0]; sendInterfaces(); } }
[ "knol@outlook.com" ]
knol@outlook.com
bb8fe746583d8336b33311ba3c8fc41a512c1cac
dc659187d97ab39c0f4fa470e43fd4e90e095755
/Dice Game/src/cse360project/PlayPanel.java
f488d04d71a243531a0b992fb1eba02786257399
[]
no_license
akaguayo/cse360project35
378bead9ce66e3242555091abc45c6835376e0c5
4db8402bfffdcc69ce3dda527412fc2f8616e223
refs/heads/master
2021-01-22T20:02:50.041519
2016-04-06T21:26:28
2016-04-06T21:26:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
806
java
//CSE360 package cse360project; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class PlayPanel extends JPanel { private JButton button1; private StatPanel sPanel; //Constructor initializes components and organize them using certain layouts public PlayPanel(StatPanel sPanel) { this.sPanel = sPanel; //listener for the button //button1.addActionListener(new ButtonListener()); } //ButtonListener is a listener class that listens to private class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent event) { //checks the source of the event is the button being pressed Object source = event.getSource(); if(source == button1) { } } } }
[ "alexanderloizou@gmail.com" ]
alexanderloizou@gmail.com
98fef8725dca62f5d0dbfec6174430d0be9b2b15
e217c7b807fb594c502e95af158fa22620726e7a
/org.kevoree.experiment.incQueryShareSameLocation/src/kevoree/TypeDefinition.java
9fee8d1ac840b17b126cfff310402268d4e807ca
[]
no_license
dukeboard/kevoree-experiment
fdea13d2f81fc12957c929a3e4da1d09a47a9eb6
9c58f7be87421ca35121584bf3635287865a6592
refs/heads/master
2020-12-30T10:23:24.190959
2013-11-11T15:38:06
2013-11-11T15:38:06
2,078,144
0
0
null
null
null
null
UTF-8
Java
false
false
4,539
java
/** * <copyright> * </copyright> * * $Id$ */ package kevoree; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Type Definition</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link kevoree.TypeDefinition#getDeployUnits <em>Deploy Units</em>}</li> * <li>{@link kevoree.TypeDefinition#getFactoryBean <em>Factory Bean</em>}</li> * <li>{@link kevoree.TypeDefinition#getBean <em>Bean</em>}</li> * <li>{@link kevoree.TypeDefinition#getDictionaryType <em>Dictionary Type</em>}</li> * <li>{@link kevoree.TypeDefinition#getSuperTypes <em>Super Types</em>}</li> * </ul> * </p> * * @see kevoree.KevoreePackage#getTypeDefinition() * @model interface="true" abstract="true" * @generated */ public interface TypeDefinition extends NamedElement { /** * Returns the value of the '<em><b>Deploy Units</b></em>' reference list. * The list contents are of type {@link kevoree.DeployUnit}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Deploy Units</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Deploy Units</em>' reference list. * @see kevoree.KevoreePackage#getTypeDefinition_DeployUnits() * @model required="true" * @generated */ EList<DeployUnit> getDeployUnits(); /** * Returns the value of the '<em><b>Factory Bean</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Factory Bean</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Factory Bean</em>' attribute. * @see #setFactoryBean(String) * @see kevoree.KevoreePackage#getTypeDefinition_FactoryBean() * @model * @generated */ String getFactoryBean(); /** * Sets the value of the '{@link kevoree.TypeDefinition#getFactoryBean <em>Factory Bean</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Factory Bean</em>' attribute. * @see #getFactoryBean() * @generated */ void setFactoryBean(String value); /** * Returns the value of the '<em><b>Bean</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Bean</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Bean</em>' attribute. * @see #setBean(String) * @see kevoree.KevoreePackage#getTypeDefinition_Bean() * @model * @generated */ String getBean(); /** * Sets the value of the '{@link kevoree.TypeDefinition#getBean <em>Bean</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Bean</em>' attribute. * @see #getBean() * @generated */ void setBean(String value); /** * Returns the value of the '<em><b>Dictionary Type</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Dictionary Type</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Dictionary Type</em>' containment reference. * @see #setDictionaryType(DictionaryType) * @see kevoree.KevoreePackage#getTypeDefinition_DictionaryType() * @model containment="true" * @generated */ DictionaryType getDictionaryType(); /** * Sets the value of the '{@link kevoree.TypeDefinition#getDictionaryType <em>Dictionary Type</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Dictionary Type</em>' containment reference. * @see #getDictionaryType() * @generated */ void setDictionaryType(DictionaryType value); /** * Returns the value of the '<em><b>Super Types</b></em>' reference list. * The list contents are of type {@link kevoree.TypeDefinition}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Super Types</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Super Types</em>' reference list. * @see kevoree.KevoreePackage#getTypeDefinition_SuperTypes() * @model * @generated */ EList<TypeDefinition> getSuperTypes(); } // TypeDefinition
[ "obendavi@timebon" ]
obendavi@timebon
3c3d7b798eb8e5a4466c61b7acbee29746208f95
592fe6d348b025509976cdbc3e116abddfa44380
/src/Symbol.java
7dc70681f6a42482a07d34e6b131385a54dbb1ae
[]
no_license
YifengGuo/MineSweeper
851ec7e9cb63cadd0e4aaf1be122f9568b080b43
dcb2709e99a6d97a8137eaad1aa86b8fb76af583
refs/heads/master
2021-07-19T23:48:17.107862
2017-10-28T19:34:54
2017-10-28T19:34:54
106,062,002
0
0
null
null
null
null
UTF-8
Java
false
false
659
java
public class Symbol { public Entry e; public Boolean isMine = true; public Symbol(Entry e, Boolean isMine) { this.e = e; this.isMine = isMine; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof Symbol)) { return false; } Symbol s = (Symbol) o; return s.e.x == e.x && s.e.y == e.y && s.isMine == isMine; } public Boolean complements(Symbol s) { return isMine != s.isMine; } public Symbol getComplement() { return new Symbol(e, !isMine); } @Override public String toString() { return isMine? "M(" + e.x + "," + e.y + ")": "nM(" + e.x + "," + e.y + ")"; } }
[ "724330304@qq.com" ]
724330304@qq.com
381e95b2f42644cb474ccb131f309ba7f2dcbd13
ba4e8e7026960dee5837da3653b7a48cd05467fb
/library/src/test/java/trikita/kv/KVEmptyTest.java
ac45fc60674b80a3fee572ada26c50562f45a727
[ "MIT" ]
permissive
trikita/kv
a2d1e9f49d9e7e46b92153cff168bb0b6fed7385
e27a3127e3769dcca2877d73c01c338074901e7a
refs/heads/master
2021-01-10T01:55:37.905869
2016-03-24T08:40:41
2016-03-24T08:40:41
45,246,561
8
1
null
null
null
null
UTF-8
Java
false
false
611
java
package trikita.kv; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.junit.Assert; import org.junit.Test; public class KVEmptyTest { @Test public void testEmpty() { KV kv = new KV(new TestUtils.Storage(), new TestUtils.NullEncoder()); Assert.assertEquals(kv.keys("").size(), 0); kv.set("foo", "bar").set("baz", 123); kv.set("foo", false); Assert.assertEquals(kv.keys("").size(), 2); Assert.assertTrue(kv.keys("").contains("foo")); Assert.assertTrue(kv.keys("").contains("baz")); } }
[ "zaitsev.serge@gmail.com" ]
zaitsev.serge@gmail.com
e357caaa5f08c4f0a3e0a70524a9691d19269e7c
5b7960694d128003481c81c47bde24743e4cb511
/src/com/jinrui/service/UserService.java
b2cfa3ad43d60841b1d45597e8fe558114d05442
[]
no_license
neusoftzhangjinrui/Java_BookStore
dfbce10b8e921c17fe8ce5c3a92a374aff24041c
2e493ba6d17881e2c8783d841ec3c1b08964815e
refs/heads/master
2023-04-01T07:10:43.166185
2021-04-19T14:04:53
2021-04-19T14:04:53
334,057,032
1
0
null
null
null
null
UTF-8
Java
false
false
276
java
package com.jinrui.service; import com.jinrui.pojo.User; /** * @author Jinrui Zhang * @create 2021-01-28 20:16 */ public interface UserService { public void registUser(User user); public User login(User user); public boolean existUsername(String username); }
[ "1072552872@qq.com" ]
1072552872@qq.com
5c698543c521adc373b59f59b470b16a4b1d57a2
5b6563a505f0aea15f3ba47b37bd977632a3007b
/data/data-ds-druid/src/main/java/cn/zxf/ds_druid/test/DsDruidApplication.java
49cc4df1e54e7d8a8b00a2ce79c8ba3e31c755ac
[]
no_license
zengxf/spring-demo
0c62ad20e4a743fccadf016042184acb64cb52a3
3393fbd37815cb612ce929821f8f3e4a78c5ea9f
refs/heads/master
2023-08-19T03:30:22.483806
2023-08-15T07:10:58
2023-08-15T07:10:58
180,314,311
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package cn.zxf.ds_druid.test; import java.io.IOException; import java.net.URISyntaxException; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DsDruidApplication { public static void main( String[] args ) throws URISyntaxException, IOException { SpringApplication.run( DsDruidApplication.class, args ); } }
[ "fl_zxf@163.com" ]
fl_zxf@163.com
efbb74017acaeb5253d6412e842f1bc5059c6d5f
d62473ef7a617c3703cd476c32dd94467ef14eb8
/android/src/net/heinousgames/app/appletvtest/AndroidLauncher.java
d903e4a446dc464b9d1e1d07c51d66acd5b5932f
[]
no_license
HeinousGames/LibGDXIntelMOEPluginBug
1fcd247565aee419cc32780a31dfd00a66057658
42ea252d8db531e3adfbad51453950a3fcfc2b6d
refs/heads/master
2020-06-04T23:13:51.405690
2019-06-16T19:44:19
2019-06-16T19:44:19
192,228,768
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package net.heinousgames.app.appletvtest; import android.os.Bundle; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import net.heinousgames.app.appletvtest.Main; public class AndroidLauncher extends AndroidApplication { @Override protected void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new Main(), config); } }
[ "ministeve412@gmail.com" ]
ministeve412@gmail.com
5d7d65cd84e5716162069a33421486c6c135a5ee
b46f3029448eee8993d4db135dfea87365135dad
/src/main/java/com/bankapp/model/dao/AccountDao.java
e394db2b3ee43c48b67d4ee8a28c292f86f45fe8
[]
no_license
divya0536/BankApplication_using_Spring_and_Hibernate
1d9e3b9d76700eb47448107ebc351724b0873efe
8fd54aebe19df922655198bfb46c9e61b852430e
refs/heads/master
2023-01-19T09:02:24.133141
2020-12-04T09:40:23
2020-12-04T09:40:23
318,467,391
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.bankapp.model.dao; import java.util.List; public interface AccountDao { public List<Account> getAllAccounts(); public Account updateAccount(Account account); public Account deleteAccount(int accountId); public Account getAccountByIf(int accountId); public Account addAccount(Account account); }
[ "divyaelupuru@gmail.com" ]
divyaelupuru@gmail.com
11fe60cb06cf146cb36c6808ae4378cce68b389c
14ae04d2708dfd33441b9ded1b53c7205d31e927
/src/main/java/com/model/ExpenseApplayHotel.java
abd9865c3412a72208688458fdb99afe0a344eaa
[]
no_license
1255200965/YindaOA_SSM
76e2bffb1e30606a151a9ece9753e43b79ee84ed
19478eb86b27970560053de8c2473aa4d27c10ed
refs/heads/master
2020-04-16T10:44:13.786956
2017-04-17T03:27:37
2017-04-17T03:27:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,936
java
package com.model; public class ExpenseApplayHotel { private Integer id; private String staffId; private String staffName; private String staffDepart; private String hotelName; private String reason; private String startTime; private String endTime; private Double moneyCost; private String daysCost; private String detailExplain; private String staffUserId; private Integer tripId; private String applayStatus; private String imageUrl; private String approverOrder; private String approverHistory; private String approverNow; private String refuseReason; private String submitTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getStaffId() { return staffId; } public void setStaffId(String staffId) { this.staffId = staffId; } public String getStaffName() { return staffName; } public void setStaffName(String staffName) { this.staffName = staffName; } public String getStaffDepart() { return staffDepart; } public void setStaffDepart(String staffDepart) { this.staffDepart = staffDepart; } public String getHotelName() { return hotelName; } public void setHotelName(String hotelName) { this.hotelName = hotelName; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public Double getMoneyCost() { return moneyCost; } public void setMoneyCost(Double moneyCost) { this.moneyCost = moneyCost; } public String getDaysCost() { return daysCost; } public void setDaysCost(String daysCost) { this.daysCost = daysCost; } public String getDetailExplain() { return detailExplain; } public void setDetailExplain(String detailExplain) { this.detailExplain = detailExplain; } public String getStaffUserId() { return staffUserId; } public void setStaffUserId(String staffUserId) { this.staffUserId = staffUserId; } public Integer getTripId() { return tripId; } public void setTripId(Integer tripId) { this.tripId = tripId; } public String getApplayStatus() { return applayStatus; } public void setApplayStatus(String applayStatus) { this.applayStatus = applayStatus; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getApproverOrder() { return approverOrder; } public void setApproverOrder(String approverOrder) { this.approverOrder = approverOrder; } public String getApproverHistory() { return approverHistory; } public void setApproverHistory(String approverHistory) { this.approverHistory = approverHistory; } public String getApproverNow() { return approverNow; } public void setApproverNow(String approverNow) { this.approverNow = approverNow; } public String getRefuseReason() { return refuseReason; } public void setRefuseReason(String refuseReason) { this.refuseReason = refuseReason; } public String getSubmitTime() { return submitTime; } public void setSubmitTime(String submitTime) { this.submitTime = submitTime; } }
[ "gatehate@github.com" ]
gatehate@github.com
544f5cef77a2800e422aae3988c6d1aea5786006
e4216dd9764cc04ad4c8cfa1ad82ab50894d6359
/OA/src/main/java/cn/tempus/leave/LeaveService.java
64e832569b4887bd2aad9a9dcbe049e4d1679ca5
[]
no_license
wing4123/TempusOA
4e2c76474c44493710cd14c72b3079c15911599e
672525ddf87fecfed983df99048ec7a4fd449343
refs/heads/master
2021-04-15T18:45:13.677373
2018-11-13T10:55:45
2018-11-13T10:55:45
126,299,425
1
0
null
null
null
null
UTF-8
Java
false
false
6,147
java
package cn.tempus.leave; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.alibaba.fastjson.JSONObject; import cn.tempus.commons.FileService; import cn.tempus.dao.EasyDao; import cn.tempus.myworkflow.MyWorkFlowService; @Service public class LeaveService { @Autowired private EasyDao basicService; @Autowired MyWorkFlowService myworkflowservice; @Autowired FileService fileservice; @Autowired HttpServletRequest request; @Transactional(propagation=Propagation.REQUIRED) public int Save(){ JSONObject user = (JSONObject) JSONObject.toJSON(request.getSession().getAttribute("USER")); String id = request.getParameter("id"); Map<String,Object> args = new HashMap<String,Object>(); args.put("id", id); args.put("name", request.getParameter("name")); args.put("user", user.getString("userid")); args.put("time", new Date()); args.put("status", StringUtils.isBlank(request.getParameter("status"))?"2":request.getParameter("status")); args.put("quanxin", request.getParameter("quanxin")); args.put("kouxin", request.getParameter("kouxin")); args.put("heji", request.getParameter("heji")); args.put("cause", request.getParameter("cause")); args.put("workingarrangements", request.getParameter("workingarrangements")); args.put("handoverperson", request.getParameter("handoverperson")); StringBuffer entrysql = new StringBuffer("insert into TB_OA_leave_entry (fid,fparentid,ftype,fbegintime,fendtime,fdays,fremark,fseq)"); String[] type = request.getParameterValues("type[]")==null?request.getParameterValues("type"):request.getParameterValues("type[]"); String[] begintime = request.getParameterValues("begintime[]")==null?request.getParameterValues("begintime"):request.getParameterValues("begintime[]"); String[] endtime = request.getParameterValues("endtime[]")==null?request.getParameterValues("endtime"):request.getParameterValues("endtime[]"); String[] days = request.getParameterValues("days[]")==null?request.getParameterValues("days"):request.getParameterValues("days[]"); String[] remark = request.getParameterValues("remark[]")==null?request.getParameterValues("remark"):request.getParameterValues("remark[]"); for(int i=0;i<type.length;i++){ entrysql.append(" select #{entryid"+i+"} fid,#{id} fparentid,#{type"+i+"} ftype,to_date(#{begintime"+i+"},'yyyy-mm-dd hh24:mi') fbegintime,to_date(#{endtime"+i+"},'yyyy-mm-dd hh24:mi') fendtime,#{days"+i+"} fdays,#{remark"+i+"} fremark,#{seq"+i+"} fseq from dual union"); args.put("seq"+i, i+1); args.put("entryid"+i, UUID.randomUUID().toString()); args.put("type"+i, type[i]); args.put("begintime"+i, begintime[i]); args.put("endtime"+i, endtime[i]); args.put("days"+i, days[i]); args.put("remark"+i, remark[i]); } args.put("#SQL", "delete from TB_OA_leave_entry where fparentid=#{id}"); basicService.DeleteData(args); if(type.length>0){ args.put("#SQL", entrysql.substring(0, entrysql.length()-6)); basicService.InsertData(args); } int result=0; args.put("#SQL", "select count(*) from TB_OA_leave where fid=#{id}");//to_date(#{begindate},'yyyy-mm-dd') if(basicService.SelectCountBySqlWithWhere(args)==0){ args.put("#SQL", "insert into TB_OA_leave (fid,fname,fcause,fworkingarrangements,fhandoverperson,fquanxin,fkouxin,fheji,fcreator,fcreatetime,fstatus) values (" + "#{id},#{name},#{cause},#{workingarrangements},#{handoverperson},#{quanxin},#{kouxin},#{heji},#{user},#{time},#{status})"); result = basicService.InsertData(args); }else{ args.put("#SQL", "update TB_OA_leave set fname=#{name},fcause=#{cause},fworkingarrangements=#{workingarrangements},fhandoverperson=#{handoverperson},fquanxin=#{quanxin},fkouxin=#{kouxin},fheji=#{heji},fcreatetime=#{time},fstatus=#{status} where fid=#{id}"); result = basicService.UpdateData(args); } if(request.getParameter("status").equals("2")){ Map<String,Object> vars = new HashMap<String,Object>(); vars.put("form_heji", args.get("heji")); String processinstanceid = myworkflowservice.SaveAndStart("WF007", id, user.get("userid").toString(),vars,args.get("name").toString(),"TB_OA_leave"); args.put("#SQL", "update TB_OA_LEAVE set fprocessinstanceid=#{processinstanceid} where fid=#{id}"); args.put("processinstanceid", processinstanceid); basicService.UpdateData(args); } return result; } @Transactional(propagation=Propagation.REQUIRED) public boolean Delete(String id){ Map<String,Object> args = new HashMap<String,Object>(); args.put("id", id); args.put("#SQL", "delete from TB_OA_LEAVE where fid=#{id}"); basicService.DeleteData(args); args.put("#SQL", "delete from TB_OA_LEAVE_ENTRY where fparentid=#{id}"); basicService.DeleteData(args); fileservice.DeleteFileByBid(id, null); return true; } public Map<String,Object> InitialEditData(String id){ Map<String,Object> args = new HashMap<String,Object>(); args.put("id", id); args.put("#SQL", "select a.*,b.user_name,d.fname departmentname,c.user_id fhandoverpersonid,c.user_name fhandoverpersonname from TB_OA_leave a left join tb_user b on b.user_id=a.fcreator left join tb_user c on c.user_id=a.fhandoverperson left join TB_OA_department d on d.fid=b.attribute15 where a.fid=#{id}"); HashMap<String,Object> result = basicService.GetSinglerData(args); args.put("#SQL", "select ftype,to_char(fbegintime,'yyyy-mm-dd hh24:mi') fbegintime,to_char(fendtime,'yyyy-mm-dd hh24:mi') fendtime,fdays,fremark from TB_OA_leave_entry where fparentid=#{id} order by fseq"); result.put("entry", basicService.SelectListBySqlWithWhere(args)); return result; } }
[ "wing4123@163.com" ]
wing4123@163.com
17e27a7886fd98ff3195ba8b0e61052ccc54b9be
a3036ba09195ddad8e1c4a82acfea540c3a63bbc
/src/main/java/com/mw/leetcode/p561to570/P567PermutationInString.java
9329ef01f011970bfe9c8d99153bf25ed0640d0c
[]
no_license
wangmuyuan1/Concurrency
1bb82d59bc3cbafd9457999a41b8c44a8eab8115
5962a25434380bdee7f99d4397e3b463659374fd
refs/heads/master
2021-01-18T23:15:17.218504
2018-05-03T13:57:36
2018-05-03T13:57:36
22,581,483
0
0
null
null
null
null
UTF-8
Java
false
false
2,318
java
package com.mw.leetcode.p561to570; import java.util.Arrays; public class P567PermutationInString { public boolean checkInclusion(String s1, String s2) { int[] map = new int[26]; int[] copyMap = new int[26]; int[] firstLoc = new int[26]; Arrays.fill(firstLoc, -1); if (s2.length() < s1.length()) return false; if (s1.length() == 0 && s2.length() == 0) return true; char[] array = s2.toCharArray(); for (int i = 0; i < s1.length(); i++) { map[s1.charAt(i) - 'a']++; } for (int i = 0; i < map.length; i++) { if (map[i] == 0) map[i] = -1; copyMap[i] = map[i]; } int start = 0; int length = 0; for (int i = 0; i < array.length; i++) { // if a char not in map, then jump to next char. if (map[array[i] - 'a'] == -1) { length = 0; start = i + 1; restore(map, copyMap); } // if a char in map is already zero, jump to the first appearance of the char. else if (map[array[i] - 'a'] == 0) { i = firstLoc[array[i] - 'a']; length = Math.max(0, length - (i - start + 1)); for (int j = start; j <= i; j++) { map[array[j] - 'a']++; if (map[array[j] - 'a'] == copyMap[array[j] - 'a']) firstLoc[array[i] - 'a'] = -1; } } else { length++; if (map[array[i] - 'a'] > 0) map[array[i] - 'a']--; if (length == s1.length()) return true; if (firstLoc[array[i] - 'a'] == -1) firstLoc[array[i] - 'a'] = i; } } return false; } private void restore(int[] m1, int[] m2) { for (int i = 0; i < m1.length; i++) m1[i] = m2[i]; } public static void main(String[] args) { P567PermutationInString app = new P567PermutationInString(); System.out.println(app.checkInclusion("adc", "dcda")); } }
[ "muyuan.wang@dimensiondata.com" ]
muyuan.wang@dimensiondata.com
9284a884a0cd8a1f87e1adf4c1581d1427f37708
331abcd6c09119dfab9526858f4b732a88867459
/src/test/java/tuitanews/TestEncode.java
cb21be307ea3d2fbb3057196efdf3a6425a4017c
[]
no_license
ysdxz207/tuitanews
e3741f0dd80309e27ab95fbfa7c4c75430dd150c
78f8763b0f3f68742f0c8befd5cbb17671306709
refs/heads/master
2020-09-13T04:37:33.672355
2016-09-14T08:07:42
2016-09-14T08:07:42
66,448,416
0
0
null
null
null
null
UTF-8
Java
false
false
322
java
package tuitanews; import java.io.UnsupportedEncodingException; public class TestEncode { public static void main(String[] args) { String aa = "aaa"; try { new String(aa.getBytes(), "utf-8"); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "ysdxz207@qq.com" ]
ysdxz207@qq.com
0f1343d809c43a228b4b9f8153147f8354679389
23a210a857e1d8cda630f3ad40830e2fc8bb2876
/emp_7.3/emp/wxgl/com/montnets/emp/wxgl/dao/UserMgrDao.java
99d975bad23a0a7ef3a9223dbb102e932461e70c
[]
no_license
zengyijava/shaoguang
415a613b20f73cabf9ab171f3bf64a8233e994f8
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
refs/heads/main
2023-04-25T07:57:11.656001
2021-05-18T01:18:49
2021-05-18T01:18:49
368,159,409
0
0
null
null
null
null
UTF-8
Java
false
false
3,720
java
package com.montnets.emp.wxgl.dao; import java.util.LinkedHashMap; import java.util.List; import org.apache.commons.beanutils.DynaBean; import com.montnets.emp.common.constant.StaticValue; import com.montnets.emp.common.constant.SystemGlobals; import com.montnets.emp.common.dao.impl.DataAccessDriver; import com.montnets.emp.table.wxgl.TableLfWeiUserInfo; import com.montnets.emp.util.PageInfo; /** * @author chensj */ public class UserMgrDao { /** * 查找关注用户 * @description * @param corpCode * @param conditionMap * @param orderbyMap * @param pageInfo * @return * @author zousy <zousy999@qq.com> * @datetime 2013-9-26 下午03:14:30 */ public List<DynaBean> getUserInfoList(String corpCode, LinkedHashMap<String, String> conditionMap, LinkedHashMap<String, String> orderbyMap, PageInfo pageInfo) { List<DynaBean> beans = null; String fieldSql = "SELECT lfuser.WC_ID as wcid,lfuser.NAME as username,lfuser.UNAME as uname," + "lfuser.PHONE as phone,lfuser.CREATETIME as createtime,lfuser.VERIFYTIME as verifytime," + "lfuser.OPEN_ID as openid "; StringBuffer tableSql = new StringBuffer(); tableSql.append(" FROM ").append(TableLfWeiUserInfo.TABLE_NAME).append(" lfuser "); tableSql.append(" WHERE "); StringBuffer conSql = new StringBuffer(); conSql.append(" lfuser.").append(TableLfWeiUserInfo.CORP_CODE).append("='").append(corpCode).append("'"); String conditionSql = getConditionSql(conditionMap); String orderbySql = " order by lfuser.WC_ID DESC"; String sql = fieldSql + tableSql + conSql.toString() + conditionSql + orderbySql; String countSql = new StringBuffer("select count(*) totalcount ").append(tableSql).append(conSql.toString()).append(conditionSql).toString(); beans = new DataAccessDriver().getGenericDAO().findPageDynaBeanBySQL(sql, countSql, pageInfo, StaticValue.EMP_POOLNAME, null); return beans; } /** * 拼装查询条件 * @description * @param conditionMap * @return * @author Administrator <foyoto@gmail.com> * @datetime 2013-12-10 下午04:37:00 */ public String getConditionSql(LinkedHashMap<String, String> conditionMap) { StringBuffer conditionSql = new StringBuffer(); // 开始时间 String beginTime = conditionMap.get("beginTime"); // 结束时间 String endTime = conditionMap.get("endTime"); // 当前数据库类型 String type = SystemGlobals.getValue("DBType"); if(conditionMap.get("wcid") != null && !"".equals(conditionMap.get("wcid"))) { conditionSql.append(" and lfuser.WC_ID" + "=" + conditionMap.get("wcid")); } if(conditionMap.get("phone") != null && !"".equals(conditionMap.get("phone"))) { conditionSql.append(" and lfuser.PHONE"+ " like '%" + conditionMap.get("phone") + "%' "); } if(conditionMap.get("uname") != null && !"".equals(conditionMap.get("uname"))) { conditionSql.append(" and lfuser." + TableLfWeiUserInfo.UNAME + " like '%" + conditionMap.get("uname") + "%'"); } if("1".equals(type)) { // oracle if(beginTime != null && !"".equals(beginTime)) { conditionSql.append(" and lfuser.VERIFYTIME " + ">= to_date('" + beginTime + "','yyyy-MM-dd HH24:MI:SS')"); } if(endTime != null && !"".equals(endTime)) { conditionSql.append(" and lfuser.VERIFYTIME " + "<= to_date('" + endTime + "','yyyy-MM-dd HH24:MI:SS')"); } } else { // sql server ,db2 if(beginTime != null && !"".equals(beginTime)) { conditionSql.append(" and lfuser.VERIFYTIME " + ">= '" + beginTime + "'"); } if(endTime != null && !"".equals(endTime)) { conditionSql.append(" and lfuser.VERIFYTIME " + "<= '" + endTime + "'"); } } return conditionSql.toString(); } }
[ "2461418944@qq.com" ]
2461418944@qq.com
0224b82fe5358d7afdcb3d00002c9a7e948fdd5d
987f1dac059de555c809aa02150eb5e6921f184c
/3,5/src/Negative.java
8776243d0d39f6b2e58eea591e9574b4f7f480a5
[]
no_license
markina/MathLogic
1f5e00f47b273951867c12bd948ac99aafe1ac12
e544d5503fa6dafe2b32a80dca20c12be5f0a02c
refs/heads/master
2021-01-23T09:30:18.741289
2014-11-06T00:16:49
2014-11-06T00:16:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,558
java
import javafx.util.Pair; import java.util.*; /** * Created by margarita on 2/3/14. */ public class Negative extends Expression{ protected Expression e; public Negative(Expression e) { this.e = e; } public boolean equalsExp(Expression b) { if(getClass() != b.getClass()) return false; Negative q = (Negative)b; if(!e.equalsExp(q.e)) return false; if(!e.equalsExp(q.e)) return false; return true; } protected boolean equalsToAxiom(Expression b, Map<String, Expression> map) { if(getClass() != b.getClass()) return false; Negative q = (Negative)b; if(!e.equalsToAxiom(q.e, map)) return false; if(!e.equalsToAxiom(q.e, map)) return false; return true; } @Override public String toString() { return "!" + e.toString(); } @Override public void getListTrueUnknow(List<Pair<Set<Expression>, Set<Expression>>> listCur) { Expression expA = this.e; expA.getListTrueUnknow(listCur); List<Pair<Set<Expression>, Set<Expression>>> listAdd = new ArrayList<Pair<Set<Expression>, Set<Expression>>>(); for(int i = 0; i < listCur.size(); i++) { Pair<Set<Expression>, Set<Expression>> pair = new Pair<Set<Expression>, Set<Expression>>(new HashSet<Expression>(listCur.get(i).getKey()), new HashSet<Expression>(listCur.get(i).getValue())); boolean AisTrue = pair.getKey().contains(expA); boolean AisUnknow = pair.getValue().contains(expA); boolean EXPisTrue = pair.getKey().contains(this); boolean EXPisUnknow = pair.getValue().contains(this); if(EXPisTrue) { continue; } if(EXPisUnknow) { continue; } if(AisTrue) { listCur.get(i).getValue().add(this); continue; } if(AisUnknow) { listCur.get(i).getKey().add(this); pair.getValue().add(this); listAdd.add(pair); continue; } } for(int i = 0; i < listAdd.size(); i++) { listCur.add(listAdd.get(i)); } } @Override public boolean equals(Object o) { Expression oo = (Expression) o; if(this.equalsExp(oo)) return true; return false; } @Override public int hashCode() { return 1; } }
[ "margaritam2706@gmail.com" ]
margaritam2706@gmail.com
9de7f63bfb1d52a6df81543f548b94ac11b79313
d36e6e67b577286a7d1468e00f2afddd2a67e55b
/fpinjava-parent/fpinjava-makingjavafunctional-exercises/src/main/java/com/fpinjava/makingjavafunctional/exercise03_02/mine/Case.java
ce2058bd2b00fca0d952683da49ae58b144fc04e
[]
no_license
rssole/fpinjava
b807b74aec998a85dd5ec60c91d04d935e88e2e6
5ff6e9f4a9dd2975b31a68c328a305b36937ca33
refs/heads/master
2021-01-20T14:48:44.736563
2018-06-08T13:45:42
2018-06-08T13:45:42
90,677,690
0
0
null
2017-05-08T22:21:47
2017-05-08T22:21:47
null
UTF-8
Java
false
false
1,154
java
package com.fpinjava.makingjavafunctional.exercise03_02.mine; import com.fpinjava.common.Tuple; import com.fpinjava.makingjavafunctional.exercise03_01.Result; import java.util.Arrays; import java.util.function.Supplier; public class Case<T> extends Tuple<Supplier<Boolean>, Supplier<Result<T>>> { private Case(Supplier<Boolean> condition, Supplier<Result<T>> result) { super(condition, result); } static <T> Case<T> mcase(Supplier<Boolean> condition, Supplier<Result<T>> value) { return new Case<>(condition, value); } static <T> DefaultCase<T> mcase(Supplier<Result<T>> value) { return new DefaultCase<>(value); } @SafeVarargs static <T> Result<T> match(DefaultCase<T> defaultCase, Case<T>... matchers) { return Arrays.stream(matchers) .filter(m -> m._1.get()) .findFirst() .map(m -> m._2.get()) .orElse(defaultCase._2.get()); } static class DefaultCase<T> extends Case<T> { DefaultCase(Supplier<Result<T>> value) { super(() -> true, value); } } }
[ "rssole@gmail.com" ]
rssole@gmail.com
c850bd3896d1b4d6abf45bbe84355c20a987c92b
37f2ea9b6d046684c55aca1d77155d0ff36c8607
/ForLoopControl.java
2154702c5d3cd9791d39e0c27df2eb9892f66b82
[]
no_license
btrejo12/meatbol
90751f827bfbf0d5b3ac155c4515212ba954fd7b
58cd24b1cd55cae64cc30132ec84bba67ea8f12a
refs/heads/master
2020-04-21T19:16:35.069268
2019-05-04T08:10:42
2019-05-04T08:10:42
169,800,715
1
2
null
null
null
null
UTF-8
Java
false
false
8,186
java
package meatbol; public class ForLoopControl { private ResultValue controlVariable; private ResultValue limit; private ResultValue incr; private Parser parser; private Scanner scan; private StorageManager stoMgr; private Expression expr; private boolean incrExists = false; private boolean isRange = false; private boolean isSplit = false; private boolean isArray = false; private boolean firstIter = true; private ResultValue index; private Token target; private int bounds; /** * ForLoopControls are only declared when we see a for loop, it is responsible for retrieving the control variable, * the limit, and the increment factor of the for loop condition. It updates the control variable in the storage manager * for each iteration. * @param parser * @param scan * @param stoMgr * @param expr */ public ForLoopControl(Parser parser, Scanner scan, StorageManager stoMgr, Expression expr){ this.parser = parser; this.scan = scan; this.stoMgr = stoMgr; this.expr = expr; limit = new ResultValue(); incr = new ResultValue(); } /** * The initial set up of a for loop condition in order to find the control variable, the limit, and the increment. * @throws Exception */ public void setUpCondition() throws Exception{ // Entering this method, we should be on the first token of the for loop // condition. //System.out.println("Coming into setting up condition: " + scan.currentToken.tokenStr); target = scan.currentToken; if(scan.nextToken.primClassif != Classif.CONTROL){ // The control variable is an expr scan.getNext(); if(scan.currentToken.tokenStr.equals("=")){ scan.getNext(); //put us on the expr controlVariable = expr.evaluateExpression("to in from"); } else { //scan.currentToken.printToken(); parser.error("Expected '=' in control variable assignment for 'for' loop: " + scan.currentToken.tokenStr); } } else { // single variable control, no assignments controlVariable = expr.evaluateExpression("to in from"); } // We should now be on a 'in', 'to', or 'from' if(scan.currentToken.primClassif != Classif.CONTROL) parser.error("Expected a 'to', 'in', or 'from' token following control variable"); String flow = scan.currentToken.tokenStr; scan.getNext(); // puts us on the limit expr if(flow.equals("to")){ // Integer range index = controlVariable; isRange = true; assignRV(limit, expr.evaluateExpression("by :")); bounds = Integer.parseInt(limit.value); if(scan.currentToken.primClassif == Classif.CONTROL){ //next token is 'by' incrExists = true; scan.getNext(); assignRV(incr, expr.evaluateExpression(":")); } else if (!scan.currentToken.tokenStr.equals(":")) { parser.error("Expected colon following 'for' condition: " + scan.currentToken.tokenStr); } else incr = new ResultValue("1", "primitive", SubClassif.INTEGER); } else if (flow.equals("in")){ isArray = true; assignRV(limit, expr.evaluateExpression(":")); incr = new ResultValue("1", "primitive", SubClassif.INTEGER); } else if (flow.equals("from")){ isSplit = true; assignRV(limit, expr.evaluateExpression("by")); if(!scan.currentToken.tokenStr.equals("by")) parser.error("Expected 'by' following 'for' condition: " + scan.currentToken.tokenStr); scan.getNext(); // get on the 'by' variable assignRV(incr, expr.evaluateExpression(":")); } else parser.error("Invalid flow statement following 'for' loop control variable: " + flow); if(!isRange){ index = new ResultValue("0", "primitive", SubClassif.INTEGER); if(isSplit){ String [] tokens = limit.value.split(incr.value); controlVariable = new ResultValue(tokens[0], "primitive", SubClassif.STRING); bounds = tokens.length; }else { ResultValue res = new ResultValue(); try { res = limit.arr.get(index); } catch (Exception e){ parser.error("Invalid index " + index.value + " for array of size: " + limit.arr.getBounds()); } assignControl(res); ResultValue rv = limit.arr.elem(); bounds = Integer.parseInt(rv.value); } } stoMgr.updateVariable(target.tokenStr, controlVariable); //System.out.println("End for set up, cv: " + controlVariable.value + ", limit: " // + limit.value + ", incr: " + incr.value + ", bounds: " + bounds); } /** * Is called during each iteration to decide whether the condition is true or false dependant on the control variable. * @return A boolean specifying whether this for loop should keep running * @throws Exception */ public boolean evaluateCondition() throws Exception{ int idx = Integer.parseInt(index.value); if(idx >= bounds) return false; if(isArray){ ResultValue rv = new ResultValue(); try { rv = limit.arr.get(index); } catch(Exception e){ parser.error("Invalid index " + index.value + " for array of size: " + limit.arr.getBounds()); } assignControl(rv); idx = idx + Integer.parseInt(incr.value); index = new ResultValue(Integer.toString(idx), "primitive", SubClassif.INTEGER); stoMgr.updateVariable(target.tokenStr, controlVariable); return true; } else if(isSplit){ String [] tokens = limit.value.split(incr.value); ResultValue rv = new ResultValue(tokens[idx], "primitive", SubClassif.STRING); assignControl(rv); idx++; index = new ResultValue(Integer.toString(idx), "primitive", SubClassif.INTEGER); stoMgr.updateVariable(target.tokenStr, controlVariable); return true; } else { //ResultValue rv = new ResultValue(Integer.toString(idx), "primitive", SubClassif.INTEGER); ResultValue tmp = stoMgr.getVariableValue(target.tokenStr); if(!firstIter) { idx = Integer.parseInt(tmp.value) + Integer.parseInt(incr.value); index = new ResultValue(Integer.toString(idx), "primitive", SubClassif.INTEGER); } else firstIter = false; // Check again since we changed it just not if (idx >= bounds) return false; assignControl(index); stoMgr.updateVariable(target.tokenStr, controlVariable); return true; } } /** * A stupid function to get around Java's by reference variable assignment. * @param assign The ResultValue we're assigning to the control variable */ private void assignControl(ResultValue assign){ if(assign.type != null) controlVariable.type = assign.type; controlVariable.value = assign.value; controlVariable.structure = assign.structure; controlVariable.terminatingStr = assign.terminatingStr; controlVariable.arr = assign.arr; //System.err.println("From control assignment: " + controlVariable.value + " at " + index.value); } private void assignRV(ResultValue destination, ResultValue source){ if(source.type != null) destination.type = source.type; destination.value = source.value; destination.structure = source.structure; destination.terminatingStr = source.terminatingStr; destination.arr = source.arr; } }
[ "trejo.brenda95@gmail.com" ]
trejo.brenda95@gmail.com
2689c31a04a8e778e41ad5fa38d34c26e8c8beb6
eeb3fbafadc9eec9b15f560f6d904f05f5ebbdcb
/manage/src/main/java/com/flt/common/freemarker/htmlAbled.java
46fa235d49599469b221bf41f1dbbcde68108ee4
[]
no_license
FuLetian/baseweb0102
49b584077510c8c223ec495c3a70cfeee2b1dbae
7cc73eb3f64831d309b0c2adb2bfd184f760132d
refs/heads/master
2016-09-02T01:23:02.880839
2014-03-13T06:27:57
2014-03-13T06:27:57
38,815,390
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
package com.flt.common.freemarker; import javax.servlet.http.HttpServletRequest; public interface htmlAbled { String createHtml(HttpServletRequest req); }
[ "company@localhost" ]
company@localhost
3d14cc71d88a66231e1613cd3747ef82a5a79d52
cc1455b50b7cf11a1a2c62ae1937375d4b39f3f4
/zwhs_client_api/src/main/java/cn/org/citycloud/zwhs/bean/RetailGoodBean.java
78014f5ee39b3dd50cb4138a6ed16b70ec09cbcd
[]
no_license
xiaolowe/zwhs_client_api
d760f6da4563717c79e236425d70dc27dcf199fd
dc1816441c616e12afdc352d6157f23d8defa274
refs/heads/master
2021-01-16T21:48:06.706796
2018-05-20T14:40:27
2018-05-20T14:40:27
68,792,654
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package cn.org.citycloud.zwhs.bean; import java.math.BigDecimal; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @ApiModel(value="分销商品Model", description="分销商品接口数据Model") public class RetailGoodBean { @ApiModelProperty(value="分销售价", required=true) private BigDecimal retailSalePrice; public BigDecimal getRetailSalePrice() { return retailSalePrice; } public void setRetailSalePrice(BigDecimal retailSalePrice) { this.retailSalePrice = retailSalePrice; } }
[ "xiaolowe@gmail.com" ]
xiaolowe@gmail.com
e04c076e9a6cf8e2e6d3d67a3d6aad0daa8a4835
373027db82b82b0e57629814fecccbdf182be980
/app/src/main/java/com/bernatasel/onlinemuayene/service/MyFirebaseMessagingService.java
d7d93220db6cb6683d5df375275f3fbbc7e30936
[]
no_license
BernaTasel/OnlineMuayane
23e01d8f6b7489c6812749f6f23b252bd64d321e
0040a6e6bc5a40e9b0a43b3883603f7854162af8
refs/heads/master
2022-11-28T13:22:42.431703
2020-08-12T10:43:30
2020-08-12T10:43:30
286,985,411
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package com.bernatasel.onlinemuayene.service; import android.content.Intent; import androidx.annotation.NonNull; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import com.bernatasel.onlinemuayene.utils.MyFCM; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; import java.util.Map; public class MyFirebaseMessagingService extends FirebaseMessagingService { private LocalBroadcastManager localBroadcastManager; @Override public void onCreate() { super.onCreate(); localBroadcastManager = LocalBroadcastManager.getInstance(this); } @Override public void onMessageReceived(RemoteMessage remoteMessage) { Map<String, String> data = remoteMessage.getData(); if (data.size() > 0) { Intent intent = new Intent(MyFCM.INTENT_ACTION); for (Map.Entry<String, String> entry : data.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); intent.putExtra(key, value); } localBroadcastManager.sendBroadcast(intent); } } @Override public void onNewToken(@NonNull String token) { // Log.d(TAG, "Refreshed token: " + token); Intent intent = new Intent(MyFCM.INTENT_ACTION); intent.putExtra(MyFCM.BUNDLE_TOKEN, token); localBroadcastManager.sendBroadcast(intent); } }
[ "bernatasel@MacBook-Pro.local" ]
bernatasel@MacBook-Pro.local
9f4b14a385565fdea722ada9ebad632a8a1c8f8b
c6b5db2df05211876d0a0a41742a6dbc440e3cb2
/src/main/java/com/morgade/mra/application/listeners/InstructionsEventListener.java
f51575cde838daa847ef78119a15472c4f3e9284
[]
no_license
morgade/mars-rover-assessment
bbcf5000b8e548b801cd06a5bbc9e87d8febb00d
b5edc3a17b4b1b13ae70b2f128eab9d87800a533
refs/heads/master
2021-07-12T15:29:31.868928
2019-09-25T14:33:28
2019-09-25T14:33:28
210,580,169
1
0
null
2020-10-13T16:16:17
2019-09-24T10:55:06
Java
UTF-8
Java
false
false
2,105
java
package com.morgade.mra.application.listeners; import com.morgade.mra.application.MissionEvent; import com.morgade.mra.application.MissionEventListener; import com.morgade.mra.model.MissionControl; import com.morgade.mra.model.navigation.NavigationInstruction; import com.morgade.mra.util.Validate; import static java.lang.String.format; /** * Defines a processor for the "Instructions" command * Header: "RoverId Instructions" * Arguments: "LMMMRMLMMR" (chain of navigation instructions) * * @author Marcelo Burgos Morgade Cortizo */ public class InstructionsEventListener implements MissionEventListener { public static final String EXPECTED_HEADER_VALUE = "Instructions"; private static final int EXPECTED_HEADER_INDEX = 1; private static final int EXPECTED_HEADER_COUNT = 2; private static final int EXPECTED_ARGUMENT_COUNT = 1; private static final int HEADER_INDEX_ID = 0; private static final int ARGUMENT_INDEX_INSTRUCTIONS = 0; @Override public boolean handle(MissionEvent event, MissionControl missionControl) { // Check expected header String headers[] = event.getHeaderAsArray(); if (EXPECTED_HEADER_COUNT != headers.length || !headers[EXPECTED_HEADER_INDEX].equals(EXPECTED_HEADER_VALUE)) { return false; } // Check argument count String[] arguments = event.getArgumentAsArray(); Validate.isTrue(EXPECTED_ARGUMENT_COUNT == arguments.length, format("Instructions event should contain %d arguments", EXPECTED_ARGUMENT_COUNT) ); String roverId = headers[HEADER_INDEX_ID]; String instructions = arguments[ARGUMENT_INDEX_INSTRUCTIONS]; missionControl.processInstructions( roverId, instructions.chars() .mapToObj(ch -> String.valueOf((char) ch) ) .map( instruction -> NavigationInstruction.fromId(instruction) ) .toArray( l -> new NavigationInstruction[l] ) ); return true; } }
[ "morgade@gmail.com" ]
morgade@gmail.com
5a7ec5507ce7ab556ef3f2c196d1d3dbdff1ea3a
23827633298df1569d2e64e623c0e5a6d97cdfa6
/interpreter/src/main/java/cn/ep/dp/interpreter/context/Context.java
d7334cf433ef1e01799f3db5ff7129cfcb872ea3
[]
no_license
dark-ep/design-patterns
e556ede3f1e9ccb78c1a3057c5f6226a1eafef04
a54720b648c513462f20f43c140edbb15284ae8c
refs/heads/master
2020-03-25T11:32:50.792419
2018-01-12T07:39:08
2018-01-12T07:39:08
143,736,976
0
0
null
null
null
null
UTF-8
Java
false
false
1,943
java
package cn.ep.dp.interpreter.context; import cn.ep.dp.interpreter.util.XmlUtil; import org.w3c.dom.*; import java.util.*; /** * 上下文,用来包含解释器需要的一些全局信息 * * @author lhl */ public class Context { /** * Dom解析Xml的Document对象 */ private Document document; /** * 上一次被处理的多个元素 */ private List<Element> preEles = new ArrayList<>(); /** * 构造方法 * * @param filePathName 需要读取的xml的路径和名字 * @throws Exception 异常 */ public Context(String filePathName) throws Exception { //通过辅助的Xml工具类来获取被解析的xml对应的Document对象 this.document = XmlUtil.getRoot(filePathName); } /** * 重新初始化上下文 */ public void reInit() { preEles = new ArrayList<>(); } /** * 各个Expression公共使用的方法, * 根据父元素和当前元素的名称来获取当前的多个元素的集合 * * @param pEle 父元素 * @param eleName 当前元素的名称 * @return 当前的多个元素的集合 */ public List<Element> getNowEles(Element pEle, String eleName) { List<Element> elements = new ArrayList<>(); NodeList tempNodeList = pEle.getChildNodes(); for (int i = 0; i < tempNodeList.getLength(); i++) { if (tempNodeList.item(i) instanceof Element) { Element nowEle = (Element) tempNodeList.item(i); if (nowEle.getTagName().equals(eleName)) { elements.add(nowEle); } } } return elements; } public Document getDocument() { return document; } public List<Element> getPreEles() { return preEles; } public void setPreEles(List<Element> nowEles) { this.preEles = nowEles; } }
[ "lhl_1986@qq.com" ]
lhl_1986@qq.com
c5910b3b9172d2635273c2cdfd58a94a3eb574b4
8cf36aa683d7be4e082af16aa60f65e2489a29dc
/Calender/src/Event.java
71527173fd09cb3e29d5e042153e1f88cd7d4914
[ "MIT" ]
permissive
mzacierka/Data-Structures-2K18
1627be25369cd44b34fd297c82071d318cbae1ce
2e63227eaaf3d8a392c780d4031a5b6693873168
refs/heads/master
2020-03-12T16:02:34.229877
2018-11-03T20:20:33
2018-11-03T20:20:33
130,703,380
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
import java.util.ArrayList; public class Event { private String name; private String day; private String month; private String year; private ArrayList<Event> event = new ArrayList<Event>(); public Event() { name = ""; day = ""; month = ""; year = ""; } public Event(String name, String day, String month, String year) { this.name = name; this.day = day; this.month = month; this.year = year; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDay() { return day; } public void setDay(String day) { this.day = day; } public String getMonth() { return month; } public void setMonth(String month) { this.month = month; } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public ArrayList<Event> getEvent() { return event; } public void addEvent(Event e) { event.add(e); } }
[ "noreply@github.com" ]
noreply@github.com
817325c1cb4b2259a87ebf664d7a93b1d383c3a6
e59e02f1a1aa4bae6c6667d5f7ae3b34d77e20c0
/gmall-sms/src/main/java/com/atguigu/gmall/sms/dao/CouponDao.java
b316842548e39517a7ea4ccbd39b754ebb8bc4f9
[ "Apache-2.0" ]
permissive
taolinGithub/gmall
2b61bacec5358380cb210d3d96b7ec41adbae661
a860a2fcf43302c21598b194986d6f18177bd698
refs/heads/master
2022-12-26T23:42:48.209463
2020-07-03T11:25:42
2020-07-03T11:25:42
230,999,998
0
0
Apache-2.0
2022-12-16T15:19:27
2019-12-31T00:44:38
JavaScript
UTF-8
Java
false
false
371
java
package com.atguigu.gmall.sms.dao; import com.atguigu.gmall.sms.entity.CouponEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 优惠券信息 * * @author zhangtaolin * @email lxf@atguigu.com * @date 2020-01-04 11:52:50 */ @Mapper public interface CouponDao extends BaseMapper<CouponEntity> { }
[ "taolin1998@foxmail.com" ]
taolin1998@foxmail.com
e308f33d1a781e9466610497457955d71cc7141b
676a15ddfe7622bb35fe270fd324daed67f8f578
/src/main/java/spn/netkat/IfThen.java
d3ce72ba50ea27e7c806af162f0210741367947e
[]
no_license
vmehmeri/spn-os
37e3f93f035398be5da09593aa2c99106b56c4e1
57af722a37312c7694e8019c79f5fe5e7f1bef30
refs/heads/master
2021-01-01T19:57:47.812586
2017-07-29T11:59:07
2017-07-29T11:59:07
98,729,509
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package spn.netkat; public class IfThen implements Policy { private Policy policy; public IfThen(Predicate cond, Policy thenBranch) { this.policy = new Union( new Sequence(new Filter(cond), thenBranch)); } public String toString() { return this.policy.toString(); } }
[ "vmehmeri@hotmail.com" ]
vmehmeri@hotmail.com
7a49b88e763e6edd1241cf174ba4012a1febf772
878a033d30d022896c88cc7b6b0c531c68324d36
/yyAddressBook/src/main/java/com/lyy/yyaddressbook/ui/PickImageActivity.java
2512f03a4d77e642e4e33fab79f93e105d422a97
[]
no_license
linyouye/yyAddressBook
e76550df98f3cc6f2d105a24b98512e1c243ada5
dd77b3b2b7f5324267aee5f5eb9c4e5e259631d0
refs/heads/master
2021-05-30T01:59:25.885727
2015-11-20T08:24:43
2015-11-20T08:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,701
java
package com.lyy.yyaddressbook.ui; import java.io.File; import java.io.FileOutputStream; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.view.Window; import android.widget.Button; import android.widget.Toast; import com.lyy.yyaddressbook.R; import com.lyy.yyaddressbook.utils.FileUtils; public class PickImageActivity extends Activity { private static final String TAG = "lyy-PickImageActivity"; private static final boolean D = true; private static final int SELECT_IMAGE = 0x123; private static final int CROP_IMAGE = 0x234; private static final int TAKE_PHOTO = 0x456; private Button btnSelect; private Button btnPhoto; private Button btnCancel; private String photoPath; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.pick_image_activity); findAllViewsById(); setOnClickListener(); photoPath = FileUtils.getPhotoTmp() + "/photo.jpg"; System.out.println("比例:" + getIntent().getFloatExtra("whRatio", 0)); } private void setOnClickListener() { OnClickListener listener = new OnClickListener() { @Override public void onClick(View v) { switch (v.getId()) { case R.id.btnSelect: Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(intent, SELECT_IMAGE); break; case R.id.btnPhoto: new File(photoPath).delete(); Intent it = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); it.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(photoPath))); startActivityForResult(it, TAKE_PHOTO); break; case R.id.btnCancel: finish(); break; } } }; btnSelect.setOnClickListener(listener); btnPhoto.setOnClickListener(listener); btnCancel.setOnClickListener(listener); } private void findAllViewsById() { btnSelect = (Button) findViewById(R.id.btnSelect); btnPhoto = (Button) findViewById(R.id.btnPhoto); btnCancel = (Button) findViewById(R.id.btnCancel); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub super.onActivityResult(requestCode, resultCode, data); if (resultCode != RESULT_OK) { return; } switch (requestCode) { case SELECT_IMAGE: getImageFromUri(data.getData()); break; case TAKE_PHOTO: if (new File(photoPath).exists()) { Intent intent = new Intent(this, ClipImageActivity.class); intent.putExtra("path", photoPath); intent.putExtra("whRatio", getIntent().getFloatExtra("whRatio", 0)); startActivityForResult(intent, CROP_IMAGE); return; } Uri uri = data.getData(); if (uri != null) { getImageFromUri(uri); } else { String photoPath = FileUtils.getPhotoTmp() + "/" + System.currentTimeMillis() + ".jpg"; try { FileOutputStream fos = new FileOutputStream(photoPath); Bitmap bitmap = (Bitmap) data.getExtras().get("data");// 获取相机返回的数据,并转换为Bitmap图片格式 bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);// 把数据写入文件 fos.flush(); fos.close(); } catch (Exception e) { e.printStackTrace(); } Intent intent = new Intent(this, ClipImageActivity.class); intent.putExtra("path", photoPath); intent.putExtra("size", (int) new File(photoPath).length()); intent.putExtra("whRatio", getIntent().getFloatExtra("whRatio", 0)); startActivityForResult(intent, CROP_IMAGE); } break; case CROP_IMAGE: setResult(RESULT_OK, data); finish(); break; } } private void getImageFromUri(Uri uri) { if (!TextUtils.isEmpty(uri.getAuthority())) { if (D) Log.i(TAG, "image uri:" + uri.toString()); Cursor cursor = getContentResolver().query(uri, null, null, null, null); if (null == cursor) { Toast.makeText(this, "no found", Toast.LENGTH_SHORT).show(); return; } cursor.moveToFirst(); String path = cursor.getString(cursor .getColumnIndex(MediaStore.Images.Media.DATA)); int size = cursor.getInt(cursor .getColumnIndex(MediaStore.Images.Media.SIZE)); // int width = cursor.getInt(cursor // .getColumnIndex(MediaStore.Images.Media.WIDTH)); // int height = cursor.getInt(cursor // .getColumnIndex(MediaStore.Images.Media.HEIGHT)); Intent intent = new Intent(this, ClipImageActivity.class); // if (D) // Log.i(TAG, "图片大小:" + width + "X" + height); // intent.putExtra("width", width); // intent.putExtra("height", height); intent.putExtra("path", path); intent.putExtra("size", size); intent.putExtra("whRatio", getIntent().getFloatExtra("whRatio", 0)); startActivityForResult(intent, CROP_IMAGE); cursor.close(); cursor = null; } } }
[ "873753071@qq.com" ]
873753071@qq.com
31c7e5ba70a38702a8a815e56d160ab2beb517c6
204c6a9e9370b19979c5aecf8a25cc6531c65cf2
/src/HDFCcard.java
a2abc788186154b63ede6b0863a489ed5b52d001
[]
no_license
rupaljain24/Task-03-28-08-19
cdd452e8c31c3ad269dfed061e3ce5c36853e9b9
6c80365c2c4c7cd340c99aeeeb751d0291ff8dcc
refs/heads/master
2020-07-13T11:44:27.587484
2019-08-29T03:53:05
2019-08-29T03:53:05
205,076,061
0
0
null
null
null
null
UTF-8
Java
false
false
466
java
public class HDFCcard implements ATMcards { public void withdraw(){ System.out.println("Money withdrawn successfully from HDFC account "); } public void deposit(){ System.out.println("Money Deposit successfully in HDFC account"); } public void viewStatement(){ System.out.println("Your transactions till now in HDFC account"); } public void changePassword(){ System.out.println("Password Updated successfully in HDFC account"); } }
[ "rupal24jain@rupal24" ]
rupal24jain@rupal24
4d74cd72e6fe1246288659db14d67d38ece2b49d
669b4a1feb1fb16d53459525352f374e271d8d67
/src/Server/Communication.java
4e0a8f0455f3bee7784206a03e61bf4723633ed2
[]
no_license
Deyclan/Client---Serveur-HTTP
ff8e65a32754ce2f7bf2303ca0e51b09b8f82bba
5334d69643b5bdb1a26836be4fd52538e01ac28b
refs/heads/master
2021-01-21T20:42:29.267437
2017-06-08T06:16:35
2017-06-08T06:16:35
92,269,440
0
0
null
null
null
null
UTF-8
Java
false
false
5,131
java
package Server; import java.io.*; import java.net.InetAddress; import java.net.Socket; import java.util.Date; /** * Created by Brandon on 24/05/2017. */ public class Communication implements Runnable { private Socket connectedSocket; public Communication(Socket socket) { this.connectedSocket = socket; } @Override public void run() { try { DataInputStream inputStream = new DataInputStream(connectedSocket.getInputStream()); DataOutputStream outputStream = new DataOutputStream(connectedSocket.getOutputStream()); receiveGET(inputStream, outputStream); } catch (IOException e) { System.out.println("Unable to open input or output streams"); e.printStackTrace(); } } @SuppressWarnings("deprecation") public boolean receiveGET(DataInputStream fromClient, DataOutputStream toClient) { try { // On reçoit la requête String[] inputs = fromClient.readLine().split(" "); String[] requestedPath = inputs[1].split("/"); String path = ""; for (int i = 2; i < requestedPath.length; i++) { if (i != 2) { path += "/"; } path += requestedPath[i]; } // Si la requête est un GET if (inputs[0].equals("GET")) { // On vérifie si l'adresse est bien celle du serveur if (requestedPath.length > 1 && (requestedPath[1].equals(InetAddress.getLocalHost().getAddress()) || requestedPath[1].equals(InetAddress.getLoopbackAddress().getHostAddress()))) { System.out.println("requête GET reçue"); // Construction du GET de réponse String command = inputs[2] + " 200 OK"; Date currentDate = new Date(); String date = "Date: " + currentDate; String connexion = inputs[3] + " " + inputs[4]; String serverAddress = ("Server: " + this.connectedSocket.getInetAddress()); String fileType = "unknow"; if (path.split("\\.").length > 1) fileType = path.split("\\.")[1]; String contentType = "Content-Type: " + fileType; System.out.println(fileType); // System.out.println("débug : " + path); File file = new File(path); // Si le chemin d'accès n'est pas rentrée correctement (le fichier ne peut pas être récupéré) if (!file.exists()) { command = inputs[2] + " 404"; toClient.writeBytes(command + "\n"); // Envoi du 404 not found toClient.flush(); FileInputStream html404 = new FileInputStream("404.html"); byte sendingBuffer[] = new byte[133]; html404.read(sendingBuffer); html404.close(); toClient.write(sendingBuffer); System.out.println("Page 404 envoyée."); connectedSocket.close(); return false; } int size = (int) file.length(); //On prend la longueur du fichier à envoyer pour le header FileInputStream htmlFile = new FileInputStream(path); byte sendingBuffer[] = new byte[size]; // lecture du fichier htmlFile.read(sendingBuffer); htmlFile.close(); String contentLength = "Content-Length: " + size; // Requête GET reponse String getResp = command + "\n" + date + "\n" + connexion + "\n" + serverAddress + "\n" + contentType + "\n" + contentLength; // Envoi du fichier toClient.writeBytes(getResp + "\n\n"); toClient.flush(); toClient.write(sendingBuffer); toClient.close(); } } else { /////// SI LA COMMANDE N'EST PAS UN GET /////// String command = inputs[2] + " 504"; toClient.writeChars(command); toClient.flush(); FileInputStream html504 = new FileInputStream("504.html"); byte bufferEnvoi[] = new byte[133]; html504.read(bufferEnvoi); html504.close(); toClient.write(bufferEnvoi); System.out.println("Page 504 envoyée."); connectedSocket.close(); } connectedSocket.close(); return true; } catch (IOException e) { System.out.println("Unable to read inputStream"); e.printStackTrace(); return false; } } }
[ "pgm-27@live.fr" ]
pgm-27@live.fr
c310c887f29a90ed48ca90fde63d1148c8f420c3
bf2a5d0fc4924725fed0066325dd661b10d1156a
/mdms/mdms-flink/src/main/java/de/hpi/isg/mdms/flink/location/MergedCsvFilePartitionLocation.java
dc88a1f5f0624b119722237d3fc85fecf195c829
[ "Apache-2.0" ]
permissive
davidimmhahn/metadata-ms
d6338e6349bf3fc47788e43d382448f815dabeb8
ff7c6fff50a6052f3e11da66d41cc73234147ebb
refs/heads/master
2021-01-20T05:00:42.958799
2017-05-19T06:13:21
2017-05-19T06:13:21
101,407,154
0
0
null
2017-08-25T13:35:16
2017-08-25T13:35:16
null
UTF-8
Java
false
false
13,584
java
/*********************************************************************************************************************** * Copyright (C) 2014 by Sebastian Kruse * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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 de.hpi.isg.mdms.flink.location; import de.hpi.isg.mdms.clients.parameters.CsvParameters; import de.hpi.isg.mdms.flink.data.Tuple; import de.hpi.isg.mdms.flink.readwrite.MultiFileTextInputFormat; import de.hpi.isg.mdms.flink.functions.ParseCsvRows; import de.hpi.isg.mdms.flink.functions.SplitMergedCsvRows; import de.hpi.isg.mdms.flink.util.CsvParser; import de.hpi.isg.mdms.flink.util.FileUtils; import de.hpi.isg.mdms.flink.util.PlanBuildingUtils; import de.hpi.isg.mdms.model.MetadataStore; import de.hpi.isg.mdms.model.location.DefaultLocation; import de.hpi.isg.mdms.model.targets.Table; import de.hpi.isg.mdms.model.util.IdUtils; import de.hpi.isg.mdms.util.CollectionUtils; import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import org.apache.commons.lang.NotImplementedException; import org.apache.flink.api.common.functions.MapFunction; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.api.java.functions.FunctionAnnotation; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.core.fs.Path; import java.io.IOException; import java.util.*; /** * Describes the location of a CSV file. * * @author Sebastian Kruse */ @SuppressWarnings("serial") public class MergedCsvFilePartitionLocation extends DefaultLocation implements CellLocation, TupleLocation { public static final String PARTITION_ID = "PARTITION"; public int getPartitionId() { return Integer.parseInt(get(PARTITION_ID)); } public void setPartitionId(int partitionId) { set(PARTITION_ID, String.valueOf(partitionId)); } @SuppressWarnings("unchecked") @Override public DataSourceBuilder<Table, MergedCsvFilePartitionLocation, Tuple2<Integer, String>> getCellDataSourceBuilder() { return CellDataSourceBuilder.INSTANCE; } @SuppressWarnings("unchecked") @Override public DataSourceBuilder<Table, MergedCsvFilePartitionLocation, Tuple> getTupleDataSourceBuilder() { // TODO throw new NotImplementedException(); } public static class CellDataSourceBuilder implements DataSourceBuilder<Table, MergedCsvFilePartitionLocation, Tuple2<Integer, String>> { static final CellDataSourceBuilder INSTANCE = new CellDataSourceBuilder(); @Override public DataSet<Tuple2<Integer, String>> buildDataSource(ExecutionEnvironment env, Collection<Table> allTables, MetadataStore metadataStore, boolean isAllowingEmptyFields) { Map<Path, List<Table>> tablesByCsvParameters = partitionTablesByFile(allTables); Collection<DataSet<Tuple2<Integer, String>>> cellDataSets = new LinkedList<>(); for (Map.Entry<Path, List<Table>> partitionEntry : tablesByCsvParameters.entrySet()) { // Create a mapping from in-file table IDs to metadata store IDs. Path path = partitionEntry.getKey(); List<Table> tables = partitionEntry.getValue(); MergedCsvFileLocation schemaLocation = (MergedCsvFileLocation) CollectionUtils.getAny(tables) .getSchema().getLocation(); CsvParameters csvParameters = schemaLocation.getCsvParameters(); Int2IntMap idDictionary = createIdDictionary(tables, metadataStore.getIdUtils()); Object2IntMap<String> pathIds = new Object2IntOpenHashMap<>(); try { for (Path actualFilePath : FileUtils.gatherFiles(1, path)) { pathIds.put(actualFilePath.toString(), 0); } } catch (IOException e) { throw new RuntimeException("Could not determine input files.", e); } final MultiFileTextInputFormat.ListBasedFileIdRetriever fileIdRetriever = new MultiFileTextInputFormat.ListBasedFileIdRetriever( pathIds); MultiFileTextInputFormat inputFormat; inputFormat = new MultiFileTextInputFormat(fileIdRetriever, fileIdRetriever); inputFormat.setFilePath(path.toString()); DataSet<Tuple2<Integer, String>> source = env.createInput(inputFormat); // if (this.parameters.sampleRows > 0) { // source = source.filter(new SampleWithHashes<Tuple2<Integer, String>>(this.parameters.sampleRows, // 100)); // } // Split the lines into pivot elements. SplitMergedCsvRows splitMergedRows; // if (this.parameters.isVerifyCsv) { // final Int2IntMap numFieldsPerFile = new Int2IntOpenHashMap(); // for (final Table table : this.schema.getTables()) { // numFieldsPerFile.put(table.getId(), table.getColumns().size()); // } // splitRowsFunction = new SplitCsvRows( // this.parameters.csvParameters.getFieldSeparatorChar(), // this.parameters.csvParameters.getQuoteChar(), // numFieldsPerFile, CsvParser.FAIL_ON_ILLEGAL_LINES, // this.parameters.maxColumns, // !this.parameters.isAllowingEmptyFields); // } else { splitMergedRows = new SplitMergedCsvRows( csvParameters.getFieldSeparatorChar(), csvParameters.getQuoteChar(), CsvParser.WARN_ON_ILLEGAL_LINES, csvParameters.getNullString(), !isAllowingEmptyFields, idDictionary, metadataStore.getIdUtils() ); final DataSet<Tuple2<Integer, String>> cells = source.flatMap(splitMergedRows); cellDataSets.add(cells); } return PlanBuildingUtils.union(cellDataSets); } private Map<Path, List<Table>> partitionTablesByFile(Collection<Table> tables) { Map<Path, List<Table>> tablesByPath = new HashMap<>(); for (Table table : tables) { MergedCsvFileLocation schemaLocation = (MergedCsvFileLocation) table.getSchema().getLocation(); Path path = schemaLocation.getPath(); CollectionUtils.putIntoList(tablesByPath, path, table); } return tablesByPath; } /** * Creates a translation table pointing table partition IDs within their file into the metadata store minimum * column ID. */ private Int2IntMap createIdDictionary(final Collection<Table> tables, IdUtils idUtils) { final Int2IntMap idDictionary = new Int2IntOpenHashMap(tables.size()); for (final Table table : tables) { final int schemaNumber = idUtils.getLocalSchemaId(table.getId()); // Skip empty tables. if (table.getColumns().isEmpty()) { continue; } final int tableNumber = idUtils.getLocalTableId(table.getId()); final int minColumnId = idUtils.createGlobalId(schemaNumber, tableNumber, idUtils.getMinColumnNumber()); MergedCsvFilePartitionLocation location = (MergedCsvFilePartitionLocation) table.getLocation(); idDictionary.put(location.getPartitionId(), minColumnId); } return idDictionary; } } /** * Builds a tuple data set for the given tables. * * @author Sebastian Kruse */ public static class TupleDataSourceBuilder implements DataSourceBuilder<Table, MergedCsvFilePartitionLocation, Tuple> { static final TupleDataSourceBuilder INSTANCE = new TupleDataSourceBuilder(); @Override public DataSet<Tuple> buildDataSource(ExecutionEnvironment env, Collection<Table> allTables, MetadataStore metadataStore, boolean isAllowingEmptyFields) { Map<Path, List<Table>> tablesByCsvParameters = partitionTablesByFile(allTables); Collection<DataSet<Tuple>> tupleDataSets = new LinkedList<>(); for (Map.Entry<Path, List<Table>> partitionEntry : tablesByCsvParameters.entrySet()) { // Create a mapping from in-file table IDs to metadata store IDs. Path path = partitionEntry.getKey(); List<Table> tables = partitionEntry.getValue(); MergedCsvFileLocation schemaLocation = (MergedCsvFileLocation) CollectionUtils.getAny(tables) .getSchema().getLocation(); CsvParameters csvParameters = schemaLocation.getCsvParameters(); Object2IntMap<String> pathIds = new Object2IntOpenHashMap<>(); try { for (Path actualFilePath : FileUtils.gatherFiles(1, path)) { pathIds.put(actualFilePath.toString(), 0); } } catch (IOException e) { throw new RuntimeException("Could not determine input files.", e); } final MultiFileTextInputFormat.ListBasedFileIdRetriever fileIdRetriever = new MultiFileTextInputFormat.ListBasedFileIdRetriever( pathIds); MultiFileTextInputFormat inputFormat; inputFormat = new MultiFileTextInputFormat(fileIdRetriever, fileIdRetriever); inputFormat.setFilePath(path.toString()); DataSet<Tuple2<Integer, String>> source = env.createInput(inputFormat); Int2IntMap idDictionary = createIdDictionary(tables, metadataStore.getIdUtils()); DataSet<Tuple> tuples = source .map(new ParseCsvRows(csvParameters.getFieldSeparatorChar(), csvParameters.getQuoteChar(), csvParameters.getNullString())) .map(new EscapeMCSVTuple(idDictionary)); tupleDataSets.add(tuples); } return PlanBuildingUtils.union(tupleDataSets); } private Map<Path, List<Table>> partitionTablesByFile(Collection<Table> tables) { Map<Path, List<Table>> tablesByPath = new HashMap<>(); for (Table table : tables) { MergedCsvFileLocation schemaLocation = (MergedCsvFileLocation) table.getSchema().getLocation(); Path path = schemaLocation.getPath(); CollectionUtils.putIntoList(tablesByPath, path, table); } return tablesByPath; } /** * Creates a translation table pointing table partition IDs within their file into the metadata store table ID. */ private Int2IntMap createIdDictionary(final Collection<Table> tables, IdUtils idUtils) { final Int2IntMap idDictionary = new Int2IntOpenHashMap(tables.size()); for (final Table table : tables) { // Skip empty tables. if (table.getColumns().isEmpty()) { continue; } MergedCsvFilePartitionLocation location = (MergedCsvFilePartitionLocation) table.getLocation(); idDictionary.put(location.getPartitionId(), table.getId()); } return idDictionary; } } /** * Corrects tuples by exchanging the file table ID with the metadata store table ID. * * @author Sebastian Kruse */ @FunctionAnnotation.ForwardedFields("tableId") public static class EscapeMCSVTuple implements MapFunction<Tuple, Tuple> { private final Int2IntMap idDictionary; public EscapeMCSVTuple(Int2IntMap idDictionary) { super(); this.idDictionary = idDictionary; } @Override public Tuple map(Tuple tuple) throws Exception { int translatedId = this.idDictionary.get(tuple.getMinColumnId()); tuple.setMinColumnId(translatedId); return tuple; } } @Override public Collection<String> getAllPropertyKeys() { Collection<String> allPropertyKeys = new LinkedList<>(super.getAllPropertyKeys()); allPropertyKeys.add(PARTITION_ID); return allPropertyKeys; } }
[ "sebastian.kruse@hpi.de" ]
sebastian.kruse@hpi.de
f97e00310dfdb926ac964230e7c76f3562c984d7
040e33af650216e7da51beae292a7d9688d86249
/Android_CheckoutBoxDemo/app/src/androidTest/java/com/example/easter/easter_ui/ExampleInstrumentedTest.java
4bcddcff673fbcd79436212e85664b50e8b75add
[]
no_license
JPJ-996/JavaExercise
be327c91f90b86d3353ea323c503ce8dc7a75003
4b471422a5c5d91ed6a2a835dc9f49eb65d2ce7a
refs/heads/master
2021-09-13T07:09:34.555905
2018-04-26T11:31:33
2018-04-26T11:31:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
760
java
package com.example.easter.easter_ui; 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.example.easter.easter_ui", appContext.getPackageName()); } }
[ "fan.easter@gmail.com" ]
fan.easter@gmail.com