Is it more common to write variables as someVariable or some_variable? I can't decide which to use. I like using someMethod() instead of some_method(), so I'm thinking it would make more sense to use some_variable.
|
|
# ¿ Feb 27, 2008 00:50 |
|
|
# ¿ May 7, 2024 20:45 |
nbv4 posted:Is there an easy way to debug javascript on IE? My site works fine in mozilla browsers, but literally none of the javascript functions work in IE. All IE gives me is a vague "invalid argument" type error which makes it hard to figure out whats wrong. IE8 has a development mode that is like a lovely version of Firebug. You can also emulate IE7 with it.
|
|
# ¿ Apr 14, 2008 04:28 |
If I have a class with 3 members: id, name, parentId, and I want to print out the hierarchy like: something -here --there --every --where -zing --ding ---wing -test --this How would I go about doing it? It seems like recursion would be appropriate here, but I have very little experience with recursion.
|
|
# ¿ May 2, 2008 21:18 |
Incoherence posted:You're not being clear on your problem. I am guessing that you have a map of IDs to these structures somewhere, and that id and parentId are keys into that map, thus forming some sort of N-tree of IDs. The thing I can't guess is whether you want to print the tree from children up (so, "here" would be the parent of "something") or from the parents down (so, "something" would be the parent of "here"). The latter is somewhat more complicated, since if you want to do that, what you really want is to know all children of a given parent, at which point you do a preorder tree traversal. Sorry, I want to print the tree from the parents down parent -child1 --subchild1 --subchild2 -child2
|
|
# ¿ May 2, 2008 23:32 |
Waltzing Along posted:We have a wiki set up and are planning on creating a page for every office. The page would include everything from the workstation serial and asset tag to the office phone numbers and address to the networking equipment, including pictures of certain key pieces of equipment. I don't think a wiki would be the best solution in this case. Have you guys thought about using a program based specifically on inventory? There are a lot of them out there and it makes it way easier to run reports and stuff, that seems like it would be nearly impossible with a wiki.
|
|
# ¿ Jul 17, 2008 00:57 |
Waltzing Along posted:They favor the wiki because it is free. Management is learning of its limitations but likes the price. You should do more to convince them that it will be worth it, because it will be, without a doubt. The amount of money you will spend on extra time trying to do simple things with the wiki will far outweigh the couple thousand dollars you spend on a nice inventory application. Not to mention skimping on a critical and inexpensive piece of a potentially multi-million dollar project (not sure of the size of your company) is just stupid. What if you want to figure out how many Dell D620 laptops were purchased before a certain date? Good luck doing that with a wiki. If the requirements aren't too much more than what you posted earlier you could write this webapp yourself with a minimal amount of time, or pay to have somebody write it for relatively cheap.
|
|
# ¿ Jul 17, 2008 02:17 |
rugbert posted:I need something for webpages that lets you drag and drop supplied images onto an image with a predefined perimeter. Specifically, I wanna make something like I'd go with the same thing that page uses, Actionscript. You should be able to find plenty of drag & drop tutorials. You can use FlashDevelop and the Free Flex 3 SDK to do this for free without having to buy Adobe Flash CS3. You could also probably do it in javascript, but it will be painful.
|
|
# ¿ Jul 19, 2008 19:20 |
csammis posted:look around on Sourceforge Kinda off topic, but why is the message board software they use on sourceforge so horrible?
|
|
# ¿ Jul 21, 2008 19:18 |
Ashex posted:I'd like to create a script of some sort that would basically take a folder of images, and generate a custom html page with it. It would be a pretty basic window, scroll through the images, click on it, and javascript would fill a field in another window (would be spawned from that one). Not exactly what you are looking for, but if you have php available, picKLE is a great minimalist image gallery.
|
|
# ¿ Jul 25, 2008 00:21 |
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 |
What tools should I look into for taking video from a USB webcam and doing something useful with the data like persistent object detection? I noticed MATLAB has some video capture stuff built in. Anybody have any good resources on that sort of thing?
|
|
# ¿ Jan 16, 2009 04:13 |
socialsecurity posted:I am trying to make a web form for a customer, I've made plenty in Php before but this guy is wanting nearly spreadsheet capabilities. Like if they put 20 of an item in a spot he wants it to calculate the price right there on the same window right then. I've seen this done before but am not exactly sure what I should be looking for to make it happen, even a point to the right programming langlauge would be helpful. Javascript
|
|
# ¿ Jan 22, 2009 04:35 |
I want to parse a human readable string of time spans, not really sure how to approach this to make it clean. I'm sure I could come up with something that works, but I have a feeling it will be a sloppy mess of poo poo if I don't go in with a plan of attack. I'll be using Java for this. The basic format is: 1:00pm to 2:00pm and 3:00pm to 4:00pm It can come in other variations: 1:15-2 1-2 3-4 1-2 and 3-4 1 to 2 and 3-4 1300-1400 I also want to handle overlap: 1-2 and 2-3 turns into 1-3 Can anybody give me a nudge in the right direction? fletcher fucked around with this message at 21:07 on Mar 18, 2009 |
|
# ¿ Mar 18, 2009 21:03 |
L:ordSilent posted:stupid question: Yea, typically this is possible to do. I've used cURL to do this. Google for things like "http post <language>" and you can find all kinds of examples in php, python, java, etc fletcher fucked around with this message at 03:59 on Apr 23, 2009 |
|
# ¿ Apr 23, 2009 03:57 |
I really like the little outline ruler to the right of the scroll bar in Eclipse, where it will show you where in the file you have a //TODO or if you highlight a variable name it will mark all occurrences of it in the file on the ruler. I'd like to be able to do this for javascript as well. I tried the JSDT plugin for eclipse but it doesn't seem very good. Is there maybe a Outline Ruler like plugin for Notepad++?
|
|
# ¿ Aug 27, 2009 17:12 |
ErIog posted:Though, this is probably because I just needed very simple things from the XML in the first place. That's how the project always starts and before you know it it will have grown into some mammoth thing that is impossible to maintain. Using the regexp may work for the really simple tasks, but the library works for both the simple tasks and the complex.
|
|
# ¿ Sep 11, 2009 19:36 |
What regex pattern do you guys use to validate an email address?
|
|
# ¿ Sep 23, 2009 01:05 |
Avenging Dentist posted:
hey thanks that worked great!
|
|
# ¿ Sep 23, 2009 04:04 |
I ended up using this for help with validating an email address. I don't really care if the email address actually exists or not, I just don't want to bother storing an email address that isn't even valid in the db. The application is a spambot designed to target CoC users, if anybody cares.
|
|
# ¿ Sep 24, 2009 19:04 |
Flamadiddle posted:Probably a really stupid question, but I have a question about for-each loops. wikipedia posted:Unlike other for loop constructs, however, foreach loops [1] usually maintain no explicit counter: they essentially say "do this to everything in this set", rather than "do this x times". This can potentially avoid off-by-one errors and make code simpler to read.
|
|
# ¿ Sep 28, 2009 19:12 |
I'm trying to think of a simple set of rules to determine if "6-1" should be interpreted as 6:00AM-1:00PM or 6:00PM-1:00AM. The one closer to normal business hours is the 'correct' one. I feel like this should be really simple, but I just can't think of what it is.
|
|
# ¿ Oct 5, 2009 21:14 |
Avenging Dentist posted:Distance in hours between centers of time (a la center of mass). As in, the distance between the center of the input time and the center of the business day? What about for an input of something like "5-6" ?
|
|
# ¿ Oct 5, 2009 21:57 |
Awesome! Thanks guys!
|
|
# ¿ Oct 5, 2009 22:38 |
ThatNateGuy posted:So far, I understand that it's essentially a class that adds various 'standard' methods and fields when instancing a class which implements the interface. What I don't get is what use that is. Wouldn't it be just as easy to modify or extend the class to include any new code? Yeah, you could do it, but it just wouldn't be quite as formal and well defined. Having it implement the interface forces it to have all those methods implemented, and throws up one one of them isn't. http://java.sun.com/docs/books/tutorial/java/concepts/interface.html http://java.sun.com/j2se/1.4.2/docs/api/java/util/Set.html
|
|
# ¿ Oct 16, 2009 02:17 |
Avenging Dentist posted:Trying to secure PHP code is like trying to drink through a sieve. It's possible, but you'd spend more time wrapping it up to be watertight than you would have taken just to go get a glass. Having a consistent way of interacting with a HashSet, LinkedHashSet, and TreeSet just makes it easier to use them. Interacting with them is consistent because they all implement the same interface.
|
|
# ¿ Oct 16, 2009 20:06 |
dyn posted:I'm trying to create a regular expression in use with split in perl that will grab the base site from ARGV, but I have yet to find one that will work. Example: When the user enters http://www.google.ca I want to be able to extract google from the variable. Any ideas? You could do it with a regex but most languages have a URL class to assist with something like this, you may want to look for one.
|
|
# ¿ Oct 24, 2009 00:57 |
If an application is completely controlled by different key/values in a JSON object, what's the best way to document all the different parameters you can use?
|
|
# ¿ Nov 16, 2009 21:47 |
Avenging Dentist posted:By... listing the valid keys? I'm not sure what you're asking here. I guess I'm looking for a good example that is already out there of what I'm trying to do.
|
|
# ¿ Nov 16, 2009 21:53 |
haveblue posted:It's not really a complex problem. You can probably get away with a simple two-level list. Some of the values should be other JSON objects, some should be an array of values, etc, so it is a bit more involved. I guess I should have mentioned that, my bad!
|
|
# ¿ Nov 16, 2009 22:45 |
Avenging Dentist posted:By... listing the valid keys? I'm not sure what you're asking here. Still looking for suggestions on this. Basically I want to see if I can improve this.
|
|
# ¿ Nov 17, 2009 22:39 |
Avenging Dentist posted:Well, step one would be to make the actual options better designed. Since this is presumably meant to be used in a browser, you should be using the already-existing browser names for things. "colour?" "background-colour"? "on-click"? "alpha"? (this last one should be "opacity"). That page I linked isn't mine, it is what I intend to replace. Unfortunately I don't have enough control over the source code (yet) to rename all those attributes, otherwise I would. Is there nothing else out there that uses a JSON formatted object like this so I can see how they documented it?
|
|
# ¿ Nov 17, 2009 23:19 |
I've got a situation where data is stored in two different RDBMS's and I need to essentially do a simple JOIN between two tables that are in the different systems. I started out by just grabbing all the info from one and doing a giant IN () clause when I query the other database, which gave me the "Packet too large" once my query got over 1MB. The biggest the query will ever be is about 2MB. Should I simply raise the max_allowed_packet variable to allow for my massive IN()? Should I load the data into a temp table and then do a JOIN? What is the fastest solution here? This is in Java and the db server I have control over is MySQL.
|
|
# ¿ Nov 26, 2009 03:34 |
How do you ask a senior developer about the formatting of their code without offending them? It's so hard to read when it's 5,000 lines of: code:
|
|
# ¿ Dec 10, 2009 00:05 |
code:
code:
|
|
# ¿ Dec 22, 2009 20:20 |
Triple Tech posted:Depends on the priority of the operators. Usually operators of equality would bind tighter than operators of logic. So... my guess is equivalent, the first one is just being more explicit. It really depends on the language. So assuming they are equivalent, which would you use? I prefer the first one, but that may just be because I've used a TI-89 for so many years I'm obsessed with parentheses.
|
|
# ¿ Dec 22, 2009 20:38 |
I'm thinking about rewriting The Awful Yearbook. I've been writing a bunch of Java lately and going back to the dynamically typed PHP is a bit frightening. Am I crazy for just wanting to rewrite the whole thing? I'm also a huge fan of Eclipse now, I never was able to find a PHP IDE I really liked. Am I going to regret this?
|
|
# ¿ Feb 21, 2010 23:06 |
PHP supercomputing cluster
|
|
# ¿ Apr 2, 2010 21:49 |
Uziel posted:Was curious if anyone was aware of a website/project for adding user data to a google map with SA user authentication. I've seen something similar before but can't for the life of me find anything about it. I know it would need to interact with the SA user auth system, or scan user profiles or something, then use the google maps API, etc. http://awfulyearbook.com has a google map integration, and you can filter by people that chose W&W as their faction
|
|
# ¿ Apr 5, 2010 18:44 |
Anybody know of a simple tool I can use to record/playback mouse & keyboard input?
|
|
# ¿ Jun 30, 2010 19:49 |
|
|
# ¿ May 7, 2024 20:45 |
Munkeymon posted:How simple? The first thing that comes to my mind is AutoHotKey, but it's a clunky interpreted language. Yeah that came up when I was googling around for something but I didn't like the sound of it.
|
|
# ¿ Jun 30, 2010 21:49 |