« first day (537 days earlier)      last day (4404 days later) » 

12:02 AM
it's a little buggy
 
bind the mousemove to a function that has the original e.target in closure
` $('#container').bind('mousemove', make_split_horizontal(e.target));`
 
hold on, making it work then going through and cleaning up the horrible horrible code.
I don't use jQuery much so i'm having to read through the docs
 
now its using the e.target from mousemove
which changes all the time
you can also replace e.target with this
 
can you show me an example
sorry i'm not seeing how that will work
$('#container').bind('mousemove', make_split_horizontal(e.target));
 
wokring example
 
12:10 AM
ok I see....
 
nte
note
 
thank you i'll play with this
 
you need to make the mouseup on document
and just have it unbind mousemove.splitter
because you can mouseup anywhere
 
and then it will glitch out
 
12:11 AM
see i just started playing with optimizing those.
having never written anything like this i'm pretty much just winging it. trial and error you know.
 
/4 has both the bugs
 
lol
i'll look at /5
which is yours
 
6 is mine
it has the mouseup bug fixed
now you can mouseup anywhere
.splitter is event namespace which can be used to unbind the functions without needing to refer them
amazing feature of jquery :P
 
ok now there is bugs with the constraints and such
 
12:17 AM
I will have to get into the jQuery source code a bit more.. i mean, if i'm going to use it and all.
 
they will resize infinitely
instead of being constrained to the total original size
 
like this?
how do I avoid it 'grabbing' the document and trying to drag it off the page
 
if you resize the result container you can see the bug
 
well yea I need to fix the page resize. :P
 
dunno what you mean with the grabbing thing
 
12:21 AM
but it's to show you it's solvable.
umm lemmy see if I can get a screenie
bull, it wont let me
ok well you know when you click on an image and just drag your mouse around in chrome?
the image kinda is stuck to your cursor?
 
yea
cos the image has draggable = true
by default
which is some html5 hocus pocus
 
while resizing, if I do it too fast, i see an image of a document being dragged around and the mousemove event stops being picked up.
it's like the browser wants me to drop the document somewhere.
 
I see
 
screen capture on ubuntu only gives me the default mouse when it snaps. :<
 
every element in the iframe is non draggable though
 
12:26 AM
maybe it's a chrome thing. let me try ff
yea ff is fine
chrome might have issues with the iframe
first guess
 
btw why not use % based for the panels
 
lol
i just realized that
ffs
 
I wonder if we could make a bootstrap plugin here with certain css format for generic amount of splitters
if it was hard to find a good plugin for this
 
ohh it is
ok i've done something horribly wrong jsfiddle.net/rlemon/uvATV/12
 
what
seems to work fine for me
 
12:41 AM
resize
 
ohh
lol
 
i got the height/width mistake
/13
still bad
:P
 
width 196% xD
 
yea lol
 
dunno why you even need to resize them at all if you are using %
 
12:46 AM
jsfiddle.net/rlemon/uvATV/15 FFS Rob, stop drinking and coding!
no i don't
XD
jsfiddle.net/rlemon/uvATV/16 resize the pane to a small size... see the drop?
is this a rounding issue you think?
 
they still have px
 
they're wrapping
 
you are using px in the splitter still
so there is some panels with % and some with px
 
yea, the splitters them selves are px
if i perc. them they will grow and shrink with the page. i don't want that
 
yeah but panes
the colored areas
 
12:53 AM
they are all %
 
no some are px for me
 
look at the code.
 
and the functions set it to px
 
css is all %
/17
sorry
 
function make_vertical(elem) {
    return function(e) {
        var x = e.clientX, w = $('#container').width();
        x = (x > 64) ? (x > w - 12 - 64) ? w - 12 - 64 : x : 64;
        var parent = elem.parentNode;
        $(parent).children('.left.pane').css('width', x);
        $(parent).children('.right.pane').css('width', w - x - 12);
    };
}
overwrites with px
and same with horizontal of course
the % is overwritten by the inline style px
 
12:54 AM
damn. i forgot.
:P
 
anyways I am off to bed :)
 
thankyou again, you've been a great help
night
 
1:14 AM
roarrrrr
 
@Incognito meow
i mean... ahhem
ROAR
wanna take over for @Esailija and help me with my splitter? liddle.rlemon.com
 
"I'm sending complex emails with headers but using the thing designed to do that is overkill becase it's only used twice a week"
@rlemon Explain splitter.
I feel like I've been neglecting everyone here.
yuno change my mouse cursor with css to move ?
I'd personally avoid <a href="#">
 
it's place filler
 
Ah.
 
<a href="#"> === a link will go here, but I haven't programmed that yet.
 
