« first day (28 days earlier)      last day (20 days later) » 

4:49 PM
Argh, this code is taking me almost 3 times as long as it should be
I didn't expect a zoom feature to be nearly this difficult
:-(
 
@TheUnhandledException expectations usually generate frustrations... :P
 
@Cawas Yes. As does pressure from others :-)
I'm trying to build a feature that will zoom our webapp in 2x or 1.5x. Should be simple, just multiply all CSS measurements by the zoom factor. But in practice it's... not that simple.
 
@TheUnhandledException adding pressure is just a barrier to maintaining peace. related, but not samething. if it doesnt come from within it's not to blame. [/toophilosophical]
 
why multiply all CSS instead of implementing a new one on the top?
though I never done either.
 
4:59 PM
@Cawas It's a dynamic zoom
So the client can change it using a UI
 
the client is already able to do so using the browser, that's why I figure an outer layer of CSS should do the work.
 
It's a bit more complicated than that :-)
 
ok :P
 
@Cawas It's for an eCommerce system. The client sets the zoom, then the website visitors see it at that zoom level
so for small products the website owner can say, "show this product at 200% or 150%" or whatever
 
@TheUnhandledException maybe something like the following? (move mouse over the picture after it loads)
 
5:04 PM
@Cawas It's a bit more complicated than that :-) :-)
 
@TheUnhandledException figured. :P
 
It's a whole web app for customizing sed products. Has multiple flash apps inside it, photos, DHTML, UI elements, etc :-)
Not out of beta yet, so I can't share a link
 
@TheUnhandledException given that context, I'd never expect it to be simple! :o
 
@Cawas Yeah, that was my fatal error :-)
I'm seeing my issue though. I need to double CSS padding and margins
Shouldn't be too difficult... :-)
Headed to lunch... BBL!
 
5:22 PM
@TheUnhandledException "double CSS padding and margins" o_O - that sounds like a small fraction of how complicated this whole thing became!
 
 
1 hour later…
6:23 PM
@Cawas LOL
Well, we'll see, I just got back and am aboust to do so
We'll see if it's that simple or not :-)
 
6:51 PM
I can't imagine from the top of my head how that's related to zooming. :o
 
@Cawas LOL
Right now, my code doubles the CSS width and height of every element
but not the padding and mergins
so the elements are every so slightly off
 
7:11 PM
shit... there has to be an easier way to do that!
 
LOL
I'm all ears @Cawas :-)
 
well, I still don't quite get what you mean to do... are you sure going that route will accomplish it? can we have at least two screenshots explaining it?
because I don't see how CSS will be able to zoom in flash elements.
for instance
 
@Cawas It can't, I had to write a whole flash ActionScript thing for that :-)
Screen shots coming up
 
can you use css3?
 
Nope. CSS2 only
 
7:22 PM
jquery?
 
Prototype :-)
That's 100%
 
ok...
 
I'm going to delete these soon, open in a new window if you want to keep em :-)
The second image was 200%
 
well...
 
Does that give you an idea of what I'm working with @Cawas?
 
7:25 PM
it looks interesting... and given it's not a real zoom of everything there will be work to customize what's to zoom and what's not. 2 layers at least.
 
Yup
and you can see, it's almost there
just need to tweak that photo position a bit
 
if it wasn't so evolved, I'd try doing it with some CSS3 simulator and applying zoom to classes, tho. :P
if you havent tried
 
Has to work in IE7
and the rest of the system is CSS2
 
it certainly yelds a faster code to do it the way you did. all custom made.
but that shit will be hard to maintain! :o
 
LOL
well I'm diving back into this... I'll let you know how it goes @Cawas!
 
7:38 PM
@TheUnhandledException cool. g'luck! :P
id like seeing the final result
 
@Cawas Sure thing :-)
 
7:59 PM
@Cawas It's working now :-)
 
@TheUnhandledException that was fast!
 
Yeah having the correct margings/padding helps A LOT :-)
	_myUpdateBoundryStyle: function()
	{
		var boundryStyle = {};

		boundryStyle.margin = $A(com.digitalfruition.settings.customizer.FrontendUI.uiSpacing.textBoundryMargin).collect(function(v)
		{
			return v*this.myZoom+'px';
		},this).join(' ');

		boundryStyle.padding = $A(com.digitalfruition.settings.customizer.FrontendUI.uiSpacing.textBoundryPadding).collect(function(v)
		{
			return v*this.myZoom+'px';
		},this).join(' ');

		this.elements.boundry.setStyle(boundryStyle);
	},
 
@TheUnhandledException how you pretified the code just now?
 
@Cawas There's a "fixed font" chat button
 
so you did all the zooming on prototype? cool.
@TheUnhandledException I can't find that button
 
