Process of the ARIMA Model - forecasting

I am trying to do the ARIMA Model in XLMINER. I have followed these steps.
Data Partition the time-series. Question- Do we even need to partition the time series for the ARIMA Model. Link here does not tell that you need to partition the data.
If you partition (training,validation) the time-series and you get a different ACF and PACF Plots for training and validation how do you decide which (p,d,q) will fit the model best.
Here is the time-series data: 130 162 196 481 162 166 296 169 376 267 206 272 271 197 140 290 252 204 117 334 228 287 252 256 261 247 206 206 231 239 179 169 108 285 142 74 225 200 84 144 233 138 200 130 148 125 171 117 186 131 157 56 It is weekly data and there is no seasonality and I have data only for 1 year (2005)
Thanks,
Rajesh

Related

React Mermaid 9.0.1 flowchart graph: syntax error in graph data

This is my code for the Mermaid Flowchart Component
import React from "react";
import mermaid from "mermaid";
mermaid.initialize({
startOnLoad: true
});
/**
* Component.
*/
class WorkflowGraph extends React.Component {
/**
* lifecycle method of component.
*/
componentDidMount() {
mermaid.contentLoaded();
}
/**
* render method.
* #return {string}
*/
render() {
return <div className="mermaid">{this.props.chart }</div>;
}
}
const WorkflowFlowchart = (props) => {
const { graphData } = props
return (
<div style={{display:"flex",justifyContent:"center"}}>
<WorkflowGraph
chart={graphData}
/>
</div>
);
}
export default WorkflowFlowchart
I am getting the graphData via api and passing it as a props. This is the graph data
API response
{
"statusCode": 0,
"graphData": "`graph TB;112((112))--BRE_RESPONSE_AWAITED-->366((366));style 112 fill:#0f0,stroke:#333,stroke-width:4px;style 112 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_SUCCESS-->355((355));style 366 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_ERROR-->356((356));style 366 fill:#f00,stroke:#333,stroke-width:4px;355((355))--MAQUETTE_FRAUD_CHECK_FAILURE-->179((179));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANKING_ACTION_DONE-->428((428));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANK_VALIDATION_PENDING-->558((558));style 355 fill:#f00,stroke:#333,stroke-width:4px;558((558))--DOCUMENT_UPLOADED-->114((114));style 558 fill:#f00,stroke:#333,stroke-width:4px;114((114))--EMANDATE_SUCCESS-->557((557));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->557((557));style 428 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_AGREEMENT_SUCCESS-->353((353));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--APPLICATION_PENDING-->555((555));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_APPLICATION_ACCEPTED-->350((350));style 557 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ACTION_PENDING-->181((181));style 353 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ALLOCATION_REJECTED-->180((180));style 353 fill:#f00,stroke:#333,stroke-width:4px;180((180))-->181((181));style 180 fill:#f00,stroke:#333,stroke-width:4px;181((181))--PANEL_SUCCESS-->166((166));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--LOAN_QC_REJECTED-->358((358));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--QC_REJECTED-->183((183));style 181 fill:#f00,stroke:#333,stroke-width:4px;183((183))-->114((114));style 183 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->181((181));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->180((180));style 114 fill:#f00,stroke:#333,stroke-width:4px;347((347))--LMS_CALLBACK_SUCCESS-->330((330));style 347 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->350((350));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))--PREDISBURSAL_FAILED-->357((357));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->555((555));style 166 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->350((350));style 357 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->555((555));style 357 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_SUCCESS-->700((700));style 350 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_FAILED-->701((701));style 350 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->700((700));style 555 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->701((701));style 555 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_SUCCESS-->346((346));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->346((346));style 701 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_FAILED-->347((347));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->347((347));style 701 fill:#f00,stroke:#333,stroke-width:4px;347((347))-->346((346));style 347 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LOAN_APPLICATION_REJECTED-->351((351));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->351((351));style 701 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->347((347));style 351 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->346((346));style 351 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->330((330));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_REJECTED-->333((333));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING-->334((334));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_FAILED-->345((345));style 346 fill:#f00,stroke:#333,stroke-width:4px;330((330))--LEAD_SUCCESSFULLY_CLOSED-->156((156));style 330 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_SUCCESS-->167((167));style 333 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_ERROR-->168((168));style 333 fill:#f00,stroke:#333,stroke-width:4px;167((167))--LEAD_FAILURE-->504((504));style 167 fill:#f00,stroke:#333,stroke-width:4px;168((168))-->504((504));style 168 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->330((330));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->333((333));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->345((345));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->334((334));style 334 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->330((330));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->333((333));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->334((334));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->345((345));style 345 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->114((114));style 112 fill:#f00,stroke:#333,stroke-width:4px;700((700))-->350((350));style 700 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->504((504));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING_BANK_PAN-->359((359));style 346 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->358((358));style 112 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->350((350));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->357((357));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->555((555));style 114 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->428((428));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->558((558));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->179((179));style 558 fill:#f00,stroke:#333,stroke-width:4px;366((366))--UPDATE_LOAN_OFFER-->377((377));style 366 fill:#f00,stroke:#333,stroke-width:4px;377((377))-->355((355));style 377 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->428((428));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->428((428));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->179((179));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->179((179));style 114 fill:#f00,stroke:#333,stroke-width:4px;style 114 fill:#f00,stroke:#333,stroke-width:4px;`",
}
`graph TB;112((112))--BRE_RESPONSE_AWAITED-->366((366));style 112 fill:#0f0,stroke:#333,stroke-width:4px;style 112 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_SUCCESS-->355((355));style 366 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_ERROR-->356((356));style 366 fill:#f00,stroke:#333,stroke-width:4px;355((355))--MAQUETTE_FRAUD_CHECK_FAILURE-->179((179));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANKING_ACTION_DONE-->428((428));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANK_VALIDATION_PENDING-->558((558));style 355 fill:#f00,stroke:#333,stroke-width:4px;558((558))--DOCUMENT_UPLOADED-->114((114));style 558 fill:#f00,stroke:#333,stroke-width:4px;114((114))--EMANDATE_SUCCESS-->557((557));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->557((557));style 428 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_AGREEMENT_SUCCESS-->353((353));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--APPLICATION_PENDING-->555((555));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_APPLICATION_ACCEPTED-->350((350));style 557 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ACTION_PENDING-->181((181));style 353 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ALLOCATION_REJECTED-->180((180));style 353 fill:#f00,stroke:#333,stroke-width:4px;180((180))-->181((181));style 180 fill:#f00,stroke:#333,stroke-width:4px;181((181))--PANEL_SUCCESS-->166((166));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--LOAN_QC_REJECTED-->358((358));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--QC_REJECTED-->183((183));style 181 fill:#f00,stroke:#333,stroke-width:4px;183((183))-->114((114));style 183 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->181((181));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->180((180));style 114 fill:#f00,stroke:#333,stroke-width:4px;347((347))--LMS_CALLBACK_SUCCESS-->330((330));style 347 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->350((350));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))--PREDISBURSAL_FAILED-->357((357));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->555((555));style 166 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->350((350));style 357 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->555((555));style 357 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_SUCCESS-->700((700));style 350 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_FAILED-->701((701));style 350 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->700((700));style 555 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->701((701));style 555 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_SUCCESS-->346((346));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->346((346));style 701 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_FAILED-->347((347));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->347((347));style 701 fill:#f00,stroke:#333,stroke-width:4px;347((347))-->346((346));style 347 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LOAN_APPLICATION_REJECTED-->351((351));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->351((351));style 701 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->347((347));style 351 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->346((346));style 351 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->330((330));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_REJECTED-->333((333));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING-->334((334));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_FAILED-->345((345));style 346 fill:#f00,stroke:#333,stroke-width:4px;330((330))--LEAD_SUCCESSFULLY_CLOSED-->156((156));style 330 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_SUCCESS-->167((167));style 333 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_ERROR-->168((168));style 333 fill:#f00,stroke:#333,stroke-width:4px;167((167))--LEAD_FAILURE-->504((504));style 167 fill:#f00,stroke:#333,stroke-width:4px;168((168))-->504((504));style 168 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->330((330));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->333((333));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->345((345));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->334((334));style 334 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->330((330));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->333((333));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->334((334));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->345((345));style 345 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->114((114));style 112 fill:#f00,stroke:#333,stroke-width:4px;700((700))-->350((350));style 700 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->504((504));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING_BANK_PAN-->359((359));style 346 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->358((358));style 112 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->350((350));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->357((357));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->555((555));style 114 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->428((428));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->558((558));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->179((179));style 558 fill:#f00,stroke:#333,stroke-width:4px;366((366))--UPDATE_LOAN_OFFER-->377((377));style 366 fill:#f00,stroke:#333,stroke-width:4px;377((377))-->355((355));style 377 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->428((428));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->428((428));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->179((179));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->179((179));style 114 fill:#f00,stroke:#333,stroke-width:4px;style 114 fill:#f00,stroke:#333,stroke-width:4px;`
Even though the syntax is correct I am getting the syntax error in grap message.
if I hardcode the same in the code and it works fine.
<WorkflowGraph
chart={`graph TB;112((112))--BRE_RESPONSE_AWAITED-->366((366));style 112 fill:#0f0,stroke:#333,stroke-width:4px;style 112 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_SUCCESS-->355((355));style 366 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_ERROR-->356((356));style 366 fill:#f00,stroke:#333,stroke-width:4px;355((355))--MAQUETTE_FRAUD_CHECK_FAILURE-->179((179));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANKING_ACTION_DONE-->428((428));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANK_VALIDATION_PENDING-->558((558));style 355 fill:#f00,stroke:#333,stroke-width:4px;558((558))--DOCUMENT_UPLOADED-->114((114));style 558 fill:#f00,stroke:#333,stroke-width:4px;114((114))--EMANDATE_SUCCESS-->557((557));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->557((557));style 428 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_AGREEMENT_SUCCESS-->353((353));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--APPLICATION_PENDING-->555((555));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_APPLICATION_ACCEPTED-->350((350));style 557 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ACTION_PENDING-->181((181));style 353 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ALLOCATION_REJECTED-->180((180));style 353 fill:#f00,stroke:#333,stroke-width:4px;180((180))-->181((181));style 180 fill:#f00,stroke:#333,stroke-width:4px;181((181))--PANEL_SUCCESS-->166((166));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--LOAN_QC_REJECTED-->358((358));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--QC_REJECTED-->183((183));style 181 fill:#f00,stroke:#333,stroke-width:4px;183((183))-->114((114));style 183 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->181((181));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->180((180));style 114 fill:#f00,stroke:#333,stroke-width:4px;347((347))--LMS_CALLBACK_SUCCESS-->330((330));style 347 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->350((350));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))--PREDISBURSAL_FAILED-->357((357));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->555((555));style 166 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->350((350));style 357 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->555((555));style 357 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_SUCCESS-->700((700));style 350 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_FAILED-->701((701));style 350 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->700((700));style 555 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->701((701));style 555 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_SUCCESS-->346((346));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->346((346));style 701 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_FAILED-->347((347));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->347((347));style 701 fill:#f00,stroke:#333,stroke-width:4px;347((347))-->346((346));style 347 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LOAN_APPLICATION_REJECTED-->351((351));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->351((351));style 701 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->347((347));style 351 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->346((346));style 351 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->330((330));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_REJECTED-->333((333));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING-->334((334));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_FAILED-->345((345));style 346 fill:#f00,stroke:#333,stroke-width:4px;330((330))--LEAD_SUCCESSFULLY_CLOSED-->156((156));style 330 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_SUCCESS-->167((167));style 333 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_ERROR-->168((168));style 333 fill:#f00,stroke:#333,stroke-width:4px;167((167))--LEAD_FAILURE-->504((504));style 167 fill:#f00,stroke:#333,stroke-width:4px;168((168))-->504((504));style 168 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->330((330));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->333((333));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->345((345));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->334((334));style 334 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->330((330));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->333((333));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->334((334));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->345((345));style 345 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->114((114));style 112 fill:#f00,stroke:#333,stroke-width:4px;700((700))-->350((350));style 700 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->504((504));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING_BANK_PAN-->359((359));style 346 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->358((358));style 112 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->350((350));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->357((357));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->555((555));style 114 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->428((428));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->558((558));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->179((179));style 558 fill:#f00,stroke:#333,stroke-width:4px;366((366))--UPDATE_LOAN_OFFER-->377((377));style 366 fill:#f00,stroke:#333,stroke-width:4px;377((377))-->355((355));style 377 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->428((428));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->428((428));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->179((179));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->179((179));style 114 fill:#f00,stroke:#333,stroke-width:4px;style 114 fill:#f00,stroke:#333,stroke-width:4px;`}
/>
Your API response includes backticks that surround the actual data:
{
"statusCode": 0,
"graphData": "`graph TB;112((112))--BRE_RESPONSE_AWAITED-->366((366));style 112 fill:#0f0,stroke:#333,stroke-width:4px;style 112 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_SUCCESS-->355((355));style 366 fill:#f00,stroke:#333,stroke-width:4px;366((366))--BRE_ERROR-->356((356));style 366 fill:#f00,stroke:#333,stroke-width:4px;355((355))--MAQUETTE_FRAUD_CHECK_FAILURE-->179((179));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANKING_ACTION_DONE-->428((428));style 355 fill:#f00,stroke:#333,stroke-width:4px;355((355))--BANK_VALIDATION_PENDING-->558((558));style 355 fill:#f00,stroke:#333,stroke-width:4px;558((558))--DOCUMENT_UPLOADED-->114((114));style 558 fill:#f00,stroke:#333,stroke-width:4px;114((114))--EMANDATE_SUCCESS-->557((557));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->557((557));style 428 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_AGREEMENT_SUCCESS-->353((353));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--APPLICATION_PENDING-->555((555));style 557 fill:#f00,stroke:#333,stroke-width:4px;557((557))--LOAN_APPLICATION_ACCEPTED-->350((350));style 557 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ACTION_PENDING-->181((181));style 353 fill:#f00,stroke:#333,stroke-width:4px;353((353))--QC_ALLOCATION_REJECTED-->180((180));style 353 fill:#f00,stroke:#333,stroke-width:4px;180((180))-->181((181));style 180 fill:#f00,stroke:#333,stroke-width:4px;181((181))--PANEL_SUCCESS-->166((166));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--LOAN_QC_REJECTED-->358((358));style 181 fill:#f00,stroke:#333,stroke-width:4px;181((181))--QC_REJECTED-->183((183));style 181 fill:#f00,stroke:#333,stroke-width:4px;183((183))-->114((114));style 183 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->181((181));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->180((180));style 114 fill:#f00,stroke:#333,stroke-width:4px;347((347))--LMS_CALLBACK_SUCCESS-->330((330));style 347 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->350((350));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))--PREDISBURSAL_FAILED-->357((357));style 166 fill:#f00,stroke:#333,stroke-width:4px;166((166))-->555((555));style 166 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->350((350));style 357 fill:#f00,stroke:#333,stroke-width:4px;357((357))-->555((555));style 357 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_SUCCESS-->700((700));style 350 fill:#f00,stroke:#333,stroke-width:4px;350((350))--KAFKA_PUSH_FAILED-->701((701));style 350 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->700((700));style 555 fill:#f00,stroke:#333,stroke-width:4px;555((555))-->701((701));style 555 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_SUCCESS-->346((346));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->346((346));style 701 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LMS_SUBMIT_APPLICATION_FAILED-->347((347));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->347((347));style 701 fill:#f00,stroke:#333,stroke-width:4px;347((347))-->346((346));style 347 fill:#f00,stroke:#333,stroke-width:4px;700((700))--LOAN_APPLICATION_REJECTED-->351((351));style 700 fill:#f00,stroke:#333,stroke-width:4px;701((701))-->351((351));style 701 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->347((347));style 351 fill:#f00,stroke:#333,stroke-width:4px;351((351))-->346((346));style 351 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->330((330));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_REJECTED-->333((333));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING-->334((334));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_FAILED-->345((345));style 346 fill:#f00,stroke:#333,stroke-width:4px;330((330))--LEAD_SUCCESSFULLY_CLOSED-->156((156));style 330 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_SUCCESS-->167((167));style 333 fill:#f00,stroke:#333,stroke-width:4px;333((333))--NOTIFICATION_ERROR-->168((168));style 333 fill:#f00,stroke:#333,stroke-width:4px;167((167))--LEAD_FAILURE-->504((504));style 167 fill:#f00,stroke:#333,stroke-width:4px;168((168))-->504((504));style 168 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->330((330));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->333((333));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->345((345));style 334 fill:#f00,stroke:#333,stroke-width:4px;334((334))-->334((334));style 334 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->330((330));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->333((333));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->334((334));style 345 fill:#f00,stroke:#333,stroke-width:4px;345((345))-->345((345));style 345 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->114((114));style 112 fill:#f00,stroke:#333,stroke-width:4px;700((700))-->350((350));style 700 fill:#f00,stroke:#333,stroke-width:4px;346((346))-->504((504));style 346 fill:#f00,stroke:#333,stroke-width:4px;346((346))--LMS_CALLBACK_PENDING_BANK_PAN-->359((359));style 346 fill:#f00,stroke:#333,stroke-width:4px;112((112))-->358((358));style 112 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->350((350));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->357((357));style 114 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->555((555));style 114 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->428((428));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->558((558));style 558 fill:#f00,stroke:#333,stroke-width:4px;558((558))-->179((179));style 558 fill:#f00,stroke:#333,stroke-width:4px;366((366))--UPDATE_LOAN_OFFER-->377((377));style 366 fill:#f00,stroke:#333,stroke-width:4px;377((377))-->355((355));style 377 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->428((428));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->428((428));style 114 fill:#f00,stroke:#333,stroke-width:4px;428((428))-->179((179));style 428 fill:#f00,stroke:#333,stroke-width:4px;114((114))-->179((179));style 114 fill:#f00,stroke:#333,stroke-width:4px;style 114 fill:#f00,stroke:#333,stroke-width:4px;`",
^
}
That's why you have a syntax error. Remove it in the data to fix the problem.
You must've copy-pasted the data INCLUDING the backticks from other code and forgot to remove them.

