Win32 batch scripts always fail pgAgent - postgresql

PostgreSQL batch script always fail not running.
below job script query....
DO $$ DECLARE
jid integer;
scid integer; BEGIN
-- Creating a new job INSERT INTO pgagent.pga_job(
jobjclid, jobname, jobdesc, jobhostagent, jobenabled ) VALUES (
1::integer, 'Execute_batch002'::text, ''::text, ''::text, true ) RETURNING jobid INTO jid;
-- Steps
-- Inserting a step (jobid: NULL) INSERT INTO pgagent.pga_jobstep (
jstjobid, jstname, jstenabled, jstkind,
jstconnstr, jstdbname, jstonerror,
jstcode, jstdesc ) VALUES (
jid, 'Action1'::text, true, 'b'::character(1),
''::text, ''::name, 'f'::character(1),
'C:\Script\Test_backup.bat'::text, ''::text ) ;
-- Schedules
-- Inserting a schedule INSERT INTO pgagent.pga_schedule(
jscjobid, jscname, jscdesc, jscenabled,
jscstart, jscend, jscminutes, jschours, jscweekdays, jscmonthdays, jscmonths ) VALUES (
jid, 'Sch_1'::text, ''::text, true,
'2018-03-28 00:00:01+05:30'::timestamp with time zone, '2055-07-16 00:00:01+05:30'::timestamp with time zone,
-- Minutes
ARRAY[false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false, false, false,
false, false, true, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false, false, false,
false, false, false, false, false, false, false, false, false, false,
false, false]::boolean[],
-- Hours
ARRAY[true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
true, true, true]::boolean[],
-- Week days
ARRAY[true, true, true, true, true, true, true]::boolean[],
-- Month days
ARRAY[true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
true, true, true, true, true, true, true, true, true, true,
false]::boolean[],
-- Months
ARRAY[true, true, true, true, true, true, true, true, true, true, true, true]::boolean[] ) RETURNING jscid INTO scid; END $$;
check below statistics of above job.
Always running and aborted status.
link_1

Related

my mui dataTable in not responsive yet iam using FLEX 1;

const columns = [
{ field: 'id', headerName: 'ID', },
{
field: 'moduleName',
headerName: 'Module Name',
flex: 1,
editable: false,
sortable: false,
filter: false,
hideable: false
},
{
field: 'moduleCode',
headerName: 'Module Code',
flex:1,
align: "left",
editable: false,
sortable: false,
},
{
field: 'moduleType',
headerName: 'Module Type',
type: 'number',
flex: 1,
sortable: false,
editable: false,
align: "left",
headerAlign: 'left'
},
{
field: 'yearOfStudy',
headerName: 'Year of Study',
type: 'number',
flrx: 1,
sortable: false,
editable: false,
align: "left",
headerAlign: 'left'
},
{
field: 'program',
headerName: 'program',
type: 'number',
flex: 1,
sortable: false,
editable: false,
align: "left",
headerAlign: 'left'
},
{
field: 'programCode',
headerName: 'Program Code',
type: 'number',
flex: 1,
sortable: false,
editable: false,
align: "left",
headerAlign: 'left'
},
];
this is how it looks on the pc
enter image description here
now this is on mobile it is not responsive
enter image description here this mobile it is not responsive
mui datagrid by setting columns to
flex it is not responsive on mobiles phones it is just truncating the text instead of flex

Duplicate data shown in FL Charts Line graph tooltip

I have been facing issues with displaying the tooltip for my line graph which is created from the FL charts package. On touching the line spots of the graph, my tooltip data is being duplicated and I have no idea why. Below attached is an example image and the code for my line chart.
LineChart(
LineChartData(
titlesData: FlTitlesData(
leftTitles: AxisTitles(),
rightTitles: AxisTitles(
sideTitles: SideTitles(
getTitlesWidget: getTitles,
reservedSize: 40,
showTitles: true,
),
),
topTitles: AxisTitles(),
bottomTitles: AxisTitles(),
),
gridData: FlGridData(
show: true,
drawVerticalLine: true,
drawHorizontalLine: true,
horizontalInterval: 4,
),
lineTouchData: LineTouchData(enabled: true),
maxY: 100,
lineBarsData: widget.weightLogData.map(
(d) {
List<FlSpot> weights = List.generate(
10,
(int index) {
return FlSpot(double.parse(index.toString()),
widget.weightLogData[index].weight!);
},
growable: false,
);
return LineChartBarData(
dotData: FlDotData(show: false),
spots: weights,
lineChartStepData: LineChartStepData(
stepDirection: 20,
),
);
},
).toList(),
),
),

