« first day (820 days earlier)      last day (4143 days later) » 

1:27 AM
0
Q: Structuring Simple HTML5 / CSS3 / JavaScript Math Web App

user1822824I am new to web apps and I am having a difficult time structuring my apps. I put together a very simple math web app which I wish to expand on. The app has the following pages/screens: Home screen About screen Math question screen Answer check screen Results screen. Right now the app works fi...

 
1:47 AM
Damn, getUserMedia into Web Audio API still not flagless in Chrome 24
 
@SomeKittens your wish is my command.
 
\o/
 
0
Q: Javascript and proprietary algorithms

Alexandre P. LevasseurI'll be quite to the point, is there any way to make Javascript a bit more concealed than it usually is or is Javascript always out and open if you look in the source code ? This is about hiding proprietary algorithms that would dispense a service that does not exist yet (to my knowledge) on the...

 
I liked his right eye better so I made it his left... then I made it blink!
 
2:03 AM
I feel like your blinking gifs contain some sort of hidden brilliance, but then I think.. nah they're ridiculous
 
He looks like he's about to pass out
 
the black edges were an oversight.
 
My life is complete!
@somekitten when you obfuscate your javascript, require a random 'key' (an algorithm that makes decodes the obfuscate) to unlock the obfuscation. So you have to make a quick server call to unlock it. On the server, only provide the key from same-domain requests
@SomeKittens with that kind of obfuscate, if they crack it, they deserve it
 
Solid security advice, "if they crack it they deserve it"
I wonder if https works like that
We know there is a bug, but if they crack it, they deserve it
 
2:18 AM
lol..
 
@bushdiver Wait, what?
 
@SomeKittens unobfuscate with a server call that only provides it for same-domain requests
 
I understood that part. Why did you ping me?
 
@bushdiver that's a horrible idea, stop saying that
 
oops thought you asked a question, looks like you just made a hurray emoticon above actually..
@copy my bad, it's probably really stupid idea
 
2:31 AM
Oh, yeah. I see it now.
 
@bushdiver rule number 1: Don't roll your own crypto.
 
@copy ok it felt like a great idea when i was typing it.. i guess i'll just be quiet and wonder why i say anything at all..
 
Start a journal... never show anyone...
 
What license do you guys use?
 
lol I'll be sure to lock my journal site with a pre-existing crypto written by experts smarter than me
 
2:37 AM
@bushdiver Good job, young padawan. Now bring me a beer
 
@phenomnomnominal Drivers
 
@SomeKittens smart ass :P
What software license do you guys use?
 
MIT
because the one OSS project I've created was for a private, for-profit experiment
 
Yeah I think I'm going to lean that way
 
Almost all the node stuff is MIT
 
2:47 AM
I was thinking WTFPL, but it's maybe a step too open
 
3:31 AM
hi
 
function tada() { }

$('#id').on('click', tada);
$('#id').off('click', tada);
is that the right syntax for that?..
 
Holy crap how did I end up in JS chat?
 
pressed the wrong button
 
Missclick ?
 
comeon someone knows the answer..
 
3:38 AM
I have a stupid question
 
I have a stupid answer
 
@bushdiver Syntax: Yes. Semantics: Who knows?
 
I built a whole navigation using this:

$("a").on('click', function () {
    if (this.id == 'callback') {
      if (open == false) {
        $("#contact-slide").animate({
          'left': 0
        });
        open = true;
      } else {
        $("#contact-slide").animate({
          'left': -360
        });
        open = false;
      }
    }
    if (this.id !== '' && this.id !== null) {
      $('#content').load(this.id + '.php');
    }
    return false;
  });
  $("a.slide").on
so that when you click a link instead of reloading the page the content just appears in div content.
 
Not enough jQuery -1
 
well is there a way that I can go to .../aboutus.php (which currently only contain the text) but be redirected back to the build page and that will have the content of aboutus in the builder?
 
3:41 AM
I never understood highjacking your own hrefs.. why not just href# and navigate onclick
 
because I cant have the header reload
 
the builder?
 
my index.php acts as a buildpage so when you click on aboutus for example the <a> has an id of aboutus and the content of <div content> changes to be that of aboutus.php
 
you mean have the content (which is an aboutus page) loaded onto your page/ui/builder?
ah easiest way use jquery load and target the div
 
thats what I have done
 
3:43 AM
load() uses ajax behind the scenes so you only have to provide the php page
 
but now say I want to send a link to you for the about us page I cannot do that
this will give you an idea of what I am doing
 
Ah, well you have to build # hashtag navigation
 
