it basically analyzes your razor templates and automatically pads the selectors with the full path, and essentially revamps the CSS specificity rules to make more sense.
Hello everyone. Please have a look here. Can anyone help with the math logic needed to achieve the desirable layout? Thank you in advance. http://stackoverflow.com/questions/38653623/centering-elements-in-isotope
@justme 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.
Flexbox won't give me the filtering and the animated movement that Isotope will. That's why I ended up with Isotope. if you can help me given what I've used it would be great. I've provided the JS code that I've wrote :)
I think I just resolved a mysterious bug by replacing onChange={foo} with onChange={s => foo(s)} and I have no idea why that worked or what was wrong. Does this change, or something?
Hello, I have a div with class name .qodef-slider-inner and I want to hide it in case that there is a part of a sentence like "[qodef-". I tried different ways but I didn't succeed as I am beginer in Javascript/jquery
var arr = document.querySelectorAll('.qodef-slider-inner');
for (var i = 0; i < arr.length; i++) {
if (arr[i].innerHTML.indexOf('[qodef_slider') != -1) {
arr[i].style.display = 'none';
}
}
Hi, is there any JS event Listeners when document is completely loaded(even with CSS, images). I tried "DOMContentLoaded" - it turns out the function is called when DOM is fully constructed (non necessaritly images and CSS are loaded)
@BenFortune, will onLoad wait for the images that are outside the window ? I beleive "A document can be larger than a window - the window is the "visible" part in your browser." (see stackoverflow.com/questions/9895202/…). ?
> The load event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images, scripts, links and sub-frames have finished loading.
It's not a good way to do it though. Just add your scripts before </body>
@JamesFinnigan 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 am trying to find how many times two numbers have equal occurence in JS.
The function should return the index in the array of the max occurrences of the fragment in which these two number exist. Otherwise I ll return -1;
E.G:
numOne = 5
numTwo = 3
myArray = [6,3,11,5,1,3,5]
In this case i...
I am curious as to why this works:
var c = {
d: function myFunc() {
console.log(this === window);
}
};
var a = {
b: function() {
console.log(this === a);
(0,c.d)();
c.d();
}
};
a.b();
Console output:
True
True
False
So it seems to be that (...
@AjayBijlani 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.
This is a really annoying one. What I ended up using is this:
First, create a group of simple buttons with no data-toggle attribute.
<div id="selector" class="btn-group">
<button type="button" class="btn active">Day</button>
<button type="button" class="btn">Week</button>
<button ty...
In my AuthController.js I check if login is sucesscul and set an hashcode in the session:
req.logIn(user, function (err) {
if (err) res.send(err);
var redirectTo = req.session.redirectTo ? req.session.redirectTo : '/user/show/'+user.id;
delete req...
Hi guys, what module loader are you all using to load es6 modules? I'm writing an angular 1.5 app using typescript. I tried using systemJS yesterday but I'm not sure its workflow for running it in production.
What security? No one does _varName and thinks it's foul proof - in fact even if you don't do that it's still not foul proof. Private variables only communicate that the consumer of the code should not access them - that is all.
There is communicating to the consumers of the code they should not touch it (but can if they have to - like reflection in Java) and there is actual capability theory security.
JS programmer: "So you're telling me that it is private? " "Yes, precisely. " JSP: "So, what, does this mean I can save credit card info in them? " *facepalm*
The two problems are fundamentally different, to be fair languages like Java have SecurityManagers to make approaches created for communication into stuff that can enforce security but it is really uncommon.
I've literally never seen it actually "used as intended", just like DLLs and JARs were supposed to be sort of like hot swappable containers but they're rarely used this way - but microservices are all the bomb.
And, for what it's worth, a lot of JavaScript research actually went into the other kind of private - secure. All of the Caja work and the frozen realms proposal.
@KendallFrey that's a good observation, indeed in order to not be able to break out of not having a reference - you can't have unrestricted memory access.
For example, if you're browser JavaScript - the fact that something exists in memory is irrelevant if you can formally prove you can't get to it. If you're interested in such a proof see www-cs-students.stanford.edu/~ataly/Papers/sp11.pdf
@Luggage Yeah, I'm tired
@KendallFrey In a more general sense - it is possible, Microsoft did it with Spec# and Singularity - by building the operating system in a managed language without direct memory access they got amazing performance because it means you don't need to have user mode and kernel mode.
User mode can't "break out" simply because it doesn't have a reference - truly amazing capability work.
Singularity was an experimental operating system built by Microsoft Research between 2003 and 2010. It was designed as a highly-dependable OS in which the kernel, device drivers, and applications were all written in managed code.
== Workings ==
The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unprotected mode. The hardware abstraction layer is written in C++ and runs in protected...
It's amazingly cool, I had the pleasure of taking a course by one of the engineers who worked on it. Singularity never really took off because well - it couldn't run Windows software - but they use it in Azure.
So, this proposed docs edit suggests that +function(){ console.log("Call with plus sign behind!"); }(); is a alternative way to write IIFEs... Should be rejected imo.
@Luggage yeah, I get tempted to do this a lot, like if I need to throw I might do const value = truthy || (() => { throw Error(...); })(); but I always end up removing such code because it's ugly.
Technically the two mean writing functions that can be optimized and actually optimizing said functions so you're correct - but de facto it's the same thing.
In either case - no one has implemented them and they're going away.