8:05 PM
@Cawas Well the "zooming" was working. The zooming is double the sizes and left/right positions
@Cawas Only appears when text has >1 line, use shift-enter
 
:207679 ok,
trying out
oh now i see it! :D
it also messes up the reply link
i think
another test. :o
 
it's either or.
 
Can't use that and reply
 
8:22 PM
howdy
 
Hey there @John
So @Cawas...
in The Tavern (General), 4 mins ago, by The Unhandled Exception
so this project I was busting my ass to get the bugs out of was just pushed back a few months
The irony
As I just got the bug fixed...
 
Was just looking for something like this place... I have a set of processes which I wrote, which in turn launch some external processes which are supposed to do the actual work. The thing is that I can now launch a single instance of the external process at a time (due to licensing restrictions). What would the best way to synchronize these?
I've entertained the following approaches:
1.- Grabbing the list of running processes
2.- Having my processes to write to a file when starting and deleting the file on end
3.- Having my processes write on a registry key
 
@TheUnhandledException you mean you had all the time in the world, rather than bringing the pillow to the office?
 
Ideally, one would use something like a system wide monitor/semaphore, I think, but I don't know if Windows provides it
 
@JohntheSeagull this may look like the right place, but it's usually ghosty and I'm afraid I, at least, can't help with expertise in that one...
but one thing you can do to seek for more help, if that's the case, is just link your "post" in other chats. just do it in a single line:
4 mins ago, by John the Seagull
Was just looking for something like this place... I have a set of processes which I wrote, which in turn launch some external processes which are supposed to do the actual work. The thing is that I can now launch a single instance of the external process at a time (due to licensing restrictions). What would the best way to synchronize these?
 
8:29 PM
Sorry guys stepped AFK for a sec
 
now, if you want some logic thinking on it, I'd take a guess...
 
@JohntheSeagull we do need more people in here to be able to help, @Cawas is right
However I can advise you on this one!
 
or that! :P
 
@John, are these all on a single machine?
 
8:31 PM
@Cawas HAHA of course you're welcome to assist also!!
@JohntheSeagull Windows, I suppose?
 
Any sort of database handy?
@JohntheSeagull If not, #2 sounds like a good idea
 
between those 3 options I'd guess writing a file...
 
There is a database, but I'd prefer a standalone solution.
 
Just open a lockfile with exclusive write privs when starting the external command
 
8:33 PM
thought windows is not as file based as unix, it does handle a lot of things like that.
 
if that open fails, you sleep and try again
As you said, close the write access and delete the file when the job completes
 
Yup. I'd have to take into consideration the case where the external process hangs and doesn't finish. Maybe using timeouts
(don't you love closed source?)
 
@JohntheSeagull That's why you use exclusive write locks :-)
oh wait
disregard that, I didn't read "hangs"
 
Process X: If file does not exist: writes file with own PID. launches external process A1. waits for it to finish. deletes file. If file exists: reads PID. Checks if the external process is hung (by looking at its log file's last modification date). If the process hasn't written to its logfile in X minutes, kill PID, and proceed as if the file does not exist. If the process is not hung, sleep X and start again
sounds reasonable?
 
@JohntheSeagull Sounds like a great plan!
@Cawas: thoughts?
 
8:41 PM
The thing is that this has the potential for deadlocks, because there is no atomic operation to check for a file and write it
 
@JohntheSeagull Hmmmm
 
X1: checks for file (doesn't exist) X2: checks for file (doesn't exist) writes file and then both X1 and X2 proceed
 
@JohntheSeagull Can they both receive exclusive write locks from the OS?
 
well, not exactly deadlocks, as one of them will simply fail, but coordination will not work
ah, so you don't check, you just try to open the file exclusively, if the open fails it means it's already taken
that'd work
if locks do work
:)
 
@JohntheSeagull Right, that's what I was trying to convey, albeit less than elegantly :-)
File locking is a mechanism that restricts access to a computer file by only allowing one user or process access at any specific time. Systems implement locking to prevent the classic interceding update scenario (see race condition). The following example illustrates the interceding update problem: # Process A reads a customer record from a file containing account information, including the customer's account balance and phone number. # Process B now reads the same record from the same file so it has its own copy. # Process A changes the account balance in its copy of the customer record...
They should, but, I am a Linux developer, not a windows developer :-)
 
8:45 PM
Well on Linux it's know file locking semantics are broken. I hope Windows is better!
:P
 
@JohntheSeagull I've used them successfully before...
then again I normally use a MySQL database
 
but they do work, if you use Linux extensions and on local machine only.
status-foo
 
@JohntheSeagull Ahhh, OK. I see
 
@TheUnhandledException I've had bad experiences with windows file locking...
but it was long ago and i cant even remember if it was FAT or NTFX
it's not NTFS anymore, now it's NTFX, thanks to Fox News! :o
 
I missed that news
 