excel search value in a table and return another value

I need to search in a table a value and reurn the value of the last column of the corresponding row (I can transverse rows and columns if it is going to simplify the functions). For example, I have the following table and when I give as the search value 75, I want to have the value 204 (value of the last column of the same row). The last column can be also moved to be the first one, in case it helps the function. I tried with Index and Match and Lookup but these functions need one column array to search into.
41 42 43 44 61 62 63 64 81 82 83 84 101 102 103 104 201
45 46 47 48 65 66 67 68 85 86 87 88 105 106 107 108 202
49 50 51 52 69 70 71 72 89 90 91 92 109 110 111 112 203
53 54 55 56 73 74 75 76 93 94 95 96 113 114 115 116 204
57 58 59 60 77 78 79 80 97 98 99 100 117 118 119 120 205
121 122 123 124 141 142 143 144 161 162 163 164 181 182 183 184 216
125 126 127 128 145 146 147 148 165 166 167 168 185 186 187 188 217
129 130 131 132 149 150 151 152 169 170 171 172 189 190 191 192 218
133 134 135 136 153 154 155 156 173 174 175 176 193 194 195 196 219
=INDEX($Q$1:$Q$9,AGGREGATE(14,6,1/($A$1:$P$9=R12)*ROW($A$1:$P$9),1))
If first row of table not Row 1, see note below for adjustment
How it works:
($A$1:$P$9=R12) returns a 2D array of FALSE with a TRUE at the point of equality.
1/... returns an array of #DIV/0! and a 1 for the TRUE
Multiply by ROW(...) to get the row number
Use that row number to INDEX into the table.
Note that if the table does not start in Row 1, you need to subtract the first row of the table (-1) from the calculated row number.
If you use a Table or a named range, this can be made dynamic.
Edit: simpler formula
If you will only ever need to have a single result (eg all entries in the table will be unique, you can use:
=INDEX($Q$1:$Q$9,MAX(($A$1:$P$9=R12)*ROW($A$1:$P$9)))
I would use index() with match() like so:
So, used iferror() with match() to check each column and return the position if found, if not then blank.
Then index() with max() to get the position found and return the value from column Q.
Formula in cell A15 dragged to P15 is
IFERROR(MATCH($S$2,A4:A12,0),"")
Formula in cell T2 is
INDEX(Q4:Q12,MAX(A15:P15))
Cell S2 is the value you are looking for.

How to send a keystroke with a LUA script?

How do you send a keystroke using a .lua script?
i.e. Trigger a F7 keypress (or any key).
My specific environment is Windows 64bit and running a lua script within OBS Studio(but I guess the environment doesn't matter).
I just started playing with this for one of my sons games and I came across this list. Use
keypress(101) would send the keypress "E"
Here is the list via raw pastebin link containing all codes and the corresponding keys.
https://pastebin.com/raw/h13kPdD3
Unknown
0
Backspace
8
Tab
9
Clear
12
Return
13
Pause
19
Escape
27
Space
32
QuotedDouble
34
Hash
35
Dollar
36
Percent
37
Ampersand
38
Quote
39
LeftParenthesis
40
RightParenthesis
41
Asterisk
42
Plus
43
Comma
44
Minus
45
Period
46
Slash
47
Zero
48
One
49
Two
50
Three
51
Four
52
Five
53
Six
54
Seven
55
Eight
56
Nine
57
Colon
58
Semicolon
59
LessThan
60
Equals
61
GreaterThan
62
Question
63
At
64
LeftBracket
91
BackSlash
92
RightBracket
93
Caret
94
Underscore
95
Backquote
96
A
97
B
98
C
99
D
100
E
101
F
102
G
103
H
104
I
105
J
106
K
107
L
108
M
109
N
110
O
111
P
112
Q
113
R
114
S
115
T
116
U
117
V
118
W
119
X
120
Y
121
Z
122
LeftCurly
123
Pipe
124
RightCurly
125
Tilde
126
Delete
127
KeypadZero
256
KeypadOne
257
KeypadTwo
258
KeypadThree
259
KeypadFour
260
KeypadFive
261
KeypadSix
262
KeypadSeven
263
KeypadEight
264
KeypadNine
265
KeypadPeriod
266
KeypadDivide
267
KeypadMultiply
268
KeypadMinus
269
KeypadPlus
270
KeypadEnter
271
KeypadEquals
272
Up
273
Down
274
Right
275
Left
276
Insert
277
Home
278
End
279
PageUp
280
PageDown
281
LeftShift
304
RightShift
303
LeftMeta
310
RightMeta
309
LeftAlt
308
RightAlt
307
LeftControl
306
RightControl
305
CapsLock
301
NumLock
300
ScrollLock
302
LeftSuper
311
RightSuper
312
Mode
313
Compose
314
Help
315
Print
316
SysReq
317
Break
318
Menu
319
Power
320
Euro
321
Undo
322
F1
282
F2
283
F3
284
F4
285
F5
286
F6
287
F7
288
F8
289
F9
290
F10
291
F11
292
F12
293
F13
294
F14
295
F15
296
World0
160
World1
161
World2
162
World3
163
World4
164
World5
165
World6
166
World7
167
World8
168
World9
169
World10
170
World11
171
World12
172
World13
173
World14
174
World15
175
World16
176
World17
177
World18
178
World19
179
World20
180
World21
181
World22
182
World23
183
World24
184
World25
185
World26
186
World27
187
World28
188
World29
189
World30
190
World31
191
World32
192
World33
193
World34
194
World35
195
World36
196
World37
197
World38
198
World39
199
World40
200
World41
201
World42
202
World43
203
World44
204
World45
205
World46
206
World47
207
World48
208
World49
209
World50
210
World51
211
World52
212
World53
213
World54
214
World55
215
World56
216
World57
217
World58
218
World59
219
World60
220
World61
221
World62
222
World63
223
World64
224
World65
225
World66
226
World67
227
World68
228
World69
229
World70
230
World71
231
World72
232
World73
233
World74
234
World75
235
World76
236
World77
237
World78
238
World79
239
World80
240
World81
241
World82
242
World83
243
World84
244
World85
245
World86
246
World87
247
World88
248
World89
249
World90
250
World91
251
World92
252
World93
253
World94
254
World95
255
ButtonX
1000
ButtonY
1001
ButtonA
1002
ButtonB
1003
ButtonR1
1004
ButtonL1
1005
ButtonR2
1006
ButtonL2
1007
ButtonR3
1008
ButtonL3
1009
ButtonStart
1010
ButtonSelect
1011
DPadLeft
1012
DPadRight
1013
DPadUp
1014
DPadDown
1015
Thumbstick1
1016
Thumbstick2
1017

Textbook C Code produces incorrrect output [duplicate]

This question already has answers here:
Convert int to double
(3 answers)
Closed 4 years ago.
I am learning C from a text. An example code provided by the author is:
#include <math.h>
main()
{ int i;
printf("\t Number \t\t Square Root of Number\n\n");
for (i=0; i<=360; ++i)
printf("\t %d \t\t\t %d \n",i, sqrt((double) i));
}
which on my computer produces an incorrect output I don't understand:
Number Square Root of Number
0 259
1 515
2 771
3 1027
4 1283
5 1539
6 1795
7 2051
8 2307
9 2563
10 2819
11 3075
12 3331
13 3587
14 3843
15 4099
16 4355
17 4611
18 4867
19 5123
20 5379
21 5635
22 5891
23 6147
24 6403
25 6659
26 6915
27 7171
28 7427
29 7683
30 7939
31 8195
32 8451
33 8707
34 8963
35 9219
36 9475
37 9731
38 9987
39 10243
40 10499
41 10755
42 11011
43 11267
44 11523
45 11779
46 12035
47 12291
48 12547
49 12803
50 13059
51 13315
52 13571
53 13827
54 14083
55 14339
56 14595
57 14851
58 15107
59 15363
60 15619
61 15875
62 16131
63 16387
64 16643
65 16899
66 17155
67 17411
68 17667
69 17923
70 18179
71 18435
72 18691
73 18947
74 19203
75 19459
76 19715
77 19971
78 20227
79 20483
80 20739
81 20995
82 21251
83 21507
84 21763
85 22019
86 22275
87 22531
88 22787
89 23043
90 23299
91 23555
92 23811
93 24067
94 24323
95 24579
96 24835
97 25091
98 25347
99 25603
100 25859
101 26115
102 26371
103 26627
104 26883
105 27139
106 27395
107 27651
108 27907
109 28163
110 28419
111 28675
112 28931
113 29187
114 29443
115 29699
116 29955
117 30211
118 30467
119 30723
120 30979
121 31235
122 31491
123 31747
124 32003
125 32259
126 32515
127 32771
128 33027
129 33283
130 33539
131 33795
132 34051
133 34307
134 34563
135 34819
136 35075
137 35331
138 35587
139 35843
140 36099
141 36355
142 36611
143 36867
144 37123
145 37379
146 37635
147 37891
148 38147
149 38403
150 38659
151 38915
152 39171
153 39427
154 39683
155 39939
156 40195
157 40451
158 40707
159 40963
160 41219
161 41475
162 41731
163 41987
164 42243
165 42499
166 42755
167 43011
168 43267
169 43523
170 43779
171 44035
172 44291
173 44547
174 44803
175 45059
176 45315
177 45571
178 45827
179 46083
180 46339
181 46595
182 46851
183 47107
184 47363
185 47619
186 47875
187 48131
188 48387
189 48643
190 48899
191 49155
192 49411
193 49667
194 49923
195 50179
196 50435
197 50691
198 50947
199 51203
200 51459
201 51715
202 51971
203 52227
204 52483
205 52739
206 52995
207 53251
208 53507
209 53763
210 54019
211 54275
212 54531
213 54787
214 55043
215 55299
216 55555
217 55811
218 56067
219 56323
220 56579
221 56835
222 57091
223 57347
224 57603
225 57859
226 58115
227 58371
228 58627
229 58883
230 59139
231 59395
232 59651
233 59907
234 60163
235 60419
236 60675
237 60931
238 61187
239 61443
240 61699
241 61955
242 62211
243 62467
244 62723
245 62979
246 63235
247 63491
248 63747
249 64003
250 64259
251 64515
252 64771
253 65027
254 65283
255 65539
256 65795
257 66051
258 66307
259 66563
260 66819
261 67075
262 67331
263 67587
264 67843
265 68099
266 68355
267 68611
268 68867
269 69123
270 69379
271 69635
272 69891
273 70147
274 70403
275 70659
276 70915
277 71171
278 71427
279 71683
280 71939
281 72195
282 72451
283 72707
284 72963
285 73219
286 73475
287 73731
288 73987
289 74243
290 74499
291 74755
292 75011
293 75267
294 75523
295 75779
296 76035
297 76291
298 76547
299 76803
300 77059
301 77315
302 77571
303 77827
304 78083
305 78339
306 78595
307 78851
308 79107
309 79363
310 79619
311 79875
312 80131
313 80387
314 80643
315 80899
316 81155
317 81411
318 81667
319 81923
320 82179
321 82435
322 82691
323 82947
324 83203
325 83459
326 83715
327 83971
328 84227
329 84483
330 84739
331 84995
332 85251
333 85507
334 85763
335 86019
336 86275
337 86531
338 86787
339 87043
340 87299
341 87555
342 87811
343 88067
344 88323
345 88579
346 88835
347 89091
348 89347
349 89603
350 89859
351 90115
352 90371
353 90627
354 90883
355 91139
356 91395
357 91651
358 91907
359 92163
360 92419
Any idea or clue as to why? If its obvious maybe point to a reference that will point out some stupid mistake I have made?
Read up on this: printf
And use %f for double not %d which is for int
You're using the wrong format specifier here:
printf("\t %d \t\t\t %d \n",i, sqrt((double) i));
Make sure to use %f for variables of type double (what a function like sqrt() returns):
printf("\t %d \t\t\t %f \n",i, sqrt((double) i));
You have used a wrong format specifier.
Try,
printf("\t %d \t\t\t %f \n" ,i , sqrt((double) i));
%f for double. Good luck.

Code didn't calculate the right time execution of function in C

I have searched for how to calculate the execution time of a program, and i have done exactly in describe of these topic
Execution time of C program
Calculating time of execution with time() function
but my code didn't count the time execution and i don't know why.
here are my code
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char** argv) {
time_t begin, end;
begin = clock();
int c = 0;
for (int i = 0; i < 255; i++) {
printf("%d ",c++);
}
end = clock();
printf("\n");
double timeTaken = ((double) (end - begin)) / CLOCKS_PER_SEC;
printf("time taken: %lf", timeTaken);
return (EXIT_SUCCESS);
}
here are what it printed
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
time taken: 0.000000
I have checked many times for error, but it still print "time taken: 0.000000". Can you guys help me out? Thanks a lot.
Actually, you are iterating loop for a small number of times. Try iterating the loop for large number of times. Eg. iterate for 1e9 times. Then you will get noticeable time period. Modern processors are very fast, such that they have frequency upto 2.9 GHz or more, which mean that they can execute around 2 billion instructions, if available, within a second.

Resources