i get the idea
thats a problem you have to solve with any modern web apps really.. how to load a static page on a dynamic app/site
 
ok so Im looking into it with backbone.js
 
3:46 AM
eh
that's a big leap
if you didn't start the project with backbone.js, i wouldn't implement it now..
 
oh ok
damn
I didnt think this through
 
use a hashchange event to point to the different 'states' of your app
 
I was just looking for that link
yah
 
0
Q: Do i need a website to practice AJAX?

AtulI am beginner in Web development and I have learned HTML,CSS,JS,Jquery.Now I am learning AJAX. I used to write things in notepad++ and just execute it in browser. Even ajax request were working fine when I send it to wikipedia for getting some data. But when I tried it on twitter and facebook I a...

 
3:49 AM
use that plugin
And with your aboutus page
for the <a> tag - use the href like #aboutus
 
ok
kool
 
and then, program the load() into the hashchange event
so it will happen on pageload
 
@Charlie how its going?
 
Ah good
everything worked out real great until I had one though
 
what
 
3:51 AM
how would I be able to have an outside link to a page that doesnt have an address
because aboutus.php is nothing unless it is wrapped in index.php
 
yes it is indeed a good question
 
index.php#aboutus
 
so I am investigating jQuery BBQ ben alman
 
you can have it with ajax hash
 
and program the load() into the hashchange
 
3:52 AM
yeah I know that now
HappyNinja helped me with a big chunk this morning
so I had to quickly update him
Anyways, thanks for the help guys I have to go!
 
4:06 AM
0
Q: When a function is to be invoked immediately, the entire invocation expression should be wrapped in parens

