« first day (810 days earlier)      last day (4137 days later) » 

9:01 PM
@phenomnomnominal Anything else?
 
@Zirak alright, interesting
 
Thats about it I think
 
0
Q: Search for multi-byte pattern in Uint8Array

ThiefMasterI have a nodejs script where I'd like to parse MP3 frames. Those frames are easy to detect since each frame starts with the two bytes 0xff 0xfb. I'm using a Uint8Array to access the bytes of that file. Using [].indexOf.call(data, 0xff) I can easily search for a single byte but not for two bytes....

 
Find the 0xFF bytes, then look at the next one?
Oh, just read the rest of the question
 
Yeah, that would be the quick and dirty approach - but I'm sure there's some nicer way to do it
 
9:08 PM
Yeah
 
!!/refresh
!!/tell phenomnomnominal eval new ArrayBuffer(16)
 
@Zirak {"byteLength":16}
 
Make the whole thing into a binary string and look for 1111111111111011 :)
!!> Uint32Array.prototype
 
@phenomnomnominal "ReferenceError: Uint16Array is not defined"
 
probably @SOChatBot is using IE6! :P
 
9:13 PM
You didn't say anything about Uint16
 
Shit, I missed it
Sorry
 
@phenomnomnominal {"subarray":"function subarray() { [native code] }","set":"function set() { [native code] }","BYTES_PER_ELEMENT":4}
 
hey guys i need help for jqplot libary
 
Can anyone tell me why this code isn't working? jsfiddle.net/fK9t8 The default happens when I press submit (GET request, page refreshed).
 
!!/ tell mal2000b google jqplot docs
 
I have not found in docs
 
Before I commit Uint16Array, anything else?
 
Nah I think that's the lot
 
!!/refresh
!!> Uint16Array
 
@Zirak "function Uint16Array() { [native code] }"
 
9:22 PM
blows smoke off finger
catches on fire
 
!!> Uint16Array.prototype
 
@phenomnomnominal {"subarray":"function subarray() { [native code] }","set":"function set() { [native code] }","BYTES_PER_ELEMENT":2}
 
!!> extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super = parent.prototype; return child; }; __extends(Uint16Array, Array); Uint16Array.indexOf;
 
@phenomnomnominal "SyntaxError: Unexpected token <"
 
9:27 PM
To avoid the formatting stuff, do a multiline message (first line is your code, second is just some garbage).
 
Anyone? jsfiddle.net/fK9t8/2 I'm not getting any errors, it's checking out on JSHint. What am I missing?
 
@SomeKittens what your link shows to me is nothing in the HTML portion IE no form, it gives me a null error on addEventListener
 
Just added HTML
 
@SomeKittens Dude, you selected MooTools as the library.
 
and put everything onload
so your domcontentready is fubarred
 
9:30 PM
yeah...
 
@Loktar Do you have any experience with using spritesheets (with canvas) on iOS Safari?
 
nope
 
So you expect it to work fine posting to localhost?
@Zirak I left it at default. It's not supposed to run.
 
err DOMContentLoaded
 
Anyone with useful advice?
 
9:31 PM
:( using individual ids for inputs
 
@Loktar Well, if you ever do, here's a hint: don't do it! It just won't draw any slice of your spritesheet if your spritesheet is bigger than a certain size (haven't found what it is exactly yet)
 
weird
 
For the iPhone 5 2000x2000 for a spritesheet works, but 4096x4096 doesn't
 
@Zirak Link me to a better way and I'll do it
 
so theres a limit of canvas or image sizes then?
 
9:32 PM
Image size, I think
 
For now, that portion works. I just want it to POST
 
Canvas is only 640x960
For the iPod, a 2000x2000 spritesheet didn't work either
 
@SomeKittens Grab the containing form, form.inputName.value
Try pushing the preventDefault to before the ajax method call.
 
@Zirak Awesome, will fix.
 
^ does that work?
 
9:34 PM
@Zirak That fixed it
huh.
 
I've always put it at the end of the function and never had problems
 
not sure if its over 4096, its pretty large though
 
Seems to work
Not work perfectly, but it draws
 
weird
 
9:35 PM
I'll make a proper test case
 
yeah that takes an image strip, rotates it and adds it to the canvas
so it makes an in memory canvas for the sprite sheet
with all possible rotations
 
I've got something similar going
 
those zombies use noclip
 
