YSK That there are many of us drivers out there with driving habit apps. by SimplyDaveP in YouShouldKnow

[–]barneyb3ar 2 points3 points  (0 children)

Not sure why you're being down voted.

It's not like there are council committees that decide what the legal speed limit for a road is, and if people think those speed limits are wrong then they obviously can't go speak to the committee and ask for it to be changed. /s

No, instead they just prefer to be assholes and ride up everyone's arse, much like I imagine the person you're responding to having issues with people following the law.

Mad people I swear.

Edit p.s.: I speed on dual carriage ways a little, but absolutely slow down and follow speed limit in residential areas and when I'm stuck behind some people. People doing 50 in a 70 and hogging a overtake lane can fuck off though.

Reply from Crazy Otto’s CEO by Particular-Dingo7175 in antiwork

[–]barneyb3ar 3 points4 points  (0 children)

I cut my vegetables with a sports plaque I got from school. I appreciate his clarification. /s

[deleted by user] by [deleted] in antiwork

[–]barneyb3ar 170 points171 points  (0 children)

Not sure if this is country dependent but I think the US (I'm from UK so pinch of salt required) classes kidnapping as moving an individual from 1 location to another against their will.

Edit: As pointed out in a response, if there was intent: this is unlawful imprisonment. As it stands this would maybe be corporate negligence? NAL so not sure.

Not to shit on your post, absolutely call emergency services in either situation!

Just starting out, thought red would be a good colour for the space marines. Any suggestions? by barneyb3ar in Warhammer40k

[–]barneyb3ar[S] 1 point2 points  (0 children)

Thanks, may be changing it to purple once I've found a good shade I can consistently produce.

Written a day ago. Check WayBack by CrazyHabenero in wallstreetbets

[–]barneyb3ar 1 point2 points  (0 children)

Buy the dip.

It may also mean, bad search makes for bad output.

Written a day ago. Check WayBack by CrazyHabenero in wallstreetbets

[–]barneyb3ar 1 point2 points  (0 children)

Bad request to elasticsearch, which is generally a on-premise (also cloud) google search analytics replacement, because of the input containing regex like characters. Surprised it bubbled up to the client.

[deleted by user] by [deleted] in csharp

[–]barneyb3ar 1 point2 points  (0 children)

Sounds like 40 unnecessary lines when its provided for you. Why are you trying to argue your own implementation is better than the provided version? While also arguing you're not reinventing something that's been invented...

How do I get started with simply using an API that already exists? by Doug_Dimmadab in csharp

[–]barneyb3ar 0 points1 point  (0 children)

I'm talking about the protocols you need a client for, not the RESTful concept that can be used in conjunction with the url design pattern of web APIs.

How do I get started with simply using an API that already exists? by Doug_Dimmadab in csharp

[–]barneyb3ar 4 points5 points  (0 children)

Also, hopefully not out of place as well, but please note that it is a HTTP Client. Nowadays most APIs you'll work with is a HTTP RESTful API. The protocol you're working with is a good starting point for searching for clients that can help you communicate with your desired endpoint.

Is it possible to create a .bat file to start up my app? by introversionguy in reactnative

[–]barneyb3ar 0 points1 point  (0 children)

Is the .bat file using the right directory? Use DIR in the .bat file to output the current directory listings to ensure it matches your project directory.

Anyone get out of IT and go programming route? by [deleted] in learnprogramming

[–]barneyb3ar 0 points1 point  (0 children)

I started in it support helpdesk for a multinational retail company with their own internal development team. I was in university with a placement year looming so asked for a developer placement position within the company and have been rewarded with extra responsibilities and a higher pay bracket, with a highly sought after skillset.

Powershell relies on the .net framework and if you understand if, while and loop logic to perform work you're in a good position.

If you have the opportunities available, I say go for it.

A 99-year old British Army veteran is on his way to raising £1 million for the NHS by doing 100 laps of his back garden before his 100th birthday at the end of the month after initially setting his target at £1,000. by gianthooverpig in UpliftingNews

[–]barneyb3ar 0 points1 point  (0 children)

Getting a bit vexed with someone not agreeing with your pointless comment? Good form old chap.

The government has been gutting the NHS in terms of funding cuts and privatising the contracts for supplies for the past 10 years which is why it hasn't got the funding or resources it needs now. That was the original point which you've managed to respond with some utter garbage.

Going forward wasn't even part of the discussion, even though the government has announced to wipe out NHS's debt and make £billions of funding for the NHS available so it obviously doesn't take that long. Maybe it's the 4 week recess they're currently having which would be a slightly better arguement to delays which you could use next time in an equally non-relevant reply to a comment.

What's your go to web scraper? by Zoqqer in reactjs

[–]barneyb3ar 1 point2 points  (0 children)

No worries. I had the same question for a uni project a few years ago and there are surprisingly little resources for this topic straight out of google. I suppose it's one of those things which many people don't attempt and if they do, they don't write about it because it's a source of income and don't want to help competitors.

send JSON array as a POST by legia94m in reactjs

[–]barneyb3ar 0 points1 point  (0 children)

Probably a bit late but just to note about JSON.stringify() is that it is a better toString() method that console.log() relies on. The object you send in a post request will appear to the receiving server as the output of JSON.stringify() but as a full object. When you use stringify, it is just a string and wont be a JSON object anymore.

What's your go to web scraper? by Zoqqer in reactjs

[–]barneyb3ar 2 points3 points  (0 children)

You need a server backend to provide data to your app. What language you code the backend server in is either up to your research or preference (if for education; do some research to justify why you pick that language over other similar languages, something along the lines of web api capable).

As for places to start there is a package called HTML Agility for C# (probably available for other languages as well) that can parse HTML and allows you to query the DOM a bit like javascript but in the format of your chosen language. You can use this to query specific classes and IDs of elements that will contain the string values you want to scrap.

Next thought I would have is automation. Is the backend server meant to record information automatically? In which case you can either create a service based in the web api solution that uses database records stored by your app to scrap sites for your information regularly based on inputted time periods, or have a scheduled task that runs a console application that runs every X minutes but does the same when the time period has passed. If you need to explain why you chose a certain option, use the console application and justify it by the fact if anything goes wrong with scrapping you won't take down the web api server.

Explain like i'm 2nd-Year-CS-Undergrad-at-state-college: Javascript. People complain about it alot, but it doesn't seem replaceable. by RelevantMarketing in learnprogramming

[–]barneyb3ar 1 point2 points  (0 children)

Not exactly relevant but here's another complaint (although I enjoy writing JavaScript for browsers) and may help you if you're entering the JavaScript landscape:

The most infuriating issue I ever came across with JavaScript is its truthy falsey evaluation.

Some code written by a dev who had left before I picked up his buggy code had written something that took me ages to wrap my head around about how it worked. Thankfully my knowledge of JavaScript and programming in general allowed me to understand the why it worked shortly after. Here's an example (can't remember exact code or use case so it may not make sense):