Atulvar collection = (function () { var keys = [], values = []; return { get: function (key) { var at = keys.indexOf(key); if (at >= 0) { return values[at]; } }, set: function (key, value) { var at = keys.indexOf(key); if (at < 0)...

 
4:25 AM
syntax to see if elem has event listener?
if( $('#id').on('click',functionname) )
or
if( $('#id').is('click',functionname) )
?
:|
 
Look it up in the jquery docs
 
yah am researching..
looks like there's no way to with core.. is plugin for it
don't really want to use plugin for that though..
 
I'd use vanilla JS and store events if I need to query for them later
 
Well I am trying to turn event off, and it seems to throw an error if the event is not already associated. wanting to check if associated before turning it off..
I feel like i've used .off though without an attached event without it throwing an error..
 
4:42 AM
I'd think so too, without knowing anything about jquery
 
ah was scope error..
is there a way to make contents of $(function() { }) global?
I thought $(function(window) { }) would work.. but doesnt seem it..
er doest seem to
 
5:11 AM
nvm
 
6:03 AM
0
Q: prevent HTML files downloaded from getting copied from that particular system to another system or getting the script modified?

user1439968How to prevent my HTML files downloaded to a particular system from getting copied from that particular system to another system or getting the script modified ? Is there any tool or method out ?? Well, I make custom projects using HTML and javascript for students and don't want someone to copy ...

 
6:29 AM
wow php is ugly piece of crup , fails silently with no - error :-|
 
@Darkyen crup ??? i think we thought its creep
:P
 
@NullPointer crap
 
I hate php.
Recursively
 
sometimes u have to deal with it
now file_open("xyz.txt","w+");
 
whatever its better than some other ...
 
6:32 AM
fails silently .. why ? dunno
 
languages .. and get money too
 
Yeah but meh, why would you want to work with shitty tools
 
@phenomnomnominal customers :P
 
Again, why would you want to work with shitty customers who want PHP :P
 
php is yet awesome easiest tool ..
its crap only for those who are not aware of security and performance issue ...
 
6:35 AM
@phenomnomnominal cause tehy cant afford or understand node.js
just for a blog !
comon for a free blog with php node.js is overkilling
 
Yeah, but I don't plan on ever having to build a blog haha
 
php is cool ,cool,cool,............,cool
 
php is a bit shit
 
@NullPointer read(NULL);
php is shit! it was good back in its start , but now its a bit over done and over over loaded
 
there is no place in the world for php haters .... go to moon.. right now :P
 
6:38 AM
I AM HATING THIS ERROR -_-
how the heck do i login as apache user :3
 
echo "php is " . $so_fucking . " ugly!" ;
 
you need to use single quote .. here it will be faster than double
 
and how fucking stupid is that!
 
if you do fu*k with php .. php will fu*k you
 
Or you can just avoid it, and use a real language
 
6:43 AM
@phenomnomnominal what is a real language ?
 
Haha, dude, I'm just trolling you
 
@NullPointer Binary
 
I only write machine code, anything else is too much abstraction for me :P
 
@Darkyen :P :P
its worse than php and real languages
 
Like anything, PHP is a useful tool for some situations. I just don't like how it looks, and wouldn't choose it if i had a choice
 
6:46 AM
There is always choice ....
 
Not necessarily
If you come into a project that has been around for a few years and is completely built on PHP, you can't really be like, 'Sweet, let's start again on node.'
 
@phenomnomnominal thats what i usually do
 
Hello are senior and junior developers allowed to use function references and other sources to program at shifts while they are working for someone ?
 
@NullPointer i personally prefer C++ & JavaScript
aka Node.js over everything
they are just unbeatable together
 
@user1867842 YES, WE HAVE BEEN OVER THIS.
 
6:49 AM
its like fusion of Goku and Vegeta! JUST ULTIMATE!
 
@Darkyen, yeah
 
Okay just double checking
 
@Darkyen yo me to ... i am now working (learning ) c++ again
 
In my eyes they're actually perfect
 
them both give u the fluidity and ease of javascript
with the real sheer power punch of C++
why would u ever need another langauge ?
 
6:50 AM
@Darkyen ?
 
JS on client/server with WebSockets and a NoSQL DB
 
@NullPointer the fusion of C++ & JavaScript is unbeatable
aka Node.js
its incredibly powerful
 
@Darkyen ohh i dont knew that ..
 
@NullPointer try it out ^_^
 
@Darkyen, infinite is a strong word :P
 
6:51 AM
I have a great idea for a video game. It can be 2d. But it will be a game of black hat hackers. A man or woman depending on who is playing can go around the world and complete missions gathering as much money as she can.
 
@phenomnomnominal do u have anything comparable ?
 
How about just 'incredibly' :P
 
okay pull request accepted , merged
 
It will be like fallout meets Uplink
 
6:52 AM
@user1867842, good, now go make it
 
@phenomnomnominal i started with C++ tried nearly most "known" languages
ended up on javascript -> Node.js
and i was like wtf i can reuse my first love :3
 
I hope that's where we all end up :)
 
How long do you think it would take me to make a game like that, roughly speaking?@phenomnomnominal
 
though there is one reason C++ and JavaScript meet so beautifully :P @phenomnomnominal guess what is that ?
 
@user1867842, depends on a lot of things.
@Darkyen, what's that my friend?
 
6:53 AM
@Darkyen ill defiantly learn this
c++ is always my first love ..
 
@phenomnomnominal C++ is a very low level language and JavaScript is fairly high
so the fusion is best of both worlds :D
 
Can't disagree with you on that!
 
Do project managers get to come up with ideas for applications and stuff ??
 
@user1867842, 'project manager' is the vaguest title ever
 
@Darkyen but c++ require high level of knowledge
 
6:55 AM
Oh. I want to make a 3d hacker game like GTA
 
@NullPointer indeed but well it worths it ;-)
 
@user1867842, okay then, probably about 10 years for you to get to the level to make it, and built it by yourself
 
u can always use C++ with low level knowledge ur code just will be horrible as hell
 
@user1867842 lol
 
@user1867842 good luck with it :D
 
6:56 AM
what if I am using c# and xna ?@phenomnomnominal
 
@user1867842 XNA and C# will give u a lot of flexibility
 
How is your vector/matrix math?
Do you know what a Quaternion is? @user1867842
 
and a good bounce with graphics
 
Yes I know@Darkyen
 
use a cli js interpreter or an embedded javascript engine as universal hacker language
 
6:57 AM
you guys are damn smart in JS
 
I am pretty good at math. Understand the vectors for 2d games in xna. and Matrix to translate , rotate , transform a Vector3D@phenomnomnominal
 
@user1867842 It will still take you a long time
 
@user1867842 than change your real name and avatar
 
Yes I know.@phenomnomnominal
What do you mean ?@NullPointer
Yes I do . And I have the key board inputs good to.
 
@user1867842 try change display name user1867842 to youwant
and avatar
 
7:03 AM
Okay. What should I change my avatar to ?
I'm just going to post a picture
 
7:15 AM
Who wants to write a README for me :)
 
@NullPointer see raynos someday
we are just low level dudes
 
alrighty, profanity filter is now configurable
adds a "profanity filter" button next to send/upload to the right of the input textarea
opens a config panel
 
7:45 AM
Alright got my avatar up
Hold on/
How long does it take to change you're avatar ?
 
No idea
 
Man I'm short. I'm like 5'6
No I'm like 5'7, 5'8
 
there it goes
it updated
 
 
2 hours later…
9:47 AM
0
Q: How to extend WordPress internal JavaScript function with parameters?

AlvinHere is the function I want to extend: wp-includes/js/media-views.js: uploading: function( attachment ) { var content = this.frame.content; // If the uploader was selected, navigate to the browser. if ( 'upload' === content.mode() ) this.frame.content.mode('browse'); // If we're in a work...

 
10:21 AM
Hi
I was hoping if anyone could give advice on how to manage javascript code. How does one modularize or separate different parts of one's code?
 
10:46 AM
@stormwild Split it into files with a specific function or something?
!!/google Separation of Concerns
I generally create IIFE (immediately invoke function expressions) in each file to give it its own scope, and let it export certain things
2
 
11:09 AM
hello
anyone alive ?
test
jsbin.com/ibilec/18/edit why does the rects array stays empty ?
 
11:34 AM
@jurka hello, you log it before pushing
 
well i tried simply pushing 1 in array that does not also work
 
12:18 PM
@AmaanCheval Thanks Amaan
 
Hi. regarding jQuery UI , when I paste a control in a page it has very big fonts etc. is there any documentation to which element should I apply the style ?
(instead of looking through the web) ?
 
12:38 PM
Sounds like you forgot to add the jQuery UI CSS
 
No I did add it .
for example :
  `div.ui-datepicker{
 font-size:10px;
}`
 
0
Q: Can not modify inside prototype array

jurkaWell the problem is with the Game's instance of rects: [], which should be array of objects Rect. When i access the rects property inside Game gives undefined. http://jsbin.com/ibilec/34/edit (function(window, document, console) { 'use strict'; function Rect() { this.x = 0; this.y ...

 
I just hate those fine class tunings...( and have to FIND them)(stackoverflow.com/questions/659588/…)
 
1:19 PM
Sweet, done!
 
Eww, .coffee
Reminds me that I haven't had coffee in a while
 
Go have coffee
 
Yeah
phenomnomnominal.github.com/workerbench still doesn't work for me
404s
!!/choose "Half-Life 2" "Awesomenauts" "Super Meat Boy"
Oh, fuck it. Awesomenauts it is
Oh, the bot isn't even in the room
 
Clear cache?
 
Ah, right
How does it find the optimum number of workers?
 
1:26 PM
It runs an empty while loop in 1 Worker for 1000ms, then 2 Worker for 500ms, then 3 for 333.3ms, then 4 for 250ms and so on until there are more threads running than it can handle and one of the Workers has to wait to execute. When the overall time increases for two tests in a row, it stops trying anymore, then returns the number than had the smallest execution time.
 
Oooooh, smart
 
Yeah I was originally doing it by executing a sum for 1 to like 10mill in parallel, but that meant the overall test time was really fucking slow on mobile? This way means no matter the platform, the tests take roughly the same amount of time.
 
hey all! Could i have some advice? any ideas why this is screwing up in IE? c9.io/rusticblonde/sf/workspace/index.html
 
1:46 PM
@KirstyHarris :P
which IE ?
 
i think its one of the newest ones.... its proper screwing up @Darkyen lol.... love the image :) made me chuckle
 
@KirstyHarris position:relative; maybe
 
what position relative? its as if all the font calls aint working as well... how does it look for you?
 
@KirstyHarris got a screenshot of how it's screwed up on IE?
 
as in like a screenshot of how it looks oh yours
 
1:52 PM
@KirstyHarris try adding normalize.css
 
posted on January 13, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Only 40 hours left in James and Marque's kickstarter!

 
try adding what lol!...
 
and pie.css
they are two
things that
lets u use CSS 3 in IE
 
how much will i have to change tho? ive never had this problem before, not sure what out of my CSS is CSS3 lol
 
@KirstyHarris Do you have any animations in the CSS?
 
1:55 PM
no
hence why i cant understand why its messing up
 
How is it messed up?
 
@KirstyHarris border-radius
 
yea... i have that...
 
box-shadow
 
hmmm
yep hahaha!
 
1:55 PM
@AmaanCheval whole positioning
 
Still, shouldn't be too messed up
 
ok point taken i have alot of that :)
its massively messed up thats the thing the whole positioning is off
its not centered etc
 
but really -- we can't tell you what's messed up since we don't have IE to test it on. Having a screenshot of it would help us.
 
ok :) i will get one, thanks guys :)
 
1:57 PM
 
yh thats what it looks like lol
 
People are pretty mean, aren't they?
Classical conditioning a kid against quacks
 

« first day (820 days earlier)      last day (4143 days later) »