so maybe its a specific image size
 
9:36 PM
hackers
 
@canon lol
 
I'm not making any canvases
 
yeah thats a super old demo
like 2009 or so idk
 
Just using drawImage with slicing
 
thats what I do as well, but its getting the data from the generated canvas
the 2nd link is what is generated in terms of a sprite sheet
what kind of error do you get?
 
9:37 PM
No errors at all!
It just doesn't draw anything
 
ah lame
 
brutal
 
Anyone with an iOS device, could you try that, please? It should draw part of a spritesheet once the page has finished loading
Works for me on Chrome for Android. No luck on iOS
 
What's the Opera prefix? o? So window.URL would be window.oURL (like window.webkitURL)?
 
Works fine in firefox too
 
9:45 PM
-o- I think?
 
@Zirak, think so
@AmaanCheval, that's for CSS
 
Yeah, I know. I just meant it was just o
 
ah balls, apparently Opera doesn't support URL yet.
 
hallo, could i ask a quick question about compiling classes that extend other class? I have my two classes in a package called advancedobjects. FirstClass compiles fine (of course, it doesn't extend anything), but SecondClass extends the first and the compiler is saying it cannot find FirstClass in it. I am trying to compile by going to the directory and typing javac advancedobjects/GooDrop.java, am I doing something wrong?
 
!!> "Java" === "JavaScript"
 
9:49 PM
@phenomnomnominal false
 
errrg
wutdoido?
 
@FredV "JavaScript", we're not the java room.
 
ok ok ok
adieu
 
Merry debugging
 
github.com/substack/node-binary - why does one create a library to unpack binary data but doesn't support bits instead of just bytes?
 
9:51 PM
room topic changed to JavaScript: *Not Java No, we will not write your code for you! Review the room rules: rlemon.github.com/so-chat-javascript-rules. Please format your code: Hit Ctrl+K [ecmascript-5] [javascript] [not-a-tag]*
 
@ThiefMaster, and it's called Binary haha
 
!!> /^java/i.test("JavaScript")
 
@canon false
@canon true
 
10:11 PM
0
Q: How to enter python code in a text editor and produce a result

Cody GuldnerI am starting to learn how to program using python. I have some good websites for learning how to code, and have gotten started already. I am using notepad++ and have downloaded the python script plugin. I am confused as to how to enter code into notepad, run it, and have it produce what you have...

...why do I go on the main site?
 
I truly hate library developers who can't even put A SINGLE DAMN COMPLETE EXAMPLE in their repository
especially if it's not self-explanatory
 
<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
0
A: Set correct css transform based on browser

Nealvar $img = $('img.zoom'); $img.css(BroTrans, 'scale(2) rotate(0.1deg)'); // ta da ? When you did it your way it was setting the BroTrans css field to that value, which is not what you wanted.

 
Amaan Cheval has made a change to the feeds posted into this room
 
Feel free to change it back. Added my blog in there. :P
 
yay, answered a question. phew, what hard work. Time to slack off for a few more months.
 
10:27 PM
0
Q: Why do websites require retyping the password upon user error in a registration form?

Ilya KoganMany times, when you fill out a registration form and miss a required field, the form reloads with all the fields filled out except for the password which you have to retype. I'm wondering if I should do the same. I really prefer not to, because as a user I'm very annoyed by the need to retype t...

 
m59
@Zirak @phenomnomnominal I thought of a pretty solution to that issue earlier
the variable that = the previous function
add the new methods to that
they get added in order, so the for loop works in order. Can you foresee any oddity that would break this?
 
Example?
 
m59
notice I even made the properties names very unordered
 
posted on November 26, 2012 by Amaan Cheval

How do you get better at game development? The answer is the same as how you get better at anything you do. Practice. So I've decided that I'm going to make games more often. I generally try to participate in every Browser-Based gaming competition I come across in order to get some practice. However, I rarely succeed in getting my entry in on time. This is usually because I start late

posted on January 03, 2013 by Amaan Cheval

So, I was working on a game that had all it's assets packed into a (relatively huge) spritesheet that was 4096x4096 in dimensions. Since my iPod (my only iOS device) was out of charge, I only tested it on my Android phone. It worked smoothly, and I went along happily. Later, when I finally got to see if it worked on iOS, it mysteriously didn't. Now, I knew that sometimes canceling touchmove&nb

 
I don't get the special thing here, but once more: Order in object-traversal is not guaranteed. Just because it work in your browser now doesn't mean it will tomorrow or next week.
The spec leaves the order unspecified, because objects are not ordered data collections.
If you want order, use an array or a linked-list.
Or a stack or queue or anything with an order
 
m59
10:34 PM
I see. That's a strange thing.
 
Objects are simply key=>value maps. The keys have no meaning. If you want them to have meaning, then create another data structure.
 
bits (size): a buffer of size bytes.
 
oh, that's just wrong...
 
thanks, idiotic developer, for making me waste time because you are too stupid to name your functions properly.
(hopefully he's not in here :p)
 
10:38 PM
i guess in the time it took me to try out those various modules i could have written my own :x
WHY does a class like this put the pointer at the END of the data passed to the constructor?!
 
I love the internet. Read about some album, found a torrent, 5 minutes later it's on.
But it does take some of the awesome away...I used to wait in line to buy these albums. Now I can actually decide whether it's good before buying. But it takes some of the anticipation.
 
That's why I buy vinyl
Free download of the album normally before release
then the waiting to hold it in your hand
 
@phenomnomnominal Hipster.
 
Why did the hipster burn their tongue?
 
Torrents.. great way to get in trouble here. Pretty much nobody still uses them unless he knows what he's doing regarding anonymity (VPS in eastern europe etc)
 
10:51 PM
@phenomnomnominal They drank their coffee before it was cool
 
Damn straight
 
My gramophone borked some time ago
 
@ThiefMaster "here" being EU?
 
Sad, sad :(
 
germany
 
10:52 PM
Ah, ok
 
An Abmahnung (a written warning in German) is a formal request by one person to another person to forthwith stop a certain behaviour. If this formal request is made by an attorney, then it is a cease-and-desist letter (but not a cease-and-desist order, which is called einstweilige Verfügung in German law). It is used much more between private parties than a consent decree is in the United States, since German law permits a wide range of parties to file suit to bring an end to an observed wrong done to a third party, whereas in the United States the requirements for a party's standing to s...
It's basically a money printer for dubious lawyers.
 
Yeah they tightened up the laws here in NZ about torrenting to try to counter the whole piracy thing
the law is too specific though, you have to be simultaneously uploading and downloading etc
 
I have a question about .hide()
its not really javascript, but I couldn't find the jQuery channel.
is that ok?
 
m59
yes
@TristanvanBokkem ask away
 
Ok, thank you. Well lets assume I have a function which paginates my table into pages by .hide() every tr that has more length then the value I gave it.
so if I have a 8 row table and the value to show is 2, I would have 4 pages where page 0 is visible and the other 3 are not, untill I click the page.
 
10:57 PM
You know what they say about assuming...
 
... u tell me :)
 
It makes an ass... out of you, and me.
 
It goes great with fish pate
 
@phenomnomnominal, lol that is bad.
or rather, badass
 
so so so bad
 
10:58 PM
Anyway..
Now I want to filter my table rows
if I use the same .hide() its messing up my pagination, as they are already hidden for it.
Is there a way to work around it?
 
m59
@TristanvanBokkem I feel like you skipped some important detail
 
what is best way to create a link within a page to send the user to their mail client?
 
m59
@TristanvanBokkem can we see the code?
 
!!/ tell thecoalman google mailto:
 
11:02 PM
I have tried: var win = window.open("mailto:?subject=blah", "emailWindow");
note: I dont want to populate the to since the user must
but I find that method is inconsistent across browsers, specifically mobile
 
@m59 Its hard to explain without the actual code. I know. But I feel like I am abusing your knowledge already as this is my 3rd question today on SO :( But I am having a hard time understanding JS/jQuery..
 
m59
lol, if only you knew how much I had to ask earlier. It's all good.
 
Do you want me to post it here? On in a question
 
11:06 PM
forgot to mention, I cannot simply create an anchor tag as the subject of the email is populated via server call. Long story short, it must be done fully through JS
 
@m59 Code snippets: pastebin.com/YLXKLyWj
As my table get dynamically filled. I could not paste it. But its there.
@m59 As you can see. The pagination function does a $table.find('tbody tr').hide() and then a slice() for each page. Which works nicely. Now when I want to filter the table. Its searching for the value of the 7th td and if it does not match it will hide the tr. Which works as well. But then it needs to update the pagination (because the filtering gives less items) and then it brakes.
 
@thecoalman If only there was some sort of API in js to manipulate elements or create them...
 
m59
@TristanvanBokkem There's a lot for me to take in at the moment. It sounds like something similar I've done. I dealt with it by adding in another class that would distinguish each set of items.
 
@m59 Hmm, yeah I thought about that idea. Might work..
 
m59
@TristanvanBokkem I guess another way of putting that is that you can make a system to add/remove classes from things that need to be hidden or shown so that you aren't trying to hide or show things that something else needs to deal with...or something like that lol.
 
11:20 PM
@m59 This is getting above my head I'm afraid :(
 
m59
just a sev
sec*
 
@Zirak DOM manipulation, ie creating an anchor tag, setting the href attribute to what I want then simlulating the click) is a very long-winded solution to my problem and is the last resort.
 
Soooo long winded
Like 4 lines of code
Considered a felony in some countries
 
given that it can be achieved in one line as I showed earlier, yes 4 lines is long-wonded
 
@m59 There are much better pastebins. Gist and pretty much every pastebin that is based on lodgeit for example.
 
m59
11:22 PM
@TristanvanBokkem I don't see what action updates the pagination..seems to be line 3? What does the user do to make that happen?
@ThiefMaster I know, but I like pastebin, for no good reason at all. I just do.
 
@m59 No, line 59.
 
@thecoalman Except your one-line solution (1)doesn't work, (2)is an annoying popup, (3)is an annoying popup
 
if the instancePerPage is changed (another select option) it will trigger the pagination function and resetting the numPerPage value of the selected option of #instancePerPage selector
 
m59
@TristanvanBokkem ah I see now. I wasn't sure what was being "changed" and how. Ok...
Now, I need to fully grasp what is breaking.
 
Want me to explain?
 
m59
11:27 PM
Sure.
 
Jabbascript
 
@m59 Ok. So, the pagination works by setting the numPerPage and then hide and slice the table into mutiple 'pages'.
The problem is, when I want to filter the table for a given value is search every row td for that value and if is not matched it will hide. Which does seem to work as well with my code.
But when it filters the rows become less so the pagination should be updated as well
but that goes wrong due to rows being hidden by filtering and pagination
so the paginated pages amount is wrong against the actual rows visible
make sense?
 
m59
I think so.
So, you have stuff hidden that shouldnt be?
 
No not really, I have stuff hidden where my pagination thinks it is not
 
Holy shit. I thought they'd block SSH on a plane. Guess not.
3
 
11:33 PM
@RyanKinal Can you SSH INTO the plane?
 
m59
You wrote all of this?
 
Why would they block it.. it's probably just a pretty normal satellite internet connection
 
@m59 Negative. I am just learning and use google a lot.
 
SSHing into it would be fun indeed! But I guess with all those strict regulations they have those systems separated pretty well from the avionics...
 
m59
@TristanvanBokkem I see. Really, what needs to be done is probably way easier than anything your code already does. Check out line 45. I think that is along the write lines...
Do you understand exactly what those lines are doing?
45 and 49 are dealing with classes. My head hurts too much to figure out why and what that accomplishes.
 
11:38 PM
Ah, those are to activate or disable the link
as the pagination page you are on should not be active
you're already there
 
This looks interesting. chopapp.com
Humiliating "engineers" redefined. :P
 
0
Q: Uint8Array indexOf method that allows to search for byte sequences

ThiefMasterUint8Array.prototype.indexOfMulti = function(searchElements, fromIndex) { fromIndex = fromIndex || 0; var index = Array.prototype.indexOf.call(this, searchElements[0], fromIndex); if(searchElements.length === 1 || index === -1) { // Not found or no other elements to check ...

 
m59
when the pagination thinks the stuff isn't hidden, what happens?
 
I wil have ie 3 pages but 2 are empty, no rows in the table
 
m59
that lost me lol.
can I see that page?
 
11:44 PM
It is not online :( local mamp setup
 
@ThiefMaster Tim Horton's blocks SSH. I figured somebody like Delta might as well.
 
m59
you have skype?
 
m59
m59peacemaker
 
m59
11:46 PM
no mic?
 
The wifi kinda sucks, though. I'm not getting chat updates.
 
It must suck divorcing a divorce-lawer
2
Ironic as well
 
hello everyone
 
11:59 PM
hello specific person
 

« first day (810 days earlier)      last day (4137 days later) »