1:18 AM
That makes sense.
 
ok so load the page, see the three panes... resize them. works yay
now resize the page
failship
 
tree?
 
user1385191
why not just use iframes with overflow: auto?
 
user1385191
scrollbars aren't scary
 
window.innerHeight
 
1:20 AM
@MattMcDonald I asked the peoples what they want... splitters is what they wants
 
user1385191
people gravitate towards big and flashy
 
user1385191
that's not new
 
I gravitate to command line
 
@Incognito explain?
 
@rlemon I think this is the cause of your resize bug.
 
1:21 AM
i gravitate towards the earth... dafuq is wrong with you guys...
 
user1385191
js for layout = ticking time bomb
 
you just hate everything don't you @MattMcDonald :P
 
user1385191
not at all
 
user1385191
I may seem like a contrarian, but I really am here to help
 
1:25 AM
lol i know, and where I do 100% agree... for the intended purposes of the site. I think a little js layout is acceptable.
 
contrarian...that's a lovely word.
 
user1385191
I still can't believe that CSS transitions and animations are drafts
 
user1385191
how long has it been since they were first hyped up?
 
@MattMcDonald what about HTML5
ready in 2023
 
user1385191
drafts as in they're not standardized
 
1:30 AM
2023: the year we make contact
 
user1385191
you can't even use their normal forms
 
user1385191
I'm not making the same declaration 5 times
 
@Incognito potatoes gonna potate
Did they even decide on html5's scale and radius?
 
The web is old news, man.
Gopher:// is going to make a comeback.
I'll be ready.
 
0
Q: JSmodule - a javascript object for stacking methods and hooks

PabloThe idea behind this project is to create a central starting and reusable point for all my javascript projects. This would allow me to create unlimited methods, plugins and keep all data encapsulated in a single namespace much like a JS framework. I wanted that by default all methods would be h...

 
1:32 AM
@Feeds in other words, a god object?
 
@rlemon (window.innerHeight - 41)/window.innerHeight * 100 + '%', logic is bad, not sure what to fix but I suspect it's your pixels mixed with percentages.
 
Also, you're doing abstraction wrong
 
i'm drunk... best I can do
 
(was @Feeds)
 
will wake up tomorrow and think ohh no
@Incognito i already see the lunacy in that
wait
nvm
 
1:38 AM
Every time I try to play stack overflow someone gets all offended and freaks out because I tell them they're headed down the wrong path.
What else can I play?
@rlemon Oh sweet, I should find my scotch.
 
user1385191
I'm playing mind-melting with Donald Knuth
 
@MattMcDonald uhhhhhhhhhhhhhhh
I'm not nearly drunk enough to know what this means.
 
@Incognito games are fun
0
Q: HTML email formatting

rlemoncommented: @Paul have you considered using a library to solve this?

 
user1385191
I'm still on about page 20 of The Art of Computer Programming
 
user1385191
the math…
 
1:43 AM
aww boooo
@Incognito someone killed it all
ohh well... time to go make some KD
 
Mods are on it, I flagged it.
The kid's a total egomaniac.
"libraries are overkill because this only runs once a week"
how absurd.
 
lolwut?
 
Sending emails.
Why use a library? Just try and hack together headers as strings and wonder why it's so hard to do.
 
user1385191
why isn't he using header?
 
I'm sure he won't be exposed to any well known exploits like adding \n to a FROM header that lets you hijack the mail server.
 
1:46 AM
And his excuse isn't "because I want to know the logic", but "because it only runs once a week"?
 
He is. He's writing his own headers as raw text.
For emails.
Yes @Zirak, using a library is only justifiable when the frequency of use is high.
 
Condoms are way too much, we only have sex once a month!
 
user1385191
can using a built-in method really be considered "a library"?
 
@Zirak That's what I said, to her. Unfortunately. I wish.
@MattMcDonald mail() has a bunch of issues. I'd avoid it.
It's basically an alias for exec('sendmai {$whatever}' )
It's not that cut-and-dry, but that's the jist of it.
 
user1385191
no, I meant header
 
1:50 AM
@MattMcDonald Can you use header() in some way for smtp?
 
user1385191
you'll know better than me
 
user1385191
I'm the one who's too scared to apply for a PHP job
 
user1385191
$form.find("input[name=dumb]");
 
user1385191
ugh
 
user1385191
form.elements.dumb
 
gist: 2307163, 2012-04-05 01:22:23Z
function createEvent(type, bubbles, cancelable) {
    var ev
    bubbles = bubbles || true
    cancelable = cancelable || true
    if (document.createEvent) {
        ev = document.createEvent("Event")
        ev.initEvent(type, bubbles, cancelable)               
    } else if (document.createEventObject) {
        ev = document.createEventObject()
    } else {
        ev = {}    
    }
    return ev
}

