Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 2.52 seconds.
Search: Posts Made By: Dormilich
Forum: JavaScript programming 05-23-2013, 09:57 AM
Replies: 10
Views: 142
Posted By Dormilich
question, is the code delivered each time that...

question, is the code delivered each time that different, that you can’t (at least the library part) load it from the start?
Forum: JavaScript programming 05-22-2013, 10:36 PM
Replies: 19
Views: 169
Posted By Dormilich
it reminds me of the proverb: When you have...

it reminds me of the proverb:

When you have a hammer, everything looks like a nail.
Forum: JavaScript programming 05-22-2013, 10:33 PM
Replies: 31
Views: 456
Posted By Dormilich
though one needs to be very careful what to feed...

though one needs to be very careful what to feed it.

pro:
- it skips undefined values (so-called Sparse arrays (can happen if you improperly modify arrays))

con:
- it also checks the object...
Forum: JavaScript programming 05-22-2013, 10:10 PM
Replies: 19
Views: 169
Posted By Dormilich
I don’t trust too many people on the net to...

I don’t trust too many people on the net to recognise when to use the rocket launcher and when the flyswatter.
Forum: JavaScript programming 05-22-2013, 10:03 PM
Replies: 19
Views: 169
Posted By Dormilich
nothing. but my argument was targeted for...

nothing. but my argument was targeted for numbers, not for strings:
Forum: JavaScript programming 05-22-2013, 09:39 PM
Replies: 19
Views: 169
Posted By Dormilich
if you had the array [1,2,3,0,1,2,3] you wouldn’t...

if you had the array [1,2,3,0,1,2,3] you wouldn’t go beyond the 0 value.
Forum: JavaScript programming 05-22-2013, 09:24 PM
Replies: 19
Views: 169
Posted By Dormilich
but fails if you work with numbers, 0 (though a...

but fails if you work with numbers, 0 (though a valid value) would trigger a restart.
Forum: JavaScript programming 05-22-2013, 09:11 PM
Replies: 19
Views: 169
Posted By Dormilich
what also works is the modulo operator: ...

what also works is the modulo operator:
document.getElementById("story").innerHTML = story[i++ % 6];
Forum: JavaScript programming 05-22-2013, 08:32 PM
Replies: 10
Views: 142
Posted By Dormilich
@felgall: that’s not the problem here.

@felgall: that’s not the problem here.
Forum: JavaScript programming 05-22-2013, 07:50 PM
Replies: 31
Views: 456
Posted By Dormilich
you can do a lot of things, but the question is...

you can do a lot of things, but the question is whether you should do that. and I am of the opinion that the array methods are there for a reason.
Forum: PHP 05-22-2013, 07:15 PM
Replies: 4
Views: 121
Posted By Dormilich
as long as you don’t have XSS attack vectors open...

as long as you don’t have XSS attack vectors open (or your access passwords leaked), I see no reason why the mere knowledge of the file name and path should harm you. that is information browsers...
Forum: JavaScript programming 05-22-2013, 01:54 PM
Replies: 31
Views: 456
Posted By Dormilich
use Array.reduce() as shown.

use Array.reduce() as shown.
Forum: JavaScript programming 05-22-2013, 11:53 AM
Replies: 31
Views: 456
Posted By Dormilich
nope, it will return Infinity, -Infinity or NaN.

nope, it will return Infinity, -Infinity or NaN.
Forum: JavaScript programming 05-22-2013, 11:48 AM
Replies: 31
Views: 456
Posted By Dormilich
there is no requirement. but in a stack trace...

there is no requirement. but in a stack trace unnamed functions are called "anonymous".

besides that it leaves you the possibility to reference the function from inside.
Forum: JavaScript programming 05-22-2013, 10:22 AM
Replies: 31
Views: 456
Posted By Dormilich
the item in for...in references the key, not the...

the item in for...in references the key, not the value.

but since you have an Array, why not using that?
$scope.calculateTotal = function _calc_total(){
return $scope.items.reduce(function...
Forum: JavaScript programming 05-22-2013, 09:06 AM
Replies: 10
Views: 142
Posted By Dormilich
AFAIK, you need to create a <script> tag that...

AFAIK, you need to create a <script> tag that contains or references the JS code and insert it into the DOM.

alternately, you could use jQuery’s $.getScript()...
Forum: PHP 05-22-2013, 07:04 AM
Replies: 4
Views: 121
Posted By Dormilich
To access PHP source code of a remote server you...

To access PHP source code of a remote server you have to bypass its PHP interpreter (or for that matter, the server’s directive to pass a file through the PHP interpreter before sending it out). For...
Forum: JavaScript programming 05-22-2013, 06:52 AM
Replies: 10
Views: 142
Posted By Dormilich
the very basic approach (without AJAX) does work,...

the very basic approach (without AJAX) does work, so it’s not a scoping issue. but since you mentioned AJAX, it depends how the AJAX code creates that variable (for instance when you load JS code via...
Forum: PHP 05-21-2013, 12:11 PM
Replies: 16
Views: 265
Posted By Dormilich
Even the FireBug AddOn (Network tab) lets you...

Even the FireBug AddOn (Network tab) lets you examine Request/Response headers.
Forum: PHP 05-21-2013, 09:38 AM
Replies: 16
Views: 265
Posted By Dormilich
the correct input for the content-type header is:...

the correct input for the content-type header is:
header("Content-Type: text/css");
in general, the structure is {header-type}:{header-value} as outlined in the respective RFCs (for HTTP Headers...
Forum: JavaScript programming 05-21-2013, 09:21 AM
Replies: 31
Views: 456
Posted By Dormilich
just my personal rant on the whole "JavaScript is...

just my personal rant on the whole "JavaScript is bad because it doesn’t have ...".


to take up the cudgels on behalf of JavaScript ... I think JS is too often compared to and tried to use (as a...
Forum: PHP 05-20-2013, 09:00 AM
Replies: 4
Views: 109
Posted By Dormilich
if it were to be done in PHP, I’d first combine...

if it were to be done in PHP, I’d first combine date and time to a datetime and then let strtotime() parse it.
Forum: PHP 05-20-2013, 07:08 AM
Replies: 4
Views: 109
Posted By Dormilich
where do $time and $date come from? if...

where do $time and $date come from?

if they’re coming from a DB, why not letting the DB do the calculation?
Forum: JavaScript programming 05-20-2013, 07:04 AM
Replies: 12
Views: 140
Posted By Dormilich
just to mention a server-side, JSON-type, NoSQL...

just to mention a server-side, JSON-type, NoSQL DB: MongoDB (http://www.mongodb.org/)
Forum: DOM and JSON scripting 05-19-2013, 02:34 PM
Replies: 3
Views: 131
Posted By Dormilich
if you don’t have numbers as input value, you...

if you don’t have numbers as input value, you could do the same with an object.
var risks = {
"category 1": {
"class 1" : {
"subclass 1": "combo 1",
"subclass 2": "combo 2" ...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 01:37 PM.