« first day (214 days earlier)      last day (4736 days later) » 

12:00 AM
0
Q: Can't response to question on stackoverflow

having trouble trying to respond to the question I asked here: Fieldset HTML Styling using CSS I'm using IE7 and getting a javascript error with "Expected identifer, string or number". Links appear to work, as I was able to post this, but I can't respond to my first question.

Because when you're on a site of mostly programmers, you can get away with asking to upgrade the browser :P
 
lol
@onteria
mind taking a look at my website to see whats wrong?
matt told me its a z-table issue, but I cant figure it out.
 
@NoviceCoding Sorry I'm somewhat in lurk mode, and I'm not a huge fan of debugging sites to be honest
 
12:12 AM
? Trying to force someone's code paste to SQL highlighting but <!-- language: lang-sql --> doesn't seem to be working
oh well :(
 
12:33 AM
0
Q: How to get IP address

Robert BensonIn VB5, how do I get the IP address of the user? There is a property called remotehostIP, and it looks like this might be the way, but I do not know how to use it! Thanks.

This must be someone who watches lots of CSI
 
Use the FBI's special "Enhance" button
uh if that's ASP then it's in a server variable just like any other backend language...
 
I instinctively run from any JavaScript question that has ".scrollTop()" in it
or deals with viewport, window height, etc.
 
Hello buddies!
 
Someone added a Java tag to a JavaScript question
Wait, nevermind there's a small amount of java at the end
0
Q: Regex Linkify: WWW, nonWWW, HTTP, nonHTTP

SantiagoI'm struggling to try to linkfiy links with or without "www" / "http" This is what I got: noProtocolUrl = /\b((?:www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{}...

cries at regex
Might be the way to do it, but when I see regex that long I curl up in a ball and cry myself to sleep
Then again, at least it's not this:
 
I've come with the idea of implementing perceptron in javascript, what do you think?
 
12:44 AM
@Wilhelm what?
 
@Wilhelm I say do whatever keeps you motivated
oh for the love of... why PHP, why must you add two newlines before my JSON string!?
 
@Raynos It's an algorithm for artificial neural networks
 
As opposed to the natural organic kind of neural networks.
 
1:45 AM
Horray, #7 in the weekly rankings
Too bad I suck anyways :(
 
1:57 AM
Yikes, how not to ask for help stackoverflow.com/questions/6038931/…
 
2:53 AM
Now that's an annoying issue to track down
 
 
2 hours later…
4:44 AM
aside from being used in strings, is the hash operator used anywhere else in javascript?
This character #
 
Nope, used in strings for id selectors and the occasional URL anchors
 
cool
thanks for the doublelook
 
 
7 hours later…
11:58 AM
I want to change the value of variable a,b with the use of Pass By Reference,

i have written the following function to do that, but its not acheiving the result

<script>
var a,b;
function changeValue(p,q)
{
p=100;
q=100;
}
changeValue(a,b);
</script>
can any one help
 
You cant
there is no pass by reference
There is only pass by value in javascript
You can pass an object pointer by value
 
how by creating var a = new Object()
 
var o = {
     a: undefined,
     b: undefined
};

function changeValue(p) {
     p.a = 100;
     p.b = 100;
}

changeValue(o);
 
but what if i have variables
 
You cant
There is no pass by reference in JavaScript
 
12:01 PM
but it worked with arrays, because arrays is Object, dats y ??
 
Who needs SQL escaping, base64 encode the string and voila!
 
in The Tavern (General) on Meta Stack Overflow Chat, 24 mins ago, by badp's sockpuppet
> Thou shalt use jQuery, puny human. jQuery Math Plugin.
 
No need to worry about slashes or semicolons or comments!
 
in The Tavern (General) on Meta Stack Overflow Chat, 4 mins ago, by Nyuszika7H
9
A: Make an application that adds two inputted numbers together

Nyuszika7H/*************************************************************************** ***DISCLAIMER*************************************************************** **************************************************************************** THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESSED OR IMPLIED WAR...

 
 
1 hour later…
1:21 PM
How do I debug classic ASP/
 
response.write :P
 
@Loktar I'll response.write your face.
 
lol
 
Don't use classic ASP
 
@Raynos respond.write("Your Face!"); is how it's suppose to work I guess
 
1:27 PM
@YiJiang :(
Anyway it returns a 500 page.
So god knows whats going on
 
^ might be useful idk
I never really did any major classic asp debugging
 
Horray I got the nice answer badge!
Hmm, node.js IPV6 binding seems more difficult than it should be
 
1:45 PM
@balpha hi r u there?
 
Hello
I want to start developing HTML5 but I don't know how to implement app logic. How can I do that?
 
Depends on what app logic means
If you're talking about just the page itself, you can use JavaScript to interact and provide logic
If you're talking about an overall web application, then you need a server side solution like (no language flamewar intended) PHP, Java, Ruby on Rails, ASP.NET (MVC), django, etc.
 
No, I'm going to explain it.
I've done apps with ASP.NET.
I have an asp.net page and a C# file.
My question is
I can use HTML5 to make UI, but how can I implement C# file?
 
2:03 PM
0
Q: Why do some people really hate security via client-side?

user488For instance, lets look at a common login system for a website HTTPS connection is made User submits credentials via POST Server-side code hashes the password and looks if it matches the user name Session is initialized, and a key may be issued to log in again without passwords ("remember me") ...

 
You might be better off checking with the ASP.net forums [ forums.asp.net ]
Since there are more people there that have done what you're trying to do, and if you have additional questions they'll be able to answer it better
since this is mainly for JavaScript programming, though you might have a few people familiar with ASP.NET, it's not as reliable
@user257493 user disables JavaScript, authentication no longer works
 
@onteria Site is dependent on js.
In theory.
 
@user257493 for authentication? You're doing it wrong
 
That's what I'm asking for an explanation of.
Elaborate on "You're doing it wrong" ?
 
@user257493 Even if it's a js only site, your critical parts of your application shouldn't depend on client side scripting, because it's not as reliable, given a user could have JS disabled, or they might have a weird browser inconsistency with regards to posting using standard HTTPS
 
2:10 PM
Sorry, I didn't explain it very well. I Know where to put app logic if I'm doing an ASP.NET app, or an Android app or an iPhone app, but I don't know where to put that logic if I'm doing a HTML5 app.
 
I see disabled JS as a usability issue, not security.
 
But usability and security go hand in hand
I could have a fairly secure setup by unplugging the power of my PC and unplugging it from the network, but then I can't use it at all
I could attempt to hide my IP by using a complex system of proxies, but then web page loads could end up horribly slow
 
The usability is moot if it's a closed system and we know 100% that they're using JS-- an intranet for instance.
We could in theory fallback to non-js methods if it was disabled also.
 
@VansFannel What kind of logic are you looking for, though? Are you looking for data persistence? Are you looking for some sort of calculations? Animations? A game loop?
 
@RyanKinal I think he means he doesn't know how to set up a project.
 
2:17 PM
@RyanKinal Gameloop and connection to web services (sorry for my english).
 
For instance, what files go where, what goes in those files, how do you build, etc.
 
@user257493 Right, but how it's set up depends on what kind of logic you need
@VansFannel Then you probably want an HTML file, which includes a JavaScript file (where your game loop is), which uses AJAX to call out to your web services.
 
@RyanKinal do you know a tutorial or book to learn about javascript?
 
80
Q: Best resources to learn JavaScript

TarksThe question says it all really, I'm looking for book recommendations, video tutorials etc. I've been programming since I was about six so I don't need a book that spends 4 pages on for loops (thought that might be a Bad example in terms of javascript). Also I'm learning ASP.net at the moment so...

 
It also means more testing when you make changes to AJAX code or use another library like JQuery since what happens when AJAX code mysteriously breaks stackoverflow.com/questions/6039685/…
Rather than just using the very well tested and fairly non-changing HTTP protocol
 
2:22 PM
@VansFannel I'd probably ignore the accepted answer for now, but there are some good resources in there
 
@RyanKinal Thank you very much.
 
@VansFannel No problem
 
and i will stay saying it I hate jquery
:D
Hate Jquery
 
whaat
 
@Marwan Your loss
 
2:34 PM
I like Jquery
 
I Hate it as mush as ever
 
lol why?
 
i love javascript pure javascript build purly my own framework that i can be familiar with
:)
 
idk I mean I let Dodge make my vehicles for me, but I still enjoy trucks and cars just the same
just easier for them to do it rather than me
 
@Marwan Our condolences, then
 
2:35 PM
i hate it when i see people depend on it forgiting that there is a lower layer called javascript and oop and so on
 
Yes, but you have to rigorously test your custom framework on all browsers and make sure it works properly
or you could have someone else do that for you
 
yeah but thats like hating C# because someone else used it improperly
 
i enjoy testing my work realy
 
@Marwan You don't have to support IE6 then I presume?
 
Yeah I guess professionally its more about getting stuff done
and programming in general
 
2:37 PM
well supporting IE6 make me realy feel suck some times :(
 
Should probably write your own browser
cant trust browser vendors to do it right :P
 
but basicly for sure jquery do make things easier but its deffernt between someone using it blindly and using it with strong knowleg with javascript
 
yeah but thats not JQueries fault..
people misuse technologies all the time
 
i know u r right
but for me i like doing my own things :)
 
to each his own I guess
 
2:39 PM
Plus if you look at it from a client perspective, they'll laugh at you if you tell them how long it will take for you to develop a tabbed interface when someone else well versed in jquery and jquery ui busts one together really quick
If it's for your own project though, no big deal
 
Yeah @onteria thats exactly my thoughts as well
 
well i tell u something i build my first frame work in 1999
so many usecases is coverd
so if i missed something i probably use some library to serve it
 
I built my first game in 1994 or so on my c64 Im still a pretty bad developer :P
 
but with knowing its logic for modifications
 
@user257493 Clients cannot be trusted, Hackers will break your website. End of.
 
2:41 PM
Yes, but the browser world is much MUCH different now than in 1999
 
@Marwan dont hate jQuery, hate bad developers. A tool is a tool, idiots misuse tools ;)
 
i know
 
doesnt make it a bad tool
 
who said iam not keep in update with it
 
idk I hate hammers because people have been killed with them.
I use rocks now.
 
2:42 PM
Plus there's the issue of some new browser coming out. "Blasphemy!", you say. That's what many people thought until Google Chrome came out.
 
yeah it commands what 10-15% of the market share now
 
ok why no one can put him self in the chair of the developer of jquery or some other popular library
???
 
Plus with the mobile market gaining speed, you never know
 
why we always like to use technology not producing it even if its repeated u can repeat it and then update it and i think for any javascript developer jquery is some thing easy to do
 
I can totally understand rolling your own framework to get some knowledge, but it seems silly to use your own when theres a perfectly good, tested, cross browser solution already done.
or rather HATE the one thats done
 
2:46 PM
u r right but thats if my work isnt well tested
 
yeah, I guess from a client/contractor perspective you use what gets the job done the best/fastest
if your own framework has something JQuery doesn't and is better, than its the best tool
 
But yeah, if I have a case where I just need to show/hide a div and that's it, I'm going to use document.getElementById and element.style and call it a day
no need to bring in JQuery for something that simple
 
I actually used Mootools, but then switched to JQuery because I saw where the community was headed
 
But the case where I JUST need to do that is probably very slim
 
community headed
well for me
 
2:48 PM
er, the popularity build up I should say
I switched in like 2005
back when all these frameworks were just springing up like mad
 
i see it enough to be a technology user . at least i can make up my mind to be at least the last layer of technology developer or i wish i can be an inventor
 
lol yeah I just think when you say things like you Hate JQuery because other devs use it poorly you will spur lots of discussion arguing with you :P
 
gah, I meant to switch to vim but I started eclipse instead
go away eclipse I'm not doing Java or C++ right now
 
:) do what ever u want i have my mind to be headed to my ow objectives and u dream with jquery as ever u want :D
 
2:53 PM
I dream of JQuery as a series of tubes...
 
Script Junkie | Understanding the Publish/Subscribe Pattern for Greater JavaScript Scalability http://t.co/ZN9Sscn
 
ha, speak of the devil
 
Jquery != JavaScript
its just an upper layer can be replaced with what every u need
 
@Marwan do you see? YOU'VE ANGERED THE JQUERY. IT TWEETS AT YOU WITH ANGER.
 
:D
tweet as ever u want babe ur .js will never be in my Solution folder as many of my friends do :D
 
2:56 PM
I should find someway to make JQuery a religion and get tax deductions off it somehow
3
 
:D hahahah religion
 
"I should get a deduction for driving to this conference. It's part of a religious ceremony."
 
Is there any way to get "threading" without es5?
or at least let ie8 not stall you while it runs for 60 seconds?
 
well i can see a jquery is a disbelief of the religion of javascript
:D
 
could use timeouts @user257493
 
3:00 PM
problem: jQuery plugin is taking up all the time.
 
better yet include jquery, then use setTimeout :P
ah that sucks
 
user1385191
3:15 PM
ah, how I love YouTube playlists
 
user1385191
they make my day
 
@Marwan why are you complaining at jQuery ?
 
@Raynos He wants to experience the pain of working with the DOM by himself, leave him be
 
@user257493 web workers
@YiJiang thats fine
But he has no right to complain at the developers behind jQuery. They are doing a good job
 
@Marwan You've got some strange way of expressing yourself there. What in the world do you mean by that statement?
 
user1385191
3:28 PM
yeah, it's a slippery slope
 
@YiJiang pain of working with the DOM? bah
 
user1385191
agreed
 
Any advice on making "choppy" jquery animations look nice in ie8?
 
user1385191
fix your css
 
user1385191
setting explicit height/width + floating/clearing usually does the trick
 
3:45 PM
Ah, I'll need to calculate the height then, the length is dynamic. Thanks.
 
user1385191
let me take a look
 
It's internal. Basically I have tinyMCE .slideDown and the content it's editing .slideup()
 
user1385191
if you use floating and clearing, width: auto and height: auto help a lot
 
user1385191
because it sets the width/height based on the content
 
script

	$(".wiki .editor").hide();

	$("div.body div.wiki div.controls span.edit").click(function(){
		$(".wiki .content").slideUp();
		$(".wiki .editor").show();
		$('textarea.tinymce').html($(".wiki .content").html());
	});

	$('textarea.tinymce').tinymce(/*/..*/);
css coming in a second...
 
user1385191
3:49 PM
that's a pretty specific selector
 
OCD.
<div id="" class="grid_9 body centerbar">
    <br>
    <h2>Documents</h2>
    <hr>
    <div class="wiki">
        <div class="controls">
            <span class="edit">  Edit  </span>
            Search<input type="text">
        </div>
        <div class="content" style="display: block; "></div>
        <div class="editor" style="display: none; ">
            <form action="javascript:function(){};return false;">
                <textarea class="tinymce" style="display: none; " id="mce_0" aria-hidden="true"></textarea>
 
user1385191
ok, why the blank id?
 
Also, I have a preconceived notion that highly specific = fast.
 
user1385191
not in that case
 
hrmm
 
user1385191
3:51 PM
that's a DOM traversal nightmare
 
user1385191
you want to traverse by id ideally
 
the ID is content, I must have deleted it somehow when pasting.
 
user1385191
because you're using class names, it's going to be especially slow
 
user1385191
I'll put up a test case on it
 
user1385191
4:00 PM
I added lots of empty tags for noise
 
user1385191
just as I thought, specificity = death for DOM selectors
 
lol you guys see this?!
apparently its a pc emu written in js
 
@Loktar its just a cpu emu
 
yeah still pretty cool
 
@Raynos I thought it was a full computer emulator (including BIOS, RAM, etc)
 
user1385191
4:04 PM
but can it boot IE 6?
 
user1385191
cool, someone ran the test in IE 6 :)
 
