« first day (540 days earlier)      last day (4633 days later) » 

16:00
@Dave -------- ???????????????????????????????????????????????????????
SHARE YER FIDDLE
@Dave your code wont :p
user1385191
tests 1 and 2 err in IE 6
it does on my website lol
just not in jsfiddle
@OmeidHerat XCode.
and it sucks big time.
16:01
@MattMcDonald why filter?
#conent
i like how you saved a character there
@vzwick that as a result of NIH Syndrome ;)
okay i see
if they dont match it shows the progress
And then just set var hp as the current value?
16:02
if they do it dont show it cos it cancels out the inner div
yeh hp would be % its done so far
uh "perc" i meant not hp
mine is related to a player's hp
lol
@Dave
so i have to math round encase the number creates a decimal place
document.getElementById('conent').innerHTML = perc + "%";
... AFTER which you try to do …
yes i already said :P
user1385191
16:04
@Raynos es5
user1385191
wow; Opera 5-9 don't even recognize the doctype node
perc = document.getElementById('progressbar').innerHTML;
That would not work?
@OmeidHerat heh. yeah.
@HarryBeasant that wont change the width of the div no
Okay, so whats the best way of getting the value from the id=progressbar, into the function?
16:06
@HarryBeasant jsfiddle.net/BhHNp/20 change the value of "hp" variable
this.id?
the value as in its width ?
user1385191
safari 3.1 doesn't either
user1385191
interesting
16:07
I need the bar to expand (width) depending on the % returned
well if its a progress bar itll always start at 0 then "perc" is the % its progress'd so u use the perc variable
user1385191
Safari 3.1 came out in 2008 and does a worse job on that test than IE 6, which came out in 2001
perc is just short for percentage :P
i see
but will the size of the bar change?
the inner green bar yes
if u want it to change the outer bar change the ('progress')
16:09
@MattMcDonald I mean why test filter rather then slice
to the id of the other div
user1385191
es5
user1385191
testing es5 support
oh ok
Okay sure, the main thing i need to do is actually get the value into the function though, thats been my main problem
user1385191
16:09
I wrap each call in Utils.host.isObject for a fair fight
variable "perc" holds the value
if u set it globally u can use it when ever u need it
if u wana pass it to a function just do function_name(perc);
@Abhishek Your question should receive a bit more attention now.
I see, but getting it from here <div id="progressbar">&nbsp;</div>
Is my problem
document.getElementById('progressbar').innerHTML = perc;
Something like that work?
@Raynos okay, I can feel you now
@HarryBeasant that will output the value of perc as text
do u mean u want to assign a width of a div to a variable?
16:12
i need to assign the inner.html value of this; <div id="progressbar">&nbsp;</div>
to a variable
The upload progress script posts the % data to <div id="progressbar">&nbsp;</div>
like this; document.getElementById('progressbar').innerHTML = iPercentComplete.toString();
var mydiv = document.getElementById("progressbar");
var curr_width = mydiv.style.width;
that will get its width and assign that number to curr_width
document.getElementById('conent').innerHTML = perc + "%"; <<<
You want to replace the inner Div [ i.e. progressbar ]
I totally feel like posting some random stuff here with perc, progressbar and innerHTML in it and seeing where this goes :D
lol
document.getElementById('progressbar').innerHTML = pCnt + "%";
16:16
Yeah, just like that.
yes assuming pCnt is the variable
altho i named it perc
ignored O/
@MattMcDonald safari 5.5 came in idk when but it does zillion b8r job then the futuristic IE 10
bare in mind if the progress bar is 0% width.. u won't see that value appear
16:17
and @vzwick i know :-(
So that will get the content of progressbar
As it updates aswell
@Abhishek chrome is still better than all of them
Chromium!
@Dave -_-
document.getElementById('progressbar').innerHTML = pCnt + "%"; is not "getting " the content its placing content
16:19
dont start a flame bait among chrome vs firefox pls
(Except for the fact that they've fucked up the inspector in recent nightlies)
Damn it, might have been me explaining it wrong
@Abhishek i don't need to :P just look at canvas benchmarks
@Dave grin
From the start, i've wanted to GET the data from here <div id="progressbar">&nbsp;</div>
16:19
mwhahahahahhahahahahahahahahahahha
I have an external script posting the data to it
u wanna talk benchmark eh ?
see if : document.getElementById('progressbar') actually returning something. I guess you will get null here. Even then just try.
i shall teach u a lesson
user1385191
@Abhishek the point was made to address IE 6
16:20
*starts firefox aurora *
oh :-)
@MattMcDonald wait u are a flash pro too
is there a possiblity to encode an mp3 using flash ?
[if so time to learn flash]
im not sure but isn't a string in a div considered an array of words?
@Dave here is the script to find the progress = pastebin.com/jCJmSWmu
user1385191
I think you have to use ByteArray for that
@Dave array of chars
user1385191
I never really delved into that class aside from deep object cloning
16:21
Hmm
@HarryBeasant in which case u have to loop all the chars in the div content to assign it to a variable
Line 138 is the value being returned to <div id="progressbar">&nbsp;</div>
I can understand parts of the liblame but js got me on a blockhole
lolz, it is content not conent !!!
i cant get output buffer :-<
16:22
change document.getElementById('content').innerHTML = perc + "%"; to
flash supports it i am hell sure
speaking of flash ...
*flashes boobies
@Dave Your script working ?
16:23
@RakeshJuyal he is not using such a div ;)
mwahah see that :3
firefox beats all browsers by miles .. son miles.. :3
what's the current state of webcam input to canvas again?
actually mine won but i got hardware support on for chrome :P
Stream API ?
Opera 12 supports
fairly
havent checked chrome nightlies
@HarryBeasant so this :
document.getElementById('progressbar').innerHTML = iPercentComplete.toString();
16:24
and dave, thats the client side - pastebin.com/4xBWM72J
try navigator.webkitGetUserMedia( );
is not assigning the innerHTML to anything
Yes correct
And that works, it passes and updates the progress bar div perfectly fine with updated values
yeh but u want the inner html to be retrieved to a js variable ?
which is the reverse right?
Yes
I somehow need to get the % value into the function, to update the bar
as the value changes
16:26
but that value is already in a variable: iPercentComplete
so just pass that variable?
so i dont know if i can do that straight from script.js, the first thing i pasted to you or from the div
if the value is in iPercentComplete just use that :P
But will that work on the page
If its set in the script.js
16:27
pulls chromium nightly
it should do as long as the scope of the variable is correct it can be used when u need it
or pass it through functions
can i like document.write(iPercentComplete)
to check
as i upload it
@HarryBeasant console.log()
or alert
console.log(iPercentComplete)
16:29
;
or just console.log
console.log(iPercentComplete);
then look in console to see it
okay sure
sec
the output should be an integer
Uncaught ReferenceError: iPercentComplete is not defined
16:30
@Abhishek no support in WebKit 113522. Meh.
put the console log after line 134 and before 135
… on 134.5, that is.
ah wait, am i doing this on the main page or script.js
u set iPercentComplete in function named uploadProgress any thing outside that function the variable won't be set cos its lost it's scope
pastebin.com/jCJmSWmu after line 134
thats where u put console log
u might want to globally set the variable so u can access it when u need it
yeah
spam of errors
well
pCnt is not defined
16:34
thats because thats a v.bad mispell of "iPercentComplete"
which is how its spelt :P
lo
<script>


	$(function() {

	var pGress = setInterval(function() {
		var pVal = $('#progressbar').progressbar('option', 'value');
		document.getElementById('progressbar').innerHTML = pCnt + "%";
		if (pCnt > 100) {
			clearInterval(pGress);
		} else {
			$('#progressbar').progressbar({value: pCnt});
		}
	},10);
});

	</script>
