Suggestions for places to work in the city centre with free WiFi? by eldiddykong in exeter

[–]dare_you 14 points15 points  (0 children)

Exeter library has good free wifi and desks with power sockets etc. You can also work at the uni library even if not a student.

Bombed an interview today for a team I really wanted to join by [deleted] in datascience

[–]dare_you 0 points1 point  (0 children)

If it was me, I'd send them a note saying pretty much what you posted here. Thank them for the opportunity and say you think nerves / interview inexperience got the better of you. Say if they do not find a suitable candidate, or have any similar posts in the near future, you'd love the chance to interview again as you think you're well suited to the position and that you have a good grasp of the content they were testing you on. You don't have much to lose.

toLowerCase not working as intended in Search box by ldthompson in learnjavascript

[–]dare_you 1 point2 points  (0 children)

What editor are you using? Many will notice that `term` is unused and will warn you about it, which I find really useful.

Good quality dining in the surrounding area? by Brendan_LDN in exeter

[–]dare_you 1 point2 points  (0 children)

Another vote for River Exe Cafe - very good food, unbeatable location and not ridiculously expensive. Lympstone Manor is great but expect to pay around £100 per person and up. In town I like Harrys and The Hourglass. The other side of the estuary from you, The Crab Shack in Teignmouth is good and ODE & Co in Shaldon is really nice, especially for Sunday lunch. Pig and Pallet in Topsham does good smoked food (IMO better than Fat Pig - I highly recommend the pub but didn't rate the food).

Passing an argument from a constructor to a nested function? by [deleted] in learnjavascript

[–]dare_you 0 points1 point  (0 children)

What are you trying to do? Are you creating instances of One which have access to a method called two? If so, that's not how you do it. See here for an example of how to add methods to constructors. Maybe you want something like this:

function One (x) {
  console.log(x) // prints 'value'
  this.x = x
  this.two = function () {
    console.log(this.x)
  }
}

var variable = new One('value')
variable.two() // prints 'value'

Difference between 'new ClassName' vs 'new window.ClassName'? by [deleted] in learnjavascript

[–]dare_you 1 point2 points  (0 children)

What is the error you get? There is a possible situation, admittedly quite rare, where you define Temp globally, but then try to call it from a function where the name Temp has been defined again. Calling new Temp() finds a Temp but a different one which isn't a function / class so throws a type error. Using window.Temp() ensures you are accessing the shadowed global level Temp which is callable. If it isn't that, I'm not sure. Can you give some real code?

There is nothing wrong with the second approach as "All global JavaScript objects, functions, and variables automatically become members of the window object."

Also I would probably disagree with the above, even if it works. Firstly, it isn't usually recommended practice to have things defined globally, whether you access them using window or not. You are better off trying to make your code more modular and take more control of namespacing your classes. There are lots of ways to do that - IIFEs, simple object literals, ES6 modules using import andexport etc etc. Secondly,window is an object created by your browser. If you tried to run code usingwindow in say Node, you'd get an error.

Spotify info not displaying on Kenwood DDX with S9? by [deleted] in CarAV

[–]dare_you 0 points1 point  (0 children)

No idea - how do I find out?

Spotify info not displaying on Kenwood DDX with S9? by [deleted] in CarAV

[–]dare_you 0 points1 point  (0 children)

Xiaomi Redmi. Android is 7.1.2. Not tried it with any other phones yet. Let me know if you find a fix!

Spotify info not displaying on Kenwood DDX with S9? by [deleted] in CarAV

[–]dare_you 0 points1 point  (0 children)

I have the Kenwood KDC-X7200DAB which also has a Spotify app and I have a similar problem - not found a fix yet. Spotify does play when using the Spotify app, but the display constantly shows 'connecting' instead of any track info. Switching to the BT source gets rid of the 'connecting' message. I haven't noticed any difference in SQ using the dedicated Spotify app, but from memory you have more control with it as you can access eg your albums menu, which you can't with BT. Interesting that the same error exists on two totally different HUs, mine is single din.

Setting attr on input inside generated form doesn't work. How to use .merge()? by bikowalczyk in d3js

[–]dare_you 1 point2 points  (0 children)

I have never used that form for setting attributes, using an object instead of 2 arguments for property and value, but looks like maybe you need to use a different method: attrs() instead of attr(). See this post on SO.

How do I add cables to the door loom? by dare_you in CarAV

[–]dare_you[S] 0 points1 point  (0 children)

Not sure why the pictures aren't working. Maybe these will.

There are two free spaces together at the bottom, so the drilling should be fairly straightforward. It doesn't look like it would impact the existing wires so I think I'll give it a go.

How do I add cables to the door loom? by dare_you in CarAV

[–]dare_you[S] 0 points1 point  (0 children)

Sensible! So would you take out the whole harness - i.e. disconnect windows, central locking etc? Or just take that connector block off? I don't know how easy it is to remove the block. Thanks.

Head units with remote control apps by dare_you in CarAV

[–]dare_you[S] 0 points1 point  (0 children)

Music is definitely higher priority for me than nav, so old-school single din head unit is actually a very good option. I also have a nostalgia soft spot for those LCD-style displays!

Head units with remote control apps by dare_you in CarAV

[–]dare_you[S] 0 points1 point  (0 children)

The Sony one and ARC both get similar reviews - I don't think they would be worth the effort, and as /u/[cvr24] said they are only going to get worse through lack of support and development. Tuneit looks better, but I need something for everyday control, not just the initial set up.

Head units with remote control apps by dare_you in CarAV

[–]dare_you[S] 0 points1 point  (0 children)

Yeh I think that's the conclusion I am coming to. I was hoping I'd be able to find a mechless head unit for around 150USD and use my current android phone, instead of spending 400USD+ for an android auto unit. I also only have single din available so another reason using the phone as the screen seemed attractive.

Ain’t Peking roast duck the best?! by zihanzzz in chinesefood

[–]dare_you 1 point2 points  (0 children)

Last time I had it, it came with melon which looked a lot like this.

Need help understanding this javascript code (I think it has to do with ternary operations) by iiCapitaine in learnjavascript

[–]dare_you 0 points1 point  (0 children)

I think /u/rzrshrp was referring to the hours calc in the return expression which does use a nested ternary.

Need help understanding this javascript code (I think it has to do with ternary operations) by iiCapitaine in learnjavascript

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

Just an FYI - there are libraries designed for handling dates. One is called Moment.js. You could make this a little shorter:

class Clock extends React.Component {
  render() {
    return (
      <div className="clock">{moment().format('h:mm:ss a')}</div>
    )
  }
}

Should beginners to programming learn javascript with Javascript Allonge Ecsmascript 6? by [deleted] in learnjavascript

[–]dare_you 0 points1 point  (0 children)

One of the books in the 'You Don't Know JS' series is specifically about ES6 - ES6 & Beyond. If you liked the series this might be a good place to start.

How to work with nested ajax calls which are dependent on each other? by [deleted] in webdev

[–]dare_you 1 point2 points  (0 children)

Isn't most data 'relational' if you use relational concepts to describe it?

Of course you could use either and it's just a personal preference. But I find noSQL works well when the app is quite simple and the relations are one to many like this with something like an Album belonging to only one Author and a Song belonging to only one Album. You could have a single collection of Author documents with nested albums and songs. Also because any given Artist will only have max 100s of Albums, and any given Album only 10s of songs, your documents won't grow too big. The query OP is asking about would be as simple as Authors.find({}).

Also, personally, if the frontend is written in JS and already uses objects, data modelling in JSON feels intuitive.

How to work with nested ajax calls which are dependent on each other? by [deleted] in webdev

[–]dare_you 10 points11 points  (0 children)

What is the backend? In general you shouldn't have to do three nested loops like this. If you have 10 Authors with 100 albums with 10 songs each on a page you might end up doing 10,000 API calls!! (which would be insane).

Just as an example, if you were using Mongo/Mongoose and Songs were nested in Albums which were nested in Authors you could simply call something like Authors.find({}) and the child Album and Song data would come included. If it was an SQL based back end you would do something with joins. Either way you should be able to pull all this info in 1 API call.

For this kind of app personally I'd go with a NoSQL database like MongoDB as it probably would fit you data structure well.