PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Apr 12, 2019 00:53
Hi, does anyone know what kind of format is this `a:5:{i:0;a:5:{s:3:"day";s:6:"monday";s:9:"open_time";s:7:"12:00am";s:8:"end_time";s:7:"12:00am";s:8:"24h_open";s:3:"yes";s:6:"closed";s:2:"no";}i:1;a:5:{s:3:"day";s:7:"tuesday";s:9:"open_time";s:7:"12:00am";s:8:"end_time";s:7:"12:00am";s:8:"24h_open";s:3:"yes";s:6:"closed";s:2:"no";}i:2;a:5:{s:3:"day";s:9:"wednesday";s:9:"open_time";s:7:"12:00am";s:8:"end_time";s:7:"12:00am";s:8:"24h_open";s:2:"no";s:6:"closed";s:2:"no";}i:3;a:5:{s:3:"day";s:8:"thursday";s:9:"open_time";s:7:"12:00am";s:8:"end_time";s:7:"12:00am";s:8:"24h_open";s:2:"no";s:6:"
Nov 21, 2018 22:39
it's stupid invoice system each id represents invoice and they use some paper invoices too based on this id. I know this is wrong but person who gave me this task doesn't care
Nov 21, 2018 22:36
Yes, I need to reuse them
Nov 21, 2018 22:33
@PeeHaa What I meant is that new auto incremented Ids in the table are skipped. The numbers skipped are equal to previous rows deleted. So is there a way to don't skip any numbers?
Nov 21, 2018 22:29
Hi, I have this cms which store some records in db and assign id to each one. However, after I deleted some last rows in the table and add new rows those deleted id numbers are skipped. I don't understand why, maybe anyone have any thoughts?
Sep 27, 2018 16:22
I have to do some work on older version wp site (4.3) whenever I create a new page and it always gives me front page. Other old pages are using templates and they are displayed fine but I don't know how they are linked. What should I look at?
Sep 27, 2018 16:12
Can I ask wp question here?
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Nov 26, 2018 14:24
Hi, does anyone know what is the quickest way to remove matching objects from an array of objects?

I'm currently using this function to get the array of objects that are in both arrays
`const result = options.filter(o1 => this.props[key].some(o2 => o1.label === o2.label));`
Nov 2, 2018 11:35
      reader.onload = (function(theFile) {
        return function(e) {
          vue.graph.fromJSON(JSON.parse(e.target.result));
          resultData = JSON.parse(e.target.result);

          e.target;
        };
      })(event.target.files[0]);
Nov 2, 2018 11:33
Hello I have a piece of code which reads json from text file. How could I execute some code only after reading from file is totally completed?
Oct 3, 2018 16:25
How can I find an object in array of objects based on on of its properties value and change another? it can be lodash
Sep 28, 2018 13:06
solved it now
Sep 28, 2018 13:06
I'm dumb, thanks, I was going through wrong object
Sep 28, 2018 13:02
that's a few properties of the object, costs is object, consumables is array
Sep 28, 2018 13:01
costs: {
labourCost: {
type: 'calculated',
units: '£ / h',
label: 'Labour',
value: 0,
},
materials: {
type: 'calculated',
units: '£ / h',
label: 'Materials',
value: 0,
},
wastePounds: {
type: 'calculated',
units: '£ / h',
label: 'Waste',
value: 0,
},
},
consumables: [{
title: 'test',
value: 5,
unit: '',
}],
energy: [{
title: 'test',
value: 5,
unit: '',
}],
Sep 28, 2018 12:55
it's massive
Sep 28, 2018 12:54
console.log(Array.isArray(object[key])) always returns false
Sep 28, 2018 12:52
I loop through objects' properties not all of them are arrays and if it's array it has to do something else
Sep 28, 2018 12:48
Well I do, I can see where it's defined and it outputs members into the console
Sep 28, 2018 12:47
array of objects is the property of an object maybe that's why
Sep 28, 2018 12:47
they all doesn't work
Sep 28, 2018 12:46
Array.isArray / typeof / Object.prototype.toString.call(temp[key]) == '[object Array]
Sep 28, 2018 12:46
Hello, does anyone know how to check if an array of objects is an array? All the solutions return object or false to me
Aug 30, 2018 09:10
chart drawing*
Aug 30, 2018 09:10
Another is chart driving library
Aug 30, 2018 09:09
Does anyone know how empty vue watcher which is watching an object from another framework can give Maximum call stack size exceeded error?
Aug 29, 2018 16:03
Can someone explain how can a watcher in vue without any actions cause maximum call stack error?
 

Trash can

Like the recycle bin, but trashier.
Nov 2, 2018 11:33
reader.onload = (function(theFile) {
return function(e) {
vue.graph.fromJSON(JSON.parse(e.target.result));
resultData = JSON.parse(e.target.result);

e.target;
};
})(event.target.files[0]);

reader.readAsText(event.target.files[0]);
Sep 28, 2018 12:59
` costs: {
labourCost: {
type: 'calculated',
units: '£ / h',
label: 'Labour',
value: 0,
},
wastePounds: {
type: 'calculated',
units: '£ / h',
label: 'Waste',
value: 0,
},
consumables: {
type: 'calculated',
units: '£ / h',
label: 'Consumables',
value: 0,
},
},
consumables: [{
title: 'test',
value: 5,
unit: '',
}],
energy: [{
title: 'test',
value: 5,
unit: '',
}],`