errors from there tho
So i should globally define in script.js
So i can access it in the index.php file
not sure but why not just assign the innerHTML at the same time as u alter the progress bar width ?
aka put document.getElementById('progressbar').innerHTML = pCnt + "%";
in the function upload progress
and change pCnt to iPercentComplete
that way each time the function calculates the new % itll also output the string 50% or w.e the value is at the same time
Gah, i'm confused lol
Now uses iframe hack to upload the image.
I so need to clean this up.... add xhr2 stuff... add a gallery option for the images and/or pastes and a 'private' flag for both.
I have all the backend built
Its just the progress bar
16:42
Greetings @rlemon
Salutations
why u no file drag and drop api ?
So anyway Dave
> ... add xhr2 stuff
16:43
I want to try and stick with jQueryUI
that means fileAPI ?
woot! epic :D
But its still the situation of trying to get the progress % data into the function so that the bar can update itself
I will link you to the page =L
On 1 last question
@Abhishek first step is always make the page function on your bare minimum. meaning no js.
this is le regarding file system / file api
is there any method to search for say .mp3 in all the system ?
As you see, on here, i have my current one and then when you click upload, you will see a number count up in the left hand bottom corner
thats the progressbar div
@Abhishek I don't think so. I think the best you can do is filter by type.
but the OP still has to browse the dirs.
okay so how to search the whole filesystem ?
afaik
16:46
and aint that epicly epicly security threat ?
like I said, unless you're writing a desktop app... I don't think you can.
for security reasons.
:-) okay
for my audio software
i need a method to keep track of audio files
hum
i figured. lol, have them register 'folders'
that are played [ and it'd be better if somehow i can allow it to make a media directory ]
16:47
@Dave see the website?
caniuse.com is blatantly lying about opera12 supporting getUserMedia
lolz
@vzwick what assholes
@vzwick its not
@Abhishek it is.
op12 installed.
16:48
me too (x
beta ??
sozzy rleamon (XD)
>>> "getUserMedia" in navigator
false
@Abhishek dafuq?
"Opera Next" === beta?
@rlemon tested ur image loader
eminem album art
with
@Abhishek How dare you upload images to my publicly available free image host. you bastards
16:51
lolz
:'( I am sorry
any way to remove ?
hum, hum …
let's spread this link as far as we can!
i'm posting it to my fb and my twitter now :p
''My new favourite image host: pi.rlemon.com''
let's see how quickly you get bought by flickr :D
@rlemon nice work on snake.js
/* 30 mins later */
@rlemon nice root password mate :-)
[kidding]
you might want to consider disabling the key opposing the direction of current movement.
16:54
what do you mean?
@vzwick no way, makes it more challenging
old school snake is too easy
-1
old school snake atleast let me win T.T
@Abhishek dude.... look at your face...
lolz
kidding bro (XD)
just joking around >_< yew pissed on me ?
@rlemon
?
@vzwick he might not disable that
@Abhishek lol all good
17:00
but he surely
neeeds a .preventDefault(); on key
btw i m really worried if i offended rleamon :(
kittens!
well, not so kittens
loading
aww cute :D
@Abhishek you could only offend me by doing what HarryBeasant does
lol
Time to share what nearly killed me earlier today
17:07
using rleamons pie
user1385191
if any of you care, I'll be pushing future tests there
Oh, btw ... what do you guys think of zepto?
And, while we're at it, of underscore?
bbl
user1385191
lol prototype.js still has 2000+ followers on github
user1385191
17:16
must be sock puppets
maybe they're still waiting for it to become usable?
user1385191
ahahahahaha
i like line 15 particularily
user1385191
opening that particular page almost crashes Opera
user1385191
17:20
@Raynos I don't know how you can call my code ugly when you juxtapose it with the source for this, _ or $
user1385191
  _.sortBy = function(obj, val, context) {
    var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
    return _.pluck(_.map(obj, function(value, index, list) {
      return {
        value : value,
        criteria : iterator.call(context, value, index, list)
      };
    }).sort(function(left, right) {
      var a = left.criteria, b = right.criteria;
      if (a === void 0) return 1;
      if (b === void 0) return -1;
      return a < b ? -1 : a > b ? 1 : 0;
    }), 'value');
user1385191
(from _)
@MattMcDonald ...
"How can you say a tomato isn't a fruit when you compare it to bricks, cars and ballons which are clearly not fruit"
@MattMcDonald two negatives do not make a positive
user1385191
what parts do you consider "ugly"?
user1385191
the extra tab for line continuations on variables?
user1385191
17:25
the public method comments?
the whitespace everywhere
@MattMcDonald care to post a link to the thread?
@MattMcDonald give my any method and ill fix the style
@MattMcDonald I would highly appreciate if you document what of your JavaScript tests pass in what browsers
What the hell
why you flag ;_:
Noobs be noobin
17:40
drag and drop mp3 files :-)
cool
toooo much left on it though :-[
wanna halp?
i wrote this for someone, im sharing it here too
gist: 2338725, 2012-04-08 17:48:16Z
// returns the first defined argument, which is useful for cleanly
// setting values with multiple potential defaults
function defined () {
  Array.prototype.slice.call(arguments).reverse().forEach(function (arg) {
    if (typeof arg !== 'undefined') 
      retval = arg
  })
  return retval
}

var baz = false

// example
function example (options) {
  options = defined(options, {})
  var foo = defined(options.foo, 'foo-default-value')
    , bar = defined(options.bar, baz, 'bar-default-value')
  console.log(options, foo, bar)
}
example({ foo: false })

// typical pseudo-equivalent, which merely tests for falsy values
function badIdea (options) {
  options = options || {}
  var foo = options.foo || 'foo-default-value'
    , bar = options.bar || baz || 'bar-default-value'
  console.log(options, foo, bar)
}
badIdea({ foo: false })

// actual equivalent, which is fairly verbose
function equivalent (options) {
  var foo
    , bar
  if (typeof options == 'undefined') {
    options = {}
  }
  if (typeof options.foo != 'undefined') {
    foo = options.foo
  }
  else {
    foo = 'foo-default-value'
  }
  if (typeof options.bar != 'undefined') {
    bar = options.bar
  }
  else if (typeof baz != 'undefined') {
    bar = baz
  }
  else {
    bar = 'bar-default-value'
  }
  console.log(options, foo, bar)
}
equivalent({ foo: false })
y u no use [] instead of Array.prototype?!
woops, fixed the global leaked retval
@FlorianMargaine no reason
any other comments? :D
17:57
yup
I don't get your .reverse().forEach when [0] is enough
unless I'm missing something

« first day (540 days earlier)      last day (4633 days later) »