8:57 PM
that's because you do it well in not watching fox news
 
I don't watch any news
I know that my friends will tell me about things I must know, so I take advantage of that
 
I stick to the PBS NewsHour
@Cawas I spoke too soon before. Still having a positioning issue somewhere! >:o
 
neways, I was hoping you'd use files just for storage... just double check if ntfs locks works fine before proceding with that.
argh
my last message just disapeared! o_O
@TheUnhandledException what the what?
 
When I said I had everything working with my zoom feature... not working as well as I thought!
 
9:00 PM
trying again: I tought you'd use files just for storage... make sure to double check ntfs locks before proceding.
@JohntheSeagull
@TheUnhandledException and so the quest continues
 
@Cawas did you know up arrow edits in chat? Also, you can edit from the left-hand message of any message.
 
@TheUnhandledException yeah, that was included in the "disapeared"
 
I got a "unknown error" and had option to "retry". it disappeared as soon as i clicked on it.
 
@Cawas I get that sometimes

Chat feedback

read the faq http://chat.meta.stackoverflow.com/faq
 
9:02 PM
i got it few times, but then "retry" worked.
 
I think my problem here is, my measurements make almost no sense
 
what you mean?
 
What I mean is, I measure where each region starts, the top and left positions. But the top position isn't really the top of the content for that region, because there's controls in there
+----------------------
|(0,0)
|
|
|            +-----------
|             |(x,y) <controls>
|             |+----------
|             ||<content
er
so the real poslition of the content isn't at x,y it's at x,y-heightOfControls
so to zoom in 200%, I don't double y, I need to do some crazy forumla
which I just tried to set as: (y-heightOfControls)*zoomRatio+heightOfControls but... that doesn't work
oh
because I want (y+heightOfControls)*zoomRatio-heightOfControls
I think :-)
what a mess I've created, lol
 
very confusing indeed! XD
it hardly stops there.
 
What I should do is completly rewrite how I store these positions
but that will make everything backwards-incompatible!
 
9:15 PM
well, now you have the time to do so, lol
 
@Cawas Sadly, this isn't the only customer who uses this product
But, if they don't need this feature for months, maybe it can be pushed to v2.1!
 
how about writing that CSS3 extension?
if it doesnt exist yet
 
LOL
CSS3 won't help me here @Cawas :-) Trust me...
 
so you did try the css3 zoom
 
No, I know it's not what I need...
Remember, I need to zoom only certain portions
 
9:18 PM
that's just a matter of giving proper class names.
 
This might be working:
containerStyle.top = ( (parseInt(this.container.getStyle('top'))+com.digitalfruition.settings.customizer.FrontendUI.uiSpacing.moveIconHeight)
								* zoomChange
								- com.digitalfruition.settings.customizer.FrontendUI.uiSpacing.moveIconHeight
							 )+'px';
I will probably never understand what the above code means later, so I'm going to put a permalink to this chat in my SVN commit...
 
You certainly have no trouble typing
Haven't you considered com.digitalfruition.settings.customizer.FrontendUI.uiSpacing.Parameters.Client.Meta.Data.Height.moveIconHeight instead?
 
@JohntheSeagull LOL
I am regretting namspacing all my config vars, LOL
 
Well, you could shorten a bit
settings = com.digitalfruition.settings
and so on
 
@JohntheSeagull yeah, for this part of the app I could do settings = com.digitalfruition.settings.customizer.FrontendUI
since this is the Frontend UI to the Customizer
 
9:27 PM
yup. Are you empowering online successes right now? :)
 
@JohntheSeagull LOL. More like offline epic fail :-)
/me hopes his customers don't read MSO chat
XD
 
That reminds me some comments in code I wrote years ago when I was young.
I also thought "they will surely never look at the code"
...
they did
 
LOL
		// The above horrid mess is to compensate for the fact that the top position of
		// the photo, stored in the database, is really the top position of the container,
		// which meansgt the photo is down from there an amount equal to the height of the
		// controls. So I need to use the above to correct this. For more info, see:
		// chat.meta.stackoverflow.com/transcript/message/208020#208020
2
That should do it. Editing customizations work. I rejoice until v2.1 when I make the measurements have sane values
Thanks for listening to me rant about this until I fixed it @Cawas and @John!
 
9:48 PM
@TheUnhandledException I was not actually listening, but its cool! :)
 
@Cawas Thanks for making me feel like you were ;-)
 
did you fix it?
i werent just on that last part
@TheUnhandledException loved the "for more info" part... too much info, in fact.
 
@Cawas LOL
@Cawas It's almost fixed, I just realized it's wrong in another case
 
well, gtg. have fun with more commenting than coding there, @TheUnhandledException
probably be back tomorrow. cya ;)
 
LOL. Later @Cawas
 

« first day (28 days earlier)      last day (20 days later) »