|
FunOne posted:EDIT INDIRECT is one of the best and worst things ever about Excel. I've created some nasty nasty stuff with it, abusing the heck out of named ranges and calculated cell positions. That whole "files must be open to reference an external workbook" requirement is new to me, but I've mostly contained my evilness to one workbook.
|
# ? Jul 29, 2008 07:05 |
|
|
# ? May 14, 2024 02:45 |
|
So, I've been doing a 3D engine in Actionscript with what I would call a fair degree of success. After reading up on quaternions, 3D space rotations and all that good stuff I have got 3D objects that actually - whoa! - rotate around if I want them to. Amazing, I know. But, now what I'm having trouble with is determining which polygons should be drawn and in what order. As it stands, the polygons are being drawn in a bad order, resulting in odd-looking output. (supposed to be a triangular prism) It's not particularly relevant to ActionScript so I thought I would post it in this thread. If I knew what to google, I would just do that, so can anyone at least tell me what to search for, if not point me to some good resources on this problem? I imagine it probably crops up a lot. A quick and easy solution would really be best here. Thanks in advance!
|
# ? Jul 29, 2008 16:47 |
|
Hidden surface determination ?
|
# ? Jul 29, 2008 16:58 |
|
Quick and easy solutions are the best kind of solutions.
|
# ? Jul 29, 2008 17:21 |
|
I had already implemented something to solve this problem - a variant of the painter's algorithm, it seems. Since it wasn't working and I cooked up the method myself I just assumed I was barking up the wrong tree... I had missed out one crucial line of code and I just now realised this after what must have been a few days of gnashing of teeth. Thanks anyway though!
|
# ? Jul 29, 2008 17:43 |
is there any way to change a bunch of variables with a loop-type thing in the bourne shell? like say i have a=1 b=2 c=3 and i want to change them to a=1.txt b=2.txt c=3.txt it seems like if i have something like list="a b c" for element in ${list} do something done it's not going to actually change the variables, just "element" at a loop-local level. i mean i feel like i'm getting into the territory of pointers and maybe this just isn't something that the bourne shell does. tia
|
|
# ? Jul 29, 2008 17:58 |
|
Ok I don't know what the hell is wrong with me, but I have completely forgotten how to use prototype's Ajax.Updater to send multiple $_POST variables and for the life of me I cannot find an example that shows this behavior that works for me.code:
EDIT: Turns out something was wrong with Prototype. Updated and everything works fine. I really hate the people who had my job before me. iamstinky fucked around with this message at 01:01 on Jul 30, 2008 |
# ? Jul 29, 2008 19:07 |
|
huge sesh posted:is there any way to change a bunch of variables with a loop-type thing in the bourne shell? like say i have Well, you could do something like code:
|
# ? Jul 30, 2008 01:37 |
How trivial is it to compromise a newer default OS install that a typical server provider would give you out of the box? Windows? Redhat? Ubuntu? I wouldn't even know where to begin to try to get in aside from very basic things.
|
|
# ? Jul 30, 2008 08:51 |
Neslepaks posted:Well, you could do something like i actually just figured it out. code:
|
|
# ? Jul 30, 2008 19:15 |
|
Question: What would be a good way to detect and alert the user of a computer if their Internet connection has been dropped. I tried to google search to see if such a thing already existed. For example, a small application running in the background which will beep (or something like that) if the Internet connection dies?
|
# ? Jul 31, 2008 00:57 |
|
Runaway Five posted:Question: What would be a good way to detect and alert the user of a computer if their Internet connection has been dropped. I tried to google search to see if such a thing already existed. I'd just try to ping google.com every 30 seconds or something. If you don't get a response, maybe have a list of other major sites to try just in case google is down for some crazy reason. If after 5 tries you still don't get any responses you can probably assume it's down.
|
# ? Jul 31, 2008 02:19 |
|
DLCinferno posted:You could do it the same way any other application finds out the internet is down: try to access an internet resource.
|
# ? Jul 31, 2008 03:41 |
|
_aaron posted:I can't remember the name/address of it, but isn't there some site setup with this as its sole purpose?
|
# ? Jul 31, 2008 03:59 |
|
Runaway Five posted:Question: What would be a good way to detect and alert the user of a computer if their Internet connection has been dropped. I tried to google search to see if such a thing already existed. Other than attempting to establish a connection with some server outside the network, there's no reliable way to do this. For all intents and purposes, pinging google.com should never fail.
|
# ? Jul 31, 2008 06:47 |
|
There's probably an easy solution to this that I'm not thinking of, but I'm trying to write a Regex (.NET if it matters) to match this pattern: <ul><li>1<li>2<li>3</ul> The matches I want are: 1 2 3 The problem I'm having is wrapping my brain around getting everything from one <li> to the next, or until it sees a </ul>. As far as 1, 2, 3, etc go, they aren't just numbers and can contain anything except presumably <li> (it can contain other HTML tags and stuff.) Edit: I have (.+?)((<li>)|(</ul>)) but it matches the initial <ul>, which I don't want to see in my matches. POKEMAN SAM fucked around with this message at 08:49 on Jul 31, 2008 |
# ? Jul 31, 2008 08:42 |
|
Regex is almost always the wrong answer to the question "how do I parse this HTML or XML?". Find an HTML parsing library, .NET must have one. Of course, if you're dealing with actual HTML like that, which is not valid XHTML, I'm not 100% sure how such libs will perform, but I'm reasonably sure they'll still be able to deal with it for you.
|
# ? Jul 31, 2008 13:00 |
|
Ugg boots posted:There's probably an easy solution to this that I'm not thinking of, but I'm trying to write a Regex (.NET if it matters) to match this pattern: At my work we do a lot of parsing of HTML pages, and it comes up often how to parse a page that isn't valid XML, like the one you're dealing with. Our strategy is always to use XPath or something similar to get down to the containing element (<ul> in your case) and then just do string processing on its contents. So you could probably just get the contents of the <ul> and split on "<li>" for the desired results, right? mynameisntneo fucked around with this message at 16:44 on Jul 31, 2008 |
# ? Jul 31, 2008 16:34 |
|
mynameisntneo posted:At my work we do a lot of parsing of HTML pages, and it comes up often how to parse a page that isn't valid XML, like the one you're dealing with. Our strategy is always to use XPath or something similar to get down to the containing element (<ul> in your case) and then just do string processing on its contents. So you could probably just get the contents of the <ul> and split on "<li>" for the desired results, right? drat, I was way over-engineering my approach. Grabbing the right chunk (easy) and splitting on <li> (easy) is definitely the right approach. Thanks
|
# ? Jul 31, 2008 17:25 |
|
If you're using python - lxml will do xpath over html. It's pretty awesome.
|
# ? Jul 31, 2008 18:03 |
|
A quick design pattern question: In my previous design course we covered row data gateways which I enjoy using to keep my sql away from the rest of the site. RDGs are perfect when you're dealing with one table, but can you use something when you have three or four related tables? For example, let's say you have the following for a schema (this may not be an optimal schema, just used as an example): Person (PersonID, name, Country, Province, AddressID (FK)) PersonPhone (PersonID (FK), PhoneID (FK)) Phone (PhoneID, PhoneNumber, Purpose) Address (AddressID, StreetName, StreetNumber, ApartmentNumber, PostalCode) Now, I want to have a standard form that's going to let me add a new person, update a person, remove a dead person. Basic CRUD functionality. Should there be one RDG for the "conceptual entity" // "denormalized view" or is that considered bad design? What if I never need to access the address or phone number tables except for when I'm accessing the person?
|
# ? Jul 31, 2008 18:40 |
|
What tools were used to build http://www.virginradio.co.uk PHP, ASP?
|
# ? Jul 31, 2008 22:24 |
|
Jam2 posted:What tools were used to build http://www.virginradio.co.uk PHP, ASP?
|
# ? Jul 31, 2008 23:01 |
|
Stephen posted:If you're talking about the widgets, it's a whole lotta javascript. There are quite a few popular javascript libraries out now that you can use in conjunction with sessions to have customizable pages. http://www.google.com/ig is another good example. Aside from the widgets, can you tell what is powering the content management system?
|
# ? Jul 31, 2008 23:37 |
|
It seems it is something that doesn't handle Cross Site Scripting Errors: http://www.virginradio.co.uk/vip/index.html?msg=%3Cscript%3Ealert(document.cookie)%3C/script%3E&action=login&url=&username=&email= Aside: The server is clamining to be "apache" without a version string, which does suggest it might not be apache. Although the date on this page is http://www.virginradio.co.uk/event/333 unix epoch, so it might be on a unix system. (it says 1 am because it is midnight in gmt :3) Also, one of the subsections is hosted on another domain which uses asp.net Ooh, another XSS: http://www.virginradio.co.uk/about_us/for_your_site/email.html?url=--%3E%3C/script%3E%3C/textarea%3E%3Cscript%3Ealert(document.cookie)%3C!-- tef fucked around with this message at 00:53 on Aug 1, 2008 |
# ? Aug 1, 2008 00:38 |
|
Question about sed: I'm trying to cut my teeth on this tool with what seems like a simple problem, which is to get rid of non-field-separating commas in a file with lines that look like this: foo,bar,unquoted string,"quoted string, with one or more commas",blah,blah,blah Another program is breaking when reading this data because it thinks a comma within quotes is still a field delimiter. The commas aren't important so I'm trying to strip them out with sed, and have come up with this so far: code:
1. start with a quote mark and continue until just before reaching a comma (so long as another quote isn't reached first), call that 1. 2. after the comma, take everything until the next quote mark and call that 2. 3. replace the '1,2' that was found with '12', effectively stripping out the comma. So far this seems to work well, except that it only removes the first comma within a pair of quotes. Quotes with two or more commas see the other ones remain, and while they go away with subsequent executions of the same function, this has led me to repeat the same line in my sed script 10 times just to be certain that I've caught everything. Any ideas on how to make the statement catch all of the unwanted commas in one execution? Barring that, is there a way to structure the script so that it will repeat the same instruction until no matches are found?
|
# ? Aug 1, 2008 14:33 |
|
more falafel please posted:Other than attempting to establish a connection with some server outside the network, there's no reliable way to do this. For all intents and purposes, pinging google.com should never fail. I would add a foreign site as well, maybe even just google.co.uk. Comcast had an issue one day where I couldn't hit any US sites, but anything overseas was fair game. Only lasted about 8 hours
|
# ? Aug 2, 2008 04:52 |
|
This probably falls under "if it was a snake it would have bitten me", but here goes anyway... Is there an online API reference for ASP 3.0? Yeah, not the fancy modern ASP.NET, old school ASP 3.0. I'm currently updating some legacy webpages written in VBScript/ASP and the only thing on classic ASP I could find at MSDN was a description/FAQ/information page, with no API page to be found.
|
# ? Aug 5, 2008 20:53 |
|
For an API reference, probably your best bet would be to google for "msdn [name of your function or class]" - but a straight up list of what classic ASP has available, that I don't know.
|
# ? Aug 5, 2008 21:08 |
|
csammis posted:For an API reference, probably your best bet would be to google for "msdn [name of your function or class]" - but a straight up list of what classic ASP has available, that I don't know. xmlDoc exists in ASP.NET and has different properties/method names than its ASP 3.0 counterpart. However, I did eventually find this, hopefully it'll reveal something since I saw some articles from 2000 there.
|
# ? Aug 5, 2008 21:18 |
|
I'm currently working on a project which requires me to hook the Windows print spooler - I need to get some sort of notification whenever a job enters the spooler, so I can suspend it. Has anyone done something like this before? I haven't had much luck finding any sort of hooking interface in the API docs, and google hasn't been very helpful either. (I did find one result that suggested I need to write my own filter driver, which is quite scary as I know nothing about Windows driver development and I'm on a deadline.) Any help is much appreciated!
|
# ? Aug 6, 2008 00:53 |
|
Does anyone know of a WinAPI way to globally set the mouse cursor temporarily? I'd like to do it without Hooks. It's for a control that grabs the color of the screen right under the mouse cursor, which works, but I would like the mouse to look like an eye dropper (or crosshairs or whatever) in the process.
|
# ? Aug 6, 2008 02:30 |
|
Does SetCursor work?
|
# ? Aug 6, 2008 02:35 |
|
Avenging Dentist posted:Does SetCursor work? Just tried it out, and it doesn't seem to be able to set the cursor globally. It worked while the cursor was over my application's window, though.
|
# ? Aug 6, 2008 17:42 |
|
Ugg boots posted:Just tried it out, and it doesn't seem to be able to set the cursor globally. It worked while the cursor was over my application's window, though. Off the top of my head, can you give your application a transparent window that covers the entire screen? (Bet that wouldn't work well on multi-head systems, though.)
|
# ? Aug 6, 2008 17:48 |
|
JoeNotCharles posted:Off the top of my head, can you give your application a transparent window that covers the entire screen? (Bet that wouldn't work well on multi-head systems, though.) Hmm, it seems a bit overkill, but it also has the advantage of my application not losing focus when you click during color selection (we'd grab the event and do nothing with it.) It would also make setting the cursor trivial (setting the cursor for the window itself is easy.) Thanks, I'll throw it on my list of things to try.
|
# ? Aug 6, 2008 18:43 |
|
This seemed like the best place to put this, but tell me if I'm wrong. I want to know what order Greasemonkey (the Firefox extension) loads and executes your Javascript in relation to that already contained on the page. What I'm trying to do override a Javascript function contained on the page. The catch is that this function is called directly from a <script>, which means it's called as soon as the browser sees the calling piece of code, if I remember my JS right (it's been a while.) So if Greasemonkey loads first, there's no function yet defined to override. If Greasemonkey waits for the page to load, the function has already been called. I need to load after the function has been defined, but before it's been called. How do I do this? The only thing I can think of is a while(true) loop that looks for the function (assuming that Greasemonkey loads first,) maybe with a pause(10) or something. But that's obviously inelegant and, though I have no idea on Javascript's threading mechanism, seems open to race conditions and doesn't guarantee that my code won't be put to sleep until after the function I want has been called.
|
# ? Aug 7, 2008 02:36 |
|
Edit: No wait.
|
# ? Aug 7, 2008 06:52 |
|
Magicmat posted:I'm pretty sure Greasemonkey stuff runs once the DOM is loaded (or later). Also, I've never been able to figure out how to use Greasemonkey to look at/modify regular Javascript.
|
# ? Aug 7, 2008 06:55 |
|
|
# ? May 14, 2024 02:45 |
|
Does anyone know if it's possible to block Windows svn clients from getting a particular directory? We share a common code base between Linux and Windows and some of the Linux files are different by case only. Of course that makes a checkout fail on Windows. There's no reason for Windows to get that particular directory but the source tree is structured such that it would be too complicated to manually get around it.
|
# ? Aug 8, 2008 16:52 |