I ran the IE tests.
 
user1385191
the really interesting test is in Chrome
 
I'm impressed by opera's ability to deal with fairly well.
 
user1385191
$('#foo') (essentially getElementById) wipes the floor with them
 
4:09 PM
@ircmaxell read the tech notes ;)
I think your right though
it is a full (simple) computer emulator
 
Well, if it boots, it's more than a CPU
 
user1385191
the reason specificity is death in this case is because jQuery has to search the DOM and compare by tagName instead of grabbing an id and leaving
 
and since it can boot linux, it must at least have ram
 
yeah it allocates like 127kb
 
@MattMcDonald Which is why XPath is nicer. The search is at least done in C where available (such as FF)
 
4:11 PM
heh, nm makes a ramdisk out of 2048
 
user1385191
yeah, I need to get into xPath at some point
 
@Loktar Now, lets see if we can boot up ubuntu in my browser.
 
haha yeah
 
@MattMcDonald I find it easier, because it's more expressive and less ambiguous than CSS IMHO. sure, CSS has some nice shortcuts to it...
 
user1385191
sadly, the DOM doesn't do CSS like CSS does, which is a misconception. your best option is direct injection.
 
4:14 PM
direct injection?
 
Whats the effective improvement however? we might be running a few selectors, but when does it become a noticeable pain in the backside?
 