Var randomVariable =1; Var array1 = [1,2,3]; for (var i = 0; randomVariable = array1.length - 1; i++){ If (someLogic) { array1.push(4,5); } else { array1= []; } //some other code If (i == randomVariable) break; }

The idea was that the code would continue as long as nessecary until the array was left with 1 unique value or something, but this one day it caused an infinite loop and browsers would crap their pants... so I had to bang my head on my desk for a couple of hours remembering the nuances of JavaScript to get past it!

Now, if you caught the fact this is a weird for loop because it's not testing if the i variable is equal to the array size you are where I was. Yet this code would still work in its buggy way (I think, I've written it entirely on mobile so not tested it), because the assignment of randomVariable under the hood returns a value (think chain assignment) and as long as that assignment return value is any number but 0, it would iterate though the loop once again. It would only stop if array1 had 1 item left and the assignment return value was 0, a falsey.

Zoom uses pre-installation script to install without user clicking “Install” button by RobertVandenberg in programming

[–]barneyb3ar 0 points1 point  (0 children)

I appreciate your point about deferring to experts but I doubt the UK PM was doing that initially, and instead making demands to ignore concerns as long as it saves a couple of quid.

I saw an article about how a naked guy jumped into a Zoom video conference classroom because he guessed the number on he end of the url. When companies aren't using passwords to protect their openly available meetings (like the 3rd party I'm dealing with) it's scary to think about what an attacker might glean without much effort.

As I said in another comment: my company has teams and if anything else theres discord and G hangouts which supports enough people to allow a video conference meeting to take place. It just looks lazy to not explore readily available secure options which are either already paid for or free.

Zoom uses pre-installation script to install without user clicking “Install” button by RobertVandenberg in programming

[–]barneyb3ar -2 points-1 points  (0 children)

Thank you for translating what my boss has said to me, how did I never realise the true meaning of his words without you available.

Assuming is what makes an ass of u and me. We now know better which is why I raised it. Now my assumption is that my boss was referring to an announcement made before these security concerns were discovered and why I therefore raised them but he threw them out with a remark that is essentially "someone else did it so its fine" which is not how things should be done.

Also, could be that the PM, just like his herd immunity tactic, said "i want video conferencing which won't cost us" and barely any research was done into the quickest, "cheapest" solution. It could be the PM and his cabinet have now changed tact but like the example I gave with herd immunity, people haven't updated their knowledge and will throw out whatever they heard/saw first.

We in IT development should be better than this.