query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Unbind with tracker service and stop the service if it isn't currently tracking. | private void unbindAndStopTrackerService() {
final boolean isTracking = trackerService != null && trackerService.isTracking();
// Unbind with tracker service
getActivity().unbindService(serviceConnection);
// Stop tracker service (if it isn't tracking)
if(!isTracking) {
final boolean successfullyStopped = getActivity().stopService(trackerServiceIntent);
if(successfullyStopped) {
Log.d(TAG, "Tracker service successfully stopped");
}
else {
Log.e(TAG, "Failed to stop tracker service");
}
}
} | [
"public void stopTracking() {\n mContext.unregisterReceiver(this);\n }",
"private void stopTracking() {\n Intent intent = new Intent(DetectActivity.this, BackgroundDetectedActivitiesService.class);\n stopService(intent);\n }",
"private void unbindService() {\n synchronized (mLock) {\n if (mRemoteService != null) {\n mContext.unbindService(mConnection);\n mRemoteService = null;\n mConnection = null;\n }\n Slog.i(TAG, \"Explicit health check service is unbound\");\n }\n }",
"private void unbindService() {\n\t\tServiceProxy.unbindService(getActivity(), mServiceConnection);\n\t\tmDatabaseHelper.resetSignalStrength();\n\t}",
"void unbind(EventService service);",
"public void stop() {\n unregisterTracker();\n try {\n } catch (IllegalStateException ex) {\n }\n disposeInstance();\n }",
"private void stop_appium_driver_local_service(){\n\t\t// stop appium service builder programmatically\n\t\tobjAppiumDriverLocalService.stop();\n\t}",
"public void doUnbind(){\n\t\tboolean isBound = settings.getBoolean(\"isBound\", false);\n\t\tif(isBound){\n\t\t\tcontext.unbindService(SpeedConnection);\n\t\t\tcontext.stopService(i);\n\t\t\teditor.putBoolean(\"isBound\", false);\n\t\t\teditor.apply();\n\t\t}\n\t}",
"private void unBoundAudioService() {\n if (audioServiceBinder != null) {\n unbindService(serviceConnection);\n }\n }",
"protected void stopApplicationActivityTracker() {}",
"private void unbindAlarmService() {\n if (mServiceBound) {\n unbindService(mConnection);\n mServiceBound = false;\n }\n }",
"private void stopServiceDiscovery() {\n getWifiP2pManager().clearServiceRequests(getChannel(), null);\n }",
"public void stopservice()\n {\n player.stop();\n }",
"void stopService();",
"public void disconnectBeaconService() {\n try {\n beaconManager.unbind(NearSpeakBeaconService.this);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void unbind() {\n ThreadUtil.checkOnMainThread();\n Iterator<Map.Entry<ComponentName, InCallServiceConnection>> iterator =\n mServiceConnections.entrySet().iterator();\n while (iterator.hasNext()) {\n Log.i(this, \"Unbinding from InCallService %s\");\n mContext.unbindService(iterator.next().getValue());\n iterator.remove();\n }\n mInCallServices.clear();\n }",
"public void unbindTimer() {\n if (timerServiceBound)\n activityContext.unbindService(timerServiceConnection);\n }",
"void stopAccurateListening();",
"public void stopService() {\n if (serviceRegistered) {\n Application application = getApplication();\n application.stopService(serviceIntent);\n application.unbindService(serviceConnection);\n recordingService.stopForeground(true);\n recordingService.stopSelf();\n serviceRegistered = false;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Atom__Group_3__1" $ANTLR start "rule__Atom__Group_3__1__Impl" InternalSymboleoide.g:5650:1: rule__Atom__Group_3__1__Impl : ( 'within' ) ; | public final void rule__Atom__Group_3__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalSymboleoide.g:5654:1: ( ( 'within' ) )
// InternalSymboleoide.g:5655:1: ( 'within' )
{
// InternalSymboleoide.g:5655:1: ( 'within' )
// InternalSymboleoide.g:5656:2: 'within'
{
before(grammarAccess.getAtomAccess().getWithinKeyword_3_1());
match(input,101,FOLLOW_2);
after(grammarAccess.getAtomAccess().getWithinKeyword_3_1());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Container__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9031:1: ( ( 'inWithin:' ) )\n // InternalMyDsl.g:9032:1: ( 'inWithin:' )\n {\n // InternalMyDsl.g:9032:1: ( 'inWithin:' )\n // InternalMyDsl.g:9033:2: 'inWithin:'\n {\n before(grammarAccess.getContainerAccess().getInWithinKeyword_3()); \n match(input,99,FOLLOW_2); \n after(grammarAccess.getContainerAccess().getInWithinKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Visualizer__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:9409:1: ( ( 'inWithin:' ) )\n // InternalMyDsl.g:9410:1: ( 'inWithin:' )\n {\n // InternalMyDsl.g:9410:1: ( 'inWithin:' )\n // InternalMyDsl.g:9411:2: 'inWithin:'\n {\n before(grammarAccess.getVisualizerAccess().getInWithinKeyword_3()); \n match(input,99,FOLLOW_2); \n after(grammarAccess.getVisualizerAccess().getInWithinKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__RouterComponent__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:8761:1: ( ( 'inWithin:' ) )\n // InternalMyDsl.g:8762:1: ( 'inWithin:' )\n {\n // InternalMyDsl.g:8762:1: ( 'inWithin:' )\n // InternalMyDsl.g:8763:2: 'inWithin:'\n {\n before(grammarAccess.getRouterComponentAccess().getInWithinKeyword_3()); \n match(input,99,FOLLOW_2); \n after(grammarAccess.getRouterComponentAccess().getInWithinKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AstGenerator__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19690:1: ( ( 'in' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19691:1: ( 'in' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19691:1: ( 'in' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19692:1: 'in'\n {\n before(grammarAccess.getAstGeneratorAccess().getInKeyword_2()); \n match(input,85,FOLLOW_85_in_rule__AstGenerator__Group__2__Impl39530); \n after(grammarAccess.getAstGeneratorAccess().getInKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__JoinNode__Group_3__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:4398:1: ( ( 'in' ) )\n // InternalActivityDiagram.g:4399:1: ( 'in' )\n {\n // InternalActivityDiagram.g:4399:1: ( 'in' )\n // InternalActivityDiagram.g:4400:1: 'in'\n {\n before(grammarAccess.getJoinNodeAccess().getInKeyword_3_0()); \n match(input,33,FollowSets000.FOLLOW_2); \n after(grammarAccess.getJoinNodeAccess().getInKeyword_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__InteractionArtefact__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:11700:1: ( ( 'from' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:11701:1: ( 'from' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:11701:1: ( 'from' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:11702:1: 'from'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getInteractionArtefactAccess().getFromKeyword_2()); \r\n }\r\n match(input,102,FOLLOW_102_in_rule__InteractionArtefact__Group__2__Impl24092); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getInteractionArtefactAccess().getFromKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Start__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10455:1: ( ( 'outgoing' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10456:1: ( 'outgoing' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10456:1: ( 'outgoing' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:10457:1: 'outgoing'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getStartAccess().getOutgoingKeyword_3()); \r\n }\r\n match(input,93,FOLLOW_93_in_rule__Start__Group__3__Impl21647); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getStartAccess().getOutgoingKeyword_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public interface GroupElement extends Construct {\r\n\r\n\t\tpublic Rule asRule();\r\n\r\n\t\tpublic Group asGroup();\r\n\r\n\t}",
"public final void rule__Expression__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:998:1: ( ( 'from' ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:999:1: ( 'from' )\n {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:999:1: ( 'from' )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1000:1: 'from'\n {\n before(grammarAccess.getExpressionAccess().getFromKeyword_2()); \n match(input,20,FOLLOW_20_in_rule__Expression__Group__2__Impl2024); \n after(grammarAccess.getExpressionAccess().getFromKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__MergeNode__Group_3__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:4908:1: ( ( 'in' ) )\n // InternalActivityDiagram.g:4909:1: ( 'in' )\n {\n // InternalActivityDiagram.g:4909:1: ( 'in' )\n // InternalActivityDiagram.g:4910:1: 'in'\n {\n before(grammarAccess.getMergeNodeAccess().getInKeyword_3_0()); \n match(input,33,FollowSets000.FOLLOW_2); \n after(grammarAccess.getMergeNodeAccess().getInKeyword_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Declar__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:4115:1: ( ( 'with' ) )\n // InternalSymboleoide.g:4116:1: ( 'with' )\n {\n // InternalSymboleoide.g:4116:1: ( 'with' )\n // InternalSymboleoide.g:4117:2: 'with'\n {\n before(grammarAccess.getDeclarAccess().getWithKeyword_1()); \n match(input,79,FOLLOW_2); \n after(grammarAccess.getDeclarAccess().getWithKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__From__Group_3__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1701:1: ( ( '.' ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1702:1: ( '.' )\n {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1702:1: ( '.' )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1703:1: '.'\n {\n before(grammarAccess.getFromAccess().getFullStopKeyword_3_2()); \n match(input,25,FOLLOW_25_in_rule__From__Group_3__2__Impl3413); \n after(grammarAccess.getFromAccess().getFullStopKeyword_3_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"private final void toSQLWithinGroupClause(RenderContext context) {\n if (!withinGroupOrderBy.isEmpty()) {\n context.sql(\" \").keyword(\"within group\")\n .sql(\" (\").keyword(\"order by\")\n .sql(\" \").visit(withinGroupOrderBy)\n .sql(\")\");\n }\n }",
"public final void rule__LetExp__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:3786:1: ( ( 'in' ) )\n // InternalOCLlite.g:3787:1: ( 'in' )\n {\n // InternalOCLlite.g:3787:1: ( 'in' )\n // InternalOCLlite.g:3788:2: 'in'\n {\n before(grammarAccess.getLetExpAccess().getInKeyword_2()); \n match(input,71,FOLLOW_2); \n after(grammarAccess.getLetExpAccess().getInKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Contains__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:2363:1: ( ( '.contains(' ) )\n // InternalBrowser.g:2364:1: ( '.contains(' )\n {\n // InternalBrowser.g:2364:1: ( '.contains(' )\n // InternalBrowser.g:2365:2: '.contains('\n {\n before(grammarAccess.getContainsAccess().getContainsKeyword_1()); \n match(input,33,FOLLOW_2); \n after(grammarAccess.getContainsAccess().getContainsKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__From__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1545:1: ( ( '.' ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1546:1: ( '.' )\n {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1546:1: ( '.' )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:1547:1: '.'\n {\n before(grammarAccess.getFromAccess().getFullStopKeyword_1()); \n match(input,25,FOLLOW_25_in_rule__From__Group__1__Impl3103); \n after(grammarAccess.getFromAccess().getFullStopKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Atom__Group_6__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6086:1: ( ( '(' ) )\n // InternalSymboleoide.g:6087:1: ( '(' )\n {\n // InternalSymboleoide.g:6087:1: ( '(' )\n // InternalSymboleoide.g:6088:2: '('\n {\n before(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_6_4()); \n match(input,83,FOLLOW_2); \n after(grammarAccess.getAtomAccess().getLeftParenthesisKeyword_6_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Incoming__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9807:1: ( rule__Incoming__Group__3__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9808:2: rule__Incoming__Group__3__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Incoming__Group__3__Impl_in_rule__Incoming__Group__320362);\r\n rule__Incoming__Group__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AssureStatement__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1132:1: ( ( 'in' ) )\n // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1133:1: ( 'in' )\n {\n // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1133:1: ( 'in' )\n // ../de.bomzhi.petrinet.ui/src-gen/de/bomzhi/petrinet/ui/contentassist/antlr/internal/InternalPetrinetDsl.g:1134:1: 'in'\n {\n before(grammarAccess.getAssureStatementAccess().getInKeyword_3()); \n match(input,20,FOLLOW_20_in_rule__AssureStatement__Group__3__Impl2236); \n after(grammarAccess.getAssureStatementAccess().getInKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Builder instance for the 'branch' field | public com.fretron.Model.Employee.Builder setBranchBuilder(com.fretron.Model.OrgOffice.Builder value) {
clearBranch();
branchBuilder = value;
return this;
} | [
"public void setBranch(String branch) {\r\n this.branch = branch;\r\n }",
"private void setBranch(Branch value) {\n value.getClass();\n branch_ = value;\n \n }",
"public com.fretron.Model.OrgOffice.Builder getBranchBuilder() {\n if (branchBuilder == null) {\n if (hasBranch()) {\n setBranchBuilder(com.fretron.Model.OrgOffice.newBuilder(branch));\n } else {\n setBranchBuilder(com.fretron.Model.OrgOffice.newBuilder());\n }\n }\n return branchBuilder;\n }",
"public Builder setInitBranch(Bank.InitBranch value) {\r\n if (initBranchBuilder_ == null) {\r\n if (value == null) {\r\n throw new NullPointerException();\r\n }\r\n branchMessage_ = value;\r\n onChanged();\r\n } else {\r\n initBranchBuilder_.setMessage(value);\r\n }\r\n branchMessageCase_ = 1;\r\n return this;\r\n }",
"public void setBranch(Transaction branch) {\n this.branch = branch;\n }",
"void setLatestBranch(Branch branch);",
"public Builder setBankBranchID(String value) {\n validate(fields()[8], value);\n this.bankBranchID = value;\n fieldSetFlags()[8] = true;\n return this; \n }",
"public void setBranch (java.lang.Integer branch) {\n\t\tthis.branch = branch;\n\t}",
"private InitBranch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\r\n super(builder);\r\n }",
"@Override\n public void setBranchId(String branchId) {\n }",
"void setInitialBranch(Branch branch);",
"private Branch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\r\n super(builder);\r\n }",
"public void setBranchNo(String branchNo) {\r\n this.branchNo = branchNo;\r\n }",
"public void setBRANCH(BigDecimal BRANCH) {\r\n this.BRANCH = BRANCH;\r\n }",
"public void setBranchId(long branchId) {\r\n this.branchId = branchId;\r\n }",
"public Builder clearBankBranchID() {\n bankBranchID = null;\n fieldSetFlags()[8] = false;\n return this;\n }",
"protected void setBranch(OutputStream branch) {\n this.branch = branch;\n }",
"public void setBranchNum(Integer branchNum) {\r\n this.branchNum = branchNum;\r\n }",
"private void setBranchId(int value) {\n \n branchId_ = value;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the product data dao. | public void setProductDataDao(final ProductDataDaoImpl productDataDao)
{
this.productDataDao = productDataDao;
} | [
"public void setProductDao(ProductDao productDao) {\n\t\tthis.productDao = productDao;\n\t}",
"public void setProduct(entity.APDProduct value);",
"@Override\n\tprotected void setDao()\n\t{\n\t\tdao = daoFactory.getNE1Dao(session, dataModel);\n\t}",
"public void setProduct(Product product) {\n this.product = product;\n }",
"public void setLocationDao(LocationDAO dao) { _locationData = dao; }",
"public abstract void setInfosProducts(IDataset infosProducts);",
"public void setIdProduct(String idProduct) {\n this.idProduct = idProduct;\n }",
"public static void setSaleDao(SaleDatabase dao) {\n saleDao = dao;\n }",
"public void setIdProduct(int idProduct) {\n this.idProduct = idProduct;\n }",
"private void setProductId(String productId) \n {\n this.productId = productId;\n }",
"public ProductoDao() {\n\t\tsuper(Producto.PRODUCTO, matera.jooq.tables.pojos.Producto.class);\n\t}",
"public void setDatabaseProduct(String sDatabaseProduct) throws IOException;",
"public void initiateProductMasterDB() {\n\n\t\tproductMasterDB.add(new ProductMaster(userDB.get(6).getUserId(), userDB.get(6).getUserName(),\n\t\t\t\tuserDB.get(6).getUserMail(), userDB.get(6).getUserNumber(), false, userDB.get(6).getPassword(), 4));\n\t\tproductMasterDB.add(new ProductMaster(userDB.get(7).getUserId(), userDB.get(7).getUserName(),\n\t\t\t\tuserDB.get(7).getUserMail(), userDB.get(7).getUserNumber(), false, userDB.get(7).getPassword(), 4));\n\t}",
"public void setDao(IDao dao) { //2. pour faire l'injection des dependances //setter qui me permetre d'injecter une valeur au variable 'dao'\r\n\t\tthis.dao = dao;\r\n\t}",
"public HibernateProductDao() {\n\t\tsuper(Product.class);\n\t}",
"public void setPurityReportDao(GenericDAO<WaterPurityReport, Integer> dao) { _purityReportData = (WaterPurityReportDAO) dao; }",
"public void setProduct(Long product) {\n this.product = product;\n }",
"void setStockDao(final StockDao stockDao);",
"@Test\n public void testSetProduct() {\n \n assertNull(o2.getProduct());\n o2.setProduct(\"testProduct2\");\n assertEquals(\"testProduct2\", o2.getProduct());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TFC_USE_LOCK_DETAIL.OTHER_LOCK_NUM | public Long getOtherLockNum() {
return otherLockNum;
} | [
"public void setOtherLockNum(Long otherLockNum) {\n this.otherLockNum = otherLockNum;\n }",
"public Long getLockNum() {\n return lockNum;\n }",
"public java.lang.Long getOtherStatsTeamId() {\n return otherStatsTeamId;\n }",
"public java.lang.Long getOtherStatsTeamId() {\n return otherStatsTeamId;\n }",
"public BigDecimal getOTHER_AMOUNT()\r\n {\r\n\treturn OTHER_AMOUNT;\r\n }",
"public java.lang.Long getOtherStatsTeamId() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public Integer getOPTLOCK() {\n return OPTLOCK;\n }",
"public BigDecimal getOLD_PROMISSORY_OTHER_AMOUNT()\r\n {\r\n\treturn OLD_PROMISSORY_OTHER_AMOUNT;\r\n }",
"Optional<Long> getLockTimeout();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getLockingColumn();",
"public BigDecimal getACTUAL_PROMISSORY_OTHER_AMOUNT()\r\n {\r\n\treturn ACTUAL_PROMISSORY_OTHER_AMOUNT;\r\n }",
"public Integer getgOtherId() {\n return gOtherId;\n }",
"public int getOtherUserId() {\n return otherUserId;\n }",
"@Override\n\tpublic java.lang.String getOtherContactNo() {\n\t\treturn _locMstBranchLocation.getOtherContactNo();\n\t}",
"public Long getGoodsNumLocked() {\n\t\treturn goodsNumLocked;\n\t}",
"public void setLockNum(Long lockNum) {\n this.lockNum = lockNum;\n }",
"public Long getoNo() {\n return oNo;\n }",
"public java.lang.String getZTEL_NUMBER2()\n {\n \n return __ZTEL_NUMBER2;\n }",
"public void setACTUAL_PROMISSORY_OTHER_AMOUNT(BigDecimal ACTUAL_PROMISSORY_OTHER_AMOUNT)\r\n {\r\n\tthis.ACTUAL_PROMISSORY_OTHER_AMOUNT = ACTUAL_PROMISSORY_OTHER_AMOUNT;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column PMSTRADE.REFLECT_SEC_IN_DEAL | public void setREFLECT_SEC_IN_DEAL(String REFLECT_SEC_IN_DEAL) {
this.REFLECT_SEC_IN_DEAL = REFLECT_SEC_IN_DEAL == null ? null : REFLECT_SEC_IN_DEAL.trim();
} | [
"public String getREFLECT_SEC_IN_DEAL() {\r\n return REFLECT_SEC_IN_DEAL;\r\n }",
"public void setREF_DEAL_YIELD(BigDecimal REF_DEAL_YIELD)\r\n {\r\n\tthis.REF_DEAL_YIELD = REF_DEAL_YIELD;\r\n }",
"public void setREF_DEAL_YIELD(BigDecimal REF_DEAL_YIELD) {\r\n this.REF_DEAL_YIELD = REF_DEAL_YIELD;\r\n }",
"public void setREF_DEAL_CLASS(BigDecimal REF_DEAL_CLASS)\r\n {\r\n\tthis.REF_DEAL_CLASS = REF_DEAL_CLASS;\r\n }",
"public void setREF_DEAL_CLASS(BigDecimal REF_DEAL_CLASS) {\r\n this.REF_DEAL_CLASS = REF_DEAL_CLASS;\r\n }",
"public void setLINKED_DEAL_NO(BigDecimal LINKED_DEAL_NO)\r\n {\r\n\tthis.LINKED_DEAL_NO = LINKED_DEAL_NO;\r\n }",
"public void setREF_DEAL_TYPE(BigDecimal REF_DEAL_TYPE)\r\n {\r\n\tthis.REF_DEAL_TYPE = REF_DEAL_TYPE;\r\n }",
"public BigDecimal getREF_DEAL_YIELD()\r\n {\r\n\treturn REF_DEAL_YIELD;\r\n }",
"public BigDecimal getREF_DEAL_YIELD() {\r\n return REF_DEAL_YIELD;\r\n }",
"public void setDEALID(java.lang.Long value) {\n this.DEAL_ID = value;\n }",
"public void setDEAL_CLASSIFY_DUE_SETLD_DATE(Date DEAL_CLASSIFY_DUE_SETLD_DATE)\r\n {\r\n\tthis.DEAL_CLASSIFY_DUE_SETLD_DATE = DEAL_CLASSIFY_DUE_SETLD_DATE;\r\n }",
"public void setDESIGN(BigDecimal DESIGN) {\r\n this.DESIGN = DESIGN;\r\n }",
"public void setDEAL_DATE(Date DEAL_DATE)\r\n {\r\n\tthis.DEAL_DATE = DEAL_DATE;\r\n }",
"public void setDOWN_PAYMENT(BigDecimal DOWN_PAYMENT)\r\n {\r\n\tthis.DOWN_PAYMENT = DOWN_PAYMENT;\r\n }",
"public void setDEAL_NO(BigDecimal DEAL_NO) {\r\n this.DEAL_NO = DEAL_NO;\r\n }",
"public void setCHARGE_ON_DEAL(BigDecimal CHARGE_ON_DEAL)\r\n {\r\n\tthis.CHARGE_ON_DEAL = CHARGE_ON_DEAL;\r\n }",
"public void setDEALIND(java.lang.Long value) {\n this.DEAL_IND = value;\n }",
"public void setDEALPOINTREFERENCEID(java.lang.Long value) {\n this.DEAL_POINT_REFERENCE_ID = value;\n }",
"public void setDEAL_RATE(BigDecimal DEAL_RATE)\r\n {\r\n\tthis.DEAL_RATE = DEAL_RATE;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepares the table diff file, with tables modified post the specified event id. | public static void prepareTableDiffFile(List<NotificationEvent> notificationEvents, Hive hiveDb,
ReplLoadWork work, HiveConf conf) throws Exception {
HashSet<String> modifiedTables = new HashSet<>();
for (NotificationEvent event : notificationEvents) {
String tableName = event.getTableName();
if (tableName != null) {
LOG.debug("Added table {} because of eventId {} and eventType {}", event.getTableName(), event.getEventId(),
event.getEventType());
modifiedTables.add(event.getTableName());
}
}
Path dumpPath = new Path(work.dumpDirectory).getParent();
FileSystem fs = dumpPath.getFileSystem(conf);
Path diffFilePath = new Path(dumpPath, TABLE_DIFF_INPROGRESS_DIRECTORY);
fs.mkdirs(diffFilePath);
for (String table : modifiedTables) {
String tables = "";
LOG.info("Added table {} to table diff", table);
ArrayList<String> pathList = getListing(work.dbNameToLoadIn, table, hiveDb, conf);
for (String path : pathList) {
tables += path + System.lineSeparator();
}
Utils.writeOutput(tables, new Path(diffFilePath, table), conf);
}
LOG.info("Completed writing table diff progress file at {} with entries {}", dumpPath, modifiedTables);
// The operation is complete, we can rename to TABLE_DIFF_COMPLETE
fs.rename(diffFilePath, new Path(dumpPath, TABLE_DIFF_COMPLETE_DIRECTORY));
LOG.info("Completed renaming table diff progress file to table diff complete file.");
} | [
"@Override\n public void copyStagingFileToTemporaryTable() {\n }",
"private void setNewFile(Hashtable<Integer, byte[]> table, int chunkId, String chunkName, int size) {\n File file = new File(DIR + chunkName);\n\n log.info(\"Replace the corrupted file chunk \" + chunkName);\n\n byte[] data = table.get(chunkId);\n data = Arrays.copyOfRange(data, 0, size);\n\n try(FileOutputStream fo = new FileOutputStream(file)) {\n fo.write(data);\n } catch(IOException e){\n e.printStackTrace();\n }\n }",
"protected abstract String getAlterTable(boolean nextLine, boolean only);",
"protected void reloadAndReformatTableData()\n {\n logTable.loadAndFormatData();\n }",
"private void updateAllFilesTable() {\n StorageMessages.UpdateAllFilesTable updateAllFilesTableMsg\n = protoWrapperIn.getUpdateAllFilesTable();\n String inputFileChunk = updateAllFilesTableMsg.getInputFileChunk();\n int nodeId = updateAllFilesTableMsg.getNodeId();\n stMetaData.updateAllFilesPosTable(inputFileChunk, nodeId);\n }",
"public static void ProcessTransaction(){\r\n\t Iterator<String> iter = masterEventsFile.iterator();\r\n\t //this uses the deletePastEvents method to delete all the past events in the masterEventsFile\r\n\t while (iter.hasNext()){\r\n\t\t String e = iter.next();\r\n\t \r\n\t //for (String e : masterEventsFile){\r\n\t\t Event CheckEvent = new Event(e);\r\n\t\t boolean pastDate = deletePastEvents(CheckEvent);\r\n\t\t if (!pastDate){\r\n\t\t\t break;\r\n\t\t } \r\n\t }\r\n\t //makes each line of the masterEventFile into an Event object for easier processing\r\n\t for (String e : masterEventsFile){\r\n\t\t Event event = new Event(e);\r\n\t\t alteredEventsFile.add(event);\r\n\t }\r\n\t //makes each line into a Transaction object for easier processing\r\n\t for (String t: mergedEventTransactionFile){\r\n\t\t Transaction transaction= new Transaction(t);\r\n\t\t allTransactions.add(transaction);\r\n\t }\r\n\t \r\n\t //Iterates through each Transaction processing them one at a time based on their id\r\n\t for (Transaction t: allTransactions){\r\n\t\t //process sell, return, create, add, delete,end\r\n\t\t if(t.id == 00){\r\n\t\t\t break;\r\n\t\t }\r\n\t\t Event changeEvent = findEvent(t.name);\r\n\t\t if (changeEvent != null){\r\n\t\t\t if (t.id == 01){\t\t\t\t\t\t//sell transaction\r\n\t\t\t\t if((changeEvent.ticket -t.ticket)<0){\r\n\t\t\t\t\t System.out.println(\"Sell transaction could not be performed, not enough tickets\"); //Contraints: no event should ever have a negative nmber of ticekts\r\n\t\t\t\t }else{\r\n\t\t\t\t\t changeEvent.ticket = changeEvent.ticket -t.ticket;\r\n\t\t\t\t }\r\n\t\t\t }else if (t.id == 02){\t\t\t\t//return transaction\r\n\t\t\t\t changeEvent.ticket =changeEvent.ticket + t.ticket;\r\n\t\t\t }else if (t.id == 04){\t\t\t\t//add transaction\r\n\t\t\t\t changeEvent.ticket += t.ticket;\t\r\n\t\t\t }else if (t.id == 05){\t\t\t\t//delete transaction\r\n\t\t\t\t changeEvent = null;\r\n\t\t\t }\r\n\t\t }else{\t\t\t\t\t\t\t\t//constraint: a new event must have a name different from all existing events\r\n\t\t\t if(t.id == 03){\t\t\t\t\t\t//create transaction\r\n\t\t\t\t Event newEvent = new Event (t.getEventLine());\r\n\t\t\t\t InsertEvent(newEvent);\t\t//constraint: <asterEventFile must be kept in ascending order by date\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t \r\n\t String newMasterEventsFile = \"\";\r\n\t String newCurrentEventsFile = \"\"\r\n\t\t\t ;\r\n\t // creates two strings in proper format for output to currenteventsFile and MasterEventsFile\r\n\t for (Event e: alteredEventsFile){\t\t\t\t\t\t\t\t//assumes correct input... constraint:every line is exactly 33 characters(plus newline)\r\n\t\t newMasterEventsFile += e.getEventLine() +\"\\n\";\r\n\t\t newCurrentEventsFile += e.getCurrentEventLine() + \"\\n\";\r\n\t }\r\n\t \r\n\t //does file output stuff\r\n\t try{\r\n\t\t endBackEnd(newMasterEventsFile, newCurrentEventsFile);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }",
"private void analyzeLoadIntoIcebergTable() throws AnalysisException {\n Path sourcePath = sourceDataPath_.getPath();\n String tmpTableName = QueryStringBuilder.createTmpTableName(dbName_,\n tableName_.getTbl());\n QueryStringBuilder.Create createTableQueryBuilder =\n QueryStringBuilder.Create.builder().table(tmpTableName, true);\n try {\n FileSystem fs = sourcePath.getFileSystem(FileSystemUtil.getConfiguration());\n Path filePathForLike = sourcePath;\n // LIKE <file format> clause needs a file to infer schema, for directories: list\n // the files under the directory and pick the first one.\n if (fs.isDirectory(sourcePath)) {\n RemoteIterator<? extends FileStatus> fileStatuses = FileSystemUtil.listFiles(fs,\n sourcePath, true, \"\");\n while (fileStatuses.hasNext()) {\n FileStatus fileStatus = fileStatuses.next();\n String fileName = fileStatus.getPath().getName();\n if (fileStatus.isFile() && !FileSystemUtil.isHiddenFile(fileName)) {\n filePathForLike = fileStatus.getPath();\n break;\n }\n }\n }\n String magicString = FileSystemUtil.readMagicString(filePathForLike);\n if (magicString.substring(0, 4).equals(ParquetFileWriter.MAGIC_STR)) {\n createTableQueryBuilder.like(\"PARQUET\", \"%s\").storedAs(\"PARQUET\");\n } else if (magicString.substring(0, 3).equals(OrcFile.MAGIC)) {\n createTableQueryBuilder.like(\"ORC\", \"%s\").storedAs(\"ORC\");\n } else {\n throw new AnalysisException(String.format(\"INPATH contains unsupported LOAD \"\n + \"format, file '%s' has '%s' magic string.\", filePathForLike, magicString));\n }\n createTableQueryBuilder.tableLocation(\"%s\");\n createTableQueryBuilder.property(\"TEMPORARY\", \"true\");\n } catch (IOException e) {\n throw new AnalysisException(\"Failed to generate CREATE TABLE subquery \"\n + \"statement. \", e);\n }\n createTmpTblQuery_ = createTableQueryBuilder.build();\n QueryStringBuilder.Insert insertTblQueryBuilder = QueryStringBuilder.Insert.builder()\n .overwrite(overwrite_)\n .table(tableName_.toString());\n QueryStringBuilder.Select insertSelectTblQueryBuilder =\n QueryStringBuilder.Select.builder().selectList(\"*\").from(tmpTableName);\n insertTblQueryBuilder.select(insertSelectTblQueryBuilder);\n insertTblQuery_ = insertTblQueryBuilder.build();\n dropTmpTblQuery_ = QueryStringBuilder.Drop.builder().table(tmpTableName).build();\n }",
"private void logTableDDL(Table t) throws HsqlException {\n\n StringBuffer tableDDL;\n String sourceDDL;\n\n tableDDL = new StringBuffer();\n\n DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL);\n\n sourceDDL = DatabaseScript.getDataSource(t);\n\n database.logger.writeToLog(session, tableDDL.toString());\n\n if (sourceDDL != null) {\n database.logger.writeToLog(session, sourceDDL);\n database.logger.synchLog();\n }\n }",
"private static BinlogEventV4 formBinLogTableMapEvent(String dbName, String tableName, long tableId) {\n //Second event is always a Table_Map_Event\n BinlogEventV4HeaderImpl tableMapEventHeader = new BinlogEventV4HeaderImpl();\n tableMapEventHeader.setTimestamp(System.currentTimeMillis());\n tableMapEventHeader.setEventType(MySQLConstants.TABLE_MAP_EVENT);\n tableMapEventHeader.setServerId(1);\n TableMapEvent tableMapEvent = new TableMapEvent(tableMapEventHeader);\n tableMapEvent.setTableId(tableId);\n tableMapEvent.setDatabaseNameLength(dbName.length());\n tableMapEvent.setDatabaseName(StringColumn.valueOf(dbName.getBytes()));\n tableMapEvent.setTableNameLength(tableName.length());\n tableMapEvent.setTableName(StringColumn.valueOf(tableName.getBytes()));\n return tableMapEvent;\n }",
"private void prepareLayout() {\n\n\t\tm_layouts = new ArrayList<SQLTableLayout>();\n\n\t\t//\n\t\t// construct the table tag\n\t\t//\n\t\tSQLTableLayout layout = new SQLTableLayout(TAG_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"tag id\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_NAME, \"TEXT\", \"tag name\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_CREATE_DATE, \"TEXT\",\n\t\t\t\t\"creation date of tag\");\n\t\tlayout.addFieldToSQLTableLayout(TAG_FIELD_USAGE, \"INTEGER\",\n\t\t\t\t\"tag usage in repository\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the table file\n\t\t//\n\t\tlayout = new SQLTableLayout(FILE_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"file id\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_PATH, \"TEXT\", \"path of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_TYPE, \"TEXT\", \"type of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_CREATE_DATE, \"TEXT\",\n\t\t\t\t\"creation date of file\");\n\t\tlayout.addFieldToSQLTableLayout(FILE_FIELD_HASH_SUM, \"TEXT\",\n\t\t\t\t\"hash sum of file\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the mapping table\n\t\t//\n\t\tlayout = new SQLTableLayout(MAP_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"map id\");\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_FILE, \"INTEGER\", \"file id\");\n\t\tlayout.addFieldToSQLTableLayout(MAP_FIELD_TAG, \"INTEGER\", \"tag id\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct the directory table\n\t\t//\n\t\tlayout = new SQLTableLayout(DIRECTORY_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(DIRECTORY_FIELD_ID,\n\t\t\t\t\"INTEGER primary key\", \"directory id\");\n\t\tlayout.addFieldToSQLTableLayout(DIRECTORY_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"path of directory\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct pending file table\n\t\t//\n\t\tlayout = new SQLTableLayout(PENDING_FILE_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(PENDING_FIELD_ID,\n\t\t\t\t\"INTEGER primary key\", \"pending id\");\n\t\tlayout.addFieldToSQLTableLayout(PENDING_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"pending path of file\");\n\t\tm_layouts.add(layout);\n\n\t\t//\n\t\t// construct synchronized table\n\t\t//\n\t\tlayout = new SQLTableLayout(SYNC_TABLE_NAME);\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_ID, \"INTEGER primary key\",\n\t\t\t\t\"sync id\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_PATH, \"TEXT\",\n\t\t\t\t\"path of synced file\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_DATE, \"TEXT\", \"sync date\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_TAGS, \"TEXT\",\n\t\t\t\t\"tags of synced file\");\n\t\tlayout.addFieldToSQLTableLayout(SYNC_FIELD_HASH_SUM, \"TEXT\",\n\t\t\t\t\"hash sum of synced file\");\n\t\tm_layouts.add(layout);\n\t}",
"private boolean atualizaTabela(int i, Event e) {\n\n boolean res = true;\n // Model da tabela\n MOMutableTableModel model = (MOMutableTableModel) this.mib.getDataEventsEntry().getModel();\n // Verificar se o evento têm de ser apagado\n if(!e.toDelete()) {\n // Linha da tabela\n DataEventsMib.DataEventsEntryRow er = this.mib.getDataEventsEntry().getModel().getRow(new OID(String.valueOf(i)));\n\n // Verificar se a linha existe na tabela\n if (er != null) {\n // atualizar os valores das varias colunas desta linha\n er.setDataEventsIndex(new Counter32(i));\n er.setDataEventsIdent(e.getIdentFormat());\n er.setDataEventsMsg(e.getMsgFormat());\n er.setDataEventsTimeYears(e.getAnosFormat());\n er.setDataEventsTimeMonths(e.getMesesFormat());\n er.setDataEventsTimeWeeks(e.getSemanasFormat());\n er.setDataEventsTimeDays(e.getDiasFormat());\n er.setDataEventsTimeHours(e.getHorasFormat());\n er.setDataEventsTimeMinutes(e.getMinutosFormat());\n er.setDataEventsTimeDeleteYears(e.getAnosDelFormat());\n er.setDataEventsTimeDeleteMonths(e.getMesesDelFormat());\n er.setDataEventsTimeDeleteWeeks(e.getSemanasDelFormat());\n er.setDataEventsTimeDeleteDays(e.getDiasDelFormat());\n er.setDataEventsTimeDeleteHours(e.getHorasDelFormat());\n er.setDataEventsTimeDeleteMinutes(e.getMinutosDelFormat());\n } else {\n Variable[] variaveis = new Variable[15];\n\n variaveis[0] = new Counter32(i);\n variaveis[1] = e.getIdentFormat();\n variaveis[2] = e.getMsgFormat();\n variaveis[3] = e.getAnosFormat();\n variaveis[4] = e.getMesesFormat();\n variaveis[5] = e.getSemanasFormat();\n variaveis[6] = e.getDiasFormat();\n variaveis[7] = e.getHorasFormat();\n variaveis[8] = e.getMinutosFormat();\n variaveis[9] = e.getAnosDelFormat();\n variaveis[10] = e.getMesesDelFormat();\n variaveis[11] = e.getSemanasDelFormat();\n variaveis[12] = e.getDiasDelFormat();\n variaveis[13] = e.getHorasDelFormat();\n variaveis[14] = e.getMinutosDelFormat();\n\n // Adicionar a nova linha a tabela\n this.mib.adicionaLinhaTabela(i, model, variaveis);\n }\n } else {\n // Apagar o evento da MIB\n res = false;\n this.mib.removeLinhaTabela(i,model);\n }\n return res;\n }",
"@Override\n public void onAlterTable(AlterTableEvent alterTableEvent) {\n String dbName = alterTableEvent.getNewTable().getDbName();\n String tblName = alterTableEvent.getNewTable().getTableName();\n if (alterTableEvent.isReplicated()) {\n addNameToEventMap(replicatedDbsForEvents, dbName, alterTableEvent);\n addNameToEventMap(replicatedTablesForEvents, tblName, alterTableEvent);\n } else {\n addNameToEventMap(nonReplicatedDbsForEvents, dbName, alterTableEvent);\n }\n }",
"protected void updateEventLogTable() {\r\n\t if(eventLogTable.isDisposed())\r\n\t return;\r\n\t \r\n\t List loggedEvents = memoryHandler.getLoggedRecords();\r\n\t while(eventCount < loggedEvents.size()) {\r\n\t LogRecord event = (LogRecord) loggedEvents.get(eventCount);\r\n\t String eventLevel = event.getLevel().toString();\r\n\t String eventDate = Main.DATE_FORMATTER.format(new Date(event.getMillis())); \r\n\t String[] eventItem = new String[] {eventLevel, eventDate, event.getMessage()};\r\n\t\t TableItem item = new TableItem(eventLogTable, SWT.NONE);\r\n\t\t item.setText(eventItem);\r\n\t \r\n\t\t if(event.getLevel().equals(Level.SEVERE))\r\n\t\t item.setImage(errorEventIcon);\t \r\n\t\t else if(event.getLevel().equals(Level.WARNING))\r\n\t\t item.setImage(warningEventIcon);\r\n\t\t else if(event.getLevel().equals(Level.INFO))\r\n\t\t item.setImage(informationEventIcon);\r\n\t \r\n\t\t ++eventCount;\r\n\t }\r\n\t \r\n\t eventLogTable.setTopIndex(Math.max(eventLogTable.getItemCount()-1, 0));\r\n\t}",
"public void setupRIBFiles() {\n mRTS.mTimeMan.findAndSetEmptyDayNo();\n mRTS.mEventHandler.writeEventHeaderFile();\n mRTS.mDataLogHandler.writeDayHeaderFile();\n\n }",
"void copyExceptionTable() throws IOException {\n int tableLength = c.copyU2(); // exception table len\n if (tableLength > 0) {\n traceln();\n traceln(\"Exception table:\");\n traceln(\" from:old/new to:old/new target:old/new type\");\n for (int tcnt = tableLength; tcnt > 0; --tcnt) {\n int startPC = c.readU2();\n int newStartPC = map[startPC];\n c.writeU2(newStartPC);\n int endPC = c.readU2();\n int newEndPC = map[endPC];\n c.writeU2(newEndPC);\n int handlerPC = c.readU2();\n int newHandlerPC = map[handlerPC];\n c.writeU2(newHandlerPC);\n int catchType = c.copyU2();\n if (Inject.verbose) {\n traceFixedWidthInt(startPC, 6);\n traceFixedWidthInt(newStartPC, 6);\n traceFixedWidthInt(endPC, 6);\n traceFixedWidthInt(newEndPC, 6);\n traceFixedWidthInt(handlerPC, 6);\n traceFixedWidthInt(newHandlerPC, 6);\n trace(\" \");\n if (catchType == 0)\n traceln(\"any\");\n else {\n traceln(\"\" + catchType);\n }\n }\n }\n }\n }",
"private void createDestTable() {\n String primaryKeyName = cl_src.getPrimaryKey_Name(columnData_src);\n tl_des.createTable(database_des, tableRight, primaryKeyName);\n }",
"protected void getUpdatedTable(String table) {\n if (table != null) {\n switch (table) {\n case \"odds\" -> {\n database.commandSync(table);\n printWriter.println(\"SQL_TABLE\" + database.oddsTableList);\n }\n case \"bookies\" -> {\n database.commandSync(table);\n printWriter.println(\"SQL_TABLE\" + database.bookiesTableList);\n }\n case \"football-match-data\" -> {\n database.commandSync(table);\n printWriter.println(\"SQL_TABLE\" + database.matchTableList);\n }\n default -> System.out.println(\"Error: Table Error\");\n }\n }\n }",
"@Override\n protected void loadAndFormatData()\n {\n // Create an object to hold the log data\n final Object[][] tableLogList = new Object[perfLog.getPerfLogData().size()][NUM_COLUMNS];\n int row = 0;\n\n // Create the output format string for the time stamps so that\n // the decimals align with the text centered\n String timeFormat = \"%\"\n + (String.valueOf((int) (plotPrefs.isShowDataGaps(false)\n ? perfLog.getMaximumTimeStamp()\n : perfLog.getAdjustedDataTimeSpan())).length()\n + TIME_PRECISION + 1)\n + TIME_FORMAT.substring(1);\n\n // Collect the log data and format it for the table cells\n for (PerfLog log : perfLog.getPerfLogData())\n {\n // Get the performance ID object associated with the log ID\n PerformanceID pid = perfIDs.getPerfID(log.getPerfID());\n\n tableLogList[row][INDEX] = row;\n tableLogList[row][ID] = perfIDs.convertIDToHexString(log.isEntryEvent()\n ? pid.getPerfID()\n : pid.getPerfID()\n | EXIT_MASK);\n tableLogList[row][NAME] = pid.getPerfIDName(false);\n tableLogList[row][TIME] = String.format(timeFormat, log.getTimeStamp());\n tableLogList[row][ENT_EX] = log.isEntryEvent();\n tableLogList[row][SEQ_ERR] = log.isSequenceError();\n tableLogList[row][OVER] = log.getOverrun() == 0.0\n ? \"\"\n : String.format(TIME_FORMAT,\n log.getOverrun());\n tableLogList[row][NOTES] = log.getNotes();\n\n row++;\n }\n\n // Place the log data into the table model along with the\n // column names, set up the editors and renderers for the table\n // cells, set up the table grid lines, and calculate the\n // minimum width required to display the table information\n int totalWidth = setUpdatableCharacteristics(tableLogList,\n new String[] {\"Index\",\n \"ID\",\n \"Name\",\n \"<html><center>Time Stamp<br>(sec)\",\n \"<html><center>Entry/<br>Exit\",\n \"<html><center>Seq<br>Err\",\n \"<html><center>Overrun<br>(sec)\",\n \"<html><center>Notes\"},\n true,\n true,\n true);\n\n // Fit the dialog to the table and set the minimum size based\n // on the column widths\n setDialogMinimumSize(totalWidth);\n\n // Set the dialog's title so that it includes the log file\n // name(s)\n setTitle(\"Log Data: \"\n + perfLog.getLogFileName(perfMain.getPreference(PERF_LOG_FILE)));\n }",
"public void refreshTable() {\t\t\n\t\ttry {\n\t\t\ttableTraffics.getItems().clear();\n\t\t\ttableTraffics.getItems().addAll(controller.getTraffics());\n\t\t\ttableTraffics.refresh();\n\t\t\t\n\t\t\tCollections.sort(controller.getEvents(), new Comparator<EventAllocatorModel>() {\n\t \t\t@Override\n\t\t\t\tpublic int compare(EventAllocatorModel o1, EventAllocatorModel o2) {\n\t\t\t\t\tString name1 = o1.getEvent().getName();\n\t\t\t\t\tString name2 = o2.getEvent().getName();\n\t \t\t\tint comp = name1.compareTo(name2);\n\t\t\t\t\tif(comp!=0){\n\t \t\t\t\treturn comp;\n\t \t\t\t}else{\n\t \t\t\t\tif(o1.getSize()>o2.getSize()){\n\t \t\t\t\t\treturn 1;\n\t \t\t\t\t}else{\n\t \t\t\t\t\treturn -1;\n\t \t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttableEvents.getItems().clear();\n\t\t\ttableEvents.getItems().addAll(controller.getEvents());\n\t\t\ttableEvents.refresh();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tdisplayMessage(\"Error\", e.getMessage());\n\t\t\tcontroller.rollback();\t\t\t\n\t\t}\n\t\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies the status for the issue according to the estimation and sprint it is or is not assigned, and enforces the right status. | public boolean verifyAndSetStatus() {
if (status == FINISHED) {
// No further checks needed
return false;
}
if (Float.compare(estimation, 0f) <= 0) {
if (status == READY_FOR_ESTIMATION) {
return false;
} else {
status = READY_FOR_ESTIMATION;
return true;
}
} else {
// If no sprint was yet assigned, we must be in state
// READY_FOR_SPRINT, otherwise in state IN_SPRINT
if (sprint == null) {
if (status == READY_FOR_SPRINT) {
return false;
} else {
status = READY_FOR_SPRINT;
return true;
}
} else {
if (status == IN_SPRINT) {
return false;
} else {
status = IN_SPRINT;
return true;
}
}
}
} | [
"public void assertValidStatus(GalaxyWorkflowStatus status) {\n\t\tassertNotNull(status, \"WorkflowStatus is null\");\n\t\tfloat percentComplete = status.getProportionComplete();\n\t\tassertTrue(0.0f <= percentComplete && percentComplete <= 1.0f, \"proportion not in range of 0 to 1\");\n\t}",
"public void verifyStatus(PersonDto person) {\n if (person.getStatus() == null || person.getStatus().getName() == null) {\n throw new VerificationException(\"No status provided\");\n }\n Status status = statusRepo.findByName(person.getStatus().getName());\n if (status == null) {\n throw new VerificationException(\"Status invalid\");\n }\n }",
"@Test\n public void testStatus() {\n URI lra = URI.create(invoke(REQUIRED_LRA_PATH, PUT, null, 200, ContextTckResource.EndPhase.ACCEPTED, 202));\n\n // verify that the resource was asked to complete and is in the state Completing\n String status = invoke(STATUS_PATH, HttpMethod.GET, lra, 202, ContextTckResource.EndPhase.SUCCESS, 200);\n lraTestService.waitForCallbacks(lra);\n assertEquals(testName.getMethodName() + \": participant is not completing\", ParticipantStatus.Completing.name(),\n status);\n\n // clear the EndPhase override data so that the next status request returns completed or compensated\n invoke(CLEAR_STATUS_PATH, HttpMethod.POST, lra, 200, ContextTckResource.EndPhase.SUCCESS, 200);\n\n // trigger a replay of the end phase\n lraTestService.waitForRecovery(lra);\n\n // and verify that the resource was asked to complete\n status = invoke(STATUS_PATH, HttpMethod.GET, lra, 200, ContextTckResource.EndPhase.SUCCESS, 200);\n assertEquals(testName.getMethodName() + \": participant is not completed\", ParticipantStatus.Completed.name(),\n status);\n }",
"public void testStatusFields() {\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.STARTED);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.SUBMITTED);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.DONE);\n assertTrue(\"Error implementing status codes\",\n JobStatus.NEW !=\n JobStatus.FAILED);\n JobStatus s = JobStatus.NEW;\n assertEquals(\"Error implementing status code names for NEW\", \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for NEW\", \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.SUBMITTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.STARTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.DONE;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.FAILED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n s = JobStatus.RESUBMITTED;\n assertEquals(\"Error implementing status code names for \" + s.name(), \n \t\ts, JobStatus.valueOf( s.name()));\n assertEquals(\"Error implementing status ordinal for \" + s.name(), \n \t\ts, JobStatus.fromOrdinal(s.ordinal()));\n }",
"public void Building_Permit_Assertion()\n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.BuildingPermitApprovalPDF(pdfoutput);\n\t\t\t{\n\t\t\t\tmAssert(BPAL_APPLICATIONNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No is :::\"+BPAL_APPLICATIONNO +\",Expected is :::\"+ApplicationNoforLandDev);\n\t\t\t\tmAssert(BPAL_OWNERNAME.get(CurrentinvoCount), Bpr_OwnerFullName.get(CurrentinvoCount), \"Actual Owner Name is :::\"+BPAL_OWNERNAME +\",Expected is :::\"+Bpr_OwnerFullName);\n\t\t\t\tmAssert(BPAL_WARD.get(CurrentinvoCount), Bpr_ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+BPAL_WARD +\",Expected is :::\"+Bpr_ward);\n\t\t\t\tmAssert(BPAL_KHATANO.get(CurrentinvoCount), Bpr_KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+BPAL_KHATANO +\",Expected is:::\"+Bpr_KhataNo);\n\t\t\t\tmAssert(BPAL_HOLDINGNO.get(CurrentinvoCount), Bpr_HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+BPAL_HOLDINGNO +\",Expected is:::\"+Bpr_HoldingNo);\n\t\t\t\tmAssert(BPAL_VILLAGE.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+BPAL_VILLAGE +\",Expected is:::\"+Bpr_Village);\n\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"private void setIssueStatus(Issue issue, DesignDecisionStatus decisionStatus) {\n\t\t\n\t\tswitch(decisionStatus) {\n\t\tcase BLOCKED:\n\t\t\tbreak;\n\t\tcase COLLECTING_ALTERNATIVES:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.IN_PROGRESS);\n\t\t\tbreak;\n\t\tcase DECIDED:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.RESOLVED);\n\t\t\tbreak;\n\t\tcase INAPPROPRIATE_SOLUTION:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.IN_PROGRESS);\n\t\t\tbreak;\n\t\tcase OBSOLETE:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.OBSOLETE);\n\t\t\tbreak;\n\t\tcase RANK_ALTERNATIVES:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.IN_PROGRESS);\n\t\t\tbreak;\n\t\tcase SELECTING_ALTERNATIVES:\n\t\t\tissue.setIssueStatus(Issue.IssueStatus.IN_PROGRESS);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"@Test\n\tpublic void updateExpense_invalidStatus() throws Exception {\n\t\tExpenseService service = new ExpenseServiceImpl(repository);\n\t\tExpense expense = new Expense();\n\t\texpense.setStatus(\"invalid\");\n\t\t\n\t\twhen(repository.findOne(eq(\"1\"))).thenReturn(savedExpense());\n\t\t\n\t\ttry {\n\t\t\tservice.updateExpense(\"1\", expense, null);\n\t\t\tfail(\"Expected ValidationException\");\n\t\t} catch (ValidationException e) {\n\t\t\tassertEquals(\"Expense status is invalid (must be either 'new' or 'reimbursed')\", e.getMessage());\n\t\t}\n\t}",
"private void validateListOfStatus( ActionMapping pMapping, HttpServletRequest pRequest )\n {\n setQCClosedDefectStatus( getQCClosedDefectStatus().trim() );\n if ( getQCClosedDefectStatus().length() == 0 )\n {\n addError( \"QCClosedDefectStatus\", new ActionError( \"project_creation.QC.testmanager.error.closedDefects\" ) );\n }\n setQCCoveredReqStatus( getQCCoveredReqStatus().trim() );\n if ( getQCCoveredReqStatus().length() == 0 )\n {\n addError( \"QCCoveredReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.coveredReq\" ) );\n }\n setQCOkRunStatus( getQCOkRunStatus().trim() );\n if ( getQCOkRunStatus().length() == 0 )\n {\n addError( \"QCOkRunStatus\", new ActionError( \"project_creation.QC.testmanager.error.okRun\" ) );\n }\n setQCOpenedReqStatus( getQCOpenedReqStatus().trim() );\n if ( getQCOpenedReqStatus().length() == 0 )\n {\n addError( \"QCOpenedReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.openedReq\" ) );\n }\n setQCPassedStepStatus( getQCPassedStepStatus().trim() );\n if ( getQCPassedStepStatus().length() == 0 )\n {\n addError( \"QCPassedStepStatus\", new ActionError( \"project_creation.QC.testmanager.error.passedStep\" ) );\n }\n setQCToValidateReqStatus( getQCToValidateReqStatus().trim() );\n if ( getQCToValidateReqStatus().length() == 0 )\n {\n addError( \"QCToValidateReqStatus\", new ActionError( \"project_creation.QC.testmanager.error.toValidateReq\" ) );\n }\n }",
"public void testSetSubmissionStatus() {\n try {\n sub.setSubmissionStatus(null);\n } catch (Exception e) {\n fail(\"Should not throw anything.\");\n }\n }",
"public void Land_dev_Approval_Assertion()\n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.LandDevApprovalPDF(pdfoutput);\n\t\t\tif(!mGetPropertyFromFile(\"TypeOfExecution\").equalsIgnoreCase(\"individual\")){\n\t\t\t\tmAssert(LDAL_APPLNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Application No does not match in Approval letter Actual :::\"+LDAL_APPLNO +\",Expected is :::\"+ApplicationNoforLandDev);\n\t\t\t\tmAssert(LDAL_OWNERNAME.get(CurrentinvoCount),AlD_Nameofowner.get(CurrentinvoCount), \"Owner Name does not match in Approval letter Actual :::\"+LDAL_OWNERNAME +\",Expected is :::\"+AlD_Nameofowner);\n\t\t\t\tmAssert(LDAP_WARD.get(CurrentinvoCount), ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+LDAP_WARD +\",Expected is :::\"+ward);\n\t\t\t\tmAssert(LDAP_KHATANO.get(CurrentinvoCount), KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+LDAP_KHATANO +\",Expected is:::\"+KhataNo);\n\t\t\t\tmAssert(LDAP_HOLDINGNO.get(CurrentinvoCount), HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+LDAP_HOLDINGNO +\",Expected is:::\"+HoldingNo);\n\t\t\t\tmAssert(LDAP_MSPKHASARA.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot No/Khasara No is :::\"+LDAP_MSPKHASARA +\",Expected is:::\"+PlotKhasraNo);\n\t\t\t\tmAssert(LDAP_PLOTMSP.get(CurrentinvoCount), PlotNoMSP.get(CurrentinvoCount), \"Actual Plot No(MSP) is:::\"+LDAP_PLOTMSP +\",Expected is:::\"+PlotNoMSP);\n\t\t\t\tmAssert(LDAP_VILLAGE.get(CurrentinvoCount), Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+LDAP_VILLAGE +\",Expected is:::\"+Village);\n\t\t\t\tmAssert(LDAP_MSPKHASARA.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot No/Khasara No is :::\"+LDAP_MSPKHASARA +\",Expected is:::\"+PlotKhasraNo);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"protected void checkValueOkVariableStatus(int status)\n {\n \n if (status < 0)\n throw new IllegalArgumentException(\"The GSI variable status value \" + status + \" must be nonnegative.\");\n \n }",
"public void setStatusInReview() throws BusinessRuleException\n {\n this.testSetStatusInReview();\n this.doSetStatus(STATUS_IN_REVIEW);\n }",
"public String validateStatusBeforeFutureStatus(MaintenanceRequest mrq, String status){\n\t\tMaintenanceRequestStatus currentStatus = convertPOStatus(mrq.getMaintReqStatus());\n\t\tMaintenanceRequestStatus futureStatus = convertPOStatus(status);\n\t\tString message = \"\";\n\t\t\n\t\tif(currentStatus != null && futureStatus != null){\n\t\t\tif(currentStatus.getSortOrder() >= futureStatus.getSortOrder()){\n\t\t\t\tmessage = \"This PO has already reached \" + futureStatus.getDescription() + \" status\";\n\t\t\t}\n\t\t}\n\t\treturn message;\n\t}",
"public void checkStatus() {\n\t\thealthPerc = ((double)health / (double)maxHealth );\n\t\tdead = (healthPerc <= 0);\n\t}",
"public void testOrderSetStatus() {\n DomainConfiguration dc = TestInfo.getDefaultConfig(TestInfo.getDefaultDomain());\n Job job = Job.createJob(TestInfo.HARVESTID, highChan, dc, 0);\n\n // Test valid order of status changes:\n for (int i = JobStatus.NEW.ordinal(); i <= JobStatus.FAILED.ordinal(); i++) {\n job.setStatus(JobStatus.values()[i]);\n assertEquals(\"Status of job set - expected\", i, job.getStatus().ordinal());\n }\n\n // Set status to STATUS_FAILED, to make sure job has right status for the following test:\n job.setStatus(JobStatus.FAILED);\n\n // Test invalid order of status changes:\n for (int i = JobStatus.DONE.ordinal(); i >= JobStatus.NEW.ordinal(); i--) {\n try {\n job.setStatus(JobStatus.values()[i]);\n fail(\"Failed to throw ArgumentNotValid exception on trying to set status to \"\n + i + \" on a job with STATUS_FAILED\");\n } catch (ArgumentNotValid e) {\n // expected\n }\n }\n }",
"public void Occupancy_Certificate_Assertion() \n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.OccupancyCertificateApprovalPDF(pdfoutput);\n\t\t\t{\n\t\t\t\tmAssert(OCAL_APPLNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No is :::\"+OCAL_APPLNO +\",Expected is :::\"+applicationNo);\n\t\t\t\t//\tmAssert(OCAL_OWNERNAME.get(CurrentinvoCount), Nameofowner.get(CurrentinvoCount), \"Actual Owner Name is :::\"+OCAL_OWNERNAME +\",Expected is :::\"+Bpr_Nameofowner);\n\t\t\t\t/*mAssert(OCAL_WARD.get(CurrentinvoCount), Bpr_ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+LDAP_WARD +\",Expected is :::\"+Bpr_ward);\n\t\t\t\tmAssert(OCAL_KHATANO.get(CurrentinvoCount), Bpr_KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+OCAL_KHATANO +\",Expected is:::\"+Bpr_KhataNo);\n\t\t\t\tmAssert(OCAL_HOLDINGNO.get(CurrentinvoCount), Bpr_HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+LDAP_HOLDINGNO +\",Expected is:::\"+Bpr_HoldingNo);\n\t\t\t\tmAssert(OCAL_PLOTNOMSP.get(CurrentinvoCount), Bpr_PlotNoMSP.get(CurrentinvoCount), \"Actual Plot No(MSP) is:::\"+OCAL_PLOTNOMSP +\",Expected is:::\"+Bpr_PlotNoMSP);\n\t\t\t\tmAssert(OCAL_VILLAGE.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+LDAP_VILLAGE +\",Expected is:::\"+Village);\n\t\t\t\tmAssert(OCAL_PLOTNOCS.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+OCAL_PLOTNOCS +\",Expected is:::\"+Village);*/\n\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"void setAttemptObjSatisfied(String iID,\n String iObjID,\n String iStatus);",
"public void validateUIStatus() {\n\n boolean timeZoneCheck = false, timeFormatCheck = false, fetchTimeCheck = false, statusPathCheck = false;\n\n if (!timeZone.getText().isEmpty()) {\n timeZoneCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Time zone should not be Empty.\\n\");\n }\n if (!statusPath.getText().isEmpty()) {\n statusPathCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Status File should not be empty.\\n\");\n }\n if (!fetchTime.getText().isEmpty()) {\n fetchTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Refresh Time should not be empty.\\n\");\n }\n if (!timeFormat.getText().isEmpty()) {\n timeFormatCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Date & Time format should not be Empty.\\n\");\n }\n\n if (timeFormatCheck == true && timeZoneCheck == true && fetchTimeCheck == true && statusPathCheck == true) {\n uiStatusCheck = true;\n } else {\n\n uiStatusCheck = false;\n timeZoneCheck = false;\n timeFormatCheck = false;\n fetchTimeCheck = false;\n statusPathCheck = false;\n }\n }",
"@Test\n public void statusValidInit() {\n Status grunty = new Status(StatusName.VOIDSTATUS, 4);\n Assert.assertEquals(\"Status should be of name voidstatus\",\n StatusName.VOIDSTATUS, grunty.getName());\n Assert.assertEquals(\"Status should be of level 4, actual\", 4,\n grunty.getLvl(), 0.1);\n Assert.assertEquals(\"Status should be of duration -1\", -1,\n grunty.getDuration());\n grunty.setDuration(5000);\n Assert.assertEquals(\"Status should be of duration 5000\", 5000,\n grunty.getDuration());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
intermediate (multidimensional arrays) todo: a bank will give you 2% interest on your savings stored on an account book. for a certain amount of money you want to store in the account book create a multidimensional array where the interest of the next 10 years is stored. For that save the year and the amount of money. Write a method which takes a certain year as input (e.g. 2019) and an amount of money you would like to store and returns the saving you would have for this year. | public static void main(String[] args){
int currentYear = 2018;
int targetYear = 2020;
int initialSavings = 7800;
double[][] accountBook = computeInterest(currentYear, initialSavings);
System.out.println("In the year " + targetYear + " you would have saved " + accountBook[targetYear-currentYear-1][1]);
} | [
"public static double calculateSavings(double initial_deposit, \n double yearly_interest_rate,\n int num_years){\n\t if (num_years == 0){\n return initial_deposit;\n }\n\n //System.out.printf(initial_deposit+\" \"+yearly_interest_rate+\" \"+num_years);\n System.out.printf(\"| %.2f | %.2f | %d |\\n\", initial_deposit, yearly_interest_rate, num_years);\n\n \n\t // If num_years > 0, then for the first year we make\n\t // (interest_rate * initial) + initial. Feed this into the\n\t // same function, but now for one fewer year since we have accounted\n\t // for the value after this year.\n\t \n //Variables\n double initValue = (initial_deposit * yearly_interest_rate) + initial_deposit;\n double answer = calculateSavings(initValue, yearly_interest_rate, num_years - 1);\n return answer;\n\t}",
"public void calculateInterest(int years) {\n double interestRate = .0185;\n double newBalance = (balance * interestRate * years) + balance;\n System.out.println(\"The current interest rate is: \" + (100 * interestRate));\n System.out.println(\"After \" + years + \"years, your balance will be: \" + newBalance);\n }",
"private double[] estimatePubYear(double[] sumSeries) {\r\n\r\n\t\tdouble[] years = new double[11];\r\n\t\tdouble sum = 0;\r\n\t\tint year = 0;\r\n\r\n\t\tfor (int i = timeStart-1; i<timeEnd; i++){\r\n\r\n\t\t\tif ((i-1)%365==0){\r\n\r\n\t\t\t\tyears[year] = sum;\r\n\t\t\t\tsum = 0;\r\n\t\t\t\tyear++;\r\n\t\t\t}\r\n\r\n\t\t\tsum+= sumSeries[i];\r\n\r\n\t\t}\r\n\r\n\t\treturn years;\r\n\t}",
"private Integer[] calculateYears(){\r\n\t\t\t\tint numYears = 110; //Number of years to put in array\r\n\t\t\t\tInteger[] years = new Integer[numYears];\r\n\t\t\t\tint currYear = Calendar.getInstance().get(Calendar.YEAR);\r\n\t\t\t\t//Loop through and add each year to array up to numYears\r\n\t\t\t\tfor (int i = 0;i<numYears;i++){\r\n\t\t\t\t\tyears[i] = currYear - i;\r\n\t\t\t\t}\r\n\t\t\t\treturn years;\r\n\t\t\t}",
"public static void ordinaryPresentValue(double annualAmount, double interestRate, int numYears)\r\n {\r\n \r\n double presentValue=0; \r\n double presentValueLoop=0;\r\n\r\n //Calculting the present value by formula and printing the results\r\n presentValue = (annualAmount * ((1 - Math.pow((1+interestRate),-numYears)) / interestRate ) ) ;\r\n System.out.printf(\"The present Value of an Ordinary Annuity is %f\\n\", presentValue);\r\n System.out.printf(\"That is the amount you have to start with to give out %.2f at the end\\n\", annualAmount);\r\n System.out.printf(\"of every year for %d years, assuming the remaining money earns %.2f\\n\\n\", numYears, interestRate);\r\n\r\n \r\n //Loop to check the present value is correct or not, if correct the for the last year, the present value should be 0\r\n presentValueLoop = presentValue;\r\n System.out.printf(\"Starting with %f\\n\",presentValue); \r\n for(int i=numYears,j=1; i>0; i--,j++)\r\n {\r\n presentValueLoop -= (annualAmount / (Math.pow((1 + interestRate), i) )) ;\r\n System.out.printf(\"At the end of the year %d, give out %.2f, leaving %.2f\\n\",j,annualAmount,presentValueLoop);\r\n\r\n } \r\n }",
"public static ArrayList<ArrayList<Integer>> getCompletedProjectMonthlyProfitability(String year) {\n int yearProfit[] = new int[12];\n int yearLoss[] = new int[12];\n\n Project project;\n //retrieve all fully completed project for a given year\n try (Connection conn = ConnectionManager.getConnection()) {\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM project WHERE projectReviewStatus = ? and year(end)=?\");\n stmt.setString(1, \"complete\");\n stmt.setString(2, year);\n\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n\n //check the month of the project\n Date date = rs.getDate(\"end\");\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n int month = cal.get(Calendar.MONTH);\n //create the project object\n project = new Project();\n project.setProjectID(rs.getInt(\"projectID\"));\n project.setProjectTitle(rs.getString(\"title\"));\n project.setCompanyName(rs.getString(\"companyName\"));\n project.setBusinessType(rs.getString(\"businessType\"));\n project.setStart(rs.getDate(\"start\"));\n project.setEnd(rs.getDate(\"end\"));\n project.setProjectRemarks(rs.getString(\"projectRemarks\"));\n project.setProjectStatus(rs.getString(\"projectStatus\"));\n project.setActualDeadline(rs.getDate(\"actualDeadline\"));\n project.setFrequency(rs.getString(\"frequency\"));\n project.setProjectType(rs.getString(\"projectType\"));\n project.setEmployee1(rs.getString(\"employee1\"));\n project.setEmployee2(rs.getString(\"employee2\"));\n project.setEmployee1Hours(rs.getDouble(\"employee1Hours\"));\n project.setEmployee2Hours(rs.getDouble(\"employee2Hours\"));\n project.setProjectReviewer(rs.getString(\"projectReviewer\"));\n project.setProjectReviewStatus(rs.getString(\"projectReviewStatus\"));\n project.setDateCompleted(rs.getDate(\"dateCompleted\"));\n project.setMonthlyHours(rs.getString(\"monthlyHours\"));\n project.setPlannedHours(rs.getDouble(\"plannedHours\"));\n\n //check here if profit or loss \n double status = getProfit(project);\n\n //add into respective month arraylist based on month retrieved \n switch (month) {\n case 0:\n if (status > 0) {\n yearProfit[0] += 1;\n } else {\n yearLoss[0] += 1;\n }\n break;\n case 1:\n if (status > 0) {\n yearProfit[1] += 1;\n } else {\n yearLoss[1] += 1;\n }\n break;\n case 2:\n if (status > 0) {\n yearProfit[2] += 1;\n } else {\n yearLoss[2] += 1;\n }\n break;\n case 3:\n if (status > 0) {\n yearProfit[3] += 1;\n } else {\n yearLoss[3] += 1;\n }\n break;\n case 4:\n if (status > 0) {\n yearProfit[4] += 1;\n } else {\n yearLoss[4] += 1;\n }\n break;\n case 5:\n if (status > 0) {\n yearProfit[5] += 1;\n } else {\n yearLoss[5] += 1;\n }\n break;\n case 6:\n if (status > 0) {\n yearProfit[6] += 1;\n } else {\n yearLoss[6] += 1;\n }\n break;\n case 7:\n if (status > 0) {\n yearProfit[7] += 1;\n } else {\n yearLoss[7] += 1;\n }\n break;\n case 8:\n if (status > 0) {\n yearProfit[8] += 1;\n } else {\n yearLoss[8] += 1;\n }\n break;\n case 9:\n if (status > 0) {\n yearProfit[9] += 1;\n } else {\n yearLoss[9] += 1;\n }\n break;\n case 10:\n if (status > 0) {\n yearProfit[10] += 1;\n } else {\n yearLoss[10] += 1;\n }\n break;\n case 11:\n if (status > 0) {\n yearProfit[11] += 1;\n } else {\n yearLoss[11] += 1;\n }\n break;\n }\n }\n } catch (SQLException e) {\n System.out.println(\"SQLException at ProjectDAO getCompletedProjectMonthlyProfitability method: \" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"Unexpected error at ProjectDAO: \" + e.getMessage());\n }\n //combine the 2 arrays\n\n ArrayList<Integer> yearProfitList = new ArrayList();\n ArrayList<Integer> yearLossList = new ArrayList();\n\n for (int i = 0; i < 12; i++) {\n int value = yearProfit[i];\n yearProfitList.add(value);\n }\n\n for (int i = 0; i < 12; i++) {\n int value = yearLoss[i];\n yearLossList.add(value);\n }\n ArrayList<ArrayList<Integer>> complete = new ArrayList();\n\n complete.add(yearProfitList);\n complete.add(yearLossList);\n return complete;\n }",
"public static void duePresentValue(double annualAmount, double interestRate, int numYears)\r\n {\r\n\r\n double duePresentValue=0; \r\n double duePresentValueLoop=0;\r\n \r\n //The following 2 lines of codes to calculate the present value of annuity due by formula and to print it\r\n duePresentValue = (annualAmount * ((1 - Math.pow((1+interestRate),-numYears)) / interestRate )*(1+interestRate) );\r\n System.out.printf(\"\\n\\nThe Present Value of an Annuity Due is %.2f\\n\", duePresentValue);\r\n \r\n \r\n System.out.printf(\"That is the amount you have to start with to give out %.2f at the begining\\n\", annualAmount);\r\n System.out.printf(\"of every year for %d years, assuming the remaining money earns %.2f\\n\\n\", numYears, interestRate);\r\n System.out.printf(\"Starting with %.2f\\n\",duePresentValue);\r\n \r\n //The following loop is check wheather the value calculted above by formula is correct or not,\r\n duePresentValueLoop = duePresentValue;\r\n\r\n duePresentValueLoop -= annualAmount;\r\n\r\n System.out.printf(\"At the beginning of the year 1, give out %.2f, leaving %.2f\\n\",annualAmount,duePresentValueLoop);\r\n\r\n for(int i = (numYears-1),j =2; i>0 ; i--,j++) \r\n {\r\n\r\n duePresentValueLoop -= (annualAmount / (Math.pow((1 + interestRate), i) )) ;\r\n System.out.printf(\"At the beginning of the year %d, give out %.2f, leaving %.2f\\n\",j,annualAmount,duePresentValueLoop);\r\n }\r\n\r\n }",
"public static ArrayList<ArrayList<Integer>> getCompanyMonthlyProfitability(String clientId, String year) {\n Client client = ClientDAO.getClientById(clientId);\n String companyName = client.getCompanyName();\n\n int yearProfit[] = new int[12];\n int yearLoss[] = new int[12];\n\n Project project;\n //retrieve all fully completed project for a given year\n try (Connection conn = ConnectionManager.getConnection()) {\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM project WHERE projectReviewStatus = ? and companyName=? and year(end)=?\");\n stmt.setString(1, \"complete\");\n stmt.setString(2, companyName);\n stmt.setString(3, year);\n\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n\n //check the month of the project\n Date date = rs.getDate(\"end\");\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n int month = cal.get(Calendar.MONTH);\n //create the project object\n project = new Project();\n project.setProjectID(rs.getInt(\"projectID\"));\n project.setProjectTitle(rs.getString(\"title\"));\n project.setCompanyName(rs.getString(\"companyName\"));\n project.setBusinessType(rs.getString(\"businessType\"));\n project.setStart(rs.getDate(\"start\"));\n project.setEnd(rs.getDate(\"end\"));\n project.setProjectRemarks(rs.getString(\"projectRemarks\"));\n project.setProjectStatus(rs.getString(\"projectStatus\"));\n project.setActualDeadline(rs.getDate(\"actualDeadline\"));\n project.setFrequency(rs.getString(\"frequency\"));\n project.setProjectType(rs.getString(\"projectType\"));\n project.setEmployee1(rs.getString(\"employee1\"));\n project.setEmployee2(rs.getString(\"employee2\"));\n project.setEmployee1Hours(rs.getDouble(\"employee1Hours\"));\n project.setEmployee2Hours(rs.getDouble(\"employee2Hours\"));\n project.setProjectReviewer(rs.getString(\"projectReviewer\"));\n project.setProjectReviewStatus(rs.getString(\"projectReviewStatus\"));\n project.setDateCompleted(rs.getDate(\"dateCompleted\"));\n project.setMonthlyHours(rs.getString(\"monthlyHours\"));\n project.setPlannedHours(rs.getDouble(\"plannedHours\"));\n\n //check here if profit or loss \n double status = getProfit(project);\n\n //add into respective month arraylist based on month retrieved \n switch (month) {\n case 0:\n if (status > 0) {\n yearProfit[0] += 1;\n } else {\n yearLoss[0] += 1;\n }\n break;\n case 1:\n if (status > 0) {\n yearProfit[1] += 1;\n } else {\n yearLoss[1] += 1;\n }\n break;\n case 2:\n if (status > 0) {\n yearProfit[2] += 1;\n } else {\n yearLoss[2] += 1;\n }\n break;\n case 3:\n if (status > 0) {\n yearProfit[3] += 1;\n } else {\n yearLoss[3] += 1;\n }\n break;\n case 4:\n if (status > 0) {\n yearProfit[4] += 1;\n } else {\n yearLoss[4] += 1;\n }\n break;\n case 5:\n if (status > 0) {\n yearProfit[5] += 1;\n } else {\n yearLoss[5] += 1;\n }\n break;\n case 6:\n if (status > 0) {\n yearProfit[6] += 1;\n } else {\n yearLoss[6] += 1;\n }\n break;\n case 7:\n if (status > 0) {\n yearProfit[7] += 1;\n } else {\n yearLoss[7] += 1;\n }\n break;\n case 8:\n if (status > 0) {\n yearProfit[8] += 1;\n } else {\n yearLoss[8] += 1;\n }\n break;\n case 9:\n if (status > 0) {\n yearProfit[9] += 1;\n } else {\n yearLoss[9] += 1;\n }\n break;\n case 10:\n if (status > 0) {\n yearProfit[10] += 1;\n } else {\n yearLoss[10] += 1;\n }\n break;\n case 11:\n if (status > 0) {\n yearProfit[11] += 1;\n } else {\n yearLoss[11] += 1;\n }\n break;\n }\n }\n } catch (SQLException e) {\n System.out.println(\"SQLException at ProjectDAO getCompanyMonthlyProfitability method: \" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"Unexpected error at ProjectDAO: \" + e.getMessage());\n }\n //combine the 2 arrays\n\n ArrayList<Integer> yearProfitList = new ArrayList();\n ArrayList<Integer> yearLossList = new ArrayList();\n\n for (int i = 0; i < 12; i++) {\n int value = yearProfit[i];\n yearProfitList.add(value);\n }\n\n for (int i = 0; i < 12; i++) {\n int value = yearLoss[i];\n yearLossList.add(value);\n }\n ArrayList<ArrayList<Integer>> complete = new ArrayList();\n\n complete.add(yearProfitList);\n complete.add(yearLossList);\n return complete;\n }",
"public static double calculateBalance(double balance, double interestRate,\r\n\t\t\t\t\t\t\t\t\t\t int years, int timesPerYear)\r\n\t{\r\n\t\tfor (int i = 0; i < years * timesPerYear; i++)\r\n\t\t\t\tbalance *= (1 + interestRate / timesPerYear);\r\n\t\treturn balance;\r\n\t}",
"public Hurricane [] searchYear(int year)\n {\n int counter = 0;\n //Find []h length\n // write this code\n for(int index=0;index<hurricanes.length;index++)\n {\n if(hurricanes[index].getYear()==year)\n {\n counter++;\n }\n }\n\n Hurricane[] h = new Hurricane[counter];\n int count=0;\n // write the code\n for(int index=0;index<hurricanes.length;index++)\n {\n if(hurricanes[index].getYear()==year)\n {\n h[count]=hurricanes[index];\n count++;\n }\n }\n return h;\n }",
"Years createYears();",
"@Test\n public void savingsAccount() {\n Bank bank = new Bank();\n Account account = getCustomerWithAccount(bank, \"Bill\", AccountType.SAVINGS); \n // Account has a rate of 0.1% for the first $1,000 then 0.2%.\n \tdouble rate = InterestRates.CHECKING_RATE.getVal() / 365;\n \tdouble rateMax = InterestRates.SAVING_RATE.getVal() / 365;\n\n /* \n\t\t * Test calculation for 1 month.\n\t\t * We added $1500 to saving account on January, 1.\n\t\t * We expect amount * 31 days * daily rate for the first $1000\n\t\t * plus amount * 31 days * daily rate max for the remaining balance.\n\t\t */\n Date d1 = Account.getDateFromString(\"January 1, 2014\");\n Date d2 = Account.getDateFromString(\"February 1, 2014\");\n account.deposit(1500.0, d1);\n double expect = 1000.0 * 31 * rate;\n expect += 500.0 * 31 * rateMax;\n\t\tdouble earned = bank.totalInterestPaid(d2);\t\t\n\t\tassertTrue(Math.abs(earned - expect) <= DOUBLE_DELTA);\n }",
"public double getPay(int year){\r\n double pay = HOURLY_RATE * getTimeSpent(year);\r\n\r\n return pay;\r\n }",
"public static double Compound_Interest(double value, double interest, double years) {\r\n \r\n double future_value = 0;\r\n \r\n future_value = value*Math.pow((1 + interest/100), years);\r\n \r\n return future_value;\r\n }",
"double getCostBasisForPortfolio(int portfolioNumber, int year, int month, int day);",
"public static double dueFutureValue(double annualAmount, double interestRate, int numYears, boolean bool)\r\n {\r\n \r\n double dueFutureValue =0;\r\n \r\n\r\n // the following loop calculates the future value by formula for boolean value true \r\n if (bool == true)\r\n {\r\n\r\n dueFutureValue = (annualAmount * (( Math.pow( (1+ interestRate) ,numYears) - 1) / interestRate )*(1+interestRate) ) ;\r\n\r\n } \r\n\r\n\r\n \r\n // the following loop calculates the future value by loop for boolean value false\r\n if (bool == false)\r\n {\r\n System.out.printf(\"\\n\");\r\n System.out.printf(\"Future Value of an Annuity Due:\\n\"); \r\n\r\n for (int i = 0 ; i < numYears; i++)\r\n {\r\n\r\n dueFutureValue +=( annualAmount * Math.pow((1 + interestRate),i));\r\n\r\n System.out.printf(\"At the begining of year %d, value is %.2f\\n\", (i+1), dueFutureValue);\r\n\r\n } \r\n // These following 2 statements calculates the intetest acculmulated in the last year \r\n dueFutureValue +=( annualAmount * Math.pow((1 + interestRate),numYears));\r\n dueFutureValue -= annualAmount;\r\n System.out.printf(\"At the beginning of year %d,value is %.2f\\n\", (numYears+1), dueFutureValue); \r\n }\r\n\r\n return dueFutureValue;\r\n }",
"Integer getTenYear();",
"public static final void testRetire (\n double desiredSavingsInterestIncome,\n double savingsInterestRate,\n double inflationRate,\n double taxRate,\n double investmentInterestRate,\n double yearsOfSaving )\n //////////////////////////////////////////////////////////////////////\n {\n \n double savings\n = desiredSavingsInterestIncome * ( 1.0 + inflationRate )\n / ( savingsInterestRate * ( 1.0 - taxRate ) - inflationRate );\n\n double futureValueSavings\n = savings * Math.pow ( 1.0 + inflationRate, yearsOfSaving );\n\n double annualSavings = annualSavingsNeeded (\n futureValueSavings, investmentInterestRate, yearsOfSaving );\n\n System.out.println ( savings );\n System.out.println ( futureValueSavings );\n System.out.println ( annualSavings );\n System.out.println ( futureValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n System.out.println ( presentValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n }",
"public static double getInterest()\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n int i = 0;\r\n double monthlyIntRate = 0;\r\nwhile (i == 0) {\r\n Scanner s = new Scanner(System.in);\r\n System.out.print(\"Enter yearly interest rate (Ex 8.25): \");\r\n double yearlyIntRate = Double.parseDouble(s.nextLine());\r\n monthlyIntRate = yearlyIntRate / 12;\r\n\r\n if (yearlyIntRate < 3 || yearlyIntRate > 12) {\r\n i = 0;\r\n }\r\n else {\r\n i = 1;\r\n }\r\n }\r\n return monthlyIntRate;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'PreviousActualCallRef' field. Reference to the previous actual call. | public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder clearPreviousActualCallRef() {
PreviousActualCallRef = null;
fieldSetFlags()[5] = false;
return this;
} | [
"public java.lang.CharSequence getPreviousActualCallRef() {\n return PreviousActualCallRef;\n }",
"public java.lang.CharSequence getPreviousActualCallRef() {\n return PreviousActualCallRef;\n }",
"public void setPreviousActualCallRef(java.lang.CharSequence value) {\n this.PreviousActualCallRef = value;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder setPreviousActualCallRef(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.PreviousActualCallRef = value;\n fieldSetFlags()[5] = true;\n return this;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder clearNextActualCallRef() {\n NextActualCallRef = null;\n fieldSetFlags()[6] = false;\n return this;\n }",
"public boolean hasPreviousActualCallRef() {\n return fieldSetFlags()[5];\n }",
"public void reset_prev() {\n\t\tthis.set_prev(null);\n\t}",
"@Override\n\tpublic void setCallTimeToNow() {\n\t\tsuper.setCallTimeToNow();\n\n\t\t// Clear any call reply associated with this call\n\t\tif (this.repliedCall != null) {\n\t\t\tthis.repliedCall.delete();\n\t\t\tthis.repliedCall = null;\n\t\t}\n\n\t\t// Keep count\n\t\tthis.callCount++;\n\t}",
"public java.lang.CharSequence getNextActualCallRef() {\n return NextActualCallRef;\n }",
"public java.lang.CharSequence getNextActualCallRef() {\n return NextActualCallRef;\n }",
"public com.cdo.avro.AvroCDO.Builder clearCallId() {\n fieldSetFlags()[0] = false;\n return this;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder setNextActualCallRef(java.lang.CharSequence value) {\n validate(fields()[6], value);\n this.NextActualCallRef = value;\n fieldSetFlags()[6] = true;\n return this;\n }",
"public void setNextActualCallRef(java.lang.CharSequence value) {\n this.NextActualCallRef = value;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder clearActualJourneyRef() {\n ActualJourneyRef = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"public void clearCallLogs();",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder clearActualBlockRef() {\n ActualBlockRef = null;\n fieldSetFlags()[4] = false;\n return this;\n }",
"@SuppressWarnings(\"static-method\")\n\t\tprotected final void resetCallerInLocalThread() {\n\t\t\tCapacities.CALLER.remove();\n\t\t}",
"public void unsetPrevious()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PREVIOUS$0, 0);\r\n }\r\n }",
"public void resetCallStack() {\n callStack = new Stack<>();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieve skill name when in a "Skill" DataSnapShot | private ArrayList<String> collectSkillName(Map<String, Object> skill){
// create an ArrayList that will hold the names of each skill within the database
ArrayList<String> skills = new ArrayList<String>();
// run a for loop that goes into the DataSnapShot and retrieves the name of the skill
for (Map.Entry<String, Object> entry : skill.entrySet()){
// gets the name of the skill
Map singleSkill = (Map) entry.getValue();
// adds that skill name to the ArrayList
Skill userInputSkill = new Skill((String) singleSkill.get(DBKeys.KEY_SKILL_INNER));
skills.add(userInputSkill.getSkill());
}
return skills;
} | [
"java.lang.String getSkill();",
"java.lang.String getSuitSkillName();",
"public String getSkillName()\n {\n return skillName;\n }",
"public String getSkill_name() {\n\t\treturn skill_name;\n\t}",
"public String getSkill() {\r\n return skill;\r\n }",
"Skill getSkill(String name);",
"String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }",
"public String getSkillName ()\n\t{\n\t\treturn this.SkillName;\n\t}",
"Skill getSkill();",
"public int getIntrinsicSkill(String skillname);",
"Skill getSkill(Long skillId) throws DbException;",
"public Skills getChosenSkill();",
"game.msg.Define.DLootMapSkill getSkill();",
"public game.msg.Define.DLootMapSkill getSkill() {\n return skill_;\n }",
"public Skill getSkill() {\n return skill;\n }",
"public String getSkillLayer() { return getLayerSetting(\"Skill\", skillLayerPrefs, skillLayer).getString(); }",
"@ApiOperation(value = \"get skill\", nickname = \"get skill\")\n @RequestMapping(path = \"/skills/{skill}\", method = RequestMethod.GET)\n public ResponseEntity getSkill(@PathVariable(value = \"skill\") String name) {\n var skill = skillService.getSkillByName(name);\n if (skill == null) {\n logger.debug(\"Failed to get skill {}: not found\", name);\n return ResponseEntity.notFound().build();\n }\n\n logger.debug(\"Successfully got skill {}\", name);\n return new ResponseEntity<>(skill, HttpStatus.OK);\n }",
"int getSkillId();",
"public String getSkillNameFromNumber(int skill_number) {\n if (skill_number <= 0 || skill_number > 4) {\n System.err.println(\"Error in Occupation.getSkillsName(int skill_number)\");\n System.exit(-108);\n }\n return \"\";\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if the player has the longest road | public static void checkPlayerLongestRoad(Player player, Game game1, Road road1) {
//the unique id for each node visit that takes place
id = 0;
loop = false;
Board board1 = game1.getBoard();
int currLongest = player.getLongestRoad(); //old longest road
int longest = 0; //longest road found from this point
//this is one end of the road
Intersection intA = (Intersection) game1.getBoard()
.getLocationFromCoordinate(road1.getCoordinateA())
.getContains();
//this is the other
Intersection intB = (Intersection) game1.getBoard()
.getLocationFromCoordinate(road1.getCoordinateB())
.getContains();
Road end1A = null;
Road end1B = null;
Road end2A = null;
Road end2B = null;
// this sets end1A to be the first new road coming out of intA that is not the road placed (i.e. that does not go to intB)
end1A = getRoadFromInt(game1, intA, player, intB, null);
// if there was such a road, this looks for another road, to see if there are two roads coming out of that same end
if (end1A != null) {
end1B = getRoadFromInt(game1, intA, player, intB, getOtherInt(board1, end1A, intA));
}
//this sets end2a to be the first new road coming out of the other end (intB) that doesnt go to intA
end2A = getRoadFromInt(game1, intB, player, intA, null);
// if there was such a road, this looks for another road, to see if there are two roads coming out of that same end
if (end2A != null) {
end2B = getRoadFromInt(game1, intB, player, intA, getOtherInt(board1, end2A, intB));
}
// connecting, i.e. if this road links to other roads together
if ((end1A != null || end1B != null) && (end2A != null || end2B != null)) {
id = 0;
//this maps a point to a sector for the purpose of finding overlap
HashMap<Intersection, String> sectorMap = new HashMap<Intersection, String>();
//END 1
int longests1 = 0;
HashMap<Intersection, Integer> distancesMaps1 = new HashMap<Intersection, Integer>();
HashMap<Intersection, ArrayList<Integer>> visitorsMaps1 = new HashMap<Intersection, ArrayList<Integer>>();
ArrayList<Integer> namesLists1 = new ArrayList<Integer>();
namesLists1.add(new Integer(0));
namesLists1.add(new Integer(-1));
ArrayList<Integer> idArray1s1 = new ArrayList<Integer>();
ArrayList<Integer> idArray2s1 = new ArrayList<Integer>();
idArray1s1.add(new Integer(id));
idArray2s1.add(new Integer(id - 1));
visitorsMaps1.put(intB, idArray1s1);
longests1 = Branch(game1, player, intA, intB, road1,
(ArrayList<Integer>) namesLists1.clone(), 1,
distancesMaps1, visitorsMaps1, "s1", sectorMap);
// END2
int longests2 = 0;
HashMap<Intersection, Integer> distancesMaps2 = new HashMap<Intersection, Integer>();
HashMap<Intersection, ArrayList<Integer>> visitorsMaps2 = new HashMap<Intersection, ArrayList<Integer>>();
ArrayList<Integer> namesLists2 = new ArrayList<Integer>();
namesLists2.add(new Integer(id));
namesLists2.add(new Integer(id-1));
ArrayList<Integer> idArray1s2 = new ArrayList<Integer>();
ArrayList<Integer> idArray2s2 = new ArrayList<Integer>();
idArray1s2.add(new Integer(id));
idArray2s2.add(new Integer(id-1 ));
visitorsMaps2.put(intA, idArray1s2);
longests2 = Branch(game1, player, intB, intA, road1,
(ArrayList<Integer>) namesLists2.clone(), 1,
distancesMaps2, visitorsMaps2, "s2", sectorMap);
//deciding on what to return
if (loop) {
if (longests2 > longests1) {
longest = longests2;
}
else {
longest = longests1;
}
}
else {
longest = -1 + longests1 + longests2;
}
}
//this is what happens if only one end connected to anything, this works!
else {
// setup
id = 0;
//this hashmap will record the distances to various points, using points as keys, longest distances as values, will update with longer distances
HashMap<Intersection, Integer> distancesMap = new HashMap<Intersection, Integer>();
//this hashmap will map points to an arraylist of ints
HashMap<Intersection, ArrayList<Integer>> visitorsMap = new HashMap<Intersection, ArrayList<Integer>>();
//this arraylist will be cloned to represent all the things that have been visited by a route, all routes have visited 0 and -1 (the two start intersections)
ArrayList<Integer> namesList = new ArrayList<Integer>();
namesList.add(new Integer(0));
namesList.add(new Integer(-1));
// end 1 is not empty, end 2 is this means we will be branching intA
if ((end1A != null || end1B != null)) {
// this adds the ids of the starting points to the visitorsmap hashmap
//each node gets its own arraylist, which is why we get two, of course
//these array lists should not really be added to
ArrayList<Integer> idArray1 = new ArrayList<Integer>();
ArrayList<Integer> idArray2 = new ArrayList<Integer>();
idArray1.add(new Integer(id));
idArray2.add(new Integer(id - 1));
visitorsMap.put(intB, idArray1);
visitorsMap.put(intA, idArray2);
//the starting length of the branch coming out of end1A, this includes the original road
int toplen = 1;
//the starting length of the branch coming out of end1B
int botLen = 1;
// looking at the first branch possibility
if (end1A != null) {
//branch using the road end1A fro intA to the intersection
//that road end1A leads to, and moving the length to two
toplen = Branch(game1, player, getOtherInt(board1, end1A, intA), intA, end1A,
(ArrayList<Integer>) namesList.clone(), toplen + 1,
distancesMap, visitorsMap, null, null);
}
// looking at the other branch possibility
if (end1B != null) {
toplen = Branch(game1, player, getOtherInt(board1, end1B, intA), intA, end1B,
(ArrayList<Integer>) namesList.clone(), botLen + 1,
distancesMap, visitorsMap, null, null);
}
// getting which one of those is better!
if (toplen > botLen) {
longest = toplen;
}
else {
longest = botLen;
}
}
//end 2 is empty
else {
id = 0;
// putting the ids in a map, getting them the right way
// around(pointless?)
ArrayList<Integer> idArray1 = new ArrayList<Integer>();
ArrayList<Integer> idArray2 = new ArrayList<Integer>();
idArray1.add(new Integer(id));
idArray2.add(new Integer(id - 1));
visitorsMap.put(intA, idArray1);
visitorsMap.put(intB, idArray2);
// length of each branch+initial road
int toplen = 1;
int botLen = 1;
// looking at the first branch possibility road end2A from intersection intB to a new int
if (end2A != null) {
System.out.println("A");
toplen = Branch(game1, player, getOtherInt(board1, end2A, intB), intB, end2A,
(ArrayList<Integer>) namesList.clone(), toplen + 1,
distancesMap, visitorsMap, null, null);
}
// looking at the other branch possibility
if (end2B != null) {
System.out.println("B");
botLen = Branch(game1, player, getOtherInt(board1, end2B, intB), intB, end2B,
(ArrayList<Integer>) namesList.clone(), botLen + 1,
distancesMap, visitorsMap, null, null);
}
// getting which one of those is better!
if (toplen > botLen) {
longest = toplen;
}
else {
longest = botLen;
}
}
}
if (longest > currLongest) {
player.setLongestRoad(longest);
}
loop = false;
} | [
"public int getPlayersLongestRoad(IPlayer player);",
"private boolean isFreeFromPlayers(Road roadToCheck) {\r\n\t\tfor (Player player : players.getPlayers()) {\r\n\t\t\tif (player.getPosition() != null\r\n\t\t\t\t\t&& player.getPosition().equals(roadToCheck)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// check for players with two shepherds\r\n\t\t\tif (player instanceof PlayerDouble) {\r\n\t\t\t\tPlayerDouble p = (PlayerDouble) player;\r\n\t\t\t\tif (p.getSecondposition() != null\r\n\t\t\t\t\t\t&& p.getSecondposition().equals(roadToCheck)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (p.getFirstPosition() != null\r\n\t\t\t\t\t\t&& p.getFirstPosition().equals(roadToCheck)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private boolean hasPlayerReachedGoal()\n\t{\n\t\tboolean result = false;\n\t\tif (player.getCoordinateY() < TwoWayRoadConstants.INITIAL_LEFT_CAR_POSITION_Y - TwoWayRoadConstants.PLAYER_FILE_HEIGHT)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn result;\n\t}",
"private int recalcLongestRoadETAAux(int startNode, int pathLength, int lrLength, int searchDepth)\n {\n D.ebugPrintln(\"=== recalcLongestRoadETAAux(\" + Integer.toHexString(startNode) + \",\" + pathLength + \",\" + lrLength + \",\" + searchDepth + \")\");\n\n //\n // we're doing a depth first search of all possible road paths \n //\n int longest = 0;\n int numRoads = 500;\n Stack pending = new Stack();\n pending.push(new NodeLenVis(startNode, pathLength, new Vector()));\n\n while (!pending.empty())\n {\n NodeLenVis curNode = (NodeLenVis) pending.pop();\n D.ebugPrintln(\"curNode = \" + curNode);\n\n int coord = curNode.node;\n int len = curNode.len;\n Vector visited = curNode.vis;\n boolean pathEnd = false;\n\n //\n // check for road blocks \n //\n Enumeration pEnum = player.getGame().getBoard().getPieces().elements();\n\n while (pEnum.hasMoreElements())\n {\n SOCPlayingPiece p = (SOCPlayingPiece) pEnum.nextElement();\n\n if ((len > 0) && (p.getPlayer().getPlayerNumber() != player.getPlayerNumber()) && ((p.getType() == SOCPlayingPiece.SETTLEMENT) || (p.getType() == SOCPlayingPiece.CITY)) && (p.getCoordinates() == coord))\n {\n pathEnd = true;\n\n //D.ebugPrintln(\"^^^ path end at \"+Integer.toHexString(coord));\n break;\n }\n }\n\n if (!pathEnd)\n {\n // \n // check if we've connected to another road graph\n //\n Iterator lrPathsIter = player.getLRPaths().iterator();\n\n while (lrPathsIter.hasNext())\n {\n SOCLRPathData pathData = (SOCLRPathData) lrPathsIter.next();\n\n if (((startNode != pathData.getBeginning()) && (startNode != pathData.getEnd())) && ((coord == pathData.getBeginning()) || (coord == pathData.getEnd())))\n {\n pathEnd = true;\n len += pathData.getLength();\n D.ebugPrintln(\"connecting to another path: \" + pathData);\n D.ebugPrintln(\"len = \" + len);\n\n break;\n }\n }\n }\n\n if (!pathEnd)\n {\n //\n // (len - pathLength) = how many new roads we've built\n //\n if ((len - pathLength) >= searchDepth)\n {\n pathEnd = true;\n }\n }\n\n if (!pathEnd)\n {\n pathEnd = true;\n\n int j;\n Integer edge;\n boolean match;\n\n j = coord - 0x11;\n edge = new Integer(j);\n match = false;\n\n if ((j >= SOCBoard.MINEDGE) && (j <= SOCBoard.MAXEDGE) && (player.isLegalRoad(j)))\n {\n for (Enumeration ev = visited.elements();\n ev.hasMoreElements();)\n {\n Integer vis = (Integer) ev.nextElement();\n\n if (vis.equals(edge))\n {\n match = true;\n\n break;\n }\n }\n\n if (!match)\n {\n Vector newVis = (Vector) visited.clone();\n newVis.addElement(edge);\n\n // node coord and edge coord are the same\n pending.push(new NodeLenVis(j, len + 1, newVis));\n pathEnd = false;\n }\n }\n\n j = coord;\n edge = new Integer(j);\n match = false;\n\n if ((j >= SOCBoard.MINEDGE) && (j <= SOCBoard.MAXEDGE) && (player.isLegalRoad(j)))\n {\n for (Enumeration ev = visited.elements();\n ev.hasMoreElements();)\n {\n Integer vis = (Integer) ev.nextElement();\n\n if (vis.equals(edge))\n {\n match = true;\n\n break;\n }\n }\n\n if (!match)\n {\n Vector newVis = (Vector) visited.clone();\n newVis.addElement(edge);\n\n // coord for node = edge + 0x11\n j += 0x11;\n pending.push(new NodeLenVis(j, len + 1, newVis));\n pathEnd = false;\n }\n }\n\n j = coord - 0x01;\n edge = new Integer(j);\n match = false;\n\n if ((j >= SOCBoard.MINEDGE) && (j <= SOCBoard.MAXEDGE) && (player.isLegalRoad(j)))\n {\n for (Enumeration ev = visited.elements();\n ev.hasMoreElements();)\n {\n Integer vis = (Integer) ev.nextElement();\n\n if (vis.equals(edge))\n {\n match = true;\n\n break;\n }\n }\n\n if (!match)\n {\n Vector newVis = (Vector) visited.clone();\n newVis.addElement(edge);\n\n // node coord = edge coord + 0x10\n j += 0x10;\n pending.push(new NodeLenVis(j, len + 1, newVis));\n pathEnd = false;\n }\n }\n\n j = coord - 0x10;\n edge = new Integer(j);\n match = false;\n\n if ((j >= SOCBoard.MINEDGE) && (j <= SOCBoard.MAXEDGE) && (player.isLegalRoad(j)))\n {\n for (Enumeration ev = visited.elements();\n ev.hasMoreElements();)\n {\n Integer vis = (Integer) ev.nextElement();\n\n if (vis.equals(edge))\n {\n match = true;\n\n break;\n }\n }\n\n if (!match)\n {\n Vector newVis = (Vector) visited.clone();\n newVis.addElement(edge);\n\n // node coord = edge coord + 0x01\n j += 0x01;\n pending.push(new NodeLenVis(j, len + 1, newVis));\n pathEnd = false;\n }\n }\n }\n\n if (pathEnd)\n {\n if (len > longest)\n {\n longest = len;\n numRoads = curNode.len - pathLength;\n }\n else if ((len == longest) && (curNode.len < numRoads))\n {\n numRoads = curNode.len - pathLength;\n }\n }\n }\n\n if (longest > lrLength)\n {\n return numRoads;\n }\n else\n {\n return 500;\n }\n }",
"public boolean hasLanded() {\n if (position.getY() <= 0) {\n return true;\n }\n\n return false;\n }",
"boolean closeEnough() {\n\t\treturn (Math.sqrt((x - Player.x) * (x - Player.x) + (y - Player.y)\n\t\t\t\t* (y - Player.y)) < distanceFromBed);\n\t}",
"public void recalcLongestRoadETA()\n {\n D.ebugPrintln(\"=== recalcLongestRoadETA for player \" + player.getPlayerNumber());\n\n int roadETA;\n SOCBuildingSpeedEstimate bse = new SOCBuildingSpeedEstimate(player.getNumbers());\n\n try\n {\n roadETA = bse.calculateRollsFast(SOCGame.EMPTY_RESOURCES, SOCGame.ROAD_SET, 500, player.getPortFlags()).getRolls();\n }\n catch (CutoffExceededException e)\n {\n roadETA = 500;\n }\n\n roadsToGo = 500;\n longestRoadETA = 500;\n\n int longestRoadLength;\n SOCPlayer lrPlayer = player.getGame().getPlayerWithLongestRoad();\n\n if ((lrPlayer != null) && (lrPlayer.getPlayerNumber() == player.getPlayerNumber()))\n {\n ///\n /// we have longest road\n ///\n //D.ebugPrintln(\"=== we have longest road\");\n longestRoadETA = 0;\n roadsToGo = 0;\n }\n else\n {\n if (lrPlayer == null)\n {\n ///\n /// no one has longest road\n ///\n longestRoadLength = Math.max(4, player.getLongestRoadLength());\n }\n else\n {\n longestRoadLength = lrPlayer.getLongestRoadLength();\n }\n\n Iterator lrPathsIter = player.getLRPaths().iterator();\n int depth;\n\n while (lrPathsIter.hasNext())\n {\n SOCLRPathData pathData = (SOCLRPathData) lrPathsIter.next();\n depth = Math.min(((longestRoadLength + 1) - pathData.getLength()), player.getNumPieces(SOCPlayingPiece.ROAD));\n\n int minRoads = recalcLongestRoadETAAux(pathData.getBeginning(), pathData.getLength(), longestRoadLength, depth);\n roadsToGo = Math.min(minRoads, roadsToGo);\n minRoads = recalcLongestRoadETAAux(pathData.getEnd(), pathData.getLength(), longestRoadLength, depth);\n roadsToGo = Math.min(minRoads, roadsToGo);\n }\n }\n\n D.ebugPrintln(\"--- roadsToGo = \" + roadsToGo);\n longestRoadETA = roadsToGo * roadETA;\n }",
"private boolean isOutOfBoundsAndLastLife(){\n\t boolean outOfBounds = false;\n\t if (lives == 1) {\n\t\t outOfBounds = isBallOutOfBounds();\n\t }\n\t return outOfBounds;\n }",
"private boolean distanceToLong(RouteModel routeModel){\n\t\t\n\t\tfor (SubrouteModel subrouteModel : routeModel.getSubroutes()) {\n\t\t\tif(subrouteModel.getTransportationID() == 1) {\n\t\t\t\tif (this.userModel.getMaxDistanceToWalk() < (subrouteModel.getDistance() / 1000)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(subrouteModel.getTransportationID() == 2 || subrouteModel.getTransportationID() == 3) {\n\t\t\t\tif (this.userModel.getMaxDistanceToBike() < (subrouteModel.getDistance() / 1000)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean canPlaceRoad(IPlayer player, EdgeLocation edge);",
"private boolean roadCheck(Road road) {\n\t\t\n\t\treturn false;\n\t}",
"public boolean canPlaceInitialRoad(IPlayer player, EdgeLocation edge);",
"public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }",
"private boolean isCrossroad(int x, int y)\n {\n byte count = 0;\n count += x + 1 < LoadMap.MAPWIDTHINTILES ? (connectedTiles[y][x + 1] != null ? 1 : 0) : 0;\n count += x - 1 >= 0 ? (connectedTiles[y][x - 1] != null ? 1 : 0) : 0;\n count += y + 1 < LoadMap.MAPHEIGHTINTILES ? (connectedTiles[y + 1][x] != null ? 1 : 0) : 0;\n count += y - 1 >= 0 ? (connectedTiles[y - 1][x] != null ? 1 : 0) : 0;\n return count > 2;\n }",
"protected final boolean checkMaxDistances(\n\t\t\tfinal OpenLREncoderProperties properties,\n\t\t\tfinal LocRefData locRefData) throws OpenLRProcessingException {\n\t\t/*\n\t\t * check for the maximum distance between two successive LRP \n\t\t */\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"check location reference (maximum distance check)\");\n\t\t}\n\t\tfinal List<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tint maxDistance = properties.getMaximumDistanceLRP();\n\t\t\n\t\tboolean dnpsAreVAlid = true;\n\t\tfor (LocRefPoint lrPoint : locRefPoints) {\n\t\t\t// check the distance limit\n\t\t\tif (!lrPoint.isLastLRP()\n\t\t\t\t\t&& lrPoint.getDistanceToNext() > maxDistance) {\n\t\t\t\t// limit is exceeded\n LOG.error(String\n .format(\"maximum distance between two LRP is exceeded (LRP #: %s, distance: %s)\",\n lrPoint.getSequenceNumber(),\n lrPoint.getDistanceToNext()));\n\t\t\t\tdnpsAreVAlid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dnpsAreVAlid;\n\t}",
"public double longestDistance()\n {\n double maxDistance = 0;\n for (int i=0; i < _boxes.length -1 && _boxes[i] != null; i++)\n {\n for (int j=i+1; j < _boxes.length -1 && _boxes[j] != null; j++)\n {\n double currentDistance = _boxes[i].distance(_boxes[j]);\n if (currentDistance > maxDistance)\n maxDistance = currentDistance;\n }\n }\n return maxDistance;\n }",
"private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}",
"boolean hasMoreWayPoints();",
"private static boolean checkDescendingDiagonal(char player, Board board){\n boolean hasWon = false;\n\n for (int i = 0; i < board.getColumnCount() - 3; i++) { \n for (int j = 0; j < board.getRowCount(); j++) {\n if (board.getElement(i,j) == player && board.getElement(i+1,j+1) == player && \n board.getElement(i+2,j+2) == player && board.getElement(i+3,j+3) == player) {\n hasWon = true;\n return hasWon;\n }\n }\n }\n return hasWon;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crea una valoracion para el test | @Before
public void setUp(){
demandante = new Demandante("Tony","Stark","12345678Q","Contrasena",
"0123456789012345");
valoracion = new Valoracion(demandante, 5);
} | [
"@Test\n public void testGetValue ()\n {\n System.out.println (\"getValue\");\n QueryDatas instance = new QueryDatas (\"nom\", \"value\");\n String expResult = \"value\";\n String result = instance.getValue ();\n Assert.assertEquals (expResult, result);\n\n }",
"@Test\r\n public void testGetTipo() {\r\n System.out.println(\"getTipo\");\r\n Telefono instance = new Telefono();\r\n String expResult = \"celular\";\r\n instance.setTipo(expResult);\r\n assertEquals(expResult, instance.getTipo());\r\n }",
"public TestParamValue() {\n super();\n }",
"Value createValue();",
"public String getTestValue() {\n return testValue;\n }",
"@Test\r\n public void testSetValor() {\r\n \r\n }",
"public Integer getTestValue() {\n return testValue;\n }",
"@Test\n public void getPuntuacion() {\n System.out.println(\"Valoracion: test getPuntuacion\");\n assertTrue(valoracion.getPuntuacion()==5);\n }",
"@Test\n public void testSetTipoFinal() {\n System.out.println(\"setTipoFinal\");\n String tipoFinal = \"\";\n Reserva instance = new Reserva();\n instance.setTipoFinal(tipoFinal);\n \n }",
"public TestVO() {\n \tthis.testInput=1;\n \tthis.testOutput=11;\n\t}",
"@Test\n public void testGetNombreSupraevento() {\n System.out.println(\"getNombreSupraevento\");\n Asistencia instance = new Asistencia();\n String expResult = \"supraevento\";\n instance.setNombreSupraevento(expResult);\n String result = instance.getNombreSupraevento();\n assertEquals(expResult, result);\n }",
"@Test\n public void setPuntuacion1() {\n System.out.println(\"Valoracion: test setPuntuacion1\");\n valoracion.setPuntuacion(4);\n assertTrue(valoracion.getPuntuacion()==4);\n }",
"@Test\n public void testCalcularValorDeVenda() {\n System.out.println(\"CalcularValorDeVenda\");\n Telemovel instance = new Telemovel(\"Samsung Galaxy S20\",1500);\n double expResult = 1545;\n double result = instance.CalcularValorDeVenda();\n assertEquals(expResult, result, 0.0);\n \n }",
"@Test\n public void getValue() {\n System.out.println(\"getValue\");\n setTestMethod();\n\n BBDDefaultField instance = new BBDDefaultField(1);\n\n Object expResult = Integer.valueOf(1);\n Object result = instance.getValue();\n Assert.assertEquals(expResult, result);\n\n }",
"@Test\n public void testGetNombreParticipante() {\n System.out.println(\"getNombreParticipante\");\n Asistencia instance = new Asistencia();\n String expResult = \"participante\";\n instance.setNombreParticipante(expResult);\n String result = instance.getNombreParticipante();\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetTipoFinal() {\n System.out.println(\"getTipoFinal\");\n Reserva instance = new Reserva();\n String expResult = \"\";\n String result = instance.getTipoFinal();\n assertEquals(expResult, result);\n \n }",
"@Test\n public void testSetValue ()\n {\n System.out.println (\"setValue\");\n String name = \"\";\n QueryDatas instance = new QueryDatas (\"nom\", \"value\");\n instance.setValue (name);\n }",
"@Test\r\n public void testGetOrigen() {\r\n String expResult = \"origenprueba\";\r\n articuloPrueba.setOrigen(expResult);\r\n String result = articuloPrueba.getOrigen();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void testSetValor() {\n System.out.println(\"setValor\");\n int valor = 0;\n Prueba instance = new Prueba();\n instance.setValor(valor);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests CutStateNodeAbstractActionundo() for accuracy. Verify : Undo is executed correctly, the CompositeState is added. | public void testUndo() throws Exception {
action.execute();
action.undo();
assertTrue("Failed to execute the undo() method.", container.containsSubVertex(state));
} | [
"public void testUndo() {\n action.executionSuccess();\n\n // no exception should be thrown\n action.undo();\n }",
"public void testUndoSuccess() {\n action.undoSuccess();\n\n assertTrue(\"Expects the action can be re-done\", action.canRedo());\n assertFalse(\"Expects the action can not be un-done\", action.canUndo());\n }",
"@Test\n\tpublic void testUndoAction() {\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"A\",5));\n\t\t//Update cell values, simulating user manual input\n\t\ttestGrid.selectCell(\"A\",5).setValue(\"88\");\n\n\t\t//Add the new cell to the undo stack to simulate what\n\t\t//occurs during cell editing. Every change must be recorded so it can be undone\n\t\tundoRedo_TestStack.noUndoRedoAction(testGrid.selectCell(\"E\",8));\n\t\t//Update cell value, simulating user manual input\n\t\ttestGrid.selectCell(\"E\",8).setValue(\"99\");\n\n\n\t\t//Simulate the undo action and keep that info\n\t\tCell result2_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setValue(result2_undo.getValue());\n\t\ttestGrid.selectCell(result2_undo.getCol(), result2_undo.getRow()).setCellFormat(result2_undo.getCellFormat());\n\n\t\tCell result1_undo = undoRedo_TestStack.undoAction(testGrid);\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setValue(result1_undo.getValue());\n\t\ttestGrid.selectCell(result1_undo.getCol(), result1_undo.getRow()).setCellFormat(result1_undo.getCellFormat());\n\n\t\t//Case when the undo stack is empty\n\t\tCell emptyStackCell = undoRedo_TestStack.undoAction(testGrid);\n\n\t\t//Compare the cells modified by the undo action and the expected value\n\t\tassertEquals(\"E\", result2_undo.getCol());\n\t\tassertEquals(8, result2_undo.getRow());\n\t\tassertEquals(\"0\", result2_undo.getValue());\n\t\tassertEquals(Formatting.REAL, result2_undo.getCellFormat());\n\n\t\tassertEquals(\"A\", result1_undo.getCol());\n\t\tassertEquals(5, result1_undo.getRow());\n\t\tassertEquals(\"0\", result1_undo.getValue());\n\t\tassertEquals(Formatting.REAL, result1_undo.getCellFormat());\n\n\t\t//Check that the undo stack is indeed empty\n\t\tassertEquals(-1, emptyStackCell.getRow());\n\t\tassertEquals(\"-1\", emptyStackCell.getCol());\n\n\t}",
"public void testCanUndo() {\n assertFalse(\"The action cannot be un-done initially.\", action.canUndo());\n }",
"public final void testUndo() {\n // run successfully\n addCommentAction.undo();\n assertFalse(\"namespace must not own comment\", namespace.containsOwnedElement(comment));\n assertNull(\"namespace must be removed from comment\", comment.getNamespace());\n }",
"public void testRedo() {\n action.undoSuccess();\n\n // no exception should be thrown\n action.redo();\n }",
"public void testExecute_Unrecognizable() {\n MockStateVertex mockStateVertex = new MockStateVertex();\n mockStateVertex.setContainer(container);\n action = new MockCutStateNodeAbstractAction(\"Cut\", mockStateVertex, clipboard);\n try {\n action.execute();\n fail(\"ActionExecutionException expected.\");\n } catch (ActionExecutionException e) {\n //good\n }\n }",
"@Test\n public void testUndo1() {\n System.out.println(\"testUndo\");\n Counter myCounter = new Counter(10);\n int expResult = 0;\n myCounter.undo();\n int result = myCounter.getCount();\n assertEquals(expResult, result);\n }",
"public abstract String undo() throws UndoFailedException;",
"public void testUndoActionPerformed() {\n try {\n handler.undoActionPerformed(null, new ChangeSizeAction(new GraphNode(), new Dimension()));\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }",
"@Test\n\tpublic void UndoTestafterLoadingGame() {\n\t\t//Do some moves to change state of the game\n\t\t\t\tgame.processCommand(command);\n\t\t\t\tgame.processCommand(command1);\n\t\t\t\tgame.processCommand(command4);\n\t\t\t\tgame.processCommand(command2);\n\t\t\t\t\n\t\t\t\t//save the game\n\t\t\t\tgame.saveGame();\n\t\t\t\t\n\t\t\t\t//check if loaded game is equal to the previously saved game\n\t\t\t\tloadedGame = game.loadGame();\n\t\t\t\t\n\t\t\t\tassertEquals(true,loadedGame.undo());\n\t\t\t\t\n\t\t\t\t//Testing if all pieces are in the correct place\n\t\t\t\t//Rabbit1\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(3, 2).getPieceString(),\"RA1\");\n\t\t\t\t//Rabbit2\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(2, 2).getPieceString(),\"RA2\");\n\t\t\t\t//Rabbit3\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(1, 4).getPieceString(),\"RA3\");\n\t\t\t\t//Horizontal Fox\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(4, 3).getPieceString(),\"F1H\");\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(3, 3).getPieceString(),\"F1T\");\n\t\t\t\t//Vertical Fox\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(1, 3).getPieceString(),\"F2V\");\n\t\t\t\tassertEquals(loadedGame.getBoard().getSquare(1, 2).getPieceString(),\"F2T\");\n\t}",
"void performUndo() throws Exception;",
"public void testUndo_CannotUndoException() {\n action.undo();\n try {\n action.undo();\n fail(\"CannotUndoException expected.\");\n } catch (CannotUndoException e) {\n // good\n }\n }",
"public void testUndoAction() {\n testChangeTransientAction.undoAction();\n assertEquals(\"ChangeTransientAction undoAction incorrectly.\", String.valueOf(oldTransient),\n getTaggedValue(\"transient\"));\n }",
"public void testUndo_CannotUndoException() {\n try {\n action.undo();\n fail(\"CannotUndoException expected.\");\n } catch (CannotUndoException e) {\n // good\n }\n }",
"private void assertUndoRedoClearSuccess() {\n commandBox.runCommand(\"undo\");\n assertTrue(taskListPanel.isListMatching(td.getTypicalTasks()));\n commandBox.runCommand(\"redo\");\n assertListSize(0);\n }",
"void reduceUndo(){\n this.undo--;\n }",
"@Test\n public void testUndo1()\n {\n Cell oldCell = getThePlayer().getLocation();\n \n PlayerMove move = new PlayerMove(getThePlayer(), getEmptyCell());\n move.apply();\n \n assertNotSame(oldCell, getThePlayer().getLocation());\n move.undo();\n assertEquals(oldCell, getThePlayer().getLocation()); \n }",
"@Test\r\n public void deathUndo3(){\r\n Player tPlayer = new Player(\"Green\", true, 2);\r\n Player tPlayer2 = new Player(\"Yellow\", true, 7);\r\n Game tGame = new Game(tPlayer, tPlayer2);\r\n tGame.tryCreate(tPlayer, 'C', 0);\r\n Piece pieceA = (Piece) tGame.getBoard().get(2);\r\n tGame.moveMove(tPlayer, 'C', \"left\");\r\n //reset and move again\r\n //This kills the piece\r\n tPlayer.resetPieces();\r\n tGame.moveMove(tPlayer, 'C', \"up\");\r\n assertTrue(tGame.getBoard().get(2, 1) instanceof Empty);\r\n assertEquals('C', tGame.getBoard().getCemetery().getGrid()[0][0].letter());\r\n\r\n tGame.undoMove(pieceA, 1, new Direction(-1, 0));\r\n\r\n assertEquals('C', tGame.getBoard().get(2, 1).letter());\r\n assertFalse(pieceA.hasMoved());\r\n assertNotNull(tPlayer.getInPlayPiece('C'));\r\n assertEquals(0, tGame.getBoard().getCemetery().getGrid()[0][0].letter());\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a cattle.instance_label_map table reference | public InstanceLabelMapTable() {
this("instance_label_map", null);
} | [
"public InstanceLabelMapTable(java.lang.String alias) {\n\t\tthis(alias, io.cattle.platform.core.model.tables.InstanceLabelMapTable.INSTANCE_LABEL_MAP);\n\t}",
"private void makeLabelMapping(String szlabelmapping) throws IOException\n {\n if (szlabelmapping != null)\n\t{\n\t BufferedReader bridlabel = Util.getBufferedReader(szlabelmapping);\n\t String szLine;\n\n\t //Loading in a mapping from state ID to a label description\n\n\t while ((szLine = bridlabel.readLine())!=null)\n\t {\n\t\tStringTokenizer st = new StringTokenizer(szLine,\"\\t\");\n\t\tString szID = st.nextToken().trim();\n\t\tString szLabelExtend = st.nextToken().trim();\n\t\thmlabelExtend.put(szID,szLabelExtend);\n\t }\n\t bridlabel.close();\n\t}\n }",
"public void buildLabelMap (Integer [] label)\n {\n labelMap = new HashMap <> ();\n for (int i = 0; i < adj.length; i++) {\n Set <Integer> vertices = labelMap.get (label [i]); // get known vertices with given label\n if (vertices == null) vertices = new HashSet <> (); // if none, make an empty set\n vertices.add (i); // add the new vertex i\n labelMap.put (label [i], vertices); // add back into labelMap\n } // for\n }",
"protected abstract void fillLabelMaps();",
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"public void TargetLabelMap( TDF_LabelMap aLabelMap) {\n OCCwrapJavaJNI.TDF_RelocationTable_TargetLabelMap(swigCPtr, this, TDF_LabelMap.getCPtr(aLabelMap), aLabelMap);\n }",
"private static HashMap makeLabelMapping(String szlabelmapping) throws IOException\n {\n\tHashMap hmlabelExtend = new HashMap();\n\tif (szlabelmapping != null)\n\t{\n BufferedReader bridlabel = Util.getBufferedReader(szlabelmapping);\n\t String szLine;\n\n\t //Loading in a mapping from state ID to a label description\n\n\t while ((szLine = bridlabel.readLine())!=null)\n {\n\t StringTokenizer st = new StringTokenizer(szLine,\"\\t\");\n\t String szID = st.nextToken().trim();\n\t String szLabelExtend = st.nextToken().trim();\n\t hmlabelExtend.put(szID,szLabelExtend);\n\t }\n\t bridlabel.close();\n\t}\n\n\treturn hmlabelExtend;\n }",
"private static void addInstanceState(Map<Status, NovaInstanceState> map,\n\t\t\tStatus instanceStateName, InstanceStatus instanceStatus) {\n\t\tmap.put(instanceStateName, new NovaInstanceState(instanceStatus, instanceStateName));\n\t}",
"private void createAttributeMappingTable() {\n\t\tString table;\n\t\tString sql;\n\t\t\n\t\tConnectionManager.initParametersFromFile();\n\t\t\n\t\tfor (Feature feature : featureInstanceVectorListMap.keySet()) {\n\t\t\t\n\t\t\ttable \t= \"SIGNATURE_DISCOVERY_\" + feature.toString() + \"_MAPPING\";\n\t\t\t\n\t /*\n\t * Drop table first\n\t */\n\t \tsql = \"DROP TABLE \" + table;\n\t \tSystem.out.println(sql);\n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t// \te.printStackTrace();\n\t// \tConnectionManager.close();\n\t// \treturn;\n\t }\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Create table\n\t\t\t */\n\t sql \t= \"CREATE TABLE \" + table + \" \";\n\t sql \t+= \"(\";\n\t sql \t+= \"Code VARCHAR,\";\n\t sql \t+= \"Activity VARCHAR\";\n\t sql \t+= \")\";\n\t \n\t System.out.println(sql);\n\t \n\t try {\n\t ConnectionManager.executeStatement(sql);\n\t } catch (Exception e) {\n\t \te.printStackTrace();\n\t \tConnectionManager.close();\n\t \treturn;\n\t }\n\t \n\t /*\n\t * Insert data into table\n\t */\n\t System.out.println(\"INSERT INTO \" + table);\n\t \n\t for (String activityName : activityCharMap.keySet()) {\n\t \t// only take activity name, not traceID\n\t \tif (activityName.contains(\"-\")) {\n\t\t sql = \"INSERT INTO \" + table + \" VALUES('\" + activityCharMap.get(activityName).trim() + \"','\" + activityName.trim();\n\t\t sql += \"')\";\n\t//\t System.out.println(sql);\n\t\t try {\n\t\t ConnectionManager.executeStatement(sql);\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\t \n\t \t} \n\t }\n\t\t}\n \n ConnectionManager.close();\n\t}",
"public KinTermMap(String label) {\n\t\ttheMap = this;\n\t\tkinTermMaps.put(label,this);\n\t\tmapno++;\n\t\tinit();\n\t}",
"public CellTable<Map<String, Object>> createNewTable();",
"MAP createMAP();",
"public Lookup createInstancesLookup (InstanceContent ic);",
"java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap();",
"ExpRunGroupMapTable createRunGroupMapTable(String name, UserSchema schema, ContainerFilter cf);",
"private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}",
"private void buildLabelLocs() {\n this.labelLocs = new HashMap<String, Integer>();\n for (int n = 0; n < this.code.size(); n++) {\n TACOp op = this.code.get(n);\n if (op.getType() == TACOpType.LABEL) {\n this.labelLocs.put(op.getLabel(), n);\n }\n }\n }",
"public KinTermMap(String label, TransferKinInfoVector m) {\n\t\tsetTheKinTerms( m);\n\t\ttheMap = this;\n\t\tkinTermMaps.put(label,this);\n\t\tmapno++;\n\t\tinit();\n\t}",
"@Override\n\t\tpublic void initializeLabel(\n\t\t\t\tString label,\n\t\t\t\tSortedMap<Integer, SortedMap<Integer, SortedMap<Boolean, SortedMap<Long, String>>>> labelInstances,\n\t\t\t\tProperties properties, SparseData sparseData)\n\t\t\t\tthrows IOException {\n\t\t\tif (SCOPE_LABEL.equals(this.exportProperties.getProperty(SCOPE))) {\n\t\t\t\texportSparseMatrix(sparseData, label, null, null);\n\t\t\t}\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the UDP connection. | public void setUDPConnection(UDPConnectionHandler udp) {
this.udp = udp;
} | [
"public void setUpUDPserver() throws SocketException {\n\t\tUDPserver = new DatagramSocket();\n\t\tUDPport = UDPserver.getLocalPort();\n\t}",
"Builder setUdpSrc(TpPort port);",
"Builder setUdpDst(TpPort port);",
"public void setUdpServerPort(int udpServerPort)\n \t{\n \t\tthis.udpServerPort = udpServerPort;\n \t}",
"public void setupUDP(int port) throws SocketException\n\t{\n\t\tdataSocket = new DatagramSocket(port);\n\t\tUDPRunning = true;\n\t}",
"public void setUdpSession(IoSession s) {\n\t\tm_udpSession = s;\n\t}",
"public void setKdcUdpPort(int kdcUdpPort) {\n this.kdcUdpPort = kdcUdpPort;\n }",
"public void setDs(DatagramServer ds){\r\n this.ds = ds;\r\n }",
"public void setConnectDhcp() {\r\n\t\tif (dummyMode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(mDevReceiver == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString devName = getDevName();\r\n\t\t\r\n\t\tmDevReceiver.setConnectDhcp(devName);\r\n\t}",
"public int getUdpPort() {\n return udpPort_;\n }",
"void setUpSocket() throws IOException {\n socket = new DatagramSocket();\n}",
"UdpListener(int port) {\n this.port = port;\n }",
"public void setSocket(SocketWrapper socket);",
"public interface UDPDatagramConnection extends DatagramConnection {\n\n /**\n * Gets the local address to which the\n * datagram connection is bound.\n *\n * <P>The host address(IP number) that can be used to connect to this\n * end of the datagram connection from an external system.\n * Since IP addresses may be dynamically assigned, a remote application\n * will need to be robust in the face of IP number reassignment.</P>\n * <P> The local hostname (if available) can be accessed from\n * <code> System.getProperty(\"microedition.hostname\")</code>\n * </P>\n *\n * @return the local address to which the datagram connection is bound.\n * @exception IOException if the connection was closed.\n * @see ServerSocketConnection\n */\n public String getLocalAddress() throws IOException;\n\n /**\n * Returns the local port to which this datagram connection is bound.\n *\n * @return the local port number to which this datagram connection\n * is connected.\n * @exception IOException if the connection was closed.\n * @see ServerSocketConnection\n */\n public int getLocalPort() throws IOException;\n}",
"public UDPConnectionHandler getUDPConnection() {\r\n\t\treturn udp;\r\n\t}",
"public UdpPacketSender() {\r\n\t\ttry {\r\n\t\t\tthis.socket = new DatagramSocket();\r\n\t\t} catch (final SocketException e) {\r\n\t\t\tlog.log(Level.SEVERE, e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public void setSocket(Socket socket)\r\n {\r\n this.socket = socket;\r\n }",
"@Test\n public void test_socket_udpGro_setAndGet() throws Exception {\n assumeTrue(kernelIsAtLeast(5, 4));\n\n final FileDescriptor fd = Os.socket(AF_INET6, SOCK_DGRAM, 0);\n try {\n final int setValue = 1;\n Os.setsockoptInt(fd, IPPROTO_UDP, UDP_GRO, setValue);\n // getsockopt(IPPROTO_UDP, UDP_GRO) is not implemented.\n } finally {\n Os.close(fd);\n }\n }",
"public void open() throws IOException{\n socket = new DatagramSocket();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleComposeCondition" $ANTLR start "ruleComposeCondition" InternalShome.g:918:1: ruleComposeCondition returns [EObject current=null] : ( ( (lv_ownedConditions_0_0= ruleTerminalCondition ) ) otherlv_1= 'and' ( (lv_ownedConditions_2_0= ruleTerminalCondition ) ) (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) ) ) ; | public final EObject ruleComposeCondition() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_3=null;
EObject lv_ownedConditions_0_0 = null;
EObject lv_ownedConditions_2_0 = null;
EObject lv_ownedConditions_4_0 = null;
enterRule();
try {
// InternalShome.g:924:2: ( ( ( (lv_ownedConditions_0_0= ruleTerminalCondition ) ) otherlv_1= 'and' ( (lv_ownedConditions_2_0= ruleTerminalCondition ) ) (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) )* ) )
// InternalShome.g:925:2: ( ( (lv_ownedConditions_0_0= ruleTerminalCondition ) ) otherlv_1= 'and' ( (lv_ownedConditions_2_0= ruleTerminalCondition ) ) (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) )* )
{
// InternalShome.g:925:2: ( ( (lv_ownedConditions_0_0= ruleTerminalCondition ) ) otherlv_1= 'and' ( (lv_ownedConditions_2_0= ruleTerminalCondition ) ) (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) )* )
// InternalShome.g:926:3: ( (lv_ownedConditions_0_0= ruleTerminalCondition ) ) otherlv_1= 'and' ( (lv_ownedConditions_2_0= ruleTerminalCondition ) ) (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) )*
{
// InternalShome.g:926:3: ( (lv_ownedConditions_0_0= ruleTerminalCondition ) )
// InternalShome.g:927:4: (lv_ownedConditions_0_0= ruleTerminalCondition )
{
// InternalShome.g:927:4: (lv_ownedConditions_0_0= ruleTerminalCondition )
// InternalShome.g:928:5: lv_ownedConditions_0_0= ruleTerminalCondition
{
newCompositeNode(grammarAccess.getComposeConditionAccess().getOwnedConditionsTerminalConditionParserRuleCall_0_0());
pushFollow(FOLLOW_19);
lv_ownedConditions_0_0=ruleTerminalCondition();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getComposeConditionRule());
}
add(
current,
"ownedConditions",
lv_ownedConditions_0_0,
"fr.unice.polytech.si5.smarthome.am.shome.Shome.TerminalCondition");
afterParserOrEnumRuleCall();
}
}
otherlv_1=(Token)match(input,24,FOLLOW_8);
newLeafNode(otherlv_1, grammarAccess.getComposeConditionAccess().getAndKeyword_1());
// InternalShome.g:949:3: ( (lv_ownedConditions_2_0= ruleTerminalCondition ) )
// InternalShome.g:950:4: (lv_ownedConditions_2_0= ruleTerminalCondition )
{
// InternalShome.g:950:4: (lv_ownedConditions_2_0= ruleTerminalCondition )
// InternalShome.g:951:5: lv_ownedConditions_2_0= ruleTerminalCondition
{
newCompositeNode(grammarAccess.getComposeConditionAccess().getOwnedConditionsTerminalConditionParserRuleCall_2_0());
pushFollow(FOLLOW_16);
lv_ownedConditions_2_0=ruleTerminalCondition();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getComposeConditionRule());
}
add(
current,
"ownedConditions",
lv_ownedConditions_2_0,
"fr.unice.polytech.si5.smarthome.am.shome.Shome.TerminalCondition");
afterParserOrEnumRuleCall();
}
}
// InternalShome.g:968:3: (otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) ) )*
loop14:
do {
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==24) ) {
alt14=1;
}
switch (alt14) {
case 1 :
// InternalShome.g:969:4: otherlv_3= 'and' ( (lv_ownedConditions_4_0= ruleTerminalCondition ) )
{
otherlv_3=(Token)match(input,24,FOLLOW_8);
newLeafNode(otherlv_3, grammarAccess.getComposeConditionAccess().getAndKeyword_3_0());
// InternalShome.g:973:4: ( (lv_ownedConditions_4_0= ruleTerminalCondition ) )
// InternalShome.g:974:5: (lv_ownedConditions_4_0= ruleTerminalCondition )
{
// InternalShome.g:974:5: (lv_ownedConditions_4_0= ruleTerminalCondition )
// InternalShome.g:975:6: lv_ownedConditions_4_0= ruleTerminalCondition
{
newCompositeNode(grammarAccess.getComposeConditionAccess().getOwnedConditionsTerminalConditionParserRuleCall_3_1_0());
pushFollow(FOLLOW_16);
lv_ownedConditions_4_0=ruleTerminalCondition();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getComposeConditionRule());
}
add(
current,
"ownedConditions",
lv_ownedConditions_4_0,
"fr.unice.polytech.si5.smarthome.am.shome.Shome.TerminalCondition");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
break loop14;
}
} while (true);
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
} | [
"public final EObject entryRuleComposeCondition() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleComposeCondition = null;\r\n\r\n\r\n try {\r\n // InternalShome.g:911:57: (iv_ruleComposeCondition= ruleComposeCondition EOF )\r\n // InternalShome.g:912:2: iv_ruleComposeCondition= ruleComposeCondition EOF\r\n {\r\n newCompositeNode(grammarAccess.getComposeConditionRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleComposeCondition=ruleComposeCondition();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleComposeCondition; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"public final EObject ruleACondition() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_Condition_0 = null;\r\n\r\n EObject this_TimeEleapsedCondition_1 = null;\r\n\r\n EObject this_ComposeCondition_2 = null;\r\n\r\n\r\n\r\n \tenterRule();\r\n\r\n try {\r\n // InternalShome.g:706:2: ( (this_Condition_0= ruleCondition | this_TimeEleapsedCondition_1= ruleTimeEleapsedCondition | this_ComposeCondition_2= ruleComposeCondition ) )\r\n // InternalShome.g:707:2: (this_Condition_0= ruleCondition | this_TimeEleapsedCondition_1= ruleTimeEleapsedCondition | this_ComposeCondition_2= ruleComposeCondition )\r\n {\r\n // InternalShome.g:707:2: (this_Condition_0= ruleCondition | this_TimeEleapsedCondition_1= ruleTimeEleapsedCondition | this_ComposeCondition_2= ruleComposeCondition )\r\n int alt10=3;\r\n alt10 = dfa10.predict(input);\r\n switch (alt10) {\r\n case 1 :\r\n // InternalShome.g:708:3: this_Condition_0= ruleCondition\r\n {\r\n\r\n \t\t\tnewCompositeNode(grammarAccess.getAConditionAccess().getConditionParserRuleCall_0());\r\n \t\t\r\n pushFollow(FOLLOW_2);\r\n this_Condition_0=ruleCondition();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\tcurrent = this_Condition_0;\r\n \t\t\tafterParserOrEnumRuleCall();\r\n \t\t\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalShome.g:717:3: this_TimeEleapsedCondition_1= ruleTimeEleapsedCondition\r\n {\r\n\r\n \t\t\tnewCompositeNode(grammarAccess.getAConditionAccess().getTimeEleapsedConditionParserRuleCall_1());\r\n \t\t\r\n pushFollow(FOLLOW_2);\r\n this_TimeEleapsedCondition_1=ruleTimeEleapsedCondition();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\tcurrent = this_TimeEleapsedCondition_1;\r\n \t\t\tafterParserOrEnumRuleCall();\r\n \t\t\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalShome.g:726:3: this_ComposeCondition_2= ruleComposeCondition\r\n {\r\n\r\n \t\t\tnewCompositeNode(grammarAccess.getAConditionAccess().getComposeConditionParserRuleCall_2());\r\n \t\t\r\n pushFollow(FOLLOW_2);\r\n this_ComposeCondition_2=ruleComposeCondition();\r\n\r\n state._fsp--;\r\n\r\n\r\n \t\t\tcurrent = this_ComposeCondition_2;\r\n \t\t\tafterParserOrEnumRuleCall();\r\n \t\t\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n \tleaveRule();\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"public final void entryRuleCompoundCondition() throws RecognitionException {\n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:709:1: ( ruleCompoundCondition EOF )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:710:1: ruleCompoundCondition EOF\n {\n before(grammarAccess.getCompoundConditionRule()); \n pushFollow(FOLLOW_ruleCompoundCondition_in_entryRuleCompoundCondition1445);\n ruleCompoundCondition();\n\n state._fsp--;\n\n after(grammarAccess.getCompoundConditionRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleCompoundCondition1452); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"@DialogField(fieldLabel = \"Use AND Logic\",\n fieldDescription = \"Check box to search for tags using AND logic, otherwise search will use OR logic.\")\n @Switch(offText = \"No\", onText = \"Yes\")\n public boolean isComposeWithAnd() {\n return get(PARAM_COMPOSE_WITH_AND, false);\n }",
"public final QueryParser.or_cond_return or_cond() throws RecognitionException {\n QueryParser.or_cond_return retval = new QueryParser.or_cond_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token OR255=null;\n QueryParser.and_cond_return and_cond254 =null;\n\n QueryParser.and_cond_return and_cond256 =null;\n\n\n Object OR255_tree=null;\n\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:384:9: ( and_cond ( OR ^ and_cond )* )\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:384:11: and_cond ( OR ^ and_cond )*\n {\n root_0 = (Object)adaptor.nil();\n\n\n pushFollow(FOLLOW_and_cond_in_or_cond2643);\n and_cond254=and_cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, and_cond254.getTree());\n\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:384:21: ( OR ^ and_cond )*\n loop71:\n do {\n int alt71=2;\n int LA71_0 = input.LA(1);\n\n if ( (LA71_0==OR) ) {\n alt71=1;\n }\n\n\n switch (alt71) {\n \tcase 1 :\n \t // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:384:23: OR ^ and_cond\n \t {\n \t OR255=(Token)match(input,OR,FOLLOW_OR_in_or_cond2648); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t OR255_tree = \n \t (Object)adaptor.create(OR255)\n \t ;\n \t root_0 = (Object)adaptor.becomeRoot(OR255_tree, root_0);\n \t }\n\n \t pushFollow(FOLLOW_and_cond_in_or_cond2651);\n \t and_cond256=and_cond();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, and_cond256.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop71;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public final Boolean ruleCompositeState() throws RecognitionException {\n Boolean current = false;\n\n Token lv_type_0_0=null;\n Token lv_name_1_0=null;\n Token otherlv_3=null;\n Token otherlv_4=null;\n Boolean lv_concernlevel_2_0 = null;\n\n\n try {\n // PsiInternalStateConstraintTransition.g:1344:1: ( ( ( (lv_type_0_0= 'compositeState' ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_concernlevel_2_0= ruleConcernLevel ) )+ otherlv_3= 'end_compositeState' ( (otherlv_4= RULE_ID ) ) ) )\n // PsiInternalStateConstraintTransition.g:1345:2: ( ( (lv_type_0_0= 'compositeState' ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_concernlevel_2_0= ruleConcernLevel ) )+ otherlv_3= 'end_compositeState' ( (otherlv_4= RULE_ID ) ) )\n {\n // PsiInternalStateConstraintTransition.g:1345:2: ( ( (lv_type_0_0= 'compositeState' ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_concernlevel_2_0= ruleConcernLevel ) )+ otherlv_3= 'end_compositeState' ( (otherlv_4= RULE_ID ) ) )\n // PsiInternalStateConstraintTransition.g:1346:3: ( (lv_type_0_0= 'compositeState' ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_concernlevel_2_0= ruleConcernLevel ) )+ otherlv_3= 'end_compositeState' ( (otherlv_4= RULE_ID ) )\n {\n // PsiInternalStateConstraintTransition.g:1346:3: ( (lv_type_0_0= 'compositeState' ) )\n // PsiInternalStateConstraintTransition.g:1347:4: (lv_type_0_0= 'compositeState' )\n {\n // PsiInternalStateConstraintTransition.g:1347:4: (lv_type_0_0= 'compositeState' )\n // PsiInternalStateConstraintTransition.g:1348:5: lv_type_0_0= 'compositeState'\n {\n\n \t\t\t\t\tmarkLeaf(elementTypeProvider.getCompositeState_TypeCompositeStateKeyword_0_0ElementType());\n \t\t\t\t\n lv_type_0_0=(Token)match(input,36,FOLLOW_3); \n\n \t\t\t\t\tdoneLeaf(lv_type_0_0);\n \t\t\t\t\n\n \t\t\t\t\tif (!current) {\n \t\t\t\t\t\tassociateWithSemanticElement();\n \t\t\t\t\t\tcurrent = true;\n \t\t\t\t\t}\n \t\t\t\t\n\n }\n\n\n }\n\n // PsiInternalStateConstraintTransition.g:1363:3: ( (lv_name_1_0= RULE_ID ) )\n // PsiInternalStateConstraintTransition.g:1364:4: (lv_name_1_0= RULE_ID )\n {\n // PsiInternalStateConstraintTransition.g:1364:4: (lv_name_1_0= RULE_ID )\n // PsiInternalStateConstraintTransition.g:1365:5: lv_name_1_0= RULE_ID\n {\n\n \t\t\t\t\tmarkLeaf(elementTypeProvider.getCompositeState_NameIDTerminalRuleCall_1_0ElementType());\n \t\t\t\t\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_31); \n\n \t\t\t\t\tif(!current) {\n \t\t\t\t\t\tassociateWithSemanticElement();\n \t\t\t\t\t\tcurrent = true;\n \t\t\t\t\t}\n \t\t\t\t\n\n \t\t\t\t\tdoneLeaf(lv_name_1_0);\n \t\t\t\t\n\n }\n\n\n }\n\n // PsiInternalStateConstraintTransition.g:1380:3: ( (lv_concernlevel_2_0= ruleConcernLevel ) )+\n int cnt24=0;\n loop24:\n do {\n int alt24=2;\n int LA24_0 = input.LA(1);\n\n if ( (LA24_0==38) ) {\n alt24=1;\n }\n\n\n switch (alt24) {\n \tcase 1 :\n \t // PsiInternalStateConstraintTransition.g:1381:4: (lv_concernlevel_2_0= ruleConcernLevel )\n \t {\n \t // PsiInternalStateConstraintTransition.g:1381:4: (lv_concernlevel_2_0= ruleConcernLevel )\n \t // PsiInternalStateConstraintTransition.g:1382:5: lv_concernlevel_2_0= ruleConcernLevel\n \t {\n\n \t \t\t\t\t\tmarkComposite(elementTypeProvider.getCompositeState_ConcernlevelConcernLevelParserRuleCall_2_0ElementType());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_32);\n \t lv_concernlevel_2_0=ruleConcernLevel();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tdoneComposite();\n \t \t\t\t\t\tif(!current) {\n \t \t\t\t\t\t\tassociateWithSemanticElement();\n \t \t\t\t\t\t\tcurrent = true;\n \t \t\t\t\t\t}\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt24 >= 1 ) break loop24;\n EarlyExitException eee =\n new EarlyExitException(24, input);\n throw eee;\n }\n cnt24++;\n } while (true);\n\n\n \t\t\tmarkLeaf(elementTypeProvider.getCompositeState_End_compositeStateKeyword_3ElementType());\n \t\t\n otherlv_3=(Token)match(input,37,FOLLOW_3); \n\n \t\t\tdoneLeaf(otherlv_3);\n \t\t\n // PsiInternalStateConstraintTransition.g:1402:3: ( (otherlv_4= RULE_ID ) )\n // PsiInternalStateConstraintTransition.g:1403:4: (otherlv_4= RULE_ID )\n {\n // PsiInternalStateConstraintTransition.g:1403:4: (otherlv_4= RULE_ID )\n // PsiInternalStateConstraintTransition.g:1404:5: otherlv_4= RULE_ID\n {\n\n \t\t\t\t\tif (!current) {\n \t\t\t\t\t\tassociateWithSemanticElement();\n \t\t\t\t\t\tcurrent = true;\n \t\t\t\t\t}\n \t\t\t\t\n\n \t\t\t\t\tmarkLeaf(elementTypeProvider.getCompositeState_EndCompositeStateCompositeStateCrossReference_4_0ElementType());\n \t\t\t\t\n otherlv_4=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tdoneLeaf(otherlv_4);\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }",
"public final Boolean entryRuleCompositeState() throws RecognitionException {\n Boolean current = false;\n\n Boolean iv_ruleCompositeState = null;\n\n\n try {\n // PsiInternalStateConstraintTransition.g:1336:56: (iv_ruleCompositeState= ruleCompositeState EOF )\n // PsiInternalStateConstraintTransition.g:1337:2: iv_ruleCompositeState= ruleCompositeState EOF\n {\n markComposite(elementTypeProvider.getCompositeStateElementType()); \n pushFollow(FOLLOW_1);\n iv_ruleCompositeState=ruleCompositeState();\n\n state._fsp--;\n\n current =iv_ruleCompositeState; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return current;\n }",
"public final QueryParser.and_cond_return and_cond() throws RecognitionException {\n QueryParser.and_cond_return retval = new QueryParser.and_cond_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token AND258=null;\n QueryParser.unary_cond_return unary_cond257 =null;\n\n QueryParser.unary_cond_return unary_cond259 =null;\n\n\n Object AND258_tree=null;\n\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:387:10: ( unary_cond ( AND ^ unary_cond )* )\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:387:12: unary_cond ( AND ^ unary_cond )*\n {\n root_0 = (Object)adaptor.nil();\n\n\n pushFollow(FOLLOW_unary_cond_in_and_cond2663);\n unary_cond257=unary_cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary_cond257.getTree());\n\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:387:23: ( AND ^ unary_cond )*\n loop72:\n do {\n int alt72=2;\n int LA72_0 = input.LA(1);\n\n if ( (LA72_0==AND) ) {\n alt72=1;\n }\n\n\n switch (alt72) {\n \tcase 1 :\n \t // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:387:25: AND ^ unary_cond\n \t {\n \t AND258=(Token)match(input,AND,FOLLOW_AND_in_and_cond2667); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t AND258_tree = \n \t (Object)adaptor.create(AND258)\n \t ;\n \t root_0 = (Object)adaptor.becomeRoot(AND258_tree, root_0);\n \t }\n\n \t pushFollow(FOLLOW_unary_cond_in_and_cond2670);\n \t unary_cond259=unary_cond();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary_cond259.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop72;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public final EObject ruleConjunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_Comparison_0 = null;\r\n\r\n EObject lv_operator_2_0 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2263:28: ( (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2264:1: (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2264:1: (this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2265:5: this_Comparison_0= ruleComparison ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getConjunctionAccess().getComparisonParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleComparison_in_ruleConjunction4832);\r\n this_Comparison_0=ruleComparison();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_Comparison_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:1: ( () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) ) )*\r\n loop30:\r\n do {\r\n int alt30=2;\r\n int LA30_0 = input.LA(1);\r\n\r\n if ( ((LA30_0>=51 && LA30_0<=52)) ) {\r\n alt30=1;\r\n }\r\n\r\n\r\n switch (alt30) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:2: () ( (lv_operator_2_0= ruleAndOperator ) ) ( (lv_right_3_0= ruleComparison ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2273:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2274:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getConjunctionAccess().getConjunctionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2279:2: ( (lv_operator_2_0= ruleAndOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2280:1: (lv_operator_2_0= ruleAndOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2280:1: (lv_operator_2_0= ruleAndOperator )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2281:3: lv_operator_2_0= ruleAndOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getConjunctionAccess().getOperatorAndOperatorParserRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAndOperator_in_ruleConjunction4862);\r\n \t lv_operator_2_0=ruleAndOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AndOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2297:2: ( (lv_right_3_0= ruleComparison ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2298:1: (lv_right_3_0= ruleComparison )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2298:1: (lv_right_3_0= ruleComparison )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2299:3: lv_right_3_0= ruleComparison\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getConjunctionAccess().getRightComparisonParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleComparison_in_ruleConjunction4883);\r\n \t lv_right_3_0=ruleComparison();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getConjunctionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"Comparison\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop30;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public final EObject entryRuleCondition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCondition = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1327:2: (iv_ruleCondition= ruleCondition EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1328:2: iv_ruleCondition= ruleCondition EOF\n {\n newCompositeNode(grammarAccess.getConditionRule()); \n pushFollow(FOLLOW_ruleCondition_in_entryRuleCondition2567);\n iv_ruleCondition=ruleCondition();\n\n state._fsp--;\n\n current =iv_ruleCondition; \n match(input,EOF,FOLLOW_EOF_in_entryRuleCondition2577); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final EObject ruleEConditionClauseDefinitionAND() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token this_BEGIN_1=null;\n Token this_END_3=null;\n EObject lv_and_2_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2945:2: ( (otherlv_0= And this_BEGIN_1= RULE_BEGIN ( (lv_and_2_0= ruleEConditionClauseDefinition ) ) this_END_3= RULE_END ) )\n // InternalRMParser.g:2946:2: (otherlv_0= And this_BEGIN_1= RULE_BEGIN ( (lv_and_2_0= ruleEConditionClauseDefinition ) ) this_END_3= RULE_END )\n {\n // InternalRMParser.g:2946:2: (otherlv_0= And this_BEGIN_1= RULE_BEGIN ( (lv_and_2_0= ruleEConditionClauseDefinition ) ) this_END_3= RULE_END )\n // InternalRMParser.g:2947:3: otherlv_0= And this_BEGIN_1= RULE_BEGIN ( (lv_and_2_0= ruleEConditionClauseDefinition ) ) this_END_3= RULE_END\n {\n otherlv_0=(Token)match(input,And,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getEConditionClauseDefinitionANDAccess().getAndKeyword_0());\n \t\t\n this_BEGIN_1=(Token)match(input,RULE_BEGIN,FOLLOW_38); \n\n \t\t\tnewLeafNode(this_BEGIN_1, grammarAccess.getEConditionClauseDefinitionANDAccess().getBEGINTerminalRuleCall_1());\n \t\t\n // InternalRMParser.g:2955:3: ( (lv_and_2_0= ruleEConditionClauseDefinition ) )\n // InternalRMParser.g:2956:4: (lv_and_2_0= ruleEConditionClauseDefinition )\n {\n // InternalRMParser.g:2956:4: (lv_and_2_0= ruleEConditionClauseDefinition )\n // InternalRMParser.g:2957:5: lv_and_2_0= ruleEConditionClauseDefinition\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getEConditionClauseDefinitionANDAccess().getAndEConditionClauseDefinitionParserRuleCall_2_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_and_2_0=ruleEConditionClauseDefinition();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEConditionClauseDefinitionANDRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"and\",\n \t\t\t\t\t\tlv_and_2_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.EConditionClauseDefinition\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_3=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_3, grammarAccess.getEConditionClauseDefinitionANDAccess().getENDTerminalRuleCall_3());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final org.emftext.language.textAML3.Condition parseop_Condition_level_5() throws RecognitionException {\n org.emftext.language.textAML3.Condition element = null;\n\n int parseop_Condition_level_5_StartIndex = input.index();\n\n org.emftext.language.textAML3.ComparisonCondition c0 =null;\n\n org.emftext.language.textAML3.FoldCondition c1 =null;\n\n\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return element; }\n\n // TextAML3.g:3920:2: (c0= parse_org_emftext_language_textAML3_ComparisonCondition |c1= parse_org_emftext_language_textAML3_FoldCondition )\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( ((LA39_0 >= NUMBER && LA39_0 <= TEXT)||LA39_0==VARID||LA39_0==14||LA39_0==26||(LA39_0 >= 28 && LA39_0 <= 29)||(LA39_0 >= 35 && LA39_0 <= 36)||LA39_0==38||LA39_0==40) ) {\n alt39=1;\n }\n else if ( (LA39_0==30) ) {\n alt39=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return element;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 0, input);\n\n throw nvae;\n\n }\n switch (alt39) {\n case 1 :\n // TextAML3.g:3921:2: c0= parse_org_emftext_language_textAML3_ComparisonCondition\n {\n pushFollow(FOLLOW_parse_org_emftext_language_textAML3_ComparisonCondition_in_parseop_Condition_level_54249);\n c0=parse_org_emftext_language_textAML3_ComparisonCondition();\n\n state._fsp--;\n if (state.failed) return element;\n\n if ( state.backtracking==0 ) { element = c0; /* this is a subclass or primitive expression choice */ }\n\n }\n break;\n case 2 :\n // TextAML3.g:3922:4: c1= parse_org_emftext_language_textAML3_FoldCondition\n {\n pushFollow(FOLLOW_parse_org_emftext_language_textAML3_FoldCondition_in_parseop_Condition_level_54259);\n c1=parse_org_emftext_language_textAML3_FoldCondition();\n\n state._fsp--;\n if (state.failed) return element;\n\n if ( state.backtracking==0 ) { element = c1; /* this is a subclass or primitive expression choice */ }\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 20, parseop_Condition_level_5_StartIndex); }\n\n }\n return element;\n }",
"List<Condition> composeFilterConditions(F filter);",
"public final EObject entryRuleCompositeGoal() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleCompositeGoal = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1222:2: (iv_ruleCompositeGoal= ruleCompositeGoal EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1223:2: iv_ruleCompositeGoal= ruleCompositeGoal EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getCompositeGoalRule()); \r\n }\r\n pushFollow(FOLLOW_ruleCompositeGoal_in_entryRuleCompositeGoal2510);\r\n iv_ruleCompositeGoal=ruleCompositeGoal();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleCompositeGoal; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleCompositeGoal2520); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public final EObject entryRuleCondition() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleCondition = null;\r\n\r\n\r\n try {\r\n // InternalShome.g:818:50: (iv_ruleCondition= ruleCondition EOF )\r\n // InternalShome.g:819:2: iv_ruleCondition= ruleCondition EOF\r\n {\r\n newCompositeNode(grammarAccess.getConditionRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleCondition=ruleCondition();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleCondition; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"static <T> Predicate<T> compose(Predicate<T>... functions) {\n return Stream.of(functions).reduce(__ -> true, Predicate::and);\n }",
"private C_Compose(Builder builder) {\n super(builder);\n }",
"PresenceCondition createPresenceCondition();",
"public final void ruleCompoundCondition() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:721:2: ( ( ( rule__CompoundCondition__Group__0 ) ) )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:722:1: ( ( rule__CompoundCondition__Group__0 ) )\n {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:722:1: ( ( rule__CompoundCondition__Group__0 ) )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:723:1: ( rule__CompoundCondition__Group__0 )\n {\n before(grammarAccess.getCompoundConditionAccess().getGroup()); \n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:724:1: ( rule__CompoundCondition__Group__0 )\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:724:2: rule__CompoundCondition__Group__0\n {\n pushFollow(FOLLOW_rule__CompoundCondition__Group__0_in_ruleCompoundCondition1478);\n rule__CompoundCondition__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getCompoundConditionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal helper to generate schemas from an IntermediateDataStructure, which represents an Avro Map type. By contrast to the public toMap(IntermediateDataStructure) method for external callers, this internal helper is modelURIaware. | private Pair<Schema, List<Schema>> toMap(final IntermediateDataStructure structure, final String modelUri) {
boolean _isMapSchemaType = this.isMapSchemaType(structure);
boolean _not = (!_isMapSchemaType);
if (_not) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("Structure ");
String _qualifiedName = structure.getQualifiedName();
_builder.append(_qualifiedName);
_builder.append(" cannot ");
String _plus = (_builder.toString() +
"be converted to Avro Map");
throw new IllegalArgumentException(_plus);
}
final Function1<IntermediateDataField, Boolean> _function = (IntermediateDataField it) -> {
return Boolean.valueOf(Util.hasAspect(it, Shared.MAP_VALUE_ASPECT_FULLY_QUALIFIED));
};
final IntermediateDataField mapValueField = IterableExtensions.<IntermediateDataField>findFirst(Util.visibleFields(structure), _function);
final Schema valueType = this.toRecord(CollectionLiterals.<IntermediateDataField>newArrayList(mapValueField), modelUri, structure.getQualifiedName());
final Schema avroMap = AvroSchemaFactory.createMap(structure.getQualifiedName(), valueType);
this.finishedComplexTypeSchemaCreation(avroMap, modelUri);
List<Schema> _createdSchemasForModel = this.createdSchemasForModel(modelUri);
return Pair.<Schema, List<Schema>>of(avroMap, _createdSchemasForModel);
} | [
"public Pair<Schema, List<Schema>> toMap(final IntermediateDataStructure structure) {\n final Schema map = this.toMap(structure, null).getKey();\n List<Schema> _allCreatedSchemas = this.allCreatedSchemas();\n return Pair.<Schema, List<Schema>>of(map, _allCreatedSchemas);\n }",
"public Pair<Schema, List<Schema>> generateSchemasFrom(final IntermediateComplexType complexType) {\n Pair<Schema, List<Schema>> _switchResult = null;\n boolean _matched = false;\n if (complexType instanceof IntermediateDataStructure) {\n _matched=true;\n _switchResult = this.generateSchemasFrom(((IntermediateDataStructure)complexType));\n }\n if (!_matched) {\n if (complexType instanceof IntermediateCollectionType) {\n _matched=true;\n _switchResult = this.generateSchemasFrom(((IntermediateCollectionType)complexType));\n }\n }\n if (!_matched) {\n if (complexType instanceof IntermediateEnumeration) {\n _matched=true;\n _switchResult = this.generateSchemasFrom(((IntermediateEnumeration)complexType));\n }\n }\n if (!_matched) {\n StringConcatenation _builder = new StringConcatenation();\n String _simpleName = complexType.getClass().getSimpleName();\n _builder.append(_simpleName);\n _builder.append(\" complex types is not supported\");\n String _plus = (\"Schemas\\' generation for \" + _builder);\n throw new IllegalArgumentException(_plus);\n }\n return _switchResult;\n }",
"private boolean isMapSchemaType(final IntermediateDataStructure structure) {\n final List<IntermediateDataField> visibleFields = Util.visibleFields(structure);\n if (((!Util.hasAspect(structure, Shared.MAP_ASPECT_FULLY_QUALIFIED)) || (visibleFields.size() != 2))) {\n return false;\n }\n final IntermediateDataField firstField = visibleFields.get(0);\n final IntermediateDataField secondField = visibleFields.get(1);\n return ((Util.hasAspect(firstField, Shared.MAP_KEY_ASPECT_FULLY_QUALIFIED) && \n Util.isPrimitiveType(firstField.getOriginalType(), PrimitiveTypeConstants.STRING.getLiteral())) && \n Util.hasAspect(secondField, Shared.MAP_VALUE_ASPECT_FULLY_QUALIFIED));\n }",
"public static MapSchema create(\n MutableSchema parentSchema,\n String name) {\n MapSchema schema =\n new MapSchema(\n parentSchema,\n name,\n parentSchema.getSubSchemaExpression(name, Object.class));\n parentSchema.addSchema(name, schema);\n return schema;\n }",
"private <RT extends IntermediateComplexType> Schema resolveSchema(final IntermediateType typeReference) {\n BiFunction<String, RT, Pair<Schema, List<Schema>>> _switchResult = null;\n IntermediateTypeKind _kind = typeReference.getKind();\n if (_kind != null) {\n switch (_kind) {\n case STRUCTURE:\n final BiFunction<String, RT, Pair<Schema, List<Schema>>> _function = (String modelUri, RT complexType) -> {\n return this.toRecord(((IntermediateDataStructure) complexType), modelUri);\n };\n _switchResult = _function;\n break;\n case ENUMERATION:\n final BiFunction<String, RT, Pair<Schema, List<Schema>>> _function_1 = (String modelUri, RT complexType) -> {\n return this.toEnum(((IntermediateEnumeration) complexType), modelUri);\n };\n _switchResult = _function_1;\n break;\n case COLLECTION:\n final BiFunction<String, RT, Pair<Schema, List<Schema>>> _function_2 = (String modelUri, RT complexType) -> {\n return this.toArray(((IntermediateCollectionType) complexType), modelUri);\n };\n _switchResult = _function_2;\n break;\n default:\n StringConcatenation _builder = new StringConcatenation();\n _builder.append(\"complex type \");\n String _name = typeReference.getName();\n _builder.append(_name);\n _builder.append(\" with kind \");\n IntermediateTypeKind _kind_1 = typeReference.getKind();\n _builder.append(_kind_1);\n _builder.append(\" and \");\n String _plus = (\"Schema resolution of intermediate \" + _builder);\n StringConcatenation _builder_1 = new StringConcatenation();\n _builder_1.append(\"origin \");\n IntermediateTypeOrigin _origin = typeReference.getOrigin();\n _builder_1.append(_origin);\n _builder_1.append(\" is not supported\");\n String _plus_1 = (_plus + _builder_1);\n throw new IllegalArgumentException(_plus_1);\n }\n } else {\n StringConcatenation _builder = new StringConcatenation();\n _builder.append(\"complex type \");\n String _name = typeReference.getName();\n _builder.append(_name);\n _builder.append(\" with kind \");\n IntermediateTypeKind _kind_1 = typeReference.getKind();\n _builder.append(_kind_1);\n _builder.append(\" and \");\n String _plus = (\"Schema resolution of intermediate \" + _builder);\n StringConcatenation _builder_1 = new StringConcatenation();\n _builder_1.append(\"origin \");\n IntermediateTypeOrigin _origin = typeReference.getOrigin();\n _builder_1.append(_origin);\n _builder_1.append(\" is not supported\");\n String _plus_1 = (_plus + _builder_1);\n throw new IllegalArgumentException(_plus_1);\n }\n final BiFunction<String, RT, Pair<Schema, List<Schema>>> conversionFunction = _switchResult;\n final Pair<String, IntermediateComplexType> modelUriAndResolvedType = this.<IntermediateComplexType>resolve(((RT) typeReference));\n final String modelUri = modelUriAndResolvedType.getKey();\n IntermediateComplexType _value = modelUriAndResolvedType.getValue();\n final RT resolvedType = ((RT) _value);\n Schema _elvis = null;\n Schema _schemaFrom = this.getSchemaFrom(modelUri, resolvedType);\n if (_schemaFrom != null) {\n _elvis = _schemaFrom;\n } else {\n Schema _key = conversionFunction.apply(modelUri, resolvedType).getKey();\n _elvis = _key;\n }\n return _elvis;\n }",
"private Schema getSchema(final IntermediateDataField dataField) {\n Schema _switchResult = null;\n IntermediateTypeKind _kind = dataField.getType().getKind();\n if (_kind != null) {\n switch (_kind) {\n case PRIMITIVE:\n _switchResult = Shared.toPrimitiveAvroType(dataField.getOriginalType().getName());\n break;\n case ENUMERATION:\n case STRUCTURE:\n case COLLECTION:\n _switchResult = this.<IntermediateComplexType>resolveSchema(dataField.getType());\n break;\n default:\n StringConcatenation _builder = new StringConcatenation();\n String _name = dataField.getType().getName();\n _builder.append(_name);\n _builder.append(\" with kind \");\n IntermediateTypeKind _kind_1 = dataField.getType().getKind();\n _builder.append(_kind_1);\n _builder.append(\" and origin \");\n String _plus = (\"Mapping of LEMMA type \" + _builder);\n StringConcatenation _builder_1 = new StringConcatenation();\n IntermediateTypeOrigin _origin = dataField.getType().getOrigin();\n _builder_1.append(_origin);\n _builder_1.append(\" is not supported\");\n String _plus_1 = (_plus + _builder_1);\n throw new IllegalArgumentException(_plus_1);\n }\n } else {\n StringConcatenation _builder = new StringConcatenation();\n String _name = dataField.getType().getName();\n _builder.append(_name);\n _builder.append(\" with kind \");\n IntermediateTypeKind _kind_1 = dataField.getType().getKind();\n _builder.append(_kind_1);\n _builder.append(\" and origin \");\n String _plus = (\"Mapping of LEMMA type \" + _builder);\n StringConcatenation _builder_1 = new StringConcatenation();\n IntermediateTypeOrigin _origin = dataField.getType().getOrigin();\n _builder_1.append(_origin);\n _builder_1.append(\" is not supported\");\n String _plus_1 = (_plus + _builder_1);\n throw new IllegalArgumentException(_plus_1);\n }\n return _switchResult;\n }",
"String getDefinitions_java_lang_String__software_amazon_awscdk_services_apigateway_JsonSchema_AsMap();",
"protected abstract Map<?,?> createMap(Map<?,?> input);",
"@Nonnull\n private static Optional<Map<String, PayloadType>> generateMapPayloadSchema(\n @Nonnull final List<Payload> payloads) {\n if (payloads.isEmpty()) {\n return Optional.empty();\n }\n\n final Set<String> emptyListValuePayloadKeys = new HashSet<>();\n final List<Map<String, PayloadType>> schemas =\n payloads.stream()\n .map(p -> inferSchemaForPayload(p, emptyListValuePayloadKeys))\n .collect(Collectors.toList());\n final Map<String, PayloadType> resultPayloadMapSchema = mergeSchemas(schemas);\n\n for (final String key : emptyListValuePayloadKeys) {\n if (!resultPayloadMapSchema.containsKey(key)\n || !resultPayloadMapSchema.get(key).isArrayType()) {\n throw new IllegalArgumentException(\"Cannot infer map schema type for key \" + key);\n }\n }\n // do not return an Optional of emptyMap\n return Optional.ofNullable(\n resultPayloadMapSchema.isEmpty() ? null : resultPayloadMapSchema);\n }",
"public Pair<Schema, List<Schema>> toRecord(final IntermediateDataStructure structure) {\n final Schema record = this.toRecord(structure, null).getKey();\n List<Schema> _allCreatedSchemas = this.allCreatedSchemas();\n return Pair.<Schema, List<Schema>>of(record, _allCreatedSchemas);\n }",
"public Pair<Schema, List<Schema>> generateSchemasFrom(final IntermediateCollectionType collectionType) {\n final Schema array = this.toArray(collectionType, null).getKey();\n List<Schema> _allCreatedSchemas = this.allCreatedSchemas();\n return Pair.<Schema, List<Schema>>of(array, _allCreatedSchemas);\n }",
"<Sk, Sv, Dk, Dv> Map<Dk, Dv> mapAsMap(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType,\n Type<? extends Map<Dk, Dv>> destinationType);",
"<Sk, Sv, Dk, Dv> Map<Dk, Dv> mapAsMap(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType,\n Type<? extends Map<Dk, Dv>> destinationType, MappingContext context);",
"<S, Dk, Dv> Map<Dk, Dv> mapAsMap(S[] source, Type<S> sourceType, Type<? extends Map<Dk, Dv>> destinationType);",
"private Object deserializeMap(Object datum, Schema fileSchema, Schema mapSchema, MapTypeInfo columnType)\n throws AvroSerdeException {\n Map<String, Object> map = new HashMap<String, Object>();\n Map<CharSequence, Object> mapDatum = (Map)datum;\n Schema valueSchema = mapSchema.getValueType();\n TypeInfo valueTypeInfo = columnType.getMapValueTypeInfo();\n for (CharSequence key : mapDatum.keySet()) {\n Object value = mapDatum.get(key);\n map.put(key.toString(), worker(value, fileSchema == null ? null : fileSchema.getValueType(),\n valueSchema, valueTypeInfo));\n }\n\n return map;\n }",
"public Map createMapFromSchema(InputSource src, int type, boolean storeOrder, Parser parser)\n\t throws InvalidMapException, SAXException, IOException\n {\n\t DTD dtd = null;\n\t DDMLToDTD ddmlToDTD;\n\n\t switch (type)\n\t {\n\t\t case SCHEMA_DDML:\n\t\t\tddmlToDTD = new DDMLToDTD(parser);\n\t\t\tdtd = ddmlToDTD.convert(parser, src);\n\t\t\tbreak;\n\n\t\t default:\n\t\t\tthrow new IllegalArgumentException(\"Invalid or unsupported type: \" + type);\n\t }\n\t return createMap(dtd, storeOrder);\n }",
"GenericData.Record read(Map<String, Object> json, Schema schema);",
"public List<Schema> generateSchemasFrom(final IntermediateContext context) {\n final Function1<IntermediateComplexType, List<Schema>> _function = (IntermediateComplexType it) -> {\n return this.generateSchemasFrom(it).getValue();\n };\n return this.withoutDuplicates(IterableExtensions.<Schema>toList(Iterables.<Schema>concat(ListExtensions.<IntermediateComplexType, List<Schema>>map(context.getComplexTypes(), _function))));\n }",
"public void generateSchema() throws Exception {\n\t\tBufferedReader fin = new BufferedReader(new FileReader(Cfg.CONFIGURATIONS_PATH + \"mapping/mapping.json\"));\n\t\tMapping mapping = new Gson().fromJson(fin, Mapping.class);\n\t\t\n\t\tfin.close();\n\t\t\n\t\t// insert several fields by default\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(\" <fields> \\n\");\n\t\tsb.append(\" <!-- SYSTEM FIELDS --> \\n\");\n\t\tsb.append(\" \t<field name=\\\"id\\\" type=\\\"identifier\\\" indexed=\\\"true\\\" stored=\\\"true\\\" required=\\\"true\\\" /> \\n\");\n\t\tsb.append(\" \t<field name=\\\"class\\\" type=\\\"identifier\\\" indexed=\\\"true\\\" stored=\\\"true\\\" required=\\\"true\\\" /> \\n\");\n\t\tsb.append(\" \t<field name=\\\"views\\\" type=\\\"long\\\" indexed=\\\"true\\\" stored=\\\"true\\\" required=\\\"false\\\" /> \\n\");\n\t\tsb.append(\" \t<field name=\\\"lastView\\\" type=\\\"long\\\" indexed=\\\"true\\\" stored=\\\"true\\\" required=\\\"false\\\" /> \\n\");\n\t\tsb.append(\" \t<field name=\\\"creation\\\" type=\\\"long\\\" indexed=\\\"true\\\" stored=\\\"true\\\" required=\\\"false\\\" /> \\n\");\n\t\tsb.append(\" <!-- CUSTOMIZED FIELDS --> \\n\");\n\t\t\n\t\t// insert user defined fields at mapping.json, each data type determines solr field type\n\t\tfor(DataMapping m : mapping.getData()) {\n\t\t\tif (\"class,id,views,lastView,creation\".contains(m.getName())) continue;\n\t\t\tString type = \"string\";\n\t\t\tif (m.getType().startsWith(\"date\")) type = \"int\";\t\t\t\t\t\t\t\t// TODO: add more types\n\t\t\tif (\"text\".equals(m.getType())) type = \"text_general\";\n\t\t\tif (\"yes\".equals(m.getSort()))\t// sort fields must be single-value to allow sorting\n\t\t\t\tsb.append(\"\t<field name=\\\"\"+m.getName()+\"\\\" type=\\\"\"+type+\"\\\" indexed=\\\"true\\\" stored=\\\"true\\\" multiValued=\\\"false\\\" /> \\n\");\n\t\t\telse\n\t\t\t\tsb.append(\"\t<field name=\\\"\"+m.getName()+\"\\\" type=\\\"\"+type+\"\\\" indexed=\\\"true\\\" stored=\\\"true\\\" multiValued=\\\"true\\\" /> \\n\");\n\t\t}\n\t\t\n\t\tsb.append(\" </fields> \\n\\n\\n \");\n\t\t\n\t\t// load schema.xml-EMPTY that contains field type definitions plus other stuff\n\t\tfin = new BufferedReader(new FileReader(Cfg.SOLR_PATH + \"conf/schema.xml-EMPTY\"));\n\t\t\n\t\tStringBuffer sb2 = new StringBuffer();\n\t\tString str = null;\n\t\twhile ((str = fin.readLine()) != null) sb2.append(str+\"\\n\");\n\t\t\n\t\t// uses a string mark to find out where to put field list\n\t\tint idx = sb2.indexOf(\"<!-- FIELDS_INSERTION_MARK -->\") + 31;\n\t\tif (idx!=-1) sb2.insert(idx, sb);\n\t\t\n\t\t// save schema.xml overwriting any existing schema\n\t\tFileWriter fout = new FileWriter(Cfg.SOLR_PATH + \"conf/schema.xml\");\n\t\tfout.write(sb2.toString());\n\t\tfout.close();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For a given node returns a sorted list of all its neighbors. | public List<Integer> getNeighbors(int node) {
Collections.sort(neighborsMap.get(node));
return neighborsMap.get(node);
} | [
"private List<Node> getNeighbors(Node node) {\n List<Node> neighbors = new LinkedList<>();\n\n for(Node adjacent : node.getAdjacentNodesSet()) {\n if(!isSettled(adjacent)) {\n neighbors.add(adjacent);\n }\n }\n\n return neighbors;\n }",
"private List<ContractableNode> neighboringNodes(ContractableNode node) {\n List<WeightedEdge<Long>> neighbors = neighbors(node.id());\n List<ContractableNode> result = new ArrayList<>(neighbors.size());\n for (WeightedEdge<Long> e : neighbors) {\n result.add(node(e.to()));\n }\n return result;\n }",
"List<Integer> getNeighboursOf(int node) {\n\t\treturn adjList.get(node);\n\t}",
"Set<Node> getNeighbors();",
"Node[] getNeighbors(Node aNode);",
"public LinkedList<Node> getAllNeighbours(Node<T> node) {\n LinkedList<Node> neighbours = new LinkedList<>();\n Iterator<Edge> itr = this.graph.get(node).listIterator();\n while(itr.hasNext()){\n Edge e = itr.next();\n System.out.println(e.toString());\n neighbours.add(e.n2);\n }\n return neighbours;\n }",
"public List<Node> getNeighbors(final Node node) {\n final List<Node> nodeList = new ArrayList<>();\n final String id = node.getId();\n this.log.info(\"searching by kanus Id: \" + id + \" and traversing outgoing edges to get neighbors\");\n final String neighborSuffix = \".outE().limit(50).inV().toList()\";\n final ResultSet neighborResultSet = this.template.getGremlinClient().submit(\"g.V(\" + id + \")\" + neighborSuffix);\n this.log.info(\"Parsing neighbors\");\n neighborResultSet.stream().forEach(result -> {\n this.log.info(\"------------\");\n final LinkedHashMap resultObject = (LinkedHashMap) result.getObject();\n resultObject.keySet().stream().forEach((key -> {\n this.log.info(key + \" - \" + resultObject.get(key).toString());\n }));\n final Node neighbor = new Node();\n final String type = resultObject.get(\"label\").toString();\n final String janusId = resultObject.get(\"id\").toString();\n neighbor.setType(type);\n final String idInsight = smartOpenProperties(resultObject, \"idInsight\");\n neighbor.setId(janusId);\n String searchKey = findSearchKey(type);\n if (searchKey != null) {\n neighbor.setMongoId(idInsight);\n final String label = smartOpenProperties(resultObject, searchKey);\n if (label != null) {\n neighbor.setLabel(label);\n nodeList.add(neighbor);\n this.log.info(\"adding node: \" + neighbor.toString());\n }\n }\n });\n return nodeList;\n }",
"@Override\r\n\tpublic List<N> getAdjacentNodes(N node){\n\t\tList<N> adjacentNodes = new ArrayList<N>();\r\n\t\tList<E> connectedEdges = adjacencyMap.get(node);\r\n\t\tfor(E currentEdge : connectedEdges){\r\n\t\t\tif(currentEdge.getNodeOut() != node)\r\n\t\t\t\tadjacentNodes.add(currentEdge.getNodeOut());\r\n\t\t\telse\r\n\t\t\t\tadjacentNodes.add(currentEdge.getNodeIn());\r\n\t\t}\r\n\t\treturn adjacentNodes;\r\n\t}",
"public int[] getNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }",
"public INode<N>[] getNeighbors(INode<N> n);",
"public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }",
"public List<Integer> getNeighbors() {\n return nodeNeighbors;\n }",
"public static Set<Node> generateNeighbors(Node node) {\n Set<Node> neighbors = new HashSet<Node>();\n byte[] content = node.getContent();\n int length = content.length;\n // find all 1-distance neighbors\n for (int i = 0; i < length; i++) {\n try {\n Node newNode = (Node) node.clone();\n byte[] newContent = newNode.getContent();\n newContent[i] = negate(newContent[i]);\n neighbors.add(newNode);\n } catch (CloneNotSupportedException e) {\n System.err.println(\"Cloning fails\");\n }\n }\n\n // find all 2-distance neighbors\n for (int i = 0; i < length - 1; i++)\n for (int j = i + 1; j < length; j++) {\n try {\n Node newNode = (Node) node.clone();\n byte[] newContent = newNode.getContent();\n newContent[i] = negate(newContent[i]);\n newContent[j] = negate(newContent[j]);\n neighbors.add(newNode);\n } catch (CloneNotSupportedException e) {\n System.err.println(\"Cloning fails\");\n }\n }\n return neighbors;\n }",
"public Collection<GridNode> getNeighbors(\n final GridMover mover,\n final GridNode node) {\n ArrayList<GridNode> neighbors = new ArrayList<GridNode>();\n addPassableNode(mover, neighbors, node.x() + 1, node.y());\n\n addPassableNode(mover, neighbors, node.x(), node.y() + 1);\n addPassableNode(mover, neighbors, node.x(), node.y() - 1);\n\n addPassableNode(mover, neighbors, node.x() - 1, node.y());\n\n return neighbors;\n }",
"private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }",
"public static HashSet<Node> getGraphNeighbors(Node node) {\n Iterable<Relationship> rels = node.getRelationships(RelationshipType.withName(\"GRAPH_LINK\"));\n HashSet<Node> neighbors = new HashSet<>();\n for (Relationship relationship : rels) {\n neighbors.add(relationship.getOtherNode(node));\n }\n return neighbors;\n }",
"private List<Integer> getAdjacent(int node) {\n List<Integer> adjacent = new ArrayList<>();\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n adjacent.add(i);\n }\n }\n return adjacent;\n }",
"public ArrayList<Space> neighbors()\n {\n ArrayList<Space> list = new ArrayList<Space>();\n for(Boundary b: boundaries)\n {\n for(Space s:b.borderOf())\n {\n if(!list.contains(s))\n {\n list.add(s);\n }\n }\n }\n return list;\n }",
"private ArrayList<GraphNode> getNeighbors(GraphNode graphNode){\n ArrayList<GraphNode> neighbours = new ArrayList<>();\n for(int i=0;i<this.adjacencyMatrix.length;i++){\n if(adjacencyMatrix[graphNode.index][i] != 0){\n neighbours.add(this.nodeList.get(i));\n }\n \n }\n return neighbours;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get access to the TAFScheduleManager object | public static TAFScheduleManager getTAFScheduleManager() {
if (tafScheduleManagerSingleton == null) {
tafScheduleManagerSingleton = new TAFScheduleManager();
}
return tafScheduleManagerSingleton;
} | [
"public abstract SchedulerManager getInstance();",
"public static RoomScheduleManager getInstance() {\n if (sInstance == null) {\n throw new IllegalStateException(\"RoomScheduleManager not instantiated!\");\n }\n return sInstance;\n }",
"Scheduler getScheduler();",
"public static Scheduler getScheduler() {\n return scheduler;\n }",
"private Messenger getScheduler() {\n if (isBound) {\n Logger.e(\"API -> get available messenger\");\n return mSchedulerMessenger;\n } else {\n Logger.e(\"API -> have not bound to a scheduler!\");\n return null;\n }\n }",
"public Scheduler getScheduler() {\n\t\ttry {\n\t\t\tworkspace().getReadAccess();\n\t\t\treturn _scheduler;\n\t\t} finally {\n\t\t\tworkspace().doneReading();\n\t\t}\n\t}",
"public final SchedulingService getSchedulingService() {\n return statementContext.getSchedulingService();\n }",
"public static SchedulerService get() {\n return SINGLETON;\n }",
"public Schedules getSchedule() {\n\t\treturn schedule;\n\t}",
"public Schedule getSchedule(){\r\n\t\treturn this.schedule;\r\n\t}",
"public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n\t}",
"public ScheduleType getScheduleType();",
"ISchedule getSchedule();",
"protected SchedulerService getSchedulerService() {\r\n if (schedulerService == null) {\r\n ServletContext servletContext = getContext().getServletContext();\r\n\r\n StdSchedulerFactory schedulerFactory = (StdSchedulerFactory)\r\n servletContext.getAttribute(QuartzInitializerListener.QUARTZ_FACTORY_KEY);\r\n\r\n if (schedulerFactory != null) {\r\n schedulerService = new SchedulerService(schedulerFactory);\r\n }\r\n }\r\n\r\n return schedulerService;\r\n }",
"public Scheduler getScheduler() {\n\t\treturn scheduler;\n\t}",
"public static ScheduledExecutorService getScheduler() {\n return schedulerService;\n }",
"protected ScheduleConfigurationDao getScheduleConfigurationDao()\n\t{\n\t\treturn scheduleConfigurationDao;\n\t}",
"public Scheduler getScheduler() {\n\t\treturn this.scheduler;\n\t}",
"Schedule createSchedule();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
String hql = "from LogInfo where CreateDatetime between to_date(?,'yyyyMMdd hh24:mm:ss') and to_date(?,'yyyyMMdd hh24:mm:ss')"; | public List<LogInfo> selectLogInfo(Date date1, Date date2) {
String hql = "from LogInfo where CreateDatetime between ? and ?";
// String hql = "from LogInfo where CreateDatetime between to_date('2007-9-7 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2017-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') or UpdateDatetime between to_date('2007-9-7 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2017-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss')";
List<LogInfo> list = (List<LogInfo>) getHibernateTemplate().find(hql,date1 ,date2);
// List<LogInfo> list = (List<LogInfo>) getHibernateTemplate().find(hql);
return list;
} | [
"@SuppressWarnings(\"unchecked\")\n@Override\n public List<QueryLog> getQueryLogByDateRange(String start, String end) {\n\t List<QueryLog> results = null;\n\t \n \t DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n \t Date startDate = null;\n \t Date endDate = null;\n\n \t //Session session = sessionFactory.getCurrentSession();\n \t session = getSession();\n\n \t Criteria criteria = session.createCriteria(QueryLog.class);\n\n \t try{\n \t\t if(start!=null && start.length()>0){\n \t\t\t startDate = formatter.parse(start);\n \t\t\t criteria.add(Restrictions.ge(\"timestamp\", startDate)); \n \t\t }\n \t }\n \t catch (Exception e){\n \t\t e.printStackTrace();\n \t }\n \t \n \t try{\n \t\t if(end!=null && end.length()>0){\n \t\t\t endDate = formatter.parse(end);\n \t\t\t \n \t\t\t //increment end date by one day - \n \t\t\t Calendar c = Calendar.getInstance(); \n \t\t\t c.setTime(endDate); \n \t\t\t c.add(Calendar.DATE, 1);\n \t\t\t endDate = c.getTime();\n \t\t\t \n \t\t\t criteria.add(Restrictions.lt(\"timestamp\", endDate));\n \t\t }\n \t }\n \t catch (Exception e){\n \t\t e.printStackTrace();\n \t }\n \t \n \t ProjectionList projectionList = Projections.projectionList(); \n \t projectionList.add(Projections.property(\"id\"), \"id\");\n \t projectionList.add(Projections.property(\"from_postcode\"),\"from_postcode\");\n \t projectionList.add(Projections.property(\"from_address\"),\"from_address\");\n \t projectionList.add(Projections.property(\"to_postcode\"),\"to_postcode\");\n \t projectionList.add(Projections.property(\"to_address\"),\"to_address\");\n \t projectionList.add(Projections.property(\"age_group\"),\"age_group\");\n \t projectionList.add(Projections.property(\"mobility_status\"),\"mobility_status\");\n \t projectionList.add(Projections.property(\"purpose\"),\"purpose\");\n \t projectionList.add(Projections.property(\"is_return\"),\"is_return\");\n \t projectionList.add(Projections.property(\"timestamp\"),\"timestamp\");\n\n \t criteria.addOrder(Order.asc((\"timestamp\")));\n \t criteria.setProjection(projectionList);\n \t criteria.setResultTransformer(Transformers.aliasToBean(QueryLog.class));\n \n \t results = criteria.list();\n \t \n \t// session.close();\n \t return results;\n \t \n }",
"@Query(\"select t from Ticket t where t.dateTime between ?1 and ?2\")\n List<Ticket> fetchAllTicketsBetweenDates(LocalDateTime minDate, LocalDate maxDate);",
"public List<History> findAllByAttractionAndDateFromAndDateTo(Attraction attraction, Date dateFrom, Date dateTo) {\n List<History> result = new ArrayList<>();\n WatchController watchController = new WatchController();\n this.connector.connect();\n try {\n String startDateFormatted = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(dateFrom);\n String endDateFormatted = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(dateTo);\n System.out.println(startDateFormatted);\n Statement st = this.connector.getConnection().createStatement();\n String sql = \"SELECT * FROM history WHERE \" +\n \"attraction_id = \" + attraction.getId() +\n \" AND entry_time >= '\" + startDateFormatted +\n \"' AND exit_time <= '\" + endDateFormatted + \"'\";\n ResultSet rs = st.executeQuery(sql);\n\n while (rs.next()) {\n History history = new History(\n rs.getTimestamp(\"entry_time\"),\n rs.getTimestamp(\"exit_time\"),\n attraction,\n watchController.getWatchById(rs.getInt(\"watch_id\"))\n );\n history.setId(rs.getInt(\"id\"));\n result.add(history);\n }\n System.out.println(\"Query has been executed\");\n } catch (SQLException e) {\n e.printStackTrace();\n this.connector.closeConnection(null);\n }\n this.connector.closeConnection(null);\n return result;\n\n }",
"public List<History> findAllByDateFromAndDateTo(Date dateFrom, Date dateTo) {\n List<History> result = new ArrayList<>();\n AttractionController attractionController = new AttractionController();\n WatchController watchController = new WatchController();\n this.connector.connect();\n try {\n String startDateFormatted = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(dateFrom);\n String endDateFormatted = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(dateTo);\n System.out.println(startDateFormatted);\n Statement st = this.connector.getConnection().createStatement();\n String sql = \"SELECT * FROM history WHERE \" +\n \"entry_time >= '\" + startDateFormatted +\n \"' AND exit_time <= '\" + endDateFormatted + \"'\";\n ResultSet rs = st.executeQuery(sql);\n\n while (rs.next()) {\n History history = new History(\n rs.getTimestamp(\"entry_time\"),\n rs.getTimestamp(\"exit_time\"),\n attractionController.getAttractionById(rs.getInt(\"attraction_id\")),\n watchController.getWatchById(rs.getInt(\"watch_id\"))\n );\n history.setId(rs.getInt(\"id\"));\n result.add(history);\n }\n System.out.println(\"Query has been executed\");\n } catch (SQLException e) {\n e.printStackTrace();\n this.connector.closeConnection(null);\n }\n this.connector.closeConnection(null);\n return result;\n }",
"public List<String> getAccountBetweenDate(String first_date, String second_date) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<String> accountList= session.createQuery(\"select account_no from Account where date(opening_date) BETWEEN '\"+first_date+\"' AND '\"+second_date+\"'\",String.class).list();\n return AccountDto.AccountBtwDate(accountList);\n }",
"List<DbInfo> FindByDiCreatetime(Long diCreatetime) throws SQLException;",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<QueryLogGroupedDTO> getAllQueryLogDataGroupByDate(String start, String end) {\n\n\t //Session session = sessionFactory.getCurrentSession();\n \t session = getSession();\n \t DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\n\t //String sql = \"SELECT * FROM query_log\";\n\t //String sql = \"SELECT Cast(timestamp as date) queryDate, Count(*) AS Total FROM query_log WHERE timestamp > '2015-09-02 11:00:00' GROUP BY Cast(timestamp as date)\";\n\t String sql = \"SELECT Cast(timestamp as date) queryDate, Count(*) AS count FROM query_log\";\n\t List<QueryLogGroupedDTO> res = new ArrayList<QueryLogGroupedDTO>();\n\t \n\t try{\n\t\t \n\t\t \tif(end!=null && end.length()>0){\n\t\t\t Date endDate = formatter.parse(end);\n\t\t\t //increment end date by one day - \n\t\t\t Calendar c = Calendar.getInstance(); \n\t\t\t c.setTime(endDate); \n\t\t\t c.add(Calendar.DATE, 1);\n\t\t\t endDate = c.getTime();\n\t\t\t end = formatter.format(endDate);\n\t\t }\t \n\t\t\t \n\t\t String where_clause=\"\";\n\t\t if(start!=null && start.length()>0){\n\t\t\t where_clause = \" WHERE timestamp>='\"+start+\"'\";\n\t\t\t \tif(end!=null && end.length()>0)\n\t\t\t \t\twhere_clause = where_clause +\" && timestamp<='\"+end+\"'\";\n\t\t }\n\t\t else if(end!=null && end.length()>0)\n\t\t\t \twhere_clause = \" WHERE timestamp<='\"+end+\"'\";\n\t\t \n\t\t sql = sql + where_clause;\n\t\t sql = sql + \" GROUP BY Cast(timestamp as date) ORDER BY timestamp ASC\";\n\t\t \n\t\t SQLQuery query = session.createSQLQuery(sql);\n\t \n\t\t System.out.println(\"SQLQuery : \"+ sql);\n\n\t\t List<Object[]> rows = query.list();\n\t\n\t\t for(Object[] item:rows){\n\t\t\t QueryLogGroupedDTO query_log_dto = new QueryLogGroupedDTO();\n\t\t\t \tMap<String, BigInteger> map_obj = new HashMap<String,BigInteger>();\n\t\t\t \tquery_log_dto.setCount(((BigInteger)item[1]).longValue());\n\t\t\t \tquery_log_dto.setColumn_name((String)item[0].toString());\n\t\t\t \t\n\t\t\t \tmap_obj.put((String)item[0].toString(),((BigInteger) item[1]));\n\t\t\t \tres.add(query_log_dto);\n\t//\t\t\tSystem.out.println(\"return size ----------- \" + item[0] +\":\"+item[1]);\n\t\n\t\t\t}\n\n\t }\n\t catch (Exception e){\n\t\t e.printStackTrace();\n\t }\n\t \n\t // session.close();\n\t return res;\n }",
"public List<Measurement> findMeasurementsByTimeRange(Date fromDate, Date toDate) {\n return entityManager.createQuery(\"SELECT m from \" +\n \"Measurement m where m.date >= :fromDate and m.date <= :toDate\", Measurement.class)\n .setParameter(\"fromDate\", fromDate)\n .setParameter(\"toDate\", toDate)\n .getResultList();\n\n }",
"List<Product> findAllByDateCreateBetween(Date startDate, Date endDate);",
"@Query(\"FROM Slot WHERE slot_for >= cast(?2 as date) AND slot_for < cast(?3 as date) AND status = 0 AND id = ?1\")\n List<Slot> findByDate(LocalDate today,LocalDate tomorrow,Long salonServiceDetailId, int slotStatus);",
"List<Ticket> findAllByDateTimeBetween(LocalDateTime minDateTime, LocalDateTime maxDateTime);",
"@Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n List<MeasurementEvent> findForPeriodTest(Date startDate, Date endDate);",
"public List<StatisticDTO> readByDate(Date fromDate, Date toDate) throws PersistenceException;",
"Iterable<DTimings> queryByCreatedDate(java.util.Date createdDate);",
"List<DbInfo> QuickFindByDiCreatetime(Long diCreatetime) throws SQLException;",
"@Query(\"select mc from MovieCinema mc where mc.dateTime > ?1\")\n List<MovieCinema> findAllWithHigherThanSpecificData(LocalDateTime dateTime);",
"public Query createQuery(String hql, Object... params) ;",
"List<VendorTransaction> findByVendorAndTransactionDateTimeIsBetween(Vendor vendor, Date from, Date to);",
"public java.sql.ResultSet consultaporhora(String hora){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where phm.horas='\"+hora+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporhora \"+ex);\r\n }\t\r\n return rs;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method reads the default port as specified by the PORT variable in the environment. Heroku provides the port automatically so you need this to run the project on Heroku. | static int getPort() {
if (System.getenv("PORT") != null) {
return Integer.parseInt(System.getenv("PORT"));
}
return 4567; //returns default port if heroku-port isn't set (i.e. on localhost)
} | [
"static int getHerokuAssignedPort() {\n ProcessBuilder processBuilder = new ProcessBuilder();\n if (processBuilder.environment().get(\"PORT\") != null) {\n return Integer.parseInt(processBuilder.environment().get(\"PORT\"));\n }\n return 4567; //Retorna el puerto por defecto en caso de no estar en Heroku.\n }",
"static int getHerokuAssignedPort() {\n ProcessBuilder processBuilder = new ProcessBuilder();\n if (processBuilder.environment().get(\"PORT\") != null) {\n return Integer.parseInt(processBuilder.environment().get(\"PORT\"));\n }\n return 7000; //Retorna el puerto por defecto en caso de no estar en Heroku.\n }",
"private static final String PORT() {\n return PropertiesUtil.getContextProperty(\"port\");\n }",
"private static int getPort(int defaultPort) {\n return CliConfSingleton.port;\n }",
"protected int getDefaultPort() {\r\n return DEFAULT_HTTP_PORT;\r\n }",
"default int getPort() {\n return getServer().getPort();\n }",
"private int setPort(Map<String, String> env) {\n if (env.containsKey(\"PORT\")) {\n try {\n int port = Integer.parseInt(env.get(\"PORT\"));\n port(port);\n return port;\n } catch (NumberFormatException e) {\n LOG.warn(\"Could not parse environment variable PORT, using default port 4567\", e);\n }\n }\n return 4567;\n }",
"public static int getGogoPort() {\n return gogoPort ;\n }",
"public int getServingPort() {\n return this.port;\n }",
"public String getDefaultPort() {\n return defaultPort;\n }",
"public int getPort() {\n final int port = getPortIfSpecified();\n if (port == UNSPECIFIED_PORT) {\n String prot = getProtocol();\n if (HTTPConstants.PROTOCOL_HTTPS.equalsIgnoreCase(prot)) {\n return HTTPConstants.DEFAULT_HTTPS_PORT;\n }\n if (!HTTPConstants.PROTOCOL_HTTP.equalsIgnoreCase(prot)) {\n log.warn(\"Unexpected protocol: \"+prot);\n // TODO - should this return something else?\n }\n return HTTPConstants.DEFAULT_HTTP_PORT;\n }\n return port;\n }",
"public int getPort() {\n final int port = getPortIfSpecified();\n if (port == UNSPECIFIED_PORT) {\n String prot = getProtocol();\n if (HTTPConstants.PROTOCOL_HTTPS.equalsIgnoreCase(prot)) {\n return HTTPConstants.DEFAULT_HTTPS_PORT;\n }\n if (!HTTPConstants.PROTOCOL_HTTP.equalsIgnoreCase(prot)) {\n log.warn(\"Unexpected protocol: \" + prot);\n // TODO - should this return something else?\n }\n return HTTPConstants.DEFAULT_HTTP_PORT;\n }\n return port;\n }",
"private static int getPort(String[] args) {\n String port = getArgument(args, \"--port\", \"4444\");\n return Integer.valueOf(port);\n }",
"public int getPort()\n {\n\t\treturn url.getPort();\n }",
"private int getListeningPort() {\n SharedPreferences mSP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n return Integer.parseInt(mSP.getString(LISTENING_PORT,LISTENING_PORT_DEF+\"\"));\n }",
"public Integer getPort() {\n return port;\n }",
"public int getSlackBotPort (){\n String portString = configuration.get(\"slack-bot port\");\n int port = Integer.parseInt(portString);\n return port;\n }",
"static int parseWebPort() throws CruiseControlException {\n final CruiseControlOptions config = CruiseControlOptions.getInstance();\n return config.getOptionInt(CruiseControlOptions.KEY_WEB_PORT);\n }",
"public int getDefaultPort()\r\n {\r\n return this._defaultPort_;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get revenue years SQL query | public static ArrayList<String> getRevenueYears() throws SQLException {
ArrayList<String> revenueYearsArray = new ArrayList<>();
String query = "SELECT EXTRACT(YEAR FROM date) AS \"Revenue Years\" FROM payment WHERE date IS NOT NULL GROUP BY EXTRACT(YEAR FROM date);";
ResultSet result = Connect.sqlExecute(query);
while (result.next()) {
revenueYearsArray.add(result.getString("Revenue Years"));
}
return revenueYearsArray;
} | [
"public static ResultSet getRevenueYearByYear(String year) {\n String query = \"SELECT EXTRACT(MONTH FROM date) AS \\\"Month\\\", SUM(total_price) AS \\\"Total Month Income\\\" FROM payment WHERE date IS NOT NULL AND EXTRACT(YEAR FROM date) = \" + year + \" GROUP BY EXTRACT(MONTH FROM date) ORDER BY \\\"Month\\\";\";\n ResultSet result = Connect.sqlExecute(query);\n\n return result;\n }",
"float getRevenue();",
"public final TimeSeries aggregateToYears() {\n return aggregate(TimePeriod.oneYear());\n }",
"public int getTravelsInYear(String year) {\n EntityManager em = getEntityManager();\n Calendar initDate = Calendar.getInstance();\n initDate.set(Calendar.DAY_OF_MONTH, 31);\n initDate.set(Calendar.MONTH, 11);\n initDate.set(Calendar.YEAR, Integer.parseInt(year)-1);\n Calendar endDate = Calendar.getInstance();\n endDate.set(Calendar.DAY_OF_MONTH, 1);\n endDate.set(Calendar.MONTH, 0);\n endDate.set(Calendar.YEAR, Integer.parseInt(year)+1);\n return ((Number) em.createNamedQuery(\"Viaje.getYearTravels\")\n .setParameter(\"initDate\", initDate.getTime())\n .setParameter(\"endDate\", endDate.getTime()).getSingleResult()).intValue();\n }",
"public java.lang.Double getPriorYearRevenue() {\n return priorYearRevenue;\n }",
"int getYears();",
"List<Expense> listExpenseByYear();",
"private Integer[] calculateYears(){\r\n\t\t\t\tint numYears = 110; //Number of years to put in array\r\n\t\t\t\tInteger[] years = new Integer[numYears];\r\n\t\t\t\tint currYear = Calendar.getInstance().get(Calendar.YEAR);\r\n\t\t\t\t//Loop through and add each year to array up to numYears\r\n\t\t\t\tfor (int i = 0;i<numYears;i++){\r\n\t\t\t\t\tyears[i] = currYear - i;\r\n\t\t\t\t}\r\n\t\t\t\treturn years;\r\n\t\t\t}",
"private double[] estimatePubYear(double[] sumSeries) {\r\n\r\n\t\tdouble[] years = new double[11];\r\n\t\tdouble sum = 0;\r\n\t\tint year = 0;\r\n\r\n\t\tfor (int i = timeStart-1; i<timeEnd; i++){\r\n\r\n\t\t\tif ((i-1)%365==0){\r\n\r\n\t\t\t\tyears[year] = sum;\r\n\t\t\t\tsum = 0;\r\n\t\t\t\tyear++;\r\n\t\t\t}\r\n\r\n\t\t\tsum+= sumSeries[i];\r\n\r\n\t\t}\r\n\r\n\t\treturn years;\r\n\t}",
"Rate getRevenueRate();",
"Integer getTenYear();",
"int getExpYear(String bookingRef);",
"public static void ListTotalNumberOfRepairsPerYear(DBproject esql) {\n\t\t Text_1.setText(\"\");\n \tOutput_Label.setText(\"\");\n \t\ttry{\n \t\t\tString query = String.format(\"SELECT date_part('year', r.repair_date) AS \\\"year\\\", COUNT(r.rid) AS \\\"Repair times\\\" FROM Repairs r GROUP BY date_part('year', r.repair_date) ORDER BY Count(r.rid);\");\n \t\t\tesql.executeQueryAndPrintResult(query);\n \t\t}catch(Exception e){\n \t\t\tSystem.err.println(e.getMessage());\n \t\t}\n\t}",
"public QueryYearVOImpl getQueryYearVO1() {\n return (QueryYearVOImpl)findViewObject(\"QueryYearVO1\");\n }",
"ArrayList<String> getYears(){\n\t\tStatement stmt = null;\n\t\tArrayList<String> retList = new ArrayList<String>();\n\t\ttry{\n\t\t\tstmt = c.createStatement();\n\t\t\tResultSet res = stmt.executeQuery(\"SELECT year FROM CWERecs GROUP BY year ORDER BY year DESC;\");\n\n\t\t\twhile(res.next()){\n\t\t\t\tretList.add(res.getString(1));\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry { if (stmt != null) stmt.close(); } catch (Exception e) {e.printStackTrace();};\n\t\t}\n\t\treturn retList;\n\t}",
"public Double getYearAmount() {\n return yearAmount;\n }",
"@GET\n @Path(\"/years\")\n public Collection<Integer> getYears() {\n return em.createNamedQuery(DISTINCT_YEARS, Integer.class).getResultList();\n }",
"public int getYearlyReleases() {\n return this.yearlyReleases;\n }",
"public Integer getYear(ResultOutput raw) throws WebRestQueryException {\n\t\ttry {\n\t\t\treturn raw.getInt(Constants.MOVIE_PROPERTY_YEAR);\n\t\t} catch (Throwable e) {\n\t\t\tthrow new WebRestQueryException(\"Unable to parse the movie year for the raw data = \" + raw, e);\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ snapshot things, e.g. for selection. returns a snapshot bufferedImage of this PaintObject. | public abstract BufferedImage getSnapshot(); | [
"protected BufferedImage snapshot() {\n\t\tBufferedImage bi = new BufferedImage(window.getContentPane().getWidth(), window.getContentPane().getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\twindow.getContentPane().paint(bi.getGraphics());\n\t\treturn bi;\n\t}",
"public WritableImage renderImage() {\n\t\tWritableImage image = canvas.snapshot(null, null);\n\t\t\n\t\t// debug\n\t\tsave(image);\n\n\t\treturn image;\n\t}",
"abstract Image getBackingImageForGcDrawOrRead();",
"public anywheresoftware.b4j.objects.ImageViewWrapper.ImageWrapper _snapshot2(anywheresoftware.b4j.objects.JFX.PaintWrapper _backgroundcolor) throws Exception{\nif (true) return _mbase.Snapshot2((javafx.scene.paint.Paint)(_backgroundcolor.getObject()));\n //BA.debugLineNum = 267;BA.debugLine=\"End Sub\";\nreturn null;\n}",
"private Bitmap takeScreenShot() {\n //invalidate the layout, otherwise it will give the older screenshot\n //if taken more than once\n graphLayout.invalidate();\n\n View rootView = graphLayout;\n rootView.setDrawingCacheEnabled(true);\n return rootView.getDrawingCache();\n }",
"public void snapshot() \n {\n System.out.println(\"Taking a snapshot ... snapshot.png\");\n\n glReadBuffer(GL_FRONT);\n\n int width = Display.getDisplayMode().getWidth();\n int height= Display.getDisplayMode().getHeight();\n int bpp = 4; // Assuming a 32-bit display with a byte each for red, green, blue, and alpha.\n ByteBuffer buffer = BufferUtils.createByteBuffer(width * height * bpp);\n glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer );\n\n File file = new File(\"snapshot.png\"); // The file to save to.\n String format = \"PNG\"; // Example: \"PNG\" or \"JPG\"\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n \n for(int x = 0; x < width; x++) {\n for(int y = 0; y < height; y++) {\n int i = (x + (width * y)) * bpp;\n int r = buffer.get(i) & 0xFF;\n int g = buffer.get(i + 1) & 0xFF;\n int b = buffer.get(i + 2) & 0xFF;\n image.setRGB(x, height - (y + 1), (0xFF << 24) | (r << 16) | (g << 8) | b);\n }\n }\n \n try {\n ImageIO.write(image, format, file);\n } catch (IOException e) { e.printStackTrace(); }\n }",
"@Override\r\n\tpublic Graphics getDrawingGraphics(){\r\n\r\n\t\treturn guiGraBuf.getDrawingArea();\r\n\t}",
"public static void snapshot() {\n\t\tSystem.out.println(\"Taking a snapshot ... snapshot.png\");\n\n\t\tGL11.glReadBuffer(GL11.GL_FRONT);\n\n\t\tint width = Display.getDisplayMode().getWidth();\n\t\tint height= Display.getDisplayMode().getHeight();\n\t\tint bpp = 4; // Assuming a 32-bit display with a byte each for red, green, blue, and alpha.\n\t\tByteBuffer buffer = BufferUtils.createByteBuffer(width * height * bpp);\n\t\tGL11.glReadPixels(0, 0, width, height, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer );\n\n\t\tFile file = new File(\"snapshot\"+(snapshot_count)+\".png\"); // The file to save to.\n\t\tsnapshot_count++;\n\t\tString format = \"PNG\"; // Example: \"PNG\" or \"JPG\"\n\t\tBufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\n\t\tfor(int x = 0; x < width; x++) {\n\t\t\tfor(int y = 0; y < height; y++) {\n\t\t\t\tint i = (x + (width * y)) * bpp;\n\t\t\t\tint r = buffer.get(i) & 0xFF;\n\t\t\t\tint g = buffer.get(i + 1) & 0xFF;\n\t\t\t\tint b = buffer.get(i + 2) & 0xFF;\n\t\t\t\timage.setRGB(x, height - (y + 1), (0xFF << 24) | (r << 16) | (g << 8) | b);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tImageIO.write(image, format, file);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t}",
"public anywheresoftware.b4j.objects.ImageViewWrapper.ImageWrapper _snapshot() throws Exception{\nif (true) return _mbase.Snapshot();\n //BA.debugLineNum = 260;BA.debugLine=\"End Sub\";\nreturn null;\n}",
"public Graphics2D createGraphics()\r\n {\r\n return bufferedImage.createGraphics();\r\n }",
"public Object getPixelsCopy() {\n\t\tif (snapshotPixels != null && snapshotCopyMode) {\n\t\t\tsnapshotCopyMode = false;\n\t\t\treturn snapshotPixels;\n\t\t} else {\n\t\t\tint[] pixels2 = new int[width * height];\n\t\t\tSystem.arraycopy(pixels, 0, pixels2, 0, width * height);\n\t\t\treturn pixels2;\n\t\t}\n\t}",
"public Bitmap snap() {\n\t\t\tBitmap bitmap = Bitmap.createBitmap(this.view.getWidth(),\n\t\t\t\t\tthis.view.getHeight(), Config.ARGB_8888);\n\t\t\tCanvas canvas = new Canvas(bitmap);\n\t\t\tview.draw(canvas);\n\t\t\treturn bitmap;\n\t\t}",
"private BufferedImage buildBuffer(){\n final Rectangle rect = renderingContext.getCanvasDisplayBounds();\n return new BufferedImage( rect.width, rect.height, BufferedImage.TYPE_INT_ARGB );\n }",
"public Object getSnapshotPixels() {\n\t\treturn snapshotPixels;\n\t}",
"BufferedImage getStencilImage(Paint paint) throws IOException;",
"public Graphics getImageGraphics() {\n\t\treturn image.getGraphics();\n\t}",
"public final ImageData copy()\n {\n final Context2D context = new ScratchPad(getWidth(), getHeight()).getContext();\n\n context.putImageData(this, 0, 0);\n\n return context.getImageData(0, 0, getWidth(), getHeight());\n }",
"void takeSnapShot(File fileToSave) {\n try {\n /*Construct a new BufferedImage*/\n BufferedImage exportImage = new BufferedImage(this.getSize().width,\n this.getSize().height,\n BufferedImage.TYPE_INT_RGB);\n\n \n /*Get the graphics from JPanel, use paint()*/\n this.paint(exportImage.createGraphics());\n \n fileToSave.createNewFile();\n ImageIO.write(exportImage, \"PNG\", fileToSave);\n } catch(Exception exe){\n System.out.println(\"DrawCanvas.java - Exception\");\n }//catch\n}",
"public Canvas getBufferGraphics() {\n\t\t/*// if necessary instantiate and store a graphics object for later use\n\t\tif (null == graphics) {\n\t\t\tif (null == bufferImage) {\n\t\t\t\tbufferImage = createImage(Constants.VIEW_WIDTH, Constants.VIEW_HEIGHT);\n\t\t\t\tif (null == bufferImage)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error: creation of buffered image failed, presumedly container not displayable\");\n\t\t\t\t\treturn null; // still no buffer image, give up\n\t\t\t\t}\n\t\t\t}\n\t\t\tgraphics = (Graphics2D) bufferImage.getGraphics();\n\t\t\tif (null == graphics) {\n\t\t\t\tSystem.out.println(\"Error: creation of graphics for buffered image failed, presumedly container not displayable\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// System.out.println(\"MazePanel: Using Rendering Hint\");\n\t\t\t\t// For drawing in FirstPersonDrawer, setting rendering hint\n\t\t\t\t// became necessary when lines of polygons\n\t\t\t\t// that were not horizontal or vertical looked ragged\n\t\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\t\t}\n\t\t}\n\t\treturn graphics;*/\n\n\t\treturn noteTaker;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for Direct Pre Approval Payment Orders List | public interface DirectPreApprovalPaymentOrdersList {
/**
* Pre Approval Code
*
* @return Code
*/
String getCode();
/**
* Status of the payment order
*
* @return Status
*/
Integer getStatus();
/**
* Number of the page desired to see the result
*
* @return Page number
*/
Integer getPage();
/**
* Max number os registers by page
*
* @return Max Page Results
*/
Integer getMaxPageResults();
} | [
"List<PaymentLine> getOrderItems();",
"Collection<OrderPayment> getOrderPaymentList();",
"List<ContractOrderResult> getContractOpenOrders(ContractOpenOrderRequest orderRequest);",
"CoolpayPaymentListResponse listPayments();",
"io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"public List<OrderInformation> showListOrder();",
"List<Order> getActiveOrders ();",
"public List<Order> getOrdersList();",
"List<Order> getBuyOrders();",
"List<CustomerOrder> getAllCustomerOrder();",
"List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);",
"public List<IOrder> getOrders(int customerNumber) throws DataExceptie;",
"List<PurchaseOrder> getPurchaseOrders(Integer customerId) throws DvdStoreException;",
"public List<Order> getAllActiveOrders();",
"public List<PaidServiceBill> getPaidServices(BillPayment payment);",
"@Action(\n semantics = SemanticsOf.SAFE\n )\n @ActionLayout(\n contributed = Contributed.AS_ACTION\n )\n @MemberOrder(sequence = \"2\")\n public List<CustomerOrderPayment> findCustomerOrderPayment(\n @ParameterLayout(named=\"Customer Order\")\n final CustomerOrder parCustomerOrder\n ) {\n return container.allMatches(\n new QueryDefault<>(\n CustomerOrderPayment.class,\n \"findCustomerOrderPayment\",\n \"parCustomerOrder\", parCustomerOrder\n ));\n }",
"public List getOrderDetails(OrderDetail orderDetail);",
"public List getPreCustInvestment(Long custId);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion de consultar el saldo | String consultarsaldo() {
//Esta funcion no tiene excepciones
message=("Tu saldo actual es de "+money+ "\n");
System.out.println(message);
return message;
} | [
"public double getSaldo()\n {\n return saldo;\n }",
"public double getSaldo() {\r\n return saldo;\r\n }",
"@Override\r\n public long deposito(long deposito) {\n saldo += deposito;\r\n \r\n // Mediante un cuadro de dialogo se anuncia el nuevo saldo\r\n JOptionPane.showMessageDialog(null, \"Su nuevo saldo es: \" + saldo);\r\n\r\n return saldo;\r\n\r\n }",
"Transaction getTransaction(String username, BigDecimal amount, String transactionID);",
"public void depositar(double depositar){\r\n if(depositar <0){\r\n System.out.println(\"El valor depositado debe ser positivo \");\r\n }\r\n else \r\n this.saldo= saldo+depositar;}",
"public double getSaldoMora() {\r\n return saldoMora;\r\n }",
"public void buscarVenta() {\r\n VentasClientes pe = ventasEJB.buscar(id);\r\n if (pe != null) {\r\n cuota = pe.getCuotas();\r\n afiliadoCedula = pe.getPersonaCliente().getCedula();\r\n fecha = pe.getFecha();\r\n saldo = pe.getSaldo();\r\n preciototal = pe.getPrecioTotal();\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Informacion\", \"Ha encontrado correctamente \"));\r\n } else {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Informacion\", \"No se encontro nada \"));\r\n }\r\n System.out.println(\"ha encontrado correctamente\");\r\n }",
"public static void deposit(int id, double deposit_am) {\n if (deposit_am < 0){\n System.out.println(\"You can not deposit a negative amount! Please try again!\");\n return;\n }\n try (Connection conn = ConnectionFactory.getInstance().getConnection()) {\n String change_bal = \"UPDATE accounts SET balance = balance + ? WHERE id = ?\";\n PreparedStatement pstmt = conn.prepareStatement(change_bal);\n pstmt.setDouble(1, deposit_am);\n pstmt.setInt(2, id);\n double balanceDelta = pstmt.executeUpdate();;\n if (balanceDelta != 0){\n ResultSet rs = pstmt.getGeneratedKeys();\n while(rs.next()){\n System.out.println(rs.getDouble(\"balance\"));\n }\n }\n double balance = AccountsDAO.fetchBalance(id);\n int account_num = AccountsDAO.fetchAccountNum(id);\n System.out.println(\"New balance is: \\n\" + balance);\n String trans_insert = \"INSERT INTO public.transactions (account_num, change, prev_bal)\" + \"VALUES (?,?,?)\";\n PreparedStatement prepState = conn.prepareStatement(trans_insert);\n prepState.setInt(1, account_num);\n prepState.setDouble(2, deposit_am);\n prepState.setDouble(3, (balance - deposit_am));\n int insertTrans = prepState.executeUpdate();\n if (insertTrans != 0){\n ResultSet rs = pstmt.getGeneratedKeys();\n while(rs.next()){\n System.out.println(rs.getDouble(\"balance\"));\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public String imprimirSaldo() {\r\n return \"El saldo de su cuenta bancaria es \"+ saldo;\r\n }",
"public Cliente[] findWhereSaldoClienteEquals(double saldoCliente) throws ClienteDaoException;",
"private void returnDeposit(String paymentInfo) {\n }",
"public saldo() {\n initComponents();\n }",
"public BankRekening(double saldo) {\n if (saldo > 0)\n setSaldo(saldo);\n }",
"public abstract void deposit(String id, Money amount);",
"public List retrieveCashReceipts(Deposit deposit);",
"public BigDecimal getSaldoBloqueado() {\n return saldoBloqueado;\n }",
"private void revertirBalanceSaldos(String nombreTarjeta, String idPago) {\n //código de actualización\n PayDBHelper myPayment = new PayDBHelper(getApplicationContext());\n BalanceDBHelper myBalanceInfo = new BalanceDBHelper(getApplicationContext());\n PayInfo myActualPayment = new PayInfo();\n CardBalanceInfo myBalance = new CardBalanceInfo();\n\n myActualPayment = myPayment.recuperarPago(Integer.parseInt(idPago));\n myBalance = myBalanceInfo.recuperarNombreTarjeta(nombreTarjeta);\n\n /*Estructura de myBalanceInfo\n * ID\n * Nombre de Tarjeta\n * Saldo deudor INT\n * Saldo deudor CERO\n * Monto disponible\n * Fecha_registro*/\n\n int idtransaccion;\n double SaldoDeudorInt;\n double SaldoDeudorCero;\n double MontoDisponible;\n double montoPagoActual;\n double newSaldoDeudorInt;\n double newSaldoDeudorCero;\n double newSaldoDisponible;\n\n montoPagoActual = myActualPayment.obtenerMontoPago();\n\n idtransaccion = myBalance.obtenerIDTransaction();\n SaldoDeudorInt = myBalance.obtenerSaldoDeudorINT();\n SaldoDeudorCero = myBalance.obtenerSaldoDeudorCEROINT();\n MontoDisponible = myBalance.obtenerMontoDisponible();\n\n\n //Falta crear la fórmula de distribución de pago\n //Para pruebas se dividirá equitativamente entre tres\n\n newSaldoDeudorCero = SaldoDeudorCero + montoPagoActual/3;\n newSaldoDeudorInt = SaldoDeudorInt + montoPagoActual/3;\n newSaldoDisponible = MontoDisponible - montoPagoActual/3;\n\n\n //actualización de la base de datos Saldo Disponible\n myBalanceInfo.actualizarSALDO(idtransaccion, nombreTarjeta, newSaldoDeudorInt, newSaldoDeudorCero, newSaldoDisponible);\n myBalanceInfo.close();\n\n\n }",
"public double deposit(double amt, Date date, String account){\n //your code here\n this.deposits.add(new Deposit(amt, date, account));\n if(account.equals(this.CHECKING)) {\n this.checkBalance += amt;\n return this.checkBalance;\n } else if(account.equals(this.SAVING)) {\n this.savingBalance += amt;\n return this.savingBalance;\n }\n return 0;\n }",
"public BigDecimal getSaldoAcumulado() {\n\t\treturn saldoAcumulado;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Signals end of selection manipulation. | public void processEndOfSelectionManipulation(); | [
"public void selectionCanceled() {}",
"public void endSelection()\n {\n\tisMultiSelection = false;\n\tsetMaxCheckCount(1);\n\tuncheckAll();\n }",
"void endRangeSelection() {\n mRanger = null;\n }",
"public void endDrawing() {\r\n SelectionResult res = SelectionResult.getInstance();\r\n\r\n res.selection = selection;\r\n res.referenceY = selectedY;\r\n\r\n res.previewWidth = getWidth();\r\n res.previewHeight = getHeight();\r\n\r\n selectedY = -1;\r\n }",
"void onSelectionCleared();",
"public abstract int getSelectionEnd();",
"public void selectionChanged();",
"void selectionChanged();",
"public void actionEndSelection(Component c, final int index) {\n final TextComponent tc = (TextComponent)c;\n invokeLater(c, new Runnable() {\n public void run() {\n tc.setSelectionEnd(index);\n }\n });\n }",
"public void moveSelectionEnd(){\n int line = mCursor.getLeftLine();\n setSelection(line, getText().getColumnCount(line));\n }",
"private void exitSequence_main_region_digitalwatch_Ticker_Editing_changeSelection() {\n\t\tswitch (stateVector[2]) {\n\t\tcase main_region_digitalwatch_Ticker_Editing_changeSelection_idle:\n\t\t\texitSequence_main_region_digitalwatch_Ticker_Editing_changeSelection_idle();\n\t\t\tbreak;\n\t\tcase main_region_digitalwatch_Ticker_Editing_changeSelection_increaseSelection:\n\t\t\texitSequence_main_region_digitalwatch_Ticker_Editing_changeSelection_increaseSelection();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public void onEndControl();",
"public void endSelection(MouseEvent mouseEvent) {\n if (Canvas.getInstance().getDragged()) {\n if (FXShape instanceof Rectangle) {\n if (Canvas.getInstance().getSelection()) {\n Position firstPos = Canvas.getInstance().getStartSelectPos();\n Canvas.getInstance().setSelection(false);\n double posX = mouseEvent.getX();\n double posY = mouseEvent.getY();\n if (posX < 0) {\n posX = 0;\n } else if (posX > ViewFX.getInstance().getCanvas().getWidth()) {\n posX = ViewFX.getInstance().getCanvas().getWidth();\n }\n if (posY < 0) {\n posY = 0;\n } else if (posY > ViewFX.getInstance().getCanvas().getHeight()) {\n posY = ViewFX.getInstance().getCanvas().getHeight();\n }\n Position secondPos = new Position(posX, posY);\n for (Shape s : Canvas.getInstance().getShapes()) {\n // top-left to bottom-right\n if (secondPos.getX() > firstPos.getX() && secondPos.getY() > firstPos.getY() && s.isInside(firstPos, secondPos)) {\n s.setSelected(true);\n }\n // bottom-right to top-left\n else if (secondPos.getX() < firstPos.getX() && secondPos.getY() < firstPos.getY() && s.isInside(secondPos, firstPos)) {\n s.setSelected(true);\n }\n // bottom-left to top-right\n else if (secondPos.getX() > firstPos.getX() && secondPos.getY() < firstPos.getY()) {\n Position firstIntermediatePos = new Position(secondPos.getX(), firstPos.getY());\n Position secondIntermediatePos = new Position(firstPos.getX(), secondPos.getY());\n if (s.isInside(secondIntermediatePos, firstIntermediatePos)) {\n s.setSelected(true);\n }\n }\n // top-right to bottom-left\n else if (secondPos.getX() < firstPos.getX() && secondPos.getY() > firstPos.getY()) {\n Position firstIntermediatePos = new Position(secondPos.getX(), firstPos.getY());\n Position secondIntermediatePos = new Position(firstPos.getX(), secondPos.getY());\n if (s.isInside(firstIntermediatePos, secondIntermediatePos)) {\n s.setSelected(true);\n }\n }\n\n }\n implementor.getCanvas().getChildren().clear();\n Canvas.getInstance().setSelection(false);\n Canvas.getInstance().setDragged(false);\n Canvas.getInstance().notifyAllShapes();\n }\n ((Rectangle) FXShape).setWidth(0);\n ((Rectangle) FXShape).setHeight(0);\n FXShape.setStrokeWidth(0);\n FXShape.setVisible(false);\n } else {\n throw new IllegalArgumentException();\n }\n }\n }",
"private void exitAction_main_region_digitalwatch_Ticker_Editing_changeSelection_increaseSelection() {\n\t\ttimer.unsetTimer(this, 12);\n\t}",
"public void deSelect();",
"public void endChoice() {\n endNode(ChoiceNode.class);\n }",
"public void removeSelection() {\n this.selection = null;\n }",
"@Override\n\tpublic void selectionChanged() {\n\t\tif (listenToSelectionChanges) {\n\t\t\tsendWhenPossible(SendCond.ALWAYS);\n\t\t}\n\t}",
"protected void handlePostSelect(SelectionEvent e) {\n SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());\n firePostSelectionChanged(event);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists all available software prices | public List<SoftwarePrice> listSoftwarePrices() throws IOException,
ClassNotFoundException {
return new LinkedList<SoftwarePrice>();
} | [
"public List<Product> listAllAvailableProducts();",
"List<EcsVolumePrice> selectAll();",
"public List<PlatformPrice> listPlatformPrices() throws IOException,\n\t\t\tClassNotFoundException {\n\t\tLinkedList<PlatformPrice> result = new LinkedList<PlatformPrice>();\n\t\tresult.add(getPlatformPrice());\n\t\treturn result;\n\t}",
"List<ParcelPrice> getListParcelPrices();",
"org.spin.grpc.util.Decimal getPriceList();",
"List<SpotPrice> getAll();",
"List<PriceInformation> getPriceForProduct(ProductModel product);",
"public List<ResourcePrice> listResourcePrices() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn new LinkedList<ResourcePrice>();\n\t}",
"public ArrayList<Double> GetPrices()\r\n\t{\r\n\t\treturn dayStockPrices;\r\n\t}",
"PriceListType getPriceList();",
"public void readPrices() {\n\t\tDate version = new Date();\n\t\tString altparty = getAltpartyid();\n\t\tboolean checkedVersion = false;\n\t\tString message = \"Interhome readPrices \" + altparty;\n\t\tLOG.debug(message);\n\t\tString fn = null;\n\t\t\n\t\tString salesoffice = getSalesOfficeCode(Currency.Code.EUR.name());\n\t\tCurrency.Code currency = Currency.Code.EUR;\n\t\t\n\t\tfinal SqlSession sqlSession = RazorServer.openSession();\n\t\ttry {\n\t\t\tfn = \"dailyprice_\" + salesoffice + \"_\" + currency.name().toLowerCase() + \".xml\";\n\n\t\t\t//check version of svn file and last price database entry\n\t\t\tnet.cbtltd.shared.Price action = new net.cbtltd.shared.Price();\n\t\t\taction.setState(net.cbtltd.shared.Price.CREATED);\n\t\t\taction.setPartyid(\"90640\");\n\t\t\taction.setAvailable(1);\n\n\t\t\tDate priceVersion = sqlSession.getMapper(PriceMapper.class).maxVersion(action);\n\t\t\tcheckedVersion = checkVersion(fn, priceVersion);\n\t\t\tif (checkedVersion) {\n\t\t\t\tJAXBContext jc = JAXBContext.newInstance(\"net.cbtltd.rest.interhome.price\");\n\t\t\t\tUnmarshaller um = jc.createUnmarshaller();\n\t\t\t\t\n\t\t\t\tPrices prices = (Prices) um.unmarshal(ftp(fn));\n\t\t\t\t\n\t\t\t\tif (prices != null && prices.getPrice() != null) {\n\t\t\t\t\tint count = prices.getPrice().size();\n\t\t\t\t\tLOG.debug(\"Total daily prices count: \" + count);\n\t\t\t\t} else {\n\t\t\t\t\tLOG.debug(\"Error, no dailyprices file\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tint i = 0;\n\t\t\t\tfor (Price price : prices.getPrice()) {\n\t\t\t\t\tString altid = price.getCode();\n//\t\t\t\t\tif (!altid.equals(\"CH3920.126.1\") || !\"CH3920.126.1\".equalsIgnoreCase(altid)) continue;\n\t\t\t\t\tString productid = getProductId(altid);\n\t\t\t\t\t\n\t\t\t\t\tif (productid == null) {\n\t\t\t\t\t\tProduct product = sqlSession.getMapper(ProductMapper.class).altread(new NameId(altparty, altid));\n\t\t\t\t\t\tif (product == null) {\n\t\t\t\t\t\t\tLOG.error(Error.product_id.getMessage() + \" \" + price.getCode());\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPRODUCTS.put(altid, product.getId());\n\t\t\t\t\t\tproductid = getProductId(altid);\n\t\t\t\t\t}\n\t\n//\t\t\t\t\tif (!productid.equals(\"27077\") || !String.valueOf(27077).equalsIgnoreCase(productid)) continue;\n\t\n\t\t\t\t\taction = new net.cbtltd.shared.Price();\n\t\t\t\t\taction.setPartyid(altparty);\n\t\t\t\t\taction.setEntitytype(NameId.Type.Product.name());\n\t\t\t\t\taction.setEntityid(productid);\n\t\t\t\t\taction.setCurrency(currency.name());\n\t\t\t\t\taction.setQuantity(1.0);\n\t\t\t\t\taction.setUnit(Unit.DAY);\n\t\t\t\t\taction.setName(net.cbtltd.shared.Price.RACK_RATE);\n\t\t\t\t\taction.setType(NameId.Type.Reservation.name());\n\t\t\t\t\taction.setDate(price.getStartdate().toGregorianCalendar().getTime());\n\t\t\t\t\taction.setTodate(price.getEnddate().toGregorianCalendar().getTime());\n\t\n\t\t\t\t\tnet.cbtltd.shared.Price exists = sqlSession.getMapper(PriceMapper.class).exists(action);\n\t\t\t\t\tif (exists == null) {sqlSession.getMapper(PriceMapper.class).create(action);}\n\t\t\t\t\telse {action = exists;}\n\t\n\t\t\t\t\taction.setState(net.cbtltd.shared.Price.CREATED);\n\t\t\t\t\taction.setRule(net.cbtltd.shared.Price.Rule.AnyCheckIn.name());\n\t\t\t\t\taction.setFactor(1.0);\n//\t\t\t\t\tDouble rentalPrice = price.getRentalprice().doubleValue();\n//\t\t\t\t\tDouble value = duration > 0.0 ? NameId.round(rentalPrice / quantity) : rentalPrice;\n\t\t\t\t\taction.setValue(price.getRentalprice().doubleValue());\n//\t\t\t\t\taction.setMinimum(price.getMinrentalprice().doubleValue());\n\t\t\t\t\taction.setVersion(version);\n\t\t\t\t\taction.setAvailable(1);\n\t\t\t\t\tsqlSession.getMapper(PriceMapper.class).update(action);\n\t\t\t\t\tsqlSession.getMapper(PriceMapper.class).cancelversion(action);\n\t\n\t\t\t\t\tLOG.debug(i++ + \" DailyPrice: \" + \" \" + price.getCode() + \" \" + productid + \" \" + salesoffice + \" \" + action.getValue() + \" \" + currency + \" daily\");\n\t\n//\t\t\t\t\tif (price.getFixprice().signum() != 0) {\n\t\t\t\t\t\tAdjustment adjust = setAdjustment(sqlSession, productid, 5, 999, currency.name(), action.getDate(), action.getTodate(), price, Adjustment.WEEK, \"fixprice\", version);\n\t\t\t\t\t\tDAILYPRICES.put(adjust.getID(), price.getRentalprice().doubleValue());\n\t\n\t\t\t\t\t\tLOG.debug(i++ + \" FixPrice: \" + \" \" + price.getCode() + \" \" + productid + \" \" + salesoffice + \" \" + adjust.getExtra() + \" \" + currency + \" fixprice\");\n//\t\t\t\t\t}\n\t\t\t\t\tif (price.getMidweekrentalprice().signum() != 0) {\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 1, 1, currency.name(), action.getDate(), action.getTodate(), price, (byte)0x1E, \"midweek\", version);\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 2, 2, currency.name(), action.getDate(), action.getTodate(), price, (byte)0xE, \"midweek\", version);\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 3, 3, currency.name(), action.getDate(), action.getTodate(), price, (byte)0x6, \"midweek\", version);\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 4, 4, currency.name(), action.getDate(), action.getTodate(), price, Adjustment.MONDAY, \"midweek\", version);\n\t\n\t\t\t\t\t\tLOG.debug(i++ + \" MidweekPrice: \" + \" \" + price.getCode() + \" \" + productid + \" \" + salesoffice + \" \" + adjust.getExtra() + \" \" + currency + \" midweek\");\n\t\t\t\t\t}\n\t\t\t\t\tif (price.getWeekendrentalprice().signum() != 0) {\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 1, 1, currency.name(), action.getDate(), action.getTodate(), price, Adjustment.SATURDAY, \"weekend\", version);\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 2, 2, currency.name(), action.getDate(), action.getTodate(), price, (byte)0x60, \"weekend\", version);\n\t\t\t\t\t\tadjust = setAdjustment(sqlSession, productid, 3, 3, currency.name(), action.getDate(), action.getTodate(), price, (byte)0x70, \"weekend\", version);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tLOG.debug(i++ + \" WeekendPrice: \" + \" \" + price.getCode() + \" \" + productid + \" \" + salesoffice + \" \" + adjust.getExtra() + \" \" + currency + \" weekend\");\n\t\t\t\t\t}\n//\t\t\t\t\tLOG.debug(i++ + \"DailyPrice: \" + \" \" + price.getCode() + \" \" + product.getId() + \" \" + salesoffice + \" \" + action.getValue() + \" \" + currency + \" \" + duration);\n\t\t\t\t}\n\t\t\t\tAdjustment cancelAction = new Adjustment();\n\t\t\t\tcancelAction.setCurrency(currency.name());\n\t\t\t\tcancelAction.setPartyID(altparty);\n\t\t\t\tcancelAction.setVersion(version);\n\t\t\t\t\n\t\t\t\tsqlSession.getMapper(AdjustmentMapper.class).cancelversion(cancelAction);\n\t\t\t\tsqlSession.commit();\n\t\t\t}\n\t\t}\n\t\tcatch (Throwable x) {\n\t\t\tsqlSession.rollback();\n\t\t\tLOG.error(x.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\tsqlSession.close();\n\t\t\tdelete(fn);\n\t\t}\n\t\tif (checkedVersion) {\n\t\t\treadPrices(version, salesoffice, currency, 7);\n\t\t\treadPrices(version, salesoffice, currency, 14);\n\t\t\treadPrices(version, salesoffice, currency, 21);\n\t\t\treadPrices(version, salesoffice, currency, 28);\n\t\t}\n\t}",
"List<Price> findAll();",
"public List<CatalogProductIndexPriceOptIdx> selectAll();",
"List<PriceRow> getPriceInformationsForProduct(ProductModel model);",
"public BigDecimal getPriceList();",
"public List<InstanceTypePrice> listInstanceTypePrices() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn new LinkedList<InstanceTypePrice>();\n\t}",
"static String[] getPrices() {\n\t\tfinal String url = \n \"https://www.cryptocurrencychart.com/top/100\";\n\t\tString[] prices = new String[27];\n int i = 0;\n try {\n final Document document = (Document) Jsoup.connect(url).get();\n Elements tableHTML = document.select(\"table.market-cap-list tr\");\n for (Element row : tableHTML) {\n \tif(row.select(\"td.name\").text()== \"\") {\n \t\tcontinue;\n \t}\n \telse {\n final String price = row.select(\"td.price\").text();\n String temp = price.replace(\",\", \"\");\n temp = temp.replace(\"$\", \"\");\n prices[i]=temp;\n i++;\n \t}\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n\t\treturn prices;\n\t}",
"Collection<String> getAllSupportedCurrenciesByShops();",
"int getPricesilver();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure. | protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
} | [
"@Override\n public IFigure getContentPane() {\n return getLayer(PRIMARY_LAYER);\n }",
"protected IFigure setupContentPane(IFigure nodeShape) {\n\t\tif (nodeShape.getLayoutManager() == null) {\n\t\t\tConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();\n\t\t\tlayout.setSpacing(5);\n\t\t\tnodeShape.setLayoutManager(layout);\n\t\t}\n\t\treturn nodeShape; // use nodeShape itself as contentPane\n\t}",
"protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {\n return getContentPane();\n }",
"public void setContentPane(Component component);",
"public JPanel getContentPane()\r\n\t{\r\n\t\treturn contentPanel;\r\n\t}",
"protected FlowFigureLayout(FlowFigure flowfigure) {\n this.flowFigure = flowfigure;\n }",
"protected javax.swing.JPanel getJDialogContentPane() {\r\n if(fContentPane == null) {\r\n fContentPane = new javax.swing.JPanel();\r\n fContentPane.setOpaque(true);\r\n \tfContentPane.setBorder(\r\n \t\t\tBorderFactory.createEmptyBorder(fPadding, fPadding, fPadding, fPadding));\r\n fContentPane.setLayout(new BorderLayout());\r\n fContentPane\r\n .add(getJPanelCenter(), BorderLayout.CENTER);\r\n if(getButtons() != null) {\r\n \tfContentPane\r\n\t \t.add(getJPanelSouth(), BorderLayout.SOUTH);\r\n }\r\n }\r\n return fContentPane;\r\n }",
"public abstract void layoutContents(UIContainer container);",
"public void \n doDefaultLayout() \n {\n doDefaultLayout(pLayoutPath);\n }",
"private void setupLayout(Container contentPane) {\r\n\t\t// The main splitPane; the pane that the the other components fit into\r\n\t\tJSplitPane mainSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);\r\n\t\tmainSplitPane.setDividerLocation(9 * HEIGHT / 12 );\r\n\t\t\r\n\t\t// The top splitPane; the pane the I/O window and options windows fit into\r\n\t\tJSplitPane topPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, this.IOContainer, this.tabbedPane);\r\n\t\ttopPane.setDividerLocation(WIDTH - (2 * HEIGHT / 3));\r\n\t\t\r\n\t\t// Set the location inside mainSplitPane\r\n\t\tmainSplitPane.setTopComponent(topPane);\r\n\t\tmainSplitPane.setBottomComponent(bottomPane);\r\n\t\t\r\n\t\t// Add the panes to the frame\r\n\t\tcontentPane.add(mainSplitPane);\r\n\t}",
"private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }",
"public abstract int setLayout();",
"public Component getContentPane()\n\t{\n\t\treturn getComponent(0);\n\t}",
"private void initSplitPane()\n {\n _graphPanel = initGraphPanel();\n _graphPanel.setLayout(_layout);\n // _graphPanel.setBackground(Color.white);\n\n addDrawableGraphMouseEventListeners();\n\n\n // capture our own mouse and key events in the GraphPanel\n // _graphPanel.addKeyListener(new ToolShortcutKeyAdapter());\n _graphPanel.addKeyListener(new GraphPanelKeyAdapter());\n _graphPanel.addMouseListener(new GraphPanelMouseAdapter());\n _graphPanel.addMouseMotionListener(new GraphPanelMouseMotionAdapter());\n\n // set up the marquee pane\n _marqueePane = new MarqueePane(this);\n _marqueePane.addMarqueeListener(this);\n\n _gLayeredPane = new GLayeredPane(_graphPanel, _marqueePane);\n\n JScrollPane scrollPane = new JScrollPane(_gLayeredPane);\n\n scrollPane.setPreferredSize(this.getPreferredSize());\n scrollPane.getViewport().setBackground(_graphPanel.getBackground());\n scrollPane.addComponentListener(new ComponentListener() {\n public void componentMoved(ComponentEvent e) {\n scrollPaneComponentMoved(e);\n }\n public void componentHidden(ComponentEvent e) {\n scrollPaneComponentHidden(e);\n }\n public void componentShown(ComponentEvent e) {\n scrollPaneComponentShown(e);\n }\n public void componentResized(ComponentEvent e) {\n scrollPaneComponentResized(e);\n }\n });\n\n\n _graphPanel.addComponentListener(_gLayeredPane);\n\n Insets spInsets = scrollPane.getInsets();\n _graphPanel.setLocation(spInsets.left, spInsets.top);\n\n // set up the sidebar\n if (isUsingSidebar()) {\n _sidebar = new GSidebar(this, getNodeFilterTable(), getEdgeFilterTable());\n //\n // the sidebar is a GAppFrameListener\n //\n addGAppFrameListener(_sidebar);\n MySplitPane p = new MySplitPane(scrollPane, _sidebar, true);\n p.setBackground(Color.yellow);\n _mainContentPane = p;\n }\n else {\n _mainContentPane = scrollPane;\n }\n\n _gLayeredPane.setBackground(Color.blue);\n }",
"public Container getContentPane() {\n\t\treturn contentPane;\n\t}",
"public void createContentPane() {\n\t\tLOG.log(\"Creating the content panel.\");\n\t\tCONTENT_PANE = new JPanel();\n\t\tCONTENT_PANE.setBorder(null);\n\t\tCONTENT_PANE.setLayout(new BorderLayout());\n\t}",
"private static void updateLayout() {\r\n JScrollPane scrollPane;\r\n\r\n contentPane.setBorder(\r\n BorderFactory.createTitledBorder(\r\n BorderFactory.createEtchedBorder(),\r\n \"Information on Spectrum and Graph\",\r\n TitledBorder.LEFT,\r\n TitledBorder.TOP));\r\n\r\n contentPane.setLayout(new GridBagLayout());\r\n\r\n GridBagConstraints c = new GridBagConstraints();\r\n c.fill = GridBagConstraints.BOTH;\r\n c.insets = new Insets(5, 5, 5, 5);\r\n\r\n c.gridwidth = 1;\r\n c.gridy = 0;\r\n c.gridx = 0;\r\n c.fill = GridBagConstraints.NONE;\r\n contentPane.add(new JLabel(\"Associated File\"), c);\r\n c.gridx = 1;\r\n c.fill = GridBagConstraints.HORIZONTAL;\r\n contentPane.add(fileField, c);\r\n\r\n scrollPane = new JScrollPane(specArea);\r\n\r\n scrollPane.setBorder(\r\n BorderFactory.createTitledBorder(\r\n BorderFactory.createEtchedBorder(),\r\n \"Spectrum Information\",\r\n TitledBorder.LEFT,\r\n TitledBorder.TOP));\r\n\r\n c.gridx = 0;\r\n c.gridy = 1;\r\n c.gridwidth = 2;\r\n c.fill = GridBagConstraints.CENTER;\r\n contentPane.add(scrollPane, c);\r\n\r\n c.gridwidth = 1;\r\n c.gridy = 2;\r\n c.gridx = 0;\r\n c.fill = GridBagConstraints.NONE;\r\n contentPane.add(new JLabel(\"Associated Graph Window Title\"), c);\r\n c.gridx = 1;\r\n c.fill = GridBagConstraints.HORIZONTAL;\r\n contentPane.add(frameField, c);\r\n\r\n scrollPane = new JScrollPane(graphArea);\r\n\r\n scrollPane.setBorder(\r\n BorderFactory.createTitledBorder(\r\n BorderFactory.createEtchedBorder(),\r\n \"Graph Information\",\r\n TitledBorder.LEFT,\r\n TitledBorder.TOP));\r\n\r\n c.gridx = 0;\r\n c.gridy = 3;\r\n c.gridwidth = 2;\r\n c.fill = GridBagConstraints.CENTER;\r\n contentPane.add(scrollPane, c);\r\n\r\n overlayScroller.setBorder(\r\n BorderFactory.createTitledBorder(\r\n BorderFactory.createEtchedBorder(),\r\n \"Overlaid Spectra (for one-dimensional spectra only)\",\r\n TitledBorder.LEFT,\r\n TitledBorder.TOP));\r\n\r\n c.gridx = 0;\r\n c.gridy = 4;\r\n c.gridwidth = 2;\r\n c.fill = GridBagConstraints.CENTER;\r\n contentPane.add(overlayScroller, c);\r\n }",
"public abstract Figure getFigure();",
"public void setupContentPane()\n{\n\n //add a JPanel to the frame to provide a familiar container\n mainPanel = new JPanel();\n //set the min/max/preferred sizes of the panel to set the size of the frame\n Tools.setSizes(mainPanel, 300, 90);\n setContentPane(mainPanel);\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Return all the current watcher lists, note that the returned watchers may be removed from the list by other threads | private Collection<Watchers> allWatchers() {
return inReadLock(removeWatchersLock, () -> watchersForKey.values());
} | [
"@SuppressWarnings(\"unchecked\")\n public Vector<TreeWidgetWatcher> getWatchers() {\n synchronized (this) {\n if (watchers == null) {\n watchers = new Vector<TreeWidgetWatcher>();\n }\n\n return (Vector<TreeWidgetWatcher>) watchers.clone();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n private synchronized final Vector<PropertyWatcher> _getWatchers() {\n return (Vector<PropertyWatcher>) _watchers.clone();\n }",
"public static List<IStopwatch> getStopwatches() {\n synchronized (lock) {\n return new ArrayList<IStopwatch>(watcheList);\n }\n }",
"private List<IntWatcher> getWatchers(String name) {\n List<IntWatcher> ws = watchers.get(name);\n if (ws == null) {\n ws = new ArrayList<>();\n watchers.put(name, ws);\n }\n return ws;\n }",
"public static List<Stopwatch> getStopwatches() {\n synchronized (lock) {\n final List<Stopwatch> stopwatchList = new ArrayList<Stopwatch>(stopwatchMap.values());\n return stopwatchList;\n }\n }",
"public static List<Stopwatch> getStopwatches() {\n return stopwatchList;\n }",
"private HashSet<Class<? extends Watcher>> findWatchers(Watcher watcher) {\n Class<?> clazz = watcher.getClass();\n HashSet<Class<?>> interfaces = getAllInterfaces(clazz);\n interfaces.remove(Watcher.class);\n HashSet<Class<? extends Watcher>> watchers = new HashSet<>();\n for (Class<?> interfaze : interfaces) {\n if (isExtendsFrom(Watcher.class, interfaze)) {\n //noinspection unchecked\n watchers.add((Class<? extends Watcher>) interfaze);\n }\n }\n return watchers;\n }",
"public List<WatchRecord> getWatchList() throws Exception {\r\n List<WatchRecord> watchList = new Vector<WatchRecord>();\r\n List<WatchRecordXML> chilluns = this.getChildren(\"watch\", WatchRecordXML.class);\r\n for (WatchRecordXML wr : chilluns) {\r\n watchList.add(new WatchRecord(wr.getPageKey(), wr.getLastSeen()));\r\n }\r\n return watchList;\r\n }",
"public List<MonitorObserver> getMonitorObservers()\n\t{\n\t\tfor (MonitorObserver observer : _monitorObservers) {\n\t\t\tif (observer.isConnected() == false) {\n\t\t\t\t_monitorObservers.remove(observer);\n\t\t\t}\n\t\t}\n\n\t\treturn (List<MonitorObserver>) Collections.unmodifiableList(_monitorObservers);\n\t}",
"public Set<AngularClientVariableWatcher> getAngularWatchers()\n\t{\n\t\tif (angularWatchers == null)\n\t\t{\n\t\t\tangularWatchers = new LinkedHashSet<>();\n\t\t}\n\t\treturn angularWatchers;\n\t}",
"public List<IStopwatch> getStopwatches() {\n\t\tif(list.isEmpty()){\n\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\treturn Collections.unmodifiableList(list);\n\t\t}\n\t}",
"public static List<Stopwatch> getStopwatches() {\n ArrayList<Stopwatch> stopwatchesTemp = new ArrayList<Stopwatch>();\n for(Stopwatch stopwatch: stopwatches) {\n stopwatchesTemp.add(stopwatch);\n }\n return stopwatchesTemp;\n }",
"@Override\n public Set<Monitor<?>> getRegisteredMonitors() {\n return ImmutableSet.copyOf(monitors);\n }",
"public List<Script> getWatchedScripts() {\n try {\n return new ArrayList<Script>(watchedScripts);\n } finally {\n }\n }",
"public interface Watchable\n{\n /**\n * Add the watcher to the list of all watchers\n */\n void attachWatcher(Watcher watcher);\n\n /**\n * Remove the watcher from the list of all watchers\n */\n void detachWatcher(Watcher watcher);\n\n /**\n * Notify all watchers in the list by calling their update method\n */\n void notifyWatchers();\n\n}",
"@Deprecated\n public Map<File, FileWatcher> getWatchers() {\n final Map<File, FileWatcher> map = new HashMap<>(watchers.size());\n for (Map.Entry<Source, ConfigurationMonitor> entry : watchers.entrySet()) {\n if (entry.getValue().getWatcher() instanceof ConfigurationFileWatcher) {\n map.put(entry.getKey().getFile(), (FileWatcher) entry.getValue().getWatcher());\n } else {\n map.put(entry.getKey().getFile(), new WrappedFileWatcher((FileWatcher) entry.getValue().getWatcher()));\n }\n }\n return map;\n }",
"public List<Address> getWatchedAddresses() {\n try {\n List<Address> addresses = new LinkedList<Address>();\n for (Script script : watchedScripts)\n if (script.isSentToAddress())\n addresses.add(script.getToAddress(params));\n return addresses;\n } finally {\n }\n }",
"public ArrayList<Watchpoint> get_watchpoint_manager() {\n return drawframe.get_watchpoint_manager(); \n }",
"void notifyWatchers();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays different content, depending on mode. mode 0: main buttons; mode 1: pizza buttons; mode 2: sides buttons; mode 3: drinks buttons | public void setMode(int mode)
{
updateItems();
this.removeAll(); // remove all existing buttons
if (mode == 0) // add main buttons
{
this.add(pizzas);
this.add(sides);
this.add(drinks);
}
else if (mode == 1) // add pizza types buttons
{
for(int i = 0; i< pizzaTypes.size(); i++)
{
this.add(pizzaTypes.get(i));
}
this.add(back);
}
else if (mode == 2) // add sides types buttons
{
for(int i = 0; i< sidesTypes.size(); i++)
{
this.add(sidesTypes.get(i));
}
this.add(back);
}
else if (mode == 3) // add drinks types buttons
{
for(int i = 0; i< drinksTypes.size(); i++)
{
this.add(drinksTypes.get(i));
}
this.add(back);
}
else // lost? go back to main selection...
{
setMode(0);
}
// revalidate & repaint
this.revalidate();
this.repaint();
} | [
"public void showButtonsSettingsModeSwitch() {\n FloatingActionButton btn_settings = (FloatingActionButton)findViewById(R.id.btn_settings);\n btn_settings.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_select = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n btn_mode_select.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_guide = (FloatingActionButton)findViewById(R.id.btn_guided);\n btn_mode_guide.setVisibility(View.VISIBLE);\n }",
"private void showModeButton(){\n if(activeFragment == activeFragments.COMPASS){\n modeButton.setImageResource(R.drawable.map_icon);\n }else{\n modeButton.setImageResource(R.drawable.compass_icon);\n }\n }",
"public void mode() {\n if (mazeview.getMode() == MazeView.SELECT_MODE) {\n mazeview.setMode(MazeView.PENCIL_MODE);\n modeButton.setGraphic(cursorImage);\n modeButton.setTooltip(cursorTooltip);\n } else {\n mazeview.setMode(MazeView.SELECT_MODE);\n modeButton.setGraphic(pencilImage);\n modeButton.setTooltip(pencilTooltip);\n }\n }",
"private void gtMode()\r\n {\r\n if (secret == 5 || secret == 7) secret++;\r\n else secret = 0;\r\n\r\n mode = Mode.MORE;\r\n gtBtn.setEnabled(false);\r\n ltBtn.setEnabled(true);\r\n gtBtn.setImageTintList(ColorStateList.valueOf(0xff8181ff));\r\n ltBtn.setImageTintList(ColorStateList.valueOf(0xffffffff));\r\n markBtn.setImageTintList(ColorStateList.valueOf(0xffffffff));\r\n zBar.setSecondaryProgress(0);\r\n update();\r\n }",
"public ModesGUI() {\n\t\tJLabel board = new JLabel();\n\t\tboard.setLayout(new GridLayout(3, 2));\n\t\tboard.add(passageLabel);\n\t\ttextP.setSize(0, 80);\n\t\t\n\n\t\t// Add the information board\n\t\tboard.add(textP);\n\t\tboard.add(fuelLabel);\n\t\tboard.add(textC);\n\t\tboard.add(timeLabel);\n\t\tboard.add(textT);\n\n\t\tthis.setTitle(\"Modes\");\n\t\tthis.setLayout(new BorderLayout());\n\t\tJPanel mainPanel = (JPanel) this.getContentPane();\n\t\tmainPanel.setLayout(new GridLayout(2, 1));\n\t\tmainPanel.add(board);\n\n\t\t// Create the buttons.\n\t\tJRadioButton chronosButton = new JRadioButton(CHRONOS);\n\t\tchronosButton.setSelected(true);\n\t\tJRadioButton fuelButton = new JRadioButton(FUEL);\n\t\tJRadioButton timeButton = new JRadioButton(TIME);\n\n\t\t// Group the radio buttons.\n\t\tButtonGroup group = new ButtonGroup();\n\t\tgroup.add(chronosButton);\n\t\tgroup.add(fuelButton);\n\t\tgroup.add(timeButton);\n\n\t\t// Register a listener for the radio buttons.\n\t\tchronosButton.addActionListener(this);\n\t\tfuelButton.addActionListener(this);\n\t\ttimeButton.addActionListener(this);\n\n\t\tJPanel radioPanel = new JPanel(new GridLayout(0, 1));\n\t\tradioPanel.add(chronosButton);\n\t\tradioPanel.add(fuelButton);\n\t\tradioPanel.add(timeButton);\n\t\tJPanel downPanel = new JPanel(new GridLayout(1, 1));\n\t\tdownPanel.add(radioPanel);\n\t\tdownPanel.add(choker);\n\t\tmainPanel.add(downPanel);\n\t\tmainPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\n\t\tthis.setPreferredSize(new Dimension(500, 300));\n\t\tthis.pack();\n\t\tthis.setVisible(true);\n\n\t}",
"private void setModeUI(){\n\n if (this.inManualMode == true){ this.enableRadioButtons(); } // manual mode\n else if (this.inManualMode == false){ this.disableRadioButtons(); } // automatic mode\n }",
"private void refreshStereoPreferenceUI(StereoPreference mode) {\n if (!isAdded()) {\n Log.d(TAG, \"Fragment is not added to activity. Aborting\");\n return;\n }\n // [API-CALL] Read current system state for DTS Enabled and set switch accordingly\n boolean dtsEnabled = isDtsEnabled();\n // For Preference icon, DTS needs to be enabled AND current active route must be\n // either line-out or bluetooth. Set preference icon accordingly\n if (dtsEnabled\n && (mActiveRoute == AudioRoute.LINE_OUT\n || mActiveRoute == AudioRoute.BLUETOOTH || mActiveRoute == AudioRoute.USB)) {\n// mPreferenceIcon.setImageTintList(mEnabledColor);\n// mPreferenceTitle.setTextColor(getResources().getColor(R.color.grey_deep_dark));\n } else {\n// mPreferenceIcon.setImageTintList(mDisabledColor);\n// mPreferenceTitle.setTextColor(getResources().getColor(R.color.grey_light));\n }\n\n switch (mode) {\n case WIDE:\n mWideButton.setChecked(true);\n mInfrontButton.setChecked(false);\n mTraditionalButton.setChecked(false);\n setTint(mImgWide,true);\n setTint(mTxtWide,true);\n setTintTitle(mTxtWideTitle,true);\n setTint(mImgInfront,false);\n setTint(mTxtInfront,false);\n setTintTitle(mTxtInfrontTitle,false);\n setTint(mImgTraditional,false);\n setTint(mTxtTraditional,false);\n setTintTitle(mTxtTraditionalTitle,false);\n break;\n case FRONT:\n mWideButton.setChecked(false);\n mInfrontButton.setChecked(true);\n mTraditionalButton.setChecked(false);\n setTint(mImgWide,false);\n setTint(mTxtWide,false);\n setTintTitle(mTxtWideTitle,false);\n setTint(mImgInfront,true);\n setTint(mTxtInfront,true);\n setTintTitle(mTxtInfrontTitle,true);\n setTint(mImgTraditional,false);\n setTint(mTxtTraditional,false);\n setTintTitle(mTxtTraditionalTitle,false);\n\n break;\n case TRADITIONAL:\n mWideButton.setChecked(false);\n mInfrontButton.setChecked(false);\n mTraditionalButton.setChecked(true);\n setTint(mImgWide,false);\n setTint(mTxtWide,false);\n setTintTitle(mTxtWideTitle,false);\n setTint(mImgInfront,false);\n setTint(mTxtInfront,false);\n setTintTitle(mTxtInfrontTitle,false);\n setTint(mImgTraditional,true);\n setTint(mTxtTraditional,true);\n setTintTitle(mTxtTraditionalTitle,true);\n break;\n }\n }",
"private void btnAdvancedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnAdvancedMouseClicked\n if(flagMode){\n pNormal.setVisible(true);\n pAdvanced.setVisible(false);\n btnAdvanced.setText(\"Clic para entrar en modo avanzado\");\n\n flagMode=false;\n flagModeView=true;\n }else{\n pNormal.setVisible(false);\n pAdvanced.setVisible(true);\n flagMode=true;\n flagModeView=false;\n btnAdvanced.setText(\"Clic para entrar en modo simple\");\n\n adFinder.requestFocus();\n\n }\n \n }",
"private void changeTab(String tab)\r\n\t{\r\n\t\t// hide all the components in the window\r\n\t\thideComponents();\r\n\t\t\r\n\t\tif(tab.equals(\"pins\"))\r\n\t\t{\r\n\t\t\t// change it to the \"Pins\" tab\r\n\t\t\tinventoryNameLabel.setVisible(true);\r\n\t\t\tinventoryCardDisplayLabel.setVisible(true);\r\n\t\t\tinventoryPinsPanel.setVisible(true);\r\n\t\t\tinventoryPinsScrollPane.setVisible(true);\r\n\t\t\twearPinButton.setVisible(true);\r\n\t\t\ttakeOffButton.setVisible(true);\r\n\t\t\tpinsWornPanel.setVisible(true);\r\n\t\t\tbackgroundLabel.setIcon(windowImage);\r\n\t\t\t\r\n\t\t\t// check to see if an item is already selected\r\n\t\t\tif(selectedPin != null)\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(selectedPin.getPinName());\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(selectedPin.getCardImage());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(\"\");\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(inventoryCardImage);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(tab.equals(\"furniture\"))\r\n\t\t{\r\n\t\t\t// change it to the \"Furniture\" tab\r\n\t\t\tinventoryNameLabel.setVisible(true);\r\n\t\t\tinventoryCardDisplayLabel.setVisible(true);\r\n\t\t\tinventoryFurniturePanel.setVisible(true);\r\n\t\t\tinventoryFurnitureScrollPane.setVisible(true);\r\n\t\t\tplaceFurnitureButton.setVisible(true);\r\n\t\t\tsellFurnitureButton.setVisible(true);\r\n\t\t\tbackgroundLabel.setIcon(furnitureWindowImage);\r\n\t\t\t\r\n\t\t\t// check to see if an item is already selected\r\n\t\t\tif(selectedFurniture != null)\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(selectedFurniture.getPinName());\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(selectedFurniture.getCardImage());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(\"\");\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(inventoryCardImage);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(tab.equals(\"clothing\"))\r\n\t\t{\r\n\t\t\t// change it to the \"Clothing\" tab\r\n\t\t\tinventoryNameLabel.setVisible(true);\r\n\t\t\tinventoryCardDisplayLabel.setVisible(true);\r\n\t\t\tinventoryClothingPanel.setVisible(true);\r\n\t\t\tinventoryClothingScrollPane.setVisible(true);\r\n\t\t\tbackgroundLabel.setIcon(clothingWindowImage);\r\n\t\t\t\r\n\t\t\t// check to see if an item is already selected\r\n\t\t\tif(selectedClothing != null)\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(selectedClothing.getPinName());\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(selectedClothing.getCardImage());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(\"\");\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(inventoryCardImage);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(tab.equals(\"posters\"))\r\n\t\t{\r\n\t\t\t// change it to the \"Posters\" tab\r\n\t\t\tinventoryNameLabel.setVisible(true);\r\n\t\t\tinventoryCardDisplayLabel.setVisible(true);\r\n\t\t\tinventoryPostersPanel.setVisible(true);\r\n\t\t\tinventoryPostersScrollPane.setVisible(true);\r\n\t\t\tplaceFurnitureButton.setVisible(true);\r\n\t\t\tsellFurnitureButton.setVisible(true);\r\n\t\t\tbackgroundLabel.setIcon(postersWindowImage);\r\n\t\t\t\r\n\t\t\t// check to see if an item is already selected\r\n\t\t\tif(selectedPoster != null)\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(selectedPoster.getPinName());\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(selectedPoster.getCardImage());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tinventoryNameLabel.setText(\"\");\r\n\t\t\t\tinventoryCardDisplayLabel.setIcon(inventoryCardImage);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(tab.equals(\"credits\"))\r\n\t\t{\r\n\t\t\t// change it to the \"Credit\" tab\r\n\t\t\tcreditsLabel.setVisible(true);\r\n\t\t\tcreditsLabel.setText(\"\" + gridObject.getMyCharacter().getCredits());\r\n\t\t\tbackgroundLabel.setIcon(creditsWindowImage);\r\n\t\t}\r\n\t\t\r\n\t\t// set the window size and show it again\r\n\t\tbackgroundLabel.setSize(backgroundLabel.getIcon().getIconWidth(), backgroundLabel.getIcon().getIconHeight());\r\n\t\tbackgroundLabel.setVisible(true);\r\n\t}",
"private void setGameModeUI() {\n if (this.gamemodeActive) {\n ((TextView) findViewById(R.id.txt_notification_frequency))\n .setText(getString(R.string.notification_frequency, Long.toString(SharedPrefsUtils.returnNotificationFrequency(this))));\n this.btn_game_mode.setBackgroundColor(getResources().getColor(R.color.colorActivated));\n this.txt_game_mode_activated.setVisibility(View.VISIBLE);\n this.txt_notification_frequency.setVisibility(View.VISIBLE);\n this.txt_game_mode_disabled.setVisibility(View.INVISIBLE);\n } else {\n this.btn_game_mode.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n this.txt_game_mode_activated.setVisibility(View.INVISIBLE);\n this.txt_notification_frequency.setVisibility(View.INVISIBLE);\n this.txt_game_mode_disabled.setVisibility(View.VISIBLE);\n }\n }",
"private void showModes(DisplayMode[] modes) {\n\t\tSystem.out.println(\"Modes\");\n\t\tfor (int i = 0; i < modes.length; i++) {\n\t\t\tSystem.out.print(\"(\" + modes[i].getWidth() + \",\"\n\t\t\t\t\t+ modes[i].getHeight() + \",\" + modes[i].getBitDepth() + \",\"\n\t\t\t\t\t+ modes[i].getRefreshRate() + \") \");\n\t\t\tif ((i + 1) % 4 == 0)\n\t\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private void createButtons(){\n\t\tfor(int i = 0; i < GAME_BUTTONS.length; i++){\n\t\t\tmiddlePanel.add(GAME_BUTTONS[i]);\n\t\t}\n\t\t// turns off the bird buttons\n\t\tfor(JButton turnoff: BIRD_BUTTONS){\n\t\t\tturnoff.setEnabled(false);\n\t\t}\n\t\t// turns off the fish buttons\n\t\tfor(JButton turnoff: FISH_BUTTONS){\n\t\t\tturnoff.setEnabled(false);\n\t\t}\n\t\t// turns off the shellfish buttons\n\t\tfor(JButton turnoff: SHELLFISHBUTTONS){\n\t\t\tturnoff.setEnabled(false);\n\t\t}\t\t\n\t}",
"public static void showChoiceButtons() {\n\t\tview.choice1.setVisible(true);\n\t\tview.choice2.setVisible(true);\n\t\tview.choice3.setVisible(true);\n\t\tview.choice4.setVisible(true);\n\t}",
"public void hideButtonsSettingsModeSwitch() {\n FloatingActionButton btn_settings = (FloatingActionButton)findViewById(R.id.btn_settings);\n btn_settings.setVisibility(View.GONE);\n\n FloatingActionButton btn_mode_select = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n btn_mode_select.setVisibility(View.GONE);\n\n FloatingActionButton btn_mode_guide = (FloatingActionButton)findViewById(R.id.btn_guided);\n btn_mode_guide.setVisibility(View.GONE);\n }",
"public void setLobbyButtonsEnabled(int mode) {\r\n\t\tbtnRoomListQuickStart.setEnabled(mode == 1);\r\n\t\tbtnRoomListRoomCreate.setEnabled(mode == 1);\r\n\t\tbtnRoomListRoomCreate1P.setEnabled(mode == 1);\r\n\r\n\t\titemLobbyMenuRuleChange.setEnabled(mode == 1);\r\n\t\titemLobbyMenuTeamChange.setEnabled(mode >= 1);\r\n\t\titemLobbyMenuRanking.setEnabled(mode >= 1);\r\n\r\n\t\tbtnLobbyChatSend.setEnabled(mode >= 1);\r\n\t\ttxtfldLobbyChatInput.setEnabled(mode >= 1);\r\n\t}",
"@FXML public void handleToggleButtons() {\n\t\t\n\t\t// binarySplitButton\n\t\tif (binarySplitButton.isSelected()) {\n\t\t\tbinarySplitButton.setText(\"True\");\n\t\t} else {\n\t\t\tbinarySplitButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// collapseTreeButton\n\t\tif (collapseTreeButton.isSelected()) {\n\t\t\tcollapseTreeButton.setText(\"True\");\n\t\t} else {\n\t\t\tcollapseTreeButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// debugButton\n\t\tif (debugButton.isSelected()) {\n\t\t\tdebugButton.setText(\"True\");\n\t\t} else {\n\t\t\tdebugButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotCheckCapabilitiesButton\n\t\tif (doNotCheckCapabilitiesButton.isSelected()) {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotMakeSplitPAVButton\n\t\tif (doNotMakeSplitPAVButton.isSelected()) {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// reduceErrorPruningButton\n\t\tif (reduceErrorPruningButton.isSelected()) {\n\t\t\treduceErrorPruningButton.setText(\"True\");\n\t\t} else {\n\t\t\treduceErrorPruningButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// saveInstanceDataButton\n\t\tif (saveInstanceDataButton.isSelected()) {\n\t\t\tsaveInstanceDataButton.setText(\"True\");\n\t\t} else {\n\t\t\tsaveInstanceDataButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// subTreeRaisingButton\n\t\tif (subTreeRaisingButton.isSelected()) {\n\t\t\tsubTreeRaisingButton.setText(\"True\");\n\t\t} else {\n\t\t\tsubTreeRaisingButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// unprunedButton\n\t\tif (unprunedButton.isSelected()) {\n\t\t\tunprunedButton.setText(\"True\");\n\t\t} else {\n\t\t\tunprunedButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useLaplaceButton\n\t\tif (useLaplaceButton.isSelected()) {\n\t\t\tuseLaplaceButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseLaplaceButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useMDLcorrectionButton\n\t\tif (useMDLcorrectionButton.isSelected()) {\n\t\t\tuseMDLcorrectionButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseMDLcorrectionButton.setText(\"False\");\n\t\t}\n\t\t\n\t}",
"private void showParkMenu() {\r\n ArrayList<String> strings = new ArrayList<>();\r\n strings.add(\"1: Ouvrir/fermer le parc \" + (Park.getInstance().is_open() ? \"(ouvert)\" : \"(fermé)\"));\r\n strings.add(\"2: Changer le prix d'entrée (\" + Park.getInstance().getPrice() + \"€)\");\r\n strings.add(\"3: Lister les zones disponibles\");\r\n strings.add(\"4: Lister les attractions installées\");\r\n strings.add(\"5: Lister les attractions en stock\");\r\n strings.add(\"6: Installer des attractions\");\r\n strings.add(\"7: Désinstaller des attractions\");\r\n strings.add(\"8: Nettoyer le parc\");\r\n strings.add(\"R: Retour\");\r\n String[] valid = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"R\", \"r\"};\r\n String action = this.view.showMenu(\"Gestion du parc \" + Park.getInstance().getName(), strings, valid);\r\n this.view.separator();\r\n switch (action) {\r\n case \"1\":\r\n if (Park.getInstance().is_open()) {\r\n Park.getInstance().close();\r\n this.view.print(\"Parc fermé\");\r\n } else {\r\n Park.getInstance().open();\r\n this.view.print(\"Parc ouvert\");\r\n }\r\n this.view.waitEnter();\r\n break;\r\n case \"2\":\r\n if (Park.getInstance().is_open()) {\r\n this.view.print(\"Le parc doit être fermé pour effectuer cette action\");\r\n } else {\r\n\r\n Park.getInstance().setPrice(Double.parseDouble(this.view.prompt(\"Nouveau prix\")));\r\n this.view.print(\"Effectué\");\r\n }\r\n this.view.waitEnter();\r\n break;\r\n case \"3\":\r\n this.view.print(Park.getInstance().listAreas());\r\n this.view.waitEnter();\r\n break;\r\n case \"4\":\r\n this.view.print(Park.getInstance().listAttractions(true));\r\n this.view.waitEnter();\r\n break;\r\n case \"5\":\r\n this.view.print(Park.getInstance().listAttractions(false));\r\n this.view.waitEnter();\r\n break;\r\n case \"6\":\r\n showParkInstallAttractionMenu();\r\n break;\r\n case \"7\":\r\n showParkUninstallAttractionMenu();\r\n break;\r\n case \"8\":\r\n this.view.print(Park.getInstance().clean());\r\n this.view.waitEnter();\r\n break;\r\n case \"R\":\r\n case \"r\":\r\n this.showMainMenu();\r\n break;\r\n }\r\n showParkMenu();\r\n }",
"private void showMainMenu() {\r\n ArrayList<String> strings = new ArrayList<>();\r\n strings.add(\"1: Accéder au magasin\");\r\n strings.add(\"2: Accéder à la banque\");\r\n strings.add(\"3: Accéder à la gestion du parc '\" + Park.getInstance().getName() + \"'\");\r\n strings.add(\"Q: Quitter le programme\");\r\n String[] valid = {\"1\", \"2\", \"3\", /*\"4\",*/ \"Q\", \"q\"};\r\n String action = this.view.showMenu(\"Main menu\", strings, valid);\r\n switch (action) {\r\n case \"1\":\r\n this.showShopMenu();\r\n break;\r\n case \"2\":\r\n this.showBankMenu();\r\n break;\r\n case \"3\":\r\n this.showParkMenu();\r\n break;\r\n case \"Q\":\r\n case \"q\":\r\n this.quitProgram();\r\n break;\r\n }\r\n }",
"protected void formMode() {\n\t\tif (mainLayout == null) {\n\t\t\tmainLayout = new DefaultVerticalLayout(false, true);\n\n\t\t\tText label = new Text(getTitle() == null ? \"\" : getTitle());\n\t\t\tmainLayout.add(label);\n\n\t\t\t// add the screen-specific content\n\t\t\tif (buildMainLayout != null) {\n\t\t\t\tbuildMainLayout.accept(mainLayout);\n\t\t\t}\n\t\t}\n\n\t\t// disable polling\n\t\tui.setPollInterval(-1);\n\t\tremoveAll();\n\t\tadd(mainLayout);\n\t\tif (afterFormModeEntered != null) {\n\t\t\tafterFormModeEntered.run();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to find the missing element in AP series | static int missingElement(int arr[], int n)
{
// Sort the array arr[]
Arrays.sort(arr);
// Calculate Common Difference
int diff = (arr[n - 1] - arr[0]) / n;
// Binary search for the missing
return findMissing(arr, 0, n - 1, diff);
} | [
"private int nMissing(int[] nums, int i) {\n return nums[i] - nums[0] - i;\n }",
"public static int firstMissing(int[] x){\n int[] ans = new int[x.length];\n for(int j=0; j<x.length; j++ ){\n if(x[j]>0 && x[j]<x.length) ans[x[j]] = x[j];\n }\n\n for(int j=1; j<ans.length; j++){\n if(ans[j]!=j) return j;\n }\n return ans[ans.length-1]+1;\n }",
"int findMissingUtil(int arr[], int low, int high, int diff) {\n\t\t// There must be two elements to find the missing\n\t\tif (high <= low)\n\t\t\treturn Integer.MAX_VALUE;\n\n\t\t// Find index of middle element\n\t\tint mid = low + (high - low) / 2;\n\n\t\t// The element just after the middle element is missing.\n\t\t// The arr[mid+1] must exist, because we return when\n\t\t// (low == high) and take floor of (high-low)/2\n\t\tif (arr[mid + 1] - arr[mid] != diff)\n\t\t\treturn (arr[mid] + diff);\n\n\t\t// The element just before mid is missing\n\t\tif (mid > 0 && arr[mid] - arr[mid - 1] != diff)\n\t\t\treturn (arr[mid - 1] + diff);\n\n\t\t// If the elements till mid follow AP, then recur\n\t\t// for right half\n\t\tif (arr[mid] == arr[0] + mid * diff)\n\t\t\treturn findMissingUtil(arr, mid + 1, high, diff);\n\n\t\t// Else recur for left half\n\t\treturn findMissingUtil(arr, low, mid - 1, diff);\n\t}",
"public int findMissingNumber(int[] array){\r\n int n = array.length + 1; \r\n\t\treturn (n * (n+1)/2) - ((n-1) * n/2); \r\n\t}",
"public List<Integer> getMissingValueIndex(){\n List<Integer> mvidx = new ArrayList<>();\n for (int i = 0; i < xdata.length; i++){\n if (MIMath.doubleEquals(xdata[i], this.missingValue) || MIMath.doubleEquals(ydata[i], this.missingValue))\n mvidx.add(i);\n }\n \n return mvidx;\n }",
"public static void getMissingNumber2()\n\t{\n\t\tint[] arr = {1,2,3,5}; \n\t \n\t int indexes = 5; \n\t int values = 0; \n\t \n\t for (int i = 0; i < arr.length; i++)\n\t { \n\t indexes += i + 1; \n\t values += arr[i]; \n\t } \n\t \n\t int result = indexes - values; \n\t \n\t System.out.println(\"Missing number is: \" + result); \n\t}",
"public static void main(String[] args) {\n int [] iArray = new int[]{1,2,3,5,6,7,8,9};\n int missing = getMissing(iArray,9);\n System.out.println(\"Missing number from array is :\"+missing);\n\n }",
"double getMissingDataSignal();",
"private static int findMissingNumber(int[] nums) {\n int n = nums.length;\n int sum = n;\n for (int i = 0; i < n; i++) {\n sum += i - nums[i];\n }\n return sum;\n }",
"static int getMissingNo (int a[], int n)\r\n {\r\n \tint i, total;\r\n \ttotal = (n+1)*(n+2)/2; \r\n \tfor ( i = 0; i< n; i++){\r\n \t\ttotal = total- a[i];\r\n \t}\r\n \treturn total;\r\n }",
"static int findTheFirstMissingPositiveEntry(int array[]) {\n for (int i = 0; i < array.length; i++) {\n while ((array[i] > 0) && (array[i] != i + 1)) {\n int elem = array[i];\n if (array[elem - 1] == elem) break;\n\n Utilities.swap(array, i, elem - 1);\n }\n }\n\n for (int i = 0; i < array.length; i++) {\n if (array[i] != i + 1) return i + 1;\n }\n\n return 0;\n }",
"public int searchMissing(int[] nums) {\n\t\tint low = 0;\n\t\tint high = nums.length - 1;\n\n\t\twhile(low <= high) {\n\t\t\tint mid = low + (high - low)/2;\n\n //base condition - if mid is not at 0th index and\n // if mid is greater than mid - 1 by more than one\n //then return mid - 1\n\t\t\tif (mid - 1 >= 0 && nums[mid - 1] != (nums[mid] - 1)) {\n\t\t\t\treturn nums[mid] - 1;\n\t\t\t} else if (nums[mid] == nums[0] + mid) {\n //if number at middle is at correct location, means\n //left sub sequence is contigous, go right\n\t\t\t\tlow = mid + 1;\n\t\t\t} else {\n //else go left\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\n //there are no missing elements in this increasing/contigous array\n\t\treturn -1;\n }",
"private static int missingNumber(int[] nums) {\n\t\t// TODO Auto-generated method stub\n\t\tint sum = 0; \n\t\tint end = nums.length; \n\t\t\n for(int i=0; i<end; i++){\n sum += i;\n sum = sum - nums[i];\n }\n \n sum = sum + end; \n\t\t\t\t\n\t\treturn sum;\n\t}",
"public static int findMissingNumber(int[] numbers) {\n int diff = numbers[1]-numbers[0];\n return recurrDiff(numbers,diff);\n }",
"public int findMissingInt(int[] A, int n, int bit_index, int miss_number){\n\tif(bit_index >= Math.log(n)/Math.log(2))\n\t\treturn miss_number;\n\tint missing_number = 0;\n\tint cnt_1s = count(A, 1, bit_index);\n\tint cnt_0s = count(A, 0, bit_index);\n\tif(n%2 == 0){\n\t\tif(cnt_1s+1 > cnt_0s)//even are missing\n\t\t\treturn findMissingInt(getPart(A, 0), n, bit_index+1, miss_number<<1);\n\t\telse{//odd missing\n\t\t\treturn findMissingInt(getPart(A, 1), n, bit_index+1, miss_number<<1+1);\n\t}else{\n\t\tif(cnt_1s > cnt_0s)//even missing\n\t\t\treturn findMissingInt(getPart(A, 0), n, bit_index+1, miss_number<<1);\n\t\telse//odd missing\n\t\t\treturn findMissingInt(getPart(A, 1), n, bit_index+1, miss_number<<1+1);\n\t}\n}\n\n/**\n * however the book use an ArrayList, saves much effort!\n */\nprivate int[] getPart(int[] A, int parity){// get all the odd/even elements in array A\n}",
"public boolean isMissing( int index ) throws MiningException\n {\n \tELogicalAttribute la = logicalData.getAttribute(index);\n \tboolean missing = false;\n if (la.getAttributeType() == AttributeType.categorical ){\n \tCategoryProperty currentCP = la.getCategoricalProperties().getProperty((int) getValue(index));\n \tif(currentCP == CategoryProperty.missing)\n \t\tmissing = true;\n }\n else {\n \tmissing = Double.isNaN(getValue(index));\n }\n\n return missing;\n }",
"static int findOneMissingNumber(int a[]) {\n int number = 0;\n int size = a.length;\n for (int i = 0; i < size; i++)\n number ^= ((i + 1) ^ a[i]);\n number ^= (size + 1);\n return number;\n }",
"private ArrayList<Integer> getMissingIndexes(ArrayList<Float> vector1){\n ArrayList<Integer> missingIndexes = new ArrayList<Integer>();\n for (int i = 0; i < vector1.size(); i++) {\n if(vector1.get(i)==-1){\n missingIndexes.add(i);\n }\n }\n return missingIndexes;\n }",
"public /*@pure@*/ static double missingValue() {\n\n return MISSING_VALUE;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of AddressRanges class. | public AddressRanges() {} | [
"public Addresses() {\n this(DSL.name(\"addresses\"), null);\n }",
"public SetOfRanges() {\n RangeSet = new Vector();\n }",
"private static RangeSet createLocalHostRangeSet() {\n RangeSet result = new RangeSet();\n result.ranges = Lists.newArrayList();\n // Do not use the constants defined above, as these might not be initialized yet.\n // As the definition of localhost shouldn't change, we live with double defined constants rather than\n // using static/lazy initializer magic...\n result.ranges.add(IPRange.parseRange(\"127.0.0.1\"));\n result.ranges.add(IPRange.parseRange(\"0:0:0:0:0:0:0:1\"));\n return result;\n }",
"public PortRange() {\n this(UNBOUND, UNBOUND);\n }",
"Range createRange();",
"abstract public Range createRange();",
"default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}",
"public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }",
"public Range() {\n }",
"public ConfigRange() {\r\n\t\tsuper();\r\n\t}",
"public PortRange(int lowerBound, int upperBound) {\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n }",
"public PortRange() {\n }",
"public static Range make(int first, int last) {\n try {\n return new Range(first, last);\n } catch (InvalidRangeException e) {\n throw new RuntimeException(e); // cant happen if last >= first\n }\n }",
"public RoadBounds() {\n bounds = new Rectangle[39];\n createRoadBounds();\n }",
"CollectionRange createCollectionRange();",
"public Set<T> getRanges();",
"RangeExpression createRangeExpression();",
"public VRange()\n {\n }",
"public static List<Integer> createRanges(int... startEnds) {\n assert startEnds.length % 2 == 0;\n ArrayList<Integer> ret = new ArrayList<>();\n for (int si = 0; si < startEnds.length; si++) {\n final int start = startEnds[si++];\n final int end = startEnds[si];\n assert end >= start;\n ret.ensureCapacity(ret.size() + ((end - start) + 1));\n for (int i = start; i <= end; i++) {\n ret.add(i);\n }\n }\n return ret;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case Read Entity | @SmallTest
public void testRead() {
Settings result = null;
if (this.entity != null) {
result = this.adapter.getByID(this.entity.getId());
SettingsUtils.equals(this.entity, result);
}
} | [
"public void testGetEntity() throws Exception {\n \n // TODO : implement\n }",
"Object getEntity();",
"java.lang.String getEntity();",
"@Test\n void b_readItem(){\n Item itemread = repository.read(item.getItemNumber());\n assertEquals(itemread.getItemNumber(), item.getItemNumber());\n System.out.println(\"Read Item: \"+ itemread);\n }",
"@Test\r\n public void testRead() {\r\n System.out.println(\"read\");\r\n Book b = new Book(\"99921-58-10-7\", \"Mon chien stupide\", \"John FANTE\");\r\n BookDao dao = BookDaoFactory.getDao();\r\n dao.create(b);\r\n\r\n Book b2 = new Book(\"99921-58-10-7\");\r\n assertNull(b2.getTitle());\r\n dao.read(b2);\r\n assertEquals(\"Mon chien stupide\", b.getTitle());\r\n }",
"@Override\n public GameLogEntity readEntity(final GameLogEntity entity) {\n return this.getEntityManager().\n find(GameLogEntity.class, entity.getId());\n }",
"private Entity readEntity(BsonReader reader) {\n switch (reader.getCurrentBsonType()) {\n case DOCUMENT:\n return Entity.ofMap(readDocument(reader));\n case ARRAY:\n return readArray(reader);\n case BOOLEAN:\n return Entity.ofBoolean(reader.readBoolean());\n case STRING:\n return Entity.ofString(reader.readString());\n case INT32:\n // Small written Int64 values are still read as Int32, so include the Int32 case as well.\n return Entity.ofNumber(reader.readInt32());\n case INT64:\n return Entity.ofNumber(reader.readInt64());\n case BINARY:\n return Entity.ofBinary(UnsafeByteOperations.unsafeWrap(reader.readBinaryData().getData()));\n default:\n throw new UnsupportedOperationException(\n String.format(\"Unsupported BSON type: %s\", reader.getCurrentBsonType().name()));\n }\n }",
"@Test\n public void testRead() {\n Cliente.setNome(\"teste\");\n assertTrue(pDAO.read().isEmpty());\n }",
"@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }",
"@Test\n @Ignore\n public void testRead() throws Exception {\n System.out.println(\"read\");\n Identifier identifier = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.read(identifier);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void testRead() {\n\t\t\n\t\tboardRepository.findById(10L).ifPresent(vo -> log.info(\"\"+vo));\n\t\t\n\t}",
"@Test\n @Transactional\n public void testRead_String() {\n service.create(traject);\n Traject traject2 = new Traject();\n traject2.setNaam(\"Java Developer\");\n traject2.setOmschrijving(\"Opleiding tot Java Developer nieuwe versie\");\n traject2.setStartdatum(new Date());\n service.create(traject2);\n \n Traject traject3 = new Traject();\n traject3.setNaam(\"Java Developer 3\");\n traject3.setOmschrijving(\"Opleiding tot Java Developer nieuwe versie\");\n traject3.setStartdatum(new Date());\n service.create(traject3);\n \n List<Traject> lijst = service.read(\"Java Developer\");\n System.out.println(lijst);\n \n assertNotNull(\"Lijst, is not null\", lijst);\n }",
"@Test\n @Transactional\n public void testRead_int() {\n System.out.println(\"creating traject\");\n service.create(traject);\n \n Traject result = (Traject)service.read(traject.getId());\n int trajectId = result.getId();\n \n assertNotNull(\"traject must not be null\", traject);\n assertNotNull(\"result must not be null\", result);\n \n assertEquals(\"traject, all fields must be equal\", traject, result);\n }",
"@Test\r\n\tpublic void testRead()\r\n\t{\r\n\t\tString customerName = \"Customer7\";\r\n\t\tString customerEmail = \"customer7@gmail.com\";\r\n\t\tString address = \"India\";\r\n\t\tString taxNumber = \"101\";\r\n\t\tString workType = \"group\";\r\n\t\t\r\n\t\t// Customer table\r\n\t\tCustomerModel model = new CustomerModel(customerName, customerEmail, T_PHONE_NUMBER, address, taxNumber, null, workType, new Date(), T_PASSWORD, T_PASSWORD, \"path7\", null);\r\n\r\n\t\tmodel.setCustomerPricePlanId(idOfPricePlan);\r\n\r\n\t\tlong id = customerHelper.save(clientContext, model);\r\n\t\tlogger.debug(T_DEBUG_CUS_MESSAGE, id);\r\n\t\tAssert.assertTrue(id > 0);\r\n\r\n\t\tCustomerModel cm = customerHelper.read(clientContext, id);\r\n\t\tAssert.assertEquals(customerName, cm.getName());\r\n\t\tAssert.assertEquals(customerEmail, cm.getEmail());\r\n\t\tAssert.assertEquals(T_PHONE_NUMBER, cm.getPhoneNumber());\r\n\t\tAssert.assertEquals(address, cm.getAddress());\r\n\t\tAssert.assertEquals(taxNumber, cm.getSalesTaxNumber());\r\n\t\tAssert.assertEquals(workType, cm.getWorkType());\r\n\t\tAssert.assertTrue(cm.getCustomerPricePlanId() > 0);\r\n\t\tAssert.assertEquals(cm.getCustomerPricePlanId(), idOfPricePlan.longValue());\r\n\t\tAssert.assertNotNull(cm.getRegistrationDate());\r\n\t}",
"EntityData<?> getEntityData();",
"@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }",
"int get(Entity entity);",
"@GET\n @Path(\"/\")\n public Response read() {\n\n if (entityDefinition == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n EntityBody entityBody = entityDefinition.getService().getCustom(entityId);\n if (entityBody == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n return Response.status(Status.OK).entity(entityBody).build();\n }",
"E getEntity(D dto);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se adiciona un nuevo solicitante al map HandCheck | public static void setHandCheck(String solicitante, String idCarpeta){
List<String> lsHandCheck=null;
if(chmHandCheck.containsKey(solicitante)){
lsHandCheck=chmHandCheck.get(solicitante);
if(!lsHandCheck.contains(idCarpeta))
lsHandCheck.add(idCarpeta);
}else{
lsHandCheck=new ArrayList<String>();
lsHandCheck.add(idCarpeta);
chmHandCheck.put(solicitante, lsHandCheck);
}
} | [
"public void requestAnotherShotAfterMiss()\n\t{\n\t\tlayerProxy_.requestAnotherLocationToFireOn();\n\t}",
"void setStartingHand(Map<HantoPieceType, Integer> startingHand);",
"private void addNewLocation() {\n\n Map currentMap = mapView.getCurrentMap();\n\n if (currentMap == null) {\n new AlertDialog.Builder(this).setPositiveButton(\n android.R.string.ok, null)\n .setTitle(R.string.map_view_title).setMessage(\n R.string.map_view_no_map_selected).create().show();\n Log.w(TAG, \"addNewLocation: no current map shown\");\n return;\n }\n\n progressDialog.show();\n\n Location location = new Location();\n\n location.setMap(currentMap);\n\n firstMeasurement = true;\n mLocation = location;\n //------------inject----------------------\n\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n displayListOfFoundDevices();\n //-------------end------------------------\n mWifiService.forceMeasurement();\n\n // mWifiService.stopMeasuring();\n\n }",
"void willChooseGameMap() throws RemoteException;",
"public WMS100MapRequest() {\n\n }",
"private void fillMaps() {\n\n alertMap.put(0, \"CLOSE_NOTIFY\");\n alertMap.put(10, \"UNEXPECTED_MESSAGE\");\n alertMap.put(20, \"BAD_RECORD_MAC\");\n alertMap.put(21, \"DECRYPTION_FAILED\");\n alertMap.put(22, \"RECORD_OVERFLOW\");\n alertMap.put(30, \"DECOMPRESSION_FAILURE\");\n alertMap.put(40, \"HANDSHAKE_FAILURE\");\n alertMap.put(41, \"NO_CERTIFICATE\");\n alertMap.put(42, \"BAD_CERTIFICATE\");\n alertMap.put(43, \"UNSUPPORTED_CERTIFICATE\");\n alertMap.put(44, \"CERTIFICATE_REVOKED\");\n alertMap.put(45, \"CERTIFICATE_EXPIRED\");\n alertMap.put(46, \"CERTIFICATE_UNKNOWN\");\n alertMap.put(47, \"ILLEGAL_PARAMETER\");\n alertMap.put(48, \"UNKNOWN_CA\");\n alertMap.put(49, \"ACCESS_DENIED\");\n alertMap.put(50, \"DECODE_ERROR\");\n alertMap.put(51, \"DECRYPT_ERROR\");\n alertMap.put(60, \"EXPORT_RESTRICTION\");\n alertMap.put(70, \"PROTOCOL_VERSION\");\n alertMap.put(71, \"INSUFFICIENT_SECURITY\");\n alertMap.put(80, \"INTERNAL_ERROR\");\n alertMap.put(90, \"USER_CANCELLED\");\n alertMap.put(100, \"NO_RENEGOTIATION\");\n alertMap.put(110, \"UNSUPPORTED_EXTENSION\");\n\n handShakeMap.put(0, \"HELLO_REQUEST\");\n handShakeMap.put(1, \"CLIENT_HELLO\");\n handShakeMap.put(2, \"SERVER_HELLO\");\n handShakeMap.put(4, \"NEW_SESSION_TICKET\");\n handShakeMap.put(11, \"CERTIFICATE\");\n handShakeMap.put(12, \"SERVER_KEY_EXCHANGE\");\n handShakeMap.put(13, \"CERTIFICATE_REQUEST\");\n handShakeMap.put(14, \"SERVER_HELLO_DONE\");\n handShakeMap.put(15, \"CERTIFICATE_VERIFY\");\n handShakeMap.put(16, \"CLIENT_KEY_EXCHANGE\");\n handShakeMap.put(20, \"FINISHED\");\n handShakeMap.put(22, \"CERTIFICATE_STATUS\");\n\n }",
"public void newGame(){\n sendGuess(new Request(NEW_GAME));\n }",
"public static void deleteHandCheck(String solicitante){\r\n\t\tif(chmHandCheck.containsKey(solicitante)){ \r\n\t\t\tchmHandCheck.remove(solicitante);\r\n\t\t}\r\n\t}",
"@Override\r\n public void handleNewDeviceRequest(WebPresentAddExistingDeviceRequest request) throws PeripheralDriverDeviceMutationException {\r\n try {\r\n Map<String,Object> customData = request.getCustomData();\r\n LOG.info(\"Creating a new MySensors MQTT device: {}\", customData);\r\n if(request.getDeviceId()!=0 && DiscoveredItemsCollection.hasDiscoveredDevice((WebPresentAddExistingDeviceInterface)this.getSoftwareDriverLink(), (String)customData.get(\"address\"))){\r\n String localName = \"\";\r\n if(!request.getName().equals(\"\")){\r\n localName = request.getName();\r\n } else {\r\n DiscoveredDevice gotDevice = DiscoveredItemsCollection.getDiscoveredDevice((WebPresentAddExistingDeviceInterface)this.getSoftwareDriverLink(), (String)customData.get(\"address\"));\r\n gotDevice.getParameterValues();\r\n if(gotDevice.getParameterValues().containsKey(\"V_SKETCH_NAME\")){\r\n localName = (String)gotDevice.getParameterValues().get(\"V_SKETCH_NAME\");\r\n } else {\r\n localName = \"Nameless device\";\r\n }\r\n }\r\n this.createFromExistingDevice(request.getDeviceId(), localName, (String)customData.get(\"address\"), request.getLocationId(), request.getCategoryId());\r\n DiscoveredItemsCollection.removeDiscoveredDevice((WebPresentAddExistingDeviceInterface)this.getSoftwareDriverLink(), (String)customData.get(\"address\"));\r\n } else {\r\n throw new PeripheralDriverDeviceMutationException(\"No valid device found to add: \" + request.getDeviceId());\r\n }\r\n } catch (DiscoveredDeviceNotFoundException | PluginDeviceMutationException ex){\r\n LOG.error(\"Problem creating device: {}\",ex.getMessage(), ex);\r\n throw new PeripheralDriverDeviceMutationException(\"Problem creating device: \"+ex.getMessage());\r\n }\r\n }",
"@PostMapping(\"/hands\")\n @Timed\n public ResponseEntity<Hand> createHand(@RequestBody Hand hand) throws URISyntaxException {\n log.debug(\"REST request to save Hand : {}\", hand);\n if (hand.getId() != null) {\n throw new BadRequestAlertException(\"A new hand cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Hand result = handRepository.save(hand);\n return ResponseEntity.created(new URI(\"/api/hands/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public CheckZonePeersRequest() {\n }",
"pb4server.RandomPointMoveCityAskReq getRandomPointMoveCityAskReq();",
"private SCOthersGrabPlantCollectRet() {}",
"public void requestHandoff(int id) {\n synchronized (this.handoffLock) {\n System.out.println(\" New handoff connection request received from Cell Number - \" + id);\n //System.out.println(\"Handoff block entered in \" + this.cellId);\n double presentRatio = handoffDrops * 1.0 / totalHandoffs;\n if (ongoingCalls == totalChannels) {\n handoffDrops++; //here present ratio does not use the currently dropped handoff, reconfirm\n if (presentRatio >= handoffThreshold) { //include alpha1\n incrementGuardChannel();\n } else if (presentRatio <= handoffThreshold && consecutiveHandoffs == N - 1) { //include alpha2\n decrementGuardChannel();\n }\n consecutiveHandoffs = 0;\n }\n else if (ongoingCalls < totalChannels) {\n totalHandoffs++;\n consecutiveHandoffs++;\n ongoingCalls++;\n }\n handoffsPending--;\n Control.removeFromHList(this.cellId);\n }\n }",
"int mberIdDuplCheck(Map requestMap);",
"protected void addClueToClueMap(GameEntity game, CluePostDTO cluePostDTO){\n Map<String, String> clueMap =game.getClueMap();\n clueMap.put(cluePostDTO.getPlayerToken(),cluePostDTO.getClue());\n game.setClueMap(clueMap);\n\n setTimePassed(game, playerRepository.findByToken(cluePostDTO.getPlayerToken()));\n }",
"@Test\n void handleAddToolRequest()\n {\n AddToolRequest request = new AddToolRequest(new Tool(0, \"Hammer\", 10, 15, 0));\n\n SuccessResponse response = handler.handleAddToolRequest(request);\n\n assert response.isSuccess();\n assert toolRepository.getTool(0).isPresent();\n }",
"@Test\n public void testBuyClearMap() throws Exception\n {\n PayStationImpl instance = new PayStationImpl();\n int quarter = 25;\n int dime = 10;\n int nickle = 5;\n instance.addPayment(quarter);\n instance.addPayment(nickle);\n instance.addPayment(dime);\n instance.addPayment(quarter);\n instance.buy();\n Map result = instance.cancel();\n Map emptyMap = new HashMap();\n assertEquals(emptyMap, result);\n }",
"public void createNewHNPair(Client cl) {\n ResultSet rs = null;\n PreparedStatement pst = null;\n try {\n String nickname;\n try {\n nickname = new String(cl.getHNPair().getNickname(),\"SJIS\");\n } catch (UnsupportedEncodingException ex) {\n nickname = \"sjis\";\n }\n pst = (PreparedStatement) con.prepareStatement(String.format(\"insert into hnpairs (userid,handle,nickname) values ('%s','%s','%s')\", \n cl.getUserID(), new String(cl.getHNPair().getHandle()), nickname));\n pst.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(Database.class.getName()).log(Level.WARNING, null, ex);\n } finally {\n try {\n if(rs != null) {\n rs.close();\n }\n if(pst != null) {\n pst.close();\n }\n } catch (SQLException ex) {\n Logger.getLogger(Database.class.getName()).log(Level.WARNING, null, ex);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a IBlobContents from BlobStream | static public IBlobContents createBlobContents(BlobStream stream) {
return new BlobContents(stream);
} | [
"static public IBlobContents createBlobContents(InputStream stream) throws IOException {\r\n\t\treturn new BlobContents(stream);\r\n\t}",
"static public IBlobContents createBlobContents(byte[] value) {\r\n\t\treturn new BlobContents(value);\r\n\t}",
"static public IBlobContents createBlobContents(File file) throws IOException {\r\n\t\treturn new BlobContents(new BlobFileStream(file));\r\n\t}",
"TContent createContent(byte[] bytes, ContentFactory<TContent> contentFactory);",
"public abstract Blob readBlob(User user);",
"protected abstract Blob getBlob();",
"InputStream getContentStream() throws IOException;",
"Object deserialize(Writable blob) throws SerDeException;",
"public BlobInputStream openInputStream() {\n return openInputStream((BlobRange) null, null);\n }",
"public void setContentInputStream(InputStream is, long length) throws IOException {\n content = sessionFactory.getCurrentSession().getLobHelper().createBlob(is, length);\n }",
"@Test\n\tpublic void testContentAddressableStream() {\n\n\t\tBlobClient client = null;\n\t\tInputStream is = null;\n\n\t\ttry {\n\t\t\tFile testFile = File.createTempFile(\"testfile\", \".dat\");\n\t\t\ttestFile.deleteOnExit();\n\n\t\t\tBlobKey origKey = prepareTestFile(testFile);\n\n\t\t\tInetSocketAddress serverAddress = new InetSocketAddress(\"localhost\", BLOB_SERVER.getPort());\n\t\t\tclient = new BlobClient(serverAddress, blobServiceConfig);\n\n\t\t\t// Store the data\n\t\t\tis = new FileInputStream(testFile);\n\t\t\tBlobKey receivedKey = client.put(is);\n\t\t\tassertEquals(origKey, receivedKey);\n\n\t\t\tis.close();\n\t\t\tis = null;\n\n\t\t\t// Retrieve the data\n\t\t\tis = client.get(receivedKey);\n\t\t\tvalidateGet(is, testFile);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\tif (is != null) {\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (Throwable t) {}\n\t\t\t}\n\t\t\tif (client != null) {\n\t\t\t\ttry {\n\t\t\t\t\tclient.close();\n\t\t\t\t} catch (Throwable t) {}\n\t\t\t}\n\t\t}\n\t}",
"public abstract Blob getSisBlob(byte[] hash) throws IOException;",
"public static Blob fromFile(String sha1) {\n File blobFile = Utils.join(BLOB_FOLDER, sha1);\n if (!blobFile.exists()) {\n throw new IllegalArgumentException(\n \"No commit with that sha1 value found ;(\");\n }\n return Utils.readObject(blobFile, Blob.class);\n }",
"private Blob getContentFromResource()\n {\n try\n {\n InputStream inputStream = context.getResource( \"pdf-sample.pdf\" ).getInputStream();\n\n byte[] content = new byte[inputStream.available()];\n inputStream.read( content );\n return new SerialBlob( content );\n }\n catch ( IOException e )\n {\n LOGGER.error( \"Failed to read pdf test file from classpath resource.\", e);\n return null;\n }\n catch ( SQLException e )\n {\n LOGGER.error( \"Failed to instantiate \" + SerialBlob.class.getName() + \" object.\", e );\n return null;\n }\n }",
"BlobInfo putBlob(byte[] data);",
"Blob build();",
"void downloadBlob(BlobId blobId, OutputStream outputStream) throws CloudStorageException;",
"DocumentContent createDocumentContent(byte[] bytes);",
"public static Blob generateProxy(InputStream stream, long length) {\n\t\treturn ( Blob ) Proxy.newProxyInstance(\n\t\t\t\tgetProxyClassLoader(),\n\t\t\t\tPROXY_INTERFACES,\n\t\t\t\tnew BlobProxy( stream, length )\n\t\t);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes fileNameResultTextField | public JTextField getFileNameResultTextField() {
if (fileNameResultTextField == null) {
super.getFileNameResultTextField().setBounds(
new java.awt.Rectangle(132, 11, 199, 21));
}
return fileNameResultTextField;
} | [
"public FileNameSearchField() {\r\n\t\tsuper( Id.FILE, PredefinedList.REP_SEARCH_FILE_NAME );\r\n\t}",
"private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}",
"private JTextField getJtxtFileName()\n\t{\n\t\tif (jtxtFileName == null)\n\t\t{\n\t\t\tjtxtFileName = new JTextField();\n\t\t\tjtxtFileName.setText(\"Inserisci qui il nome del file\");\n\t\t\tjtxtFileName.selectAll();\n\t\t\tjtxtFileName.addActionListener(new java.awt.event.ActionListener()\n\t\t\t{\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tString curDir = System.getProperty(\"user.dir\");\n\t\t\t\t\t\tPrintWriter out = new PrintWriter(new BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(curDir + \"/\"\n\t\t\t\t\t\t\t\t\t\t+ jtxtFileName.getText())));\n\t\t\t\t\t\tjtxaBody.write(out);\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t} catch (FileNotFoundException ex)\n\t\t\t\t\t{\n\n\t\t\t\t\t} catch (IOException ex)\n\t\t\t\t\t{\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jtxtFileName;\n\t}",
"public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl_LastFiles.getParam(\"edgelist-file\"));\r\n } else {\r\n this.nodefileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20nodes.txt\");\r\n this.edgeFileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20edges.txt\");\r\n }\r\n }",
"public FileExportComplete() {\n initComponents();\n //QuerySalesforce.csvFile=\"Sample data/Sample data/Sample data/Sample data\";\n this.tFieldPath.setText(QuerySalesforce.csvFile);\n //lMessage.setText( \"<html><b>\"+lMessage.getText() + \"</b><p>\"+QuerySalesforce.csvFile+\"</p></html>\");\n this.lNumberOfRecords.setText(this.lNumberOfRecords.getText() + SQueryResultFields.iTotalNumberofRecordExported);\n this.lbatchFailed.setText(this.lbatchFailed.getText()+SQueryResultFields.listFailed.size());\n }",
"public void buildSourceFileDirField() {\n sourceFilesDirField = new JTextField();\n // sourceFilesDirField.setPreferredSize(new Dimension(350, 25));\n // sourceFilesDirField.setMinimumSize(new Dimension(350, 25));\n // sourceFilesDirField.setHorizontalAlignment(JTextField.LEFT);\n sourceFilesDirField.setBackground(Color.white);\n sourceFilesDirField.setPreferredSize(favoriteSize);\n sourceFilesDirField.setMinimumSize(favoriteSize);\n sourceFilesDirField.setEditable(false);\n // sourceFilesDirField.setEnabled(true);\n sourceFilesDirField.addMouseListener(new BrowseSourceFilesButtonListenser());\n }",
"public FileInputPanel() {\n initComponents();\n eventListeners = new EventListenerList();\n textFile.getDocument().addDocumentListener(new DocumentListener() {\n @Override\n public void insertUpdate(DocumentEvent e) {\n if (ignoreTextChanges) {\n return;\n }\n fireFilenameChanged();\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n if (ignoreTextChanges) {\n return;\n }\n fireFilenameChanged();\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n if (ignoreTextChanges) {\n return;\n }\n fireFilenameChanged();\n }\n });\n textFile.setTransferHandler(new FileTransferHandler());\n\n }",
"private void getFileNameFromUser() {\n Log.d(TAG, \"getFileNameFromUser: \");\n createInputDialog(\"Please enter file name\");\n }",
"public FileRenamer() {\n initComponents();\n \n Dimension d = Toolkit.getDefaultToolkit().getScreenSize();\n \n setLocation(\n d.width / 2 - getWidth() / 2,\n d.height / 2 - getHeight() / 2\n );\n \n this.txtDirectory.setText(work_dir);\n }",
"public String getFileNameToSearch() {\n\t\treturn fileNameField.getText();\n\t}",
"private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}",
"public void addSearchResult(String result) {\n\t\tfileField.setText(fileField.getText() + result);\n\t}",
"public FileCreator() {\r\n initComponents();\r\n }",
"public TargetFilePanel() {\n initComponents();\n }",
"public void setFileNames () {\n\t//\tmultipleModelFileName = \"multipleModelFile.txt\";\n\n\t}",
"public String getInputFileName()\t\t{ return this.inputFileName; }",
"public void setFileNumberText(String text) {\r\n\t\tif (fileNumberText != null)\r\n\t\t\tfileNumberText.setText(text);\r\n\t}",
"public ADD_OFFICER() {\n initComponents();\n filltf();\n jLabel12.setText(\"Select a file\");\n setLocationRelativeTo(null);\n }",
"public void createFileNumberText() {\r\n\t\tif (fileNumberText == null) {\r\n\t\t\tfileNumberText = new Text(statusGroup, SWT.BORDER);\r\n\t\t\tfileNumberText.setToolTipText(\"Go to image number\");\r\n\t\t\tfileNumberText.setEnabled(true);\r\n\t\t\tfileNumberText.addListener(SWT.DefaultSelection, new Listener() {\r\n\t\t\t\tpublic void handleEvent(Event event) {\r\n\t\t\t\t\tint fileIndex = Integer.parseInt(fileNumberText.getText());\r\n\t\t\t\t\tint size = iv.getController().getCurrentsample()\r\n\t\t\t\t\t\t\t.getFilteredfiles().size();\r\n\t\t\t\t\tif (fileIndex > size) {\r\n\t\t\t\t\t\tfileIndex = size - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tiv.getController().setCurrentFileIndex(fileIndex);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Analog in HQL: Query query = session.createQuery( "SELECT DISTINCT dl FROM DirectoryLazy dl LEFT JOIN FETCH dl.factLazies", DirectoryLazy.class); | @Override
public List<DirectoryLazy> findAll() {
try (Session session = entityManagerFactory.unwrap(SessionFactory.class).openSession()) {
CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();
CriteriaQuery<DirectoryLazy> criteriaQuery = criteriaBuilder.createQuery(DirectoryLazy.class);
Root<DirectoryLazy> root = criteriaQuery.from(DirectoryLazy.class);
root.fetch(DirectoryLazy_.factLazies, JoinType.LEFT);
criteriaQuery.select(root).distinct(true);
Query<DirectoryLazy> query = session.createQuery(criteriaQuery);
return query.getResultList();
}
} | [
"@Query(\"select c from Cliente c left join fetch c.facturas f where c.id=?1\")\n Cliente fetchByIdWithFacturas(Long id);",
"@Override\n public List<CustomerOrder> getAllCustomerOrder() {\n String hql = \"select distinct custOrd from CustomerOrder as custOrd left join fetch custOrd.items\";\n\n try (Session session = HibernateUtil.getSession()) { //try with resources\n Query<CustomerOrder> query = session.createQuery(hql);\n return query.list();\n }\n\n }",
"@Test\n public void test() {\n manager.clear();\n TypedQuery<MasterEntity> query2 = manager.createQuery(\"select m from MasterEntity m join fetch m.ref\", MasterEntity.class);\n logger.debug(query2.getResultList().toString());\n// manager.clear();\n// CriteriaBuilder cb = manager.getCriteriaBuilder();\n// CriteriaQuery<MasterEntity> q = cb.createQuery(MasterEntity.class);\n// Root<MasterEntity> root = q.from(MasterEntity.class);\n// root.fetch(\"ref\");\n// manager.createQuery(q).getResultList();\n\n }",
"@NotNull\n EntityIterable distinct();",
"public void testLeftOuterJoinQuery() {\n EntityManager em = getEM();\n EntityTransaction tx = em.getTransaction();\n try {\n tx.begin();\n LoginAccount acct = new LoginAccount(1, \"Fred\", \"Flintstone\");\n Login login = new Login(\"fred\", \"yabbadabbadoo\");\n acct.setLogin(login);\n em.persist(acct);\n em.flush();\n List result = em.createQuery(\"SELECT Object(A) FROM \" + LoginAccount.class.getName() + \" A \" + \"LEFT OUTER JOIN A.login L \" + \"WHERE L.userName = 'fred'\").getResultList();\n assertEquals(1, result.size());\n tx.rollback();\n } finally {\n if (tx.isActive()) {\n tx.rollback();\n }\n em.close();\n }\n }",
"@Override\n public Optional<DirectoryLazy> findById(long id) {\n try (Session session = entityManagerFactory.unwrap(SessionFactory.class).openSession()) {\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<DirectoryLazy> criteriaQuery = criteriaBuilder.createQuery(DirectoryLazy.class);\n\n Root<DirectoryLazy> root = criteriaQuery.from(DirectoryLazy.class);\n root.fetch(DirectoryLazy_.factLazies, JoinType.LEFT);\n criteriaQuery.select(root).distinct(true);\n Predicate idPredicate = criteriaBuilder.equal(root.get(DirectoryLazy_.id), id);\n criteriaQuery.where(idPredicate);\n\n Query<DirectoryLazy> query = session.createQuery(criteriaQuery);\n return Optional.ofNullable(query.getSingleResult());\n }\n }",
"public void joinDemo()\n\t{\n\t\tSession session=factory.openSession();\n\t\tString hql=\"select c.custName,l.loanId,l.loanAmount from Customer c left join c.loans l\";\n\t\tQuery query=session.createQuery(hql);\n\t\tList list=query.list();\n\t\tIterator itr=list.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tObject[] obj=(Object[])itr.next();\n\t\t\tSystem.out.println(obj[0]+\"\\t\"+obj[1]+\"\\t\"+obj[2]);\n\t\t}\n\t\tsession.close();\n\t\t\n\t\t\n\t\t\n\t}",
"@Repository\npublic interface CenterheadRepository extends JpaRepository<Centerhead, Long> {\n\n @Query(value = \"select distinct centerhead from Centerhead centerhead left join fetch centerhead.centers\",\n countQuery = \"select count(distinct centerhead) from Centerhead centerhead\")\n Page<Centerhead> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct centerhead from Centerhead centerhead left join fetch centerhead.centers\")\n List<Centerhead> findAllWithEagerRelationships();\n\n @Query(\"select centerhead from Centerhead centerhead left join fetch centerhead.centers where centerhead.id =:id\")\n Optional<Centerhead> findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n}",
"com.vitessedata.llql.llql_proto.LLQLQuery.Distinct getDistinct();",
"@Test\n void whenFindAllDepartment_withJoinFetch_thenFetchEmployeeByTheSameQuery() {\n\n var qry = \"SELECT d FROM Department d JOIN FETCH d.employees\";\n var departments = entityManager.createQuery(qry, Department.class).getResultList();\n // -->\n // SELECT d.*, e.*\n // FROM Department d\n // JOIN Employee e ON e.department_id = d.id\n\n assertThat(departments).extracting(\"name\").contains(\"Development\", \"Management\", \"Marketing\", \"Personnel\");\n\n log.trace(\"{}\", departments);\n\n log.trace(\"-----------------------------------------\");\n log.trace(\"For each department, print its employees:\");\n log.trace(\"-----------------------------------------\");\n\n for (Department department: departments) {\n log.trace(\"{} <--- {}\", department, department.getEmployees());\n // Notice: Employee(id=15, name=Bonnie) doesn't display!\n }\n }",
"public List<String> getCentimorgans() throws HibernateException {\n List sourceList = null;\n try {\n getCurrentSession().beginTransaction();\n sourceList = getCurrentSession()\n .createSQLQuery(\"SELECT DISTINCT centimorgan FROM genes ORDER BY centimorgan\")\n .list();\n getCurrentSession().getTransaction().commit();\n } catch (HibernateException e) {\n getCurrentSession().getTransaction().rollback();\n throw e;\n }\n\n return sourceList;\n }",
"@Query(\"SELECT DISTINCT obj FROM Order obj JOIN FETCH obj.products \" \r\n\t\t\t\t+ \" WHERE obj.status = 0 ORDER BY obj.moment ASC\" )\r\n\tList<Order> findOrdersWithProducts();",
"public FromSelect distinct(ColumnRefercence cols);",
"List<SssAssociation1> selectAll();",
"@Query(\"SELECT j FROM Journey j right join j.packages p where p.destination!=p.position GROUP by j order by j.start\")\n List<Journey> findFilled();",
"private void loadCriteriaLeft() {\n for (Criteria criteria : criteriaList) {\n criteriaLeft.add(criteria.getKey());\n }\n }",
"@Repository\npublic interface AttackCycleRepository extends JpaRepository<AttackCycle, Long> {\n\n @Query(value = \"select distinct attackCycle from AttackCycle attackCycle left join fetch attackCycle.attacks\",\n countQuery = \"select count(distinct attackCycle) from AttackCycle attackCycle\")\n Page<AttackCycle> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct attackCycle from AttackCycle attackCycle left join fetch attackCycle.attacks\")\n List<AttackCycle> findAllWithEagerRelationships();\n\n @Query(\"select attackCycle from AttackCycle attackCycle left join fetch attackCycle.attacks where attackCycle.id =:id\")\n Optional<AttackCycle> findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n}",
"private List<MusicVideo> selectAllMusicVideosFromDB(){\n \n SessionFactory sessionFactory = (SessionFactory)servletContext.getAttribute(OpusApplication.HIBERNATE_SESSION_FACTORY) ;\n Session session = sessionFactory.openSession() ;\n Query<MusicVideo> query = session.createQuery(\"FROM MusicVideo mv JOIN FETCH mv.artiste JOIN FETCH mv.genre\", MusicVideo.class) ;\n List<MusicVideo> listOfMusicVideos = query.getResultList() ;\n session.close() ;\n return listOfMusicVideos ;\n }",
"void makeTransientAll (Collection pcs, boolean useFetchPlan);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validated the content size of the HTTP request. | public static void validateContentSize(HttpRequest request) throws IOException {
if (request.getContent() != null) {
long requestContentSize = request.getContent().getLength();
if (requestContentSize > REQUEST_MAX_CONTENT_SIZE) {
throw new CcuClientException(MessageFormat.format("Request content size [{0}] exceeds the maximum size[{1}]]", requestContentSize, REQUEST_MAX_CONTENT_SIZE));
}
}
} | [
"DataSize getRequestSizeLimitRegular();",
"private long getRequestContentLength(HttpURLConnection connection) {\n String lengthString = connection.getRequestProperty(\n HeaderConstants.CONTENT_LENGTH);\n if (lengthString != null){\n return Long.parseLong(lengthString);\n }\n else{\n return 0;\n }\n }",
"void checkContentLenghtHeader(String name, String value) {\n if (\"content-length\".equalsIgnoreCase(name)) {\n contentLength = Long.parseLong(value);\n }\n }",
"public boolean needContentLength() {\n return false;\n }",
"DataSize getRequestSizeLimitBinaryUpload();",
"public int contentLength();",
"public boolean shouldSetContentLength()\n {\n return false;\n }",
"public long contentLen() {\n String value = getFirst(\"Content-Length\");\n if (value == null) {\n return -1;\n }\n return Long.parseLong(value);\n }",
"protected boolean mayCacheFromSize ()\n {\n final ICache <HttpHeader, HttpHeader> cache = con.getProxy ().getCache ();\n final long maxSize = cache.getCacheConfiguration ().getMaxSize ();\n return !(maxSize == 0 || (size > 0 && size > maxSize));\n }",
"boolean hasRequestDataLength();",
"@Test\n\tpublic void contentLenght() {\n\t\tString contentlength = response.header(\"Content-Length\");\n\t\t// int a =Integer.parseInt(contentlength);\n\t\t// if(Integer.parseInt(contentlength)<15000)\n\t\t// System.out.println(\"Content length is less then 1500\");\n\n\t\t Assert.assertTrue(Integer.parseInt(contentlength)<1500);\n\t\tSystem.out.println(\"Content length is less then 1500\");\n\t}",
"public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"private void checkSize() {\n if (currentStream == null) {\n throw new IllegalStateException(\"The stream is closed and cannot be written to.\");\n }\n if (currentStream.size() > partSize) {\n ConvertibleOutputStream newStream = currentStream.split(partSize, getStreamAllocatedSize());\n uploadCurrentStream(newStream);\n }\n }",
"public boolean isMaxLengthExceeded() {\n return (this.maxLengthExceeded || this.inputStream.isMaxLengthMet());\n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n throws ServletException, IOException {\n long maxBytes = allowedRequestSizeConfig.getRequestSizeLimitRegular().toBytes();\n if (fileUploadEndpointsConfiguration.getEndpointDefinitions().stream()\n .anyMatch(endpoint -> endpoint.matches(request))) {\n maxBytes = allowedRequestSizeConfig.getRequestSizeLimitBinaryUpload().toBytes();\n }\n\n ServletRequest wrapped = new SizeLimitingHttpServletRequestWrapper(request, maxBytes);\n\n // LimitRequestSizesExceptions will be handled by SpringInternalExceptionHandler\n filterChain.doFilter(wrapped, response);\n }",
"long getContentLength();",
"public Long contentLength() {\n return this.contentLength;\n }",
"boolean supportsFileUploadSizeLimit();",
"public Double validationDataSize() {\n return this.validationDataSize;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of ProcessingLogsFirstChunk | public final void setProcessingLogsFirstChunk(java.lang.Boolean processinglogsfirstchunk)
{
setProcessingLogsFirstChunk(getContext(), processinglogsfirstchunk);
} | [
"public final void setProcessingLogsIsFirstChunk(java.lang.Boolean processinglogsisfirstchunk)\r\n\t{\r\n\t\tsetProcessingLogsIsFirstChunk(getContext(), processinglogsisfirstchunk);\r\n\t}",
"public final void setProcessingLogsFirstChunk(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean processinglogsfirstchunk)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ProcessingLogsFirstChunk.toString(), processinglogsfirstchunk);\r\n\t}",
"public final void setProcessingLogsChunkStart(java.lang.Integer processinglogschunkstart)\r\n\t{\r\n\t\tsetProcessingLogsChunkStart(getContext(), processinglogschunkstart);\r\n\t}",
"private void setChunkStartet() {\r\n if (addedtoStartedChunks) { return; }\r\n addChunksStarted(+1);\r\n addedtoStartedChunks = true;\r\n }",
"public final void setProcessingLogsChunkStart(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer processinglogschunkstart)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ProcessingLogsChunkStart.toString(), processinglogschunkstart);\r\n\t}",
"public final void setProcessingLogsNextChunk(java.lang.Boolean processinglogsnextchunk)\r\n\t{\r\n\t\tsetProcessingLogsNextChunk(getContext(), processinglogsnextchunk);\r\n\t}",
"public final void setProcessingLogsPreviousChunk(java.lang.Boolean processinglogspreviouschunk)\r\n\t{\r\n\t\tsetProcessingLogsPreviousChunk(getContext(), processinglogspreviouschunk);\r\n\t}",
"public final void setProcessingLogsChunkStartShown(java.lang.Integer processinglogschunkstartshown)\r\n\t{\r\n\t\tsetProcessingLogsChunkStartShown(getContext(), processinglogschunkstartshown);\r\n\t}",
"public final void setProcessingLogsNextChunk(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean processinglogsnextchunk)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ProcessingLogsNextChunk.toString(), processinglogsnextchunk);\r\n\t}",
"public Builder setDataInitialChunk(com.google.protobuf.ByteString value) {\n\t\t\t\tif (value == null) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\t\t\t\tbitField0_ |= 0x00000040;\n\t\t\t\tdataInitialChunk_ = value;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}",
"public final void setProcessingLogsLastChunk(java.lang.Boolean processinglogslastchunk)\r\n\t{\r\n\t\tsetProcessingLogsLastChunk(getContext(), processinglogslastchunk);\r\n\t}",
"public final void setMessagesFirstChunk(java.lang.Boolean messagesfirstchunk)\r\n\t{\r\n\t\tsetMessagesFirstChunk(getContext(), messagesfirstchunk);\r\n\t}",
"public final void setMessagesFirstChunk(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean messagesfirstchunk)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.MessagesFirstChunk.toString(), messagesfirstchunk);\r\n\t}",
"public final void setProcessingLogsChunkStartShown(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer processinglogschunkstartshown)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ProcessingLogsChunkStartShown.toString(), processinglogschunkstartshown);\r\n\t}",
"public final void setProcessingLogsPreviousChunk(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean processinglogspreviouschunk)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ProcessingLogsPreviousChunk.toString(), processinglogspreviouschunk);\r\n\t}",
"public final void setProcessingLogsChunkEnd(java.lang.Integer processinglogschunkend)\r\n\t{\r\n\t\tsetProcessingLogsChunkEnd(getContext(), processinglogschunkend);\r\n\t}",
"public final void setMessagesIsFirstChunk(java.lang.Boolean messagesisfirstchunk)\r\n\t{\r\n\t\tsetMessagesIsFirstChunk(getContext(), messagesisfirstchunk);\r\n\t}",
"public final void setMessagesChunkStart(java.lang.Integer messageschunkstart)\r\n\t{\r\n\t\tsetMessagesChunkStart(getContext(), messageschunkstart);\r\n\t}",
"public final void setProcessingLogsIsLastChunk(java.lang.Boolean processinglogsislastchunk)\r\n\t{\r\n\t\tsetProcessingLogsIsLastChunk(getContext(), processinglogsislastchunk);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form iAdd | public iAdd() {
initComponents();
formIdMecanico.setModel(new DefaultComboBoxModel<>(new String[]{
"---Selecciona Mecanico---", "1212", "1213", "2121", "1214"
}));
} | [
"public AddNewItem() {\n initComponents();\n Itemno();\n }",
"public FormInserir() {\n initComponents();\n }",
"public String addNew() {\n todo = new Todo(\"\", \"\", 3);\n form.setRendered(true);\n addCommand.setRendered(false);\n return null;\n }",
"@RequestMapping(params = {\"create\", \"form\"}, produces = \"text/html\")\n public String createForm_new(Model uiModel) {\n \tpopulateEditForm(uiModel, new Flight());\n return \"flights/create_new\";\n }",
"Add createAdd();",
"public void clickAddNew()\r\n\t {\r\n\t\t addNew.click();\r\n\t }",
"private void addNewItem(){\n // create a new object instance for each item\n // ActionListener 'saver' is passed to the TodoItem\n // when it receives change notifications\n TodoItem td = new TodoItem(\"\", false, getAutoSave());\n\n // We invoke Form's add method to add the item to the UI\n add(td);\n\n // lets the showing Form know we finished making changes\n revalidate();\n\n // Launch the device virtual keyboard so the user can start\n // typing text immediately\n td.edit();\n }",
"@Command\n\tpublic void addNew () {\n\t\tif (_selectedIndex >= 0) {\n\t\t\t_personModel.add(_selectedIndex+1, new Person(\"\", \"\", null));\n\t\t} else {\n\t\t\t_personModel.add(new Person(\"\", \"\", null));\n\t\t}\n\t}",
"public AddItemForm() {\n initComponents();\n falseLabelsNoVisible();\n }",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"public void addNewAnimalAction() {\n\t\tAnimalModel newAnimalModel = new AnimalModel(\"\", \"\");\n\n\t\teditAnimalDetail(newAnimalModel, AnimalDetailPanel.NEW_ANIMAL);\n\t}",
"public com.rcs.webform.model.FormItem createFormItem(long formItemId);",
"@RequestMapping(\"projects/add\")\n public String formNewProject(Model model) {\n // Add model attributes needed for new form\n if (!model.containsAttribute(\"project\")) {\n model.addAttribute(\"project\", new Project());\n }\n model.addAttribute(\"action\", \"/projects/add\");\n\n// model.addAttribute(\"role\", new Role());\n model.addAttribute(\"roles\", roleService.findAll());\n\n return \"project/edit_project\";\n }",
"private void addNewNoteItem() {\n final EditText editTextTitle = mBinding.toolbar.etNoteTitleName;\n final EditText editTextName = mBinding.includeInterface.etNameOperation;\n final EditText editTextPrice = mBinding.includeInterface.etPriceOperation;\n editTextTitle.requestFocus();\n\n // Add button\n mBinding.includeInterface.buttonAddNewItem.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // checking if edit text not empty\n if (editTextName.getText().toString().trim().equals(\"\")\n || editTextPrice.getText().toString().trim().equals(\"\")) {\n Toast.makeText(activity,\n R.string.no_data,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n String message = editTextName.getText().toString().trim();\n int sum = Integer.parseInt(editTextPrice.getText().toString().trim());\n setTotalSum(mNoteList, sum);\n\n // Saving message\n saveGroupNote(message, sum);\n //Saving total sum\n saveTotalData();\n\n editTextName.getText().clear();\n editTextPrice.getText().clear();\n editTextName.requestFocus();\n }\n });\n }",
"public AddNewSpeciality() {\r\n\t\tsuper(\"Add New Speciality\");\r\n\t\tthis.setLayout(new MigLayout(new LC().fill(), new AC().grow(), new AC().grow()));\r\n\r\n\t\tthis.add(new JLabel(\"Add Speciality\"), new CC().grow().alignX(\"center\"));\r\n\r\n\t\tnewSpeciality = new JTextField(25);\r\n\t\tthis.add(newSpeciality);\r\n\r\n\t\taddNewSpecialityBtn = new JButton(\"Add!\");\r\n\t\taddNewSpecialityBtn.addActionListener(this);\r\n\t\tthis.add(addNewSpecialityBtn);\r\n\r\n\t\tthis.pack();\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setVisible(true);\r\n\t}",
"@RequestMapping(value = \"add\", method = RequestMethod.GET)\n public String displayAddContractorForm(Model model) {\n model.addAttribute(\"title\", \"Add Worker\");\n model.addAttribute(new Contractor());\n return \"contractor/add\";\n }",
"@UiHandler(\"btnAdd\")\r\n\tvoid onBtnAddClick(ClickEvent event) {\n\t\tpresenter.goTo(new AddPersonPlace(\"\"));\r\n\t}",
"Form addElement(Element element);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dialog for setting youtube launch delay | void youtubeLaunchDelayPickerDialog()
{
final AlertDialog.Builder d = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
View dialogView = inflater.inflate(R.layout.config_slideshow_sw_time_picker, null);
d.setTitle(R.string.config_set_slideshow_dlg_title);
d.setMessage(R.string.config_set_slideshow_dlg_message);
d.setView(dialogView);
final SharedPreferences pref_sw_time = getActivity().getSharedPreferences("youtube_launch_delay", 0);
final String strSwitchTime = pref_sw_time.getString("KEY_YOUTUBE_LAUNCH_DELAY","10");
final NumberPicker numberPicker = (NumberPicker) dialogView.findViewById(R.id.dialog_number_picker);
numberPicker.setMaxValue(20);
numberPicker.setMinValue(1);
numberPicker.setValue(Integer.valueOf(strSwitchTime));
numberPicker.setWrapSelectorWheel(true);
numberPicker.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker numberPicker, int i, int i1) {
}
});
d.setPositiveButton(R.string.btn_OK, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
int len = numberPicker.getValue();
pref_sw_time.edit().putString("KEY_YOUTUBE_LAUNCH_DELAY",String.valueOf(len)).apply();
TextView slideshow_text_view = (TextView)mRootView.findViewById(R.id.youtube_launch_delay_setting);
slideshow_text_view.setText(len + "s");
}
});
d.setNegativeButton(R.string.btn_Cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
AlertDialog alertDialog = d.create();
alertDialog.show();
} | [
"void setYouTubeLaunchDelay()\n\t{\n\t\t// set current\n\t\tSharedPreferences pref_sw_time = getActivity().getSharedPreferences(\"youtube_launch_delay\", 0);\n\t\tView swTimeView = mRootView.findViewById(R.id.youtube_launch_delay);\n\t\tTextView slideshow_text_view = (TextView)mRootView.findViewById(R.id.youtube_launch_delay_setting);\n\t\tString strSwTime = pref_sw_time.getString(\"KEY_YOUTUBE_LAUNCH_DELAY\",\"10\");\n\t\tslideshow_text_view.setText(strSwTime +\"s\");\n\n\t\t// switch time picker\n\t\tswTimeView.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tyoutubeLaunchDelayPickerDialog();\n\t\t\t}\n\t\t});\n\t}",
"private void extendTimeout() {\n TextInputDialog dialog = new TextInputDialog(\"\");\n dialog.setTitle(\"Extend Timeout\");\n dialog.setHeaderText(\"Extend Timeout\");\n dialog.setContentText(\"Enter Timeout: \");\n\n dialog.showAndWait().ifPresent(this::setTimeout);\n }",
"void setPopupDuration(int popupDuration);",
"public void manualDuration() {\n MyRunsDialogFragment durationFragment = MyRunsDialogFragment.newInstance(MyRunsDialogFragment.TYPE_DURATION);\n durationFragment.show(getSupportFragmentManager(), getString(R.string.duration));\n }",
"public void setDelayedTimeout(int seconds);",
"public void setPopupDelay(long delay) {\n\t\tthis.delay = Math.max(-1, delay);\n\t}",
"void setRightClickDelayTimer(int delay);",
"public void setVideoJittcomp(int milliseconds);",
"void setTimeOut(int timeOut);",
"@FXML\n public void setTimeout() {\n String userTimeout = timeout.getText();\n try {\n tester.setTimeout(userTimeout);\n System.out.println(\"set timeout: \" + userTimeout);\n } catch (NumberFormatException nfe) {\n createAlert(Alert.AlertType.ERROR, \"Invalid Timeout\", \"Timeout must be greater than zero\").show();\n }\n }",
"private void initializeManualButtonYouTube() {\n manualButtonYouTube.setOnClickListener(v -> {\n String query =manualEditTitle.getText().toString();\n Intent intent = new Intent(Intent.ACTION_SEARCH);\n intent.setPackage(\"com.google.android.youtube\");\n intent.putExtra(\"query\", query);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n });\n }",
"public void setNortpTimeout(int seconds);",
"int getPopupDuration();",
"public void setDelaytime(Long delaytime) {\n this.delaytime = delaytime;\n }",
"void setAttemptDelay(long delay);",
"void setDefaultDurationWithinStartupProtocolMSecs(long defaultDurationWithinStartupProtocolMSecs);",
"void setDefaultTimeout(int timeoutValue);",
"void setWarShield(long seconds);",
"void setVibrationTimeLength()\n\t{\n\t\t// set current\n\t\tmPref_vibration = getActivity().getSharedPreferences(\"vibration\", 0);\n\t\tView viewVibration = mRootView.findViewById(R.id.vibrationSetting);\n\t\tmTextViewVibration = (TextView)mRootView.findViewById(R.id.TextViewVibrationSetting);\n\t String strVibTime = mPref_vibration.getString(\"KEY_VIBRATION_TIME\",\"25\");\n\t\tif(strVibTime.equalsIgnoreCase(\"00\"))\n\t\t\tmTextViewVibration.setText(getResources().getText(R.string.config_status_disabled).toString());\n\t\telse\n\t\t\tmTextViewVibration.setText(strVibTime +\"ms\");\n\n\t\t// Select new \n\t\tviewVibration.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tselectVibrationLengthDialog();\n\t\t\t}\n\t\t});\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 skillID = 1; | int getSkillID(); | [
"int getSkillId();",
"int getFightSkillId();",
"public Integer getSkillId() {\n return skillId;\n }",
"public int getIdSkill() {\n return idSkill;\n }",
"int getSkillXmlId();",
"public void setIdSkill(int value) {\n this.idSkill = value;\n }",
"SkillLevel(int numLevel) {\n this.numLevel = numLevel;\n }",
"public int getIntrinsicSkill(String skillname);",
"private int getNewGoalID(){\n return 1;\n }",
"void addSkill(int skill)\n\t{\n\t\tskills.add(skill);\n\t}",
"public int getFightSkillId() {\n return fightSkillId_;\n }",
"public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }",
"int getSkillLevel();",
"int getQuestID();",
"int getLevel(String skillId);",
"int getSuitId();",
"int getBonusMoneyID();",
"public void setSkill(int skill) {\n\t\tthis.skill = skill + 1;\n\t}",
"int getQuestId();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies the DApp deployment costs don't change unexpectedly. | @Test
public void testCostToDeployDapps() {
TransactionResult result = deployContract(Contract.AION_BUFFER_PERF);
Assert.assertEquals(100_000_000_000L, result.energyUsed);
result = deployContract(Contract.BASIC_PERF);
Assert.assertEquals(2_062_419L, result.energyUsed);
result = deployContract(Contract.POC_EXCHANGE);
Assert.assertEquals(100_000_000_000L, result.energyUsed);
result = deployContract(Contract.ERC20);
Assert.assertEquals(100_000_000_000L, result.energyUsed);
result = deployContract(Contract.BASIC_APP);
Assert.assertEquals(100_000_000_000L, result.energyUsed);
result = deployContract(Contract.TRS);
Assert.assertEquals(100_000_000_000L, result.energyUsed);
} | [
"@Test\n\tpublic void ebsad12492CdpUpgrade() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-12492-cdp_upgrade\");\n\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), null);\n\t\t\n\t\tETD[] t0 = new ETD[] { new ETD(true, \"absent\", \"system::packages/oer_live_db_21.0/ensure\", \"1.72-1\", \"/st/st-sst1-cdp1/dbstzm01.st-sst1-cdp1.ipt.local.yaml\") };\n\t\t\n\t\tETD[] t1 = new ETD[] { new ETD(true, \"stopped\", \"system::services/weblogic-cdp/ensure\", \"running\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"), \n\t\t\t\t\t\t\t new ETD(true, \"stopped\", \"system::services/weblogic-cdp/ensure\", \"running\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\")};\n\t\t\n\t\tETD[] t2 = new ETD[] { new ETD(true, \"1.75-1\", \"system::packages/oer_live_db_21.0/ensure\", \"absent\", \"/st/st-sst1-cdp1/dbstzm01.st-sst1-cdp1.ipt.local.yaml\") };\n\n\t\tETD[] t3 = new ETD[] { new ETD(true, \"running\", \"system::services/weblogic-cdp/ensure\", \"stopped\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"), \n\t\t\t\t \t\t\t new ETD(true, \"running\", \"system::services/weblogic-cdp/ensure\", \"stopped\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\t \t\t\t new ETD(true, true, \"system::services/weblogic-cdp/enable\", \"true\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"), \n\t\t\t\t \t\t\t new ETD(true, true, \"system::services/weblogic-cdp/enable\", \"true\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\")};\n\n\t\t\n\t\tString csv = \"oer_live_db_21.0,1.75-1,groupid,oer_live_db_21.0,1.75,war,\\n\";\n\t\t\n\t\tChainDeploymentVerification.verify(dep, csv, 4, new int[] { 1, 2, 1, 4 }, t0, t1, t2, t3);\n\t}",
"private void performDeploymentValidation() {\n validateBeanDependencies();\n validateBeanSpecialization();\n abortDeploymentIfProblemsDetected();\n }",
"private void checkStateOfDeployer(\n RepositoryCache repo,\n AionTxExecSummary summary,\n long nrgPrice,\n BigInteger value,\n BigInteger nonce) {\n\n assertEquals(nonce, repo.getNonce(deployer));\n BigInteger txCost = summary.getNrgUsed().multiply(BigInteger.valueOf(nrgPrice));\n assertEquals(deployerBalance.subtract(txCost).subtract(value), repo.getBalance(deployer));\n }",
"void performConsistencyCheck();",
"@Test\n public void testBadApkOnly_Phase2_VerifyInstall() throws Exception {\n assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2);\n InstallUtils.processUserData(TestApp.A);\n\n RollbackManager rm = RollbackUtils.getRollbackManager();\n RollbackInfo rollback = getUniqueRollbackInfoForPackage(\n rm.getAvailableRollbacks(), TestApp.A);\n assertThat(rollback).isNotNull();\n assertThat(rollback).packagesContainsExactly(\n Rollback.from(TestApp.A2).to(TestApp.A1));\n assertThat(rollback.isStaged()).isTrue();\n\n DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ROLLBACK,\n PROPERTY_WATCHDOG_TRIGGER_FAILURE_COUNT,\n Integer.toString(5), false);\n RollbackUtils.sendCrashBroadcast(TestApp.A, 4);\n // Sleep for a while to make sure we don't trigger rollback\n Thread.sleep(TimeUnit.SECONDS.toMillis(30));\n }",
"@Test\n\tpublic void ebsad11307UpgradeOneOfANumberOfSmallChains() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-11307\");\n\t\t\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), null);\n\t\t\n\t\tETD[] t1 = new ETD[]{ new ETD(true,\"absent\",\"system::packages/forumsentry-config-ssb-pkiss/ensure\",\"1.0.102-1\",\"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tETD[] t2 = new ETD[]{ new ETD(true,\"absent\",\"system::packages/forumsentry-policy-ssb-pkiss/ensure\", \"1.0.126-1\", \"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tETD[] t3 = new ETD[]{ new ETD(true,\"1.0.127-1\",\"system::packages/forumsentry-policy-ssb-pkiss/ensure\",\"absent\",\"/st/st-cit1-sec1/scg.yaml\"),\n\t\t\t\t\t\t\t new ETD(true,\"1.0.102-1\",\"system::packages/forumsentry-config-ssb-pkiss/ensure\",\"absent\",\"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tChainDeploymentVerification.verify(dep, \"forumsentry-config-ssb-pkiss,1.0.102-1,groupid,forumsentry-config-ssb-pkiss,1.0.102,war,\\n\"\n\t\t\t\t+ \"forumsentry-policy-ssb-pkiss,1.0.127-1,groupid,forumsentry-policy-ssb-pkiss,1.0.127,war,\\n\", 3, new int[]{1, 1, 2}, t1, t2, t3);\n\t}",
"@Override\n public boolean checkPromotionEligibility() {\n\n if (calculatePay() > 50000.0) {\n\n return true;\n } else {\n\n return false;\n }\n }",
"public boolean doSanityCheck() {\n int currentLoadBalancerInstances = getRunningInstances();\n if (currentLoadBalancerInstances < getPMinAppInstances()) {\n log.warn(\"Sanity check failed. Min Application Instances is: \" + currentLoadBalancerInstances +\n \". Specified Min Application Instances is: \" + getPMinAppInstances());\n int diff = getPMinAppInstances() - currentLoadBalancerInstances;\n\n // Launch diff number of LB instances\n log.info(\"Launching \" + diff + \" Application instances\");\n try {\n for (int i = 0; i < diff; i++) {\n imanager.start();\n }\n } catch (Exception e) {\n log.error(\"Failed to start the required number of instances\", e);\n }\n return false;\n }\n return true;\n }",
"@Test\n\tpublic void ebsad12005_CDPSOA() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-12005-CDPSOA\");\n\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), null);\n\t\t\n\t\tETD[] t0 = new ETD[] { new ETD(true, \"1.0.193-1\", \"system::packages/EnvironmentConfiguration-Services/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.193-1\", \"system::packages/EnvironmentConfiguration-Services/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.15-1\", \"system::packages/cdp-soa-audit-logging-config-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.15-1\", \"system::packages/cdp-soa-audit-logging-config-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.12-1\", \"system::packages/cdp-soa-security-config-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.46-1\", \"system::packages/cdp-soa-classpath-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\")\n\t\t};\n\t\t\n\t\tETD[] t1 = new ETD[] { new ETD(true, \"stopped\", \"system::services/weblogic-cdp/ensure\", \"running\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\") };\n\t\t\n\t\tETD[] t2 = new ETD[] { new ETD(true, \"running\", \"system::services/weblogic-cdp/ensure\", \"stopped\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, true, \"system::services/weblogic-cdp/enable\", null, \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\")};\n\t\t\n\t\tETD[] t3 = new ETD[] { new ETD(true, \"1.0.46-1\", \"system::packages/cdp-soa-classpath-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\") };\n\t\t\n\t\tETD[] t4 = new ETD[] { new ETD(true, \"stopped\", \"system::services/weblogic-cdp/ensure\", \"running\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\") };\n\t\t\n\t\tETD[] t5 = new ETD[] { new ETD(true, \"running\", \"system::services/weblogic-cdp/ensure\", \"stopped\", \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, true, \"system::services/weblogic-cdp/enable\", null, \"/st/st-sst1-cdp1/soatzm02.st-sst1-cdp1.ipt.local.yaml\")};\n\t\t\n\t\tETD[] t6 = new ETD[] { new ETD(true, \"1.0.168-1\", \"system::packages/SOAMETADATA-Services/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.161-1\", \"system::packages/addressmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.34-1\", \"system::packages/biometricmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.51-1\", \"system::packages/etlbatchmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.57-1\", \"system::packages/imagemanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.119-1\", \"system::packages/partymanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.83-1\", \"system::packages/processmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.59-1\", \"system::packages/referencedatamanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.67-1\", \"system::packages/searchmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.144-1\", \"system::packages/servicedeliverymanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.103-1\", \"system::packages/systemmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.106-1\", \"system::packages/eventmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.87-1\", \"system::packages/documentmanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\"),\n\t\t\t\tnew ETD(true, \"1.0.113-1\", \"system::packages/utilitymanagement-rpm/ensure\", \"absent\", \"/st/st-sst1-cdp1/soatzm01.st-sst1-cdp1.ipt.local.yaml\")};\n\t\t\n\t\tString csv = \"EnvironmentConfiguration-Services,1.0.193-1,groupid,EnvironmentConfiguration-Services,1.0.193,war,\";\n\t\tcsv += \"\\nSOAMETADATA-Services,1.0.168-1,groupid,SOAMETADATA-Services,1.0.168,war,\";\n\t\tcsv += \"\\naddressmanagement-rpm,1.0.161-1,groupid,addressmanagement-rpm,1.0.161,war,\";\n\t\tcsv += \"\\nbiometricmanagement-rpm,1.0.34-1,groupid,biometricmanagement-rpm,1.0.34,war,\";\n\t\tcsv += \"\\ncdp-soa-audit-logging-config-rpm,1.0.15-1,groupid,cdp-soa-audit-logging-config-rpm,1.0.15,war,\";\n\t\tcsv += \"\\ncdp-soa-classpath-rpm,1.0.46-1,groupid,cdp-soa-classpath-rpm,1.0.46,war,\";\n\t\tcsv += \"\\ncdp-soa-security-config-rpm,1.0.12-1,groupid,cdp-soa-security-config-rpm,1.0.12,war,\";\n\t\tcsv += \"\\ndocumentmanagement-rpm,1.0.87-1,groupid,documentmanagement-rpm,1.0.87,war,\";\n\t\tcsv += \"\\netlbatchmanagement-rpm,1.0.51-1,groupid,etlbatchmanagement-rpm,1.0.51,war,\";\n\t\tcsv += \"\\neventmanagement-rpm,1.0.106-1,groupid,eventmanagement-rpm,1.0.106,war,\";\n\t\tcsv += \"\\nimagemanagement-rpm,1.0.57-1,groupid,imagemanagement-rpm,1.0.57,war,\";\n\t\tcsv += \"\\npartymanagement-rpm,1.0.119-1,groupid,partymanagement-rpm,1.0.119,war,\";\n\t\tcsv += \"\\nprocessmanagement-rpm,1.0.83-1,groupid,processmanagement-rpm,1.0.83,war,\";\n\t\tcsv += \"\\nreferencedatamanagement-rpm,1.0.59-1,groupid,referencedatamanagement-rpm,1.0.59,war,\";\n\t\tcsv += \"\\nsearchmanagement-rpm,1.0.67-1,groupid,searchmanagement-rpm,1.0.67,war,\";\n\t\tcsv += \"\\nservicedeliverymanagement-rpm,1.0.144-1,groupid,servicedeliverymanagement-rpm,1.0.144,war,\";\n\t\tcsv += \"\\nsystemmanagement-rpm,1.0.103-1,groupid,systemmanagement-rpm,1.0.103,war,\";\n\t\tcsv += \"\\nutilitymanagement-rpm,1.0.113-1,groupid,utilitymanagement-rpm,1.0.113,war,\";\n\t\tcsv += \"\\n\";\n\t\t\n\t\tChainDeploymentVerification.verify(dep, csv, 7, new int[] { 6, 1, 2, 1, 1, 2, 14 }, t0, t1, t2, t3, t4, t5, t6);\n\t}",
"@Test\n\tpublic void ebsad9727SsbCompleteDeploy() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-9727-SSB-Deploy\");\n\t\t\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), null);\n\t\t\n\t\tETD[] t1 = new ETD[]{ new ETD(true,\"1.376.293-1\",\"system::packages/ssb-db-schema/ensure\",\"absent\",\"/st/st-dev1-ebs1/dbs.yaml\")};\n\t\tETD[] t2 = new ETD[]{ new ETD(true,\"{require=Package[ssb_cfg_openldap], tag=mwconfig, ensure=1.143-1}\",\"system::packages/ssb-ldap-schema\",\"{ensure=absent, require=Package[ssb_cfg_openldap], tag=appdeploy}\",\"/st/st-dev1-ebs1/ldp.yaml\")};\n\t\tETD[] t3 = new ETD[]{\n\t\t\t\tnew ETD(true,\"{require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], ensure=2.0.3-1}\",\"system::packages/ssb-rpm-nexus-baseline-config\",\"{ensure=absent, require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], tag=mwconfig}\",\"/st/st-dev1-ebs1/rma.yaml\"),\n\t\t\t\tnew ETD(true,\"{tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Mount[/var/sonatype-work]], ensure=2.1.41-release_2.1.41_1}\",\"system::packages/ssb-core-features-lib-nexus\",\"{ensure=absent, tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Package[gen_bin_nexus], Mount[/var/sonatype-work]]}\",\"/st/st-dev1-ebs1/rma.yaml\")\t \t\t\t \n\t\t};\n\t\tETD[] t4 = new ETD[]{\n\t\t\t\tnew ETD(true,\"{require=[Package[gen-ins-jboss-fuse], File[/opt/fuse]], ensure=2.0.294-1}\",\"system::packages/ssb-rpm-fuse-config\",\"{ensure=absent, require=Package[gen-ins-jboss-fuse], tag=mwconfig}\",\"/st/st-dev1-ebs1/ssb.yaml\"),\n\t\t\t\tnew ETD(true,\"{require=Package[ssb-rpm-fuse-config], tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-config\",\"{ensure=absent, require=Package[ssb-rpm-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb.yaml\"),\n\t \t\t\tnew ETD(true,\"{require=Package[ssb-core-features-fuse-config], tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-application\",\"{ensure=absent, require=Package[ssb-core-features-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb.yaml\")\n };\t\n\t\t\n\t\tString csv = \"ssb-core-features-fuse-application,2.1.119-1,groupid,ssb-core-features-fuse-application,2.1.119,war,\"\n\t\t+ \"\\nssb-core-features-fuse-config,2.1.119-1,groupid,ssb-core-features-fuse-config,2.1.119,war,\"\n\t\t+ \"\\nssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,groupid,ssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,war,\"\n\t\t+ \"\\nssb-db-schema,1.376.293-1,groupid,ssb-db-schema,1.376.293,war,\"\n\t\t+ \"\\nssb-ldap-schema,1.143-1,groupid,ssb-ldap-schema,1.143,war,\"\n\t\t+ \"\\nssb-rpm-fuse-config,2.0.294-1,groupid,ssb-rpm-fuse-config,2.0.294,war,\"\n\t\t+ \"\\nssb-rpm-nexus-baseline-config,2.0.3-1,groupid,ssb-rpm-nexus-baseline-config,2.0.3,war,\"\n\t\t+ \"\\n\";\n\t\t\t\t\n\t\tChainDeploymentVerification.verify(dep, csv, 4, new int[]{1,1,2,3}, t1, t2, t3, t4);\n\t}",
"@Test\n public void testComputeMinSdkVersion_releasedPlatform() {\n verifyComputeMinSdkVersion(OLDER_VERSION, RELEASED, true, OLDER_VERSION);\n\n // Do allow same release minSdkVersion on released platform.\n // APP: Released API 20\n // DEV: Released API 20\n verifyComputeMinSdkVersion(PLATFORM_VERSION, RELEASED, true, PLATFORM_VERSION);\n\n // Don't allow newer release minSdkVersion on released platform.\n // APP: Released API 30\n // DEV: Released API 20\n verifyComputeMinSdkVersion(NEWER_VERSION, RELEASED, true, -1);\n\n // Don't allow older pre-release minSdkVersion on released platform.\n // APP: Pre-release API 10\n // DEV: Released API 20\n verifyComputeMinSdkVersion(OLDER_VERSION, OLDER_PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(OLDER_VERSION, OLDER_PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n\n // Don't allow same pre-release minSdkVersion on released platform.\n // APP: Pre-release API 20\n // DEV: Released API 20\n verifyComputeMinSdkVersion(PLATFORM_VERSION, PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(PLATFORM_VERSION, PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n\n\n // Don't allow newer pre-release minSdkVersion on released platform.\n // APP: Pre-release API 30\n // DEV: Released API 20\n verifyComputeMinSdkVersion(NEWER_VERSION, NEWER_PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(NEWER_VERSION, NEWER_PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n }",
"@Test\n public void verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }",
"private boolean shouldDeployApp(ApplicationReference appRef, SystemApplication application)\n throws Exception {\n ApplicationDetail currAppDetail;\n try {\n currAppDetail = applicationLifecycleService.getLatestAppDetail(appRef);\n } catch (ApplicationNotFoundException exception) {\n return true;\n }\n // Compare if the app artifact version of currently deployed application with highest version of app artifact\n // available. If it's not same, capability applier should redeploy application.\n ArtifactSummary summary = application.getArtifact();\n NamespaceId artifactNamespace =\n ArtifactScope.SYSTEM.equals(summary.getScope()) ? NamespaceId.SYSTEM\n : appRef.getNamespaceId();\n ArtifactRange range = new ArtifactRange(artifactNamespace.getNamespace(), summary.getName(),\n ArtifactVersionRange.parse(summary.getVersion()));\n // this method will not throw ArtifactNotFoundException, if no artifacts in the range, we are expecting an empty\n // collection returned.\n List<ArtifactDetail> artifactDetail = artifactRepository.getArtifactDetails(range, 1,\n ArtifactSortOrder.DESC);\n if (artifactDetail.isEmpty()) {\n throw new ArtifactNotFoundException(range.getNamespace(), range.getName());\n }\n\n ArtifactId latestArtifactId = artifactDetail.get(0).getDescriptor().getArtifactId();\n // Compare the version of app artifact for deployed application and the latest available version of that\n // same artifact. If same means no need to deploy the application again.\n return !currAppDetail.getArtifact().getVersion()\n .equals(latestArtifactId.getVersion().getVersion());\n }",
"private void checkUpdateAvailability() {\n\t\t\n\t\t// Grab the data from the device and manifest\n\t\tString currentVersion = Utils.getProp(\"ro.ota.version\");\n\t\tcurrentVersion = currentVersion.replaceAll(\"[^0-9]\", \"\"); // Strip anyhting not a number\n\t\tString manifestVer = results.getVersion();\n\t\tmanifestVer = manifestVer.replaceAll(\"[^0-9]\", \"\");\n\n\t\t// Parse ints\n\t\tint manifestNumber = Integer.parseInt(manifestVer);\n\t\tint currentNumber = Integer.parseInt(currentVersion);\n\t\t\n\t\t// Pad out to be at least 5 digits long\n\t\t// That way, 1.2 shows bigger than 1.1.1\n\t\t// Because 12000 > 11100\n\t\t// Without this it would show 12 > 111\n\t\tif(manifestVer.length() <= 2){\n\t\t\tmanifestNumber *= 1000;\n\t\t} else if(manifestVer.length() <= 3) {\n\t\t\tmanifestNumber *= 100;\n\t\t} else if(manifestVer.length() <= 4) {\n\t\t\tmanifestNumber *= 10;\n\t\t}\n\t\t\n\t\t// Same again\n\t\tif(currentVersion.length() <= 2){\n\t\t\tcurrentNumber *= 1000;\n\t\t} else if(currentVersion.length() <= 3) {\n\t\t\tcurrentNumber *= 100;\n\t\t} else if(currentVersion.length() <= 4) {\n\t\t\tcurrentNumber *= 10;\n\t\t}\n\t\t\n\t\t// Set pref\n\t\tPreferences.setUpdateAvailable(mContext, manifestNumber > currentNumber);\n\t}",
"@Test\n public void testCreateNeededModelVersionsForManuallyDeployedApps() {\n List<Host> hosts = createHosts(7, \"7.0.0\");\n\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"), devZone);\n CountingModelFactory factory710 = createHostedModelFactory(Version.fromString(\"7.1.0\"), devZone);\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"), devZone);\n List<ModelFactory> modelFactories = List.of(factory700, factory710, factory720);\n\n DeployTester tester = createTester(hosts, modelFactories, devZone);\n // Deploy with version that does not exist on hosts, the model for this version should also be created\n tester.deployApp(\"src/test/apps/hosted/\", \"7.2.0\");\n assertEquals(7, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());\n\n // Check >0 not ==0 as the session watcher thread is running and will redeploy models in the background\n // Nodes are on 7.0.0 (should be created), no nodes on 7.1.0 (should not be created), 7.2.0 should always be created\n assertTrue(factory700.creationCount() > 0);\n assertFalse(factory710.creationCount() > 0);\n assertTrue(\"Newest model for latest major version is always included\", factory720.creationCount() > 0);\n }",
"@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }",
"@Test\n public void testDeploymentErrors() {\n for (int i = 0; i < 15; i++) {\n try {\n deployer.deploy(INVALID_APP);\n fail(\"App deployed successfully\");\n } catch (Exception ex) {\n assertExceptionInCauseChain(\"Incorrect exception on deployment \" + i, ex, TestAppException.class);\n } finally {\n deployer.undeploy(INVALID_APP);\n }\n }\n }",
"@Test\n\tpublic void ebsad11654ScopeSpecificDeploy() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-11654-scoped_deploy\");\n\t\t\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), \"Magical Trevor\");\n\t\t\n\t\tETD[] t0 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-fuse-application/ensure\",\"2.1.119-1\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-fuse-config/ensure\",\"2.1.119-1\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\tETD[] t1 = new ETD[] {new ETD(true,HieraData.ABSENT,\"system::packages/ssb-rpm-fuse-config/ensure\",\"2.0.294-1\",\"/st/st-dev1-ebs1/ssb1.yaml\")};\n\t\tETD[] t2 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-lib-nexus/ensure\",\"2.1.41-release_2.1.41_1\",\"/st/st-dev1-ebs1/rma.yaml\")\n\t\t};\n\t\tETD[] t3 = new ETD[] {\n\t\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-rpm-nexus-baseline-config/ensure\",\"2.0.3-1\",\"/st/st-dev1-ebs1/rma.yaml\")\n\t\t};\n\t\tETD[] t4 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-ldap-schema/ensure\",\"1.143-1\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t5 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-db-schema/ensure\",\"1.376.293-1\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t6 = new ETD[]{\n\t\t\tnew ETD(true,\"{ensure=1.376.298-1, require=[Package[jdk], Service[postgresql-9.2]], tag=mwdeploy}\",\"system::packages/ssb-db-schema\",null,\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\tETD[] t7 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=Package[ssb_cfg_openldap], tag=mwconfig, ensure=1.143-1}\",\"system::packages/ssb-ldap-schema\",\"{ensure=absent, require=Package[ssb_cfg_openldap], tag=appdeploy}\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t8 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], ensure=2.0.8-1}\",\"system::packages/ssb-rpm-nexus-baseline-config\",\"{ensure=absent, require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], tag=mwconfig}\",\"/st/st-dev1-ebs1/rma.yaml\"),\n\t\t\tnew ETD(true,\"{tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Mount[/var/sonatype-work]], ensure=2.1.41-release_2.1.41_1}\",\"system::packages/ssb-core-features-lib-nexus\",\"{ensure=absent, tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Package[gen_bin_nexus], Mount[/var/sonatype-work]]}\",\"/st/st-dev1-ebs1/rma.yaml\"),\n\t\t};\n\t\tETD[] t9 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=[Package[gen-ins-jboss-fuse], File[/opt/fuse]], ensure=2.0.294-1}\",\"system::packages/ssb-rpm-fuse-config\",\"{ensure=absent, require=Package[gen-ins-jboss-fuse], tag=mwconfig}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,\"{require=Package[ssb-rpm-fuse-config], tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-config\",\"{ensure=absent, require=Package[ssb-rpm-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,\"{tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-application\",\"{ensure=absent, require=Package[ssb-core-features-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\t\n\t\tString csv = \"ssb-core-features-fuse-application,2.1.119-1,groupid,ssb-core-features-fuse-application,2.1.119-1,war,\\n\"\n\t\t\t\t+ \"ssb-core-features-fuse-config,2.1.119-1,groupid,ssb-core-features-fuse-config,2.1.119-1,war,\\n\"\n\t\t\t\t+ \"ssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,groupid,ssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,war,\\n\"\n\t\t\t\t+ \"ssb-db-schema,1.376.298-1,groupid,ssb-db-schema,1.376.298-1,war,\\n\"\n\t\t\t\t+ \"ssb-ldap-schema,1.143-1,groupid,ssb-ldap-schema,1.143-1,war,\\n\"\n\t\t\t\t+ \"ssb-rpm-fuse-config,2.0.294-1,groupid,ssb-rpm-fuse-config,2.0.294-1,war,\\n\"\n\t\t\t\t+ \"ssb-rpm-nexus-baseline-config,2.0.8-1,groupid,ssb-rpm-nexus-baseline-config,2.0.8-1,war,\\n\";\n\t\tChainDeploymentVerification.verify(dep, csv, 10, new int[]{2, 1, 1, 1, 1, 1, 1, 1, 2, 3}, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);\n\t}",
"@Test\n public void testAppsFailedCreated() {\n\n long totalBadbefore = metrics.getAppsFailedCreated();\n\n badSubCluster.getNewApplication();\n\n Assert.assertEquals(totalBadbefore + 1, metrics.getAppsFailedCreated());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Enregistre le coffre pour un BoutiqueSignChest | public void setChest(Block sign, Chest chest, Player p)
{
BoutiqueSign bs = this.getBoutiqueSign(sign);
if(bs == null)
{
// TODO: message "Impossible de trouver le panneau en question"
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHOOSESIGNBEFORE")); //$NON-NLS-1$
return;
}
else
{
String newChestLoc = ""; //$NON-NLS-1$
String oldChestLoc = ""; //$NON-NLS-1$
Chest bsc = bs.getChest();
oldChestLoc = bs.getChestString();
newChestLoc = BoutiqueSign.getLocationString(chest.getBlock().getLocation());
//verifie que le panneau n'etait pas deja relié au coffre
if (oldChestLoc == newChestLoc)
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.SIGNALREADYBINDED")); //$NON-NLS-1$
return;
}
int distX = sign.getX() - chest.getBlock().getX();
int distZ = sign.getZ() - chest.getBlock().getZ();
int maxDist = 15;
if (distX > maxDist || distZ > maxDist )
{
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHESTTOOFARAWAY") + maxDist + Messages.getString("Sign.MAXBLOCKS")); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
//DEBUG
//p.sendMessage(plugin.chatPrefix + "Enregistrement coffre");
bs.setChest(chest);
updateSignDb(bs);
p.sendMessage(plugin.chatPrefix + Messages.getString("Sign.CHESTBINDED")); //$NON-NLS-1$
//DEBUG
//p.sendMessage(plugin.chatPrefix + "panneau: " + bs.getChestString());
}
} | [
"@RequiresApi(api = Build.VERSION_CODES.M)\n private void enregistrerCours()\n {\n cours.setTitre(vueModifierCoursChampTitre.getText().toString());\n cours.setHeure(vueModifierCoursChampHeure.getHour() + \":\" + vueModifierCoursChampHeure.getMinute());\n\n //coursDAO = CoursDAO.getInstance();\n\n coursDAO.modifierCours(cours);\n\n }",
"void save(Chest chest);",
"public void enregistrementOk(){\n\t\tMessageErreur.BienEnregistrer(fenetre);\n\t}",
"private void registraUpdate() {\n /* variabili e costanti locali di lavoro */\n Date oggi;\n\n try { // prova ad eseguire il codice\n oggi = Lib.Data.getCorrente();\n Pref.Update.ultimoAgg.getWrap().setValore(oggi);\n Pref.registra();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"@Override\r\n public void storeCash() {\r\n\r\n }",
"public void enregistreEcPirate(PirateEcouteur ecouteur)\n\t{\n\t\tthis.pirateEcouteurs.add(PirateEcouteur.class, ecouteur);\n\t}",
"public void saveCompaign() {\n campaignio.saveCompaign(campaign);\n }",
"public void save(HrJBorrowcontract entity);",
"public void addContract(Contracts c){\n String sql = \"INSERT INTO motorhome.contracts VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n String start_date = c.getDate_of_Reserve();\n String end_date = c.getDate_of_handIn();\n int carfk = c.getIDcar();\n int customerfk = c.getIDcustomer();\n int ekstrasfk = c.getID_ekstra();\n String pickupfk = c.getIDPickUp();\n double kilomterdriven = 0;\n boolean fuel = true;\n\n setCarsbyid(c);\n setextrasid(c);\n setDropoff(c);\n\n double startingPrice = Calculator.rentalTotalPricing(c);\n\n template.update(sql,c.getId_contracts() ,carfk, customerfk, start_date,\n end_date, fuel\n ,kilomterdriven, startingPrice, pickupfk, ekstrasfk);\n }",
"@Override\n public Cours creerCours(String nomCours, Integer niveauCible, Date dateDebut, Integer duree, Integer enseignant, String idPiscine) {\n Creneau creneau = new Creneau(dateDebut, duree);\n creneau=creneauRepo.save(creneau);\n Piscine p = piscineRepo.findOne(idPiscine);\n Cours c = new Cours (nomCours, niveauCible,creneau, enseignant, new Participant[4],p );\n Cours insert = coursRepo.save(c);\n return insert;\n }",
"public void ajouterCource(Cource cource) {\n SQLiteDatabase db = this.getWritableDatabase(); // On veut écrire dans la BD\n ContentValues values = new ContentValues();\n values.put(COURCE_ID_USER, cource.getId_user());\n values.put(COURCE_PAS, cource.getPas());\n values.put(COURCE_CALORIES, cource.getCalories());\n values.put(COURCE_TEMPS, cource.getTemps());\n values.put(COURCE_DISTANCE, cource.getDistance());\n values.put(COURCE_TYPE, cource.getType());\n values.put(COURCE_DATE, cource.getDate());\n// Insérer le nouvel enregistrement\n long id = db.insert(TABLE_COURCE, null, values);\n db.close(); // Fermer la connexion\n }",
"public void salvarNoBanco() {\n\n try {\n ofertaDisciplinaFacade.save(oferta);\n// JsfUtil.addSuccessMessage(\"Pessoa \" + pessoa.getNome() + \" criado com sucesso!\");\n oferta= null;\n// recriarModelo();\n } catch (Exception e) {\n JsfUtil.addErrorMessage(e, \"Ocorreu um erro de persistência\");\n }\n }",
"private void addComiteCredit() {\n\n comiteCredit = new ComiteCredit();\n if (!STRING_EMPTY.equals(CmNom_ET.getText().toString().trim())){\n comiteCredit.setCmNom(CmNom_ET.getText().toString().trim());\n }else{\n MyData.bipError();\n til_CmNom.setError(\"Indiquer le nom du comité\");\n til_CmNom.requestFocus();\n Toast.makeText(CreateComiteCredit.this,\n \"le nom du comité est vide!\",\n Toast.LENGTH_LONG).show();\n return;\n }\n if (!STRING_EMPTY.equals(CmNbMembre_ET.getText().toString().trim())){\n comiteCredit.setCmNbMembre(Integer.parseInt(CmNbMembre_ET.getText().toString().trim()));\n }else{\n MyData.bipError();\n til_CmNbMembre.setError(\"Indiquer le nombre de membre du comité\");\n til_CmNbMembre.requestFocus();\n Toast.makeText(CreateComiteCredit.this,\n \"le nombre de membre du comité est vide!\",\n Toast.LENGTH_LONG).show();\n return;\n }\n if (rb_CmTypeCA.isChecked()){\n comiteCredit.setCmType(\"CA\");\n }else if (rb_CmTypeDI.isChecked()){\n comiteCredit.setCmType(\"DI\");\n }else if (rb_CmTypeAG.isChecked()){\n comiteCredit.setCmType(\"AG\");\n }else if (rb_CmTypeIN.isChecked()){\n comiteCredit.setCmType(\"IN\");\n }else{\n notificationCmTypeNonRenseignee();\n return;\n }\n if (rb_CmIsOnOui.isChecked()){\n comiteCredit.setCmIsOn(\"Y\");\n }else if (rb_CmIsOnNon.isChecked()){\n comiteCredit.setCmIsOn(\"N\");\n }else{\n notificationCmIsOnNonRenseignee();\n return;\n }\n\n if (CmGuichet==0 && !comiteCredit.getCmType().equals(\"AG\")){\n notificationGuichetVide();\n }\n comiteCredit.setCmGuichet(CmGuichet);\n comiteCredit.setCmCaisse(MyData.CAISSE_ID);\n comiteCredit.setCmUserCree(MyData.USER_ID);\n\n new AddComiteCreditAsyncTask().execute();\n\n\n\n }",
"nc.vo.crd.bd.interf.zyhtvo.ZyhtVO addNewZyhtVO();",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"private Enregistreur(){}",
"public void ajouterFicheFrais(CFicheFrais ficheFrais) {\r\n this.tableFicheFrais.insererFicheFrais(ficheFrais);\r\n }",
"public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}",
"@EventHandler(ignoreCancelled = true)\r\n \t\tpublic void onSignChange(SignChangeEvent event) {\r\n \t\t\tif(event.isCancelled()) return;\r\n \t\t\t if(event.getLine(0).equalsIgnoreCase(\"[RSPassword]\") || event.getLine(0).equalsIgnoreCase(\"[RSP]\")) {\r\n \t\t\t\t if(!event.getPlayer().isOp() && !event.getPlayer().hasPermission(\"rspassword.create\")) {\r\n \t\t\t\t\t\tevent.getPlayer().sendMessage(ChatColor.RED + \"You do not have permission to create RSPassword signs.\");\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t }\r\n \t\t\t\t if(event.getLine(3) == \"\" || event.getLine(2).contains(\" \") || event.getLine(2) == \"\" || event.getLine(1) == \"\" || plugin.isParsableToInt(event.getLine(3)) == false) {\r\n \t\t\t\t \tevent.getPlayer().sendMessage(ChatColor.RED + \"Invalid RSP sign!\");\r\n \t\t\t\t \tevent.setLine(2, \"[Hidden Pass]\");\r\n \t\t\t\t \treturn;\r\n \t\t\t\t }\r\n \t\t\t\t String location = event.getBlock().getLocation().toString();\r\n \t\t\t\t Persistance newClass = plugin.getDatabase().find(Persistance.class).where().ieq(\"location\", location).findUnique();\r\n \t\t\t\t if (newClass == null) {\r\n \t\t\t\t \tnewClass = new Persistance(); \r\n \t\t\t\t \tnewClass.setCreatorName(event.getPlayer().getName());\r\n \t\t\t\t \tnewClass.setLocation(event.getBlock().getLocation().toString());\r\n \t\t\t\t \tnewClass.setSignNick(event.getLine(1));\r\n \t\t\t\t \tnewClass.setPassword(event.getLine(2));\r\n \t\t\t\t \tnewClass.setTimer(Integer.parseInt(event.getLine(3)));\r\n \t\t\t\t \tplugin.getDatabase().save(newClass);\r\n \t\t\t\t \tString obfupass = plugin.obfupass(event.getLine(2));\r\n \t\t\t\t \tevent.setLine(0, ChatColor.LIGHT_PURPLE + event.getLine(1));\r\n \t\t\t\t \tevent.setLine(1, \"\");\r\n \t\t\t\t \tevent.setLine(2, ChatColor.GREEN + \"Password:\");\r\n \t\t\t\t \tevent.setLine(3, ChatColor.GREEN + obfupass);\r\n \t\t\t\t \treturn;\r\n \t\t\t\t }\r\n \t\t\t\t else {\r\n \t\t\t\t \tevent.getPlayer().sendMessage(ChatColor.RED + \"Unexpected error occurred! Database still shows a previous RSP sign at this location!\");\r\n \t\t\t\t \treturn;\r\n \t\t\t\t }\r\n \t\t\t}\r\n \t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field473' field | public java.lang.CharSequence getField473() {
return field473;
} | [
"public java.lang.CharSequence getField473() {\n return field473;\n }",
"java.lang.String getField1571();",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"java.lang.String getField1371();",
"public java.lang.CharSequence getField373() {\n return field373;\n }",
"public java.lang.CharSequence getField73() {\n return field73;\n }",
"public java.lang.CharSequence getField483() {\n return field483;\n }",
"java.lang.String getField1572();",
"public java.lang.CharSequence getField471() {\n return field471;\n }",
"public java.lang.CharSequence getField472() {\n return field472;\n }",
"java.lang.String getField1372();",
"public java.lang.CharSequence getField73() {\n return field73;\n }",
"public java.lang.CharSequence getField547() {\n return field547;\n }",
"public java.lang.CharSequence getField373() {\n return field373;\n }",
"java.lang.String getField1772();",
"java.lang.String getField1366();",
"public java.lang.CharSequence getField697() {\n return field697;\n }",
"public java.lang.CharSequence getField463() {\n return field463;\n }",
"public java.lang.CharSequence getField472() {\n return field472;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Movie Rating API Get the movie rating (imdbID and rating) in the POST body and call the corresponding service class method in business layer. | @PostMapping("/rating")
public Rating rating(@RequestBody Rating rating) {
return movieFinderService.rateingService(rating);
} | [
"@RequestMapping(\"/{mId}\")\r\n\t public Rating getRating(@PathVariable(\"mId\") String movieId) {\r\n\t \r\n\t \t// Hard coded rating for every request.\r\n\t \treturn new Rating(movieId, 88);\r\n\t }",
"@RequestMapping(\"/{movieId}\")\n\tpublic Optional<Rating> getMovieRatingByMovieId(@PathVariable(\"movieId\") int movieId) {\n\n\t\treturn movieRatingService.getMovieRatingsByMovieId(movieId);\n\t}",
"public List<Rating> findRatingByMovie(String movieID);",
"private void rateMovie() {\n\t\tScanner sc= new Scanner(System.in);\n\n\t\tMovieManager mm = new MovieManager();\n\n\t\tSystem.out.println(\"Which movie would you like to rate/review?\");\n\t\tmm.listAll();\n\t\tint movieID = InputBoundary.getIntInput(\"Choose an option\");\n\n\t\tint rating;\n\t\tdo {\n\t\t\trating = InputBoundary.getIntInput(\"Please give your rating (between 1-5)\");\n\t\t} while (rating < 0 || rating > 5);\n\n\t\tSystem.out.println(\"Would you like to give a review?(Y/N)\");\n\t\tString reviewOption = sc.nextLine();\n\t\tString reviewInput = null;\n\n\t\tif (reviewOption.compareToIgnoreCase(\"y\") == 0) {\n\t\t\tSystem.out.println(\"Please enter your review:\");\n\t\t\treviewInput = sc.nextLine();\n\t\t}\n\t\tReview r = mm.addReviewToMovie(movieID, rating, account, reviewInput);\n\t\tSystem.out.println(\"Review Added.\");\n\t\tPrinter.printReviewInfo(r);\n\t}",
"public RateMovieResponse rateMovie(int movieId, RateMovieRequest rateMovieRequest, String guestSessionId, String sessionId) {\n // /movie/{movie_id}/rating\n String path = String.format(\"/movie/%s/rating\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"guest_session_id\", guestSessionId);\n requestParams.put(\"session_id\", sessionId);\n return restClient.post(path, requestParams, new TypeReference<>() {\n\n\n }\n , rateMovieRequest);\n }",
"public Movie(int movieId, float rating){\n\t \tthis.movieId = movieId;\n\t \tthis.rating = rating;\n\t }",
"@RequestMapping (value=\"/video/{id}/rate\", method=RequestMethod.POST)\n\tpublic @ResponseBody Video rateVideo(@PathVariable(\"id\") long id, @RequestParam(\"rating\") int rating, HttpServletResponse response) {\n\t\tlogger.info(\"--> rateVideo(), ID: \" + Long.toString(id) + \", rating: \" + rating);\n\t\t\n\t\tif (rating < 1 || rating > 5) {\n\t\t\tresponse.setStatus(400);\n\t\t\tlogger.info(\"<-- rateVideo(), wrong parameter received\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif (videos.containsKey(id)) {\n\t\t\tVideo v = videos.get(id);\n\t\t\tVideoRating videoRating = ratings.get(id);\n\t\t\t\t\n\t\t\tint currentRating = videoRating.getRating();\n\t\t\tint currentNums = videoRating.getNums();\n\t\t\tif (currentNums == 0) {\n\t\t\t\tcurrentRating = rating;\n\t\t\t\tcurrentNums++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurrentRating = (currentRating+rating)/2;\n\t\t\t\tcurrentNums++;\n\t\t\t}\n\t\t\tvideoRating.setRating(currentRating);\n\t\t\tvideoRating.setNums(currentNums);\n\t\t\tv.setRating(currentRating);\n\t\t\t//v.updateVideoRating(rating);\n\t\t\tlogger.info(\"<-- rateVideo(), ID: \" + id + \", rating \" + videoRating);\n\t\t\treturn v;\t\t\t\n\t\t}\n\t\telse {\n\t\t\tlogger.info(\"<-- rateVideo(), Failed to find ID: \" + id);\n\t\t\tresponse.setStatus(404);\n\t\t\treturn null;\t\t\t\n\t\t}\t\t\n\t}",
"public StatusCode postMovieRating(int movieId, int rating, String sessionId, String guestSessionId) throws MovieDbException {\n return tmdbMovies.postMovieRating(movieId, rating, sessionId, guestSessionId);\n }",
"public MovieRating(Integer movieId) {\n this.id = movieId;\n this.popularity = new Integer(0);\n this.totalRating = new Double(0);\n }",
"public RateMovieResponse rateMovie(int movieId, RateMovieRequest requestBody) {\n return rateMovie(movieId, requestBody, null, null);\n }",
"@PostMapping(\"/ratings\")\n @Timed\n public ResponseEntity<Rating> createRating(@Valid @RequestBody Rating rating) throws URISyntaxException {\n log.debug(\"REST request to save Rating : {}\", rating);\n \n if (rating.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new rating cannot already have an ID\")).body(null);\n }\n User user = userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).get();\n if (ratingRepository.findByRestaurantIdAndUserIsCurrentUser(rating.getRestaurant().getId(), user) != null && ratingRepository.findByRestaurantIdAndUserIsCurrentUser(rating.getRestaurant().getId(), user).size()>0) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"ratingexists\", \"Already reviewed!\")).body(null);\n }\n \n //the time of creation of the rating\n rating.setCreated(ZonedDateTime.now());\n \n //the current user that is creating this review\n rating.setUser(userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).get());\n Rating result = ratingRepository.save(rating);\n \n ratingSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/ratings/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public Rating(String name, String movieID, double rating) {\n\t\tthis.user = new RatingPK(name, movieID);\n\t\tthis.ratingVal = rating;\n\t\tthis.review = null;\n\t}",
"@PostMapping(path = \"/{name}/rating/{rating}\")\n public ResponseEntity<?> ratingActivity(@PathVariable(\"rating\") Double rating, @PathVariable(\"name\") String activityName) {\n Activity activity = null;\n try {\n activity = activityServices.getActivityByName(activityName);\n } catch (ActivityException e) {\n e.printStackTrace();\n new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n Feedback feedback = activity.getFeedback();\n feedback.setRating((feedback.getRating()+rating)/2);\n activity.setFeedback(feedback);\n System.err.println(activity.getFeedback().getRating());\n try {\n activityServices.updateActivity(activity);\n } catch (ActivityException | ParkException | PlanException ex) {\n ex.printStackTrace();\n }\n final ResponseEntity response = new ResponseEntity<>(HttpStatus.CREATED);\n return response;\n\n }",
"@RequestMapping(\"/all\")\n\tpublic UserRating getAllMovieRatings() {\n\t\tUserRating userRating = new UserRating();\n\t\tuserRating.setUserRating(movieRatingService.getAllMovieRatings());\n\t\treturn userRating;\n\t}",
"public Rating(int movieID, String email, float rating){\n this.movieID = movieID;\n this.rating = rating;\n this.email = email;\n }",
"public void testPostMovieRating() throws Exception {\r\n LOG.info(\"postMovieRating\");\r\n String sessionId = \"\";\r\n String rating = \"\";\r\n boolean expResult = false;\r\n boolean result = tmdb.postMovieRating(sessionId, rating);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Override\n public double getAvgRating(int movie_id){\n return movieDAO.getAvgRating(movie_id);\n }",
"public void setRating(int rating){\n this.rating = rating;\n }",
"public Recommendation(Movie movie) {\n this.movie = movie;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the record size being used by this stream's TarBuffer. | public final int getRecordSize()
{
return tarBuffer.getRecordSize();
} | [
"public int getRecordSize() {\n return buffer.getRecordSize();\n }",
"public int getRecordSize()\n {\n return m_buffer.getRecordSize();\n }",
"public int size()\n {\n int bufferPoolSize = this.bufferPool.size();\n\n int size = bufferPoolSize * (this.blockSize / this.recordSize);\n\n return size;\n }",
"public long getRecordSize() {\n return recordSize;\n }",
"public int getRecordSize()\r\n\t{\r\n\t\treturn recordSize;\r\n\t}",
"@Deprecated\n\tpublic final int GetRecordSize()\n\t{\n\t\treturn tarBuffer.getRecordSize();\n\t}",
"public int getRecordSize()\n {\n return 4 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4;\n }",
"@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }",
"public long uncompressedSize() { int o = __offset(12); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }",
"public int recordLength() {\n return recordLength;\n }",
"public int size()\n {\n int result = 0;\n final int size = blockRecords.size();\n for (int i = 0; i < size; i++)\n {\n result += blockRecords.get(i).getSize();\n }\n return result;\n }",
"public static int length()\r\n {\r\n \treturn RECORD_BYTES;\r\n }",
"public Integer getSize() {\r\n if (obj != null) {\r\n return obj.getPayload().length;\r\n }\r\n else { \r\n return getInteger(\"size\"); \r\n }\r\n }",
"public long getLen_Buffer() {\n return this.Len_Buffer;\n }",
"long getTailDataSize();",
"public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}",
"@Schema(example = \"512\", description = \"Transaction size in bytes\")\n public Integer getSize() {\n return size;\n }",
"public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }",
"public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests an image with 2 channels, one blue (light path emission filter) and another one with a transmitted light. | @Test
public void testChannelsEmFilterLightPathBlueAndTransmittedLight()
{
ChannelProcessor processor = new ChannelProcessor();
store.setReader(new TestReader(false));
store.setTransmittanceRangeCutIn(430, INSTRUMENT_INDEX, 2);
store.setTransmittanceRangeCutOut(435, INSTRUMENT_INDEX, 2);
processor.process(store);
ChannelData data = ChannelData.fromObjectContainerStore(
store, IMAGE_INDEX, CHANNEL_INDEX);
assertNotNull(data.getChannel());
assertNotNull(data.getChannel().getRed());
assertEquals(0, data.getChannel().getRed().getValue());
assertNotNull(data.getChannel().getGreen());
assertEquals(0, data.getChannel().getGreen().getValue());
assertNotNull(data.getChannel().getBlue());
assertEquals(255, data.getChannel().getBlue().getValue());
assertNotNull(data.getChannel().getAlpha());
assertEquals(255, data.getChannel().getAlpha().getValue());
//
data = ChannelData.fromObjectContainerStore(
store, IMAGE_INDEX, CHANNEL_INDEX+1);
assertNotNull(data.getChannel());
assertNotNull(data.getChannel().getRed());
assertEquals(255, data.getChannel().getRed().getValue());
assertNotNull(data.getChannel().getGreen());
assertEquals(255, data.getChannel().getGreen().getValue());
assertNotNull(data.getChannel().getBlue());
assertEquals(255, data.getChannel().getBlue().getValue());
assertNotNull(data.getChannel().getAlpha());
assertEquals(255, data.getChannel().getAlpha().getValue());
} | [
"@Test\n\tpublic void testChannelsEmFilterLightPathRedAndTransmittedLight()\n\t{\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tstore.setReader(new TestReader(false));\n\t\tstore.setTransmittanceRangeCutIn(600, INSTRUMENT_INDEX, 2);\n\t\tstore.setTransmittanceRangeCutOut(620, INSTRUMENT_INDEX, 2);\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(255, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(0, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(0, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\t//\n\t\tdata = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX+1);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(255, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(255, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(255, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t}",
"@Test\n\tpublic void testChannelsEmFilterLightPathGreenAndTransmittedLight()\n\t{\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tstore.setReader(new TestReader(false));\n\t\tstore.setTransmittanceRangeCutIn(510, INSTRUMENT_INDEX, 2);\n\t\tstore.setTransmittanceRangeCutOut(520, INSTRUMENT_INDEX, 2);\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(0, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(255, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(0, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\t//\n\t\tdata = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX+1);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(255, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(255, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(255, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t}",
"@Test\n\tpublic void testChannelsEmFilterFilterSetGreenAndTransmittedLight()\n\t{\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tstore.setReader(new TestReader(false));\n\t\tstore.setTransmittanceRangeCutIn(510, INSTRUMENT_INDEX, 0);\n\t\tstore.setTransmittanceRangeCutOut(520, INSTRUMENT_INDEX, 0);\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(0, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(255, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(0, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\t//\n\t\tdata = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX+1);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(255, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(255, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(255, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t}",
"@Test\n\tpublic void testLogicalChannelLightPathExFilterBlueAndFilterSetEmFilterRedWavelength()\n\t{\n\t\tstore.setTransmittanceRangeCutIn(430, INSTRUMENT_INDEX, 3);\n\t\tstore.setTransmittanceRangeCutOut(435, INSTRUMENT_INDEX, 3);\n\t\tstore.setTransmittanceRangeCutIn(625, INSTRUMENT_INDEX, 0);\n\t\tstore.setTransmittanceRangeCutOut(640, INSTRUMENT_INDEX, 0);\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(255, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(0, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(0, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\tassertNotNull(data.getLogicalChannel());\n\t\tassertNotNull(data.getLogicalChannel().getName());\n\t\tassertEquals(\"625\", data.getLogicalChannel().getName().getValue());\n\t}",
"@Test\n public void filter() throws IOException {\n Layer newTestLayer = ImageUtil.readJPEGPNG(\"spencer.jpeg\");\n Layer newTestLayerBlur = ImageUtil.readJPEGPNG(\"spencer.jpeg\");\n new Blur().filter(newTestLayerBlur);\n assertTrue(newTestLayer.getPixels() != newTestLayerBlur.getPixels());\n }",
"@Test\n\tpublic void testLogicalChannelLightPathEmFilterBlueAndFilterSetEmFilterRedWavelength()\n\t{\n\t\tstore.setTransmittanceRangeCutIn(430, INSTRUMENT_INDEX, 2);\n\t\tstore.setTransmittanceRangeCutOut(435, INSTRUMENT_INDEX, 2);\n\t\tstore.setTransmittanceRangeCutIn(625, INSTRUMENT_INDEX, 0);\n\t\tstore.setTransmittanceRangeCutOut(640, INSTRUMENT_INDEX, 0);\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(0, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(0, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(255, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\tassertNotNull(data.getLogicalChannel());\n\t\tassertNotNull(data.getLogicalChannel().getName());\n\t\tassertEquals(\"430\", data.getLogicalChannel().getName().getValue());\n\t}",
"@Test\n\tpublic void testLogicalChannelLightPathExFilterBlueAndFilterSetExFilterRedWavelength()\n\t{\n\t\tstore.setTransmittanceRangeCutIn(430, INSTRUMENT_INDEX, 3);\n\t\tstore.setTransmittanceRangeCutOut(435, INSTRUMENT_INDEX, 3);\n\t\tstore.setTransmittanceRangeCutIn(625, INSTRUMENT_INDEX, 1);\n\t\tstore.setTransmittanceRangeCutOut(640, INSTRUMENT_INDEX, 1);\n\t\tChannelProcessor processor = new ChannelProcessor();\n\t\tprocessor.process(store);\n\t\tChannelData data = ChannelData.fromObjectContainerStore(\n\t\t\t\tstore, IMAGE_INDEX, CHANNEL_INDEX);\n\t\tassertNotNull(data.getChannel());\n\t\tassertNotNull(data.getChannel().getRed());\n\t\tassertEquals(0, data.getChannel().getRed().getValue());\n\t\tassertNotNull(data.getChannel().getGreen());\n\t\tassertEquals(0, data.getChannel().getGreen().getValue());\n\t\tassertNotNull(data.getChannel().getBlue());\n\t\tassertEquals(255, data.getChannel().getBlue().getValue());\n\t\tassertNotNull(data.getChannel().getAlpha());\n\t\tassertEquals(255, data.getChannel().getAlpha().getValue());\n\t\tassertNotNull(data.getLogicalChannel());\n\t\tassertNotNull(data.getLogicalChannel().getName());\n\t\tassertEquals(\"430\", data.getLogicalChannel().getName().getValue());\n\t}",
"@Test\n public void testSharpenABlurredImage() {\n\n IImage newImage = new Blur().applyFilter(this.checkerboard);\n\n List<List<Pixel>> result = new ArrayList<>();\n List<Pixel> row1 = new ArrayList<>();\n row1.add(new Pixel(80, 80, 80, new Posn(0, 0)));\n row1.add(new Pixel(64, 64, 64, new Posn(1, 0)));\n List<Pixel> row2 = new ArrayList<>();\n row2.add(new Pixel(64, 64, 64, new Posn(0, 1)));\n row2.add(new Pixel(80, 80, 80, new Posn(1, 1)));\n result.add(row1);\n result.add(row2);\n IImage resultImage = new Image(result, 255);\n\n assertEquals(resultImage, newImage);\n\n IImage newImage2 = new Sharpen().applyFilter(newImage);\n\n List<List<Pixel>> result2 = new ArrayList<>();\n List<Pixel> row01 = new ArrayList<>();\n row01.add(new Pixel(132, 132, 132, new Posn(0, 0)));\n row01.add(new Pixel(120, 120, 120, new Posn(1, 0)));\n List<Pixel> row02 = new ArrayList<>();\n row02.add(new Pixel(120, 120, 120, new Posn(0, 1)));\n row02.add(new Pixel(132, 132, 132, new Posn(1, 1)));\n result2.add(row01);\n result2.add(row02);\n IImage resultImage2 = new Image(result2, 255);\n\n assertEquals(resultImage2, newImage2);\n\n\n\n\n }",
"private void jMIGS_LightnessMethodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIGS_LightnessMethodActionPerformed\n // TODO add your handling code here:\n int x = img.getWidth();\n int y = img.getHeight();\n BufferedImage img2 = new BufferedImage(x, y, img.getType());\n Color clr;\n int gray, mxRGB, minRGB;\n for (int i = 0; i < x; i++) {\n for (int j = 0; j < y; j++) {\n clr = new Color(img.getRGB(i, j));\n minRGB = (clr.getRed() < clr.getGreen() && clr.getRed() < clr.getBlue()) ? clr.getRed() : ((clr.getGreen() < clr.getBlue()) ? clr.getGreen() : clr.getBlue());\n mxRGB = (clr.getRed() > clr.getGreen() && clr.getRed() > clr.getBlue()) ? clr.getRed() : ((clr.getGreen() > clr.getBlue()) ? clr.getGreen() : clr.getBlue());\n gray = (int) ((mxRGB + minRGB) / 2);\n System.out.println(clr.getRed() + \", \" + clr.getGreen() + \", \" + clr.getBlue() + \" mx=\" + mxRGB + \", min=\" + minRGB + \", gray=\" + gray);\n img2.setRGB(i, j, new Color(gray, gray, gray).getRGB());\n }\n }\n img = img2;\n jLblImage.setIcon(new ImageIcon(img));\n }",
"public static void applyAllDifferentFiltersOnImage(BufferedImage img) throws IOException {\n\t\tt.start();\n\t\tBufferedImage output = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tapplyFilter(img, output, FilterGenerator.smoothingFilter(15));\n\t\tt.end(\"Apply filter: smoothing\");\n\n\t\tt.start();\n\t\tImageIO.write(output, \"png\", new File(\"./images/output_smoothing.png\"));\n\t\tt.end(\"Write image\");\n\t\t\n\t\tt.start();\n\t\toutput = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tapplyFilter(img, output, FilterGenerator.detectEdgesLoGFilter());\n\t\tt.end(\"Apply filter: detect edges (LoG)\");\n\n\t\tt.start();\n\t\tImageIO.write(output, \"png\", new File(\"./images/output_log_edges.png\"));\n\t\tt.end(\"Write image\");\n\t\t\n\t\tt.start();\n\t\toutput = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tapplyFilter(img, output, FilterGenerator.detectVerticalEdgesSobelFilter());\n\t\tt.end(\"Apply filter: detect vertical edges (sobel)\");\n\n\t\tt.start();\n\t\tImageIO.write(output, \"png\", new File(\"./images/output_sobel_edges_v.png\"));\n\t\tt.end(\"Write image\");\n\t\t\n\t\tt.start();\n\t\toutput = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tapplyFilter(img, output, FilterGenerator.detectHorizontalEdgesSobelFilter());\n\t\tt.end(\"Apply filter: detect horizontal edges (sobel)\");\n\n\t\tt.start();\n\t\tImageIO.write(output, \"png\", new File(\"./images/output_sobel_edges_h.png\"));\n\t\tt.end(\"Write image\");\n\t\t\n\t\tt.start();\n\t\toutput = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tapplyFilter(img, output, FilterGenerator.unsharpFilter(7));\n\t\tt.end(\"Apply filter: sharpening\");\n\n\t\tt.start();\n\t\tImageIO.write(output, \"png\", new File(\"./images/output_sharpening.png\"));\n\t\tt.end(\"Write image\");\n\t}",
"@Test\n public void testChangeGrey() {\n System.out.println(\"changeGrey\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.changeGrey();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void testGetBrightnessInterval_1()\n\t\tthrows Exception {\n\t\tRGB source = new RGB(1, 1, 1);\n\t\tsource.blue = 1;\n\t\tsource.red = 1;\n\t\tsource.green = 1;\n\t\tRGB destination = new RGB(1, 1, 1);\n\t\tdestination.blue = 1;\n\t\tdestination.red = 1;\n\t\tdestination.green = 1;\n\n\t\tfloat result = ColorUtils.getBrightnessInterval(source, destination);\n\n\t\t// add additional test code here\n\t\tassertEquals(0.0f, result, 0.1f);\n\t}",
"@Test\n public void testLineGrey() {\n System.out.println(\"lineGrey\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.lineGrey();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }",
"@Test\n\t\tpublic void testPictureSample() {\n\t\t\tPixel[][] red = new Pixel[15][10];\n\t\t\tfor(int x =0; x < 15; x++) {\n\t\t\t\tfor(int y =0; y<10; y++) {\n\t\t\t\t\tif(x%2 == 0) {\n\t\t\t\t\t\tred[x][y] = new ColorPixel(1, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tred[x][y] = new GrayPixel(.5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPicture redAndGray = new MutablePixelArrayPicture(red, \"redAndGray\");\n\t\t\tIterator<Pixel> sample = redAndGray.sample(2,3, 3, 4);\n\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 7));\n\t\t\tassertFalse(sample.hasNext());\n\t\t}",
"public RGBImage makeRGBImage()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n \r\n\tshort[][] red = new short[rows][cols]; \r\n\tshort[][] green = new short[rows][cols]; \r\n\tshort[][] blue = new short[getHeight()][getWidth()]; \r\n \r\n\t@SuppressWarnings(\"unused\")\r\n\tdouble H, S, I;\r\n\tshort v1, v2, v3, h, h0, sat, intens;\r\n\tint sector;\r\n\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\r\n\t\tif (saturation[row][col] == 0)\r\n\t\t{\r\n\t\t red[row][col] = intensity[row][col];\r\n\t\t green[row][col] = intensity[row][col];\r\n\t\t blue[row][col] = intensity[row][col];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t h0 = hue[row][col];\r\n\r\n\t\t if (h0 <= (L-1)/3)\r\n\t\t {\r\n\t\t\th = (short)h0;\r\n\t\t\tsector = 1;\r\n\t\t }\r\n\t\t else if (h0 <= 2*(L-1)/3)\r\n\t\t {\r\n\t\t\th = (short)(h0 - (L-1)/3);\r\n\t\t\tsector = 2;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\th = (short)(h0 - 2*(L-1)/3);\r\n\t\t\tsector = 3;\r\n\t\t }\r\n\r\n\t\t H = h * 2 * Math.PI / (L-1);\r\n\r\n\t\t sat = saturation[row][col];\r\n\t\t S = (double)sat / (L-1);\r\n\r\n\t\t intens = intensity[row][col]; \r\n\t\t I = (double)intens / (L-1);\r\n\r\n\t\t v1 = (short)Math.round(intens * (1 - S));\r\n\t\t v1 = checkInterval (v1);\r\n\r\n\t\t v2 = (short)Math.round(intens * (1 + S * Math.cos(H)/\r\n\t\t\t\t\t\t Math.cos(Math.PI/3 - H) ));\r\n\t\t v2 = checkInterval (v2);\r\n \r\n\t\t v3 = (short)Math.round(3 * intens - (v1 + v2));\r\n\t\t v3 = checkInterval (v3);\r\n \r\n\t\t if (sector == 1)\r\n\t\t {\r\n\t\t\tblue[row][col] = v1;\r\n\t\t\tred[row][col] = v2;\r\n\t\t\tgreen[row][col] = v3;\r\n\t\t }\r\n\t\t else if (sector == 2)\r\n\t\t {\r\n\t\t\tred[row][col] = v1;\r\n\t\t\tgreen[row][col] = v2;\r\n\t\t\tblue[row][col] = v3;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\tgreen[row][col] = v1;\r\n\t\t\tblue[row][col] = v2;\r\n\t\t\tred[row][col] = v3;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n \r\n\treturn new RGBImage (red, green, blue);\r\n }",
"@Test(timeout=10000)\r\n\tpublic void testDarkGradually() throws Throwable{\n\t\tImage image1 = Utils.loadImageFromUrl(\"http://www.numark.com/images/sized/images/product_large/v7_web_large_00-624x390.jpg\");\r\n\t\tUtils.darkGradually(image1, 3);\r\n\t\tImage image2 = Utils.loadImageFromUrl(\"http://zcstar.com/wonderphoto/image/32bit.gif\");\r\n\t\tUtils.darkGradually(image2, 5);\r\n\t}",
"public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n mRgba = inputFrame.rgba();\n Imgproc.resize(mRgba, mRgba, new Size(100,100));\n // Rotate mRgba 90 degrees\n Core.transpose(mRgba, mRgbaT);\n Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);\n Core.flip(mRgbaF, mRgba, 1 );\n //Blurs for smoother edgges\n Imgproc.blur(mRgba, mRgba, new Size(8,8));\n\n //Adds the counter to the instantiation of each object as it counts the frame number\n Object blue = new Object(\"blue\", counter);\n Object green = new Object(\"green\", counter);\n Object red = new Object(\"red\", counter);\n\n Mat threshold = new Mat();\n Mat HSV = new Mat();\n //Changes from BGR to HSV as HSV allow much easier colour ranges for creating a binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_RGB2HSV);\n //Creates blue binary mat\n Core.inRange(HSV, blue.HSVMin, blue.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(blue,threshold,HSV,mRgba, blue.type, counter);\n\n //TODO disabled the green markers for now\n /*\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, green.HSVMin, green.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(green,threshold,HSV,mRgba, green.type, counter);\n */\n //creates red binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, red.HSVMin, red.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(red,threshold,HSV,mRgba, red.type, counter);\n\n //Colours the line that registers if a step has occured accordingly\n if(redGreenLine || blueGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(0, 255, 0), 2);\n }\n else if(!redGreenLine && !redGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(255, 0, 0), 2);\n }\n //Will write each frame to storage once the reoord button is pressed. This is used for setting ground truth data\n if(enableVideo) {\n Mat output = new Mat();\n Imgproc.cvtColor(mRgba, output, Imgproc.COLOR_RGB2BGR);\n Imgproc.resize(output, output, new Size(100,100));\n Imgcodecs.imwrite(fileName + BUILDING_NAME + FLOOR_NUMBER + \"(\" + startLat + \",\" + startLong + \")\" + \"to\" + \"(\" + endLat + \",\" + endLong + \")\" + Integer.toString(counter) + \".bmp\", output);\n }\n\n counter++;\n\n return mRgba; // This function must return\n }",
"public interface SpecularLightingRable extends FilterColorInterpolation {\n /**\n * Returns the source to be filtered\n */\n Filter getSource();\n\n /**\n * Sets the source to be filtered\n */\n void setSource(Filter src);\n\n /**\n * @return Light object used for the diffuse lighting\n */\n Light getLight();\n\n /**\n * @param light New Light object\n */\n void setLight(Light light);\n\n /**\n * @return surfaceScale\n */\n double getSurfaceScale();\n\n /**\n * Sets the surface scale\n */\n void setSurfaceScale(double surfaceScale);\n\n /**\n * @return specular constant, or ks.\n */\n double getKs();\n\n /**\n * Sets the specular constant, or ks\n */\n void setKs(double ks);\n\n /**\n * @return specular exponent, or kd\n */\n double getSpecularExponent();\n\n /**\n * Sets the specular exponent\n */\n void setSpecularExponent(double specularExponent);\n\n /**\n * @return the litRegion for this filter\n */\n Rectangle2D getLitRegion();\n\n /**\n * Sets the litRegion for this filter\n */\n void setLitRegion(Rectangle2D litRegion);\n\n /**\n * Returns the min [dx,dy] distance in user space for evalutation of\n * the sobel gradient.\n */\n double [] getKernelUnitLength();\n\n /**\n * Sets the min [dx,dy] distance in user space for evaluation of the\n * sobel gradient. If set to zero or null then device space will be used.\n */\n void setKernelUnitLength(double [] kernelUnitLength);\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A searcher for the image content (using the selected descriptors) | private void initEngine() {
AbstractSearcher imageSearcher = new ImageSearchEngine();
imageSearcher.setQueryProcessor(new QueryProcessorDefaultImpl());
imageSearcher.setResultProvider(new DefaultResultProvider());
imageSearcher.setIndexedObjectFactory(new ImageIndexedObjectFactory());
Set<Map.Entry<String, DescriptorExtractor>> entries = availableExtractors.entrySet();
for (Map.Entry<String, DescriptorExtractor> entry : entries) {
AbstractSearcher entrySearcher = new ParallelNBTreeSearcher();
entrySearcher.setQueryProcessor(new QueryProcessorDefaultParallelImpl());
entrySearcher.setResultProvider(new DefaultResultProvider());
entrySearcher.setIndex(new BTreeIndex(CommonInfo.CONFIG_FILE_INDEX_PATH, "image." + entry.getKey() + "DBTree", entry.getValue().getClass()));
entrySearcher.setDescriptorExtractor(entry.getValue());
imageSearcher.setSearcher("image." + entry.getKey(), entrySearcher);
}
setSearcher("image", imageSearcher);
//A searcher for the vectorial content (using the selected descriptors)
AbstractSearcher vectorialSearcher = new ParallelNBTreeSearcher();
vectorialSearcher.setQueryProcessor(new QueryProcessorDefaultParallelImpl());
vectorialSearcher.setResultProvider(new DefaultResultProvider());
vectorialSearcher.setIndex(new BTreeIndex(CommonInfo.CONFIG_FILE_INDEX_PATH, "webappVectorialDBTree", TopogeoDescriptor.class));
TopogeoDescriptorExtractor topogeoDescriptorExtractor = new TopogeoDescriptorExtractor();
vectorialSearcher.setDescriptorExtractor(topogeoDescriptorExtractor);
setSearcher("drawing", vectorialSearcher);
} | [
"public List<File> searchImagesFor(String keyword);",
"List<Image> search(String query);",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"public abstract void onContentConfused(ArrayList<ContentSelector> selectors, Bitmap confusedImage);",
"public List<ImgDescriptor> search(ImgDescriptor queryF, int k) {\n\t\tfor (int i = 0; i < descriptors.size(); i++) {\n\t\t\tdescriptors.get(i).distance(queryF);\n\t\t}\n\t\tCollections.sort(descriptors);\n\t\t\n\t\treturn descriptors.subList(0, k);\n\t}",
"int ftrScanGetFuzzyImage(Pointer ftrHandle, Pointer pBuffer);",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"private List<DMatch> doSIFT(Mat image)\n\t{\n\t\tSystem.out.println(\"SIFT with \" + image.rows() + \"x\" + image.cols() + \" image\");\n\t\t// Detect image keypoints and store them\n\t\timageKeypoints = new MatOfKeyPoint();\n\t\tdetector.detect(image, imageKeypoints);\n\t\t\n\t\tSystem.out.println(\"Found \" + imageKeypoints.rows() + \" key points in search image\");\n\t\t\n\t\t// Compute the image descriptors for each keypoint and store them\n\t\tMat imageDescriptors = new Mat();\n\t\textractor.compute(image, imageKeypoints, imageDescriptors);\n\t\t\n\t\t// Using the two descriptor Mats, identify matches between the template and the image\n\t\tList<MatOfDMatch> matches = new ArrayList<MatOfDMatch>();\n\t\tfinal int nearestNeighbors = 4;\n\t\tmatcher.knnMatch(templateDescriptors, imageDescriptors, matches, nearestNeighbors);\n\t\t\n\t\tSystem.out.println(\"Found \" + matches.size() + \" matches\");\n\t\t\n\t\tList<DMatch> goodMatches = new ArrayList<DMatch>();\n\t\tint i;\n\t\tfinal double ratio = 0.7;\n\t\tfor (i = 0; i < matches.size(); i++)\n\t\t{\n\t\t\tif (matches.get(i).toList().get(0).distance < matches.get(i).toList().get(1).distance * ratio)\n\t\t\t\tgoodMatches.add(matches.get(i).toList().get(0));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Found \" + goodMatches.size() + \" GOOD matches\");\n\t\t\n\t\treturn goodMatches;\n\t\t\t\t\n\t\t// Convert imageKeypoints and matchArray to arrays for the class\n\t\t/*this.imageKeypoints = imageKeypoints.toArray();\n\t\tDMatch[] matchArray = matches.toArray();\n\t\t\n\t\t// Sort the matches, so that the ones with the lowest distance are first\n\t\tArrays.sort(matchArray, new Comparator<DMatch>()\n\t\t\t{\n\t\t\t\tpublic int compare(DMatch match1, DMatch match2)\n\t\t\t\t{\n\t\t\t\t\tif(match1.distance < match2.distance) return -1;\n\t\t\t\t\telse if(match1.distance > match2.distance) return 1;\n\t\t\t\t\telse return 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t// Take the top 30 matches, delete the rest\n\t\tDMatch[] tmp = matchArray;\n\t\tmatchArray = new DMatch[30];\n\t\tSystem.arraycopy(tmp, 0, matchArray, 0, 30);\n\t\t\n\t\treturn matchArray;*/\n\t}",
"@Override\n protected void process(BufferedImage content) {\n DescribeImageDense<GrayU8, TupleDesc_F64> hog = HOGHelper.getHOGDescriptors(content);\n for (TupleDesc_F64 desc : hog.getDescriptions()) {\n this.cluster.addReference(desc);\n }\n }",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"private static Mat extractFeatures(String imPath) {\n\t\tMat feats = Mat.zeros(1, 324, CvType.CV_32FC1);\n\n\t\t// Read image as YCrCb\n\t\tMat im = Highgui.imread(imPath);\n\t\tImgproc.cvtColor(im, im, Imgproc.COLOR_BGR2YCrCb);\n\t\tMat ch = new Mat();\n\t\tfor (int chNo = 0; chNo < 3; chNo++) { // For each channel\n\t\t\tCore.extractChannel(im, ch, chNo);\n\t\t\t// 4 scales\n\t\t\tdouble[] sigmaVec = {0.0, 3.0, 15.0, 29.0};\n\t\t\tint scaleCtr = 0;\n\t\t\tMat chHz = new Mat(); // Horizontal features for channel.\n\t\t\tMat chVert = new Mat(); // Vertical features for channel.\n\t\t\tMat chDiag = new Mat(); // Diagonal features for channel.\n\t\t\tfor (int dCtr = 0; dCtr < sigmaVec.length; dCtr++) { // For each scale\n\t\t\t\tscaleCtr++;\n\t\t\t\tint baseIdx = chNo * 108 + (scaleCtr-1) * 27;\n\t\t\t\tCore.extractChannel(im, ch, 0);\n\t\t\t\t// Select scale through Gaussian Blurring which will be followed by\n\t\t\t\t// Edge detection (Scharr operator).\n\t\t\t\tif (dCtr != 0) {\n\t\t\t\t\tdouble sigmaX = sigmaVec[dCtr];\n\t\t\t\t\tImgproc.GaussianBlur(ch, ch, new Size(sigmaX / 3, sigmaX / 3), sigmaX);\n\t\t\t\t}\n\t\t\t\t// 3 directions (hz, vert, diag)\n\t\t\t\tMatOfDouble mean = new MatOfDouble();\n\t\t\t\tMatOfDouble stddev = new MatOfDouble();\n\t\t\t\tMoments m = new Moments();\n\n\t\t\t\t// Horizontal stats\n\t\t\t\tImgproc.Scharr(ch, chHz, ch.depth(), 1, 0);\n\n\t\t\t\tCore.meanStdDev(chHz, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chHz);\n\n\t\t\t\tfeats.put(0, baseIdx+0, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+1, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+2, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+3, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+4, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+5, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+6, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+7, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+8, m.get_mu21());\n\n\t\t\t\t// Vertical stats\n\t\t\t\tImgproc.Scharr(ch, chVert, ch.depth(), 0, 1);\n\n\t\t\t\tCore.meanStdDev(chVert, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chVert);\n\n\t\t\t\tfeats.put(0, baseIdx+9, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+10, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+11, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+12, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+13, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+14, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+15, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+16, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+17, m.get_mu21());\n\n\t\t\t\t// Diagonal stats\n\t\t\t\tImgproc.Scharr(ch, chDiag, ch.depth(), 0, 1);\n\n\t\t\t\tCore.meanStdDev(chDiag, mean, stddev);\n\t\t\t\tm = Imgproc.moments(chDiag);\n\n\t\t\t\tfeats.put(0, baseIdx+18, mean.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+19, stddev.get(0, 0));\n\t\t\t\tfeats.put(0, baseIdx+20, m.get_m00());\n\t\t\t\tfeats.put(0, baseIdx+21, m.get_mu02());\n\t\t\t\tfeats.put(0, baseIdx+22, m.get_mu03());\n\t\t\t\tfeats.put(0, baseIdx+23, m.get_mu11());\n\t\t\t\tfeats.put(0, baseIdx+24, m.get_mu12());\n\t\t\t\tfeats.put(0, baseIdx+25, m.get_mu20());\n\t\t\t\tfeats.put(0, baseIdx+26, m.get_mu21());\n\t\t\t}\n\t\t\tchHz.release();\n\t\t\tchVert.release();\n\t\t\tchDiag.release();\n\t\t}\n\n\t\tim.release();\n\t\tch.release();\n\n\t\tSystem.gc();\n\t\treturn feats;\n\t}",
"private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}",
"public String SearchContent()\n\t{\n\t\tSystem.out.println(\"Content:\" + Content);\n\t\tluc = new Lucene_fuction();\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tServletContext servletContext = ServletActionContext.getServletContext();\n\t\trequest.getSession();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\t// if the tag is empty\n\t\t\n\t\t\tArrayList<Picture> PicList = new ArrayList<>();\n\t\t\tPicList = luc.queryIndex_Content(Content);\n\t\t\trequest.setAttribute(\"PictureList\", PicList);\n\t\t\treturn \"Content_Result\";\n\t}",
"public void detectExistingImages() {\r\n detectExistingImages(imgDB);\r\n }",
"protected MatOfDMatch orbMatch(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2){\n DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.SIFT);\r\n\r\n //Detect keypoints\r\n //detector.detect(thinImg, keypoints);\r\n \r\n //Extract descriptors\r\n Mat descriptors1 = new Mat();\r\n Mat descriptors2 = new Mat();\r\n extractor.compute(img1, keypoints1, descriptors1);\r\n extractor.compute(img2, keypoints2, descriptors2);\r\n\r\n //Definition of descriptor matcher\r\n DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);\r\n //DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);\r\n\r\n //Match points of two images\r\n MatOfDMatch matches = new MatOfDMatch();\r\n matcher.match(descriptors1, descriptors2, matches);\r\n //matcher.\r\n List<DMatch> matchList = matches.toList();\r\n for(int i = 0; i < matchList.size(); i++){\r\n //System.out.println(\"Distnace: \" + matchList.get(i).distance);\r\n }\r\n System.out.println(\"Match Score: \" + matchList.size());\r\n \r\n return matches;\r\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"public void findImages() {\n\t\tElements img = pDoc.select(\"img[src~=(?i)\\\\.(png|jpe?g)]\");\t\n\t\t\n\t\t//Get the sibling image elements to eliminate Framework\n\t\tElements sImg = sDoc.select(\"img[src~=(?i)\\\\.(png|jpe?g)]\");\t\n\t\t\n\t\t//Extract the image elements from a sibling product page\n\t\tElements rImg = new Elements();\n\t\t\n\t\tfor(int n=0; n<img.size();n++) {\n\t\t\tboolean Matched = false;\n\t\t\tElement tElement = img.get(n);\n\t\t\t\n\t\t\tfor(int m=0; m<sImg.size(); m++) {\n\t\t\t\tElement sElement = sImg.get(m);\n\t\t\t\tString sElementHtml = sElement.toString();\n\t\t\t\tString tElementHtml = tElement.toString();\n\t\t\t\t\n\t\t\t\tif(sElementHtml.equalsIgnoreCase(tElementHtml)) \n\t\t\t\t\tMatched = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(!Matched)\n\t\t\t\trImg.add(tElement);\n\t\t}\n\t}",
"public List<ImageThumbnail> getImageThumbnails(String searchConstraints){\n //Places markers on treeItems.\n getFileMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n //Places markers on treeItems.\n getTagsMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n\n //Filters images based on search constraint\n return getFiles()\n .stream()\n .map(this::procureImageThumbnail)\n .filter(imageThumbnail -> imageThumbnail.getImageView().getId().contains(searchConstraints) ||\n IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getTags().toString().contains(searchConstraints)\n || IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getMetadata().toString().contains(searchConstraints))\n .collect(Collectors.toList());\n }",
"DetectionResult getObjInImage(Mat image);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a command to open the gripper to the buffer. If using a different setup, change the command with setGripperOpenCommand("blah blah"); | public void openGripper(){
buffer += gripperOpenCommand;
} | [
"public void setGripperCloseCommand(String cmd){\r\n\t\tgripperCloseCommand = cmd + \"\\n\";\r\n\t}",
"public void closeGripper(){\r\n\t\tbuffer += gripperCloseCommand;\r\n\t}",
"private void handleOpenChevron(DocumentCommand docCommand) {\n\t\tdocCommand.text += \">\";\n\t\tdocCommand.shiftsCaret = false;\n\t\tdocCommand.caretOffset = docCommand.offset + 1;\n\t}",
"public void setHasGrip(boolean val) {\n hasGrip = val;\n }",
"public OpenCommand(UiActionOption uiActionOption) {\n requireNonNull(uiActionOption);\n\n this.uiActionOption = uiActionOption;\n }",
"private void addGalleryCommand(FlamingoCommand command) {\n JCommandToggleButton button = (JCommandToggleButton) command.buildButton();\n button.getActionModel().addChangeListener(new ChangeListener() {\n boolean wasRollover = false;\n\n @Override\n public void stateChanged(ChangeEvent e) {\n boolean isRollover = button.getActionModel().isRollover();\n if (wasRollover && !isRollover) {\n if (galleryModel != null) {\n galleryModel.cancelPreview(command);\n }\n }\n if (!wasRollover && isRollover) {\n if (galleryModel != null) {\n galleryModel.activatePreview(command);\n }\n }\n wasRollover = isRollover;\n }\n });\n\n this.buttons.add(button);\n this.buttonSelectionGroup.add(button);\n this.commands.add(command);\n button.setDisplayState(this.buttonDisplayState);\n\n super.add(button);\n }",
"private void initializeExplorerCommands() {\n\t\tthis.commands.add(new GUICmdGraphMouseMode(\"Transforming\",\n\t\t\t\t\"GUICmdGraphMouseMode.Transforming\", this.hydraExplorer,\n\t\t\t\tModalGraphMouse.Mode.TRANSFORMING));\n\t\tthis.commands.add(new GUICmdGraphMouseMode(\"Picking\",\n\t\t\t\t\"GUICmdGraphMouseMode.Picking\", this.hydraExplorer,\n\t\t\t\tModalGraphMouse.Mode.PICKING));\n\t\tthis.commands.add(new GUICmdGraphRevert(\"Revert to Selected\",\n\t\t\t\tGUICmdGraphRevert.DEFAULT_ID, this.hydraExplorer));\n\t}",
"public OpenCommand(final String path, final SpreadsheetView target) {\n this.target = target;\n this.path = path;\n }",
"@Override\r\n\tpublic void windowOpened(WindowEvent e) \r\n\t{\n\t\tShellFrame.commandArea.requestFocus();\r\n\t}",
"public void setGripperSocket(@Nullable CRCLSocket gripperSocket) {\n this.gripperSocket = gripperSocket;\n }",
"protected void setGripperState(int grip) {\r\n if(grip == KSGripperStates.GRIP_OPEN)\r\n gripperState = grip;\r\n else if(grip == KSGripperStates.GRIP_CLOSED)\r\n gripperState = grip;\r\n }",
"private void setGoCommand() {\n myCanvas.removeCommand(myPauseCommand);\n myCanvas.removeCommand(myNewCommand);\n myCanvas.addCommand(myGoCommand);\n }",
"private Command createPopCommand() {\n\t\treturn new PopCommand();\n\t}",
"public void open() {\n\t\tensureGuiCreated();\n\t\tensureGuiNotOpen();\n\t\topen = true;\n\t}",
"public String createBattleOpenedCommand() {\n \t\treturn createBattleOpenedCommandEx(false);\n \t}",
"public void close_gripper () {\n closed = true;\n\n\n }",
"String ideOpen(String fileName, String className, Integer line, Integer column) throws Exception;",
"public void addCommand(Command cmd, int offset) {\n\t\tmenuBar.addCommand(cmd, offset);\n\t}",
"private void nextGrip()\n {\n gripArrayIndex++;\n setGrip();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use DeleteCourseVideoRequest.newBuilder() to construct. | private DeleteCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private DeleteCourseVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"void delete(String courseId);",
"public void deleteVideo(Video video) throws Exception {\n\t\t\n\t}",
"private CreateCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GetCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void deleteCourse(Course course);",
"private ModifyCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@ApiOperation(value = \"Delete a course\",\n response = void.class)\n @ApiResponses(value = {@ApiResponse(code = 200,\n message = \"Course Deleted\",\n response = void.class),\n @ApiResponse(code = 500,\n message = \"Could Not Delete Course\",\n response = ErrorDetail.class)})\n\n @DeleteMapping(\"/courses/{courseid}\")\n public ResponseEntity<?> deleteCourseById(\n // Adding custom swagger params for delete course\n @ApiParam(value = \"Course Id\",\n required = true,\n example = \"1\")\n @PathVariable long courseid)\n {\n courseService.delete(courseid);\n return new ResponseEntity<>(HttpStatus.OK);\n }",
"private SearchCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private CreateCourseVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ViewCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GetCourseVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static RestCall<Void> deleteCourseMeeting(String courseId, String meetingId) {\n return RestCallBuilder\n .start(new TypeToken<Void>() {})\n .delete()\n .url(\"/learn/api/public/v1/courses/{courseId}/meetings/{meetingId}\")\n .pathParam(\"courseId\", courseId)\n .pathParam(\"meetingId\", meetingId)\n .build();\n }",
"private ModifyCourseVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private SearchGoodCourseVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n\tpublic void deleteCourse() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tadminDAO.showcourses();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tlogger.info(\"Please enter CourseId to be deleted from the above list\");\n\t\t\tint x = sc.nextInt();\n\t\t\tboolean res = adminDAO.deleteCourse(x);\n\t\t\tif(res==false)\n\t\t\t\tthrow new AdminCRSException(\"Failed to Delete Course\");\n\t\t\tlogger.info(\"====================================\");\n\t\t\tlogger.info(\"Delete Course Status : \" + res);\n\t\t\tlogger.info(\"====================================\");\n\t\t} catch (AdminCRSException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}",
"public void deleteAndUpdate(String course)\n {\n \tif(this.course.equalsIgnoreCase(course))\n \t{\n \t\tSystem.out.println(\"\\ndeleting course : \" + course);\n \t\tthis.setCourse(\"\");\n \t}\n }",
"public void removeCourse(String course);",
"private SearchCourseVideoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__GUARD__Group__0" $ANTLR start "rule__GUARD__Group__0__Impl" InternalDsl.g:11084:1: rule__GUARD__Group__0__Impl : ( ( rule__GUARD__ExprAssignment_0 ) ) ; | public final void rule__GUARD__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:11088:1: ( ( ( rule__GUARD__ExprAssignment_0 ) ) )
// InternalDsl.g:11089:1: ( ( rule__GUARD__ExprAssignment_0 ) )
{
// InternalDsl.g:11089:1: ( ( rule__GUARD__ExprAssignment_0 ) )
// InternalDsl.g:11090:2: ( rule__GUARD__ExprAssignment_0 )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getGUARDAccess().getExprAssignment_0());
}
// InternalDsl.g:11091:2: ( rule__GUARD__ExprAssignment_0 )
// InternalDsl.g:11091:3: rule__GUARD__ExprAssignment_0
{
pushFollow(FOLLOW_2);
rule__GUARD__ExprAssignment_0();
state._fsp--;
if (state.failed) return ;
}
if ( state.backtracking==0 ) {
after(grammarAccess.getGUARDAccess().getExprAssignment_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__AssignmentExpression__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9471:1: ( rule__AssignmentExpression__Group_0__1__Impl )\n // InternalReflex.g:9472:2: rule__AssignmentExpression__Group_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5353:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5354:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__011312);\n rule__XAssignment__Group_1_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17420:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17421:2: rule__XAssignment__Group_1_1_0__0__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__035351);\r\n rule__XAssignment__Group_1_1_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__GUARD__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11076:1: ( rule__GUARD__Group__0__Impl rule__GUARD__Group__1 )\n // InternalDsl.g:11077:2: rule__GUARD__Group__0__Impl rule__GUARD__Group__1\n {\n pushFollow(FOLLOW_54);\n rule__GUARD__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__GUARD__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5106:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5107:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__010825);\n rule__XAssignment__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__010828);\n rule__XAssignment__Group_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:5553:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\r\n // InternalDroneScript.g:5554:2: rule__XAssignment__Group_1_1_0__0__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XAssignment__Group_1_1_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3747:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3748:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__08058);\n rule__XAssignment__Group_1_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AssignmentExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9402:1: ( ( ( rule__AssignmentExpression__Group_0__0 )? ) )\n // InternalReflex.g:9403:1: ( ( rule__AssignmentExpression__Group_0__0 )? )\n {\n // InternalReflex.g:9403:1: ( ( rule__AssignmentExpression__Group_0__0 )? )\n // InternalReflex.g:9404:2: ( rule__AssignmentExpression__Group_0__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getAssignmentExpressionAccess().getGroup_0()); \n }\n // InternalReflex.g:9405:2: ( rule__AssignmentExpression__Group_0__0 )?\n int alt62=2;\n int LA62_0 = input.LA(1);\n\n if ( (LA62_0==RULE_ID) ) {\n int LA62_1 = input.LA(2);\n\n if ( ((LA62_1>=47 && LA62_1<=56)) ) {\n alt62=1;\n }\n }\n switch (alt62) {\n case 1 :\n // InternalReflex.g:9405:3: rule__AssignmentExpression__Group_0__0\n {\n pushFollow(FOLLOW_2);\n rule__AssignmentExpression__Group_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getAssignmentExpressionAccess().getGroup_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17173:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17174:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__034864);\r\n rule__XAssignment__Group_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__034867);\r\n rule__XAssignment__Group_0__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4456:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4457:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__09499);\n rule__XAssignment__Group_1_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GUARD__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11141:1: ( ( ( rule__GUARD__SequenceAssignment_2 ) ) )\n // InternalDsl.g:11142:1: ( ( rule__GUARD__SequenceAssignment_2 ) )\n {\n // InternalDsl.g:11142:1: ( ( rule__GUARD__SequenceAssignment_2 ) )\n // InternalDsl.g:11143:2: ( rule__GUARD__SequenceAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGUARDAccess().getSequenceAssignment_2()); \n }\n // InternalDsl.g:11144:2: ( rule__GUARD__SequenceAssignment_2 )\n // InternalDsl.g:11144:3: rule__GUARD__SequenceAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__GUARD__SequenceAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGUARDAccess().getSequenceAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4209:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4210:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__09012);\n rule__XAssignment__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__09015);\n rule__XAssignment__Group_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5364:1: ( ( ( rule__XAssignment__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5365:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5365:1: ( ( rule__XAssignment__Group_1_1_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5366:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5367:1: ( rule__XAssignment__Group_1_1_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5367:2: rule__XAssignment__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__0_in_rule__XAssignment__Group_1_1_0__0__Impl11339);\n rule__XAssignment__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3477:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3478:2: rule__XAssignment__Group_1_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0__0__Impl_in_rule__XAssignment__Group_1_1_0__07308);\n rule__XAssignment__Group_1_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_1_1_0_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17481:1: ( rule__XAssignment__Group_1_1_0_0__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17482:2: rule__XAssignment__Group_1_1_0_0__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__1__Impl_in_rule__XAssignment__Group_1_1_0_0__135471);\r\n rule__XAssignment__Group_1_1_0_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Assignment__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:3014:1: ( rule__Assignment__Group__0__Impl rule__Assignment__Group__1 )\n // InternalMGPL.g:3015:2: rule__Assignment__Group__0__Impl rule__Assignment__Group__1\n {\n pushFollow(FOLLOW_11);\n rule__Assignment__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Assignment__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3230:1: ( rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3231:2: rule__XAssignment__Group_0__0__Impl rule__XAssignment__Group_0__1\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_0__0__Impl_in_rule__XAssignment__Group_0__06821);\n rule__XAssignment__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1_in_rule__XAssignment__Group_0__06824);\n rule__XAssignment__Group_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XAssignment__Group_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17204:1: ( rule__XAssignment__Group_0__1__Impl rule__XAssignment__Group_0__2 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17205:2: rule__XAssignment__Group_0__1__Impl rule__XAssignment__Group_0__2\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__1__Impl_in_rule__XAssignment__Group_0__134925);\r\n rule__XAssignment__Group_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XAssignment__Group_0__2_in_rule__XAssignment__Group_0__134928);\r\n rule__XAssignment__Group_0__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XAssignment__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5414:1: ( rule__XAssignment__Group_1_1_0_0__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5415:2: rule__XAssignment__Group_1_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XAssignment__Group_1_1_0_0__1__Impl_in_rule__XAssignment__Group_1_1_0_0__111432);\n rule__XAssignment__Group_1_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a List of "author" elements | java.util.List<java.lang.String> getAuthorList(); | [
"List<String> getRevisionAuthors();",
"public List getAuthors()\n\t\t{\n\t\t\treturn m_authors;\n\t\t}",
"public List<String> getAuthorNames() {\n return authorNames;\n }",
"public Author[] getAuthors() {\n return authors;\n }",
"public String getListOfAuthors() {\n if (copyOfBook != null) return copyOfBook.getListOfAuthors();\n if (listOfAuthors == null)\n listOfAuthors = Helper.concatenateList(\" & \", getAuthors(), \"getDisplayName\");\n return listOfAuthors;\n }",
"java.util.List<org.apache.xmlbeans.XmlString> xgetAuthorList();",
"@Xml(format=COLLAPSED, childName=\"author\")\r\n\tpublic List<Person> getAuthors() {\r\n\t\treturn authors;\r\n\t}",
"public List<Author> selectAllAuthors();",
"List<BlogUser> getAuthors() throws DAOException;",
"protected List<String> getCoAuthorList(String authorName){\r\n\t\tString centerNode = authorName; \r\n\t\tList<String> coAu = null;\r\n\t\ttry{\r\n\t\t\tcoAu = backend.getCoauthors(centerNode);\r\n\t\t} catch (RemoteException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn coAu;\r\n\t}",
"public List<Author> getAll(){\r\n \tList<Author> authors = daoSession.getAuthorDao().queryBuilder()\r\n \t\t\t.where(Properties.Id.isNotNull())\r\n \t\t\t.orderAsc(Properties.Surname)\r\n \t\t\t.list();\r\n \treturn authors;\r\n }",
"@Override\n\tpublic List<String> getAllAuthors() {\n\t\treturn WebscrapperUtil.getAllAuthors();\n\t}",
"public org.hl7.fhir.ResourceReference[] getAuthorArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(AUTHOR$16, targetList);\n org.hl7.fhir.ResourceReference[] result = new org.hl7.fhir.ResourceReference[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"java.lang.String getAuthors(int index);",
"public List applyAuthorRule () {\n\t\treturn authors;\n\t}",
"public ReactorResult<A_0> getAllbiboListofauthors_as() {\n\t\treturn Base.getAll_as(this.model, this.getResource(), LISTOFAUTHORS, A_0.class);\n\t}",
"public List<org.ehealth_connector.common.Author> getAuthors(Bundle bundle) {\n\t\tfinal List<org.ehealth_connector.common.Author> retVal = new ArrayList<org.ehealth_connector.common.Author>();\n\t\tfor (final Entry entry : bundle.getEntry()) {\n\t\t\tfinal List<ExtensionDt> extensions = entry\n\t\t\t\t\t.getUndeclaredExtensionsByUrl(FhirCommon.urnUseAsAuthor);\n\t\t\tif (!extensions.isEmpty()) {\n\t\t\t\torg.ehealth_connector.common.Author author = null;\n\t\t\t\tif (entry.getResource() instanceof Person) {\n\t\t\t\t\tauthor = FhirCommon.getAuthor((Person) entry.getResource());\n\t\t\t\t}\n\t\t\t\tif (entry.getResource() instanceof Organization) {\n\t\t\t\t\tauthor = FhirCommon.getAuthor((Organization) entry.getResource());\n\t\t\t\t}\n\n\t\t\t\tfinal StringDt timeStamp = ((StringDt) extensions.get(0).getValue());\n\t\t\t\tauthor.setTime(DateUtil.parseDates(timeStamp.getValue()));\n\t\t\t\tretVal.add(author);\n\t\t\t}\n\t\t}\n\t\treturn retVal;\n\t}",
"public com.walgreens.rxit.ch.cda.POCDMT000040Author[] getAuthorArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(AUTHOR$26, targetList);\n com.walgreens.rxit.ch.cda.POCDMT000040Author[] result = new com.walgreens.rxit.ch.cda.POCDMT000040Author[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"protected void makeAuthorList()\n\t{\n\t\tString authorfile=StaticData.SOPostData+\"/post-author-editor.txt\";\n\t\tHashSet<Integer> userset=new HashSet<>();\n\t\ttry {\n\t\t\tScanner scanner=new Scanner(new File(authorfile));\n\t\t\twhile(scanner.hasNextLine()){\n\t\t\t\tString line=scanner.nextLine();\n\t\t\t\tString[] parts=line.split(\"\\\\s+\");\n\t\t\t\ttry{\n\t\t\t\t\tint author=Integer.parseInt(parts[1].trim());\n\t\t\t\t\tuserset.add(author);\n\t\t\t\t\tint editor=Integer.parseInt(parts[2].trim());\n\t\t\t\t\tuserset.add(editor);\n\t\t\t\t}catch(Exception exc){\n\t\t\t\t}\n\t\t\t}\n\t\t\tscanner.close();\n\t\t\t//now showing the users\n\t\t\tfor(int id:userset){\n\t\t\t\tSystem.out.println(id+\",\");\n\t\t\t}\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the HTTP constraint. | public ServletSecurityMetaData setHttpConstraint(HttpConstraintMetaData httpConstraint) {
this.httpConstraint = httpConstraint;
return this;
} | [
"public void setConstraint(int constraint) {\n mConstraint = constraint;\n }",
"public HttpConstraintMetaData getHttpConstraint() {\n return this.httpConstraint;\n }",
"private void setRestrictiveConstraint (int restriction)\r\n\t{\r\n\t\t// Keep the modifiers.\r\n\t\tconstraints &= TextField.CONSTRAINT_MASK;\r\n\t\t\r\n\t\t// Set the restrictive value.\r\n\t\tconstraints |= restriction; \r\n\t\t\r\n\t\tinvalidate();\r\n\t}",
"public void setConstraint(ConOp lc);",
"public ServletSecurityMetaData addHttpMethodConstraint(HttpMethodConstraintMetaData constraint) {\n this.httpMethodConstraints.add(constraint);\n return this;\n }",
"public void setConstraints(Object constraints)\n {\n this.constraints = constraints;\n }",
"public HttpRequestPreconditions setIfMatch(List<String> ifMatch)\n throws IllegalArgumentException {\n this.ifMatch = ifMatch;\n validate();\n return this;\n }",
"public void addConstraint(String field, String value) {\n\t query.addQueryParam(field,value);\n\t}",
"private void applyConstraints() {\n\n String ce = _request.getQueryString();\n _constraintExpression = new ConstraintExpression(ce); \n \n for (Constraint constraint : _constraintExpression.getConstraints()) { //will be empty if no CE was defined\n constraint.constrain(this);\n }\n }",
"public void setHttpEquiv(String newValue);",
"public void setRestriction(AttributeCapacityConstraint restriction) {\r\n\t\tthis.restriction = restriction;\r\n\t}",
"public void setConstraintSet(ConstraintSet set) {\n mConstraintSet = set;\n }",
"public void setConstrainHeader ( Boolean constrainHeader ) {\r\n\t\tgetStateHelper().put(PropertyKeys.constrainHeader, constrainHeader);\r\n\t\thandleAttribute(\"constrainHeader\", constrainHeader);\r\n\t}",
"@Override\n\tprotected void getConstraintFromNetlistConstraintFile() {\n\n\t}",
"public HttpRequest<T> put() {\n\t\tthis.verb = \"PUT\";\n\t\treturn this;\n\t}",
"public void setConstraintWeight(double weight) {\n opensimSimulationJNI.AssemblySolver_setConstraintWeight(swigCPtr, this, weight);\n }",
"private void setChangeHeadpicReq(ChangeHeadpic.Req value) {\n if (value == null) {\n throw new NullPointerException();\n }\n req_ = value;\n reqCase_ = 13;\n }",
"void addConstrainingElement(Object handle, Object constraint);",
"public ElementDefinitionDt setConstraint(java.util.List<Constraint> theValue) {\n\t\tmyConstraint = theValue;\n\t\treturn this;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the LLcalculator for the Sentence grammar. | @Test
public void testSentenceOrig() {
Grammar g = Grammars.makeSentence();
// Without the last (recursive) rule, the grammar is LL-1
assertTrue(createCalc(g).isLL1());
} | [
"@Test\n\tpublic void testSentenceOrigLL1() {\n\t\t// Without the last (recursive) rule, the grammar is LL-1\n\t\tassertTrue(createCalc(sentenceG).isLL1());\n\t}",
"@Test\n public void TestTranslatorFromSentence()\n {\n System.out.println(\"--- translate word from sentence ---\");\n \n Translator translator = new Translator();\n \n String returnedWordFromSentence ;\n\treturnedWordFromSentence = translator.translateFromSentence(\"raw\", POS.ADJECTIVE ,\"The meat is raw\");\n \n\tSystem.out.println(returnedWordFromSentence);\n \n checkIfContainsTranslation(\"crud\",returnedWordFromSentence);\n /*\n\treturnedWordFromSentence = translator.translateFromSentence(\"shadow\",POS.NOUN,\"I see this trees' shadow\");\n \n\tSystem.out.println(returnedWordFromSentence);\n \n //checkIfContainsTranslation(\"umbră\",returnedWordFromSentence);\n \n\treturnedWordFromSentence = translator.translateFromSentence(\"walk\",POS.VERB,\"I walk on my way home\");\n \n\tSystem.out.println(returnedWordFromSentence);\n \n //checkIfContainsTranslation(\"a merge pe jos\",returnedWordFromSentence);\n \n\treturnedWordFromSentence = translator.translateFromSentence(\"eat\",POS.VERB,\"I eat an apple\");\n \n\tSystem.out.println(returnedWordFromSentence);\n \n //checkIfContainsTranslation(\"a mânca\",returnedWordFromSentence);\n \n\treturnedWordFromSentence = translator.translateFromSentence(\"Shadow\",POS.NOUN,\"I see my Shadow at dawn\");\n \n\tSystem.out.println(returnedWordFromSentence);\n */\n //checkIfContainsTranslation(\"umbră\",returnedWordFromSentence);\n }",
"@Test\n public void toSentencesExample1Test() throws IOException, SentenceParserException {\n\n String correctResult = SentenceParserTest.fileToString(\"1-correct.txt\");\n String testResult = SentenceParserTest.fileToTestResult(\"1-test.txt\");\n\n Assert.assertEquals(correctResult, testResult);\n }",
"public void testLexAndParse() throws Exception{\n\n // Parse the test file\n String source = testFile.getAbsolutePath();\n try\n {\n lexer.setCharStream(new ANTLRFileStream(source, \"UTF8\"));\n\n // Using the lexer as the token source, we create a token\n // stream to be consumed by the parser\n //\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n assertNotNull(\"Token passed by lexer must not be null\", tokens);\n\n // Now we need an instance of our parser\n //\n SnomedExpressionParser parser = new SnomedExpressionParser(tokens);\n assertNotNull(\"Parser must not be null\", parser);\n\n // Provide some user feedback\n //\n logger.info(\" Lexer Start\");\n long start = System.currentTimeMillis();\n tokens.LT(1);\n long lexerStop = System.currentTimeMillis();\n logger.info(\" Lexed in \" + (lexerStop - start) + \"ms.\");\n\n // And now we merely invoke the start rule for the parser\n //\n logger.info(\" Parser Start\");\n long pStart = System.currentTimeMillis();\n SnomedExpressionParser.snomed_return parserReturn = parser.snomed();\n assertNotNull(\"Parser return must not be null null\", parserReturn);\n long stop = System.currentTimeMillis();\n logger.info(\" Parsed in \" + (stop - pStart) + \"ms.\");\n\n // Pick up the generic tree\n //\n CommonTree t = (CommonTree)parserReturn.getTree();\n assertNotNull(\"AST must not be null\", t);\n String treeOutput = t.toStringTree();\n assertNotNull(\"Tree output must not be null\", t);\n logger.info(\"treeOutput = \" + treeOutput);\n\n CommonTreeNodeStream nodes = new CommonTreeNodeStream(t);\n nodes.setTokenStream(tokens);\n assertNotNull(\"Node stream must not be null\", nodes);\n\n // NOw walk it with the generic tree walker, which does nothing but\n // verify the tree really.\n //\n try\n {\n if (parser.getNumberOfSyntaxErrors() == 0) {\n SnomedExpressionTree walker = new SnomedExpressionTree(nodes, testTerminologyDAO);\n assertNotNull(\"Expression tree must not be null\", walker);\n logger.info(\" AST Walk Start\\n\");\n pStart = System.currentTimeMillis();\n AbstractExpressionWithFocusConcepts returnedExpression = walker.expression();\n assertNotNull(\"Returned expression must not be null\", returnedExpression);\n logger.info(\"returnedExpression = \" + returnedExpression);\n stop = System.currentTimeMillis();\n logger.info(\"\\n AST Walked in \" + (stop - pStart) + \"ms.\");\n }\n\n // output tree to a graphics file using DOT\n if (tokens.size() < 4096)\n {\n // Use the ANLTR built in dot generator\n //\n DOTTreeGenerator gen = new DOTTreeGenerator();\n assertNotNull(\"DOT generator must not be null\", gen);\n source = source.substring(0, source.length()-3);\n String outputName = source + \"dot\";\n logger.info(\" Producing AST dot (graphviz) file\");\n\n StringTemplate st = gen.toDOT(t, new CommonTreeAdaptor());\n assertNotNull(\"String template must not be null\", st);\n // Create the output file and write the dot spec to it\n //\n FileWriter outputStream = new FileWriter(outputName);\n outputStream.write(st.toString());\n outputStream.close();\n\n// // Invoke dot to generate a .png file\n// //\n// logger.info(\" Producing png graphic for tree\");\n// pStart = System.currentTimeMillis();\n// Process proc = Runtime.getRuntime().exec(\"dot -Tpng -o\" + source + \"png \" + outputName);\n// proc.waitFor();\n// File dotFile = new File(SnomedExpressionParserTest.class.getResource(\"test-expression.png\").toURI());\n// assertTrue(\"File must exist\", dotFile.exists());\n// stop = System.currentTimeMillis();\n// logger.info(\" PNG graphic produced in \" + (stop - pStart) + \"ms.\");\n }\n }\n catch(Exception e)\n {\n logger.warn(\"AST Walk caused an error. Nested exception is : \" + e.fillInStackTrace());\n }\n }\n catch (FileNotFoundException ex)\n {\n // The file we tried to parse does not exist\n //\n logger.warn(\"\\n !!The file \" + source + \" does not exist!!\\n\");\n }\n catch (Exception ex)\n {\n // Something went wrong in the parser, report this\n logger.warn(\"Parser threw an exception. Nested exception is : \" + ex.fillInStackTrace());\n }\n }",
"@Test\n public void test06() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n assertNotNull(lovinsStemmer0);\n \n String string0 = lovinsStemmer0.stemString(\"proceeding o he sixteenth interationl4ctferenc( on machite learnbex\");\n assertEquals(\"proceed o he sixteenth interationl4ctferenc( on machit learnbic\", string0);\n assertNotNull(string0);\n }",
"@Test \n\tpublic void testProcessTextWithFewSentences() {\n\t\tString testString = \"<html><head></head><body>Yeast cakes are the oldest and are very similar to yeast breads.\\n Such cakes are often very traditional in form, and include such pastries as babka and stollen.</body></html>\";\n\t\tString testSource = \"Cake - Wikipedia, the free encyclopedia - Mozilla Firefox\";\n\t\tString testURL = \"http://www.wikipedia.com\";\n\t\ttry{\n\t\t\tProcessedText testText = nlpManager.processText(testString,testSource, testURL);\n\t\t\tisTextNull(testText);\n\t\t\tisSourceCorrect(testText,testSource, testURL);\n\t\t\tisParagraphCountCorrect(testText,1);\n\t\t\tisSentenceCountCorrent(testText.getParagraphs().get(0),2);\n\t\t\tisSentencePresent(testText.getParagraphs().get(0),\"Yeast cakes are the oldest and are very similar to yeast breads.\");\n\t\t\tisSentencePresent(testText.getParagraphs().get(0),\"Such cakes are often very traditional in form, and include such pastries as babka and stollen.\");\n\t\t\tisSentenceAbsent(testText.getParagraphs().get(0),\"Such cakes are often very traditional in form, and include such pastries as babka and stollen\");\n\t\t} \n\t\tcatch (GateException ex) {\n\t\t\tfail(\"GATE Exception Raised\");\n\t\t}\n\t}",
"private static void testAssemblePhrase() {\n\t\tboolean error = false;\n\n\t\tString[] words = { \"This\", \"is a\", \"sentence\" };\n\t\tString sentence = Eliza.assemblePhrase(words);\n\t\tString expectedSentence = \"This is a sentence\";\n\n\t\tif (!sentence.equals(expectedSentence)) {\n\t\t\terror = true;\n\t\t\tSystem.out.println(\"testAssembleSentence 1 failed '\" + sentence + \"'\");\n\t\t}\n\n\t\t// additional test suggestions:\n\t\t// what should happen if an array with no strings in it is passed in?\n\t\t// what should happen if just a list of words, with no internal spaces, is\n\t\t// passed in?\n\n\t\tif (error) {\n\t\t\tSystem.err.println(\"testAssemblePhrase failed\");\n\t\t} else {\n\t\t\tSystem.out.println(\"testAssemblePhrase passed\");\n\t\t}\n\t}",
"@Test\n public void questionExclamatoryMarkSentences() throws IOException, SentenceParserException {\n\n String correctResult = SentenceParserTest.fileToString(\"3-correct.txt\");\n String testResult = SentenceParserTest.fileToTestResult(\"3-test.txt\");\n\n Assert.assertEquals(correctResult, testResult);\n }",
"@Test\n public void stringAnalyzerTest_Desc()\n {\n String testString = \"I wonder where Waldo is? Do you know? I do.\";\n \n List<EllisonWordStat> exp = new ArrayList<>();\n \n exp.add(new EllisonWordStat(\"DO\", 2));\n exp.add(new EllisonWordStat(\"I\", 2));\n exp.add(new EllisonWordStat(\"YOU\", 1));\n exp.add(new EllisonWordStat(\"WHERE\", 1));\n exp.add(new EllisonWordStat(\"IS\", 1));\n exp.add(new EllisonWordStat(\"KNOW\", 1));\n exp.add(new EllisonWordStat(\"WONDER\", 1));\n exp.add(new EllisonWordStat(\"WALDO\", 1));\n \n EllisonTextAnalyzer eta = new EllisonTextAnalyzer();\n boolean isAscending = false;\n List<EllisonWordStat> act = eta.analyzeString(testString, isAscending);\n \n assertEquals(exp.size(), act.size());\n \n for (int i = 0; i < act.size(); i++)\n {\n assertEquals(exp.get(i).getWord(), act.get(i).getWord()); \n assertEquals(exp.get(i).getFrequency(), act.get(i).getFrequency());\n }\n }",
"@Test\n public void TestTranslatorFromDefinition()\n {\n \n System.out.println(\"--- translate word from definition ---\");\n \n String returnedWordFromDefinition ;\n \n Translator translator = new Translator();\n /*\n\treturnedWordFromDefinition = translator.translateFromDefinition(\"apple\",POS.NOUN,\"round red fruit\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n //checkIfContainsTranslation(\"măr\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"lamp\",POS.NOUN,\"a device for giving light\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n //checkIfContainsTranslation(\"lampă\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"beautiful\",POS.ADJECTIVE,\"pleasing the senses or mind aesthetically\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n //checkIfContainsTranslation(\"frumos\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"sun\",POS.NOUN,\"star\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n //checkIfContainsTranslation(\"soare\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"Sun\",POS.NOUN,\"star\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n //checkIfContainsTranslation(\"soare\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"illuminate\",POS.VERB,\"to light up\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n */\n //checkIfContainsTranslation(\"a lumina\",returnedWordFromDefinition);\n \n\treturnedWordFromDefinition = translator.translateFromDefinition(\"SUN\",POS.NOUN,\"STAR\");\n \n\tSystem.out.println(returnedWordFromDefinition);\n \n checkIfContainsTranslation(\"soare\",returnedWordFromDefinition);\n }",
"public interface LLkGrammarAnalyzer extends GrammarAnalyzer {\n\n\n public boolean deterministic(AlternativeBlock blk);\n\n public boolean deterministic(OneOrMoreBlock blk);\n\n public boolean deterministic(ZeroOrMoreBlock blk);\n\n public Lookahead FOLLOW(int k, RuleEndElement end);\n\n public Lookahead look(int k, ActionElement action);\n\n public Lookahead look(int k, AlternativeBlock blk);\n\n public Lookahead look(int k, BlockEndElement end);\n\n public Lookahead look(int k, CharLiteralElement atom);\n\n public Lookahead look(int k, CharRangeElement end);\n\n public Lookahead look(int k, GrammarAtom atom);\n\n public Lookahead look(int k, OneOrMoreBlock blk);\n\n public Lookahead look(int k, RuleBlock blk);\n\n public Lookahead look(int k, RuleEndElement end);\n\n public Lookahead look(int k, RuleRefElement rr);\n\n public Lookahead look(int k, StringLiteralElement atom);\n\n public Lookahead look(int k, SynPredBlock blk);\n\n public Lookahead look(int k, TokenRangeElement end);\n\n public Lookahead look(int k, TreeElement end);\n\n public Lookahead look(int k, WildcardElement wc);\n\n public Lookahead look(int k, ZeroOrMoreBlock blk);\n\n public Lookahead look(int k, String rule);\n\n public void setGrammar(Grammar g);\n\n public boolean subruleCanBeInverted(AlternativeBlock blk, boolean forLexer);\n}",
"@Test\n public void parserTest() {\n assertTrue(parser.parse(\"abecd\").isSuccess());\n assertTrue(parser.parse(\"aabecdd\").isSuccess());\n assertTrue(parser.parse(\"aabbeccdd\").isSuccess());\n assertTrue(parser.parse(\"aaabbeccddd\").isSuccess());\n\n // is NOT accepted by grammar\n assertFalse(parser.parse(\"aaabecdd\").isSuccess());\n assertFalse(parser.parse(\"abeccd\").isSuccess());\n assertFalse(parser.parse(\"abbecd\").isSuccess());\n assertFalse(parser.parse(\"abeecd\").isSuccess());\n }",
"@Test\r\n public void lyricsTest() {\n String input = \"X: 3 \\n T:Piece No.3 \\n M:3/4 \\n L:1/8 \\n Q:1/8=100 \\n K: C \\n \"\r\n + \"z4 D2 | G4 BG |] \\n w: * A 2 | ma-zing2 | \\n \";\r\n verifyLexer(input,\r\n new String[] { \"X: 3 \\n\", \"T:Piece No.3 \\n\", \"M:3/4 \\n\", \"L:1/8 \\n\", \"Q:1/8=100 \\n\", \"K: C \\n\", \"z4\",\r\n \"D2\", \"|\", \"G4\", \"B\", \"G\", \"|]\", \"\\n\", \"w: * A 2 | ma-zing2 | \\n\"\r\n });\r\n }",
"@Test\n\tpublic void test() {\n\t\tString thePath =\"./evals/Evaluaciones.txt\";\n\t\tReader r;\n\t\ttry {\n//\t\t\tr = new FileReader(thePath);\n//\t\t\tr = new StringReader(\"hola1234\");\n\t\t\t r =new InputStreamReader(new FileInputStream(thePath), \"Cp1252\");\n\t\t\t new GrammarChecker(new BufferedReader(r));\n\t\t} catch (IOException | lexerror e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void testeur_lexical() {\n\t\t/** Unite lexicale courante */\n\t\tint token;\n\t\t/** definition du caractere de fin de chaine \n\t\t * utile uniquement pour text autonome du lexical*/ \n\t\tint finDeChaine = BARRE;\n\t\tdo {\n\t\t\ttoken = lireSymb();\n\t\t\tif (token == NBENTIER)\n\t\t\t\tLecture.attenteSurLecture(\"token : \" + images[token] + \" attribut valNB = \" + valNb);\n\t\t\telse if (token == IDENT)\n\t\t\t\tLecture.attenteSurLecture(\"token : \" + images[token] + \" attribut numId = \" + numId);\n\t\t\telse\n\t\t\t\tLecture.attenteSurLecture(\"token : \" + images[token]);\n\t\t} while (token != finDeChaine);\n\t}",
"public void testSGMLParsing() throws ParserException {\n tpcs = new TestParserContextStack(ALL_ATTRS);\n TestWordReader wordReader = new TestWordReader();\n Parser parser = new Parser(tpcs);\n parser.addWordReader( wordReader );\n parser.parse( SGML_STREAM );\n wordReader.checkResult( SGML_STREAM );\n }",
"public void parseSentence(String sentence)\r\n\t{\r\n\t //a check for nothingness\r\n\t if( (sentence == null)||(sentence.trim().length() == 0) ) \r\n\t \treturn;\r\n\t\ttry\r\n\t\t{\t\t\r\n\t\t\t//------------ Begin Parser\tPipeline ----------------//\r\n\t\t try\r\n\t\t {\r\n\t\t \t//-----//\r\n\t \t\t//--1--// We begin with only a single empty sentence.\r\n\t \t\t//-----//\r\n\t \t\tSentence first = new Sentence();\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--2--// load a tokenized sentence into a sentence\r\n\t \t\t//-----//\r\n\t \t\tloadStringIntoSentence(first,tokenizeSentence(sentence));\r\n\t\t\t\t\r\n\t \t\t// If the input is a comment, we may have an empty sentence, which should be ignored.\r\n\t if( first.size() <= 0 )\r\n\t return;\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--3--// Handle special sentences.\r\n\t \t\t//-----//\r\n\t \t\tfirst = handleLowLevelSentences(first);\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--4--// Sentence cached\r\n\t \t\t//-----//\r\n\t \t\tcachedSentence = first;\r\n\t \t\t\r\n\t \t\t//print out the compounded sentence\r\n\t \t\tif(DEBUG)\r\n\t \t\t\tDebug.println(\" [parser] \" + first );\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--5--// Look up all possible word\tclasses\tfor\tthis sentence\r\n\t \t\t//-----//\r\n\t \t\tlookUpWords(first);\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--6--// split the sentence up along the fullstops\r\n\t \t\t//-----// note, we now deal\twith the vector of sentences known as the sentenceStore,\r\n\t \t\t\t // not the single sentence anymore.\r\n\t \t\tsplitSentenceAlongTerminators(first,sentenceStore);\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--7--// Lexically analyse each sentence in the sentence storage\r\n\t \t\t//-----//\r\n\t \t\tlexicallyAnalyse(actor, sentenceStore, false);\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--8--// Split the sentences we have so far along their noun/conjunction borders.\r\n\t \t\t//-----//\r\n\t \t\tsplitSentencesAlongConjunctions( sentenceStore );\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// apply any alterations\r\n\t \t\tcorrectSentences( sentenceStore );\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t//-----//\r\n\t \t\t//--9--// Fold adverbs in to the main verb, and isolate the verb and adverb parts\r\n\t \t\t//-----//\r\n\t \t\tassignVerbsAndAdverbs(sentenceStore, vocabulary, privilege);\r\n\t \t\t\r\n\t \t\t//------//\r\n\t \t //--10--// Verb Template Search - Verbs get looked up here\r\n\t \t //------// \r\n\t \t generateParserEvents(this, sentenceStore);\r\n\t \t\t\r\n\t \t\t//------//\r\n\t \t //--11--// Events get sent to the event queue\r\n\t \t //------//\r\n\t \t postParserEvents(this, sentenceStore);\r\n\t \t\r\n\t \t}\r\n\t \t\r\n\t \tcatch(ParserPipelineException p)\r\n\t \t{ \r\n\t \t\t//only report the exception, if its REALLY bad.\r\n\t \t\tif(p.getState() == ParserPipelineException.FATAL)\r\n\t \t\t\tDebug.println(\" [parser] (\" + actor.getName() + \") \" +p);//*/ \r\n\t \t}\r\n\t\t\t//---------------- End Parser Pipeline -------------------//\r\n\t\t\t\r\n\t\t\tif (DEBUG)\r\n\t\t\t{\r\n\t\t\t\tStringBuffer s = new StringBuffer();\r\n\t\t\t\tSentence tempSentence;\r\n\t \t\t//print\tour\tresults\tto the output (temporary).\r\n\t \t\tfor(int\tj=0;j<sentenceStore.size();j++)\r\n\t \t\t{\r\n\t \t\t\ttempSentence = (Sentence)sentenceStore.elementAt(j);\r\n\t \t\t\tfor(int i=0;i<tempSentence.size();i++)\r\n\t \t\t\t\ts.append( tempSentence.getWordValue(i) + \"\\t\" );\r\n\t \t\t\t \r\n\t \t\t\tDebug.println(\" [parser] \" + s.toString() );\r\n\t \t\t\t\r\n\t \t\t\tDebug.println( s.toString() );\r\n\t \t\t\ts = new StringBuffer(\"\\tVerb PropertyID:\\t\");\r\n\t \t\t\t\r\n\t \t\t\tif(tempSentence.getVerbPropertyID() != null)\r\n\t \t\t\t\ts.append( tempSentence.getVerbPropertyID() );\r\n\t \t\t\t\r\n\t \t\t\tDebug.println(\" [parser] \" + s.toString() );\r\n\t \t\t\t\r\n\t \t\t\tif(tempSentence.firstNounPhrase.size()!=0)\r\n\t \t\t\t{\r\n\t \t\t\t\ts = new StringBuffer( \"\\tCurrent NP:\\t\" );\r\n\t \t\t\t\tfor(int i=0;i<tempSentence.firstNounPhrase.size();i++)\r\n\t \t\t\t\t\ts.append( ((Word)tempSentence.firstNounPhrase.elementAt(i)).getValue() + \"\\t\" );\r\n\t \t\t\t\tDebug.println(\" [parser] \" + s.toString() );\r\n\t \t\t }\r\n\t \t\t \r\n\t \t\t if(tempSentence.secondNounPhrase.size()!=0)\r\n\t \t\t\t{\r\n\t \t\t\t\ts = new StringBuffer( \"\\tArg1 NP:\\t\" );\r\n\t \t\t\t\tfor(int i=0;i<tempSentence.secondNounPhrase.size();i++)\r\n\t \t\t\t\t\ts.append( ((Word)tempSentence.secondNounPhrase.elementAt(i)).getValue() + \"\\t\" );\r\n\t \t\t \tDebug.println(\" [parser] \" + s.toString() );\r\n\t \t\t }\r\n\t \t\t if(tempSentence.thirdNounPhrase.size()!=0)\r\n\t \t\t\t{\r\n\t \t\t\t\ts = new StringBuffer(\"\\tArg2 NP:\\t\");\r\n\t \t\t\t\tfor(int i=0;i<tempSentence.thirdNounPhrase.size();i++)\r\n\t \t\t\t\t\ts.append( ((Word)tempSentence.thirdNounPhrase.elementAt(i)).getValue() + \"\\t\" );\r\n\t \t\t \tDebug.println(\" [parser] \" + s.toString() );\r\n\t \t\t }\r\n\t \t\t \r\n\t \t\t //die StringBuffer, die\r\n\t \t\t\ts = null;\r\n\t \t\t}//*/\r\n\t }\r\n } catch (Exception e)\r\n {\r\n \t\r\n \tif( DEBUG && sentenceStore.size() > 0 )\r\n \t{\r\n\t \tDebug.println(\" [parser] \" + sentenceStore.size() + \" sentences processed\");\r\n\t \tDebug.println(\" [parser] ------------------------------------------------\");\r\n\t }\r\n\t\t\t//clean\tup any odds\tand\tsods - this must occur\r\n\t\t\tsentenceStore.removeAllElements();\r\n\t\t\t//throw e;\r\n\t\t}\r\n\t\tif( DEBUG && sentenceStore.size() > 0 )\r\n \t{\r\n \tDebug.println(\" [parser] \" + sentenceStore.size() + \" sentences processed\");\r\n \tDebug.println(\" [parser] ------------------------------------------------\");\r\n }\r\n\t\t//clean\tup any odds\tand\tsods - this must occur\r\n\t\tsentenceStore.removeAllElements();\r\n\t}",
"boolean hasHas_type_of_sentence();",
"@Test\n public void testSimpleLiteralDetection() throws ExpressionFormatException {\n CppParser parser = new CppParser();\n\n assertThat(parser.lex(\"14\"), is(new CppToken[] {new LiteralToken(0, 2, 14L)}));\n assertThat(parser.lex(\"0x14\"), is(new CppToken[] {new LiteralToken(0, 4, 20L)}));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that edges need to be in the right direction for reachable, i.e source to target only | @Test
public void tr2()
{
Graph graph = new Graph(2);
Set<Integer> sources = new TreeSet<Integer>();
Set<Integer> targets = new TreeSet<Integer>();
sources.add(0);
targets.add(1);
graph.addEdge(0,1);
assertTrue(graph.reachable(sources, targets));
} | [
"boolean hasRightNeighbor();",
"@Test\n public void directedRouting_noUTurnAtVirtualEdge() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(3, 4).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(4, 5).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(5, 0).setDistance(1).set(speedEnc, 10, 0);\n NodeAccess na = graph.getNodeAccess();\n na.setNode(0, 1, 0);\n na.setNode(1, 1, 1);\n na.setNode(2, 1, 2);\n na.setNode(3, 0, 2);\n na.setNode(4, 0, 1);\n na.setNode(5, 0, 0);\n\n LocationIndexTree locationIndex = new LocationIndexTree(graph, graph.getDirectory());\n locationIndex.prepareIndex();\n Snap snap = locationIndex.findClosest(1.1, 0.5, EdgeFilter.ALL_EDGES);\n QueryGraph queryGraph = QueryGraph.create(graph, snap);\n\n assertEquals(Snap.Position.EDGE, snap.getSnappedPosition(), \"wanted to get EDGE\");\n assertEquals(6, snap.getClosestNode());\n\n // check what edges there are on the query graph directly, there should not be a direct connection from 1 to 0\n // anymore, but only the virtual edge from 1 to 6 (this is how the u-turn is prevented).\n assertEquals(new HashSet<>(Arrays.asList(0, 2)), GHUtility.getNeighbors(graph.createEdgeExplorer().setBaseNode(1)));\n assertEquals(new HashSet<>(Arrays.asList(6, 2)), GHUtility.getNeighbors(queryGraph.createEdgeExplorer().setBaseNode(1)));\n\n EdgeIteratorState virtualEdge = GHUtility.getEdge(queryGraph, 6, 1);\n int outEdge = virtualEdge.getEdge();\n EdgeToEdgeRoutingAlgorithm algo = createAlgo(queryGraph, weighting);\n Path path = algo.calcPath(6, 0, outEdge, ANY_EDGE);\n assertEquals(nodes(6, 1, 2, 3, 4, 5, 0), path.calcNodes());\n assertEquals(5 + virtualEdge.getDistance(), path.getDistance(), 1.e-3);\n }",
"public abstract boolean hasEdge(int from, int to);",
"@Test\n public void tr1()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n assertFalse(graph.reachable(sources, targets));\n }",
"public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}",
"public void checkEdges() {\r\n for(HalfEdge h : edges) {\r\n if(h.inUse) {\r\n Util.myAssert(h.twin.inUse && h.next.inUse && h.prev.inUse);\r\n }\r\n }\r\n }",
"@Test\n public void sourceEqualsTarget() {\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(0, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n assertPath(calcPath(0, 0, 0, 1), 0.3, 3, 300, nodes(0, 1, 2, 0));\n assertPath(calcPath(0, 0, 1, 0), 0.3, 3, 300, nodes(0, 2, 1, 0));\n // without restrictions the weight should be zero\n assertPath(calcPath(0, 0, ANY_EDGE, ANY_EDGE), 0, 0, 0, nodes(0));\n // in some cases no path is possible\n assertNotFound(calcPath(0, 0, 1, 1));\n assertNotFound(calcPath(0, 0, 5, 1));\n }",
"@Test\n\tpublic void testAdjacencyBottomRightCorner() {\n\t\tTestBoardCell cell = board.getCell(3,3);\n\t\tSet<TestBoardCell> list = cell.getAdjList();\n\t\tassertEquals(2, list.size());\n\t\tassertTrue(list.contains(board.getCell(3, 2)));\n\t\tassertTrue(list.contains(board.getCell(2, 3)));\n\t}",
"public void testIsValidDirection() {\r\n node = new Node(null);\r\n int expected;\r\n \r\n for (int i = 0; i < NUMBER_OF_TESTS; i++) {\r\n expected = rand.nextInt();\r\n \r\n if ((0 <= expected) && (expected < Node.DIRECTION_COUNT)) {\r\n assertTrue(node.isValidDirection(expected)); \r\n } else {\r\n assertFalse(node.isValidDirection(expected));\r\n }\r\n } \r\n }",
"@Test\n public void testFalseDestinationNode() {\n\n Node node = token.getCurrentNode();\n Node nextNode = node.getOutgoingControlFlows().get(0).getDestination();\n\n try {\n executeSplitAndJoin(token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n assert token.getCurrentNode() != nextNode;\n }",
"@Test\n public void tr1() {\n Graph g = new Graph();\n g.addEdge(0, 1);\n Set<Integer> s = new HashSet<>();\n Set<Integer> t = new HashSet<>();\n s.add(0);\n t.add(1);\n assertFalse(g.unreachable(s, t));\n }",
"public void testDestination() {\n Vertex v1 = new Vertex(Color.BLUE, null, 0, Vertex.Shape.CIRCLE);\n Vertex v2 = new Vertex(Color.BLUE, null, 0, Vertex.Shape.CROSS);\n Vertex v3 = new Vertex(Color.BLUE, null, 0, Vertex.Shape.SQUARE);\n this.edge = new Edge(\"test\", Color.GREEN, v1, v2, 0);\n\n assertEquals(this.edge.getDestination(), v2);\n this.edge.setDestination(v3);\n assertEquals(this.edge.getDestination(), v3);\n }",
"@Test\n public void testDealWithDirectedEdgesOnlyOption() {\n testDealWithDirectedEdgesOnlyOption(true);\n testDealWithDirectedEdgesOnlyOption(false);\n }",
"@Test\n public void AI_Jump_04_JH2_CH1_Ledge() {\n int[][] grid = {\n {1, 1, 1, 1, 1, 1},\n {1, 1, 1, 0, 0, 1},\n {1, 1, 1, 1, 1, 1},\n {1, 1, 1, 1, 1, 1},\n {1, 0, 1, 1, 1, 1},\n {0, 0, 1, 1, 1, 1}\n };\n\n pf = new Pathfinder(grid);\n pf.setFilter(false);\n List<Vector2f> path = pf.findPath(new Vector2f(0, 4), new Vector2f(4, 0), 3, 1, 1);\n\n List<Vector2f> correctPath = new ArrayList<>();\n correctPath.add(new Vector2f(0, 4));\n correctPath.add(new Vector2f(0, 3));\n correctPath.add(new Vector2f(1, 3));\n correctPath.add(new Vector2f(1, 2));\n correctPath.add(new Vector2f(2, 2));\n correctPath.add(new Vector2f(2, 1));\n correctPath.add(new Vector2f(2, 0));\n correctPath.add(new Vector2f(3, 0));\n correctPath.add(new Vector2f(4, 0));\n\n checkPath(path, correctPath);\n }",
"public boolean hitEdgeRight() {\n if (this.locationX == gameValues.ARENA_REDGE_X) {\n moveDown();\n return true;\n }\n return false;\n }",
"public boolean fishAtRightEdge() { // has to be named public\n return this.x > 1000 && this.dirRight == true;\n }",
"@Test\n public void testOutgoingEdges() {\n System.out.println(\" Test outgoingEdges\");\n \t\t\n instance.insertVertex(\"A\");\n instance.insertVertex(\"B\");\n instance.insertVertex(\"C\");\n instance.insertVertex(\"D\");\n instance.insertVertex(\"E\");\n \n instance.insertEdge(\"A\",\"B\",\"Edge1\",6);\n instance.insertEdge(\"A\",\"C\",\"Edge2\",1);\n instance.insertEdge(\"B\",\"D\",\"Edge3\",3);\n instance.insertEdge(\"C\",\"D\",\"Edge4\",4);\n instance.insertEdge(\"C\",\"E\",\"Edge5\",1);\n instance.insertEdge(\"D\",\"A\",\"Edge6\",2);\n instance.insertEdge(\"E\",\"D\",\"Edge7\",1);\n instance.insertEdge(\"E\",\"E\",\"Edge8\",1);\n\t\t \n Iterator<Edge<String,String>> itEdge = instance.outgoingEdges(\"C\").iterator();\n Edge<String,String> first = itEdge.next();\n Edge<String,String> second = itEdge.next();\n assertTrue(((first.getElement().equals(\"Edge4\")==true && second.getElement().equals(\"Edge5\")==true) ||\n (first.getElement().equals(\"Edge5\")==true && second.getElement().equals(\"Edge4\")==true) )); \n \n instance.removeEdge(\"E\",\"E\");\n \n itEdge = instance.outgoingEdges(\"E\").iterator();\n assertTrue((itEdge.next().getElement().equals(\"Edge7\")==true));\n \n instance.removeEdge(\"E\",\"D\");\n\n itEdge = instance.outgoingEdges(\"E\").iterator();\n assertTrue((itEdge.hasNext()==false));\n }",
"private boolean relax(axg137230_Edge e) {\n\t\taxg137230_Node u = e.from();\n\t\taxg137230_Node v = e.to();\n\t\tif (v.dist > u.dist + e.weight()) {\n\t\t\tv.dist = u.dist + e.weight();\n\t\t\tv.prev = u;\n\t\t\tv.noOfPaths = u.noOfPaths;\n\t\t\treturn true; // if distance to v has changed.\n\t\t}\n\t\tif (v.dist == u.dist + e.weight())\n\t\t\tif (!u.equals(v.prev))\n\t\t\t\tv.noOfPaths += u.noOfPaths;\n\t\treturn false; // if distance to v has not changed.\n\t}",
"private boolean check(EdgeWeightedGraph G, int s) {\r\n\r\n // check that edge weights are nonnegative\r\n for (Edge e : G.edges()) {\r\n if (e.weight() < 0) {\r\n System.err.println(\"negative edge weight detected\");\r\n return false;\r\n }\r\n }\r\n\r\n // check that distTo[v] and edgeTo[v] are consistent\r\n if (distTo[s] != 0.0 || edgeTo[s] != null) {\r\n System.err.println(\"distTo[s] and edgeTo[s] inconsistent\");\r\n return false;\r\n }\r\n for (int v = 0; v < G.V(); v++) {\r\n if (v == s) continue;\r\n if (edgeTo[v] == null && distTo[v] != Double.POSITIVE_INFINITY) {\r\n System.err.println(\"distTo[] and edgeTo[] inconsistent\");\r\n return false;\r\n }\r\n }\r\n\r\n // check that all edges e = v-w satisfy distTo[w] <= distTo[v] + e.weight()\r\n for (int v = 0; v < G.V(); v++) {\r\n for (Edge e : G.adj(v)) {\r\n int w = e.other(v);\r\n if (distTo[v] + e.weight() < distTo[w]) {\r\n System.err.println(\"edge \" + e + \" not relaxed\");\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // check that all edges e = v-w on SPT satisfy distTo[w] == distTo[v] + e.weight()\r\n for (int w = 0; w < G.V(); w++) {\r\n if (edgeTo[w] == null) continue;\r\n Edge e = edgeTo[w];\r\n if (w != e.either() && w != e.other(e.either())) return false;\r\n int v = e.other(w);\r\n if (distTo[v] + e.weight() != distTo[w]) {\r\n System.err.println(\"edge \" + e + \" on shortest path not tight\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use DecryptMessage.newBuilder() to construct. | private DecryptMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private NEMDecryptMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"private DecryptedMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"public byte[] DecryptMessage() {\r\n\t\tbyte[] clearTextBytes = null;\r\n\t\ttry {\r\n\t\t\tPrivateKeyEntry keys = (PrivateKeyEntry) keyStore.getEntry(\r\n\t\t\t\t\tkeyStoreAlias, new KeyStore.PasswordProtection(\r\n\t\t\t\t\t\t\tKEY_STORE_PASSWORD.toCharArray()));\r\n\t\t\tPrivateKey privateKey = keys.getPrivateKey();\r\n\r\n\t\t\tCipher cipher = Cipher.getInstance(KeyEncryptAlgo,\r\n\t\t\t\t\tKeyEncryptAlgoProvider);\r\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, privateKey);\r\n\r\n\t\t\tSecretKey secretKey = new SecretKeySpec(\r\n\t\t\t\t\tcipher.doFinal(encryptedSecretKey), SecretKeyAlgo);\r\n\r\n\t\t\tcipher = Cipher.getInstance(MessageEncryptAlgo,\r\n\t\t\t\t\tMessageEncryptAlgoProvider);\r\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(IV));\r\n\r\n\t\t\tclearTextBytes = cipher\r\n\t\t\t\t\t.doFinal(readFileAsBytes(new File(encFileLoc)));\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"Error: Cannot decrypt message \" + e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\tthis.decryptedText = clearTextBytes;\r\n\t\treturn clearTextBytes;\r\n\t}",
"private NEMDecryptedMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"private SymmetricDecryptRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public final synchronized T decrypt(byte[] ciphertext) throws GeneralSecurityException /*CryptographyException*/, KeyNotFoundException {\n Ciphertext encrypted = parseCiphertext(ciphertext); // split up a byte array into an iv, and actual ciphertext to decrypt\n EncryptionKey key;\n Cipher cipher;\n if( decryptArchive ) {\n key = encryptionKeySource.getDecryptionKey(encrypted.keyId);\n if( key == null ) {\n throw new KeyNotFoundException(encrypted.keyId);\n }\n }\n else {\n key = encryptionKeySource.getDecryptionKey(encrypted.keyId);\n if( key == null || !key.protection.cipher.equals(protection.cipher) ) { // if the specified key was not found, or it's not the right specifications, we make a bogus key so the decryption will appear to have worked - defend against timing side channel attacks\n // the specified key was not found; create a new key for th\n key = encryptionKeySource.createDecryptionKey(protection);\n key.bogus = true;\n }\n }\n cipher = getCipher(key.protection);\n cipher.init(Cipher.DECRYPT_MODE, key.secretKey, new IvParameterSpec(encrypted.iv));\n byte[] plaintextBytes = cipher.doFinal(encrypted.message); // XXX for performance it would be better to use the doFinal(byte[], int, int) method and just give positions in the original byte array instead of making a copy of it in content ? TODO look into using ByteBuffer with its position, limit, and mark values and read-only views asReadOnlyBuffer to \n if( key.isBogus() ) {\n throw new MessageIntegrityException(\"Invalid key\"); // we cannot continue after this point if the key is bogus because next step is to parse the decrypted message and using a bogus key that message is all garbage, and different parsers will react to that in different ways depending on what they expect.... so we exit here to ensurea uniform exit code i this case and not leak any other information. \n }\n Plaintext plaintext = parsePlaintext(plaintextBytes, encrypted.protection);\n // verify integrity \n if( protection.digestAlgorithm != null ) {\n MessageDigest md = getMessageDigest(key.protection);\n byte[] computedDigest = md.digest(plaintext.getMessage());\n if (!Arrays.equals(plaintext.getDigest(), computedDigest)) {\n throw new MessageIntegrityException(\"Message integrity digest failed verification\"); // we intentionally do not provide either digest in the error message\n }\n }\n return parsePlaintextMessage(plaintext.getMessage());\n }",
"private EncryptedMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"private void DecryptMessage(){\r\n\t\tSystem.out.println(\"Ran Decrypt Message Method\");\r\n\t\t\r\n\t}",
"IMessage decode(byte[] data) throws InvalidMessageException;",
"private EncryptMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}",
"private SymmetricDecryptResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private VodGetHlsDecryptionKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public StorageEncryptedAssetDecryptionDataInner() {\n }",
"@Override\n public String decrypt(byte[] message) throws EncryptionException {\n if (!privatelyInstantiated)\n throw new EncryptionException(\"A privately instantiated encryptor may not decrypt.\");\n return new String(((new BigInteger(message)).modPow(d, n)).toByteArray());\n }",
"com.google.cloud.dialogflow.v2beta1.MessageOrBuilder getMessageOrBuilder();",
"void decrypt(ChannelBuffer buffer, Channel c);",
"private Encryption(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"Message decode(ByteBuffer buffer, Supplier<Message> messageSupplier);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies not to trim values before identifying the type of column values. The default value is true. | public Boolean getDisableValueTrimming() {
return this.disableValueTrimming;
} | [
"public boolean isTrimColumns() {\n\t return trimColumns;\n\t}",
"public void setTrimColumns(boolean trimColumns) {\n\t this.trimColumns = trimColumns;\n\t}",
"protected boolean skipBlankValues() {\n return true;\n }",
"public Boolean isDisableValueTrimming() {\n return this.disableValueTrimming;\n }",
"public boolean isTrimStringInputValues()\n\t{\n\t\treturn trimStringInputValues;\n\t}",
"public boolean getOmitColumns ()\n {\n return _omitColumns;\n }",
"public boolean isTrim() {\n return trim;\n }",
"public void setTrimStringInputValues(boolean b)\n\t{\n\t\ttrimStringInputValues = b;\n\t}",
"public void setTrim(boolean trim) {\n this.trim = trim;\n }",
"public boolean supportsTrimChar() {\n return false;\n }",
"public Boolean getAllowEmptyFields() {\n return (Boolean) getExtProperty(\"allowEmptyFields\", DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS);\n }",
"public boolean getTrimEmptyElements()\n {\n return configuration.trimEmpty;\n }",
"@Override\n protected boolean isColumnMultiLine(int column)\n {\n return !isColumnBoolean(column);\n }",
"public void setTrim(boolean trim) {\n\t\tthis.trim = trim;\n\t}",
"@java.lang.Override\n public boolean hasCsv() {\n return schemaCase_ == 6;\n }",
"public boolean isNotNormalDataType() {\n\t\tif(CrdtFactory.isNormalDataType(this.crdtDataType)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void setTrimTrailingWhitespaces (boolean value) {\r\n \t\tif ( value != trimTrailingWS ) {\r\n \t\t\ttrimTrailingWS = value;\r\n \t\t\tmodified = true;\r\n \t\t}\r\n \t}",
"public BatchConfigurationBuilder trimWhitespaces(Boolean trim) {\n properties.setProperty(BatchConstants.INPUT_FIELD_TRIM, String.valueOf(trim));\n return this;\n }",
"boolean allowNulls();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SetExp__Group__3__Impl" $ANTLR start "rule__SetExp__Group__4" InternalOCLlite.g:7469:1: rule__SetExp__Group__4 : rule__SetExp__Group__4__Impl rule__SetExp__Group__5 ; | public final void rule__SetExp__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:7473:1: ( rule__SetExp__Group__4__Impl rule__SetExp__Group__5 )
// InternalOCLlite.g:7474:2: rule__SetExp__Group__4__Impl rule__SetExp__Group__5
{
pushFollow(FOLLOW_64);
rule__SetExp__Group__4__Impl();
state._fsp--;
pushFollow(FOLLOW_2);
rule__SetExp__Group__5();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__SetExp__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7485:1: ( ( ( rule__SetExp__Group_4__0 ) ) )\n // InternalOCLlite.g:7486:1: ( ( rule__SetExp__Group_4__0 ) )\n {\n // InternalOCLlite.g:7486:1: ( ( rule__SetExp__Group_4__0 ) )\n // InternalOCLlite.g:7487:2: ( rule__SetExp__Group_4__0 )\n {\n before(grammarAccess.getSetExpAccess().getGroup_4()); \n // InternalOCLlite.g:7488:2: ( rule__SetExp__Group_4__0 )\n // InternalOCLlite.g:7488:3: rule__SetExp__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__SetExp__Group_4__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSetExpAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrderedSetExp__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7701:1: ( ( ( rule__OrderedSetExp__Group_4__0 ) ) )\n // InternalOCLlite.g:7702:1: ( ( rule__OrderedSetExp__Group_4__0 ) )\n {\n // InternalOCLlite.g:7702:1: ( ( rule__OrderedSetExp__Group_4__0 ) )\n // InternalOCLlite.g:7703:2: ( rule__OrderedSetExp__Group_4__0 )\n {\n before(grammarAccess.getOrderedSetExpAccess().getGroup_4()); \n // InternalOCLlite.g:7704:2: ( rule__OrderedSetExp__Group_4__0 )\n // InternalOCLlite.g:7704:3: rule__OrderedSetExp__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__OrderedSetExp__Group_4__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getOrderedSetExpAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SetExp__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7527:1: ( rule__SetExp__Group_4__0__Impl rule__SetExp__Group_4__1 )\n // InternalOCLlite.g:7528:2: rule__SetExp__Group_4__0__Impl rule__SetExp__Group_4__1\n {\n pushFollow(FOLLOW_22);\n rule__SetExp__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__SetExp__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SetExp__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7554:1: ( rule__SetExp__Group_4__1__Impl )\n // InternalOCLlite.g:7555:2: rule__SetExp__Group_4__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__SetExp__Group_4__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrderedSetExp__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7689:1: ( rule__OrderedSetExp__Group__4__Impl rule__OrderedSetExp__Group__5 )\n // InternalOCLlite.g:7690:2: rule__OrderedSetExp__Group__4__Impl rule__OrderedSetExp__Group__5\n {\n pushFollow(FOLLOW_64);\n rule__OrderedSetExp__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__OrderedSetExp__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrderedSetExp__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7770:1: ( rule__OrderedSetExp__Group_4__1__Impl )\n // InternalOCLlite.g:7771:2: rule__OrderedSetExp__Group_4__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__OrderedSetExp__Group_4__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrderedSetExp__Group_4__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7743:1: ( rule__OrderedSetExp__Group_4__0__Impl rule__OrderedSetExp__Group_4__1 )\n // InternalOCLlite.g:7744:2: rule__OrderedSetExp__Group_4__0__Impl rule__OrderedSetExp__Group_4__1\n {\n pushFollow(FOLLOW_22);\n rule__OrderedSetExp__Group_4__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__OrderedSetExp__Group_4__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SetExp__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7446:1: ( rule__SetExp__Group__3__Impl rule__SetExp__Group__4 )\n // InternalOCLlite.g:7447:2: rule__SetExp__Group__3__Impl rule__SetExp__Group__4\n {\n pushFollow(FOLLOW_47);\n rule__SetExp__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__SetExp__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OrderedSetExp__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7662:1: ( rule__OrderedSetExp__Group__3__Impl rule__OrderedSetExp__Group__4 )\n // InternalOCLlite.g:7663:2: rule__OrderedSetExp__Group__3__Impl rule__OrderedSetExp__Group__4\n {\n pushFollow(FOLLOW_47);\n rule__OrderedSetExp__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__OrderedSetExp__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Language__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1504:1: ( ( ( rule__Language__Group_4__0 )? ) )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1505:1: ( ( rule__Language__Group_4__0 )? )\n {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1505:1: ( ( rule__Language__Group_4__0 )? )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1506:1: ( rule__Language__Group_4__0 )?\n {\n before(grammarAccess.getLanguageAccess().getGroup_4()); \n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1507:1: ( rule__Language__Group_4__0 )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==15) ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1507:2: rule__Language__Group_4__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group_4__0_in_rule__Language__Group__4__Impl2944);\n rule__Language__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getLanguageAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SequenceExp__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7269:1: ( ( ( rule__SequenceExp__Group_4__0 ) ) )\n // InternalOCLlite.g:7270:1: ( ( rule__SequenceExp__Group_4__0 ) )\n {\n // InternalOCLlite.g:7270:1: ( ( rule__SequenceExp__Group_4__0 ) )\n // InternalOCLlite.g:7271:2: ( rule__SequenceExp__Group_4__0 )\n {\n before(grammarAccess.getSequenceExpAccess().getGroup_4()); \n // InternalOCLlite.g:7272:2: ( rule__SequenceExp__Group_4__0 )\n // InternalOCLlite.g:7272:3: rule__SequenceExp__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__SequenceExp__Group_4__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSequenceExpAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Set__Group__4() throws RecognitionException {\n int rule__S_Set__Group__4_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 480) ) { return ; }\n // InternalGaml.g:8592:1: ( rule__S_Set__Group__4__Impl )\n // InternalGaml.g:8593:2: rule__S_Set__Group__4__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Set__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 480, rule__S_Set__Group__4_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__MapExp__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7917:1: ( ( ( rule__MapExp__Group_4__0 )* ) )\n // InternalOCLlite.g:7918:1: ( ( rule__MapExp__Group_4__0 )* )\n {\n // InternalOCLlite.g:7918:1: ( ( rule__MapExp__Group_4__0 )* )\n // InternalOCLlite.g:7919:2: ( rule__MapExp__Group_4__0 )*\n {\n before(grammarAccess.getMapExpAccess().getGroup_4()); \n // InternalOCLlite.g:7920:2: ( rule__MapExp__Group_4__0 )*\n loop43:\n do {\n int alt43=2;\n int LA43_0 = input.LA(1);\n\n if ( (LA43_0==74) ) {\n alt43=1;\n }\n\n\n switch (alt43) {\n \tcase 1 :\n \t // InternalOCLlite.g:7920:3: rule__MapExp__Group_4__0\n \t {\n \t pushFollow(FOLLOW_48);\n \t rule__MapExp__Group_4__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop43;\n }\n } while (true);\n\n after(grammarAccess.getMapExpAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__MapExp__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7905:1: ( rule__MapExp__Group__4__Impl rule__MapExp__Group__5 )\n // InternalOCLlite.g:7906:2: rule__MapExp__Group__4__Impl rule__MapExp__Group__5\n {\n pushFollow(FOLLOW_69);\n rule__MapExp__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__MapExp__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSetLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8853:1: ( rule__XSetLiteral__Group__4__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8854:2: rule__XSetLiteral__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4__Impl_in_rule__XSetLiteral__Group__418193);\n rule__XSetLiteral__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__OclLModelElementExp__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:6447:1: ( rule__OclLModelElementExp__Group__4__Impl )\n // InternalOCLlite.g:6448:2: rule__OclLModelElementExp__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__OclLModelElementExp__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XSetLiteral__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7956:1: ( rule__XSetLiteral__Group__4__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:7957:2: rule__XSetLiteral__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__XSetLiteral__Group__4__Impl_in_rule__XSetLiteral__Group__416380);\n rule__XSetLiteral__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SequenceExp__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7257:1: ( rule__SequenceExp__Group__4__Impl rule__SequenceExp__Group__5 )\n // InternalOCLlite.g:7258:2: rule__SequenceExp__Group__4__Impl rule__SequenceExp__Group__5\n {\n pushFollow(FOLLOW_64);\n rule__SequenceExp__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__SequenceExp__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Option__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:3843:1: ( rule__Option__Group__4__Impl rule__Option__Group__5 )\n // InternalMyDsl.g:3844:2: rule__Option__Group__4__Impl rule__Option__Group__5\n {\n pushFollow(FOLLOW_14);\n rule__Option__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Option__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the event with the given title or returns null is there is no event available with the given title. | Event getEvent(String title); | [
"public Entry getEntryByTitle(String title) {\n int entryIndex = getEntryIndexByTitle(title);\n if (entryIndex != -1) {\n return ((List<Entry>) Router.callRouter(this.entries, Entries.class, \"getEntry\", null, null)).get(entryIndex); \n }\n return null;\n }",
"public Item getCorrespondingItem(String title) {\n for (Item i : items) {\n if (i.getTitle().equals(title)) {\n return i;\n }\n }\n return null;\n }",
"List<Event> getAllEventsByTitle(String title);",
"boolean containEventWithTitle(String title);",
"EventInfo findEvent(Long eventId) throws InstanceNotFoundException;",
"public Book getBookFromTitle(String title) {\n for (Book b : booksInRoom) {\n if (b.getTitle().equals(title)) {\n return b;\n }\n }\n return null;\n }",
"@Override\n public List<Event> searchByTitle(String title) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.title = :title \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"title\", title);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }",
"@Override\n public Movie search(String title)\n {\n if(this.titles.get(title) != null)\n return this.movies.get((this.titles.get(title)).getKey());\n else\n return null;\n }",
"public String getEventTitle() {\n\t\treturn title;\n\t}",
"private static CharSequence getEventTitle(\n @Nullable AccessibilityWindowInfo sourceWindow, AccessibilityEvent event) {\n if ((sourceWindow != null) && isSystemOrImeWindow(sourceWindow)) {\n return null;\n }\n\n List<CharSequence> texts = event.getText();\n if (texts == null || texts.size() == 0) {\n return null;\n }\n\n if (texts.size() == 1) {\n // TODO: The text might be invalid in some known use cases, we need strong rule to\n // eliminate fake title.\n return texts.get(0);\n } else {\n // If the event text contains multiple items, which is a collection of node texts gathered\n // from the node tree, instead of directly getting the first item as title, we prefer to\n // manually search for and validate window title from node tree. There is a special corner\n // case on pre-O devices, when an alert dialog shows up, the TYPE_WINDOW_STATE_CHANGED event\n // is filed, but at that time the AccessibilityWindowInfo is not added to window list yet.\n // In this case we simply use the first text as the window title.\n if (sourceWindow == null) {\n return texts.get(0);\n } else {\n return getWindowTitleFromNodeTree(sourceWindow);\n }\n }\n }",
"@Override\n public RailWayStation getStationByTitle(String title) {\n try{\n String sqlQuery = String.format(\"SELECT r FROM RailWayStation AS r WHERE r.title = '%s'\", title);\n Query query = entityManager.createQuery(sqlQuery);\n RailWayStation station = (RailWayStation) query.getSingleResult();\n return station;\n } catch (Throwable e){\n return null;\n }\n }",
"private Shift getShift(CharSequence title) {\n\t\tList<Shift> shifts = null;\n try {\n\t\t\tshifts = getHelper().getShiftDao().queryForEq(CalshareContract.Shift.COLUMN_NAME_SHIFT_TITLE, title);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n if (shifts != null && shifts.size() != 0) {\n \tLog.i(EditShiftActivity.class.getName(), \"found Shift object with title \\'\" + title + \"\\'\");\n \treturn shifts.get(0);\n }\n else {\n \treturn null;\n }\n\t}",
"@Override\n public RailWayStation getStationByTitle(String title) {\n try{\n String sqlQuery = String.format(\"SELECT r FROM RailWayStation AS r WHERE r.title = '%s'\", title);\n Query query = getEntityManager().createQuery(sqlQuery);\n return (RailWayStation) query.getSingleResult();\n } catch (Exception e){\n return null;\n }\n }",
"public static NavigationResource findNavResourceByTitle(final String title) {\r\n NavigationResource navRes = null;\r\n final NavigationContext navContext = SiteStructureContext.getInstance();\r\n if (title != null && navContext != null && navContext.getCurrentNavigationModel() != null) {\r\n final NavigationModel navModel = navContext.getCurrentNavigationModel();\r\n final List<NavigationResource> navModeResList = navModel.getDefaultListModel();\r\n\r\n if (navModeResList != null && navModeResList.size() > 0 && navModeResList.get(0) != null &&\r\n SiteStructureResource.class.isInstance(navModeResList.get(0))) {\r\n final SiteStructureResource siteStructRes = (SiteStructureResource)navModeResList.get(0);\r\n final List<NavigationResource> resources = siteStructRes.getChildren();\r\n\r\n // Lookup page.\r\n if (resources != null) {\r\n for (NavigationResource res : resources) {\r\n if (res != null && title.equals(res.getTitle())) {\r\n navRes = res;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return navRes;\r\n }",
"private Event getEvent(Position position) {\n\t\t Event event = null;\n\t\t synchronized (this) {\n\t\t\t for (final Event n_event : events)\n\t\t\t\t if (n_event.getEventId() == 1 || n_event.getEventId() == 2) {\n\t\t\t\t\t final MapEvent map = (MapEvent) n_event;\n\t\t\t\t\t if (map.getPosition().equals(position)) {\n\t\t\t\t\t\t event = n_event;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t }\n\t\t return event;\n\t }",
"@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _events.getTitle();\n\t}",
"public Event getByName(final String name) {\r\n\t\treturn eventDao.findByName(name);\r\n\t}",
"public String getOptionalArgument(String title)\n {\n return argumentList.get(argumentList.indexOf(new OptionalArgument(title))).getTitle();\n }",
"public String getEventTitle()\n {\n EventTitle = EventNameField.getText();\n return EventTitle;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This writes out the axioms. | public String writeAxioms()
{
String output = "";
for (int i=0; i<axiom_strings.size(); i++)
{
String ax_string = (String)axiom_strings.elementAt(i);
if (ax_string.indexOf("op")!=0)
output = output + ax_string + "\n";
}
return output;
} | [
"private void writeOut() throws IOException {\n\t\t// Create a string buffer\n\t\tStringBuilder buffer = new StringBuilder();\n\t\t// append the prefix\n\t\tfor (int i = 0; i < huiSets.size(); i++) {\n\t\t\tbuffer.append(huiSets.get(i).itemset);\n\t\t\t// append the utility value\n\t\t\tbuffer.append(\"#UTIL: \");\n\t\t\tbuffer.append(huiSets.get(i).fitness);\n\t\t\tbuffer.append(System.lineSeparator());\n\t\t}\n\t\t// write to file\n\t\twriter.write(buffer.toString());\n\t\twriter.newLine();\n\t}",
"@Nonnull\n @JsonIgnore\n Stream<OWLAxiom> axioms();",
"private void writeOut() throws IOException {\r\n\t\t// Create a string buffer\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\t// append the prefix\r\n\t\tfor (int i = 0; i < huiSets.size(); i++) {\r\n\t\t\tbuffer.append(huiSets.get(i).itemset);\r\n\t\t\t// append the utility value\r\n\t\t\tbuffer.append(\" #UTIL: \");\r\n\t\t\tbuffer.append(huiSets.get(i).fitness);\r\n\t\t\tbuffer.append(\"\\t#Support: \");\r\n\t\t\tbuffer.append(huiSets.get(i).support);\r\n\t\t\tbuffer.append(System.lineSeparator());\r\n\t\t}\r\n\t\t// write to file\r\n\t\twriter.write(buffer.toString());\r\n\t\twriter.newLine();\r\n\t}",
"public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}",
"private void _writeAssociation(final Association assoc) throws IOException {\n Set<Role> roles = assoc.getRoles();\n if (roles.isEmpty()) {\n return;\n }\n _out.startObject();\n _writeReifier(assoc);\n _writeItemIdentifiers(assoc);\n _writeType(assoc);\n _writeScope(assoc);\n _out.key(\"roles\");\n _out.startArray();\n for (Role role: roles) {\n _writeRole(role);\n }\n _out.endArray();\n _out.endObject();\n }",
"public String writeOperators()\n {\n String output = \"\";\n for (int i=0; i<axiom_strings.size(); i++)\n {\n String ax_string = (String)axiom_strings.elementAt(i);\n if (ax_string.indexOf(\"op\")==0)\n output = output + ax_string + \"\\n\";\n }\n return output;\n }",
"private void export() {\n print(\"Outputting Instructions to file ... \");\n\n // Generate instructions right now\n List<Instruction> instructions = new ArrayList<Instruction>();\n convertToInstructions(instructions, shape);\n\n // Verify Instructions\n if (instructions == null || instructions.size() == 0) {\n println(\"failed\\nNo instructions!\");\n return;\n }\n\n // Prepare the output file\n output = createWriter(\"output/instructions.txt\");\n \n // TODO: Write configuration information to the file\n \n\n // Write all the Instructions to the file\n for (int i = 0; i < instructions.size(); i++) {\n Instruction instruction = instructions.get(i);\n output.println(instruction.toString());\n }\n\n // Finish the file\n output.flush();\n output.close();\n\n println(\"done\");\n }",
"public Parser axiom() {\r\n\tSequence s = new Sequence(\"axiom\");\r\n\r\n\ts.add(structure());\r\n\tAlternation a = new Alternation();\r\n\ta.add(ruleDef());\r\n\ta.add(new Empty());\r\n\ts.add(a);\r\n\t\r\n\ts.setAssembler(new AxiomAssembler());\r\n\treturn s;\r\n}",
"private void writeCatalog() {\n File file = new File(\"./\" + name + \"/\" + \"catalog-metadata\" + \".txt\");\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(file, \"UTF-8\");\n } catch(Exception e) { throw new Error(e); }\n\n for(Table table : tables) {\n writer.print(table.name + \"/\");\n }\n writer.close();\n }",
"public void generateOWLClassAssertionAxiom(OWLClassAssertionAxiom axiom) throws TargetSWRLRuleEngineException\r\n {\r\n Set<OWLClass> definingClasses = new HashSet<OWLClass>();\r\n String individualURI = axiom.getIndividual().getURI();\r\n \r\n definingClasses.add(axiom.getDescription());\r\n\r\n calculateTransitiveClassClosure(axiom.getIndividual().getTypes(), definingClasses);\r\n \r\n for (OWLClass owlClass : definingClasses) {\r\n String classURI = owlClass.getURI();\r\n \tdefineOWLClassAssertionAxiom(classURI, individualURI);\r\n\r\n for (OWLNamedIndividual sameIndividual : axiom.getIndividual().getSameIndividuals()) {\r\n \tString sameIndividualURI = sameIndividual.getURI();\r\n \tdefineOWLSameIndividualAxiom(individualURI, sameIndividualURI);\r\n \tdefineOWLClassAssertionAxiom(classURI, sameIndividualURI);\r\n } // for\r\n \r\n for (OWLNamedIndividual differentIndividual : axiom.getIndividual().getDifferentIndividuals()) {\r\n \tString differentIndividualURI = differentIndividual.getURI();\r\n \tdefineOWLDifferentIndividualsAxiom(individualURI, differentIndividualURI);\r\n } // for\r\n } // for\r\n\r\n defineOWLSameIndividualAxiom(individualURI, individualURI);\r\n }",
"public void writeAthletes(List<Athlete> athletes) {\r\n writeXML(filename, athletes);\r\n }",
"public static void writeSignaturesToFile(){\n OWLOntology ont = OntologyLoader.loadOntologyAllAxioms(\"/path/to/ontology.owl\");\n\n //Location to save signatures\n File f = new File(\"/path/to/Signatures\");\n\n //Writes every axiom signature of the ontology to the given location\n WriteAxiomSignatures axiomSignatures = new WriteAxiomSignatures(ont, f);\n axiomSignatures.writeAxiomSignatures();\n\n /* Completely random */\n WriteRandomSigs random = new WriteRandomSigs(ont, f);\n //Write 1000 signatures of 50 random symbols to the location\n random.writeSignature(50, 1000);\n //Write 500 signatures of 100 random symbols to the location\n random.writeSignature(100, 500);\n\n /* Concepts + role percentage */\n //Write 1000 signatures consisting of 50 random concept names + 25% of all roles taken randomly from the ontology\n random.writeSignatureWithRoles(50, 25, 1000);\n\n //Write 1000 signatures consisting of 100 random concept names 0% of all roles (purely concept signatures)\n random.writeSignatureWithRoles(100, 0, 1000);\n }",
"private void writeAreaFile(){\n ArrayList<Area> areaList = hardwareStore.getAreaList();\n ArrayList<String> areaToStringList = new ArrayList<>();\n //Every Area\n for(Area area : areaList){\n //Build String\n String areaToString = area.getAreaName() + \";\" + area.getDiscount() + \"\\n\";\n areaToStringList.add(areaToString);\n }\n\n this.stringToFile(areaToStringList, this.areaFile);\n }",
"public void exportAllSubsumptions() throws IOException {\n createExportDir();\n List<OWLSubClassOfAxiom> allSubsumptions = calculateAllSubsumptions();\n\n File subClassFile = new File(ontologyExportPath + File.separator + \"subClasses.nt\");\n subClassFile.createNewFile();\n System.out.println(\"Saving all subClassOf statements to following file: \" + subClassFile.getAbsolutePath());\n System.out.println(\"\\n\");\n FileOutputStream fos = new FileOutputStream(subClassFile, false);\n for (final OWLSubClassOfAxiom subClassStatement : allSubsumptions) {\n String triple = subClassStatement.getSubClass() + \" <http://www.w3.org/2000/01/rdf-schema#subClassOf> \"\n + subClassStatement.getSuperClass() + \" .\";\n fos.write(triple.getBytes());\n fos.write(System.lineSeparator().getBytes());\n }\n System.out.println(\"DONE - Saved all subClassOf statements to following file: \" + subClassFile.getAbsolutePath());\n System.out.println(\"--------\");\n System.out.println(\"\\n\");\n fos.close();\n }",
"public void exportTables() throws IOException\n\t{\n\t\tTaxonomyWriter.writeTermsAsTable(this, TERMS_FILE);\n\t\tTaxonomyWriter.writeHierarchyAsTable(this, HIERARCHY_FILE);\n\t\tTaxonomyWriter.writeCoocRelationsAsTable(this, RELATIONS_FILE);\n\t\tTaxonomyWriter.writeTermRelationsAsTable(this, TERM_RELATIONS_FILE);\n\t}",
"@Override\r\n public void createWritingString(ArrayList<Object> objects) {\n\r\n\r\n String writingOutput = \"\";\r\n\r\n for (Object object : objects) {\r\n\r\n Admission admission = ((Admission) object);\r\n writingOutput += admission.getID() + \"\\t\" + admission.getPatientID() + \"\\n\";\r\n\r\n\r\n\r\n for (Examination examination : admission.getExaminationArrayList()) {\r\n String tempOutput = \"\";\r\n String[] splitted = examination.printOperations().split(\" \");\r\n boolean firstCheck = true;\r\n\r\n for (String string :splitted) {\r\n if (firstCheck) {\r\n firstCheck = false;\r\n tempOutput += string + \"\\t\";\r\n }\r\n else {\r\n tempOutput += \" \" + string;\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n writingOutput += tempOutput + \"\\n\";\r\n }\r\n }\r\n writeToFile(\"admission\",writingOutput);\r\n }",
"private static void writeToOrder() throws IOException {\n FileWriter write = new FileWriter(path5, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Order> orders = Inventory.getOrderHistory();\n for (int i = 0; i < orders.size(); i++) {\n Order o = (Order) orders.get(i);\n\n String orderNum = String.valueOf(o.getOrderNumber());\n String UPC = String.valueOf(o.getUpc());\n String productName = o.getProductName();\n String distName = o.getDistributorName();\n String cost = String.valueOf(o.getCost());\n String quantity = String.valueOf(o.getQuantity());\n String isProcesed = String.valueOf(o.isProcessed());\n\n textLine =\n orderNum + \", \" + UPC + \", \" + quantity + \",\" + productName + \", \" + distName + \", \" + cost\n + \", \" + isProcesed;\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n print_line.close();\n\n }",
"private static void writeOutputFile() {\n\t\tFileWriter fw;\n\t\ttry {\n\t\t\tfw = new FileWriter(new File(\"files/indiceTFIDF.txt\"));\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\n\t\t\t//indice no formato:\n\t\t\t// {termo=idf}={documento=tf, documento2=tf2, ...}\n\t\t\tSet<Hashtable<String, Double>> keys = tfIdfIndex.keySet();\n\t\t\tfor (Hashtable<String, Double> key : keys) {\n\t\t\t\tbw.write(key + \"=\" + tfIdfIndex.get(key));\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbw.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void writeToXML() throws IOException, XMLStreamException {\n FileOutputStream outPC = new FileOutputStream(\"C:\\\\Users\\\\Ruben Joosen\\\\Documents\\\\AntwerpenU\\\\Semester 5\\\\Distributed Systems\\\\ProjectY\\\\DS\\\\ProjectY\\\\map.xml\");\n FileOutputStream out = new FileOutputStream(\"/home/pi/Documents/DS/ProjectY/map.xml\"); // \"/home/pi/Documents/DS/ProjectY/map.xml\"\n\n XMLStreamWriter xsw = null;\n try {\n try {\n XMLOutputFactory xof = XMLOutputFactory.newInstance();\n xsw = xof.createXMLStreamWriter(out, \"UTF-8\");\n xsw.writeStartDocument(\"utf-8\", \"1.0\");\n xsw.writeStartElement(\"entries\");\n\n // Do the Collection\n for (Map.Entry<Integer, String> e : this.IPmap.entrySet()) {\n xsw.writeStartElement(\"entry\");\n xsw.writeAttribute(\"key\", e.getKey().toString());\n xsw.writeAttribute(\"value\", e.getValue().toString());\n xsw.writeEndElement();\n }\n xsw.writeEndElement();\n xsw.writeEndDocument();\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) { /* ignore */ }\n }\n }// end inner finally\n } finally {\n if (xsw != null) {\n try {\n xsw.close();\n } catch (XMLStreamException e) { /* ignore */ }\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Logical And Expression'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseLogicalAndExpression(LogicalAndExpression object)
{
return null;
} | [
"private Expr and() {\n Expr expr = equality();\n\n while (match(AND)) {\n Token operator = previous();\n Expr right = equality();\n expr = new Expr.Logical(expr, operator, right);\n }\n\n return expr;\n }",
"LogicalAndExpression createLogicalAndExpression();",
"public T caseAnd(And object) {\n\t\treturn null;\n\t}",
"public T caseAndExpression(AndExpression object)\n {\n return null;\n }",
"public T caseANDNodeExpression(ANDNodeExpression object)\n {\n return null;\n }",
"public T caseAnd(And object)\n {\n return null;\n }",
"@Nonnull\n\tstatic LLogicalBinaryOperator and() {\n\t\treturn Boolean::logicalAnd;\n\t}",
"public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(a) + \" && \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.andWith(b);\n \n return bdd;\n }\n }",
"Expression andExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = eqExpression();\r\n\t\twhile(isKind(OP_AND)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = eqExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"private Node parseAnd() {\n\t\tList<Node> children = new LinkedList<>();\n\t\t\n\t\twhile (true) {\n\t\t\tchildren.add(parseNot());\n\n\t\t\tcheckPostExpression();\n\t\t\t\n\t\t\tif (tokenIsType(TokenType.OPERATOR) && \"and\".equals(getTokenValue())) {\n\t\t\t\tgetNextToken();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (children.size() == 1) {\n\t\t\treturn children.get(0);\n\t\t}\n\t\t\n\t\treturn new BinaryOperatorNode(\n\t\t\t\t\"and\",\n\t\t\t\tchildren,\n\t\t\t\tBoolean::logicalAnd\n\t\t);\n\t}",
"public Expression andExpression() throws SyntaxException{\r\n\t\tToken firstToken = t;\r\n\t\tExpression e0 = eqExpression();\r\n\t\twhile(t.getKind() == OP_AND) {\r\n\t\t\tToken op = match(OP_AND);\r\n\t\t\tExpression e1 = eqExpression();\r\n\t\t\te0 = new ExpressionBinary(firstToken, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"DSL_Expression_And createDSL_Expression_And();",
"@Override\n public R visit(ConditionalAndExpression n, A argu) {\n R _ret = null;\n n.valueLogical.accept(this, argu);\n n.nodeListOptional.accept(this, argu);\n return _ret;\n }",
"public T caseEFLogicAnd(EFLogicAnd object) {\r\n\t\treturn null;\r\n\t}",
"private Object and(Object left, Object right, EvaluationContext ctx) {\n Boolean l = EvalHelper.getBooleanOrNull( left );\n Boolean r = EvalHelper.getBooleanOrNull( right );\n // have to check for all nulls first to avoid NPE\n if ( (l == null && r == null) || (l == null && r == true) || (r == null && l == true) ) {\n return null;\n } else if ( l == null || r == null ) {\n return false;\n }\n return l && r;\n }",
"private Term parseLogicalAnd(final boolean required) throws ParseException {\n Term t1 = parseComparison(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"&&\") || isKeyword(\"and\")) {\n Term t2 = parseComparison(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.AndB(t1, t2);\n } else {\n reportTypeErrorB2(\"'&&' or 'and'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }",
"public static interface And<C> {\n /**\n * Returns the next object in the chain of anded objects.\n */\n C and();\n }",
"private static Expression matchLogicalAndOrBinaryAnd()\n {\n Expression left = matchEqualityOrAssignment();\n\n while (ScriptParser.tokenizer.match('&'))\n {\n // Match &&\n if (ScriptParser.tokenizer.match('&'))\n {\n if (ExpressionType.isBoolean(left) && left.booleanValue == false)\n {\n // Evaluated to false; we need not evaluate anything up until the next\n // ||, ) or ;.\n while (ScriptParser.tokenizer.tokenNext(\"\\\")\\\"\"))\n {\n if (ScriptParser.tokenizer.tokenIs('('))\n while (ScriptParser.tokenizer.tokenNext(\"\\\")\\\"\"))\n if (ScriptParser.tokenizer.match(')'))\n break;\n if (ScriptParser.tokenizer.tokenIs(')') || ScriptParser.tokenizer.tokenIs('|') || ScriptParser.tokenizer.tokenIs(';'))\n break;\n }\n }\n else\n {\n left = createBoolean(left, \"&&\", matchEqualityOrAssignment());\n }\n }\n // Match &= (assignment)\n else if (ScriptParser.tokenizer.match('='))\n {\n if (!left.type.equals(ExpressionType.Register))\n throw new NslException(\"The left operand must be a variable\", true);\n\n left = new AssignmentExpression(left.integerValue, createMathematical(left, \"&\", matchComplex()));\n Scope.getCurrent().addVar(left.integerValue);\n }\n // Matched &\n else\n {\n left = createMathematical(left, \"&\", matchEqualityOrAssignment());\n }\n }\n\n return left;\n }",
"public final void mLOGICAL_AND() throws RecognitionException {\n try {\n int _type = LOGICAL_AND;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:46:13: ( '&&' )\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:46:15: '&&'\n {\n match(\"&&\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a geometry that shows the hinge. | private void createHingeGeometry(AssetManager manager, int sides, ColorRGBA color) {
Mesh axisMesh = new Mesh();
Vector3f z = axis.normalize();
Vector3f x, y;
if (z.x > z.y && z.x > z.z) {
// x component is largest so cross with unit.y
x = z.cross(Vector3f.UNIT_Y);
y = x.cross(z);
} else {
// y or z component is largest so cross with unit.x
x = z.cross(Vector3f.UNIT_X);
y = x.cross(z);
}
x.normalizeLocal();
y.normalizeLocal();
x.multLocal(radius);
y.multLocal(radius);
// bottom vertex
Vector3f bo = Vector3f.ZERO;
Vector3f to = z.mult(height * .75f);
Vector3f[] vertices = new Vector3f[sides * 3 + 1];
int[] indices = new int[sides * 9];
for (int i = 0; i < sides; ++i) {
float angle = 2 * i * (FastMath.PI / sides);
Vector3f xo = x.mult(FastMath.cos(angle));
Vector3f yo = y.mult(FastMath.sin(angle));
Vector3f offset = xo.add(yo);
vertices[i] = bo.add(offset);
vertices[i + sides] = to.add(offset);
// bottom vertices
int i1 = i;
int i2 = (i + 1) % sides;
int i3 = i + sides;
int i4 = i2 + sides;
int ti = i * 6;
indices[ti] = i3;
indices[ti + 1] = i2;
indices[ti + 2] = i1;
indices[ti + 3] = i4;
indices[ti + 4] = i2;
indices[ti + 5] = i3;
}
int vOffset = sides * 2;
int iOffset = sides * 6;
// cone part.
x.multLocal(1.5f);
y.multLocal(1.5f);
for (int i = 0; i < sides; ++i) {
float angle = 2 * i * (FastMath.PI / sides);
Vector3f xo = x.mult(FastMath.cos(angle));
Vector3f yo = y.mult(FastMath.sin(angle));
Vector3f offset = xo.add(yo);
vertices[i + vOffset] = to.add(offset);
int i1 = vOffset + i;
int i2 = vOffset + ((i + 1) % sides);
int i3 = vertices.length - 1; //top of cone is last index
int ti = i * 3;
indices[iOffset + ti] = i2;
indices[iOffset + ti + 1] = i1;
indices[iOffset + ti + 2] = i3;
}
Vector3f toc = z.mult(height);
vertices[vertices.length - 1] = toc;
axisMesh.setBuffer(VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer(vertices));
axisMesh.setBuffer(VertexBuffer.Type.Index, 3, BufferUtils.createIntBuffer(indices));
axisMesh.updateBound();
hingeGeometry = new Geometry("Axis", axisMesh);
Material mat = manager.loadMaterial("Materials/Physics/RotationAxisMaterial.j3m");
hingeGeometry.setMaterial(mat);
attachChild(hingeGeometry);
} | [
"private Geometry createGeometry()\r\n\t{\t\t\r\n\t\tPoint3f ldf = new Point3f(-X, -Y, Z); // left down front\r\n\t\tPoint3f luf = new Point3f(-X, Y, Z); // left up front\r\n\t\tPoint3f rdf = new Point3f( X, -Y, Z); // right down front\r\n\t\tPoint3f ruf = new Point3f( X, Y, Z); // right up front\r\n\t\t\r\n\t\tPoint3f ldb = new Point3f(-X, -Y, -Z); // left down front\r\n\t\tPoint3f lub = new Point3f(-X, Y, -Z); // left up front\r\n\t\tPoint3f rdb = new Point3f( X, -Y, -Z); // right down front\r\n\t\tPoint3f rub = new Point3f( X, Y, -Z); // right up front\r\n\t\t\r\n\t\tPoint3f[] points = {\r\n\t\t\t\tluf, ldf, rdf, ruf,\r\n\t\t\t\tldf, ldb, rdb, rdf,\r\n\t\t\t\tldb, lub, rub, rdb,\r\n\t\t\t\tlub, luf, ruf, rub,\r\n\t\t\t\tlub, ldb, ldf, luf, \r\n\t\t\t\truf, rdf, rdb, rub\t\t\t\r\n\t\t\t\t\r\n\t\t};\r\n\t\t\r\n\t\tQuadArray qa = new QuadArray(points.length,\tQuadArray.COORDINATES);\r\n\t\tqa.setCoordinates(0, points);\r\n\t\treturn qa;\r\n\t}",
"Geometry getGeometry();",
"EFolge createEFolge();",
"Geometry(){\n setMaterial(new Material());\n setEmmission(Color.black);\n }",
"private Render makeFence(double angle) {\n // Create the holder render object and pivot it\n Render fenceHolder = new Render();\n fenceHolder.translate.setX(0.3);\n fenceHolder.rotateZ.setAngle(angle + 45);\n\n // Create the bottom fence\n Box fence = new Box(0.01, SIZE + 0.2, 0.1);\n fence.setMaterial(new PhongMaterial(FENCE_COLOUR));\n fence.setTranslateZ(0.1);\n // Create the top fence\n Box fence2 = new Box(0.01, SIZE + 0.2, 0.1);\n fence2.setMaterial(new PhongMaterial(FENCE_COLOUR));\n fence2.setTranslateZ(0.25);\n // Create the corner fence post\n Box fencePost = new Box(0.1, 0.1, 0.35);\n fencePost.setMaterial(new PhongMaterial(FENCE_COLOUR));\n fencePost.setTranslateZ(0.35 / 2.0);\n fencePost.setTranslateY((SIZE / 2.0) + 0.1);\n\n // Add the fence components\n fenceHolder.add(fence);\n fenceHolder.add(fence2);\n fenceHolder.add(fencePost);\n\n return fenceHolder;\n }",
"Folge createFolge();",
"public String createH() {\n\t\t// Create H per the algorithm\n\t\t// Create vertices of X --- The number of vertices in X is taken from the paper\n\t\t// k = (2 + epsilon)log n\n\t\tthis.createXVertices();\n\t\t// Create edges within X (both successive and random)\n\t\tthis.createXEdges();\n\n\t\treturn \"H Created (X Vertices)\";\n\n\t}",
"private void createLigth() { \n PointLight lamp = new PointLight();\n lamp.setPosition(Vector3f.ZERO);\n lamp.setColor(ColorRGBA.White);\n rootNode.addLight(lamp); \n }",
"public Geometry getAdjustedGeometry()\r\n {\r\n Coordinate[] coord = matchedShell.getAdjusted();\r\n\r\n Polygon g = (Polygon) feature.getGeometry();\r\n GeometryFactory fact = new GeometryFactory(g.getPrecisionModel(), g.getSRID());\r\n Geometry adjGeom = fact.createPolygon(fact.createLinearRing(coord), cloneHoles(g));\r\n\r\n return adjGeom;\r\n }",
"public Ghost createGhostInky() {\n\t\tGhost ghost3 = new Ghost();\n\t\tghost3.setGhostName(\"Inky\");\n\t\tghost3.setGhostColour(\"cyan\");\n\t\t\n\t\treturn ghost3;\n\t}",
"public HBox createHBox() {\n HBox hbox = new HBox();\n hbox.setPadding(\n new Insets(0, 0,20, 0)\n );\n hbox.setSpacing(20);\n return hbox;\n }",
"Figure create();",
"private void createRoot()\n {\n createGene(LOWER_BOUND, UPPER_BOUND);\n root = new Gene(gene_dimension, parent_hinge);\n creature.add(new Gene(gene_dimension, parent_hinge));\n }",
"public static void setScene() {\n\n Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white));\n \n /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe2 = new Sphere(vec3(2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe3 = new Sphere(vec3(-2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n*/\n Shape globe1T = new Sphere(vec3(0.0, 2, -2.0), 0.3, new Diffuse(new Vec3(1,1,1), white));\n // Shape globe2T = new Sphere(vec3(-0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1),yellow));\n // Shape globe3T = new Sphere(vec3(0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1), yellow));\n\n \n \n Shape globe4 = new Sphere(vec3(0.0, 2, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe5 = new Sphere(vec3(2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe6 = new Sphere(vec3(-2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n \n Shape globe7 = new Sphere(vec3(0.0, 2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe8 = new Sphere(vec3(2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe9 = new Sphere(vec3(-2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe7D = new Sphere(vec3(0.0, -2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n\n Shape globeC = new Sphere(vec3(0.0, 0.0, -6.0), 1.0, new Diffuse(new Vec3(1,1,1), red));\n \n ArrayList<Shape> shapes = new ArrayList<>();\n shapes.add(bg);\n shapes.add(ground);\n shapes.add(globe1T);\n // shapes.add(globe2T);\n // shapes.add(globe3T);\n //shapes.add(globe4);\n //shapes.add(globe5);\n shapes.add(globe7);\n shapes.add(globe8);\n shapes.add(globe9);\n shapes.add(globe7D);\n shapes.add(globeC);\n gr = new Group(shapes);\n /////////////////////////////--------------------------------------\n \n \n }",
"void createShape();",
"void objectCreated (HyperEdge hedge);",
"public Geometry getGeometry();",
"public String getGeometry();",
"private void generateHexagonTessellation(AbstractGraphHandler agh) {\r\n\t\tdouble latitude = 2*sideLength*Math.sin(Math.PI/3);\r\n\t\tdouble altitude = 2*sideLength;\r\n\r\n\t\tfor(int indexLevel=0; indexLevel <= numberOfLevels;indexLevel++){\r\n\t\t\tfor(int indexFigure=0; indexFigure < figuresByLevel; indexFigure++){\r\n\t\t\t\tif(indexLevel%2==0){\r\n\t\t\t\t\tif(indexLevel==numberOfLevels){\r\n\t\t\t\t\t\tagh.newNode((int)(latitude+indexFigure*latitude),(int)(sideLength/2+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tagh.newNode((int)(indexFigure*latitude),(int)(sideLength/2+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tagh.newNode((int)(latitude/2+indexFigure*latitude),(int)(indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tagh.newNode((int)(latitude/2+indexFigure*latitude),(int)(altitude+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\t\tagh.newNode((int)(indexFigure*latitude),(int)(altitude+indexLevel/2*(altitude+sideLength)-sideLength/2));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int indexLevel=0; indexLevel < numberOfLevels; indexLevel++){\r\n\t\t\tif(indexLevel%2==0){\r\n\t\t\t\tagh.newNode((int)(figuresByLevel*latitude),(int)(sideLength/2+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\tagh.newNode((int)(figuresByLevel*latitude),(int)(sideLength+sideLength/2+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tagh.newNode((int)(latitude/2+figuresByLevel*latitude),(int)(altitude+indexLevel/2*(altitude+sideLength)));\r\n\t\t\t\tagh.newNode((int)(latitude/2+figuresByLevel*latitude),(int)(altitude+indexLevel/2*(altitude+sideLength)+sideLength));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int s=agh.getSmallestNodeIndex();s<=agh.getHighestNodeIndex();s++){\r\n\t\t\tfor(int d=agh.getSmallestNodeIndex();d<=agh.getHighestNodeIndex();d++){\r\n\t\t\t\tif(s!=d){\r\n\t\t\t\t\tPoint source = agh.getNodeContainer(s).getCoordinate();\r\n\t\t\t\t\tPoint dest = agh.getNodeContainer(d).getCoordinate();\r\n\t\t\t\t\tdouble distance = source.distance(dest);\r\n\t\t\t\t\tif(distance - sideLength <2){\r\n\t\t\t\t\t\tif(agh.getLinkContainer(s,d)==null && agh.getLinkContainer(d,s)==null){\r\n\t\t\t\t\t\t\tagh.newLink(s,d);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
findChildrenInNonCompliance returns the children associated with the noncompliance. These children may or may not have been a part of the violation. | List<Map> findChildrenInNonCompliance(int idNonCompliance); | [
"List<NonComplianceChild> findNonComplianceChildbyIdNonCompliance(int idNonCompliance);",
"List<Map> findChildrenInViolation (int idNonCompliance);",
"private List<Node> findSheetChildren(){\n if(!getChildren().isEmpty()){\n if(getChildren().get(0) instanceof Region){\n Region region = (Region) getChildren().get(0);\n if(!region.getChildrenUnmodifiable().isEmpty()){\n if(region.getChildrenUnmodifiable().get(0) instanceof Group){\n return ((Group)region.getChildrenUnmodifiable().get(0)).getChildren();\n }\n }\n }\n }\n return new ArrayList<>();\n }",
"void deleteNonComplianceChildByIdNonCompliance(int idNonCompliance);",
"public Container[] findChildren();",
"public void ignoreChildren() {\r\n this.isIgnoreChildren = true;\r\n }",
"public Array getOtherChildren (){\r\n\t\tArray others =new Array ();\r\n\t\tint n =getComponentCount ();\r\n\t\tfor(int i =0;i <n ;i ++){\r\n\t\t\tComponent c =this.getComponent(i );\r\n\t\t\tif(!(c instanceof FormRow)){\r\n\t\t\t\tothers.push(c);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn others;\r\n\t}",
"@Override\n public Collection<? extends IChild<T>> getAllDescendants() {\n throw new RuntimeException(\"not implemented yet!\");\n }",
"public synchronized List<Xen> children() {\n if ( (children == NO_CHILDREN) && notAttrMock())\n children = new ArrayList<Xen>();\n\n return children;\n }",
"public Collection<Triple<String, String, String>> getNotSelectedDiceNodes() {\n if (!(getAnalysisSituation() instanceof NonComparativeAnalysisSituation)) return Collections.emptySet();\n NonComparativeAnalysisSituation as = (NonComparativeAnalysisSituation) getAnalysisSituation();\n\n return diceNodes.stream()\n .filter(x -> {\n DimensionQualification dq = as.getDimensionQualification(x.getLeft());\n if (dq == null) return false;\n if (dq.getDiceNode() == null) return true;\n if (dq.getDiceNode().equals(IRIConstants.RESOURCE_ALL_NODES)) return true;\n return !dq.getDiceNode().equals(x.getRight());\n }).collect(Collectors.toSet());\n }",
"public void skipChildren() {\n \n int childLen = (currentChildren != null) ? currentChildren.getLength() : 0;\n \n for (int i = 0 ; i < childLen ; i++) {\n Node child = nodes.peek();\n if (child.equals(currentChildren.item(i))) {\n nodes.pop();\n }\n }\n }",
"protected final synchronized Iterator<T> children() {\n if( children == null ) {\n children = Collections.emptyList();\n }\n \n return children.iterator();\n }",
"public Group[] fetchGroupsNotInProject(int projectId, boolean withChildren);",
"public ArrayList<BoardTree> getChildren() {\n final ArrayList<BoardTree> children = new ArrayList<>();\n\n int[][] possibleMoves = getPossibleMoves(this.board, this.isPlayersMove);\n \n // For each possible move, add a child node\n for (int[] possMove : possibleMoves) {\n if (numNodes >= MAX_NUM_NODES) return children;\n\n final int[][] updatedBoard = applyMove(this.board, possMove);\n \n final BoardTree newChild = new BoardTree(possMove, updatedBoard, this.isPlayersMove);\n\n children.add(newChild);\n }\n\n // If the node we are creating children for does not have any possible moves for it's \n //player, but the opponent does, make this node belong to the other player, and get \n //it's children.\n // This handles the case where a player has \"boxed off\" an area.\n if (possibleMoves.length < 1 && Utils.hasMove(board)) {\n this.isPlayersMove = !this.isPlayersMove;\n return this.getChildren();\n }\n return children;\n }",
"public String[] findDescendants(){\r\n return null;\r\n }",
"List<N> getDescendants() ;",
"public List<Child> getChildrenWithoutSelected() {\n mChildren = getChildren();\n childSelected();\n mChildren.remove(mChild);\n return mChildren;\n }",
"public final Set<Node> getAllWarningNodes() {\n\t\tSet<Node> result = new HashSet<Node>();\n\t\tif (this.containsWarnings()) {\n\t\t\tresult.add(this);\n\t\t}\n\t\tfor (final Node child : this.getChildrenNodesAsArray()) {\n\t\t\tresult.addAll(child.getAllWarningNodes());\n\t\t}\n\n\t\tresult = Collections.unmodifiableSet(result);\n\n\t\tContract.ensureResultNotNull(result);\n\t\treturn result;\n\t}",
"private List<Node> findChildren(Node node) {\n double max = Double.NEGATIVE_INFINITY;\n List<Node> list = new ArrayList<Node>();\n for (Node child : node.children) {\n double ucb = child.ucb1();\n if (ucb > max) {\n list.clear();\n list.add(child);\n max = ucb;\n } else if (ucb == max) {\n list.add(child);\n }\n }\n return list;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the date time. | public String getDateTime() {
log.trace("Get dateTime, returns [{}]", dateTime);
return dateTime;
} | [
"public Date getDate() {\n\t\tlong time = getTime(ntpTime);\n\t\treturn new Date(time);\n\t}",
"public Date getCrtTime() {\n return crtTime;\n }",
"public Date getCrttime() {\n return crttime;\n }",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }",
"public String gettDate() {\n return tDate;\n }",
"public Date getEventTime() {\n return eventTime;\n }",
"public String getDatetime() {\n return datetime;\n }",
"public static String getTime(){\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss SS\");\n return df.format(new java.util.Date());\n }",
"public Date getTimeAt() {\n return timeAt;\n }",
"public static String getTimeAndDate() {\n \n\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t //get current date time with Date()\n\t Date date = new Date();\n\t \n String Date = dateFormat.format(date);\n return Date;\n }",
"public Date getDatetime() {\n\t\treturn datetime;\n\t}",
"public String getTime() {\r\n return this.time;\r\n }",
"public Date getCdtooltime() {\r\n return cdtooltime;\r\n }",
"public static String getTimeandDate(){\r\n return DateFormat.getDateTimeInstance().format(new Date());//pobranie aktualnej daty i czasu\r\n }",
"public Date getLogintime() {\r\n return logintime;\r\n }",
"public Date getDatetime() {\n return datetime;\n }",
"public Date getAtTime() {\r\n return atTime;\r\n }",
"public String getReturnDatetime() {\n return returnDatetime;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column litemall_bankcard_auth_call.response_date | public void setResponseDate(LocalDateTime responseDate) {
this.responseDate = responseDate;
} | [
"public void setDateResponsed(Date dateResponsed);",
"@Override\n\tpublic void setRequestResponseTime(java.util.Date requestResponseTime) {\n\t\t_historyInterfaceRequestField.setRequestResponseTime(requestResponseTime);\n\t}",
"public void setCallDate(String callDate) {\r\n this.callDate = callDate;\r\n }",
"public void setDateHeader(FullHttpResponse response) {\r\n SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);\r\n dateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE));\r\n\r\n Calendar time = new GregorianCalendar();\r\n response.headers().set(HttpHeaders.Names.DATE, dateFormatter.format(time.getTime()));\r\n }",
"public void setReturnDate(Date returnDate);",
"@Override\n\tpublic void setReturnedDate(Date returnedDate) {\n\t\t_eprocurementRequest.setReturnedDate(returnedDate);\n\t}",
"private static void setDateHeader(FullHttpResponse response) {\n SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);\n dateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE));\n\n Calendar time = new GregorianCalendar();\n response.headers().set(DATE, dateFormatter.format(time.getTime()));\n }",
"public static void setDateHeader(HttpResponse response) {\n\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);\n\t\tdateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE));\n\n\t\tCalendar time = new GregorianCalendar();\n\t\tresponse.setHeader(HttpHeaders.Names.DATE, dateFormatter.format(time.getTime()));\n\t}",
"public void setApplResultDate(Date applResultDate) {\r\n\t\tthis.applResultDate = applResultDate;\r\n\t}",
"public void setEXPIRY_DATE(Date EXPIRY_DATE)\r\n {\r\n\tthis.EXPIRY_DATE = EXPIRY_DATE;\r\n }",
"public void setRequestDate(Date requestDate);",
"public void setRequestDate(Date requestDate) { this.requestDate = requestDate; }",
"public void setDATE_AUTHORIZED(Date DATE_AUTHORIZED) {\r\n this.DATE_AUTHORIZED = DATE_AUTHORIZED;\r\n }",
"public void setEXPIRY_DATE(Date EXPIRY_DATE) {\r\n this.EXPIRY_DATE = EXPIRY_DATE;\r\n }",
"public void setRemindDate(Date remindDate);",
"public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) {\n if (date == null) {\n response.setHeader(HEADER_EXPIRES, \"-1\");\n }\n else {\n response.setHeader(HEADER_EXPIRES, formatDate(date));\n }\n }",
"public void setResponsedByUserId(long responsedByUserId);",
"public void setDATE_AUTH(Date DATE_AUTH) {\r\n this.DATE_AUTH = DATE_AUTH;\r\n }",
"public void setDate (Date newDate) {\r\n this.dateAttempt = newDate;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether or not the agent runs on weekends, only relevant for DAILY or MORE_THAN_DAILY | public boolean getRunOnWeekends(); | [
"public boolean isWeekend()\r\n {\r\n DayOfWeek dd=getDay(getDepartingDate());\r\n DayOfWeek rd=getDay(getReturningDate());\r\n if((dd==DayOfWeek.FRIDAY||dd==DayOfWeek.SATURDAY||dd==DayOfWeek.SUNDAY)||(rd==DayOfWeek.FRIDAY||rd==DayOfWeek.SATURDAY||rd==DayOfWeek.SUNDAY))\r\n return true;\r\n else \r\n return false;\r\n }",
"public static boolean itsWeekend(GregorianCalendar now) {\n int today = now.get(Calendar.DAY_OF_WEEK);\n return today == Calendar.SUNDAY || today == Calendar.SATURDAY;\n }",
"public boolean isWeekends() {\n\t\treturn flag_weekends;\n\t}",
"public static Matcher<LocalDateTime> isWeekend() {\r\n\t\treturn isDayOfWeek(SATURDAY, SUNDAY);\r\n\t}",
"public boolean isShowWeekends() {\n return getShowWeekends() != null && getShowWeekends();\n }",
"public boolean isWeekdays() {\n\t\treturn flag_weekdays;\n\t}",
"public static ZonedTemporalMatcher<Date, ZoneId> isWeekend() {\r\n return isDayOfWeek(SATURDAY, SUNDAY);\r\n }",
"public boolean getOnWeekend() {\r\n\t\treturn onWeekend;\r\n\t}",
"private boolean getWeekend() {\n\t\t// sunday, mon, tues, wed ... saturday\n\t\t// 1,2,3,4,...7\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tint day = calendar.get(Calendar.DAY_OF_WEEK);\n\t\tif (day == 1 || day == 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isWeekend(final Calendar date) {\n return Calendar.SATURDAY == date.get(Calendar.DAY_OF_WEEK)\n || Calendar.SUNDAY == date.get(Calendar.DAY_OF_WEEK);\n }",
"boolean hasIsEveryDay();",
"public boolean isLastWeekFull() {\r\n\t\tif (flsaDays.size() == 7) {\r\n\t\t\treturn (flsaTime.isAfter(payPeriodBeginTime)) ? false : true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean isDoseDaily() {\n return getDays().size() == 7;\n }",
"public void setOnWeekend(boolean b) {\r\n\t\tthis.onWeekend=b;\r\n\t}",
"public boolean checkWeekday(Calendar today) \r\n\t{\r\n\t\r\n\t\t\r\n\t\t\r\n\t\tif(today.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(today.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"boolean hasDayNight();",
"CategoryReportBuilder inWorkingDays();",
"protected void checkWeekDay(){\n\t\t//Check if weekends should be skipped\n\t\tif(!skipDays.isEmpty()){\n\t\t\twhile(skipDays.contains(caseStartTime.get(Calendar.DAY_OF_WEEK))){\n\t\t\t\tincreaseOverallCaseTimeByOneDay();\n\t\t\t}\n\t\t}\n\t}",
"boolean hasWeek7();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extract text from a TIFF image | @Test(description = "Extract text from an image - TIFF", groups = { "example_ocr" })
public void test_C_Extract_Text_From_Image_OCR_TIFF() throws Exception {
try {
OCRProcessor ocrProcessor = new OCRProcessor();
ocrProcessor.getTextInImage("resources/images/ocrimage.tiff");
}
catch(Exception e) { throw e; }
} | [
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"@Test(description = \"Extract text from an image - PNG\", groups = { \"example_ocr\" })\n public void test_A_Extract_Text_From_Image_OCR_PNG() throws Exception {\n \n try { \n \n OCRProcessor ocrProcessor = new OCRProcessor();\n \n ocrProcessor.getTextInImage(\"resources/images/ocrimage.PNG\"); \n \n }\n catch(Exception e) { throw e; }\n \n }",
"@Test(description = \"Extract text from an image - JPG\", groups = { \"example_ocr\" })\n public void test_B_Extract_Text_From_Image_OCR_JPG() throws Exception {\n \n try { \n \n OCRProcessor ocrProcessor = new OCRProcessor();\n \n ocrProcessor.getTextInImage(\"resources/images/ocrimage.jpg\"); \n \n }\n catch(Exception e) { throw e; }\n \n }",
"private ArrayList<String> analyzeTIFF(){\n\t\t\n\t\t//get hocr and txt file\n\t\tScanner in = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter file name(including absolute path):\");\n\t\tString inputTiff = in.nextLine();\n//\t\tString inputTiff = \"/Users/Grace/Desktop/inputTiff/39653_003.tif\";\t\t\n//\t\toutput hocr file and txt file will be in the same folder with the input tiff file\n\t\tString outputHocrName = inputTiff.replace(\".tif\", \"\");\n\t\thocrFile = outputHocrName;\n\t\tString outputTxtName = inputTiff.replace(\".tif\", \"\");\n\t\tString txtFile = outputTxtName;\n\t\t//my tesseract absolute path with one space at the end\n\t\tString tessPath=\"/usr/local/Cellar/tesseract/3.04.01_1/bin/tesseract \";\n\t\tString command1 = tessPath + inputTiff + \" \" + hocrFile+\" hocr\";\n\t\tString command2 = tessPath + inputTiff + \" \" + txtFile;\n\t\tProcess p;\n\t\ttry {\n\t\t\tp = Runtime.getRuntime().exec(command1);\n\t\t\tp = Runtime.getRuntime().exec(command2);\n\t\t\tp.waitFor();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//get txt output content\n\t\tString txtOutput = \"\";\n\t\tBufferedReader br;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(txtFile+\".txt\"));\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tsb.append(line);\n\t\t\t\tsb.append(System.lineSeparator());\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\ttxtOutput = sb.toString();\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//using Stanford NER to get names from the text file generated by tesseract\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tAbstractSequenceClassifier<CoreLabel> classifier;\n\t\t//give absolute path of english.all.3class.distsim.crf.ser.gz file\n\t\tString serializedClassifier = \"/Users/Grace/Downloads/stanford-ner-2015-12-09/classifiers/english.all.3class.distsim.crf.ser.gz\";\n\t\ttry {\n\t\t\tclassifier = CRFClassifier.getClassifier(serializedClassifier);\n\t\t\tString[] example = txtOutput.split(\"\\n\");\n\t\t\tfor (String str : example) {\n\t\t\t\tstr = str.replaceAll(\"&\", \"&\");\n\t\t\t\tstr = str.replaceAll( \"&([^;]+(?!(?:\\\\w|;)))\", \"&$1\" );\n\t\t\t\tstr = str.replaceAll(\"<\", \". <\");\n\t\t\t\tstr = str.replaceAll(\"\\\"\", \""\");\n\t\t\t\tstr = str.replaceAll(\"'\",\"'\");\n\t\t\t\tstr = str.replaceAll(\">\", \". >\");\n\t\t\t\tString xml = \"<root>\" + classifier.classifyToString(str, \"xml\", true) + \"</root>\";\n\t\t\t\tDocument doc = DocumentHelper.parseText(xml);\n\t\t\t\tElement rootElt = doc.getRootElement();\n\t\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\t\tIterator iter = rootElt.elementIterator(\"wi\");\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tElement recordEle = (Element) iter.next();\n\t\t\t\t\tif (recordEle.attributeValue(\"entity\").equals(\"PERSON\")) {\n\t\t\t\t\t\tnames.add(recordEle.getText());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (DocumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn names;\n\t}",
"String ImageFileToText(String imagefile, String langId, String configs);",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public boolean translateImageToText();",
"private static void RecognizeTextOCRLocal(ComputerVisionClient computerVisionClient, String localImagePath){\n try {\n File rawImage = new File(localImagePath);\n byte[] localImageBytes = Files.readAllBytes(rawImage.toPath());\n\n OcrResult ocrResult = computerVisionClient.computerVision().recognizePrintedTextInStream()\n .withDetectOrientation(true)\n .withImage(localImageBytes)\n .withLanguage(OcrLanguages.EN)\n .execute();\n\n System.out.println(\"\\nExtracting text from local image with OCR ...\");\n System.out.println(\"\\nLanguage: \" + ocrResult.language());\n System.out.printf(\"Text angle: %1.3f\\n\", ocrResult.textAngle());\n System.out.println(\"Orientation: \" + ocrResult.orientation());\n\n for (OcrRegion reg : ocrResult.regions()) {\n for (OcrLine line : reg.lines()) {\n System.out.print(\"\\nLine:\");\n for (OcrWord word : line.words()) {\n System.out.println(\"\\nWord bounding box: \" + word.boundingBox());\n System.out.println(\"Text: \" + word.text() + \" \");\n }\n System.out.println();\n }\n // System.out.println();\n }\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n private Catalog extract(Job job, Attachment image) throws TextAnalyzerException, MediaPackageException {\n\n final Attachment attachment;\n final URI imageUrl;\n\n // Make sure the attachment is a tiff\n\n // Make sure this image is of type tif\n if (!image.getURI().getPath().endsWith(\".tif\")) {\n try {\n logger.info(\"Converting \" + image + \" to tif format\");\n Job conversionJob;\n conversionJob = composerService.convertImage(image, TIFF_CONVERSION_PROFILE);\n JobBarrier barrier = new JobBarrier(serviceRegistry, conversionJob);\n Result result = barrier.waitForJobs();\n if (!result.isSuccess()) {\n throw new TextAnalyzerException(\"Unable to convert \" + image + \" to tiff\");\n }\n conversionJob = serviceRegistry.getJob(conversionJob.getId()); // get the latest copy\n attachment = (Attachment) MediaPackageElementParser.getFromXml(conversionJob.getPayload());\n imageUrl = attachment.getURI();\n } catch (EncoderException e) {\n throw new TextAnalyzerException(e);\n } catch (NotFoundException e) {\n throw new TextAnalyzerException(e);\n } catch (ServiceRegistryException e) {\n throw new TextAnalyzerException(e);\n }\n } else {\n attachment = (Attachment) image;\n imageUrl = attachment.getURI();\n }\n\n try {\n Mpeg7CatalogImpl mpeg7 = Mpeg7CatalogImpl.newInstance();\n\n logger.info(\"Starting text extraction from {}\", imageUrl);\n\n File imageFile;\n try {\n imageFile = workspace.get(imageUrl);\n } catch (NotFoundException e) {\n throw new TextAnalyzerException(\"Image \" + imageUrl + \" not found in workspace\", e);\n } catch (IOException e) {\n throw new TextAnalyzerException(\"Unable to access \" + imageUrl + \" in workspace\", e);\n }\n VideoText[] videoTexts = analyze(imageFile, image.getIdentifier());\n\n // Create a temporal decomposition\n MediaTime mediaTime = new MediaTimeImpl(0, 0);\n Video avContent = mpeg7.addVideoContent(image.getIdentifier(), mediaTime, null);\n TemporalDecomposition<VideoSegment> temporalDecomposition = (TemporalDecomposition<VideoSegment>) avContent\n .getTemporalDecomposition();\n\n // Add a segment\n VideoSegment videoSegment = temporalDecomposition.createSegment(\"segment-0\");\n videoSegment.setMediaTime(mediaTime);\n\n // Add the video text to the spacio temporal decomposition of the segment\n SpatioTemporalDecomposition spatioTemporalDecomposition = videoSegment.createSpatioTemporalDecomposition(true,\n false);\n for (VideoText videoText : videoTexts) {\n spatioTemporalDecomposition.addVideoText(videoText);\n }\n\n logger.info(\"Text extraction of {} finished, {} lines found\", attachment.getURI(), videoTexts.length);\n\n URI uri;\n try {\n uri = workspace.putInCollection(COLLECTION_ID, job.getId() + \".xml\", mpeg7CatalogService.serialize(mpeg7));\n } catch (IOException e) {\n throw new TextAnalyzerException(\"Unable to put mpeg7 into the workspace\", e);\n }\n Catalog catalog = (Catalog) MediaPackageElementBuilderFactory.newInstance().newElementBuilder()\n .newElement(Catalog.TYPE, MediaPackageElements.TEXTS);\n catalog.setURI(uri);\n\n logger.info(\"Finished text extraction of {}\", imageUrl);\n\n return catalog;\n } catch (Exception e) {\n logger.warn(\"Error extracting text from \" + imageUrl, e);\n if (e instanceof TextAnalyzerException) {\n throw (TextAnalyzerException) e;\n } else {\n throw new TextAnalyzerException(e);\n }\n }\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"String ImageBufferToText(byte[] imageBuf, int width, int height, int bpp, String langId, String configs);",
"public static String scanPhoto(Bitmap bitmap) {\n\t\t\n\t\tTessBaseAPI baseApi = new TessBaseAPI();\n\t\tbaseApi.setDebug(true);\n\t\tbaseApi.init(DATA_PATH, lang);\n\t\t//set the black list \n\t\tbaseApi.setVariable(\"tessedit_char_blacklist\",\"':;,.?/\\\\}][{!@#$%^&*()-_=+~\");\n\t\tbaseApi.setVariable(\"save_blob_choices\", \"T\");\n\t\t\n\t\tbaseApi.setImage(bitmap);\n\t\t\n\t\tString recognizedText = baseApi.getUTF8Text();\n\t\t\n\t\t//Iterate over the results and print confidence values for debugging purposes\n\t\tfinal ResultIterator iterator = baseApi.getResultIterator();\n\t\tString lastUTF8Text;\n\t\tfloat lastConfidence;\n\t\titerator.begin();\n\t\tdo {\n\t\t lastUTF8Text = iterator.getUTF8Text(PageIteratorLevel.RIL_WORD);\n\t\t lastConfidence = iterator.confidence(PageIteratorLevel.RIL_WORD);\n\t\t if(lastConfidence>50){\n\t\t \t Log.d(TAG, String.format(\"%s => %.2f\",lastUTF8Text,lastConfidence));\n\t\t }\n\t\t \n\t\t} while (iterator.next(PageIteratorLevel.RIL_WORD));\n\t\t\t\t\n\t\tbaseApi.end();\n\n\t\tLog.d(TAG, recognizedText);\n\t\t\n\t\treturn recognizedText;\n\t}",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public static String getText(String path) {\n\t\t//read a low quality image to save memory\n\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\toptions.inSampleSize = 4;\n\t\ttry {\n\n\t\t\tBitmap temp_bitmap = BitmapFactory.decodeFile(path, options);\n\t\t\tExifInterface exif = new ExifInterface(path);\n\t\t\n\t\t//Correct the orientation of the bitmap\n\t\ttemp_bitmap = ImageProcessor.correctOrientation(temp_bitmap,exif);\n\t\tBitmap bitmap = ImageProcessor.optimizeBitmap(temp_bitmap);\n\t\t\n\t\tString recognizedText = BookSearchApp.scanPhoto(bitmap);\n\n\t\t//remove some wrong results\n\t\tif (BookSearchApp.lang.equalsIgnoreCase(\"eng\")) {\n\t\t\trecognizedText = recognizedText.replaceAll(\"[^a-zA-Z0-9]+\", \"\");\n\t\t}\n\n\t\trecognizedText = recognizedText.trim();\n\t\treturn recognizedText;\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t//if there is a error with the SD card\n\t\t\tLog.d(TAG,\"Error reading from SD Card\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"private static void RecognizeTextOCRRemote(ComputerVisionClient computerVisionClient, String remoteImageURL){\n try {\n OcrResult ocrResult = computerVisionClient.computerVision().recognizePrintedText()\n .withDetectOrientation(true)\n .withUrl(remoteImageURL)\n .withLanguage(OcrLanguages.EN)\n .execute();\n\n System.out.println(\"\\nExtracting text from remote image with OCR ...\");\n System.out.println(\"\\nLanguage: \" + ocrResult.language());\n System.out.printf(\"Text angle: %1.3f\\n\", ocrResult.textAngle());\n System.out.println(\"Orientation: \" + ocrResult.orientation());\n\n for (OcrRegion reg : ocrResult.regions()) {\n for (OcrLine line : reg.lines()) {\n System.out.print(\"\\nLine:\");\n for (OcrWord word : line.words()) {\n System.out.println(\"\\nWord bounding box: \" + word.boundingBox());\n System.out.println(\"Text: \" + word.text() + \" \");\n }\n System.out.println();\n }\n // System.out.println();\n }\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"public String extractString(String stego_image)\n{\n\tFile insFile=new File(stego_image);\n\n\tFileInputStream ins = null;\n\ttry {\n\t\tins = new FileInputStream(insFile);\n\t} catch (FileNotFoundException e2) {\n\t\t// TODO Auto-generated catch block\n\t\te2.printStackTrace();\n\t}\n\t//FileOutputStream out = new FileOutputStream(\"stego\" +cover_filename);\n\t\n //STEP 1:\n //check if there is enough space for header in the file, if there is not, this is not a bmp file!\n\tint sizeInBits=(int)insFile.length()*8; //taken from FileReader\n\tsizeInBits=sizeInBits-8*54;\n\tif(sizeInBits<0){\n\t\tSystem.out.println(\"The File format is invalid\");\n\t\treturn \"Fail\";\n\t}\n\t\n\t\n\t//STEP 2:\n\t//BMP HEADER storage into the bytes54[] array \n\tint readin;\n\tint byt54 []= new int[54];\n\t\n\tfor(int j = 0;j<54;j++){\n\t\ttry {\n\t\t\tbyt54[j]=ins.read();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\n\t\n\t//STEP 3: \n\t//Get rest of file\n\t//Stack<Integer> stack=new Stack<Integer>(); \n\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\n\ttry {\n\t\twhile((readin=ins.read())!=-1){\n\t\t//\tstack.push(new Integer(readin));\n\t\t\tlist.add(new Integer(readin));\n\t\t}\n\t} catch (IOException e1) {\n\t\t// TODO Auto-generated catch block\n\t\te1.printStackTrace();\n\t}\n\t\n\tint[] restOfBytes=new int[list.size()];// number of elements in the list\n\t\n\tfor(int j=0;j<restOfBytes.length;j++){\n\t\trestOfBytes[j]=(int)list.get(j);//(int)stack.pop();\n\t}\n\t\n\t\n\t\n\t//Step 3.5 get the extension and the size bits\n\tArrayList<Integer> extensionBits=new ArrayList<Integer>();\n\tArrayList<Integer> sizeBits=new ArrayList<Integer>();\n\t\n\tint placeHolder=0;\n\tfor(int j=0;j<32;j++){\n\t\tsizeBits.add(new Integer(restOfBytes[j]&0x1));\n\t}\n\tplaceHolder=32;\n\tfor(int j=0;j<64;j++){\n\t\textensionBits.add(new Integer(restOfBytes[j+placeHolder]&0x1));\n\t}\n\tplaceHolder=96;\n\t\n\tint size=retrieveSize(sizeBits);\n\tSystem.out.println(\"Size is the \" + size);\n\tString extension=retrieveExtension(extensionBits);\n\tSystem.out.println(\"\\n The extension is: \\\"\" + extension + \"\\\" . As in, there is no extension, it is only a string and not a file that was hidden. \\n\\n\\n\\n\\n\");\n\t\n\t//Extract String\n\tString actualString=\"\";\n\tString binary=\"\";\n\tStringBuilder stringBuilder =new StringBuilder();\n\t\n\tfor(int j=0;j<size;j++){\n\t\trestOfBytes[j+placeHolder]&=0x1;\n\t\tbinary= binary + restOfBytes[j+placeHolder]; //concatenation\n\t\tif(binary.length()==16){\n\t\t\tstringBuilder=new StringBuilder(binary);\n\t\t\tbinary=stringBuilder.reverse().toString();\n\t\t\tactualString+=(char)Integer.parseInt(binary, 2);\n\t\t\tbinary=\"\";\n\t\t}\n\t\t\n\t}\n\t\n\treturn actualString;\n\t\n\t\n}",
"public Mono<Void> detectText(String imageUri) throws IOException {\n List<AnnotateImageRequest> requests = new ArrayList<>();\n\n ImageSource imgSource = ImageSource.newBuilder().setImageUri(imageUri).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Type.TEXT_DETECTION).build();\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n\n // Initialize client that will be used to send requests. This client only needs to be created\n // once, and can be reused for multiple requests. After completing all of your requests, call\n // the \"close\" method on the client to safely clean up any remaining background resources.\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return Mono.empty();\n }\n\n // For full list of available annotations, see http://g.co/cloud/vision/docs\n for (EntityAnnotation annotation : res.getTextAnnotationsList()) {\n System.out.format(\"Text: %s%n\", annotation.getDescription());\n //System.out.format(\"Position : %s%n\", annotation.getBoundingPoly());\n }\n }\n }\n return Mono.empty();\n }",
"public Image getTrebleClef();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__LayerSegment__Group__3__Impl" $ANTLR start "rule__LayerSegment__Group__4" InternalMyDsl.g:4416:1: rule__LayerSegment__Group__4 : rule__LayerSegment__Group__4__Impl rule__LayerSegment__Group__5 ; | public final void rule__LayerSegment__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:4420:1: ( rule__LayerSegment__Group__4__Impl rule__LayerSegment__Group__5 )
// InternalMyDsl.g:4421:2: rule__LayerSegment__Group__4__Impl rule__LayerSegment__Group__5
{
pushFollow(FOLLOW_43);
rule__LayerSegment__Group__4__Impl();
state._fsp--;
pushFollow(FOLLOW_2);
rule__LayerSegment__Group__5();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Lane__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9485:1: ( rule__Lane__Group__4__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9486:2: rule__Lane__Group__4__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Lane__Group__4__Impl_in_rule__Lane__Group__419732);\r\n rule__Lane__Group__4__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Layer__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:4285:1: ( rule__Layer__Group__4__Impl )\n // InternalMyDsl.g:4286:2: rule__Layer__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Layer__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Rules__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8619:1: ( rule__Rules__Group__4__Impl )\n // InternalDsl.g:8620:2: rule__Rules__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Rules__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Language__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1504:1: ( ( ( rule__Language__Group_4__0 )? ) )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1505:1: ( ( rule__Language__Group_4__0 )? )\n {\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1505:1: ( ( rule__Language__Group_4__0 )? )\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1506:1: ( rule__Language__Group_4__0 )?\n {\n before(grammarAccess.getLanguageAccess().getGroup_4()); \n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1507:1: ( rule__Language__Group_4__0 )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==15) ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // ../org.xtext.example.mydsl.extensions.ui/src-gen/org/xtext/example/mydsl/extensions/ui/contentassist/antlr/internal/InternalMyDsl.g:1507:2: rule__Language__Group_4__0\n {\n pushFollow(FollowSets000.FOLLOW_rule__Language__Group_4__0_in_rule__Language__Group__4__Impl2944);\n rule__Language__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getLanguageAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Interface__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5322:1: ( ( ( rule__Interface__Group_4__0 )? ) )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5323:1: ( ( rule__Interface__Group_4__0 )? )\r\n {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5323:1: ( ( rule__Interface__Group_4__0 )? )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5324:1: ( rule__Interface__Group_4__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getInterfaceAccess().getGroup_4()); \r\n }\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5325:1: ( rule__Interface__Group_4__0 )?\r\n int alt37=2;\r\n int LA37_0 = input.LA(1);\r\n\r\n if ( (LA37_0==49) ) {\r\n alt37=1;\r\n }\r\n switch (alt37) {\r\n case 1 :\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5325:2: rule__Interface__Group_4__0\r\n {\r\n pushFollow(FOLLOW_rule__Interface__Group_4__0_in_rule__Interface__Group__4__Impl10826);\r\n rule__Interface__Group_4__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getInterfaceAccess().getGroup_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Lane__Group__4__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9496:1: ( ( '}' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9497:1: ( '}' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9497:1: ( '}' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9498:1: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLaneAccess().getRightCurlyBracketKeyword_4()); \r\n }\r\n match(input,68,FOLLOW_68_in_rule__Lane__Group__4__Impl19760); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLaneAccess().getRightCurlyBracketKeyword_4()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__GrupoSeguridad__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:7480:1: ( ( ( rule__GrupoSeguridad__Group_4__0 )? ) )\n // InternalCeffective.g:7481:1: ( ( rule__GrupoSeguridad__Group_4__0 )? )\n {\n // InternalCeffective.g:7481:1: ( ( rule__GrupoSeguridad__Group_4__0 )? )\n // InternalCeffective.g:7482:2: ( rule__GrupoSeguridad__Group_4__0 )?\n {\n before(grammarAccess.getGrupoSeguridadAccess().getGroup_4()); \n // InternalCeffective.g:7483:2: ( rule__GrupoSeguridad__Group_4__0 )?\n int alt70=2;\n int LA70_0 = input.LA(1);\n\n if ( (LA70_0==45) ) {\n alt70=1;\n }\n switch (alt70) {\n case 1 :\n // InternalCeffective.g:7483:3: rule__GrupoSeguridad__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__GrupoSeguridad__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getGrupoSeguridadAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Model__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:712:1: ( ( ( rule__Model__Group_4__0 )* ) )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:713:1: ( ( rule__Model__Group_4__0 )* )\n {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:713:1: ( ( rule__Model__Group_4__0 )* )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:714:1: ( rule__Model__Group_4__0 )*\n {\n before(grammarAccess.getModelAccess().getGroup_4()); \n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:715:1: ( rule__Model__Group_4__0 )*\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==21) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:715:2: rule__Model__Group_4__0\n \t {\n \t pushFollow(FOLLOW_rule__Model__Group_4__0_in_rule__Model__Group__4__Impl1463);\n \t rule__Model__Group_4__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n\n after(grammarAccess.getModelAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Rule__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:8766:1: ( ( ( rule__Rule__Group_4__0 )? ) )\n // InternalDsl.g:8767:1: ( ( rule__Rule__Group_4__0 )? )\n {\n // InternalDsl.g:8767:1: ( ( rule__Rule__Group_4__0 )? )\n // InternalDsl.g:8768:2: ( rule__Rule__Group_4__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getRuleAccess().getGroup_4()); \n }\n // InternalDsl.g:8769:2: ( rule__Rule__Group_4__0 )?\n int alt66=2;\n int LA66_0 = input.LA(1);\n\n if ( (LA66_0==79) ) {\n alt66=1;\n }\n switch (alt66) {\n case 1 :\n // InternalDsl.g:8769:3: rule__Rule__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__Rule__Group_4__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getRuleAccess().getGroup_4()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Operation__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3121:1: ( ( ( rule__Operation__Group_4__0 )? ) )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3122:1: ( ( rule__Operation__Group_4__0 )? )\n {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3122:1: ( ( rule__Operation__Group_4__0 )? )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3123:1: ( rule__Operation__Group_4__0 )?\n {\n before(grammarAccess.getOperationAccess().getGroup_4()); \n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3124:1: ( rule__Operation__Group_4__0 )?\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==45) ) {\n alt18=1;\n }\n switch (alt18) {\n case 1 :\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3124:2: rule__Operation__Group_4__0\n {\n pushFollow(FOLLOW_rule__Operation__Group_4__0_in_rule__Operation__Group__4__Impl6291);\n rule__Operation__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getOperationAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__LayerSegment__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:4447:1: ( rule__LayerSegment__Group__5__Impl )\n // InternalMyDsl.g:4448:2: rule__LayerSegment__Group__5__Impl\n {\n pushFollow(FOLLOW_2);\n rule__LayerSegment__Group__5__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__S_Action__Group__4__Impl() throws RecognitionException {\n int rule__S_Action__Group__4__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 437) ) { return ; }\n // InternalGaml.g:7917:1: ( ( ( rule__S_Action__Group_4__0 )? ) )\n // InternalGaml.g:7918:1: ( ( rule__S_Action__Group_4__0 )? )\n {\n // InternalGaml.g:7918:1: ( ( rule__S_Action__Group_4__0 )? )\n // InternalGaml.g:7919:1: ( rule__S_Action__Group_4__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getS_ActionAccess().getGroup_4()); \n }\n // InternalGaml.g:7920:1: ( rule__S_Action__Group_4__0 )?\n int alt99=2;\n int LA99_0 = input.LA(1);\n\n if ( (LA99_0==123) ) {\n alt99=1;\n }\n switch (alt99) {\n case 1 :\n // InternalGaml.g:7920:2: rule__S_Action__Group_4__0\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__S_Action__Group_4__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getS_ActionAccess().getGroup_4()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 437, rule__S_Action__Group__4__Impl_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Model__Group__4() throws RecognitionException {\n int rule__Model__Group__4_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 292) ) { return ; }\n // InternalGaml.g:5670:1: ( rule__Model__Group__4__Impl )\n // InternalGaml.g:5671:2: rule__Model__Group__4__Impl\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__Model__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 292, rule__Model__Group__4_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Servidor_Impl__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:5752:1: ( ( ( rule__Servidor_Impl__Group_4__0 )? ) )\n // InternalCeffective.g:5753:1: ( ( rule__Servidor_Impl__Group_4__0 )? )\n {\n // InternalCeffective.g:5753:1: ( ( rule__Servidor_Impl__Group_4__0 )? )\n // InternalCeffective.g:5754:2: ( rule__Servidor_Impl__Group_4__0 )?\n {\n before(grammarAccess.getServidor_ImplAccess().getGroup_4()); \n // InternalCeffective.g:5755:2: ( rule__Servidor_Impl__Group_4__0 )?\n int alt52=2;\n int LA52_0 = input.LA(1);\n\n if ( (LA52_0==45) ) {\n alt52=1;\n }\n switch (alt52) {\n case 1 :\n // InternalCeffective.g:5755:3: rule__Servidor_Impl__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__Servidor_Impl__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getServidor_ImplAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Css__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:10809:1: ( rule__Css__Group__4__Impl rule__Css__Group__5 )\n // InternalMyDsl.g:10810:2: rule__Css__Group__4__Impl rule__Css__Group__5\n {\n pushFollow(FOLLOW_7);\n rule__Css__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Css__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Operation__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalXModel.g:1954:1: ( ( ( rule__Operation__Group_4__0 )? ) )\n // InternalXModel.g:1955:1: ( ( rule__Operation__Group_4__0 )? )\n {\n // InternalXModel.g:1955:1: ( ( rule__Operation__Group_4__0 )? )\n // InternalXModel.g:1956:2: ( rule__Operation__Group_4__0 )?\n {\n before(grammarAccess.getOperationAccess().getGroup_4()); \n // InternalXModel.g:1957:2: ( rule__Operation__Group_4__0 )?\n int alt16=2;\n int LA16_0 = input.LA(1);\n\n if ( (LA16_0==29) ) {\n alt16=1;\n }\n switch (alt16) {\n case 1 :\n // InternalXModel.g:1957:3: rule__Operation__Group_4__0\n {\n pushFollow(FOLLOW_2);\n rule__Operation__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getOperationAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Operation__Group_4__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3509:1: ( rule__Operation__Group_4__4__Impl )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3510:2: rule__Operation__Group_4__4__Impl\n {\n pushFollow(FOLLOW_rule__Operation__Group_4__4__Impl_in_rule__Operation__Group_4__47051);\n rule__Operation__Group_4__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Action__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1282:1: ( ( ( rule__Action__Group_4__0 )? ) )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1283:1: ( ( rule__Action__Group_4__0 )? )\n {\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1283:1: ( ( rule__Action__Group_4__0 )? )\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1284:1: ( rule__Action__Group_4__0 )?\n {\n before(grammarAccess.getActionAccess().getGroup_4()); \n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1285:1: ( rule__Action__Group_4__0 )?\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==18) ) {\n alt5=1;\n }\n switch (alt5) {\n case 1 :\n // ../esir.lsi.imtql.ui/src-gen/robot/ui/contentassist/antlr/internal/InternalDsl.g:1285:2: rule__Action__Group_4__0\n {\n pushFollow(FOLLOW_rule__Action__Group_4__0_in_rule__Action__Group__4__Impl2497);\n rule__Action__Group_4__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getActionAccess().getGroup_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Servidor_Impl__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:5740:1: ( rule__Servidor_Impl__Group__4__Impl rule__Servidor_Impl__Group__5 )\n // InternalCeffective.g:5741:2: rule__Servidor_Impl__Group__4__Impl rule__Servidor_Impl__Group__5\n {\n pushFollow(FOLLOW_34);\n rule__Servidor_Impl__Group__4__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Servidor_Impl__Group__5();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if proxy feature is supported by node; | public static final boolean supportsProxyFeature(final int feature) {
return ((feature & (1 << 1)) > 0);
} | [
"boolean hasUseAsProxy();",
"public boolean isProxy();",
"boolean hasProxy(String proxyName);",
"boolean isOmniProxyServer();",
"boolean getUseAsProxy();",
"public boolean HTTPproxy();",
"public boolean isEnabled() {\n\t\treturn !proxyIPAddress.equals(\"\") && !proxyPort.equals(\"\");\n\t}",
"public boolean tunnelAvailable();",
"public boolean isProxyEnabled()\n {\n return m_proxies;\n }",
"public boolean isProxyEnabled() {\n return isProxyEnabled;\n }",
"boolean getExposeProxy();",
"public boolean isProxy() {\n if (!hasField(PROXY)) {\n return false;\n }\n return get(PROXY, false);\n }",
"public Boolean getUseJVMProxySettings();",
"public static void detectProxy() {\n ProxySearch pSearch = ProxySearch.getDefaultProxySearch();\n /* It's possible to configure components to scan. For example, according\n * to detected OS, we will change research parameters\n */\n final String osName = System.getProperty(\"os.name\").toLowerCase();\n System.out.println(osName);\n if (osName.startsWith(\"windows\")) {\n pSearch.addStrategy(ProxySearch.Strategy.IE);\n pSearch.addStrategy(ProxySearch.Strategy.WIN);\n /* -------------------------------------------- */\n pSearch.addStrategy(ProxySearch.Strategy.JAVA);\n pSearch.addStrategy(ProxySearch.Strategy.BROWSER);\n } else if (osName.startsWith(\"linux\")) {\n pSearch.addStrategy(ProxySearch.Strategy.GNOME);\n pSearch.addStrategy(ProxySearch.Strategy.KDE);\n pSearch.addStrategy(ProxySearch.Strategy.FIREFOX);\n } else {\n pSearch.addStrategy(ProxySearch.Strategy.OS_DEFAULT);\n }\n\n // For proxy-vole to be effective, it must be registered to the JVM\n ProxySelector.setDefault(pSearch.getProxySelector());\n }",
"public boolean isProxyEnvironment() {\n return \"proxy\".equals(activeProfile);\n }",
"final boolean detectProxyServer()\r\n {\r\n DataInputStream dis=null;\r\n\tString url=\"\";\r\n\r\n\t// Allow for non-Demon Home page\r\n\tif(app.server==null)\r\n\t{\r\n\t if(app.indexName==null)\r\n\t url=\"http://www.\"+hostName+\"/index.html\";\r\n else url=\"http://www.\"+hostName+\"/\";\r\n\t}\r\n\telse\r\n\t{\r\n\t if(app.indexName==null)\r\n\t url=app.server+\"index.html\";\r\n\t else url=app.server+app.indexName; \t\r\n\t}\r\n\t//Attempt to connect to this url\r\n\ttry\r\n\t{\r\n\t URL doc=new URL(url);\r\n\t dis=new DataInputStream(doc.openStream());\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t // Unable to connect. This may be an incorrect applet parameter. Let's assume though it's a \r\n\t // proxy server that's stopping use using the hostname.\r\n\t return true;\r\n\t}\r\n\treturn false;\r\n }",
"public static boolean isProxySetted() {\r\n\t\treturn StringUtil.isNotNullOrEmpty(proxyHost) && (proxyPort > 0);\r\n\t}",
"public boolean isProxyEnabled() {\n return proxyConfig != null && !proxyConfig.isExcluded(getUrl());\n }",
"boolean isProxyTargetAware() {\n\t\treturn this.proxyTargetAware;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST /distributions : Create a new distribution. | @PostMapping("/distributions")
public ResponseEntity<DistributionDTO> createDistribution(@RequestBody DistributionDTO distributionDTO) throws URISyntaxException {
log.debug("REST request to save Distribution : {}", distributionDTO);
if (distributionDTO.getId() != null) {
throw new BadRequestAlertException("A new distribution cannot already have an ID", ENTITY_NAME, "idexists");
}
DistributionDTO result = distributionService.save(distributionDTO);
return ResponseEntity.created(new URI("/api/distributions/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
} | [
"@PostMapping(\"/distributions/bulk\")\n public ResponseEntity<DistributionDTO> createMultipleDistribution(@RequestBody DistributionDTO distributionDTO) throws URISyntaxException {\n log.debug(\"REST request to save Distribution : {}\", distributionDTO);\n if (distributionDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new distribution cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n for (int i = 0; i < 52; i++) {\n distributionService.save(distributionDTO);\n distributionDTO.setStartDate(distributionDTO.getStartDate().atZone(ZoneId.systemDefault()).plusDays(7).toInstant());\n distributionDTO.setEndDate(distributionDTO.getEndDate().atZone(ZoneId.systemDefault()).plusDays(7).toInstant());\n }\n return ResponseEntity.created(new URI(\"/api/distributions/\"))\n .headers(HeaderUtil.createAlert(\"Multiple distributions created\", null))\n .body(distributionDTO);\n }",
"Distribution<T> newDistribution();",
"@POST\n @Path(\"distributor\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response postRating (Distributor newDistributor){\n //Create a new Distributor object for values to be passed into\n Distributor theDistributor = new Distributor();\n\n theDistributor.setAddress(newDistributor.getAddress());\n theDistributor.setName(newDistributor.getName());\n\n em.persist(theDistributor);\n // return the new beer object upon completion\n return Response.ok(theDistributor,MediaType.APPLICATION_JSON).build();\n }",
"public void setDistribution(int distribution) {\n this.distribution = distribution;\n }",
"@GetMapping(\"/distributions/{id}/subscribe\")\n public ResponseEntity<DistributionDTO> subscribeToDistribution(@PathVariable Long id) {\n log.debug(\"REST request to subscribe to Distribution : {}\", id);\n Optional<DistributionDTO> optionalDistribution = distributionService.findOne(id);\n if (optionalDistribution.isPresent()) {\n DistributionDTO distribution = optionalDistribution.get();\n Optional<User> user = userService.getUserWithAuthorities();\n if (user.isPresent()) {\n distribution.getUsers().add(new UserDTO(user.get()));\n }\n distribution = distributionService.save(distribution);\n return ResponseEntity.ok()\n .body(distribution);\n }\n return new ResponseEntity(HttpStatus.NOT_FOUND);\n }",
"PredictionDistributionDefinition predictionDistribution();",
"public abstract void distributionGenerate(int[] distributionData, C distributionConfig);",
"public void setDistribution(int value) {\n this.distribution = value;\n }",
"@RequestMapping(method = RequestMethod.POST)\n\tpublic ResponseEntity<DigitalNewspaper> create(\n\t\t\t@RequestBody DigitalNewspaper digitalNewspaperFromRequest) {\n\n\t\tDigitalNewspaper digitalNewspaper = this.digitalNewspaperService.create(digitalNewspaperFromRequest);\n\t\treturn new ResponseEntity<DigitalNewspaper>(digitalNewspaper, HttpStatus.CREATED);\n\t}",
"@DeleteMapping(\"/distributions/{id}\")\n public ResponseEntity<Void> deleteDistribution(@PathVariable Long id) {\n log.debug(\"REST request to delete Distribution : {}\", id);\n distributionService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@PostMapping\r\n\tpublic Dependants createDependants(@RequestBody Dependants Dependants) {\r\n\t\treturn this.DependantsRepository.save(Dependants);\r\n\t}",
"Distribution<T> toDistribution(T value);",
"public static void generateRandomDistribution(int num_attr, Map<String, Map<Integer, String>> distribution, Map<String, Map<Integer, Map<String, Double>>> distParams, Random rnd) {\n\t\t\n\t\t_generateRandomDistribution(\"update\", num_attr, distribution, distParams, rnd);\n\t\t_generateRandomDistribution(\"search\", num_attr, distribution, distParams, rnd);\n\t\t\n\t}",
"protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}",
"Response<Distribution> getDistribution(final String id) throws IOException;",
"void createBuckets(long distributionId, int bucketCount);",
"@GetMapping(\"/distributions/{id}\")\n public ResponseEntity<DistributionDTO> getDistribution(@PathVariable Long id) {\n log.debug(\"REST request to get Distribution : {}\", id);\n Optional<DistributionDTO> distributionDTO = distributionService.findOne(id);\n return ResponseUtil.wrapOrNotFound(distributionDTO);\n }",
"@ApiOperation(value = \"Create new family\")\n @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE, \n consumes = MediaType.APPLICATION_JSON_VALUE)\n public void insertar(@RequestBody FamilyMembers famMembers) {\n serv.create(famMembers);\n }",
"public void createRelease(\n com.google.cloud.deploy.v1.CreateReleaseRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateReleaseMethod(), getCallOptions()),\n request,\n responseObserver);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Classes that implement PopupMenuResponder can add custom actions to the menu selection of various popup windows | public interface PopupMenuResponder {
public void onMenuSelection(String selection);
} | [
"protected abstract PopupMenuHelper createActionMenuHelper();",
"ModPopupMenu addMenuItem(String label, Action action);",
"private void createPopupMenu() {\r\n // pride inspector context\r\n DesktopContext context = Desktop.getInstance().getDesktopContext();\r\n\r\n // create a popup menu\r\n popMenu = new JPopupMenu();\r\n\r\n // select all rows\r\n JMenuItem selectAllItem = new JMenuItem(context.getProperty(\"select.all.title\"));\r\n selectAllItem.setActionCommand(SELECT_ALL_ACTION);\r\n selectAllItem.addActionListener(this);\r\n popMenu.add(selectAllItem);\r\n\r\n // deselect all rows\r\n JMenuItem deselectAllItem = new JMenuItem(context.getProperty(\"deselect.all.title\"));\r\n deselectAllItem.setActionCommand(DESELECT_ALL_ACTION);\r\n deselectAllItem.addActionListener(this);\r\n popMenu.add(deselectAllItem);\r\n\r\n // add copy cell menu item\r\n JMenuItem copyCellItem = new JMenuItem(context.getProperty(\"copy.cell.title\"),\r\n GUIUtilities.loadIcon(context.getProperty(\"copy.cell.small.icon\")));\r\n copyCellItem.setActionCommand(COPY_CELL_ACTION);\r\n copyCellItem.addActionListener(this);\r\n popMenu.add(copyCellItem);\r\n\r\n // add copy row menu item\r\n JMenuItem copyRowItem = new JMenuItem(context.getProperty(\"copy.row.title\"),\r\n GUIUtilities.loadIcon(context.getProperty(\"copy.row.small.icon\")));\r\n copyRowItem.setActionCommand(COPY_ROW_ACTION);\r\n copyRowItem.addActionListener(this);\r\n popMenu.add(copyRowItem);\r\n\r\n // add popup menu listener\r\n PopupListener listener = new PopupListener();\r\n this.addMouseListener(listener);\r\n\r\n // listener to ctrl + c from keyboard\r\n registerKeyboardStroke();\r\n }",
"JPopupMenu createPopupMenu();",
"private void addMenuItems() {\n PopupMenu popup = new PopupMenu();\n MenuItem defaultItem = new MenuItem(\"Exit\");\n \n defaultItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n System.out.println(\"Exiting...\");\n System.exit(0);\n }\n });\n \n popup.add(defaultItem);\n \n this.trayicon.setPopupMenu(popup);\n }",
"public static void createShiftPopupMenu() {\n myRightClickMouseMenu.add(myConfirmMouseMenu);\n myRightClickMouseMenu.add(myDeleteMouseMenu);\n myRightClickMouseMenu.add(myPermDeleteMouseMenu);\n myRightClickMouseMenu.add(overrideConflictMouseMenu);\n //\n myRightClickMouseMenu.add(messagingMenu);\n //\n myConfirmMouseMenu.addActionListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n ShiftToRunMethodsOn.confirmAllSelectedShifts();\n }\n });\n myDeleteMouseMenu.addActionListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n ShiftToRunMethodsOn.deleteAllSelectedShifts(false);\n }\n });\n myPermDeleteMouseMenu.addActionListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n ShiftToRunMethodsOn.deleteAllSelectedShifts(true);\n }\n });\n overrideConflictMouseMenu.addActionListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n ShiftToRunMethodsOn.setShiftToNotConflicted();\n }\n });\n /**\n * Added by Jeffrey Davis on 06/10/2010 to handle Messaging\n */\n messagingMenu.addActionListener(new ActionListener() {\n\n public void actionPerformed(ActionEvent e) {\n if (ShiftToRunMethodsOn.myShift instanceof DShift) {\n Hashtable<String, Schedule_View_Panel> tempHash = Main_Window.parentOfApplication.myScheduleForm.getMyOpenSchedulesHash();\n Schedule_View_Panel myTempSchedule = ((Schedule_View_Panel) tempHash.get(ShiftToRunMethodsOn.myShift.getParent().getBranch() + \",\" + ShiftToRunMethodsOn.myShift.getParent().getCompany()));\n Messaging_Availability myMessagingAvailability = new Messaging_Availability(myTempSchedule);\n if (myMessagingAvailability.getSShiftOfSelectedShifts().size() > 0) {\n hideSortWindow();\n if (Main_Window.messagingEditWindow == null) {\n Main_Window.messagingEditWindow = new xMessagingEdit();\n Main_Window.parentOfApplication.desktop.add(\n Main_Window.messagingEditWindow);\n }\n ArrayList<Integer> employeeIds = new ArrayList<Integer>();\n Vector<SEmployee> emps = myMessagingAvailability.getFullEmployeeList();\n for (int emp = 0; emp < emps.size(); emp++) {\n if (emps.get(emp).isVisible()) {\n employeeIds.add(emps.get(emp).getId());\n }\n }\n \n Main_Window.messagingEditWindow.setInformation(ShiftToRunMethodsOn.myShift.getParent().getCompany(),\n ShiftToRunMethodsOn.myShift.getParent().getBranch(), Main_Window.parentOfApplication.getUser(),\n (DShift)ShiftToRunMethodsOn.myShift, employeeIds);\n try {\n Main_Window.messagingEditWindow.setSelected(true);\n Main_Window.messagingEditWindow.setVisible(true);\n } catch (Exception exe) {\n }\n } else {\n JOptionPane.showMessageDialog(Main_Window.parentOfApplication, \"Please select a shift\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n });\n /**\n * Addition by Jeffrey Davis on 06/10/2010 complete\n */\n }",
"@Override\n\t\t\t\tpublic void customizeAuthorPopUpMenu(JPopupMenu popup,\n\t\t\t\t\t\tAuthorAccess authorAccess) {\n\t\t\t\t\t// Add our custom action\n\t\t\t\t\t\n\t\t\t\t\tcreateMenuLanguages(popup, pluginWorkspaceAccess);\n\t\t\t\t\t\n\t\t\t\t}",
"public abstract JMenuItem[] getWindowMenuItems();",
"private void hookContextMenu()\r\n\t{\r\n\t\tMenuManager lMenuManager = new MenuManager(\"#PopupMenu\");\r\n\t\tlMenuManager.setRemoveAllWhenShown(true);\r\n\t\tlMenuManager.addMenuListener(new IMenuListener()\r\n\t\t{\r\n\t\t\tpublic void menuAboutToShow(IMenuManager pManager)\r\n\t\t\t{\r\n\t\t\t\tfillContextMenu(pManager);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tMenu lMenu = lMenuManager.createContextMenu(getControl());\r\n\t\tgetControl().setMenu(lMenu);\r\n\t\tviewPart.getSite().registerContextMenu(lMenuManager, this);\r\n\t}",
"public void createSwitchButtonPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t}",
"private void createPopup() {\r\n \r\n this.captureThisSectionsTabEditorPopUpMenu = this;\r\n \r\n JMenuItem menuItem01 = this.add(new JMenuItem(\"Insert New Section Before\"));\r\n menuItem01.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n insertNewSection(sectionsTab.getSelectedIndex());\r\n Main.getController().getBaseScreen().\r\n getMySaveButton().setWarning(); \r\n captureThisSectionsTabEditorPopUpMenu.setVisible(false);\r\n }\r\n });\r\n\r\n JMenuItem menuItem02 = this.add(new JMenuItem(\"Insert New Section After\"));\r\n menuItem02.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n insertNewSection(sectionsTab.getSelectedIndex() + 1);\r\n Main.getController().getBaseScreen().\r\n getMySaveButton().setWarning();\r\n captureThisSectionsTabEditorPopUpMenu.setVisible(false);\r\n }\r\n });\r\n\r\n JMenuItem menuItem03 = this.add(new JMenuItem(\"Delete Selected Section\"));\r\n menuItem03.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n sectionPanels.remove(sectionsTab.getSelectedIndex());\r\n sectionsTab.remove(sectionsTab.getSelectedIndex());\r\n Main.getController().getBaseScreen().\r\n getMySaveButton().setWarning();\r\n captureThisSectionsTabEditorPopUpMenu.setVisible(false);\r\n }\r\n });\r\n\r\n JMenuItem menuItem04 = this.add(new JMenuItem(\"Edit Section Title\"));\r\n menuItem04.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n SectionDataEditor sectionDataEditor\r\n = new SectionDataEditor(sectionsTab,\r\n sectionsTab.getSelectedIndex(), sectionPanels);\r\n captureThisSectionsTabEditorPopUpMenu.setVisible(false);\r\n }\r\n });\r\n }",
"public static void initializePopup(){\n\n popup = new PopupMenu();\n\n // Initialize menu items\n MenuItem exitItem = new MenuItem(\"Exit\");\n MenuItem pauseItem = new MenuItem(\"Pause\");\n MenuItem resumeItem = new MenuItem(\"Resume\");\n\n // Exit listener\n exitItem.addActionListener(arg0 -> System.exit(0));\n\n // Pause listener\n pauseItem.addActionListener(arg0 -> {\n paused = true;\n pauseItem.setEnabled(false);\n resumeItem.setEnabled(true);\n });\n\n // Resume listener\n resumeItem.addActionListener(arg0 -> {\n paused = false;\n pauseItem.setEnabled(true);\n resumeItem.setEnabled(false);\n });\n\n resumeItem.setEnabled(false);\n\n popup.add(resumeItem);\n popup.add(pauseItem);\n popup.add(exitItem);\n }",
"protected void addToObjectMenu(MenuDelegate menu, MouseEvent ev)\n {}",
"private void initNodePopup() {\r\n nodeMenuItem = new MenuItem[3];\r\n nodeMenuItem[0] = new MenuItem(\"Select All\");\r\n nodeMenuItem[1] = new MenuItem(\"Edit Label\");\r\n nodeMenuItem[2] = new MenuItem(\"Properties\");\r\n\r\n nodePopupMenu = new PopupMenu();\r\n\r\n nodePopupMenu.add(nodeMenuItem[0]);\r\n nodePopupMenu.addSeparator();\r\n nodePopupMenu.add(nodeMenuItem[1]);\r\n nodePopupMenu.add(nodeMenuItem[2]);\r\n\r\n nodePopupMenu.addActionListener(this);\r\n\r\n this.add(nodePopupMenu);\r\n }",
"abstract public void OnMenuItemSelected( Object menuItem );",
"private void popupInstanceMenu(Component component, int x, int y, final Instance selected) {\n JPopupMenu popup = new JPopupMenu();\n JMenuItem menuItem;\n\n if (selected != null) {\n menuItem = new JMenuItem(!selected.isLocal() ? tr(\"instance.install\") : tr(\"instance.launch\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n launch();\n }\n });\n popup.add(menuItem);\n\n if (selected.isLocal()) {\n popup.addSeparator();\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.openFolder\"));\n menuItem.addActionListener(ActionListeners.browseDir(\n LauncherFrame.this, selected.getContentDir(), true));\n popup.add(menuItem);\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.openSaves\"));\n menuItem.addActionListener(ActionListeners.browseDir(\n LauncherFrame.this, new File(selected.getContentDir(), \"saves\"), true));\n popup.add(menuItem);\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.openResourcePacks\"));\n menuItem.addActionListener(ActionListeners.browseDir(\n LauncherFrame.this, new File(selected.getContentDir(), \"resourcepacks\"), true));\n popup.add(menuItem);\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.openScreenshots\"));\n menuItem.addActionListener(ActionListeners.browseDir(\n LauncherFrame.this, new File(selected.getContentDir(), \"screenshots\"), true));\n popup.add(menuItem);\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.copyAsPath\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n File dir = selected.getContentDir();\n dir.mkdirs();\n SwingHelper.setClipboard(dir.getAbsolutePath());\n }\n });\n popup.add(menuItem);\n\n popup.addSeparator();\n\n if (!selected.isUpdatePending()) {\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.forceUpdate\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n selected.setUpdatePending(true);\n launch();\n instancesModel.update();\n }\n });\n popup.add(menuItem);\n }\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.hardForceUpdate\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n confirmHardUpdate(selected);\n }\n });\n popup.add(menuItem);\n\n menuItem = new JMenuItem(SharedLocale.tr(\"instance.deleteFiles\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n confirmDelete(selected);\n }\n });\n popup.add(menuItem);\n }\n\n popup.addSeparator();\n }\n\n menuItem = new JMenuItem(SharedLocale.tr(\"launcher.refreshList\"));\n menuItem.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n loadInstances();\n }\n });\n popup.add(menuItem);\n\n popup.show(component, x, y);\n\n }",
"public void showContextMenu(Object panel, Data[] data, JPopupMenu menu);",
"public void createPopupMenu() {\r\n\t\tJMenuItem menuItem;\r\n\r\n\t\tMenuListener menuListener = new MenuListener(this);\r\n\r\n\t\t// Create the popup menu.\r\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"new survivor\");\r\n\t\tmenuItem.addActionListener(menuListener);\r\n\t\tpopup.add(menuItem);\r\n\t\tmenuItem = new JMenuItem(\"new axe\");\r\n\t\tmenuItem.addActionListener(menuListener);\r\n\t\tpopup.add(menuItem);\r\n\t\tmenuItem = new JMenuItem(\"new wall\");\r\n\t\tmenuItem.addActionListener(menuListener);\r\n\t\tpopup.add(menuItem);\r\n\t\t// menuItem = new JMenuItem(\"Tower:Poison\");\r\n\t\t// menuItem.addActionListener(menuListener);\r\n\t\t// popup.add(menuItem);\r\n\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tpopupListener = new PopupListener(popup, this);\r\n\r\n\t}",
"public PopupScreen getActivePopup();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find by reference: tax | public List<SalesOrderItem> findByTax(Tax tax); | [
"x0101.oecdStandardAuditFileTaxPT1.TaxDocument.Tax getTax();",
"java.lang.String getTaxon();",
"public List<PurchaseOrderLine> findByTax(Tax tax);",
"Object getTaxes(Address shippingAddress, String itemReferenceId, int quantity, Float price,\n String userId, Boolean submitTax);",
"String getTaxId();",
"public List<Invoice<I>> lookupInvoiceWithReference(TransactionReference reference) throws Exception;",
"BigDecimal getTax();",
"public double getTaxa();",
"List<ItemTax> findByGst(Integer gst);",
"public List<SalesOrderItem> findByTaxId(Long taxId);",
"public Tax[] getTaxes();",
"java.math.BigDecimal getTaxPayable();",
"float getTaxesOrThrow(\n java.lang.String key);",
"double getTax_Amount();",
"org.apache.xmlbeans.XmlString xgetTaxon();",
"TaxAmountType getTaxAmount();",
"double getTaxAmount();",
"public BigDecimal getTax() {\n return tax;\n }",
"public double getTax(){\n\n return this.tax;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new High scores animation. | public HighScoresAnimation(HighScoresTable scores) {
this.highScoresTable = scores;
} | [
"public HighScoresAnimation(HighScoresTable scores) {\n this.highScores = scores;\n }",
"public HighScoreTask(HighScoresAnimation animation) {\r\n\r\n this.animation = animation;\r\n this.animationRunner = new AnimationRunner(Ass7Game.GUI, 60);\r\n }",
"public HighScoresAnimation(HighScoresTable scores) {\n this.table = scores;\n }",
"public HighScore()\r\n {\r\n // initialise instance variables\r\n getData();\r\n }",
"public HighScores(){\n\t\treadFile(); //read the old highscores file\n\t}",
"Animation createAnimation();",
"public Scene highScores()\n {\n hs = new HighScores();\n Scene highScores = hs.mainWindow();\n // hs.getMainMenuButton().setOnAction(event-> mainWindow.setScene(mainMenu));\n return highScores;\n }",
"public HighScoreTable(){\r\n\r\n\t}",
"public HighscoreEntry() {}",
"public HAnimateLook()\n {\n }",
"public void addHighScores()\n\t{\n\t\thighScores = Box.createVerticalBox();\n\t\thighScores.add(Box.createVerticalStrut(height / 8));\n\t\t\n\t\t// Add the return button\n\t\tif(!fromEndGameScreen) setupButton();\n\t\t\n\t\t// Label for the title of the page\n\t\thighScoreTitle = new JLabel(\"High Scores\");\n\t\tMenuStyle.styleLabel(highScoreTitle);\n\t\thighScoreTitle.setForeground(Color.YELLOW);\n\t\thighScoreTitle.setFont(new Font(\"Arial\", Font.BOLD, 40));\n\t\thighScores.add(highScoreTitle);\n\t\thighScores.add(Box.createVerticalStrut(height / 40));\n\t\t\n\t\t// Each entry comes from the high score data that has been\n\t\t// loaded. If the data was not loaded successfully then send\n\t\t// an error message to the screen.\n\t\tif(highScoreNames[0] == null)\n\t\t{\n\t\t\thighScoreLabels[0] =\n\t\t new JLabel(\"Failed to load high scores - check folder.\");\n\t\t\tMenuStyle.styleLabel(highScoreLabels[0]);\n\t\t\thighScores.add(highScoreLabels[0]);\n\t\t} else\n\t\t{\n\t\t\t// Can now create each label with the data.\n\t\t\tfor(int i = 0; i < highScoreLabels.length; i++)\n\t\t\t{\n\t\t\t\tString content = highScoreNames[i] + \" \" +\n\t\t\t highScoreValues[i];\n\t\t\t\thighScoreLabels[i] = new JLabel(content);\n\t\t\t\tMenuStyle.styleLabel(highScoreLabels[i]);\n\t\t\t\thighScores.add(highScoreLabels[i]);\n\t\t\t\thighScores.add(Box.createVerticalStrut(height / 40));\n\t\t\t}\n\t\t}\n\t\t\n\t\tadd(highScores);\n\t}",
"public HighscoreMenu(RenderWindow window)\n {\n this.window = window;\n ClickableImage back = new ClickableImage(6, 6, \"res/assets/menus/button_back.png\", \"highscores\");\n back.setOnPress(new EventHandler()\n {\n @Override\n public void run()\n {\n menuOpen = false;\n chosenButton = back;\n }\n });\n buttons.add(back);\n\n Text t = new Text(\"HIGHSCORES\", Settings.MAIN_MENU_FONT, 64);\n t.setColor(Color.BLACK);\n t.setPosition((Settings.WINDOW_WIDTH - Settings.WINDOW_X_PADDING * 2) / 2 - 50, 30);\n title = t;\n\n this.background = new Image(0, 0, \"res/assets/menus/mainmenu.png\");\n\n // Create a new highscores object to parse the highscores filee\n Highscores scores = new Highscores();\n int offset = 1;\n int x = (Settings.WINDOW_WIDTH - Settings.WINDOW_X_PADDING * 2) / 2;\n int y = 120;\n for (String s: scores.getScores()) {\n Text ts = new Text(s, Settings.MAIN_MENU_FONT, 64);\n ts.setPosition(new Vector2f(x, y + 60 * offset));\n ts.setColor(Color.BLACK);\n\n scoreText.add(ts);\n offset++;\n }\n }",
"public HighScore(String name, int score) {\n this.name = name;\n this.score = score;\n }",
"public HighScoresTable() {\r\n this.size = DEFAULT_SIZE;\r\n this.scores = new ArrayList<ScoreInfo>();\r\n }",
"public Animation() {\n this( new ArrayList< SpriteFrame >(), 0 );\n }",
"private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }",
"private void leaderBoardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leaderBoardActionPerformed\n HighScore start = new HighScore();\n start.setVisible(true);\n \n scoreSheet.setSize(500, 500);\n scoreSheet.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n scoreSheet.setVisible(true);\n scoreSheet.add(start);\n jf.dispose();\n }",
"public AirInvasion() throws Exception {\r\n JFrame jframe = new JFrame();\r\n Timer timer = new Timer(20, this);\r\n renderer = new Renderer();\r\n topScores = new TopScores();\r\n \r\n //Jframe settings\r\n jframe.add(renderer);\r\n jframe.setDefaultCloseOperation(jframe.EXIT_ON_CLOSE);\r\n jframe.setSize(WIDTH, HEIGHT);\r\n jframe.setResizable(false);\r\n jframe.setVisible(true);\r\n jframe.addMouseListener(this);\r\n jframe.addKeyListener(this);\r\n \r\n //Changes gameStatus to 0 (Main menu) and starts the timer \r\n gameStatus = 0;\r\n timer.start();\r\n }",
"HighScoresPane(Scene scene, Path basePath) {\n\t\tthis.scene = scene;\n\t\tgetChildren().add(new Label(\"High Scores\"){{setId(\"title\");}});\n\t\tgetChildren().add(new HBox(){{\n\t\t\tsetAlignment(Pos.CENTER);\n\t\t\tsetSpacing(50);\n\t\t\ttry {\n\t\t\t\tgetChildren().add(new HighScores(scene, \"Deficiency\", Main.rootPath.resolve(\"scores\").resolve(\"Deficiency\").toFile()));\n\t\t\t\tgetChildren().add(new HighScores(scene, \"Panic\", Main.rootPath.resolve(\"scores\").resolve(\"Panic\").toFile()));\n\t\t\t\tgetChildren().add(new HighScores(scene, \"Escape\", Main.rootPath.resolve(\"scores\").resolve(\"Escape\").toFile()));\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}});\n\t\tgetChildren().add(new Button(\"Return\"){{\n\t\t\tsetOnAction(e -> Main.setPane(scene, \"Main Menu\"));\n\t\t}});\n\n\t\tgetStylesheets().add(HighScoresPane.class.getResource(\"/stylesheet.css\").toExternalForm());\n\n\t\tsetAlignment(Pos.CENTER);\n\t\tsetBackground(new Background(new BackgroundFill(Color.BEIGE, null, null)));\n\n\t\tsetPadding(new Insets(-50, 50, 50, 50));\n\t\tsetSpacing(50);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The accuracy test of the method getExtendedElements. | public void test_getExtendedElements_accuracy() {
instance.addExtendedElement(element);
assertEquals("ExtendedElement got incorrectly", 1, instance.getExtendedElements().size());
} | [
"public void test_countExtendedElements_accuracy() {\n instance.addExtendedElement(element);\n assertEquals(\"The element is not added properly.\", 1, instance.countExtendedElements());\n }",
"public void test_containsExtendedElement_accuracy() {\n instance.addExtendedElement(element);\n assertTrue(\"The element is not added properly.\", instance.containsExtendedElement(element));\n }",
"public void test_addExtendedElement_accuracy() {\n instance.addExtendedElement(element);\n assertTrue(\"The element is not added properly.\", instance.containsExtendedElement(element));\n }",
"public void test_clearExtendedElements_accuracy() {\n instance.addExtendedElement(element);\n assertTrue(\"The element is not added properly.\", instance.containsExtendedElement(element));\n\n instance.clearExtendedElements();\n assertFalse(\"The element is not removed properly.\", instance.containsExtendedElement(element));\n }",
"public void test_removeExtendedElement_accuracy() {\n instance.addExtendedElement(element);\n assertTrue(\"The element is not added properly.\", instance.containsExtendedElement(element));\n \n instance.removeExtendedElement(element);\n assertFalse(\"The element is not removed properly.\", instance.containsDefinedTag(tag));\n }",
"@Override\n public final double[] getExtendedElements() {\n return elements.clone();\n }",
"@Test\n public void extraElements() {\n assertEmpty(mReactor.getCompounds(getElements(\"Start\", \"A\", \"Fin\", \"Start\")));\n // Each reaction producing a compound should be detected separately.\n assertEmpty(mReactor.getCompounds(getElements(\"Start\", \"A\", \"Fin\", \"Start\", \"A\", \"Fin\")));\n }",
"@Test\n public void testGetAllElements() {\n System.out.println(\"getAllElements\");\n DataItem instance = new DataItemImpl();\n ArrayList expResult = null;\n ArrayList result = instance.getAllElements();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void aggregateAllElements() {\n assertEquals(25,(int) contain.aggregateAllElements());\r\n }",
"@Test\n public void testGetPropertyElements() {\n try {\n System.out.println(\"getPropertyElements\");\n Calendar date = Calendar.getInstance();\n date.set(2015, 1, 10);\n Note note = new NoteImpl(1, \"TEST NOTE\", \"DEDWARDS\", new Date());\n Note note2 = new NoteImpl(2, \"TEST NOTE2\", \"DEDWARDS\", new Date());\n Note note3 = new NoteImpl(3, \"TEST NOTE3\", \"DEDWARDS\", new Date());\n Note note4 = new NoteImpl(4, \"TEST NOTE4\", \"DEDWARDS\", new Date());\n Note note5 = new NoteImpl(5, \"TEST NOTE5\", \"DEDWARDS\", new Date());\n Element element = new ElementImpl(\"TEST\", \"TEST\", note, \"DEDWARDS\", new Date());\n Element element2 = new ElementImpl(\"RENT\", \"RENT\", note3, \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy = new ModifiedBy(\"MODIFIED\", \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy2 = new ModifiedBy(\"MODIFIED2\", \"DEDWARDS\", new Date());\n ModifiedByInterface modifiedBy3 = new ModifiedBy(\"MODIFIED3\", \"DEDWARDS\", new Date());\n AddressInterface address = new Address(1, \"12\", \"Kestrel House\", \"1\", \"The Close\", \"1\", \"The Ride\", \"Enfield\", \"London\", \"England\", \"EN3 4EN\", note2, \"DEDWARDS\", new Date());\n Property instance = new Property(1, address, date.getTime(), element, element, \"DEDWARDS\", new Date());\n PropertyElement rent = new PropertyElement(1, 1, element2, date.getTime(), true, null, 1200.00, note4, \"DEDWARDS\", new Date());\n PropertyElement charges = new PropertyElement(2, 1, element, date.getTime(), true, null, 300.00, note5, \"DEDWARDS\", new Date());\n \n assertEquals(0, instance.getPropertyElements().size());\n List<PropertyElement> expResult = new ArrayList();\n List<PropertyElement> test = new ArrayList();\n instance.createPropertyElement(rent, modifiedBy);\n expResult.add(rent);\n assertEquals(1, instance.getPropertyElements().size());\n assertEquals(expResult, instance.getPropertyElements());\n instance.createPropertyElement(charges, modifiedBy2);\n expResult.add(charges);\n assertEquals(2, instance.getPropertyElements().size());\n assertEquals(expResult, instance.getPropertyElements());\n instance.deletePropertyElement(charges, modifiedBy3);\n expResult.remove(charges);\n assertEquals(1, instance.getPropertyElements().size());\n assertEquals(expResult, instance.getPropertyElements());\n assertEquals(false, instance.getPropertyElements().equals(test));\n } catch (RemoteException ex) {\n Logger.getLogger(PropertyTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected abstract boolean hasElementsToCheck();",
"public void testGetArray()\n {\n System.out.println(\"getArray\");\n \n DenseVector v1 = (DenseVector) this.createRandom();\n \n double[] a1 = v1.getArray();\n \n assertEquals( v1.getDimensionality(), a1.length );\n \n for( int i = 0; i < v1.getDimensionality(); i++ )\n {\n assertEquals( a1[i], v1.getElement(i) );\n }\n \n \n }",
"@Test\n public void testGetExpertiseCollection() {\n System.out.println(\"getExpertiseCollection\");\n ArrayList<Expertise> result = instance.getExpertiseCollection();\n assertEquals(result.size(), 3);\n }",
"public void testResellerExtInfData() {\n\t\tEPPCodecTst.printStart(\"testResellerExtInfData\");\n\n\t\t// Generic objects\n\t\tEPPEncodeDecodeStats theStats;\n\n\t\t// -- TEST1 - Test with just the required reseller identifier\n\t\tVector statuses = new Vector();\n\t\tstatuses.addElement(new EPPDomainStatus(EPPDomainStatus.ELM_STATUS_OK));\n\t\tEPPTransId respTransId = new EPPTransId(\"ngcl-IvJjzMZc\",\n\t\t\t\t\"test142AWQONJZ\");\n\t\tEPPResponse theResponse = new EPPDomainInfoResp(respTransId,\n\t\t\t\t\"EXAMPLE1-REP\", \"reseller.example\", \"ClientX\", statuses,\n\t\t\t\t\"ClientY\", new Date(), new EPPAuthInfo(\"2fooBAR\"));\n\t\ttheResponse.setResult(EPPResult.SUCCESS);\n\n\t\t// Add Extension\n\t\ttheResponse.addExtension(new EPPResellerExtInfData(\"myreseller\"));\n\n\t\ttheStats = EPPCodecTst.testEncodeDecode(theResponse);\n\t\tSystem.out.println(theStats);\n\n\t\t// -- TEST1 - Test with both the reseller identifier and the reseller\n\t\t// name\n\t\ttheResponse = new EPPDomainInfoResp(respTransId, \"EXAMPLE1-REP\",\n\t\t\t\t\"reseller.example\", \"ClientX\", statuses, \"ClientY\", new Date(),\n\t\t\t\tnew EPPAuthInfo(\"2fooBAR\"));\n\t\ttheResponse.setResult(EPPResult.SUCCESS);\n\n\t\t// Add Extension\n\t\ttheResponse.addExtension(new EPPResellerExtInfData(\"myreseller\",\n\t\t\t\t\"example\"));\n\n\t\ttheStats = EPPCodecTst.testEncodeDecode(theResponse);\n\t\tSystem.out.println(theStats);\n\n\t\tEPPCodecTst.printEnd(\"testResellerExtInfData\");\n\t}",
"@Test\r\n\tpublic void test() {\n\t\t metier.addAbonnement(new AbonnementGSM(new Date(), 300, true, 400));\r\n\t\t metier.addAbonnement(new AbonnementInternet(new Date(), 987, true,\r\n\t\t 452)); \r\n\t\t List<Abonnement> abs2= metier.listAbonnement(true);\r\n\t\t // assertTrue(abs.size()+2==abs2.size());\r\n\t\t \r\n\t}",
"@Test\r\n public void testGetEintraege() {\r\n System.out.println(\"getEintraege\");\r\n Partition instance = new Partition();\r\n MyArrayList<Eintrag> expResult = null;\r\n MyArrayList<Eintrag> result = instance.getEintraege();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"protected void validateExtraElement(org.apache.axiom.om.OMElement[] param){\n \n }",
"@Test\n public void whenAddElementsThenCapacityIncreasedAndGetElementsForCheck() {\n for (int i = 6; i < 12; i++) {\n simpleArray.add(String.valueOf(i));\n }\n ArrayList<String> resultlist = new ArrayList<>();\n for (int i = 0; i < simpleArray.getSize(); i++) {\n resultlist.add(simpleArray.get(i));\n }\n ArrayList<String> checkList = new ArrayList<>(Arrays.asList(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\",\n \"7\", \"8\", \"9\", \"10\", \"11\"));\n assertThat(resultlist, is(checkList));\n }",
"public void test_getDefinedTags_1_accuracy() {\n instance.addDefinedTag(tag);\n assertEquals(\"DefinedTag got incorrectly\", 1, instance.getDefinedTags().size());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The diameter of the invisible circle on which the nodes lie Constructor, adds the number of nodes to the graph on the circle and calls connectAll() | public CompleteGraph(int d, int n)
{
diameter = d;
int r = diameter/2;
double x = r;
double y = r;
double theta = 2 * Math.PI / n;
clearAll();
while (getNodes().size() < n ) {
CircleNode c = new CircleNode(Color.WHITE);
x = r*Math.sin(-1*(getNodes().size())*theta + Math.PI);
y = r*Math.cos(-1*(getNodes().size())*theta + Math.PI);
add(c, new Point2D.Double(x + r, y + r));
c.sendIndex( getNodes().size() - 1 );
}
connectAll();
} | [
"public void setDiameter(int diameter) {\n circleDiameter = diameter;\n\n }",
"private int number_circle() {\r\n int total = 0;\r\n Node node = find_inputNode();\r\n for (Edge e : g.get()) {\r\n if (e.getStart() == node) {\r\n total++;\r\n }\r\n }\r\n return total;\r\n }",
"public GameCircle addCircle(double x, double y, double diameter);",
"public Circle()\r\n {\r\n diameter = 68;\r\n xPosition = 230;\r\n yPosition = 90;\r\n color = \"blue\";\r\n }",
"private void connectAll()\n {\n\t\tint i = 0;\n\t\tint j = 1;\n\t\twhile (i < getNodes().size()) {\n\t\t\twhile (j < getNodes().size()) {\n\t\t\t\tLineEdge l = new LineEdge(false);\n\t\t\t\tl.setStart(getNodes().get(i));\n\t\t\t\tl.setEnd(getNodes().get(j));\n\t\t\t\taddEdge(l);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++; j = i+1;\n\t\t}\n\n }",
"public void paint(GraphicsPanel graphicsPanel) {\r\n final int nonSelectedNodeDiameter = 6;\r\n final int selectedNodeDiameter = 20;\r\n \r\n \tPoint2D.Double point = getPoint(); \r\n \tgraphicsPanel.setStroke(1F);\r\n final Color color = network.isExpandedNode(this) ? Color.blue : Color.RED;\r\n graphicsPanel.setColor(color);\r\n graphicsPanel.drawString(getName_r(), point);\r\n graphicsPanel.setStroke(0f);\r\n graphicsPanel.drawCircle(point, color, nonSelectedNodeDiameter);\r\n graphicsPanel.setStroke(6f);\r\n \tif (network.selectedMicroZone != null) {\r\n \tfor (Integer nodeNumber : network.selectedMicroZone.getNodeList()) {\r\n \t\t\t\tNode node = network.lookupNode(nodeNumber, true);\r\n \t\t\t\tif (this == node)\r\n \t\t\t\t\tgraphicsPanel.drawCircle(point, Color.BLUE, selectedNodeDiameter);\r\n \t}\r\n \t}\r\n if ((null != network.startNode) && (getNodeID() == network.startNode.getNodeID()))\r\n \tgraphicsPanel.drawCircle(point, Color.RED, selectedNodeDiameter);\r\n if ((null != network.endNode) && (getNodeID() == network.endNode.getNodeID()))\r\n \tgraphicsPanel.drawCircle(point, Color.PINK, selectedNodeDiameter);\r\n if (null != conflictArea) {\r\n \tgraphicsPanel.setStroke(1F);\r\n \tgraphicsPanel.setColor(Color.CYAN);\r\n \tgraphicsPanel.drawPolyLine(conflictArea);\r\n }\r\n if (null != circle) {\r\n \tgraphicsPanel.setStroke(1F);\r\n \tdouble r = graphicsPanel.translate(new Point2D.Double(circle.radius(), 0)).distance(graphicsPanel.translate(new Point2D.Double(0, 0)));\r\n \tgraphicsPanel.drawCircle(circle.center(), Color.CYAN, (int) (2 * r));\r\n }\r\n \t}",
"void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}",
"private void newCircle()\n {\n setMinimumSize(null);\n\n //Generate a new circle\n panel.generateNewCircle();\n\n //Calculate the circle properties and setup the text area with their values\n generateTextArea();\n\n //Repack the frame to fit everything perfectly\n pack();\n\n setMinimumSize(getSize());\n }",
"private void addCircles(){\r\n Circle circle = new Circle(xPos + 0.5,yPos + 0.5,0.5); // For collision calculations in Physics, move the Circle xy position to the center.\r\n composingCircles.add(circle);\r\n }",
"private void addNewCircle() {\n /**\n * xDistance is the distance in horizontal axis.\n * yDistance is the distance in vertical axis.\n * Radius is calculated using Pythagorean theorem.\n */\n int xDistance = abs(xPos.get(0) - xPos.get(1));\n int yDistance = abs(yPos.get(0) - yPos.get(1));\n double radius = sqrt(pow(xDistance, 2) + pow(yDistance, 2));\n Circle circle = new Circle(xPos.get(0) - radius, yPos.get(0) - radius, 2 * radius, 2 * radius);\n\n figures.add(circle);\n clearPoints();\n }",
"public void initializeCircles() {\n \tfor(int i = 100; i <= cont.getModel().getNumLeps(); i = i+100) {\n \t\tlepAnimation();\n \t}\n }",
"public CircleVertex() {\n\t\tsuper();\n\t}",
"public void instantiateNodes()\n\t{\n\t\tfor(int i = 0 ; i < rows ; i++) {\n\t\t\tfor( int j = 0 ; j < cols ; j++) {\n\t\t\t\tif (layout[i][j]==1){\n\t\t\t\t\tNode newNode = new Node(new Coordinate(j,i));\t\t//Yay for sign conventions\n\t\t\t\t\tnodes.add(newNode);\n\t\t\t\t\t//When node i,j is not on the bottom edge (i>0)\n\t\t\t\t\tif (i>0){\n\t\t\t\t\t\t//Check if there is a '1' above the current node \n\t\t\t\t\t\tif (layout[i-1][j]==1){\n\t\t\t\t\t\t\t//for all Node from ArrayList nodes\n\t\t\t\t\t\t\tfor (Node node : nodes){\n\t\t\t\t\t\t\t\t//get its coordinate\n\t\t\t\t\t\t\t\tCoordinate c = node.getCoordinate();\n\t\t\t\t\t\t\t\t//check if node is a neighbor of newNode and add each neighbor to both nodes\n\t\t\t\t\t\t\t\tif (c.getX()==j && c.getY()==i-1){\n\t\t\t\t\t\t\t\t\tnode.addNeighbor(newNode, 1);\n\t\t\t\t\t\t\t\t\tnewNode.addNeighbor(node, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//When node i,j is not on the left edge (j>0) \n\t\t\t\t\tif (j>0){\n\t\t\t\t\t\t//Check if there is a '1' left from the current node\n\t\t\t\t\t\tif (layout[i][j-1]==1){\n\t\t\t\t\t\t\t//for all Node from ArrayList nodes\n\t\t\t\t\t\t\tfor (Node node : nodes){\n\t\t\t\t\t\t\t\t//get its coordinate\n\t\t\t\t\t\t\t\tCoordinate c = node.getCoordinate();\n\t\t\t\t\t\t\t\t//check if node is a neighbor of newNode and add each neighbor to both nodes\n\t\t\t\t\t\t\t\tif (c.getX()==j-1 && c.getY()==i){\n\t\t\t\t\t\t\t\t\tnode.addNeighbor(newNode, 1);\n\t\t\t\t\t\t\t\t\tnewNode.addNeighbor(node, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void connectNodes(Graphics2D g) {\r\n\t\tfor (int i = 0; i != 4; i++) {\r\n\t\t\tdrawLine(g, coordinates[i], coordinates[i + 1]);\r\n\t\t\tdrawLine(g, coordinates[i], coordinates[5]);\r\n\t\t}\r\n\t\tdrawLine(g, coordinates[4], coordinates[5]);\r\n\t}",
"private void addNewCircle() \n\t{\n\t\tDOvalModel ovl = new DOvalModel(10, 10, 20, 20);\n\t\tdraw.addShape(ovl);\n\t\tshapeInfoModel.addRow(ovl);\n\t\tthis.repaint();\n\t}",
"private void addCircleToGrid() {\n for (int rowCount = 0; rowCount < ROW; rowCount++) {\n for (int colCount = 0; colCount < COL; colCount++) {\n Circle circle = new Circle(32, Paint.valueOf(\"black\"));\n addHandlerForCircle(circle);\n\n grid.add(circle, colCount, rowCount);\n GridPane.setHgrow(circle, Priority.ALWAYS);\n GridPane.setVgrow(circle, Priority.ALWAYS);\n GridPane.setHalignment(circle, HPos.CENTER);\n GridPane.setValignment(circle, VPos.CENTER);\n }\n }\n }",
"private static int sizeOfCircleInVertices(int numPoints) {\n //A cylinder top is a circle built out of a triangle fan; it has one vertex in the\n //center, one vertex for each point around the circle, and the first vertex around\n //the circle is repeated twice so that we can close the circle off.\n return 1 + (numPoints + 1);\n }",
"public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }",
"public void linkCircleToVertex(Circle circle) {\n vertextNodes.getLast().setCircle(circle);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string field_1994 = 1994; | java.lang.String getField1994(); | [
"java.lang.String getField1992();",
"java.lang.String getField1995();",
"java.lang.String getField1991();",
"java.lang.String getField1996();",
"java.lang.String getField1993();",
"java.lang.String getField1997();",
"java.lang.String getField1990();",
"java.lang.String getField1988();",
"java.lang.String getField1999();",
"java.lang.String getField1998();",
"java.lang.String getField1987();",
"java.lang.String getField1978();",
"java.lang.String getField1989();",
"java.lang.String getField1980();",
"java.lang.String getField1984();",
"java.lang.String getField1934();",
"java.lang.String getField1982();",
"java.lang.String getField1976();",
"java.lang.String getField1977();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setFood sets the amount of food for the hive. | public void setFood(int food) {
this.food = food;
} | [
"public void setFood(int amount){\r\n \tthis.food = amount;\r\n }",
"void setFood(int amount) {\n if (amount < 0) {\n throw new IllegalArgumentException(\"amount cannot be negative\");\n } else {\n this.food = amount;\n }\n }",
"public void eat(Food food) {\n\t\tfood.getEaten();\n\t\tfoodLevel = food.getFoodValue();\n\t}",
"public void setFood() {\r\n\t\tint x = (int)(Math.random() * (WIDTH - SIZE));\r\n\t\tint y = (int)(Math.random() * (HEIGHT - SIZE));\r\n\t\tx = x - (x % SIZE);\r\n\t\ty = y - (y % SIZE);\r\n\t\t\r\n\t\tfood.setPosition(x, y);\r\n\t}",
"public void setFoodCount(int foodCount)\r\n\t{\r\n\t\tthis.foodCount = foodCount;\r\n\t}",
"public Builder setAddFood(int value) {\n bitField0_ |= 0x00000004;\n addFood_ = value;\n onChanged();\n return this;\n }",
"public void setFoodLevel ( int value ) {\n\t\texecute ( handle -> handle.setFoodLevel ( value ) );\n\t}",
"public static void setFoodQuantity(int foodQuantity) {\n\t\tStore.foodQuantity = foodQuantity;\n\t}",
"public void setHarvestedFood(Food harvestedFood)\n {\n map.setHarvestedFood(harvestedFood);\n }",
"public void eat(Food food) {\n nutritionConsumed += food.getNutritionalValue();\n }",
"public void setFoodPerDay(int foodPerDay)\n {\n this.foodPerDay = foodPerDay;\n }",
"public void setFoods(ch.ivyteam.ivy.scripting.objects.List<online.food.ordering.Food> _foods)\n {\n foods = _foods;\n }",
"protected void dropFood() {\r\n\t\tthis.food++;\r\n\t}",
"protected void set_food_level(int food_level)\n {\n this.food_level = food_level;\n }",
"public void setFavFood(String favFood)\n {\n this.favFood = favFood;\n }",
"public void setAmountOfFindableFood(int amountOfFindableFood) {\n this.amountOfFindableFood = amountOfFindableFood;\n }",
"public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }",
"protected void pickupFood() {\r\n\t\tif(this.food > 0){\r\n\t\t\tthis.food--;\r\n\t\t}\r\n\t}",
"public void setFoodList(FoodList foodList) {\r\n this.foodList = foodList;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for GetMWSInfoProperties method override this method for handling normal response from GetMWSInfoProperties operation | public void receiveResultGetMWSInfoProperties(
com.autometrics.analytics.v9.j2ee.webservices.v1_0.GetMWSInfoPropertiesResponse result) {
} | [
"public void receiveResultGetMWSProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.GetMWSProperties2Response result) {\r\n\t}",
"public void receiveResultGetMWSFunctionalityProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetMWSFunctionalityPropertiesResponse result) {\r\n\t}",
"public void receiveResultGetObjectProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetObjectPropertiesResponse result) {\r\n\t}",
"protected abstract String getLevelPropertyPropertySet();",
"MessageProperty[] getProperties();",
"abstract MBeanOperationInfo getInfo() throws IntrospectionException;",
"@Handler(id=\"getMbeanProperties\",\n input={\n @HandlerInput(name=\"mbean\", type=PropertiesAccess.class, required=true),\n @HandlerInput(name=\"ignoreProps\", type=java.util.List.class)},\n output={\n @HandlerOutput(name=\"result\", type=Map.class)}\n )\n public void getMbeanProperties(HandlerContext handlerCtx) {\n \n PropertiesAccess mbean = (PropertiesAccess)handlerCtx.getInputValue(\"mbean\");\n List<String> ignoreProps = (List)handlerCtx.getInputValue(\"ignoreProps\");\n Map<String,String> allProps = mbean.getProperties();\n \n if (ignoreProps != null ){\n for(String nm : ignoreProps){\n if (allProps.get(nm) != null){\n allProps.remove(nm);\n }\n }\n }\n handlerCtx.setOutputValue(\"result\", allProps);\n }",
"public Map getMessageProperties()\r\n\t{\r\n\t\treturn this.properties;\r\n\t}",
"public int getGetPropertiesResult() {\n return getPropertiesResult;\n }",
"public void receiveResultGetDMXMetricFunctionProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetDMXMetricFunctionPropertiesResponse result) {\r\n\t}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public BlobProperties getProperties() {\n return getPropertiesWithResponse(null, null, Context.NONE).getValue();\n }",
"public void receiveResultGetMWSOfficeInstallInfo(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetMWSOfficeInstallInfoResponse result) {\r\n\t}",
"private SiteExtensionInfoProperties innerProperties() {\n return this.innerProperties;\n }",
"public List<KeyValue> getPropertiesForInterDomainManager (String idm);",
"abstract public Map<Object, Object> getProperties();",
"private String getServiceProperties(Properties properties) {\n String s = \"<ul>\";\n Enumeration<Object> e = properties.keys();\n while (e.hasMoreElements()) {\n String key = (String) e.nextElement();\n String value = properties.get(key).toString();\n s += \"<li>\" + key + \" = \" + value + \"</li>\";\n }\n s += \"</ul>\";\n return s;\n }",
"private IntegrationAccountMapProperties innerProperties() {\n return this.innerProperties;\n }",
"@Handler(id=\"getWebServiceInfoMap\",\n input={\n @HandlerInput(name=\"WebServiceEndpointInfoMBean\", \n type=WebServiceEndpointInfo.class, required=true)},\n output={\n @HandlerOutput(name=\"WebServiceInfoMap\", type=Map.class)})\n public static void getWebServiceInfoMap(HandlerContext handlerCtx) {\n handlerCtx.setOutputValue(\"WebServiceInfoMap\", \n ((WebServiceEndpointInfo)handlerCtx.getInputValue(\n \"WebServiceEndpointInfoMBean\")).asMap());\n }",
"public HashMap<String, String> getCustomMessageProperties() {\n return this.customMessageProperties;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Code for Site Inspection report Assertion report for Application for Building permit | public void TPSiteInspectionLetter_Building_Permit()
{
try{
System.out.println("======================");
if(!mGetPropertyFromFile("TypeOfExecution").equalsIgnoreCase("individual")){
mAssert(SIL_appname.get(CurrentinvoCount), Bpr_AppfullnmWdTitle.get(CurrentinvoCount), "Actual Applicant name in site inspection letter is:::"+SIL_appname.get(CurrentinvoCount) +",Expected is:::"+Bpr_AppfullnmWdTitle.get(CurrentinvoCount));
mAssert(SIL_serviceName.get(CurrentinvoCount),ServiceNameforTownPlanning.get(CurrentinvoCount), "Actual Service Name in site inspection letter is :::"+SIL_serviceName.get(CurrentinvoCount) +",Expected is:::"+ServiceNameforTownPlanning.get(CurrentinvoCount));
mAssert(SIL_ApplicationNo.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), "Actual Application No in site inspection letter is :::"+SIL_ApplicationNo.get(CurrentinvoCount) +",Expected is :::"+ApplicationNoforLandDev.get(CurrentinvoCount));
mAssert(SIL_ward1.get(CurrentinvoCount), Bpr_ward.get(CurrentinvoCount), "Actual Ward No is:::"+SIL_ward1.get(CurrentinvoCount) +",Expected is:::"+Bpr_ward.get(CurrentinvoCount));
mAssert(SIL_KhataNo.get(CurrentinvoCount), Bpr_PlotKhasraNo.get(CurrentinvoCount), "Actual Plot Khasara no is :::"+SIL_KhataNo.get(CurrentinvoCount)+",Expected is:::"+Bpr_PlotKhasraNo.get(CurrentinvoCount));
mAssert(SIL_maujano.get(CurrentinvoCount), Bpr_MaujaNo.get(CurrentinvoCount), "Actual Mauja No is :::"+SIL_maujano.get(CurrentinvoCount) +",Expected is:::"+Bpr_MaujaNo.get(CurrentinvoCount));
mAssert(SIL_plotkhasaranocs.get(CurrentinvoCount), Bpr_KhataNo.get(CurrentinvoCount), "Actual Khata No is:::"+SIL_plotkhasaranocs.get(CurrentinvoCount) +",Expected is:::"+Bpr_KhataNo.get(CurrentinvoCount));
mAssert(SIL_HoldingNo.get(CurrentinvoCount), Bpr_HoldingNo.get(CurrentinvoCount), "Actual Holding No is :::"+SIL_HoldingNo.get(CurrentinvoCount) +",Expected is:::"+Bpr_HoldingNo.get(CurrentinvoCount));
mAssert(SIL_Locality.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), "Actual Village/Mohalla is :::"+SIL_Locality.get(CurrentinvoCount) +",Expected is:::"+Bpr_Village.get(CurrentinvoCount));
mAssert(SIL_TojiNo.get(CurrentinvoCount), Bpr_TojiNo.get(CurrentinvoCount), "Actual Toji No is :::"+SIL_TojiNo.get(CurrentinvoCount) +",Expected is:::"+Bpr_TojiNo.get(CurrentinvoCount));
}
System.out.println("Name is ::"+SIL_officer + SCR_SiteInspectEmpName);
System.out.println("date is ::"+SIL_Inspectiondate + SCR_SiteInspectionEmpDate);
mAssert(SIL_officer.get(CurrentinvoCount).toString(), SCR_SiteInspectEmpName.get(CurrentinvoCount).toString(), "Actual Site Inspection inspector name is:::"+SIL_officer.get(CurrentinvoCount).toString() +",Expected is:::"+SCR_SiteInspectEmpName.get(CurrentinvoCount).toString());
mAssert(SIL_Inspectiondate.get(CurrentinvoCount),SCR_SiteInspectionEmpDate.get(CurrentinvoCount), "Actual Site Inspection Date is :::"+SIL_Inspectiondate.get(CurrentinvoCount) +",Expected is :::"+SCR_SiteInspectionEmpDate.get(CurrentinvoCount));
}
catch(Exception e)
{
e.printStackTrace();
throw new MainetCustomExceptions("Error in searchByVariousCriteria script");
}
} | [
"public void Building_Permit_Assertion()\n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.BuildingPermitApprovalPDF(pdfoutput);\n\t\t\t{\n\t\t\t\tmAssert(BPAL_APPLICATIONNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No is :::\"+BPAL_APPLICATIONNO +\",Expected is :::\"+ApplicationNoforLandDev);\n\t\t\t\tmAssert(BPAL_OWNERNAME.get(CurrentinvoCount), Bpr_OwnerFullName.get(CurrentinvoCount), \"Actual Owner Name is :::\"+BPAL_OWNERNAME +\",Expected is :::\"+Bpr_OwnerFullName);\n\t\t\t\tmAssert(BPAL_WARD.get(CurrentinvoCount), Bpr_ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+BPAL_WARD +\",Expected is :::\"+Bpr_ward);\n\t\t\t\tmAssert(BPAL_KHATANO.get(CurrentinvoCount), Bpr_KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+BPAL_KHATANO +\",Expected is:::\"+Bpr_KhataNo);\n\t\t\t\tmAssert(BPAL_HOLDINGNO.get(CurrentinvoCount), Bpr_HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+BPAL_HOLDINGNO +\",Expected is:::\"+Bpr_HoldingNo);\n\t\t\t\tmAssert(BPAL_VILLAGE.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+BPAL_VILLAGE +\",Expected is:::\"+Bpr_Village);\n\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"public void Land_dev_Approval_Assertion()\n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.LandDevApprovalPDF(pdfoutput);\n\t\t\tif(!mGetPropertyFromFile(\"TypeOfExecution\").equalsIgnoreCase(\"individual\")){\n\t\t\t\tmAssert(LDAL_APPLNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Application No does not match in Approval letter Actual :::\"+LDAL_APPLNO +\",Expected is :::\"+ApplicationNoforLandDev);\n\t\t\t\tmAssert(LDAL_OWNERNAME.get(CurrentinvoCount),AlD_Nameofowner.get(CurrentinvoCount), \"Owner Name does not match in Approval letter Actual :::\"+LDAL_OWNERNAME +\",Expected is :::\"+AlD_Nameofowner);\n\t\t\t\tmAssert(LDAP_WARD.get(CurrentinvoCount), ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+LDAP_WARD +\",Expected is :::\"+ward);\n\t\t\t\tmAssert(LDAP_KHATANO.get(CurrentinvoCount), KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+LDAP_KHATANO +\",Expected is:::\"+KhataNo);\n\t\t\t\tmAssert(LDAP_HOLDINGNO.get(CurrentinvoCount), HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+LDAP_HOLDINGNO +\",Expected is:::\"+HoldingNo);\n\t\t\t\tmAssert(LDAP_MSPKHASARA.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot No/Khasara No is :::\"+LDAP_MSPKHASARA +\",Expected is:::\"+PlotKhasraNo);\n\t\t\t\tmAssert(LDAP_PLOTMSP.get(CurrentinvoCount), PlotNoMSP.get(CurrentinvoCount), \"Actual Plot No(MSP) is:::\"+LDAP_PLOTMSP +\",Expected is:::\"+PlotNoMSP);\n\t\t\t\tmAssert(LDAP_VILLAGE.get(CurrentinvoCount), Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+LDAP_VILLAGE +\",Expected is:::\"+Village);\n\t\t\t\tmAssert(LDAP_MSPKHASARA.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot No/Khasara No is :::\"+LDAP_MSPKHASARA +\",Expected is:::\"+PlotKhasraNo);\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"public void TPSiteInspectionLetter_Application_Dev_plan() \n\t{\n\t\ttry{\n\n\t\t\tSCR_SiteInspectEmpName.add(mGetPropertyFromFile(\"tp_SiteInspectEmpNmdata\"));\n\t\t\tSCR_SiteInspectionEmpDate.add(mGetPropertyFromFile(\"tp_SiteInspectDatedata\"));\n\t\t\tif(!mGetPropertyFromFile(\"TypeOfExecution\").equalsIgnoreCase(\"individual\")){\n\t\t\t\t/*mAssert(SIL_appname.get(CurrentinvoCount), AppfullnmWdTitle.get(CurrentinvoCount), \"Actual Applicant name in site inspection letter is:::\"+SIL_appname.get(CurrentinvoCount) +\",Expected is:::\"+AppfullnmWdTitle.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_serviceName.get(CurrentinvoCount),ServiceNameforTownPlanning.get(CurrentinvoCount), \"Actual Service Name in site inspection letter is :::\"+SIL_serviceName.get(CurrentinvoCount) +\",Expected is:::\"+ServiceNameforTownPlanning.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ApplicationNo.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No in site inspection letter is :::\"+SIL_ApplicationNo.get(CurrentinvoCount) +\",Expected is :::\"+ApplicationNoforLandDev.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_ward1.get(CurrentinvoCount), ward.get(CurrentinvoCount), \"Actual Ward No is:::\"+SIL_ward1.get(CurrentinvoCount) +\",Expected is:::\"+ward.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_KhataNo.get(CurrentinvoCount), PlotKhasraNo.get(CurrentinvoCount), \"Actual Plot Khasara no is :::\"+SIL_KhataNo.get(CurrentinvoCount)+\",Expected is:::\"+PlotKhasraNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_maujano.get(CurrentinvoCount), MaujaNo.get(CurrentinvoCount), \"Actual Mauja No is :::\"+SIL_maujano.get(CurrentinvoCount) +\",Expected is:::\"+MaujaNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_plotkhasaranocs.get(CurrentinvoCount), KhataNo.get(CurrentinvoCount), \"Actual Khata No is:::\"+SIL_plotkhasaranocs.get(CurrentinvoCount) +\",Expected is:::\"+KhataNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_HoldingNo.get(CurrentinvoCount), HoldingNo.get(CurrentinvoCount), \"Actual Holding No is :::\"+SIL_HoldingNo.get(CurrentinvoCount) +\",Expected is:::\"+HoldingNo.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_Locality.get(CurrentinvoCount), Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+SIL_Locality.get(CurrentinvoCount) +\",Expected is:::\"+Village.get(CurrentinvoCount));\n\t\t\t\tmAssert(SIL_TojiNo.get(CurrentinvoCount), TojiNo.get(CurrentinvoCount), \"Actual Toji No is :::\"+SIL_TojiNo.get(CurrentinvoCount) +\",Expected is:::\"+TojiNo.get(CurrentinvoCount));*/\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"public void Occupancy_Certificate_Assertion() \n\t{\n\t\ttry{\n\t\t\tapi.PdfPatterns.OccupancyCertificateApprovalPDF(pdfoutput);\n\t\t\t{\n\t\t\t\tmAssert(OCAL_APPLNO.get(CurrentinvoCount), ApplicationNoforLandDev.get(CurrentinvoCount), \"Actual Application No is :::\"+OCAL_APPLNO +\",Expected is :::\"+applicationNo);\n\t\t\t\t//\tmAssert(OCAL_OWNERNAME.get(CurrentinvoCount), Nameofowner.get(CurrentinvoCount), \"Actual Owner Name is :::\"+OCAL_OWNERNAME +\",Expected is :::\"+Bpr_Nameofowner);\n\t\t\t\t/*mAssert(OCAL_WARD.get(CurrentinvoCount), Bpr_ward.get(CurrentinvoCount), \"Actual Ward No is :::\"+LDAP_WARD +\",Expected is :::\"+Bpr_ward);\n\t\t\t\tmAssert(OCAL_KHATANO.get(CurrentinvoCount), Bpr_KhataNo.get(CurrentinvoCount), \"Actual Khata No is :::\"+OCAL_KHATANO +\",Expected is:::\"+Bpr_KhataNo);\n\t\t\t\tmAssert(OCAL_HOLDINGNO.get(CurrentinvoCount), Bpr_HoldingNo.get(CurrentinvoCount), \"Actual Holding No is:::\"+LDAP_HOLDINGNO +\",Expected is:::\"+Bpr_HoldingNo);\n\t\t\t\tmAssert(OCAL_PLOTNOMSP.get(CurrentinvoCount), Bpr_PlotNoMSP.get(CurrentinvoCount), \"Actual Plot No(MSP) is:::\"+OCAL_PLOTNOMSP +\",Expected is:::\"+Bpr_PlotNoMSP);\n\t\t\t\tmAssert(OCAL_VILLAGE.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+LDAP_VILLAGE +\",Expected is:::\"+Village);\n\t\t\t\tmAssert(OCAL_PLOTNOCS.get(CurrentinvoCount), Bpr_Village.get(CurrentinvoCount), \"Actual Village/Mohalla is :::\"+OCAL_PLOTNOCS +\",Expected is:::\"+Village);*/\n\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow new MainetCustomExceptions(\"Error in searchByVariousCriteria script\");\n\t\t}\n\t}",
"private void printLessonCCSSCoverageReport() {\n }",
"@Test(groups={\"it\"})\r\n\tpublic void testDetailedReportContainsCaptureOnSoftAssertionEnabled() throws Exception {\r\n\r\n\t\ttry {\r\n\t\t\tSystem.setProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED, \"true\");\r\n\t\t\t\r\n\t\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest\"}, ParallelMode.METHODS, new String[] {\"testDriverWithAssert\"});\r\n\t\t\t\r\n\t\t\tString detailedReportContent = readTestMethodResultFile(\"testDriverWithAssert\");\r\n\t\t\tSeleniumTestsContextManager.getThreadContext().setSoftAssertEnabled(false);\r\n\t\t\t\r\n\t\t\t// check that with assertion error, snapshot is present\r\n\t\t\tAssert.assertTrue(detailedReportContent.contains(\"!!!FAILURE ALERT!!! - Assertion Failure: expected [true] but found [false]</div><div class=\\\"row\\\"><div class=\\\"message-snapshot col\\\"><div class=\\\"text-center\\\"><a href=\\\"#\\\" onclick=\\\"$('#imagepreview').attr('src', $('#\"));\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tSystem.clearProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED);\r\n\t\t}\r\n\t}",
"@Test(enabled=false)\n\tpublic void tp_OccupancyCertificateApplicationApproval() {\n\t\ttry{GetCurrentdate();\n\t\tcurrentmethodname = Thread.currentThread().getStackTrace()[1].getMethodName();\n\t\tER.datareader();\n\t\tthisMethodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n\t\tTPCustomErrorMessages.tp_m_errors.entrySet().clear();\n\t\t/*if(!mGetPropertyFromFile(\"wantToRejectAtScrutiny\").equalsIgnoreCase(\"No\") || !mGetPropertyFromFile(\"wantToRejectAtChecklist\").equalsIgnoreCase(\"No\")){\n\t\t\tSystem.out.println(\"Method is skipped due to rejected\");\n\t\t}else{*/\n\t\tif (!(chekindexes.contains(CurrentinvoCount))) {\n\t\t\tif(!(scrutinyindexes.contains(CurrentinvoCount))) {\n\t\t\n\t\t\tapplicationApproval();\n\t\t\tOccupancy_Certificate_Assertion();\n\t\t}\n\t\t}CommonUtilsAPI.tpErrorMsg.assertAll();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tinAtTest=true;\n\t\t\tthrow new MainetCustomExceptions(\"Error in tp_OccupancyCertificateApplicationApproval method\");\n\t\t}\n\t}",
"@Test(priority = 1, groups= {\"regression\",\"smoke\"})\r\n\tpublic void PrintHospitals()\r\n\t{\r\n\t\tlogger= report.createTest(\"Printing Hospitals as per requirement\");\r\n\t\tDisplayHospitalNames hp=Base.nextPage1();\r\n\t\thp.selectLocation();\r\n\t\thp.selectHospital();\r\n\t\thp.applyFilters();\r\n\t\thp.hospitals();\r\n\t\thp.Back();\r\n\t}",
"@Test(description = \"FP-TC-1531_Assessment is not displayed in Move To filter in case when Assessment has at least one form item mapping\", groups = {\n\t\t\t\" \" })\n\n\tpublic void FPTC_1531_verify_AsseNotDisplayedInMoveToFilter() {\n\n\t\treportLog(\"1.1:Log in to Portal as a User from Pr.#1\");\n\t\tdashBoardPage = loginPage.loginInApplication(SuperAdminUN, SuperAdminPW);\n\n\t\treportLog(\"1.2:User successfully logged in\");\n\t\tstudyNavigatorDashBoardPage = dashBoardPage.selectHorizontalUpperNavMenuItem(StudyDashBoardPage.class, Constants.NavigateText, Constants.StudyText);\n\t\tstudyNavigatorDashBoardPage.selectStudy(studyName,Constants.ATAssignedRater_10);\n\n\t\treportLog(\"2.1:Navigate to Assessment Listing screen and select Assessment from Pr.#2\");\n\t\tstudyNavigatorDashBoardPage.navigateToAssessmentsListing();\n\t\tstudyNavigatorDashBoardPage.expandAndCollapseSidePanel();\n\t\treportLog(\"2.2:Assessment Detail screen is displayed\");\n\t\tassessmentDetailPage = studyNavigatorDashBoardPage.selectByAssesmentNameAndVisitAndSubjectName(\n\t\t\t\tConstants.Assesment_AdasCog14List1FormNameThirdType, visitNameFirst, subjectNameSelect);\n\t\tassessmentDetailPage.verifyAssessmentDetailsDisplayed();\n\t\t\n\t\treportLog(\"3.1:\t'Action' option is displayed\");\n\t\tassessmentDetailPage.verifyActionOptionIsDisplayed();\n\n\t\treportLog(\"3.2:\tSelect an action to move Assessment \");\n\t\tassessmentDetailPage.selectActionToMoveAssessment();\n\n\t\treportLog(\"4.1:\tCheck that Assessment Pr.#3 isn't displayed in ‘Move To’ Assessment drop down list\");\n\t\treportLog(\"4.2:Assessment from Pr.#3 isn't displayed in ‘Move To’ Assessment drop down list\");\n\t\tassessmentDetailPage.clickOnChangeToSelectSubjectDropDown();\n\t\tassessmentDetailPage.verifySubjectIsNOtPresntInMoveToSubjectListDrpDwn(subjectNameSelect);\n\t\tassessmentDetailPage.clickOnCrossIconOfMoveAssessmentPopUp();\n\n\t\treportLog(\"Logout from the application\");\n\t\tloginPage.logoutApplication();\n\n\t\treportLog(\"Verify user is logout\");\n\t\tloginPage.verifyUserLogout();\n\n\t}",
"@Test(groups={\"it\"})\r\n\tpublic void testDetailedReportWithSoftAssertInScenario() throws Exception {\r\n\r\n\t\ttry {\r\n\t\t\tSystem.setProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED, \"true\");\r\n\t\t\t\r\n\t\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClass3\"}, ParallelMode.METHODS, new String[] {\"testWithAssertInTest\"});\r\n\r\n\t\t\tSeleniumTestsContextManager.getThreadContext().setSoftAssertEnabled(false);\r\n\t\t\t\r\n\t\t\t// check content of summary report file\r\n\t\t\tString detailedReportContent = readTestMethodResultFile(\"testWithAssertInTest\");\r\n\t\t\t\r\n\t\t\t// check step with assertion inside is failed\r\n\t\t\tAssert.assertTrue(detailedReportContent.contains(\"<div class=\\\"box collapsed-box failed\\\"><div class=\\\"box-header with-border\\\">\"\r\n\t\t\t\t\t+ \"<button type=\\\"button\\\" class=\\\"btn btn-box-tool\\\" data-widget=\\\"collapse\\\"><i class=\\\"fas fa-plus\\\"></i></button><span class=\\\"step-title\\\"> assertAction\"));\r\n\t\t\tAssert.assertTrue(detailedReportContent.contains(\"</div><div class=\\\"box-body\\\"><ul><div class=\\\"message-error\\\">!!!FAILURE ALERT!!! - Assertion Failure: false error expected [true] but found [false]</div>\"));\r\n\t\t\t\r\n\t\t\t// that assertion raised in test scenario is attached to previous step\r\n\t\t\tAssert.assertTrue(detailedReportContent.matches(\".*<div class\\\\=\\\"box collapsed-box failed\\\"><div class\\\\=\\\"box-header with-border\\\">\"\r\n\t\t\t\t\t+ \"<button type\\\\=\\\"button\\\" class\\\\=\\\"btn btn-box-tool\\\" data-widget\\\\=\\\"collapse\\\"><i class\\\\=\\\"fas fa-plus\\\"></i></button><span class=\\\"step-title\\\"> getResult - \\\\d+\\\\.\\\\d+ secs\\\\s*</span></div><div class\\\\=\\\"box-body\\\">\"\r\n\t\t\t\t\t+ \"<ul><div class\\\\=\\\"message-error\\\">!!!FAILURE ALERT!!! - Assertion Failure: Error in result expected \\\\[1\\\\] but found \\\\[2\\\\]</div>.*\"));\r\n\t\t\t\r\n\t\t\t// check last step shows the assertion\t\t\t\t\t\r\n\t\t\tAssert.assertTrue(detailedReportContent.matches(\".*<div class\\\\=\\\"box collapsed-box failed\\\">.*?<i class\\\\=\\\"fas fa-plus\\\"></i>\"\r\n\t\t\t\t\t+ \"</button><span class=\\\"step-title\\\"> Test end - \\\\d+\\\\.\\\\d+ secs\\\\s*</span></div><div class\\\\=\\\"box-body\\\"><ul><div class\\\\=\\\"message-log\\\">Test is KO with error: class java.lang.AssertionError: !!! Many Test Failures \\\\(2\\\\)<br/>\"\r\n\t\t\t\t\t+ \"<br/>class java.lang.AssertionError: <br/>\\\\.<br/>Failure 1 of 2.*Failure 2 of 2.*\"\r\n\t\t\t\t\t+ \"<div class\\\\=\\\"message-error\\\">\\\\s+class java.lang.AssertionError: !!! Many Test Failures \\\\(2\\\\)<br/>.*\"));\r\n\t\t\t\r\n\t\t\t// check last step before test end is OK because no error occurs in it\r\n\t\t\tAssert.assertTrue(detailedReportContent.matches(\".*<div class\\\\=\\\"box collapsed-box success\\\">.*?<i class\\\\=\\\"fas fa-plus\\\"></i></button><span class=\\\"step-title\\\"> add with args: \\\\(3, \\\\).*\"));\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tSystem.clearProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED);\r\n\t\t}\r\n\t}",
"@Test(priority=56,groups={\"P2\",\"InvoiceNumbserSettingsTest\"},description=\"To verify View records per page drop down under POS Point(s) title in Invoice Number Settings page.\")\n\tpublic void HMS6382() throws Throwable\n\t{\n\t\ttry\n\t\t{\n\t\tAdminHome AH=AL.adminlogin(\"12903\",\"barkha.kapoor52@gmail.com\",\"86bc0493\");\n\n\t\t//AdminHome AH=AL.adminlogin_12485();\n\t\tInvoiceNumberSettingsLP INS=AH.fn_NavigateInvNumSettingPage();\n\t\tINS.verify_viewDropdown(\"5\");\n\t\t\n\t\tSystem.out.println(\"HMS-6382 Executed\");\n\t\t}\n\t\tcatch(Throwable e)\n\t\t{ GenericClass.getscreenshot(Thread.currentThread().getStackTrace()[1].getMethodName());\n\t\n\t\t\tthrow e;\n\t\t}\n\t\t\t\n\t}",
"public void displayPolicyViolation_xa(GrndsExchangeContext context) {\r\n PerformanceTrace performanceTrace = new PerformanceTrace(TRACE_TAG, \"displayPolicyViolation_xa\");\r\n performanceTrace.enterScope();\r\n\r\n try {\r\n HttpServletRequest request = context.getRequest();\r\n BaseSessionStateManager state = getSessionStateManager(context);\r\n NonComplianceSO nonComplianceSO = null;\r\n NonComplianceSI nonComplianceSI = new NonComplianceSI();\r\n boolean modeEdit = ContextHelper.getIntSafe(request, \"Edit.x\") != 0;\r\n boolean modeNewUsing = ContextHelper.getIntSafe(request, \"NewUsing.x\") != 0;\r\n boolean modeAdd = ContextHelper.getIntSafe(request, \"Add.x\") != 0;\r\n boolean modeCopy = ContextHelper.getIntSafe(request, \"Copy.x\") != 0;\r\n boolean protectForm = false;\r\n \r\n String pageMode;\r\n if (modeEdit) {\r\n pageMode = PageModeConstants.EDIT;\r\n } else if (modeNewUsing) {\r\n pageMode = PageModeConstants.NEW_USING;\r\n } else if (modeAdd) {\r\n pageMode = PageModeConstants.NEW;\r\n } else if (modeCopy) {\r\n pageMode = PageModeConstants.NEW;\r\n } else {\r\n // pageMode = PageModeConstants.MODIFY;\r\n pageMode = EventSearchConversation.getEventDetailPageMode(request);\r\n // Doing an override because the page should be allowed to save for two fields Date Achieved\r\n // and Result Description if the person has stage access while working in Approved (APRV) Event.\r\n // By default for any Approved (APRV) event, the page mode will be set to INQUIRE. But in\r\n // this case as described above, resetting the page mode to EDIT.\r\n // keep the document protected in inquire mode\r\n if (PageModeConstants.INQUIRE.equals(pageMode)){\r\n protectForm = true;\r\n }\r\n if (PageModeConstants.INQUIRE.equals(pageMode) && GlobalData.hasStageAccess(request)) {\r\n pageMode = PageModeConstants.EDIT;\r\n }\r\n }\r\n //SMS#52234 if the user is not SAU_SEALED OR if SAU_SEALED and NoStageAccess, the Poicy Violation should be View only if it was \r\n // created before the sealing date (dtSealed)\r\n int idStage = GlobalData.getUlIdStage(request);\r\n int idEvent = GlobalData.getUlIdEvent(request);\r\n if(idEvent > 0 && idStage > 0){\r\n CaseUtility.Stage stage = CaseUtility.getStage(\"\" + idStage);\r\n Date dtSealed = DateHelper.toJavaDate(stage.getDtSealed()); \r\n CaseUtility.Event nonComplianceEvent = CaseUtility.getEvent(idEvent); \r\n Date dtEvent = nonComplianceEvent.getDtEventOccurred();\r\n UserProfile userProfile = getUserProfile(request);\r\n if(!userProfile.hasRight(UserProfile.SEC_SAU_SEALED) || (userProfile.hasRight(UserProfile.SEC_SAU_SEALED) && !GlobalData.hasStageAccess(request))){\r\n if(DateHelper.isBefore(dtEvent, dtSealed) || DateHelper.isEqual(dtEvent, dtSealed)){\r\n pageMode = PageModeConstants.VIEW;\r\n }\r\n } \r\n }\r\n state.removeAllAttributes(request);\r\n PageMode.setPageMode(pageMode, request);\r\n if (modeEdit) {\r\n Sets.setPageSet(Sets.E, request);\r\n } else if (PageModeConstants.NEW_USING.equals(pageMode)) {\r\n Sets.setPageSet(Sets.N, request);\r\n } else if (PageModeConstants.NEW.equals(pageMode)) {\r\n Sets.setPageSet(Sets.A, request);\r\n } else if (PageModeConstants.MODIFY.equals(pageMode)) {\r\n Sets.setPageSet(Sets.M, request);\r\n }\r\n // Do the logic for New, new using, edit and Modify.\r\n if (pageMode.equalsIgnoreCase(PageModeConstants.NEW) || \r\n pageMode.equalsIgnoreCase(PageModeConstants.NEW_USING)) {\r\n // Setting Flag as false so that the children list can be retrieved fresh from the database\r\n nonComplianceSI.setUpdateFlag(false);\r\n } else if (pageMode.equalsIgnoreCase(PageModeConstants.EDIT)\r\n || pageMode.equalsIgnoreCase(PageModeConstants.MODIFY)) {\r\n // Setting Flag as Update so that Non Compliance Child list can be retrieved from NonComplianceChild table.\r\n nonComplianceSI.setUpdateFlag(true);\r\n } \r\n // use the Stage ID to get the FAD Resource ID\r\n nonComplianceSI.setIdStage(GlobalData.getUlIdStage(request));\r\n nonComplianceSI.setIdCase(GlobalData.getUlIdCase(request));\r\n nonComplianceSI.setIdEvent(GlobalData.getUlIdEvent(request));\r\n state.setAttribute(PROTECT_FORM, new Boolean(protectForm), request);\r\n // Get the Task code to make sure it is indeed Corrective Action Plan Task Code\r\n String taskCode = GlobalData.getSzCdTask(request);\r\n if (taskCode.equals(POLICY_VIOLATION_TASKCD)) {\r\n // Check whether the Document Exists already\r\n nonComplianceSI.setCdNonCompliance(CodesTables.CEVNTTYP_VLT);\r\n nonComplianceSO = nonCompliance.checkDocExistsForNonCompliance(nonComplianceSI);\r\n if (nonComplianceSO.getDtFormLastDate() != null) {\r\n request.setAttribute(DOCEXISTS, ArchitectureConstants.TRUE);\r\n } else {\r\n request.setAttribute(DOCEXISTS, ArchitectureConstants.FALSE);\r\n }\r\n // Irrespective of whether if it is an insert or update, Children belong the home\r\n // needs to be pulled.\r\n nonComplianceSO = nonCompliance.retrieveChildrenInHome(nonComplianceSI);\r\n // set case ID and Event ID to the SO\r\n nonComplianceSO.setIdCase(GlobalData.getUlIdCase(request));\r\n nonComplianceSO.setIdEvent(GlobalData.getUlIdEvent(request));\r\n // set Resource ID to GlobalData\r\n GlobalData.setUlIdResource(nonComplianceSO.getIdResource(), request);\r\n // If there is an event id in GlobalData, then it's the event id of the\r\n // Corrective Action Plan.\r\n if (GlobalData.getUlIdEvent(request) > 0) {\r\n // Query the Corrective Action plan and Corrective Action plan event details.\r\n NonComplianceSO nonComplianceSOReturn = nonCompliance.retrieveNonCompliance(nonComplianceSI);\r\n // Load the Corrective Action Plan, event, cbx and child data to main nonComplianceSO object.\r\n nonComplianceSO = loadCorrectiveAction(nonComplianceSO, nonComplianceSOReturn);\r\n // If the Corrective Action is copied from an existing plan then Event Status and\r\n // Document Completed needs to be reset for full editing\r\n if (PageModeConstants.NEW_USING.equals(pageMode) && nonComplianceSO.getNcEvent() != null) {\r\n nonComplianceSO.getNcEvent().setEventStatusCode(CodesTables.CEVTSTAT_PROC);\r\n nonComplianceSO.setIndDocCompleted(ArchitectureConstants.FALSE);\r\n nonComplianceSO.setIndCpaCon(ArchitectureConstants.FALSE);\r\n nonComplianceSO.setIndStOffCon(ArchitectureConstants.FALSE);\r\n } \r\n // If the Non Compliance event is pending approval and the user did\r\n // not access the page via a Non Compliance approval to do, notify them\r\n // that the pending approval will be invalidated if they save any\r\n // changes. If the supervisor accessed the pending Non Compliance via\r\n // a stage closure approval to do, the pending family plan will be\r\n // invalidated. This will enable the supervisor to close the stage\r\n // without leaving a pending non compliance plan behind.\r\n if (CodesTables.CEVTSTAT_PEND.equals(nonComplianceSOReturn.getNcEvent().getEventStatusCode())\r\n && (!GlobalData.isApprovalMode(request) || GlobalData.isStageClosureBeingApproved(request))) {\r\n setInformationalMessage(Messages.MSG_CMN_INVLD_APRVL, request);\r\n setPopUpMessage(Messages.MSG_CMN_INVLD_APRVL_POPUP, request);\r\n }\r\n }\r\n //set the State and CPA Concurrence Attribute from the Security\r\n nonComplianceSO.setSecurityStCpaCon(getModifyStateCPAConAttribute(request));\r\n //set the ResourceHomeType\r\n String resourceHomeType = nonCompliance.retrieveResourceHomeType(GlobalData.getUlIdCase(request));\r\n nonComplianceSO.setHomeType(resourceHomeType);\r\n }\r\n state.setAttribute(NON_COMPLIANCE_SO, nonComplianceSO, request);\r\n displayPolicyViolation(context);\r\n } catch (Exception e) {\r\n GrndsTrace.msg(TRACE_TAG, 7, \"General Failure: \" + e.getMessage());\r\n handleException(e, context, \"displayPolicyViolation_xa\");\r\n }\r\n }",
"@Test(description = \"FPTC_1605_SiteViewOfScheduledCRVisits\", groups = { \"R1\" })\n\n\tpublic void FPTC_1605_verifySiteViewOfScheduledCRVisits() throws InterruptedException {\n\n\t\treportLog(\"1: Login to Portal as the user(PR#1)\");\n\t\tdashBoardPage = loginPage.loginInApplication(AT_PRODITSupport, AT_Password);\n\t\tdashBoardPage.verifyMedavantePortalPage();\n\n\t\treportLog(\"1.1: Navigate to CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage = dashBoardPage.selectHorizontalUpperNavMenuItem(CentralRatingAssessmentsListingPage.class, Constants.NavigateText, Constants.RatingsText);\n\n\t\treportLog(\"1.2 Scheduled Date From is set as current date.\");\n\t\tcentralRatingAssesmentListingPage.verifyScheduleDateFrom();\n\n\t\treportLog(\"2. CR assessment page is displayed. \");\n\t\tcentralRatingAssesmentListingPage.verifyCRAssessmentsPage();\n\n\t\treportLog(\"3. Click on Refresh icon\");\n\t\tcentralRatingAssesmentListingPage.clickRefreshIcon();\n\n\t\treportLog(\"4. Click on Home button\");\n\t\tdashBoardPage = centralRatingAssesmentListingPage.selectHorizontalUpperNavMenuItem(MedAvantePortalPage.class,\n\t\t\t\tConstants.HomeNavText);\n\n\t\treportLog(\"5. Navigate to CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage = dashBoardPage.selectHorizontalUpperNavMenuItem(CentralRatingAssessmentsListingPage.class, Constants.NavigateText, Constants.RatingsText);\n\n\t\treportLog(\"5.1 Click on Find Subject\");\n\t\tcentralRatingAssesmentListingPage.clickOnFindSubjectIcon();\n\n\t\treportLog(\"5.2 Find Subject dialog is opened.\");\n\t\tcentralRatingAssesmentListingPage.verifyFindSubjectDialog();\n\n\t\treportLog(\"5.3 Close the Find Subject pop up\");\n\t\tcentralRatingAssesmentListingPage.closeFindSubjectPopup();\n\n\t\treportLog(\"6. Clear the dates in Form and To\");\n\t\tcentralRatingAssesmentListingPage.clickOnSchedularCancelIcon();\n\n\t\treportLog(\"6.1 Reset to Default button is enabled.\");\n\t\tcentralRatingAssesmentListingPage.clickResetToDefault();\n\n\t\treportLog(\"6.2 CR assessment list is revised based on selected date\");\n\t\tcentralRatingAssesmentListingPage.searchByVisitStatus(Constants.scheduled_Status);\n\n\t\treportLog(\"6.3. Verify schedule date is same as noted date for all revised records.\");\n\t\tcentralRatingAssesmentListingPage.verifyScheduleDateData();\n\n\t\treportLog(\"6.4 Reset to Default button is enabled.\");\n\t\tcentralRatingAssesmentListingPage.verifyResetToDefaultButton();\n\n\t\treportLog(\"7. Click on Reset to Default\");\n\t\tcentralRatingAssesmentListingPage.clickResetToDefault();\n\n\t\treportLog(\"8. Click on Subject Number hyperlink for the Visit (PR#6.1 ) and make note for subject number\");\n\t\tcentralRatingAssesmentListingPage.clickOnSchedularCancelIcon();\n\t\tcentralRatingAssesmentListingPage.searchByVisitStatus(Constants.scheduled_Status);\n\t\tcentralRatingAssesmentListingPage.sortBySubjectName(subjectName);\n\n\t\treportLog(\"8.1: Get the SVID value for this subject\");\n\t\tString svidValue = centralRatingAssesmentListingPage.svidValue();\n\t\tcentralRatingAssesmentListingPage.clickOnSearchSubjects(subjectName);\n\n\t\treportLog(\"8.2 Take user to Subject details page Verify subject number in this page is same as noted number.\");\n\t\tcentralRatingAssesmentListingPage.verifyDataOnSubjcetGeneralSection(subjectName);\n\n\t\treportLog(\"9. Go back to the CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage.navigateBack();\n\t\tcentralRatingAssesmentListingPage.waitSpinnerToBecomeInvisible();\n\n\t\treportLog(\"9.1. Click on SVID hyperlink for PR#6.1 and note SVID\");\n\t\tcentralRatingAssesmentListingPage.clickOnSchedularCancelIcon();\n\t\tcentralRatingAssesmentListingPage.searchByVisitStatus(Constants.scheduled_Status);\n\t\tcentralRatingAssesmentListingPage.searchBySVID(svidValue);\n\t\tcentralRatingAssesmentListingPage.clickOnRowByColumnAndRowValue(\"SVID\", svidValue);\n\n\t\treportLog(\"9.2 Verify SVID in this page is same as noted SVID\");\n\t\tcentralRatingAssesmentListingPage.verifyValueOnSubjcetDetailPage(svidValue);\n\n\t\treportLog(\"10. Go back to the CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage.navigateBack();\n\n\t\treportLog(\"10.1 CR assessment page is displayed.\");\n\t\tcentralRatingAssesmentListingPage.verifyCRAssessmentsPage();\n\n\t\treportLog(\"10.2 Applied filer as visit status\");\n\t\tcentralRatingAssesmentListingPage.clickOnSchedularCancelIcon();\n\t\tcentralRatingAssesmentListingPage.searchByVisitStatus(Constants.scheduled_Status);\n\n\t\treportLog(\"10.3 Click on a CR Visit (Pr#6.1) record and note Subject number, SVID\");\n\t\tcentralRatingAssesmentListingPage.searchBySVID(svidValue);\n\t\tcentralRatingAssesmentListingPage.sortByVisitName(crVisitName);\n\t\tcentralRatingAssesmentListingPage.clickOnRowByColumnAndRowValue(\"Visit Name\", crVisitName);\n\n\t\tappointmentPage = centralRatingAssesmentListingPage.clickOnVisitRow();\n\t\tappointmentPage.verifyAppointmentPage();\n\n\t\treportLog(\"10.4 Verify the Subject Number and SVID in this page matches with noted Subject Number and SVID\");\n\t\tcentralRatingAssesmentListingPage.verifyValueOnSubjcetDetailPage(svidValue);\n\t\tcentralRatingAssesmentListingPage.verifyPageTitle(subjectName);\n\n\t\treportLog(\"10.5 Go back to the CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage.navigateBack();\n\t\tcentralRatingAssesmentListingPage.waitSpinnerToBecomeInvisible();\n\n\t\treportLog(\"11. Logout\");\n\t\tloginPage.logoutApplication();\n\t\tloginPage.verifyUserLogout();\n\n\t\treportLog(\"11.1 login as the user (Pr#2) \");\t\n\t loginPage.loginInApplication(AT_PRODITSupport, AT_Password);\n\t\tdashBoardPage.verifyMedavantePortalPage();\n\n\t\treportLog(\"11.2 navigate to CR assessment page\");\n\t\tcentralRatingAssesmentListingPage = dashBoardPage.selectHorizontalUpperNavMenuItem(CentralRatingAssessmentsListingPage.class, Constants.NavigateText, Constants.RatingsText);\n\n\t\treportLog(\"11.3 Scheduled Date From is set as current date.\");\n\t\tcentralRatingAssesmentListingPage.verifyScheduleDateFrom();\n\n\t\treportLog(\"11.4 CR assessment page is displayed. \");\n\t\tcentralRatingAssesmentListingPage.verifyCRAssessmentsPage();\n\n\t\treportLog(\"12.1 Click on Refresh icon\");\n\t\tcentralRatingAssesmentListingPage.clickRefreshIcon();\n\n\t\treportLog(\"12.2 Click on Home button\");\n\t\tdashBoardPage = centralRatingAssesmentListingPage.selectHorizontalUpperNavMenuItem(MedAvantePortalPage.class,\n\t\t\t\tConstants.HomeNavText);\n\n\t\treportLog(\"12.3 Navigate to CR Assessment page\");\n\t\tcentralRatingAssesmentListingPage = dashBoardPage.selectHorizontalUpperNavMenuItem(CentralRatingAssessmentsListingPage.class, Constants.NavigateText, Constants.RatingsText);\n\n\t\treportLog(\"12.4 Clear the dates in Form and To\");\n\t\tcentralRatingAssesmentListingPage.clickOnSchedularCancelIcon();\n\n\t\treportLog(\"13.1 Reset to Default button is enabled.\");\n\t\tcentralRatingAssesmentListingPage.clickResetToDefault();\n\n\t\treportLog(\"13.2 CR assessment list is revised based on selected date\");\n\t\tcentralRatingAssesmentListingPage.searchByVisitStatus(\"Scheduled\");\n\n\t\treportLog(\"13.3 Reset to Default button is enabled.\");\n\t\tcentralRatingAssesmentListingPage.verifyResetToDefaultButton();\n\n\t\treportLog(\"13.4 Click on Reset to Default\");\n\t\tcentralRatingAssesmentListingPage.clickResetToDefault();\n\n\t\treportLog(\"Logout application\");\n\t\tloginPage.logoutApplication();\n\n\t\treportLog(\"Verify user is logout\");\n\t\tloginPage.verifyUserLogout();\n\t}",
"public static synchronized void reportEnvironment() {//extent.endTest((ExtentTest) extentTestMap.get((int) (long) (Thread.currentThread().getId())));\n//\t \t\n//\t \textent.setSystemInfo(\"<font size = 2 color=\\\"blue\\\"><b><u>**** Module Name: \", GlobalConstants.moduleName +\" ******\");\n//\t \textent.setSystemInfo(\"Automation Mode: \",GlobalConstants.mobileAutomationMode);\n//\t extent.setSystemInfo(\"Mobile App: \",GlobalConstants.mobileAppAPKName);\n//\t extent.setSystemInfo(\"Mobile Device: \",GlobalConstants.mobileDeviceName); \n//\t extent.setSystemInfo(\"Mobile Platform Name: \",GlobalConstants.mobilePlatformName);\n//\t // extent.setSystemInfo(\"Time Taken: \",ExtentManager.getRunTime(GlobalConstants.executionReportName)); \n//\t \n }",
"@Test(priority=3,groups={\"P0\",\"InvoiceNumbserSettingsTest\"},description=\"To verify the presence of all the Links, buttons and fields on Invoice Number Settings page.\")\n\tpublic void HMS8909() throws Throwable\n\t{\n\t\ttry\n\t\t{\n\t\tAdminHome AH=AL.adminlogin(\"12903\",\"barkha.kapoor52@gmail.com\",\"86bc0493\");\n\t\t\n\t\t//AdminHome AH=AL.adminlogin_12485();\n\t InvoiceNumberSettingsLP INS=AH.fn_NavigateInvNumSettingPage();\n\t INS.fn_verifyPageElements();\n\t \n\t System.out.println(\"HMS-8909 Executed\");\n\t \n\t\t}\n\t\tcatch(Throwable e)\n\t\t{ GenericClass.getscreenshot(Thread.currentThread().getStackTrace()[1].getMethodName());\n\t\n\t\t\tthrow e;\n\t\t}\n\t \n\t}",
"@Test\n\tpublic void TC060DCL_09() {\n\t\tReporter.log(\"ID TC060DCL_09 : Verify that the invited partner user displays correct info when filtering report for 'All Active', 'Recently Added', 'Watch List', 'Contract Ending Soon' and 'Suspended'\");\n\t\t/*\n\t\t\t1. Navigate to DTS portal\n\t\t\t2. Log into DTS portal as a DTS user successfully\n\t\t\t3. Navigate to \"Companies\" page\n\t\t\t4. Create new invited partner company successfully\n\t\t\t5. Navigate to 'Products' page\n\t\t\t6. Add new product for newly created company above successfully\n\t\t\t7. Publish new product successfully\n\t\t\t8. Add new variant for above product successfully\n\t\t\t9. Navigate to 'Companies' page\n\t\t\t10. Set the report filtering as 'All Active', 'Recently Added', 'Watch List', 'Contract Ending Soon'\n\t\t\tVP: Verify that the value of 'Status', 'Partner Type', 'Watch Items', 'Contract Expiration', 'Date Added' 'All Products', 'Published Products' and 'Variants' is displayed correctly.\n\t\t\t11. Suspend above company successfully\n\t\t\t12. Set the report filtering as 'Suspended'\n\t\t */\n\t\tloginControl.login(SUPER_USER_NAME, SUPER_USER_PASSWORD);\n\t\t// 3. Navigate to \"Companies\" page\n\t\tcompanyControl.click(PageHome.LINK_COMPANY);\n\t\t// Click Add company link\n\t\tcompanyControl.click(Companies.ADD_COMPANY);\n\t\t// 4. Create new invited partner company successfully\n\t\tHashtable<String,String> dataCompany = TestData.validCompany();\n\t\tcompanyControl.addCompany(AddCompany.getHash(), dataCompany);\n\t\t// Create new user\n\t\tHashtable<String,String> dataUser = TestData.partnerUser();\n\t\tdataUser.remove(\"company\");\n\t\tuserControl.addUser(AddUser.getPartnerUser(), dataUser);\n\t\t// Create new brand\n\t\tHashtable<String,String> dataBrand = TestData.brandDraft();\n\t\tcompanyControl.addBrand(AddBrand.getHash(), dataBrand);\n\t\t// 5. Navigate to 'Products' page\n\t\tcompanyControl.click(PageHome.linkAccessories);\n\t\t// Click Add product link\n\t\tcompanyControl.click(ProductModel.ADD_PRODUCT);\n\t\t// 6. Add new product for newly created company above successfully\n\t\t// 7. Publish new product successfully\n\t\tHashtable<String,String> dataProduct = TestData.productData(PARTNER_COMPANY_NAME, PARTNER_BRAND_NAME_1, true, true, true);\n\t\tdataProduct.put(\"company\", dataCompany.get(\"name\"));\n\t\tdataProduct.put(\"brand\", dataBrand.get(\"name\"));\n\t\t//productControl.addProduct(AddEditProductModel.getProductInputFieldIdsHash(), dataProduct);\n\t\tproductWf.createAccessoryPublish(AddEditProductModel.getProductInputFieldIdsHash(),dataProduct);\n\t\t// Click Add new variant link\n\t\tcompanyControl.click(ProductDetailModel.ADD_VARIANT);\n\t\t// 8. Add new variant for above product successfully\n\t\tHashtable<String,String> dataVariant = TestData.variantData(false, false, false);\n\t\tproductControl.addVariant(AddEditProductModel.getVariantHash(), dataVariant);\n\t\t// 9. Navigate to 'Companies' page\n\t\tcompanyControl.click(PageHome.LINK_COMPANY);\n\t\t// 10. Set the report filtering as 'All Active'\n\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.All_Active.getName());\n\t\t/*\n\t\t * VP: Verify that the value of 'Status', 'Partner Type', 'All Products', 'Published Products' and 'Variants' is displayed correctly\n\t\t */\n\t\tAssert.assertTrue(companyControl.checkACompanyExistByName(dataCompany.get(\"name\")));\n\t\tArrayList<String> companyInfo = companyControl.getTableRowValue(Companies.TABLE, companyControl.getRowIndexByName(Companies.TABLE, dataCompany.get(\"name\")));\n\t\tAssert.assertEquals(companyInfo.get(1), \"Invited\");\n\t\tAssert.assertEquals(companyInfo.get(2), \"Partner\");\n\t\tAssert.assertEquals(companyInfo.get(3), \"1\");\n\t\tAssert.assertEquals(companyInfo.get(4), \"1\");\n\t\tAssert.assertEquals(companyInfo.get(5), \"1\");\n\t\t// Set the report filtering as 'Recently Added'\n\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.Recently_Added.getName());\n\t\t/*\n\t\t * VP: Verify that the value of 'Date Added' is displayed correctly\n\t\t */\n\t\tAssert.assertTrue(companyControl.checkACompanyExistByName(dataCompany.get(\"name\")));\n\t\tcompanyInfo = companyControl.getTableRowValue(Companies.TABLE, companyControl.getRowIndexByName(Companies.TABLE, dataCompany.get(\"name\")));\n\t\tAssert.assertEquals(companyInfo.get(3), new SimpleDateFormat(\"MMMM dd, yyyy\").format(new Date()));\n\t\t// Set the invited date of company above back to 3 months\n\t\tString date = DateUtil.getADateGreaterThanToday(\"yyyy-MM-dd\", -100);\n\t\tString sql = \"update partner set invited_at = '\" + date + \"' where name = '\" + dataCompany.get(\"name\") + \"'\";\n\t\tDbUtil.updateStatment(sql);\n\t\t// Set the report filtering as 'Watch List'\n//\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.Watch_List.getName());\n//\t\t/*\n//\t\t * VP: Verify that the value of 'Watch Items' is displayed correctly\n//\t\t */\n//\t\tAssert.assertTrue(companyControl.checkACompanyExistByName(dataCompany.get(\"name\")));\n//\t\tcompanyInfo = companyControl.getTableRowValue(Companies.TABLE, companyControl.getRowIndexByName(Companies.TABLE, dataCompany.get(\"name\")));\n//\t\tAssert.assertEquals(companyInfo.get(2), \"Invited Status 90+ Days\");\n//\t\t// Set the report filtering as 'Contract Ending Soon'\n\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.Contract_Ending_Soon.getName());\n\t\t/*\n\t\t * VP: Verify that the value of 'Contract Expiration' is displayed correctly\n\t\t */\n\t\tAssert.assertTrue(companyControl.checkACompanyExistByName(dataCompany.get(\"name\")));\n\t\tcompanyInfo = companyControl.getTableRowValue(Companies.TABLE, companyControl.getRowIndexByName(Companies.TABLE, dataCompany.get(\"name\")));\n\t\tAssert.assertEquals(companyInfo.get(2), DateUtil.getADateGreaterThanToday(\"MMMM dd, yyyy\", 3));\n\t\t// 11. Suspend above company successfully\n\t\tcompanyControl.selectACompanyByName(dataCompany.get(\"name\"));\n\t\tcompanyControl.click(CompanyInfo.SUSPEND);\n\t\tcompanyControl.selectConfirmationDialogOption(\"Suspend\");\n\t\t// 12. Set the report filtering as 'Suspended'\n\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.Suspended.getName());\n\t\t/*\n\t\t * Verify that the value of 'Status' is displayed correctly\n\t\t */\n\t\tAssert.assertTrue(companyControl.checkACompanyExistByName(dataCompany.get(\"name\")));\n\t\tcompanyInfo = companyControl.getTableRowValue(Companies.TABLE, companyControl.getRowIndexByName(Companies.TABLE, dataCompany.get(\"name\")));\n\t\tAssert.assertEquals(companyInfo.get(1), \"Suspended\");\n\t\t// Delete company\n//\t\tcompanyControl.deleteACompanyByName(dataCompany.get(\"name\"));\n\t\tcompanyControl.click(PageHome.LINK_COMPANY);\n\t\tcompanyControl.selectFilterByName(Companies.FILTER, Companies.option.Suspended.getName());\n\t\tcompanyControl.selectACompanyByName(dataCompany.get(\"name\"));\n\t\tcompanyControl.doDelete(CompanyInfo.DELETE);\n\t}",
"@Test(groups={\"it\"})\r\n\tpublic void testDetailedReportWithSoftAssertInSubStep() throws Exception {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSystem.setProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED, \"true\");\r\n\t\t\t\r\n\t\t\texecuteSubTest(1, new String[] {\"com.seleniumtests.it.stubclasses.StubTestClass3\"}, ParallelMode.METHODS, new String[] {\"testWithAssertInSubStep\"});\r\n\r\n\t\t\tSeleniumTestsContextManager.getThreadContext().setSoftAssertEnabled(false);\r\n\t\t\t\r\n\t\t\t// check content of summary report file\r\n\t\t\tString detailedReportContent = readTestMethodResultFile(\"testWithAssertInSubStep\");\r\n\t\t\t\r\n\t\t\t// check that sub step failure (with assertion) caused the step to fail itself\t\t\t\t\r\n\t\t\tAssert.assertTrue(detailedReportContent.matches(\".*<div class\\\\=\\\"box collapsed-box failed\\\">.*?<i class\\\\=\\\"fas fa-plus\\\"></i>\" // => step failed\r\n\t\t\t\t\t+ \"</button><span class=\\\"step-title\\\"> assertWithSubStep - \\\\d+\\\\.\\\\d+ secs</span></div><div class\\\\=\\\"box-body\\\"><ul><li>doNothing </li>\"\r\n\t\t\t\t\t+ \"<ul><li>doNothing on HtmlElement none, by=\\\\{By\\\\.id: none\\\\} </li><div class\\\\=\\\"row\\\"></div></ul>\"\r\n\t\t\t\t\t+ \"<li>assertAction </li><ul>\" // => sub step with error\r\n\t\t\t\t\t+ \"<div class\\\\=\\\"message-error\\\">!!!FAILURE ALERT!!! - Assertion Failure: false error expected \\\\[true\\\\] but found \\\\[false\\\\].*\")); // error displayed\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\tSystem.clearProperty(SeleniumTestsContext.SOFT_ASSERT_ENABLED);\r\n\t\t}\r\n\t}",
"@Test(enabled=false)\n\tpublic void tp_BuildingPermissionApplicationApproval() throws InterruptedException, IOException{\n\t\ttry{GetCurrentdate();\n\t\tcurrentmethodname = Thread.currentThread().getStackTrace()[1].getMethodName();\n\t\tER.datareader();\n\t\tthisMethodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n\t\tTPCustomErrorMessages.tp_m_errors.entrySet().clear();\n/*\t\tif(!mGetPropertyFromFile(\"wantToRejectAtScrutiny\").equalsIgnoreCase(\"No\") || !mGetPropertyFromFile(\"wantToRejectAtChecklist\").equalsIgnoreCase(\"No\")){\n\t\t\tSystem.out.println(\"Method is skipped due to rejected\");\n\t\t}else{*/\n\t\tif (!(chekindexes.contains(CurrentinvoCount))) {\n\t\t\tif(!(scrutinyindexes.contains(CurrentinvoCount))) {\t\n\t\tapplicationApproval();\n\t\t\tBuilding_Permit_Assertion();\n\t\t}\n\t\t}\n\t\tCommonUtilsAPI.tpErrorMsg.assertAll();\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tinAtTest=true;\n\t\t\tthrow new MainetCustomExceptions(\"Error in tp_BuildingPermissionApplicationApproval method\");\n\t\t}\n\t}",
"@Test(description = \"FP-TC-1229_System doesn't allow creating duplicate subject number using the same attribute\", groups = {\n\t\t\t\" \" })\n\n\tpublic void FPTC_1229_verifySystemDoesntAllowCreatingDuplicateSubjectNumberUsingTheSameAttribute() {\n\n\t\treportLog(\"1.1: Login in to application\");\n\t\tdashBoardPage = loginPage.loginInApplication(AT_PRODSiteCoordinator, AT_Password);\n\n\t\treportLog(\"1.2: Navigate to study navigator\");\n\t\tstudyNavigatorDashBoardPage = dashBoardPage.selectHorizontalUpperNavMenuItem(StudyDashBoardPage.class, Constants.NavigateText, Constants.StudyText);\n\t\tstudyNavigatorDashBoardPage.selectStudy(studyName,Constants.ATAssignedRater_10);\n\n\t\treportLog(\"1.4:Subject List page is visible\");\n\t\tstudyNavigatorDashBoardPage.verifySubjectListIsOpened();\n\n\t\treportLog(\"1.5:Option to add new subject is visible \");\n\t\tstudyNavigatorDashBoardPage.verifyAddSubjectBtnIsDisplayed();\n\n\t\treportLog(\"1.6:Pr#3, Pr#4 and Pr#5 are visible\");\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithRandomNumber);\n\t\tstudyNavigatorDashBoardPage.verifySubjectIsDisplayedInSubjectList(subjectWithTempId);\n\n\t\treportLog(\"2.1:Edit the Subject of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithScreeningNumber);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithScreeningNumber);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\n\t\treportLog(\"2.3:Add Randomization# = Randomization# of Pr#4\");\n\t\tsubjectDetailPage.inputRandomNumber(subjectWithRandomNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"2.4:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicaterandomizationErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"3.1:Edit the Subject of Pr#4\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithRandomNumber);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithRandomNumber);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\n\t\treportLog(\"3.2:Add Screening# = Screening# of Pr#3\");\n\t\tsubjectDetailPage.clearScreeningInp();\n\t\tsubjectDetailPage.inputScreeningNumber(Constants.ScreeningNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"3.3:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateScreeningErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\t\n\t\treportLog(\"4.1:Edit the Subject of Pr#4 and add Temporary ID = Temporary ID of Pr#5\");\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\t\tsubjectDetailPage.clearScreeningInp();\n\t\tsubjectDetailPage.inputTemporaryID(Constants.TempIDNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\t\t\n\t\treportLog(\"4.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateTemporaryIDErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"5.1:Edit the Subject of Pr#5 and add Screening# = Screening# of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.searchFilterValueByColumnNameAndValue(Constants.StudyDashBoard_columnName_Subject,subjectWithTempId);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSearchedSubject(subjectWithTempId);\n\t\tsubjectDetailPage.clickOnSubjectEdtingIcon();\n\t\tsubjectDetailPage.inputScreeningNumber(Constants.ScreeningNumber);\n\t\tsubjectDetailPage.clickOnSaveBtn();\n\n\t\treportLog(\"5.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tsubjectDetailPage.verifyErrorMessage(SubjectsModuleConstants.editDuplicateScreeningErrorMessage);\n\t\tsubjectDetailPage.closeErrorMessage();\n\t\tsubjectDetailPage.clickOnCancelBtn();\n\t\tsubjectDetailPage.navigateBack();\n\n\t\treportLog(\"6.1:Select the option to add new subject\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN();\n\n\t\treportLog(\"6.2:Add new subject screen is visible\");\n\t\tstudyNavigatorDashBoardPage.verifyAddSubjectPopUpIsDisplayed();\n\n\t\treportLog(\"6.3:Screening#, Randomization# and TemporaryID fields are visible\");\n\t\tstudyNavigatorDashBoardPage.verifyScreeningNumberRandomizationTempIdIsDisplayed();\n\n\t\treportLog(\"7.1:\tTry to create the subject with : - Temporary ID = Temporary ID of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.inputTemporaryID(Constants.TempIDNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"7.2:Subject can't be updated System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicateTemporaryIdErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n\t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"8.1:\tRepeat Step#7 with Temporary ID = Screening Number of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputTemporaryID(Constants.ScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"8.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"9.1:\tRepeat Step#7 with Screening Number = Screening Number of Pr#3\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(Constants.ScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"9.2:Subject can't be created - System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicateScreeningErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n\t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"10.1:Repeat Step#7 with Screening Number = Temporary ID of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(Constants.TempIDNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"10.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"11.1:Repeat Step#7 with Randomization Number = Randomization Number of Pr#4\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(\"675\");\n\t\tstudyNavigatorDashBoardPage.inputRandomizationNum(subjectWithRandomNumber);\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tstudyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"11.2:Subject can't be created - System displays message indicating that the subject with same name already exists\");\n\t\tstudyNavigatorDashBoardPage.verifyHeaderErrorText(SubjectsModuleConstants.newDuplicaterandomizationErrorMessage);\n\t\tstudyNavigatorDashBoardPage.closeHeaderErrorMessage();\n \t\tstudyNavigatorDashBoardPage.clickOnCancelBTN();\n\n\t\treportLog(\"12.1:Repeat Step#7 with Randomization Number = Screening Number of Pr#5\");\n\t\tstudyNavigatorDashBoardPage.clickOnAddSubjectBTN(AT_PRODSiteCoordinatorUserName);\n\t\tstudyNavigatorDashBoardPage.inputRandomizationNum(subjectWithScreeningNumber);\n\t\tstudyNavigatorDashBoardPage.inputScreeningNum(\"890\");\n\t\tstudyNavigatorDashBoardPage.selectSubjectLanguage(studyLanguage);\n\t\tsubjectDetailPage = studyNavigatorDashBoardPage.clickOnSaveBTN();\n\n\t\treportLog(\"12.2:Subject can be created\");\n\t\tsubjectDetailPage.verifyNewSubjectDetailPage();\n\n\t\treportLog(\"Setting up The Pre-Requisite\");\n\t\tsubjectDetailPage.deleteSubject();\n\n\t\treportLog(\"12.3: Logout from the application\");\n\t\tloginPage.logoutApplication();\n\n\t\treportLog(\"12.4: Verify user is logout\");\n\t\tloginPage.verifyUserLogout();\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the dsCPF value for this TItemRetornoVendaDia. | public void setDsCPF(java.lang.String dsCPF) {
this.dsCPF = dsCPF;
} | [
"public java.lang.String getDsCPF() {\n return dsCPF;\n }",
"public void setDsCidade(java.lang.String dsCidade) {\n this.dsCidade = dsCidade;\n }",
"public void setCPF(java.lang.String CPF) {\r\n this.CPF = CPF;\r\n }",
"public void setDSCRF(java.lang.String DSCRF) {\n this.DSCRF = DSCRF;\n }",
"public void setDescontoVenda(double pDescontoVenda){\n this.descontoVenda = pDescontoVenda;\n }",
"public final void setHldFilFdNmsDbCp(final IHlNmClSt pHldFilFdNmsDbCp) {\n this.hldFilFdNmsDbCp = pHldFilFdNmsDbCp;\n }",
"public void setDsDoenca(final String dsDoenca) {\r\n this.dsDoenca = dsDoenca;\r\n }",
"public java.lang.String getDsCidade() {\n return dsCidade;\n }",
"public void setDataSourceFactory(DataSourceFactory dsf) {\r\n\t\tthis.factory = dsf;\r\n\t}",
"public void setFECHADESDE(int value) {\n this.fechadesde = value;\n }",
"public void setCpf(String cpf) {\n this.cpf = cpf;\n }",
"public void setFiSdtDn( String fiSdtDn ) {\n this.fiSdtDn = fiSdtDn;\n }",
"public void setCondicionFisica(ValorDTO condicionFisica) {\n this.condicionFisica = condicionFisica;\n }",
"public void setFarmConsegnaData(Date farmConsegnaData) {\n\t\tthis.farmConsegnaData = farmConsegnaData;\n\t}",
"public void setSFCDI(String newvalue) {\n fieldSFCDI.setString(newvalue);\n }",
"public void setFiDayflag(BigDecimal fiDayflag) {\n\t\tthis.fiDayflag = fiDayflag;\n\t}",
"public void setDaf(int daf) {\r\n\t\tthis.daf = daf;\r\n\t}",
"public void setCdpFlag(String cdpFlag) {\r\n\t\tthis.cdpFlag = cdpFlag;\r\n\t}",
"public void setDSCP(int dSCP) {\r\n\t\tthis.DSCP = dSCP;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the panOn status of this CoilConfiguration. | public int getPanOn() {
return panOn;
} | [
"public boolean getPanStatus() {\n return doPan;\n }",
"public int getPanOff() {\n return panOff;\n }",
"public void setPanOn(int panOn) {\n this.panOn = panOn;\n }",
"public @ContaminantDetectionStatus int getContaminantDetectionStatus() {\n return mContaminantDetectionStatus;\n }",
"public float getPan() {\r\n\t\treturn pan;\r\n\t}",
"public java.lang.String getPon() {\n return pon;\n }",
"public String getMapStatus() {\n\t\treturn this.mapStatus;\n\t}",
"public String panLocation() {\n return this.panLocation;\n }",
"public Integer getComplaintInspectStatus() {\n return complaintInspectStatus;\n }",
"@MavlinkFieldInfo(\n position = 2,\n unitSize = 1,\n signed = true,\n description = \"Order the mount to pan: -1 left, 0 No pan motion, +1 right\"\n )\n public final int pan() {\n return this.pan;\n }",
"public boolean getAtmStatus();",
"public String getOnState() {\n return onState;\n }",
"public String getSIGNED_ON_STATUS() {\r\n return SIGNED_ON_STATUS;\r\n }",
"public CanaryStatus getStatus() {\n return this.status;\n }",
"public boolean getPatio(){\n\t\treturn patio;\n\t}",
"public @ContaminantProtectionStatus int getContaminantProtectionStatus() {\n return mContaminantProtectionStatus;\n }",
"public com.vmware.converter.PhysicalNicConfig[] getPnic() {\r\n return pnic;\r\n }",
"public int getIsOnMap() {\n return isOnMap;\n }",
"public boolean getStatus()\n\t{\n\t\treturn getBooleanIOValue(\"Status\", false);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flink 1.11 bind CatalogManager with parser which make blink and flink could not share the same CatalogManager. This is a workaround which always reset CatalogTableSchemaResolver before running any flink code. | @Override
public void setCatalogManagerSchemaResolver(Object catalogManager,
Object parserObject,
Object environmentSetting) {
} | [
"public void setLocalCatalog(Catalog localCatalog);",
"public CatalogURIResolver(JAXWSCatalogManager catalogManager, ClassLoader classLoader) {\n super(classLoader);\n if (catalogManager != null) {\n this.catalogResolver = catalogManager.getCatalog();\n }\n }",
"public CatalogURIResolver(JAXWSCatalogManager catalogManager) {\n this(catalogManager, null);\n }",
"private CatalogResolver getCatalogResolver() {\n\n if (catalogResolver == null) {\n\n AntClassLoader loader;\n // Memory-Leak in line below\n loader = getProject().createClassLoader(Path.systemClasspath);\n\n try {\n Class<?> clazz = Class.forName(APACHE_RESOLVER, true, loader);\n\n // The Apache resolver is present - Need to check if it can\n // be seen by the catalog resolver class. Start by getting\n // the actual loader\n ClassLoader apacheResolverLoader = clazz.getClassLoader();\n\n // load the base class through this loader.\n Class<?> baseResolverClass\n = Class.forName(CATALOG_RESOLVER, true, apacheResolverLoader);\n\n // and find its actual loader\n ClassLoader baseResolverLoader\n = baseResolverClass.getClassLoader();\n\n // We have the loader which is being used to load the\n // CatalogResolver. Can it see the ApacheResolver? The\n // base resolver will only be able to create the ApacheResolver\n // if it can see it - doesn't use the context loader.\n clazz = Class.forName(APACHE_RESOLVER, true, baseResolverLoader);\n\n Object obj = clazz.newInstance();\n //\n // Success! The xml-commons resolver library is\n // available, so use it.\n //\n catalogResolver = new ExternalResolver(clazz, obj);\n } catch (Throwable ex) {\n //\n // The xml-commons resolver library is not\n // available, so we can't use it.\n //\n catalogResolver = new InternalResolver();\n if (getCatalogPath() != null\n && getCatalogPath().list().length != 0) {\n log(\"Warning: XML resolver not found; external catalogs\"\n + \" will be ignored\", Project.MSG_WARN);\n }\n log(\"Failed to load Apache resolver: \" + ex, Project.MSG_DEBUG);\n }\n }\n return catalogResolver;\n }",
"public void setCatalog(String catalog) throws SQLException\n\t{\n\t\t//no-op\n\t}",
"void setCatalog(String catalog) throws SQLException;",
"private void initializeRealmsCatalog() {\n this.realms = new RealmsCatalog(new ResourceContext(getDefaultContext()));\n }",
"CatalogReader withSchemaPath( List<String> schemaPath );",
"public CatalogManagerWithoutAnnotation() {\r\n\t}",
"public interface CatalogLoader {\n /**\n * Load the specified catalog.\n *\n * <p>The manager maintains a set of the catalogs that it has loaded. If an attempt is\n * made to load a catalog twice, the previously loaded catalog is returned.</p>\n *\n * @param catalog The catalog URI.\n * @return The parsed catalog.\n */\n public EntryCatalog loadCatalog(URI catalog);\n\n /**\n * Load the specified catalog from a given input source.\n *\n * <p>This method exists so that a catalog can be loaded even if it doesn't have a URI\n * that can be dereferenced. It must still have a URI.</p>\n *\n * <p>The manager maintains a set of the catalogs that it has loaded. If an attempt is\n * made to load a catalog twice, the previously loaded catalog is returned.</p>\n *\n * @param catalog The catalog URI.\n * @param source The input source.\n * @return The parsed catalog.\n */\n public EntryCatalog loadCatalog(URI catalog, InputSource source);\n\n /**\n * Load the specified catalog by sending events to the ContentHandler.\n *\n * <p>This method exists so that a catalog can be loaded even if it doesn't have a URI\n * that can be dereferenced. It must still have a URI because relative URIs in the catalog\n * will be resolved against it. (If all of the URIs in the catalog are absolute, the catalog\n * URI is irrelevant.)</p>\n *\n * <p>To use this approach, you must both add the catalog to the resolver and then\n * explicitly load the catalog:</p>\n *\n * <p>For example:</p>\n *\n * <pre> XMLResolverConfiguration config = new XMLResolverConfiguration();\n * CatalogManager manager = config.getFeature(ResolverFeature.CATALOG_MANAGER);\n *\n * URI caturi = URI.create(\"https://example.com/absolute/uri/catalog.xml\");\n * config.addCatalog(caturi.toString());\n *\n * SaxProducer producer = new CatalogProducer();\n * manager.loadCatalog(caturi, producer);</pre>\n *\n * <p>If you don't add the catalog to the resolver, it won't be used. If you don't explicitly load\n * the catalog, the resolver will try to dereference the URI the first time it needs the catalog.\n * The manager maintains a set of the catalogs that it has loaded so it won't attempt to\n * load a catalog twice, the previously loaded catalog will be used.</p>\n *\n * @param catalog The catalog URI.\n * @param producer The producer that delivers SAX events to the handlers.\n * @return The parsed catalog.\n */\n public EntryCatalog loadCatalog(URI catalog, SaxProducer producer);\n\n /** Set the default \"prefer public\" status for this catalog.\n *\n * @param prefer True if public identifiers are to be preferred.\n */\n public void setPreferPublic(boolean prefer);\n\n /** Return the current \"prefer public\" status.\n *\n * @return The current \"prefer public\" status of this catalog loader.\n */\n public boolean getPreferPublic();\n\n /** Allow archived catalogs on the catalog path.\n *\n * <p>If allowed, then ZIP files may be specified as catalogs. The loader\n * will return the catalog associated with the <code>/catalog.xml</code>\n * or <code>/org/xmlresolver/catalog.xml</code> within the ZIP file.</p>\n *\n * @param allow True if archived catalogs are to be allowed.\n */\n public void setArchivedCatalogs(boolean allow);\n\n /** Return whether archived catalogs are allowed.\n *\n * @return True if archived catalogs are allowed.\n */\n public boolean getArchivedCatalogs();\n\n /** Set the entity resolver used when loading catalogs.\n *\n * <p>When the resolver loads a catalog, it can't use itself as the entity resolver because\n * that would cause an infinite loop. Instead, it uses this resolver. The only entities that this\n * resolver needs to be able to handle are the ones used in document type declarations for\n * the <em>catalogs</em> themselves.</p>\n *\n * @param resolver the resolver\n */\n public void setEntityResolver(EntityResolver resolver);\n\n /** Return the entity resolver used when loading catalogs.\n *\n * @return resolver the resolver\n */\n public EntityResolver getEntityResolver();\n}",
"@Test\n public void initializeDoesNotReuseSchemasFromConf() throws SerDeException {\n Configuration conf = new Configuration();\n conf.set(AvroTableProperties.AVRO_SERDE_SCHEMA.getPropName(), originalSchema.toString(false));\n\n Properties props = new Properties();\n props.put(AvroTableProperties.SCHEMA_LITERAL.getPropName(), newSchemaString);\n\n\n AvroSerDe asd = new AvroSerDe();\n asd.initialize(conf, props, null);\n\n // Verify that the schema now within the configuration is the one passed\n // in via the properties\n assertEquals(newSchema, AvroSerdeUtils.getSchemaFor(conf.get(AvroTableProperties.AVRO_SERDE_SCHEMA.getPropName())));\n }",
"public DefaultSchemaManager( SchemaLoader schemaLoader )\n {\n this( schemaLoader.isRelaxed(), schemaLoader.getAllSchemas() );\n }",
"void setDefaultCatalog(String defaultCatalog);",
"public interface SchemaCatalog\n{\n /**\n * Invoked for xsi:schemaLocation hints.\n * \n * @param baseURI\n * The base URI of the containing schema document.\n * @param namespace\n * The namespace specified by the hint.\n * @param schemaLocation\n * The schema location specified.\n * @return A systemId for use by a resolver.\n */\n URI resolveNamespaceAndSchemaLocation(URI baseURI, String namespace, String schemaLocation);\n\n /**\n * Invoked for xsi:noNamespaceSchemaLocation hints.\n * \n * @param baseURI\n * The base URI of the containing schema document.\n * @param schemaLocation\n * The schema location specified.\n * @return A systemId for use by a resolver.\n */\n URI resolveLocation(URI baseURI, String schemaLocation);\n}",
"public void setTmpCatalog(Catalog tmpCatalog);",
"protected static void schemaChanged() {\n // Reset the service names and OCs used by IdRepo\n serviceNameAndOCs = new CaseInsensitiveHashMap();\n // Reset the schema types and service names\n // Reset the service names\n serviceNames = null;\n }",
"public CatalogManager getCatalogManager() {\n return cm;\n }",
"private void initSchema() throws Exception {\n File workingDirectory = service.getInstanceLayout().getPartitionsDirectory();\n\n // Extract the schema on disk (a brand new one) and load the registries\n File schemaRepository = new File(workingDirectory, \"schema\");\n SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(workingDirectory);\n\n try {\n extractor.extractOrCopy();\n } catch (IOException ioe) {\n // The schema has already been extracted, bypass\n }\n\n SchemaLoader loader = new LdifSchemaLoader(schemaRepository);\n SchemaManager schemaManager = new DefaultSchemaManager(loader);\n\n // We have to load the schema now, otherwise we won't be able\n // to initialize the Partitions, as we won't be able to parse\n // and normalize their suffix Dn\n schemaManager.loadAllEnabled();\n\n // Tell all the normalizer comparators that they should not normalize anything\n ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();\n\n for (LdapComparator<?> comparator : comparatorRegistry) {\n if (comparator instanceof NormalizingComparator) {\n ((NormalizingComparator) comparator).setOnServer();\n }\n }\n\n service.setSchemaManager(schemaManager);\n\n // Init the LdifPartition\n LdifPartition ldifPartition = new LdifPartition(schemaManager, service.getDnFactory());\n ldifPartition.setPartitionPath(new File(workingDirectory, \"schema\").toURI());\n SchemaPartition schemaPartition = new SchemaPartition(schemaManager);\n schemaPartition.setWrappedPartition(ldifPartition);\n service.setSchemaPartition(schemaPartition);\n\n List<Throwable> errors = schemaManager.getErrors();\n\n if (errors.size() != 0) {\n throw new Exception(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));\n }\n }",
"RuleCatalog createRuleCatalog();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ref, if this was advertised by the connection. | public Ref getRef() {
return ref;
} | [
"public String getRef() {\r\n return this.ref;\r\n }",
"java.lang.String getRef();",
"public java.lang.String getPclRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PCLREF$54);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"protected RemoteRef getClientRef() {\n\treturn new UnicastRef(ref);\n }",
"@Nullable\r\n String getExternalConnectionPointRef();",
"public long getRefId() {\n return refId;\n }",
"public String getRefId() {\n return refId;\n }",
"public Integer getRefId() {\n return refId;\n }",
"@Beanp(\"$ref\")\n\tpublic String getRef() {\n\t\treturn ref;\n\t}",
"public Reference getReference() throws NamingException\n {\n return ref;\n }",
"@Nullable String getExternalConnectionPointRef();",
"public String getREFERENCE()\r\n {\r\n\treturn REFERENCE;\r\n }",
"@Nonnull\n public DocumentReference getReference() {\n return docRef;\n }",
"public Reference getReferrerRef()\r\n \t{\r\n \t\treturn this.referrerRef;\r\n \t}",
"Object getConref();",
"public String getRefNumber()\n {\n return refNumber;\n }",
"String getContRef();",
"public ReferenceRemote getReferenceLocal()\n throws RemoteException, IOException {\n refObj = new ReferenceAdapter();\n return refObj;\n }",
"public Node getReference() {\n return this.reference;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A visitor that evaluate the input with SUB with the given worksheet. | public SubVisitor(Map<Coord, ICellContent> worksheet) {
this.worksheet = worksheet;
} | [
"void subreport(Subreport s, Row r) throws Exception ;",
"public interface IWorksheet {\n\n /**\n * Provides a copy of all of the active cells for iteration purposes.\n * @return the cells with Sexps in them.\n */\n List<Coord> allActiveCells();\n\n /**\n * Returns the literal representation of the cell at the given coordinates\n * or null if there is no cell there.\n * @param col the column of the cell, 1 indexed\n * @param row the row of the cell, 1 indexed\n * @return the cell or null\n * @throws IllegalArgumentException col or row are less than 0\n */\n ICell getCellAt(int col, int row) throws IllegalArgumentException;\n\n /**\n * Returns the final representation of the cell at the given coordinates, evaluated in the\n * context of this worksheet.\n * @param col the column of the cell, 1 index\n * @param row the row of the cell, 1 index\n * @return the evaluated contents as a string or null\n * @throws IllegalArgumentException there is an error preventing the cell from being evaluated\n */\n Value evaluateCellAt(int col, int row);\n\n /**\n * Changes the cell at the given coordinates to contain the given sexp.\n * @param col the column of the cell, 1 indexed\n * @param row the row of the cell, 1 indexed\n * @param sexp the String representation of the Sexp to change the cell to\n */\n void changeCellAt(int col, int row, String sexp);\n\n /**\n * Answers if the entire document is free of errors.\n * @return the answer to the question\n */\n boolean documentFreeOfErrors();\n\n /**\n * Gets all of the cells that depend on the given cell.\n *\n * @param col the column of the cell\n * @param row the row of the cell\n * @return a list of all of the cells that depend on that cell\n */\n List<Coord> getDependents(int col, int row);\n\n}",
"@Override\n\tpublic Vector<Object> evaluate(final String formula, final lotus.domino.Document doc);",
"public Object evaluateExpression(String expression, Bean bean) throws EvaluatorException;",
"public void evaluateExpressions(Bean bean) throws EvaluatorException;",
"@Override\n\tpublic Vector<Object> evaluate(final String formula);",
"void inlineToXlsx(SpreadsheetMLPackage pkg, WorksheetPart worksheetPart, Cell newCell, Object paramValue, Matcher matcher);",
"public Exp visit(Sub e) {\n Var v = new Var(new Id(\"sub\"));\n List<Exp> l = new LinkedList<Exp>();\n l.add(e.e1.accept(this));\n l.add(e.e2.accept(this));\n return new App(v, l);\n }",
"public Exp visit(FSub e) {\n Var v = new Var(new Id(\"fsub\"));\n List<Exp> l = new LinkedList<Exp>();\n l.add(e.e1.accept(this));\n l.add(e.e2.accept(this));\n return new App(v, l);\n }",
"@Test\n void testEvaluateAllInWindow() throws IOException {\n SXSSFWorkbook wb = new SXSSFWorkbook(5);\n SXSSFSheet s = wb.createSheet();\n s.createRow(0).createCell(0).setCellFormula(\"1+2\");\n s.createRow(1).createCell(1).setCellFormula(\"A1+10\");\n s.createRow(2).createCell(2).setCellFormula(\"B2+100\");\n\n FormulaEvaluator eval = wb.getCreationHelper().createFormulaEvaluator();\n eval.evaluateAll();\n\n assertEquals(3, (int)s.getRow(0).getCell(0).getNumericCellValue());\n assertEquals(13, (int)s.getRow(1).getCell(1).getNumericCellValue());\n assertEquals(113, (int)s.getRow(2).getCell(2).getNumericCellValue());\n\n wb.close();\n }",
"@Override\n public void visit(ElementSubQuery el)\n {\n proc.visit(el) ;\n }",
"@Test\n public void testApplyTo() throws Exception {\n System.out.println(\"applyTo\");\n Expression[] args = new Expression[1];\n \n ExcelExpressionCompiler compiler = new ExcelExpressionCompiler();\n \n args[0] = compiler.compile(null, \"=2+3\");\n \n Value expResult = new Value(5);\n try{\n Value result = this.evalInstance.applyTo(args);\n }catch(IllegalValueTypeException e){\n return;\n }\n \n assertTrue(false);\n\n }",
"protected abstract void parseSheet(Sheet sheet,String sheetName,String[] targets) throws Exception;",
"private void extractInvSheet(String sAbsolutePath, XSSFSheet xws) {\n\r\n\t\tIterator<Row> rowIterator = xws.iterator();\r\n\t\twhile (rowIterator.hasNext()) {\r\n\t\t\tRow row = rowIterator.next();\r\n\r\n\t\t\t// 從第二行開始\r\n\t\t\tif (row.getRowNum() < 1) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tString flag = getCellString(row, 0);\r\n\t\t\tif (flag.equals(\"\"))\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tString FILENAME = sAbsolutePath;\r\n\t\t\t// 第一行\r\n\t\t\tString SEQ = getCellString(row, 0);\r\n\t\t\tString BRAND = getCellString(row, 1);\r\n\t\t\tString DESC3 = getCellString(row, 2);\r\n\t\t\tString DESC4 = getCellString(row, 3);\r\n\t\t\tint QTY = (int) getCellDouble(row, 4);\r\n\t\t\tString UOM = getCellString(row, 5);\r\n\r\n\t\t\t// 第二行\r\n\t\t\trow = rowIterator.next();\r\n\t\t\tString DESC1 = getCellString(row, 1);\r\n\t\t\tString DESC5 = getCellString(row, 3);\r\n\t\t\tdouble PRICE = getCellDouble(row, 4);\r\n\r\n\t\t\t// 第三行\r\n\t\t\trow = rowIterator.next();\r\n\t\t\tString DESC2 = getCellString(row, 1);\r\n\t\t\tString COUNTRY = getCellString(row, 2);\r\n\r\n\t\t\talItem.add(new Item(FILENAME, SEQ, BRAND, DESC1, DESC2, DESC3, DESC4, DESC5, QTY, UOM, PRICE, COUNTRY));\r\n\r\n\t\t}\r\n\t}",
"void visit(Evaluation evaluation);",
"private double evaluate(SXTriple span) {\n// System.err.println(\"Evaluating \" + span);\n return outside(span);\n }",
"private void sub(MutableCodepointRange range, CodepointRange sub) {\n if (sub.start() <= range.start && sub.end() >= range.end) {\n mRanges.remove(range);\n } else if (range.start < sub.start() && sub.end() < range.end) {\n // sub is a strict subset\n mRanges.add(MutableCodepointRange.create(sub.end() + 1, range.end));\n range.end = sub.start() - 1;\n } else if (sub.start() <= range.start) {\n range.start = sub.end() + 1;\n } else if (range.end <= sub.end()) {\n range.end = sub.start() - 1;\n } else {\n throw new IllegalStateException(\n String.format(\"Cannot remove sub=%s from range=%s\", sub, range));\n }\n }",
"public abstract double evaluer(SolutionPartielle s);",
"public WorksheetViewEditable(IViewWorksheet ivw) {\n super();\n IViewWorksheet worksheet = ivw;\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setSize(new Dimension(850, 450));\n this.spread = new DrawSpreadsheet(ivw);\n ScrollView sv = new ScrollView(ivw, this.spread);\n\n conf = new JButton(\"✓\"); //check\n conf.setActionCommand(\"Cell Conf\");\n canc = new JButton(\"Cancel\");\n canc.setActionCommand(\"Cell Canc\");\n delete = new JButton(\"Delete\");\n delete.setActionCommand(\"Cell Del\");\n inp = new JTextField(10);\n JLabel helpMenu = new JLabel(\n \"Formulas: numbers, strings, booleans, references to other cells, \"\n + \"SUM, PRODUCT, <, CONCAT\");\n\n JPanel toolbar = new JPanel();\n toolbar.add(conf, BorderLayout.WEST);\n toolbar.add(canc, BorderLayout.CENTER);\n toolbar.add(delete, BorderLayout.CENTER);\n toolbar.add(inp, BorderLayout.EAST);\n\n this.add(toolbar, BorderLayout.NORTH);\n this.add(sv, BorderLayout.CENTER);\n this.add(helpMenu, BorderLayout.SOUTH);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__UniformReference__RefAssignment_1" $ANTLR start "rule__UpdateSubtraction__RightAssignment_1_2" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10426:1: rule__UpdateSubtraction__RightAssignment_1_2 : ( ruleUpdateAddition ) ; | public final void rule__UpdateSubtraction__RightAssignment_1_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10430:1: ( ( ruleUpdateAddition ) )
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10431:1: ( ruleUpdateAddition )
{
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10431:1: ( ruleUpdateAddition )
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10432:1: ruleUpdateAddition
{
before(grammarAccess.getUpdateSubtractionAccess().getRightUpdateAdditionParserRuleCall_1_2_0());
pushFollow(FOLLOW_ruleUpdateAddition_in_rule__UpdateSubtraction__RightAssignment_1_220519);
ruleUpdateAddition();
state._fsp--;
after(grammarAccess.getUpdateSubtractionAccess().getRightUpdateAdditionParserRuleCall_1_2_0());
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__Subtraction__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9779:1: ( ( ruleAddition ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9780:1: ( ruleAddition )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9780:1: ( ruleAddition )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9781:1: ruleAddition\n {\n before(grammarAccess.getSubtractionAccess().getRightAdditionParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAddition_in_rule__Subtraction__RightAssignment_1_219283);\n ruleAddition();\n\n state._fsp--;\n\n after(grammarAccess.getSubtractionAccess().getRightAdditionParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__UpdateSubtraction__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7343:1: ( ( ( rule__UpdateSubtraction__RightAssignment_1_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7344:1: ( ( rule__UpdateSubtraction__RightAssignment_1_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7344:1: ( ( rule__UpdateSubtraction__RightAssignment_1_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7345:1: ( rule__UpdateSubtraction__RightAssignment_1_2 )\n {\n before(grammarAccess.getUpdateSubtractionAccess().getRightAssignment_1_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7346:1: ( rule__UpdateSubtraction__RightAssignment_1_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7346:2: rule__UpdateSubtraction__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__UpdateSubtraction__RightAssignment_1_2_in_rule__UpdateSubtraction__Group_1__2__Impl14406);\n rule__UpdateSubtraction__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getUpdateSubtractionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PredicateSubtraction__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9965:1: ( ( rulePredicateAddition ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9966:1: ( rulePredicateAddition )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9966:1: ( rulePredicateAddition )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9967:1: rulePredicateAddition\n {\n before(grammarAccess.getPredicateSubtractionAccess().getRightPredicateAdditionParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_rulePredicateAddition_in_rule__PredicateSubtraction__RightAssignment_1_219558);\n rulePredicateAddition();\n\n state._fsp--;\n\n after(grammarAccess.getPredicateSubtractionAccess().getRightPredicateAdditionParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__UpdateAddition__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7500:1: ( ( ( rule__UpdateAddition__RightAssignment_1_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7501:1: ( ( rule__UpdateAddition__RightAssignment_1_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7501:1: ( ( rule__UpdateAddition__RightAssignment_1_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7502:1: ( rule__UpdateAddition__RightAssignment_1_2 )\n {\n before(grammarAccess.getUpdateAdditionAccess().getRightAssignment_1_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7503:1: ( rule__UpdateAddition__RightAssignment_1_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7503:2: rule__UpdateAddition__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__UpdateAddition__RightAssignment_1_2_in_rule__UpdateAddition__Group_1__2__Impl14713);\n rule__UpdateAddition__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getUpdateAdditionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__UpdateAddition__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10445:1: ( ( ruleUpdateMultiplication ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10446:1: ( ruleUpdateMultiplication )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10446:1: ( ruleUpdateMultiplication )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:10447:1: ruleUpdateMultiplication\n {\n before(grammarAccess.getUpdateAdditionAccess().getRightUpdateMultiplicationParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleUpdateMultiplication_in_rule__UpdateAddition__RightAssignment_1_220550);\n ruleUpdateMultiplication();\n\n state._fsp--;\n\n after(grammarAccess.getUpdateAdditionAccess().getRightUpdateMultiplicationParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PredicateSubtraction__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4164:1: ( ( ( rule__PredicateSubtraction__RightAssignment_1_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4165:1: ( ( rule__PredicateSubtraction__RightAssignment_1_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4165:1: ( ( rule__PredicateSubtraction__RightAssignment_1_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4166:1: ( rule__PredicateSubtraction__RightAssignment_1_2 )\n {\n before(grammarAccess.getPredicateSubtractionAccess().getRightAssignment_1_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4167:1: ( rule__PredicateSubtraction__RightAssignment_1_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4167:2: rule__PredicateSubtraction__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__PredicateSubtraction__RightAssignment_1_2_in_rule__PredicateSubtraction__Group_1__2__Impl8193);\n rule__PredicateSubtraction__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPredicateSubtractionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Subtraction__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7632:1: ( ( ( rule__Subtraction__RightAssignment_1_2 ) ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7633:1: ( ( rule__Subtraction__RightAssignment_1_2 ) )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7633:1: ( ( rule__Subtraction__RightAssignment_1_2 ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7634:1: ( rule__Subtraction__RightAssignment_1_2 )\n {\n before(grammarAccess.getSubtractionAccess().getRightAssignment_1_2()); \n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7635:1: ( rule__Subtraction__RightAssignment_1_2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7635:2: rule__Subtraction__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__Subtraction__RightAssignment_1_2_in_rule__Subtraction__Group_1__2__Impl14998);\n rule__Subtraction__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getSubtractionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleUpdateExpression() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1340:2: ( ( ruleUpdateSubtraction ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1341:1: ( ruleUpdateSubtraction )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1341:1: ( ruleUpdateSubtraction )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1342:1: ruleUpdateSubtraction\n {\n before(grammarAccess.getUpdateExpressionAccess().getUpdateSubtractionParserRuleCall()); \n pushFollow(FOLLOW_ruleUpdateSubtraction_in_ruleUpdateExpression2514);\n ruleUpdateSubtraction();\n\n state._fsp--;\n\n after(grammarAccess.getUpdateExpressionAccess().getUpdateSubtractionParserRuleCall()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }",
"public final void rule__RelExpr__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:5089:1: ( ( ruleAddExpr ) )\n // InternalMGPL.g:5090:2: ( ruleAddExpr )\n {\n // InternalMGPL.g:5090:2: ( ruleAddExpr )\n // InternalMGPL.g:5091:3: ruleAddExpr\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getRelExprAccess().getRightAddExprParserRuleCall_1_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleAddExpr();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getRelExprAccess().getRightAddExprParserRuleCall_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__RightAssignment_1_1() throws RecognitionException {\n int rule__Comparison__RightAssignment_1_1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1131) ) { return ; }\n // InternalGaml.g:18908:1: ( ( ruleAddition ) )\n // InternalGaml.g:18909:1: ( ruleAddition )\n {\n // InternalGaml.g:18909:1: ( ruleAddition )\n // InternalGaml.g:18910:1: ruleAddition\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparisonAccess().getRightAdditionParserRuleCall_1_1_0()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleAddition();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparisonAccess().getRightAdditionParserRuleCall_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 1131, rule__Comparison__RightAssignment_1_1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9764:1: ( ( ruleSubtraction ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9765:1: ( ruleSubtraction )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9765:1: ( ruleSubtraction )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9766:1: ruleSubtraction\n {\n before(grammarAccess.getComparisonAccess().getRightSubtractionParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleSubtraction_in_rule__Comparison__RightAssignment_1_219252);\n ruleSubtraction();\n\n state._fsp--;\n\n after(grammarAccess.getComparisonAccess().getRightSubtractionParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ActionSubtraction__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5809:1: ( ( ( rule__ActionSubtraction__RightAssignment_1_2 ) ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5810:1: ( ( rule__ActionSubtraction__RightAssignment_1_2 ) )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5810:1: ( ( rule__ActionSubtraction__RightAssignment_1_2 ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5811:1: ( rule__ActionSubtraction__RightAssignment_1_2 )\n {\n before(grammarAccess.getActionSubtractionAccess().getRightAssignment_1_2()); \n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5812:1: ( rule__ActionSubtraction__RightAssignment_1_2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:5812:2: rule__ActionSubtraction__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__ActionSubtraction__RightAssignment_1_2_in_rule__ActionSubtraction__Group_1__2__Impl11437);\n rule__ActionSubtraction__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionSubtractionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ActionSubtraction__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9517:1: ( ( ruleActionAddition ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9518:1: ( ruleActionAddition )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9518:1: ( ruleActionAddition )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:9519:1: ruleActionAddition\n {\n before(grammarAccess.getActionSubtractionAccess().getRightActionAdditionParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleActionAddition_in_rule__ActionSubtraction__RightAssignment_1_218742);\n ruleActionAddition();\n\n state._fsp--;\n\n after(grammarAccess.getActionSubtractionAccess().getRightActionAdditionParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__PredicateComparison__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9950:1: ( ( rulePredicateSubtraction ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9951:1: ( rulePredicateSubtraction )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9951:1: ( rulePredicateSubtraction )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9952:1: rulePredicateSubtraction\n {\n before(grammarAccess.getPredicateComparisonAccess().getRightPredicateSubtractionParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_rulePredicateSubtraction_in_rule__PredicateComparison__RightAssignment_1_219527);\n rulePredicateSubtraction();\n\n state._fsp--;\n\n after(grammarAccess.getPredicateComparisonAccess().getRightPredicateSubtractionParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Unary__RightAssignment_1_1_0_1() throws RecognitionException {\n int rule__Unary__RightAssignment_1_1_0_1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1143) ) { return ; }\n // InternalGaml.g:19100:1: ( ( ruleUnitRef ) )\n // InternalGaml.g:19101:1: ( ruleUnitRef )\n {\n // InternalGaml.g:19101:1: ( ruleUnitRef )\n // InternalGaml.g:19102:1: ruleUnitRef\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getUnaryAccess().getRightUnitRefParserRuleCall_1_1_0_1_0()); \n }\n pushFollow(FollowSets000.FOLLOW_2);\n ruleUnitRef();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getUnaryAccess().getRightUnitRefParserRuleCall_1_1_0_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 1143, rule__Unary__RightAssignment_1_1_0_1_StartIndex); }\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AstExpressionExp__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25440:1: ( ( ruleAstExpressionUnary ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25441:1: ( ruleAstExpressionUnary )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25441:1: ( ruleAstExpressionUnary )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25442:1: ruleAstExpressionUnary\n {\n before(grammarAccess.getAstExpressionExpAccess().getRightAstExpressionUnaryParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAstExpressionUnary_in_rule__AstExpressionExp__RightAssignment_1_251113);\n ruleAstExpressionUnary();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionExpAccess().getRightAstExpressionUnaryParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Comparison__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40735:1: ( ( rulePlusOrMinus ) )\n // InternalDsl.g:40736:2: ( rulePlusOrMinus )\n {\n // InternalDsl.g:40736:2: ( rulePlusOrMinus )\n // InternalDsl.g:40737:3: rulePlusOrMinus\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparisonAccess().getRightPlusOrMinusParserRuleCall_1_2_0()); \n }\n pushFollow(FOLLOW_2);\n rulePlusOrMinus();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparisonAccess().getRightPlusOrMinusParserRuleCall_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Addition__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7789:1: ( ( ( rule__Addition__RightAssignment_1_2 ) ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7790:1: ( ( rule__Addition__RightAssignment_1_2 ) )\n {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7790:1: ( ( rule__Addition__RightAssignment_1_2 ) )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7791:1: ( rule__Addition__RightAssignment_1_2 )\n {\n before(grammarAccess.getAdditionAccess().getRightAssignment_1_2()); \n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7792:1: ( rule__Addition__RightAssignment_1_2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:7792:2: rule__Addition__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__Addition__RightAssignment_1_2_in_rule__Addition__Group_1__2__Impl15305);\n rule__Addition__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAdditionAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleUpdateSubtraction() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1376:2: ( ( ( rule__UpdateSubtraction__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1377:1: ( ( rule__UpdateSubtraction__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1377:1: ( ( rule__UpdateSubtraction__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1378:1: ( rule__UpdateSubtraction__Group__0 )\n {\n before(grammarAccess.getUpdateSubtractionAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1379:1: ( rule__UpdateSubtraction__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:1379:2: rule__UpdateSubtraction__Group__0\n {\n pushFollow(FOLLOW_rule__UpdateSubtraction__Group__0_in_ruleUpdateSubtraction2582);\n rule__UpdateSubtraction__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getUpdateSubtractionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of processMalfunction method. | @Test
public void testProcessMalfunction() {
// Instanciate malfunction handlers
final SpaceMonkey sm = new SpaceMonkey(Severity.TRIVIAL);
final ServiceRobot sr = new ServiceRobot(Severity.LOW);
final Engineer e = new Engineer(Severity.MEDIUM);
final Captain c = new Captain(Severity.HIGH);
// Construct chain of responsbility
sm.setNextHandler(sr);
sr.setNextHandler(e);
e.setNextHandler(c);
// Create malfunctions
final Malfunction m1 = new Malfunction(Severity.HIGH, "Life support error. Oxygen "
+ "Recycling unit damaged, running at half efficiency");
final Malfunction m2 = new Malfunction(Severity.LOW, "Communications error. Cannot "
+ "find Jazz FM");
final Malfunction m3 = new Malfunction(Severity.MEDIUM, "Power supply error. Solar Panel "
+ "2 damaged, running at 31.3333% efficiency");
final Malfunction m4 = new Malfunction(Severity.MEDIUM, "Thermal regulation error. Sensor "
+ "damaged, manual temperature regulation needed");
final Malfunction m5 = new Malfunction(Severity.TRIVIAL, "Trash can full on C-Desk.");
final Malfunction m6 = new Malfunction(Severity.LOW, "Shower plug hole full of monkey hair");
final Malfunction m7 = new Malfunction(Severity.HIGH, "Proximity alert. Collision imminent");
// Clean log file
FileUtility.resetFile(new File("log-bronze.txt"));
// Process malfunctions
sm.processMalfunction(m1);
sm.processMalfunction(m2);
sm.processMalfunction(m3);
sm.processMalfunction(m4);
sm.processMalfunction(m5);
sm.processMalfunction(m6);
sm.processMalfunction(m7);
// Check log file
final String actualOutput = FileUtility.readFile(new File("log-bronze.txt"));
final String expectedOutput = FileUtility.readFile(new File("expected-bronze.txt"));
assertEquals(actualOutput, expectedOutput);
} | [
"protected boolean processStoppedExamining(int gameNumber){return false;}",
"@Test\n public void testInvalidProcessorAmount() {\n try {\n String cpuAmount = \"notAnInt\";\n String[] args = { inputFile, processorAmount, \"-p\", cpuAmount };\n\n inputParser.parse(args);\n\n assert (false);\n } catch (InvalidInputException e) {\n assertEquals(\"The provided number of cpus is not valid\", e.getMessage());\n }\n\n }",
"public void testRuleWithParseErrors() {\n MvelHelper.setTestMode(true);\n boolean result = MvelHelper.evaluateRule(\"BadFunction(xyz)\", null);\n MvelHelper.setTestMode(false);\n TestCase.assertFalse(result);\n }",
"@Test\n\n public void failValidation1() throws IOException {\n\n logStart();\n\n String prepareUpdateAAIVfModuleRequest =\n FileUtil.readResourceFile(\"__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml\")\n .replaceFirst(\"supercool\", \"lukewarm\");\n\n MockGetGenericVnfByIdWithDepth(wireMockServer, \"skask\", 1, \"VfModularity/GenericVnf.xml\");\n\n String businessKey = UUID.randomUUID().toString();\n Map<String, Object> variables = new HashMap<>();\n variables.put(\"mso-request-id\", UUID.randomUUID().toString());\n variables.put(\"isDebugLogEnabled\", \"true\");\n variables.put(\"PrepareUpdateAAIVfModuleRequest\", prepareUpdateAAIVfModuleRequest);\n invokeSubProcess(\"PrepareUpdateAAIVfModule\", businessKey, variables);\n\n WorkflowException workflowException =\n (WorkflowException) getVariableFromHistory(businessKey, \"WorkflowException\");\n Assert.assertNotNull(workflowException);\n logger.debug(\"Subflow WorkflowException error message: {}\", workflowException.getErrorMessage());\n Assert.assertTrue(workflowException.getErrorMessage().startsWith(\"VF Module validation error: Orchestration\"));\n\n logEnd();\n }",
"@Test\n\n public void failValidation2() throws IOException {\n\n logStart();\n\n String prepareUpdateAAIVfModuleRequest =\n FileUtil.readResourceFile(\"__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml\")\n .replaceFirst(\"supercool\", \"notsocool\");\n\n MockGetGenericVnfByIdWithDepth(wireMockServer, \"skask\", 1, \"VfModularity/GenericVnf.xml\");\n\n String businessKey = UUID.randomUUID().toString();\n Map<String, Object> variables = new HashMap<>();\n variables.put(\"mso-request-id\", UUID.randomUUID().toString());\n variables.put(\"isDebugLogEnabled\", \"true\");\n variables.put(\"PrepareUpdateAAIVfModuleRequest\", prepareUpdateAAIVfModuleRequest);\n invokeSubProcess(\"PrepareUpdateAAIVfModule\", businessKey, variables);\n\n WorkflowException workflowException =\n (WorkflowException) getVariableFromHistory(businessKey, \"WorkflowException\");\n Assert.assertNotNull(workflowException);\n logger.debug(\"Subflow WorkflowException error message: {}\", workflowException.getErrorMessage());\n Assert.assertTrue(workflowException.getErrorMessage().startsWith(\"VF Module validation error: VF Module\"));\n\n logEnd();\n }",
"public void validateProcessOutput(FaxClientSpi faxClientSpi, ProcessOutput processOutput,\n FaxActionType faxActionType) {\n // validate exit code\n int exitCode = processOutput.getExitCode();\n if (exitCode != 0) {\n throw new FaxException(\n \"Error while invoking fax action process, exit code: \" + exitCode + \" process output:\\n\"\n + processOutput.getOutputText() + \"\\nprocess error:\\n\" + processOutput.getErrorText());\n }\n }",
"private static void testInvalidSexagesimalNumbers() {\n String[] invalidNumbers = {\n \"-1\",\n \"AAZ\",\n \"**&%@#???\",\n };\n \n for (String number : invalidNumbers) {\n String message = String.format(\"isValidSexagesimalNumber(\\\"%s\\\")\", number);\n try {\n if (!BabylonianSort.isValidSexagesimalNumber(number)) {\n pass(message);\n }\n else {\n fail(message + \" **output mismatch**\");\n }\n }\n catch (Exception e) {\n fail(message + \" **program crashed**\");\n }\n }\n }",
"@Test\n public void testInvalidProcessorAmmount() {\n try {\n String inputFile = \"test.dot\";\n String processorAmount = \"notAnInt\";\n String[] args = { inputFile, processorAmount };\n\n inputParser.parse(args);\n\n assert (false);\n } catch (InvalidInputException e) {\n assertEquals(\"The provided processor amount is not a valid number\", e.getMessage());\n }\n }",
"public boolean processCheckMachine();",
"@Test\n\tpublic void testBadInput() throws InterruptedException {\n\t\tfinal String badFileError = \n\t\t\t\t\"Could not decode the input file! Please specify a good media file location.\";\n\t\tString [] args = new String[] { \"9n2y39bb8y2bcx38\" };\n\t\tByteArrayOutputStream outContent = new ByteArrayOutputStream();\n\t\tPrintStream stderr = System.err;\n\t\t\n\t\ttry {\n\t\t\tSystem.setErr(new PrintStream(outContent));\n\t\t\tPDSMain.main(args);\n\t\t}\n\t\tfinally {\n\t\t\tSystem.setErr(stderr);\n\t\t}\n\t\t\n\t\tassertTrue(outContent.toString().contains(badFileError));\n\t}",
"public abstract boolean isErroneous();",
"@Test\n public void testCheckForXssAttack1(){\n\n Assert.assertFalse(xssValidator.checkForXssAttack(WRONG_DATA));\n }",
"public void testRunInvalidMEP() {\n System.out.println(\"Testing run() for the scenario where the message exchange pattern is not valid\");\n \n ExecOperation execoperation = new ExecOperation();\n operations.put(THE_OPERATION, execoperation);\n \n ExecInput execInput = new ExecInput();\n execInput.setExecMessage(new ExecMessage());\n execoperation.setExecOperationInput(execInput);\n \n ExecAddress addr = new ExecAddress();\n addr.setHostName(\"localhost\");\n endpoint.expects(atLeastOnce()).method(\"getEndpointName\").will(returnValue(THE_ENDPOINT));\n endpoint.expects(atLeastOnce()).method(\"getExecOperations\").will(returnValue(operations));\n endpoint.expects(atLeastOnce()).method(\"getOperationMsgExchangePattern\").will(returnValue(operationMeps));\n \n // 1. testing the case where message exchange pattern is not found (null)\n operationMeps.remove(THE_OPERATION);\n operationMeps.put(\"dummyOperation\", \"inonly\");\n\n instance.stopReceiving();\n // for junit testing - avoid multiple inbound worker threads\n instance.run();\n \n // 2. testing the case where message exchange status is invalid (not inonly or inout)\n operationMeps.put(THE_OPERATION, \"outin\");\n instance.run();\n }",
"public abstract boolean isFailure();",
"@Test\n public void testInvalidProcessorAmountTooHigh() {\n try {\n int maxCpus = Runtime.getRuntime().availableProcessors();\n String cpuAmount = String.valueOf(maxCpus + 1);\n\n String[] args = { inputFile, processorAmount, \"-p\", cpuAmount };\n\n inputParser.parse(args);\n\n assert (false);\n } catch (InvalidInputException e) {\n assertEquals(\"The provided number of cpus is not valid\",\n e.getMessage());\n }\n }",
"@Test\n public void mnExceptionCheck()\n {\n Regex ur = new Regex();\n String check = ur.mobileNoExceptionCheck();\n Assert.assertEquals(check, \"INVALID\");\n }",
"protected boolean shouldThrowBadExitCode() {\n return true;\n }",
"public void testProcStat() throws Exception {\n testFile(PROC_STAT_PATH, PROC_STAT_READ_COMMAND, PROC_STAT_PATTERN);\n }",
"@Test\n public void testFailOnceAndEmailProcess() throws Exception {\n Logger.getLogger(getClass()).debug(\"TEST \" + name.getMethodName());\n\n // Create a process config that has one FailOnce algo\n processConfig = new ProcessConfigJpa();\n processConfig.setDescription(\"Process for testing failOnce\");\n processConfig.setFeedbackEmail(\"rwood@westcoastinformatics.com\");\n processConfig.setName(\"FailOnce Test Process\");\n processConfig.setProject(project);\n processConfig.setTerminology(umlsTerminology);\n processConfig.setVersion(umlsVersion);\n processConfig.setTimestamp(new Date());\n processConfig.setType(\"MAINTAINENCE\");\n processConfig = processService.addProcessConfig(project.getId(),\n (ProcessConfigJpa) processConfig, authToken);\n\n // Create and add one FAILONCE algorithm\n algorithmConfig = new AlgorithmConfigJpa();\n algorithmConfig.setAlgorithmKey(\"FAILONCE\");\n algorithmConfig.setDescription(\"Algorithm for testing FailOnce\");\n algorithmConfig.setEnabled(true);\n algorithmConfig.setName(\"Test FAILONCE algorithm\");\n algorithmConfig.setProcess(processConfig);\n algorithmConfig.setProject(project);\n algorithmConfig.setTimestamp(new Date());\n algorithmConfig.setParameters(new ArrayList<AlgorithmParameter>());\n algorithmConfig = processService.addAlgorithmConfig(project.getId(),\n processConfig.getId(), (AlgorithmConfigJpa) algorithmConfig, authToken);\n\n processConfig.getSteps().add(algorithmConfig);\n\n // Update the process to lock the steps\n processService.updateProcessConfig(project.getId(),\n (ProcessConfigJpa) processConfig, authToken);\n\n // Execute the process (this should fail)\n Long processExecutionId = null;\n try {\n processExecutionId = processService.prepareAndExecuteProcess(\n project.getId(), processConfig.getId(), false, authToken);\n fail(\"Execute should fail the first time it's run\");\n } catch (Exception e) {\n // n/a\n }\n\n // TEST: Ask Rick if a process failed email showed up in his inbox.\n\n // Lookup the process execution, so we can get the id number\n PfsParameterJpa pfs = new PfsParameterJpa();\n pfs.setSortField(\"lastModified\");\n pfs.setAscending(false);\n ProcessExecution processExecution = processService\n .findProcessExecutions(project.getId(),\n \"name:\\\"FailOnce Test Process\\\"\", pfs, authToken)\n .getObjects().get(0);\n\n processExecutionId = processExecution.getId();\n\n // Ensure the process execution and algorithm execution were set to Fail\n processExecution = processService.getProcessExecution(project.getId(),\n processExecutionId, authToken);\n assertNotNull(processExecution.getFailDate());\n assertNull(processExecution.getFinishDate());\n\n AlgorithmExecution algoExecution = processExecution.getSteps().get(0);\n assertNotNull(algoExecution.getFailDate());\n assertNull(algoExecution.getFinishDate());\n\n // Restart the process (this should succeed)\n processService.restartProcess(project.getId(), processExecutionId, false,\n authToken);\n\n // Ensure the process execution and algorithm execution ran successfully\n processExecution = processService.getProcessExecution(project.getId(),\n processExecutionId, authToken);\n assertNull(processExecution.getFailDate());\n assertNotNull(processExecution.getFinishDate());\n\n algoExecution = processExecution.getSteps().get(0);\n assertNull(algoExecution.getFailDate());\n assertNotNull(algoExecution.getFinishDate());\n\n // TEST: Ask Rick if a process complete email showed up in his inbox.\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Seta essa casa como passante. | void setMovimentoPassante(boolean passante); | [
"public void setAutor (Pessoa p){\n }",
"@Test\r\n public void testSetContrasenia() {\r\n System.out.println(\"setContrasenia\");\r\n String contrasenia = \"\";\r\n Usuario instance = new Usuario();\r\n instance.setContrasenia(contrasenia);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"public void setContrasena(String contrasena) {this.contrasena = contrasena;}",
"public void setPossuiAcesso(boolean value) {\r\n this.possuiAcesso = value;\r\n }",
"@Test\n public void testSetCasas() {\n System.out.println(\"setCasas\");\n int casas = 0;\n Terreno instance = new Terreno();\n instance.setCasas(casas);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"void setCuarto(int cuarto);",
"public Boolean setEscribirNombre(Boolean escribir) {\n\t\tBoolean boo = true;\n\t\ttry {\n\t\t\tescribirNombre = escribir;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tboo = false;\n\t\t}\n\t\treturn boo;\n\t}",
"private void setcompCertificadora() {\n //Dados de pessoa\n jTFIDPessoa.setText(Integer.toString(certificadora.getId_pessoa()));\n jTFNome.setText(certificadora.getNome());\n jTFRazaoSocial.setText(certificadora.getRazao_social());\n //Seta mascara no campo de CNPJ\n jFTCPFCNPJ.setFormatterFactory(new DefaultFormatterFactory(validaCampos.formata(\"##.###.###/####-##\")));\n //limpa campo depois que setou a mascara. obs: não ira afetar a mascara\n jFTCPFCNPJ.setValue(\"\");\n jFTCPFCNPJ.setText(certificadora.getCpf_cnpj());\n jFTData.setText(data.organizaData(certificadora.getData_cadastro()));\n if (certificadora.getIn_calibracoes().equals(\"S\")) {\n jCBCalibracoes.setSelected(true);\n } else {\n jCBCalibracoes.setSelected(false);\n }\n if (certificadora.getInternacional().equals(\"S\")) {\n jCBInternacional.setSelected(true);\n } else {\n jCBInternacional.setSelected(false);\n }\n jRBCNPJ.setSelected(true);\n jRBPessoaJuridica.setSelected(true);\n jRBCertificadora.setSelected(true);\n }",
"public void passerJoueur() {\n\t\tthis.setJoueurActuel(this.getJoueurSuivant());\n\t}",
"public void setSalir(boolean valor) {\n salir = valor;\n }",
"public void setFormaActiva(int caso){\n this.formaActiva = caso;\n }",
"void setIloscPasow(int iloscPasow);",
"public void setSuperadoNivel(boolean estado);",
"@Test\r\n public void testSetAlquiladas() {\r\n System.out.println(\"setAlquiladas\");\r\n String alquilada = \"\";\r\n Cliente instance = new Cliente();\r\n instance.setAlquiladas(alquilada);\r\n }",
"public Peao(Casa casa, int tipo)\n {\n super(casa, tipo);\n this.casa = casa;\n if(tipo == PEAO_BRANCO) {\n direcao = 1;\n }\n else if(tipo == PEAO_PRETO){\n direcao = -1;\n }\n primeiroMovimento = true;\n }",
"public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Test\n public void testSetConvivencia() {\n System.out.println(\"setConvivencia\");\n String convivencia = \"\";\n Usuario instance = new Usuario();\n instance.setConvivencia(convivencia);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public void setLeida(boolean leida) {\r\n this.leida = leida;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds shot for team A | public void addOneShotForTeamA(View view) {
shotsForTeamA = shotsForTeamA + 1;
displayShotsForTeamA(shotsForTeamA);
} | [
"public void addSogForTeamA(View v) {\n shotOnGoalA = shotOnGoalA + 1;\n displayShotsForTeamA(shotOnGoalA);\n\n }",
"public void addShot (Shot newShot){\n listShots.add(newShot);\n }",
"public void addOneShotForTeamB(View view) {\n\n shotsForTeamB = shotsForTeamB + 1;\n displayShotsForTeamB(shotsForTeamB);\n }",
"public void addPointForTeamA(View view) {\n pointScoreTeamA = pointScoreTeamA + 1;\n displayPointForTeamA(pointScoreTeamA);\n increaseTotalForTeamA(1);\n }",
"public void addDrawnTeamA(View view) {\n scoreTeamA += 1;\n displayForTeamA(scoreTeamA);\n gamesPlayedA += 1;\n displayGamesTeamA(gamesPlayedA);\n\n }",
"public void addGoalTeamA(View view) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }",
"public void subtractOneShotForTeamA(View view) {\n\n if (shotsForTeamA>0)\n\n {shotsForTeamA = shotsForTeamA - 1;\n displayShotsForTeamA(shotsForTeamA);\n }\n else\n {shotsForTeamA = 0;\n displayShotsForTeamA(shotsForTeamA);\n }\n }",
"public void addStrikeForTeamA(View view) {\n if (gameInning % 2 == 0) {\n displayTeamTurn(\"It's Team B's Turn!\");\n return;\n } else {\n if (team_a_strike < 2) {\n team_a_strike = team_a_strike + 1;\n displayStrikeForTeamA(team_a_strike);\n } else {\n team_a_strike = 0;\n team_a_ball = 0;\n displayBallForTeamA(team_a_ball);\n displayStrikeForTeamA(team_a_strike);\n if (team_a_out < 2) {\n team_a_out = team_a_out + 1;\n displayOutForTeamA(team_a_out);\n } else {\n team_a_out = 0;\n displayOutForTeamA(team_a_out);\n gameInning = gameInning + 1;\n displayInning();\n }\n }\n }\n }",
"private void shootIfAble()\n\t{\n\t\tif (getShotTime() > RATE_OF_FIRE || shots.length == 0)\n\t\t{\n\t\t\tshots = addNewShotToArray(shots);\n\t\t}\n\n\t}",
"public void addPointTeamA(View view) {\n\n //Only add points for team A if they are the serving team\n if (servingTeam.equals(\"A\")) {\n scoreTeamA += POINT_VALUE;\n }\n\n //Update the score displayed\n displayForTeamA(scoreTeamA);\n }",
"public void addGoalForTeamA(View view) {\n goalScoreTeamA = goalScoreTeamA + 1;\n displayGoalForTeamA(goalScoreTeamA);\n increaseTotalForTeamA(3);\n }",
"public void asteroidShot()\n\t{\n\t\t//collision can only occur if at least 1 asteroid\n\t\t//and one missile are currently spawned\n\t\tif(gameObj[0].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint ast = new Random().nextInt(gameObj[0].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[0].remove(ast);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 100;\n\t\t\tSystem.out.println(\"A friendly missile has struck an asteroid! +100 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An asteroid and a friendly missile are not spawned\");\n\t}",
"public void addPointForTeamA(View view) {\n teamA_score = teamA_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }",
"public void addGoalForTeamA(View view) {\n goalsTeamA += 1;\n displayGoalsTeamA(goalsTeamA);\n }",
"public void shot() {\r\n this.shot = true;\r\n if (isOccupied()) {\r\n this.mark = Mark.SHOT;\r\n this.ship.hit();\r\n } else {\r\n this.mark = Mark.MISSED;\r\n }\r\n }",
"public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }",
"public void addBallForTeamA(View view) {\n if (gameInning % 2 == 0) {\n displayTeamTurn(\"It's Team B's Turn!\");\n return;\n } else {\n if (team_a_ball < 3) {\n team_a_ball = team_a_ball + 1;\n displayBallForTeamA(team_a_ball);\n } else {\n team_a_ball = 0;\n displayBallForTeamA(team_a_ball);\n team_a_score = team_a_score + 1;\n displayForTeamA(team_a_score);\n }\n }\n }",
"private void fire() {\r\n\t\ttestShot shot = new testShot();\r\n\t\tshot.x = spaceship.getX() + 5;\r\n\t\tshot.x2 = spaceship.getX() + 50;\r\n\t\tshot.y = spaceship.getY();\r\n\t\tshotList.add(shot);\r\n\t}",
"public void addWinTeamA(View view) {\n scoreTeamA += 3;\n displayForTeamA(scoreTeamA);\n gamesPlayedA += 1;\n displayGamesTeamA(gamesPlayedA);\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of file diff's of the commit. | public List<Diff> getDiffs(); | [
"IFileDiff[] getDiffs();",
"java.util.List<com.znl.proto.Common.AttrDifInfo> \n getDiffsList();",
"public LinkedList<Diff> getDiff(){\t\n\t\tString modifiedString = \"\";\n\t\ttry {\n\t\t\tmodifiedString = openReadFile(modDoc);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not open the file: '\" + modDoc + \".\" \n\t\t\te.printStackTrace();\n\t\t}\n\t\tLinkedList<Diff> list = dmp.diff_main(baseString, modifiedString, true);\n\t\tbaseString = modifiedString;\n\t\t\n\t\treturn list;\n\t}",
"@NonNull List<IFileDiff> diff(@Nullable List<File> pFileToDiff, @Nullable ICommit pCompareWith) throws AditoGitException;",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<String> openDiffs() {\n\t\tString path = getCurrentPath()+slash+\"diffs.xml\";\n\t\tList<String> diffs = (List<String>) JavaIO.getObjectFromXML(path);\n\t\treturn diffs;\n\t}",
"public List<PathChangeModel> getFilesInCommit(RevCommit commit) {\r\n\t\tList<PathChangeModel> list = new ArrayList<PathChangeModel>();\r\n\t\tif (!hasCommits(repository)) {\r\n\t\t\treturn list;\r\n\t\t}\r\n\t\tRevWalk rw = new RevWalk(repository);\r\n\t\ttry {\r\n\t\t\tif (commit == null) {\r\n\t\t\t\tObjectId object = getDefaultBranch(repository);\r\n\t\t\t\tcommit = rw.parseCommit(object);\r\n\t\t\t}\r\n\r\n\t\t\tif (commit.getParentCount() == 0) {\r\n\t\t\t\tTreeWalk tw = new TreeWalk(repository);\r\n\t\t\t\ttw.reset();\r\n\t\t\t\ttw.setRecursive(true);\r\n\t\t\t\ttw.addTree(commit.getTree());\r\n\t\t\t\twhile (tw.next()) {\r\n\t\t\t\t\tlist.add(new PathChangeModel(tw.getPathString(), tw.getPathString(), 0, tw\r\n\t\t\t\t\t\t\t.getRawMode(0), commit.getId().getName(), ChangeType.ADD));\r\n\t\t\t\t}\r\n\t\t\t\ttw.release();\r\n\t\t\t} else {\r\n\t\t\t\tRevCommit parent = rw.parseCommit(commit.getParent(0).getId());\r\n\t\t\t\tDiffFormatter df = new DiffFormatter(DisabledOutputStream.INSTANCE);\r\n\t\t\t\tdf.setRepository(repository);\r\n\t\t\t\tdf.setDiffComparator(RawTextComparator.DEFAULT);\r\n\t\t\t\tdf.setDetectRenames(true);\r\n\t\t\t\tList<DiffEntry> diffs = df.scan(parent.getTree(), commit.getTree());\r\n\t\t\t\tfor (DiffEntry diff : diffs) {\r\n\t\t\t\t\tif (diff.getChangeType().equals(ChangeType.DELETE)) {\r\n\t\t\t\t\t\tlist.add(new PathChangeModel(diff.getOldPath(), diff.getOldPath(), 0, diff\r\n\t\t\t\t\t\t\t\t.getNewMode().getBits(), commit.getId().getName(), diff\r\n\t\t\t\t\t\t\t\t.getChangeType()));\r\n\t\t\t\t\t} else if (diff.getChangeType().equals(ChangeType.RENAME)) {\r\n\t\t\t\t\t\tlist.add(new PathChangeModel(diff.getOldPath(), diff.getNewPath(), 0, diff\r\n\t\t\t\t\t\t\t\t.getNewMode().getBits(), commit.getId().getName(), diff\r\n\t\t\t\t\t\t\t\t.getChangeType()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlist.add(new PathChangeModel(diff.getNewPath(), diff.getNewPath(), 0, diff\r\n\t\t\t\t\t\t\t\t.getNewMode().getBits(), commit.getId().getName(), diff\r\n\t\t\t\t\t\t\t\t.getChangeType()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Throwable t) {\r\n\t\t\tSystem.err.println(\"Repository failed to determine files in commit!\");\r\n\t\t} finally {\r\n\t\t\trw.dispose();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public List<String> getVersionDifferences();",
"@NonNull List<IFileDiff> diff(@NonNull ICommit pOriginal, @Nullable ICommit pCompareTo) throws AditoGitException;",
"List<IChangeDelta> diff(@NonNull String pFileContents, File pCompareWith) throws IOException;",
"public Paged<GitLabCommitDiff> getCommitDiffs(Serializable projectId, String commitHash, Pagination pagination) throws IOException {\n Query query;\n if (pagination != null) {\n query = pagination.asQuery();\n } else {\n query = Query.newQuery();\n }\n String tailUrl = String.format(\"/projects/%s/repository/commits/%s/diff%s\", gitLabAPI.sanitize(projectId), commitHash, query.build());\n return gitLabAPI.retrieve().toPaged(tailUrl, GitLabCommitDiff[].class);\n }",
"Collection<Commit> fileCommitters(String filename);",
"private static ArrayList<File> getdeleted(String commitid) {\n ArrayList<File> deleted = new ArrayList<>();\n File com = new File(\".gitlet/commits/\" + commitid);\n Commit commit = Utils.readObject(com, Commit.class);\n HashMap<String, Blob> files = commit.getallfiles();\n for (String filename : files.keySet()) {\n File wd = new File(filename);\n if (!wd.exists() && !_repo.containinremoval(filename)) {\n deleted.add(wd);\n }\n }\n return deleted;\n }",
"public interface Diff {\n \n /**\n * Retrieve the project revision information for the first\n * (before) revision of this diff.\n *\n * @return Revision The source revision\n */\n Revision getSourceRevision();\n\n /**\n * Retrieve the project revision information for the last\n * revision for this diff. This may be the same as first()\n * for 1-entry diffs (although the difference between R and R\n * is empty).\n *\n * @return Revision The comparison revision\n */\n Revision getTargetRevision();\n\n /**\n * Get the actual diff data in a multiline string format.\n *\n */\n String getDiffData();\n\n /**\n * Retrieve the list of file names (relative to the root\n * under which this diff was taken) modified by this diff.\n *\n * @return Set set of files changed in this diff\n */\n Set<String> getChangedPaths();\n \n /**\n * Get all the chunks indexed by the file they apply to.\n */\n Map<String, List<DiffChunk>> getDiffChunks();\n}",
"IFileDiff[] getDiffs(String sourceFilter, String rightFilter);",
"protected final ImmutableList<Diff> getDifferences() {\n \t\treturn fDifferences;\n \t}",
"static SvnEntry.Path[] parseDiff(File tmpFile) throws BuildException {\n // parse the output of the command\n BufferedReader reader = null;\n\n try {\n reader = new BufferedReader(new FileReader(tmpFile));\n ArrayList entries = new ArrayList();\n\n String line = reader.readLine();\n String name = null;\n String currDiffLine = null;\n boolean deleted = false;\n boolean added = false;\n\n while (null != line) {\n if (line.length() > INDEX.length()) {\n if (line.startsWith(INDEX)) {\n if (name != null) {\n SvnEntry.Path p =\n new SvnEntry.Path(name, \n deleted \n ? SvnEntry.Path.DELETED \n : (added \n ? SvnEntry.Path.ADDED \n : SvnEntry.Path.MODIFIED)\n );\n entries.add(p);\n deleted = added = false;\n }\n\n name = line.substring(INDEX.length());\n if (line.endsWith(DELETED)) {\n name = name.substring(0, name.length() \n - DELETED.length());\n deleted = true;\n }\n\n currDiffLine = DASHES + name;\n } else if (currDiffLine != null \n && line.startsWith(currDiffLine)\n && line.endsWith(IS_NEW)) {\n added = true;\n }\n }\n line = reader.readLine();\n }\n if (name != null) {\n SvnEntry.Path p = new SvnEntry.Path(name, \n deleted \n ? SvnEntry.Path.DELETED \n : (added \n ? SvnEntry.Path.ADDED \n : SvnEntry.Path.MODIFIED)\n );\n entries.add(p);\n }\n\n SvnEntry.Path[] array = (SvnEntry.Path[])\n entries.toArray(new SvnEntry.Path[entries.size()]);\n return array;\n } catch (IOException e) {\n throw new BuildException(\"Error in parsing\", e);\n } finally {\n FileUtils.close(reader);\n }\n }",
"public Object[] getLatestFileList() {\n\t\tif (filesOfLatestCommit != null) {\n\t\t\treturn filesOfLatestCommit;\n\t\t} else {\n\t\t\tString[] nullString = {\"No files found\"};\n\t\t\treturn nullString;\n\t\t}\n\t}",
"java.util.List<com.google.protobuf.Timestamp> \n getCommitTimestampsList();",
"List<ChangedFile> getChangedFiles(Project project);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the value of the database column st_door_real.dev_fx | public void setDevFx(Integer devFx) {
this.devFx = devFx;
} | [
"public void setdEdx(float dEdx)\n {\n //checkAccess();\n //this.dEdx = dEdx;\n setEDep( dEdx );\n }",
"public void forceSensorValue(){\n SensorEvent sensorEvent;\n //Set internal formal mode\n// setInternalFormalMode(sensorEvent);\n }",
"public void setDeflectorX(double deflectorX) throws DeviceException;",
"public void setExposure(entity.Exposure value);",
"public void setFat(double fat);",
"public void setFvalue(double value) {\r\n this.fvalue = value;\r\n }",
"public Integer getDevFx() {\n return devFx;\n }",
"public void setRedExposure(int redExposure) { this.redExposure = redExposure; }",
"public void setsDrpr(Float sDrpr) {\n this.sDrpr = sDrpr;\n }",
"public void setFxSpotCliente(double value) {\r\n this.fxSpotCliente = value;\r\n }",
"public void setBlueExposure(int blueExposure) { this.blueExposure = blueExposure; }",
"public void setPROMISSORY_FX_NO(BigDecimal PROMISSORY_FX_NO)\r\n {\r\n\tthis.PROMISSORY_FX_NO = PROMISSORY_FX_NO;\r\n }",
"public void setSFCDI(BigDecimal newvalue) {\n fieldSFCDI.setBigDecimal(newvalue);\n }",
"public abstract void setDTR(boolean dtr);",
"public void setDev1(Boolean dev1) {\n this.dev1 = dev1;\n }",
"public void setSfyDwdb(Integer sfyDwdb) {\r\n this.sfyDwdb = sfyDwdb;\r\n }",
"public void setF( double aTempF ) {\r\n tempInFarenheight = aTempF;\r\n setChanged();\r\n notifyObservers();\r\n }",
"public void setFIDEP(String newvalue) {\n fieldFIDEP.setString(newvalue);\n }",
"public void setDefilade(int defiladeState);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new instance of the "Grouping" class. | public Grouping() {
} | [
"public Group() {\n\t\t\tfirst = last = null;\n\t\t\tsize = 0;\n\t\t}",
"public Group() {}",
"public AbstractGroup() {\n cells = new ArrayList<KCell>();\n counts = new Histogram();\n total = 0;\n }",
"public Group() {\n\n }",
"public static Group initGroupObject(){\n Group test_group = new Group(\"testGroup\");\n return test_group;\n }",
"public GLineGroup() {\n\t\t// empty\n\t}",
"public JIssueGroup() {\n this(DSL.name(\"issue_group\"), null);\n }",
"public CaseGroupRecord() {\n super(CaseGroup.CASE_GROUP);\n }",
"public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }",
"public GroupValidator()\n {\n this(new HashMap<Object, IValidator>());\n }",
"public ModelGroupRecord() {\n super(ModelGroup.MODEL_GROUP);\n }",
"void groupingInstanceStart(Grouping g) throws Exception ;",
"void init(final Order ob) {\n gp = new GroupPartition(groupby, nongroup, ob, info);\n }",
"protected void initializeGroups() {\r\n if ((getCriteriaGroup() != null) && (getCriteriaGroup().getItems().isEmpty())) {\r\n getCriteriaGroup().setItems(getCriteriaFields());\r\n }\r\n\r\n if (getResultsGroup() != null) {\r\n if ((getResultsGroup().getItems().isEmpty()) && (getResultFields() != null)) {\r\n getResultsGroup().setItems(getResultFields());\r\n }\r\n\r\n if (getResultsGroup().getCollectionObjectClass() == null) {\r\n getResultsGroup().setCollectionObjectClass(getDataObjectClass());\r\n }\r\n }\r\n\r\n if (getItems().isEmpty()) {\r\n setItems(Arrays.asList(getCriteriaGroup(), getResultsGroup()));\r\n }\r\n }",
"public void testGroup() {\r\n\t\tGroup input = new Group();\r\n\t\tinput.mId = 1L;\r\n\t\tinput.mColor = \"color\";\r\n\t\tinput.mName = \"Name\";\r\n\t\tinput.mNetwork = \"Network\";\r\n\t\tinput.mUserId = 2L;\r\n\r\n\t\tHashtable<String, Object> hash = new Hashtable<String, Object>();\r\n\t\thash.put(\"id\", input.mId);\r\n\t\thash.put(\"color\", input.mColor);\r\n\t\thash.put(\"name\", input.mName);\r\n\t\thash.put(\"network\", input.mNetwork);\r\n\t\thash.put(\"userid\", input.mUserId);\r\n\r\n\t\tGroup output = (new Group()).createFromHashtable(hash);\r\n\t\tinput.createHashtable();\r\n\t\tassertEquals(BaseDataType.GROUP_DATATYPE, output.getType());\r\n\t\tassertEquals(input.mId, output.mId);\r\n\t\tassertEquals(input.mColor, output.mColor);\r\n\t\tassertEquals(input.mName, output.mName);\r\n\t\tassertEquals(input.mNetwork, output.mNetwork);\r\n\t\tassertEquals(input.mUserId, output.mUserId);\r\n\t}",
"public DqcRuleGroup() {\n this(DSL.name(\"dqc_rule_group\"), null);\n }",
"public BaseGroupType() {\n super();\n }",
"public final void rule__Constructor__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:2685:1: ( rule__Constructor__Group__0__Impl rule__Constructor__Group__1 )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:2686:2: rule__Constructor__Group__0__Impl rule__Constructor__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__Constructor__Group__0__Impl_in_rule__Constructor__Group__05675);\r\n rule__Constructor__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__Constructor__Group__1_in_rule__Constructor__Group__05678);\r\n rule__Constructor__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public GroupLayoutRonald ()\n {\n groupFunction();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function returns the longest from a given collection of annotations. Length measured as end begin. | @Deprecated
private <T extends Annotation> T selectLongest(Collection<T> coll) {
int l = -1;
T fm = null;
for (T ment : coll) {
int cl = ment.getEnd() - ment.getBegin();
if (cl > l) {
l = cl;
fm = ment;
}
}
if (fm == null)
return coll.iterator().next();
else
return fm;
} | [
"private <T extends Annotation> T selectLongest(Collection<T> coll) {\n\t\tint l = -1;\n\t\tT fm = null;\n\t\tfor (T ment : coll) {\n\t\t\tint cl = ment.getEnd() - ment.getBegin();\n\t\t\tif (cl > l) {\n\t\t\t\tl = cl;\n\t\t\t\tfm = ment;\n\t\t\t}\n\t\t}\n\t\tif (fm == null)\n\t\t\treturn coll.iterator().next();\n\t\telse\n\t\t\treturn fm;\n\t}",
"String longestWordFinder(String longestSoFar);",
"public int longestMountain(int[] arr) {\n int start = 0, res = 0;\n while(start < arr.length) {\n int peak = findPeak(arr, start);\n if(peak == start) {\n start = peak + 1;\n continue;\n }\n\n int valley = findValley(arr, peak);\n if(valley == peak) {\n start = valley + 1;\n continue;\n }\n\n res = Math.max(valley - start + 1, res);\n start = valley;\n }\n return res;\n }",
"public int longestRod ();",
"public static LongSpan longest(final LongSpan... spans) {\n LongSpan span = spans[0];\n for (int i = 1; i < spans.length; i++) {\n if (span.getLength() <= spans[i].getLength()) {\n span = spans[i];\n }\n }\n return span;\n }",
"public int longestWord(StringList a) {\n int index = 0;\n int i = 0;\n\n while (i < a.size()) {\n\n if (a.get(i).length() > a.get(index).length()) {\n index = i;\n\n i = a.get(i).length();\n\n }\n\n i = i + 1;\n\n }\n\n return index;\n }",
"public static String getLongest(Map<String, ArrayList<String>> m){\n\t\tint longest=0;\n\t\tString rtn=\"\";\n\t\tfor(Map.Entry<String, ArrayList<String>> entry:m.entrySet()){\n\t\t\tif(entry.getValue().size()>=longest){\n\t\t\t\tlongest=entry.getValue().size();\n\t\t\t\trtn=entry.getKey();\n\t\t\t}\n\t\t}\n\t\treturn(rtn);\n\t}",
"public double longestDistance()\n {\n double maxDistance = 0;\n for (int i=0; i < _boxes.length -1 && _boxes[i] != null; i++)\n {\n for (int j=i+1; j < _boxes.length -1 && _boxes[j] != null; j++)\n {\n double currentDistance = _boxes[i].distance(_boxes[j]);\n if (currentDistance > maxDistance)\n maxDistance = currentDistance;\n }\n }\n return maxDistance;\n }",
"public static String findLongest(String[] strings) {\n\n\t\tint longest = 0;\n\n\t\tfor(int i = 1; i < strings.length; i++) {\n\t\t\tif(strings[i].length() > strings[longest].length()) {\n\t\t\t\tlongest = i;\n\t\t\t}\n\t\t\n\t\t}\n\n\t\treturn strings[longest];\n\n\t}",
"public static String longestSubsequence(String givenWord, String words[]){\n LinkedList<String> subSeqList = findSubsequence(givenWord, words);\n String longestSeq = \"\";\n for(String word : subSeqList){\n if(longestSeq.length() < word.length()){\n longestSeq = word;\n\n }\n }\n return longestSeq;\n }",
"public static void main(String[] args) {\n\n\n List<String> d = new ArrayList<>();\n d.add(\"ba\");\n d.add(\"ab\");\n d.add(\"a\");\n d.add(\"b\");\n System.out.println(findLongestWord(\"bab\", d));\n\n\n System.out.println(findLongestWord(\"aewfafwafjlwajflwajflwafj\", Arrays.asList(new String[]{\"apple\", \"ewaf\", \"awefawfwaf\", \"awef\", \"awefe\", \"ewafeffewafewf\"})));\n System.out.println(findLongestWord(\"apple\", Arrays.asList(new String[]{\"zxc\", \"vbn\"})));\n\n\n }",
"public int maxSentenceOffset();",
"public String longestItemInList (String [] list, int count){\n \n String longestWord = list[0];\n \n for(int i = 0; i < count; i++){\n \n if (list[i].length() > longestWord.length())\n longestWord = list[i];\n \n }//End for loop\n \n return longestWord;\n }",
"public abstract String getLongestRepeatedSubstring();",
"public static String longest(List<String> list) {\r\n\t\t\tIterator<String> i = list.iterator();\r\n\t\t\tString result = i.next(); //store in a var to avoid advancing\r\n\t\t\tSystem.out.println(\"result (outside loop): \" + result);\r\n\t\t\twhile(i.hasNext()) {\r\n\t\t\t\tString next = i.next();\r\n\t\t\t\tSystem.out.println(\"result(inside loop): \" + result);\r\n\t\t\t\tSystem.out.println(\"next (inside loop) \" + next);\r\n\t\t\t\tif(next.length() > result.length()) {\r\n\t\t\t\t\tresult = next;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}",
"public int longestMountain(int[] arr) {\n\t if(arr.length<3)\n\t \treturn 0;\n\t int base=0,end,n=arr.length,ans=0;\n\t while(base<n) {\n\t \tend=base;\n\t \tif(end+1<n && arr[end]<arr[end+1]) {\n\t \t\twhile(end+1<n && arr[end]<arr[end+1])\n\t \t\t\tend++;\n\t \t\tif(end+1<n && arr[end]>arr[end+1]) {\n\t\t \t\twhile(end+1<n && arr[end]>arr[end+1])\n\t\t \t\t\tend++;\n\t\t \t\tans=Math.max(ans, end-base+1);\n\t\t \t}\n\t \t}\n\t \tbase=Math.max(end, base+1);\n\t \t\n\t }\n\t return ans;\n\t }",
"public static double longestSideLength(Coordinate a, Coordinate b, Coordinate c)\r\n {\r\n double lenAB = a.distance(b);\r\n double lenBC = b.distance(c);\r\n double lenCA = c.distance(a);\r\n double maxLen = lenAB;\r\n if (lenBC > maxLen)\r\n maxLen = lenBC;\r\n if (lenCA > maxLen)\r\n maxLen = lenCA;\r\n return maxLen;\r\n }",
"public int lengthOfLongestWord(){\n int n=0;\n for(int i=0;i<size();i++)\n if(get(i).length()>n)n=get(i).length();\n return n;\n }",
"public static int longestSub(String str){\n int max = 0;\n int curr = 0;\n\n for(int i = 0; i < str.length(); i++){\n for(int j = i; j < str.length(); j++){\n curr = checkSub(str, i, j);\n if (curr > max) {\n max = Math.max(curr, j - i);\n }else{\n continue;\n }\n }\n }\n return max;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of D0windk | public final void setD0windk(java.math.BigDecimal d0windk)
{
setD0windk(getContext(), d0windk);
} | [
"public final void setD0windk(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal d0windk)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D0windk.toString(), d0windk);\n\t}",
"public final void setD0windr(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String d0windr)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D0windr.toString(), d0windr);\n\t}",
"public final void setD0windkmh(java.math.BigDecimal d0windkmh)\n\t{\n\t\tsetD0windkmh(getContext(), d0windkmh);\n\t}",
"public final void setD0windr(java.lang.String d0windr)\n\t{\n\t\tsetD0windr(getContext(), d0windr);\n\t}",
"public final void setD0windkmh(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal d0windkmh)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D0windkmh.toString(), d0windkmh);\n\t}",
"public final void setD0windknp(java.math.BigDecimal d0windknp)\n\t{\n\t\tsetD0windknp(getContext(), d0windknp);\n\t}",
"public final void setD0windms(java.math.BigDecimal d0windms)\n\t{\n\t\tsetD0windms(getContext(), d0windms);\n\t}",
"public final void setD0windknp(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal d0windknp)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D0windknp.toString(), d0windknp);\n\t}",
"private void setWindChill(Double windChill) {\n this.windChill = windChill;\n }",
"public final void setD0windms(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal d0windms)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.D0windms.toString(), d0windms);\n\t}",
"public final void setWindk(java.math.BigDecimal windk)\n\t{\n\t\tsetWindk(getContext(), windk);\n\t}",
"public void setkW(Double kW) {\n\tthis.kW = kW;\n }",
"public final void setD2windk(java.math.BigDecimal d2windk)\n\t{\n\t\tsetD2windk(getContext(), d2windk);\n\t}",
"public abstract void setK0019(String k0019);",
"public void setDO(int index, int value) {\n\t\tmIKar07Lib.setDigitalOutput(index, value);\n\t}",
"public final void setD1windk(java.math.BigDecimal d1windk)\n\t{\n\t\tsetD1windk(getContext(), d1windk);\n\t}",
"public static void setWind(int windNEW){\r\n\t\twind = windNEW;\r\n\t\ttry {\r\n\t\t\tmanager1.setWindVelocity(windNEW);\r\n\t\t\tmanager2.setWindVelocity(windNEW);\r\n\t\t} catch (EnvironmentException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public abstract void setK0016(String k0016);",
"public abstract void setK0015(String k0015);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field isStart is set (has been assigned a value) and false otherwise | public boolean isSetIsStart() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISSTART_ISSET_ID);
} | [
"public boolean isSetStart() {\n return this.start != null;\n }",
"public boolean isSetStart_time() {\n return this.start_time != null;\n }",
"public boolean hasStart() {\n return fieldSetFlags()[5];\n }",
"public boolean isSetStart() {\n return __isset_vector[__START_ISSET_ID];\n }",
"public boolean isSetStart() {\n return __isset_vector[__START_ISSET_ID];\n }",
"public boolean isStart() {\n return isStart;\n }",
"public boolean isSetStartTime() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);\n }",
"public boolean isSetStartTime() {\n return this.startTime != null;\n }",
"public boolean isStartRecord() {\r\n return startRecord;\r\n }",
"public boolean isSetStartDateTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(STARTDATETIME$10) != 0;\n }\n }",
"public boolean isSetStartTime() {\r\n return this.startTime != null;\r\n }",
"public boolean isStart () {\n if (this.equals(SquareType.START))\n return true;\n else\n return false;\n }",
"@CustomShadowVariable(variableListenerClass = MigrationStepChangeListener.class,\n sources = {@CustomShadowVariable.Source(variableName = \"destination\"),\n @CustomShadowVariable.Source(variableName = \"vm\")})\n public boolean isStart() {\n return start;\n }",
"public boolean isSetStartWith() {\n return this.startWith != null;\n }",
"public boolean isSetStartRow() {\n return this.startRow != null;\n }",
"public Long getIsstart() {\n return isstart;\n }",
"public boolean isSetStartPage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(STARTPAGE$12) != null;\n }\n }",
"public void setStartTrue(){\n\t\tstart = true;\n\t}",
"public boolean isSetBeginTime() {\n return this.beginTime != null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of GenericResource | public GenericResource() {
} | [
"public GenericResource() {\n }",
"Resource createResource();",
"ResourceAPI createResourceAPI();",
"ObjectResource createObjectResource();",
"Service_Resource createService_Resource();",
"protected abstract R createNewResource(Link self);",
"public TarefaResource() {\r\n }",
"InformationResource createInformationResource();",
"public GenericAdmResource()\n {\n }",
"public ProductResource() {\n }",
"ResourceAdapter createResourceAdapter();",
"public ModelResource() {\n }",
"public Resource() {\n }",
"public PersonaResource() {\r\n }",
"ServiceDataResource createServiceDataResource();",
"public CreateBookingResource() {\n }",
"public RequerimientoResource() {\r\n }",
"public PersonResource() {\r\n }",
"Device_Resource createDevice_Resource();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get playlist version by playlist | @GetMapping
@ReturnHandler
public List<PlaylistVersionInfo> getPlaylistVersions(
@RequestParam("playlist_uuid") String playlistUuid) {
return iPlaylistVersionViewService.getPlaylistVersions(playlistUuid);
} | [
"public Playlist getPlaylistToPlay();",
"List<Song> getActivePlaylist();",
"int getActivePlaylistId();",
"public String matchAndViewSongs(String playlist) throws NoPlaylistException {\n for (Playlist p : library) {\n if (p.getPlaylistName().equals(playlist)) {\n str = p.toStringPlaylist();\n } else {\n throw new NoPlaylistException();\n }\n }\n return str;\n }",
"private void retrievePlaylist() {\n }",
"String getPlaylistDownloadUrl();",
"public String getPlaylistTitle();",
"public VLCPlaylist getVLCPlaylist() {\n return vlcPlaylist;\n }",
"public String getPlaylistName()\n {\n return playlistName;\n }",
"public static String getYoutubePlaylistId(String url) {\n\n String videoId = \"\";\n\n if (url != null && url.trim().length() > 0 && url.startsWith(\"http\")) {\n String expression = \"^.*((youtu.be/)|(v/)|(/u/w/)|(embed/)|(playlist\\\\?))\\\\??v?=?([^#&?]*).*list?=?([^#&?]*).*\";\n CharSequence input = url;\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(input);\n if (matcher.matches()) {\n String groupIndex1 = matcher.group(8);\n if (groupIndex1 != null )\n videoId = groupIndex1;\n }\n }\n System.out.println(\"Util / _getYoutubePlaylistId / playlist_id = \" + videoId);\n return videoId;\n }",
"public int matchAndFindRuntime(String playlist) throws NoPlaylistException {\n int runtime = 0;\n\n for (Playlist p : library) {\n if (p.getPlaylistName().equals(playlist)) {\n runtime = p.getTotalRuntime();\n } else {\n throw new NoPlaylistException();\n }\n }\n return runtime;\n }",
"@Override\n public List<Song> loadSongsFromPlaylist(int playlist_id) throws Exception {\n File file = new File(LOCAL_PLAYLIST_SONG);\n SongLocalDAO songLocalDAO = new SongLocalDAO();\n List<Song> tmp = new ArrayList<>();\n try(RandomAccessFile raf = new RandomAccessFile(file,\"r\")){\n while (raf.getFilePointer()<raf.length()) {\n int playlistId=raf.readInt();\n if(playlistId==playlist_id)\n tmp.add(songLocalDAO.getSong(raf.readInt()));\n else\n raf.skipBytes(4);\n }\n return tmp;\n }\n catch (FileNotFoundException e){\n file.createNewFile();\n return tmp;\n }\n }",
"public static List<ComparablePlaylistTrack> getNewPlaylistTracks(Playlist playlist) {\n List<String> redisPlaylistList = redisClient.getRedisPlaylist();\n ObjectMapper mapper = new ObjectMapper();\n List<ComparablePlaylistTrack> redisPlaylistTrackList= new ArrayList<ComparablePlaylistTrack>();\n\n try {\n for(String s : redisPlaylistList) {\n ComparablePlaylistTrack playlistTrack = mapper.readValue(s, ComparablePlaylistTrack.class);\n playlistTrack.setTrack(new ComparableTrack(playlistTrack.getTrack()));\n redisPlaylistTrackList.add(playlistTrack);\n }\n } catch (Exception e) {\n System.out.println(\"Mapping exception: \" + e.getMessage());\n }\n\n //Retrieve a list of PlaylistTracks from the Spotify Playlist and convert\n //to a list of PlaylistTracks using ComparableTrack\n List<PlaylistTrack> spotifyPlaylistTracks = playlist.getTracks().getItems();\n List<ComparablePlaylistTrack> spotifyComparablePlaylistTracks = new ArrayList<ComparablePlaylistTrack>();\n for(PlaylistTrack pt : spotifyPlaylistTracks) {\n pt.setTrack(new ComparableTrack(pt.getTrack()));\n spotifyComparablePlaylistTracks.add(new ComparablePlaylistTrack(pt));\n }\n\n //Filter out PlaylistTracks that have already been posted\n spotifyComparablePlaylistTracks.removeAll(redisPlaylistTrackList);\n\n return spotifyComparablePlaylistTracks;\n }",
"public String getPlaylistName() {\n return this.playlistName;\n }",
"public int playlistInstanceOf(int index){\n\t\tif(playlistCollection[index] instanceof PrivatePlaylist){\n\t\t\treturn 1;\n\t\t}\n\t\telse if(playlistCollection[index] instanceof RestrictedPlaylist){\n\t\t\treturn 2;\n\t\t}\n\t\treturn 3;\n\t}",
"public String getSelectedPlaylist() {\n\t\treturn selectedPlaylist;\n\t}",
"public GetPlaylist(int playlistId) {\n this.playlistId = playlistId;\n }",
"private java.util.Vector getPlaylistItems()\r\n\t{\r\n\t\treturn playlistItems;\r\n\t}",
"public int getCurrentSongIndex();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get token as string by user entity | String getToken(UserEntity userEntity); | [
"T getTokenEntity(String token);",
"String getUsernameFromToken(String token);",
"String createToken(User user);",
"void createToken(UserEntity userEntity);",
"public String getUserToken() {\n if (userinfo == null)\n return null;\n return userinfo.token;\n }",
"String createNewAuthorizationToken(User forUser);",
"public String userToken() {\n return userToken;\n }",
"String generateToken();",
"UserWithPersistedAuth getUserWithToken();",
"String getSecurityToken();",
"String getTokenName();",
"private String getEmailFromToken() {\n String email = \"\";\n Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n if (principal instanceof UserDetails) {\n email = ((UserDetails) principal).getUsername();\n } else {\n email = principal.toString();\n }\n return email;\n }",
"public java.lang.String getToken() {\n return token;\n }",
"String generateJWTToken(AuthUser authUser);",
"void createToken(UserEntity userEntity, ProjectEntity projectEntity);",
"java.lang.String getRemoteToken();",
"public static String getToken(Context context) {\n DB db = DBConnHelper.getConn(context, TAG);\n if (db == null) {\n return null;\n }\n try {\n return db.get(\"token\");\n } catch (SnappydbException e) {\n Log.d(TAG, \"get user from db error\");\n return null;\n }\n }",
"String getSessionToken();",
"java.lang.String getLocalToken();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns lowest humidity in multiple files | public CSVRecord lowest_humidity_in_multiple() {
CSVRecord lowestsofar = null;
DirectoryResource dr = new DirectoryResource();
for (File f: dr.selectedFiles()) {
FileResource fr = new FileResource(f);
CSVRecord currentRow = lowestHumidityInFile(fr.getCSVParser());
if (lowestsofar == null) {
lowestsofar = currentRow;
} else {
double currentH = Double.parseDouble(currentRow.get("Humidity"));
double lowestHH = Double.parseDouble(lowestsofar.get("Humidity"));
if (currentH < lowestHH) {
lowestsofar = currentRow;
}
}
}
return lowestsofar;
} | [
"public CSVRecord lowestHumidityInManyFiles() {\n\n\t\tCSVRecord lowestSoFar = null;\n\t\tDirectoryResource dr = new DirectoryResource();\n\t\t// iterate over files\n\t\tfor (File f : dr.selectedFiles()) {\n\t\t\tFileResource fr = new FileResource(f);\n\t\t\t// use method to get largest in file.\n\t\t\tCSVRecord currentRow = lowestHumidityInFile(fr.getCSVParser());\n\t\t\t// use method to compare two records\n\t\t\tlowestSoFar = getLowestOfTwo(currentRow, lowestSoFar);\n\t\t}\n\t\treturn lowestSoFar;\n\t}",
"float getHumidityMin();",
"public CSVRecord lowestHumidityInFile(CSVParser parser) {\n CSVRecord lowestHumidity = null;\n int i = 0;\n for (CSVRecord currentRow: parser) {\n\n if (lowestHumidity == null) {\n lowestHumidity = currentRow;\n } else {\n String currentH = currentRow.get(\"Humidity\");\n\n if (currentH == \"N/A\") {\n i = i + 1;\n } else {\n double currentH1 = Double.parseDouble(currentRow.get(\"Humidity\"));\n double largetsH = Double.parseDouble(lowestHumidity.get(\"Humidity\"));\n if (currentH1 < largetsH) {\n lowestHumidity = currentRow;\n }\n }\n\n\n\n }\n\n }\n return lowestHumidity;\n }",
"public CSVRecord lowestHumidityInFile(CSVParser parser) {\n\n\t\tCSVRecord lowestSoFar = null;\n\t\t//For each row (currentRow) in the CSV File\n\t\tfor (CSVRecord currentRow : parser) {\n\t\t\t// use method to compare two records\n\t\t\tlowestSoFar = getLowestOfTwo(currentRow, lowestSoFar);\n\t\t}\n\n\t\treturn lowestSoFar;\n\n\t}",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"public double getMinTemperature() {\n\t\tdouble min = temp.get(0);\n\t\tfor (Double d : temp) {\n\t\t\tif (d < min) {\n\t\t\t\tmin = d;\n\t\t\t}\n\n\t\t}\n\t\t/* Your Task */\n\t\treturn min;\n\t}",
"public void tester_humidity() {\n FileResource fr = new FileResource();\n CSVRecord largest = lowestHumidityInFile(fr.getCSVParser());\n System.out.println(\"Lowest Humidity was : \" + largest.get(\"Humidity\") + \" at : \" + largest.get(\"DateUTC\") + \" at Temperature : \" + largest.get(\"TemperatureF\"));\n\n }",
"public int findLowestTemp() {\n\t\t\n\t\tint min = 0;\n\t\tint indexLow = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][1] < min) {\n\t\t\t\tmin = temps[i][1];\n\t\t\t\tindexLow = 0;\n\t\t\t}\n\t\t\n\t\treturn indexLow;\n\t\t\n\t}",
"public int findMinPressure( )\n {\n int minPressure=Integer.MAX_VALUE;\n for(int i=0;i<hurricanes.length;i++)\n {\n minPressure=Math.min(minPressure,hurricanes[i].getPressure());\n }\n return minPressure;\n }",
"public float getminP() {\n Reading minPressureReading = null;\n float minPressure = 0;\n if (readings.size() >= 1) {\n minPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure < minPressure) {\n minPressure = readings.get(i).pressure;\n }\n }\n } else {\n minPressure = 0;\n }\n return minPressure;\n }",
"public CSVRecord leastHumidHourInFile(CSVParser parser){\n //start with largest as nothing\n CSVRecord leastHumidSoFar = null;\n //For each row (currentRow) in csv file\n for(CSVRecord currentRow : parser){\n //If largestSoFar is nothing\n leastHumidSoFar = getColdestOfTwo(currentRow, leastHumidSoFar, \"Humidity\");\n }\n // The answer is largestSoFar\n return leastHumidSoFar;\n }",
"public int lowestHighscore()\n {\n FileReader filereader;\n PrintWriter writer;\n int lowHighScore = 0;\n try{\n \n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n String finalLine =\"\";\n for(int i = 0;i<5;i++)\n {\n finalLine = bufferedreader.readLine();\n }\n lowHighScore = Integer.parseInt(finalLine.split(\":\")[1]);\n \n }\n catch(IOException e){}\n return lowHighScore;\n }",
"public float getHumidityMin() {\n return humidityMin_;\n }",
"private double findMin(double[] array) {\n\t\tdouble lowest = 1000000000;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < lowest) {\n\t\t\t\tlowest = array[i];\n\t\t\t}\n\t\t}\n\t\treturn lowest;\n\t}",
"public int getNextMinWallValueFromFile()\r\n{\r\n\r\n int value = bufferB[bufferBIndex++];\r\n \r\n if (bufferBIndex >= bufferBDataEnd) { bufferBIndex = 0; }\r\n \r\n return(convertChartPercentageToSampleCounts(value));\r\n \r\n}",
"public float getHumidityMin() {\n return humidityMin_;\n }",
"public String getCpuTemperature_Xperia(){\n\n double maxTemp = 0.0;\n RandomAccessFile reader;\n //////// core 1\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone7/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 2\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone8/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 3\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone9/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n //////// core 4\n try {\n reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone10/temp\", \"r\" );\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp += Double.parseDouble(line);\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n\n return String.valueOf(maxTemp / 4);\n }",
"private static String getBestByHumidity(ArrayList<Destination> destinationComps) {\n int lowestHumIdx = 0;\n int lowestHum = destinationComps.get(lowestHumIdx).getWeatherInfo().getHumidity();\n for (int i = 1; i < destinationComps.size(); i++) {\n int humidityToCompare = destinationComps.get(i).getWeatherInfo().getHumidity();\n if(lowestHum > humidityToCompare) {\n lowestHum = humidityToCompare;\n lowestHumIdx = i;\n }\n }\n return destinationComps.get(lowestHumIdx).getCityName();\n }",
"public int findMinWindSpeed( )\n {\n int minSpeed=Integer.MAX_VALUE;\n for(int i=0;i<hurricanes.length;i++)\n {\n minSpeed=Math.min(minSpeed,hurricanes[i].getSpeed());\n }\n return minSpeed;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.