user1385191
ambiguous terminology perhaps, but I mean a query where you expect only one element. the query goes right to the id, grabs it, then ends.
 
well, an id lookup will always be best. But sometimes it's not possible
 
user1385191
yes
 
Well, it's always possible, but it might break your design philosophy.
 
user1385191
4:19 PM
in what way?
 
which is how I ended up with crazy classes everywhere.
 
Sure, anything is possible
but not practical
 
user1385191
for similar nodes, you can store them by an identifier in an array, and name their id in that way
 
user1385191
ie column_1, column_2, column_3, etc
 
Lets say I want to create a few slideshow plugins on my page where the innerHTML changes structure so I can't depend on using node type selectors
 
user1385191
4:20 PM
so a site constantly shifting with HTML strings?
 
Sure, as an example.
But the classes assigned dictate what happens.
 
user1385191
I'd need some example markup to understand the DOM structure
 
This is a hypothetical case where the DOM can change.
 
hello
 
Hey
 
4:24 PM
wats goin on?
 
user1385191
is the DOM under your control?
 
user1385191
that is, are you doing the node injection?
 
It's all hypothetical. Lets say you're receiving a picture of lego snapped together from the server that is being put together by a chimp in a zoo, but the classes determine the color of the blocks.
That made no sense.
Maybe I should go eat my lunch hahaha.
 