function dispatchEvent(et, event) {
    var ev
    if (typeof event !== "string") {
        ev = event
    } else if (event) {
        ev = createEvent(event)
    }

    if (et.dispatchEvent) {
        return et.dispatchEvent(ev)
    } else if (et.fireEvent) {
        return et.fireEvent('on' + type, ev)
    } else if (typeof et["on" + type] === "function") {
        return et["on" + type](ev)
    }
    return new Error("Cannot dispatch event")
}

function addEventListener(et, type, callback, capture) {
    if (et.addEventListener) {
        et.addEventListener(type, callback, capture || false)
    } else if (et.attachEvent) {
        et.attachEvent("on" + type, callback)
    } else if (typeof et["on" + type] !== "undefined") {
        et["on" + click] = callback
    }
}

function removeEventListener(et, type, callback, capture) {
    if (et.removeEventListener) {
        et.removeEventListener(type, callback, capture || false)
    } else if (et.detachEvent) {
        et.detachEvent("on" + type, callback)
    } else if (et["on" + type] === callback) {
        et["on" + type] = null
    }
}
 
@Raynos Did you figure out how to cleanly dispatch events?
@MattMcDonald Want to work in Hamilton ontario?
 
@Incognito it's more of a "I think this is a clean way to handle Events cross browser, what am I missing?
 
user1385191
not really
 
1:54 AM
~50k/yr for a "we don't really know what we need a web dev for" position.
@Raynos The dispatcher is what I'm mostly concerned with. But that's because I've been trying to cleanly replay recorded events once upon a time.
 
user1385191
if I don't get a job by the start of week four this month, I'm back home with my parents.
 
user1385191
so even remote working isn't a great option
 
@Incognito we both know you can't re-use event objects
 
@Raynos Yeah, but I really want to.
 
@Incognito clone them
 
1:57 AM
That's the issue.
 
create a new event object with the same data
 
And I don't care enough to solve it.
You can't do it that easily.
Time and other stuff is in there.
 
user1385191
you use "on" + type three different times in one method, mixing quotations all the while
 
user1385191
that's begging for a variable
 
A created event and a captured event are the same object but totally different.
 
1:58 AM
@MattMcDonald meh, it's not really needed because it's in if paths
 
user1385191
how do you go from "on" + type to 'on' + type a few lines apart?
 
Hi all!
¿Somebody have a dropdown code?
 
@MattMcDonald because I dont pay attention
 
Link, tutorial (...)
 
user1385191
<select>
 
No select, something like twitter
 
Oh, of course.
Something like twitter.
=/
 
user1385191
an autocomplete?
 
My turn.
 
Explaining in details...
No
 
2:01 AM
I'm holding a number of fingers behind my head, guess how many.
 
user1385191
PI
 
Autocomplete no, its a dropdown menu
 
@MattMcDonald Winnar winnar chicken dinnar.
 
Like select, but with design
 
user1385191
> Visual user agents are not required to present a SELECT element as a list box; they may use any other mechanism, such as a drop-down menu.
 
user1385191
2:02 AM
your phrase "downdown menu" really isn't helping as you can see
 
Ok
Look
I need something like Boootstrp twitter
But without JQuery
 
@Tomirammstein just use bootstrap
trust me its good
 
Yes, its god, very good, but i can't use JQuery
 
ALL HAIL BOOTSTRAP
 
Ritual sacrifice! slaughters a virgin
 
i'll continue looking
 
@Tomirammstein y u no css?
 
@rlemon I prefer Javascript
 
user1385191
> Percentages: N/A
 
user1385191
2:12 AM
(CSS border-width)
 
user1385191
:(
 
helpful minds always welcome to comment :) stackoverflow.com/questions/10001681/…
 
oh crap, sleep. I forgot sleep. and showering.
 
user1385191
post the relevant html snippet
 
user1385191
so we can visualize what the document tree will look like
 
2:24 AM
k
 
@Incognito
found one!
 
Boot with a ruler?
Epic.
 
no
"dropdown bootstrap"
 
ohhhhhhhhhhhhhhhhhhhhhhhh
I still have no idea what that guy was asking for.
 
click profile
or panes
 
2:28 AM
dropdown = flat floating menu div?
 
yup
 
So what was the challenge with getting one?
That's not exactly unique code.
It's mostly css to be honest.
I'm waiting for my rep to roll in then I'm going to bed. Is this what I've become?
 
user1385191
I'm making a slideshow page with border-radius and box-shadow
 