Can I hide controls on ChewieController at some point in flutter?

I have created a ChewieContoller which looks like this:
_chewieController = ChewieController(
videoPlayerController: widget.videoPlayerController,
aspectRatio: 16/9,
autoInitialize: true,
autoPlay: true,
showOptions: false,
showControls: true,
errorBuilder: (context, errorMessage) {
return Center(
child: Text(
errorMessage,
style: const TextStyle(color: Colors.white),
),
);
},
);
Now showControls is set to true, but at some point I want to change it to false (I want to hide controls). But when I try to do something like this:
_chewieController.showControls = false;
Flutter gives an error saying 'showControls' can't be used as a setter because it's final.
Try finding a different setter, or making 'showControls' non-final.
Is there a way to change showControls propety?
Try creating a new instance with the same videoPlayerController.
_chewieController = ChewieController(
videoPlayerController: _chewieController.videoPlayerController,
aspectRatio: 16/9,
autoInitialize: true,
autoPlay: true,
showOptions: false,
showControls: true,
);

in angular-ag-grid, how to add vertical line/separator on specific column headers only?

I am trying to add vertical separator only to Main Header columns - 'Main-H-Col2' and 'Main-H-Col3' and not on sub column headers. How to achieve this ?
export const TestAgGridColumns = [
{headerName: 'Col1', field: 'col1', sortable: true, filter: true, lockVisible: true, lockPosition:
true, editable: false},
{headerName: 'Main-H-Col2',
children: [
{ headerName: 'sub-H-Col2',
field: 'sub-H-Col2',
sortable: true,
filter: true,
lockVisible: true,
lockPosition: true,
cellRenderer: 'agCellRenderer',
cellEditor: 'agSelectCellEditor',
cellEditorParams: {
values: ['Y', 'N'],
cellRenderer: 'agCellRenderer',
}
}
]},
{headerName: 'Main-H-Col3',
children: [
{ headerName: 'sub-H-col3-1', field: 'sub-H-col3-1', sortable: true, filter: true, lockVisible:
true, lockPosition: true,
cellRenderer: 'agCellRenderer',
cellEditor: 'agSelectCellEditor',
cellEditorParams: {
values: ['Y', 'N'],
cellRenderer: 'agCellRenderer',
}
},
{ headerName: 'sub-H-col3-2', field: 'sub-H-col3-2', sortable: true, filter: true, lockVisible:
true, lockPosition: true},
{ headerName: 'sub-H-col3-2', field: 'sub-H-col3-2', sortable: true, filter: true,
lockVisible: true, lockPosition: true, editable: false,
tooltipField: 'sub-H-col3-1Changes',
tooltipComponentParams: { color: '#ececec' }}
]}
];

Pyspark unlist rdd

I have a rdd with the following structure: [int,[list]]
In [109]: rdd_dummies2.take(2)
[[0, [False, False, False, False, False, False, False, False, False, False]],
[1, [False, False, False, False, False, False, False, False, False, False]]]
I would like to have another rdd with the int and the list in the same list.
I mean, something like this:
[[0,False, False, False, False, False, False, False, False, False, False],
[1,False, False, False, False, False, False, False, False, False, False]]
I tried this:
In [110]: rdd_dummies2 = rdd_dummies.flatMap(lambda x: x)
In [112]: rdd_dummies2.take(2)
Out[112]: [0, [False, False, False, False, False, False, False, False, False, False]]
but it doesn't return what I want.
Does anybody know how to use .map() or .flatMap() properly to do it?
Thank you!
You simply need to map over the rdd and prepend the first element to the list:
rdd = sc.parallelize([[0, [False, False, False, False, False, False, False, False, False, False]], [1, [False, False, False, False, False, False, False, False, False, False]]])
rdd.map(lambda x: [x[0]] + x[1]).collect()
# [[0, False, False, False, False, False, False, False, False, False, False],
# [1, False, False, False, False, False, False, False, False, False, False]]