user1385191
if an external script is doing the DOM manipulation for you, then you're hamstrung and you do the best with what you have
 
user1385191
but if it's under your control, you should try your hardest to make DOM access short and sweet
 
4:29 PM
Makes sense.
 
user1385191
for me, that means very purposeful, semantic markup
 
user1385191
ids, classes, titles, alts, you name it
 
user1385191
SO does a really good job with title attributes
 
good question (i think)
0
Q: Javascript date time comparission returns false but branch stmt still executed

S M KamranI am confused with this Javascript behaviour. Check this code. var NoOfMonthsElapsed = 6; //Should be >= 1 and <= 12 var MsgURL = "about:blank"; var PopupTitle = "ContactInfoUpdate"; var OptionString = "height=165,width=400,menubar=0,toolbar=0,location=1,status=0,resizable=0,status=0,HAlig...

 
user1385191
about:blank, there's a blast from the past
 
4:44 PM
@MattMcDonald wadya mean?
 
user1385191
you've never seen a link that was "about:blank"?
 
user1385191
it's something that creates a blank page
 
user1385191
it's been around for a while
 
@MattMcDonald ok. so what abt it?
 
user1385191
it's being used in the question you posted
 
4:48 PM
Has anyone been able to write a pure JS/HTML client to consume a WCF service? I can authenticate to the client/service using HTTPS and Windows authentication, but I need to capture the user's username to be used in my ajax calls. What's the best way to do this?
 
What do you mean pure JS/HTML
 
as in, the client does not use .NET libraries
 
If you can do it with jQuery then you can do it with js
depends.
Do you allow access to your wcf service as a web service?
 
yeah, I just hard-coded values into my ajax calls to show something working
but ideally each ajax call has a userid variable
and that comes from whichever user is logged in
I'm trying to avoid any .NET client-side code...at all costs.
 
well I dont know much about windows
Use windows in build authentication
and you need to allow it in firefox.
it works on IE
But thats only really an intranet solution
 

« first day (214 days earlier)      last day (4736 days later) »