user1385191
hipCred += 20;
 
added html structure code and snipplet of transition function
1
Q: Idea on content passing. Help needed

Brandon ClarkCore Question I need help coming up with a concept to achieve my goal. I am having a problem coming up with an idea to how I can navigate the DOM properly with the method I have chosen. The Goal You should know what I am doing first: I use ajax to call HTML content into a <section>...

 
2:48 AM
@incognito Are you kidding me?
@incognito jajaj
 
-3
Q: JQuery Avoid Null in URL?

user1287402I was just wondering if there's any way I can avoid parameter=null in jsp? Will there be any function that's similar to the Java's ? : operator for Jquery? Thanks.

wow
i mean, i have to answer it... but my god.
 
3:06 AM
rlemon - may need your help again on that object collision grid if can spare a moment
 
 
2 hours later…
4:37 AM
Oh yahoo, you make some excellently bloated shit.
 
Somebody on?
 
5:07 AM
0
Q: How to know which element was clicked

TomirammsteinI have this code: ( function() { var i, ii, e = Elements.Select('.drop'); for ( i = 0, ii = e.length; i < ii; i++ ) { e [ i ].onclick = function () { alert ( e [ i ].getAttribute('data-open') ); } } })(); What I do is that when clicking an element with the className 'dro...

 
0
Q: I need to create Vintage effect. Can anyone provide me algorithm to implement in canvas. No third party library usage?

Balraj SinghI need an algorithm for Vintage Effect, Cartoon Effect and effect like these to implement in Canvas. I don't want to use Third party library. Can anyone provide me with the algorithms using pixel manipulation?

 
5:53 AM
mornings
 
Morning.
 
6:17 AM
0
Q: Problem with javascript

Andres OrozcoWell i have a proble, and i made this test code to show you my problem. HTML Code --> http://i.stack.imgur.com/7qlZx.png Javascript Code --> http://i.stack.imgur.com/DYvuq.png What i want to do here in this example is to change the styles of the id. But for some reason it doesn't work the bad n...

 
6:34 AM
Printers are so mean ...
 
6:57 AM
does pccharge pro ring any bells here?
 
7:48 AM
hi guys
 
 
1 hour later…
9:40 AM
someone can help me to figure out my code. it's not worked in chrome $(document).ready(function() {
$("div.slideShow ul").after("<div class='controls'></div>").cycle({pager:"div.slideShow div.controls"});
$("div.slideShow div.desc h2").each(function(index){
$("div.slideShow div.controls a").eq(index).text($("div.slideShow div.desc h2").eq(index).text());
})
$('#slideshow #images').cycle({

fx: 'fade',

after: function() {

var imd = $("#slideshow #images img:visible").attr('id');

var id2 = parseInt(imd.charAt(imd.length - 1)) - 1;
 
first -> not working is a bad error-description
second -> what should the script do?
third -> are there any errors in the console?
 
$("#slideshow #images img:visible").attr('id'); imd.length is not worked because chrome doen't have load the image when my code run.
@GNi33 I have make some changes to make it work. I am not sure how same code are already work on somewhere else.if($("#slideshow #images img:visible").length != 0){
var imd = $("#slideshow #images img:visible").attr('id');
}
else{
var imd = $("#slideshow #images img:eq(0)").attr('id');
}
this is a sliding scripts.
and chrome not know imd.length
 
9:56 AM
0
Q: Login and redirect to user home page

Richnew to this web development stuff, but am getting there slowly. The problem I can't currently solve is when a user logs in. They arrive at the site (index.php) and enter username and password, which gets submitted via a Post form back to index.php - if there are incorrect details then they get an...

 
you can call the script on window.load
$(window).load(function(){
  //script goes here
});
so you can make sure that the images are already loaded when your script gets executed
 
thanks,but it will show two image at once. I already have write some patch to make it works. thanks you very much.
 
ok, yw
 
10:23 AM
This totally rocks.
once installed, a problem I was on since a few hours is magically solved >_<
 
10:35 AM
posted on April 05, 2012 by Thomas Fuchs

Don’t you just hate it when you find some great piece of code on GitHub and then you realize that somewhere at the end of the README the frightful acronym GPL is ruining your good mood? I propose to make it easier to find projects with a license you can live (and work) with, and [...]

 
debugging like a boss in vim /o/
 
sweet :)
 
seriously, it's a great script combined with xdebug
you're feeling like in VS debugger
 
10:51 AM
I almost broke my bones ...
Missed a stair and fell.
 
Ow. That hurts.
 
Yea, kinda.
 

« first day (537 days earlier)      last day (4404 days later) »