@BartekBanachewicz yeah, when they go "Surprise! We're suddenly adding this whole thing that is almost the same as that whole thing, but we want to nitpick a few things, and we don't know how different it will eventually become"
@BartekBanachewicz that is true, but if you understand the concept of DRY you won't pack functionThatDoesAThing() and functionThatDoesACompletelyDifferentThing() into one function for .. some reason?
my interpretation of DRY is, mostly, don't go find a few lines that do something and copy and paste them somewhere else you need them. If you copy a piece of code and change a few things, it is bad
because that assumption might change, or worse, a bug might be identified in that, then you have the bug duplicated in some unknown number of places that are all changed somewhat
@BartekBanachewicz That is a thing i hate.. i do tend to generalize things as much as it makes sense (to me, at least), simply because you get a giant junk of code if you code like i initially posted. You'll have to decide for a pattern in the case you mentioned, either you tweak the generalized function, or you call another function.
I personally would decide between those two depending on how often this exact case could occur and how much different the function in the case is. Anyway, damn someone who asks you to do such things, how do you they dare to make me change my patterns :[
@AwalGarg it's like windows has created a sort of waiver that you sign for any and all operations of a certain level, so that Microsoft can always say that they told you so
@BartekBanachewicz my internet was down for a day and someone from my workplace confused me for some other guy. came here blasting over all the things.
I am using this library for generating Query Builder,
https://odatasamples.codeplex.com/SourceControl/latest#Tools/ODataQueryBuilder/Scripts/odata-query-builder.js
Above helps me to generate adhoc reports, but what I want is to save the URL and then using this URL recreate OData Query Builder ...
i need to define a page with multiple radio buttons. If i will set the same name to all of them then i cant understand which is selected on server side. any idea ?
Hey folks, random question. Its not JS, but CSS, i know, no one is in there and its just something generic. Can you declare multiple things for the flexbox property justify-content? IE. justify-content: center space-around; ?
in respect of display centred but space around it, looking at the tutorials on it so to speak i dont think it doesnt, but just wondered if anyone knew ;)
loll i know @jandy lol, i know it lacks support for IE8 as well, im purely just playing with it tbf....... @neil thanks for the clarification. IT wasnt OVERLY clear, but youve confirmed my suspicions
its ok, a 5px margin around my flex-items so it seemed to give me that little bit of scope to create space between. Oh thats ok, i will have to read up on that I was reading CSS tricks
For the below code,
var myGen = function*(){
one = yield $.get('profile.json');
two = yield $.get('friend.json');
three = yield $.get('tweets.json');
console.log(one, two, three);
console.log('sham');
};
function smartCode(generator) {
var gen = generator();
function handleN...
I have created a functionality, that i have to do for multiple nodes, except node everything is same:
here is my code:
switch (a_Size) {
case "XS":
$.each(data.gallery.group_by_color, function (i, item) {
$.each(data.product_variants.X...
@Neoares Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I contacted my hosting provider, and they said that the SSL files they use don't have .pem extensions, but instead use .key and .cert. Will they work fine for signalmaster?
@think123 PEM is just a format. Certificates/keys can be converted from one certificate to the other. It's likely that the files are in PEM format though
I am responsible for maintaining two Debian servers. Every time I have to do anything with security certificates, I Google for tutorials and beat away until it finally works.
However, in my searches I often come across different file formats (.key, .csr, .pem) but I've never been able to find a ...
I tried the combination CTRL+ALT+L or L but it is not working. But if I select the menu item LockScreen from setting drop down it works.
Any thoughts on how to fix keyboard shortcut?
Thanks.
@OliverSalzburg Yeah my hosting company just responded in the chat, they said that it's .key and .cert, but that you can convert it anyways... thanks for that, now I just have to wait for the SSL to start working I guess.