|
BizarroAzrael posted:Because its' actually a more complicated branching thing rather and three prerequisites for a single outcome. I didn't want to copy/paste so much and replace all the variables with generic ones. You should still check your code. The fact that you coded something as "var != false," instead of "var == true" or the even more straightforward "if(var)"
|
# ? Sep 23, 2009 17:19 |
|
|
# ? May 23, 2024 15:45 |
|
ErIog posted:You should still check your code. The fact that you coded something as "var != false," instead of "var == true" or the even more straightforward "if(var)" And maybe you should check the thread a little closer tef did it You're right about if(var) I've not come by that before, but come on man, "is not equal to false"? Give me a little credit.
|
# ? Sep 23, 2009 17:31 |
|
BizarroAzrael posted:Because its' actually a more complicated branching thing rather and three prerequisites for a single outcome. I didn't want to copy/paste so much and replace all the variables with generic ones. EDIT: and by problem I mean posting too simplified examples to go along with your stupid questions. EDIT 2 (for clarity and because I am not nearly as cool as AD when I try to be snarky): There is no syntax restriction against nesting if statements without using {}, but it's usually a good idea to always, always, always use {} regardless of nesting or number of lines etc just because the added clarity and ease of maintenance far outweigh the additional typing. Jethro fucked around with this message at 20:04 on Sep 23, 2009 |
# ? Sep 23, 2009 17:34 |
|
BizarroAzrael posted:And maybe you should check the thread a little closer Seems you're right. Carry on.
|
# ? Sep 23, 2009 18:18 |
|
Jethro posted:Thus we see that {} are not ever required for single-line if statments; quote:you should just always use {} no matter what and then you won't have this problem. Okay, I screwed something else up that was repaired by putting the {} in, but the problem was me not using {}. Alright.
|
# ? Sep 23, 2009 18:47 |
|
If you post your actual code we can tell you how stupid you are with more specificity.
|
# ? Sep 23, 2009 21:15 |
|
The acknowledgements section of my thesis now thanks SH/SC "for clarifying the use of the term `embarrassingly parallel' ".
|
# ? Sep 23, 2009 21:21 |
|
DoctorTristan posted:The acknowledgements section of my thesis now thanks SH/SC "for clarifying the use of the term `embarrassingly parallel' ". This is CoC, actually, so I'm going to have to write to your professors and invalidate your thesis immediately
|
# ? Sep 23, 2009 21:23 |
|
csammis posted:This is CoC, actually, so I'm going to have to write to your professors and invalidate your thesis immediately Theses are like software: it doesn't really matter if something is wrong so long as you fix it at some point.
|
# ? Sep 23, 2009 21:26 |
|
I have a 4.2mb text file (format sample at the end of this post). It has a line every 15 minutes from November 6, 2006 at 3:26pm up until right now. As you can see, it's comma delimited, but the date is non-standard and Excel won't see it as a date field, so I can't change it around. I can't do fixed width delimiting because the first 4 columns vary in how many digits (between 1 and 4). I need to graph it, and the date field is totally screwing things up, and keep some key dates so I can say "the month over month change is X" and things like that, I don't need it to be perfect though. Any ideas on what to do with the last column? code:
|
# ? Sep 23, 2009 23:48 |
|
It should be relatively easy to transform that to a representation that excel will eat up. Can you run a regexp over it or something? What format would that last column ideally be in? Edit: Maybe you can just have excel ignore the last column and use the line number instead to recalculate the time of each line if that is easier. Vanadium fucked around with this message at 00:06 on Sep 24, 2009 |
# ? Sep 24, 2009 00:02 |
|
Vanadium posted:It should be relatively easy to transform that to a representation that excel will eat up. Can you run a regexp over it or something? What format would that last column ideally be in? Well I sort of got it into a date like format by ctrl+h 'ing the MON, TUE, etc out of the date field. That actually makes it a real date field! So that problem is solved, and now I have to deal with Charts only taking 32,000 data points and 3-D charts only taking 4,000 data points in a chart that would ideally have about 400,000+. I think I need a different charting program.
|
# ? Sep 24, 2009 00:06 |
|
dunkman posted:Well I sort of got it into a date like format by ctrl+h 'ing the MON, TUE, etc out of the date field. I understand it's important to graph the real data, but to get sufficient resolution in a chart to make 400,000 data points useful it would make it a really long loving chart. If only one pixel was used for each data point, it would still be 400,000 pixels long. Or 100,000 pixels long if each of those points is represented in the same x axis position. I would first split it by years, and then knock the data down to 32,000 data points for each year by removing every x number of lines to make that possible. That will give you about 3 data points every hour versus 4 every hour for each year. The problem is that this works out to only about 21 lines per day, and so won't be able to be done cleanly. Either way, you're going to have to decimate this data to a level that makes it manageable. You're probably going to end up breaking this into 6 month chunks, decimating the data, and have 6 graphs that you can photoshop together or something. You also might want to look into GNU Plot, it takes CSV as input and will export as JPEG or SVG, etc. It takes datasets of arbitrary size. ErIog fucked around with this message at 00:36 on Sep 24, 2009 |
# ? Sep 24, 2009 00:11 |
|
dunkman posted:I think I need a different charting program. gnuplot is definitely the way to go. As ErIog mentioned, it can take CSV, it can accept date/time values and plot them as appropriate, and it can process massive amounts of data. I have actually made plots that have 6 million data points with the program (well the data file had 6 million points, and I made one plot of the whole file to orient oneself and many plots over subintervals of the data for actual use)
|
# ? Sep 24, 2009 02:35 |
|
ErIog posted:.*@.* then try to send an e-mail is really the only good way to do that. Oh look, one of these people who want to look smart by not answering the question. There are many situations where you can't send an email for every email address you have to parse. Really ["a-zA-ZseetheRFC]+@(<domain name segment>\.)*<domain name segment> is the way to go. Edit: actually something along the lines of ("[^"]+"|[,a-zA-ZseetheRFC]+)@(<domain name segment>\.)+<domain name segment> is what you want. Yes, I have seen "John Smith"@domain.com email addresses in the wild. If I remember correctly, the RFC doesn't allow comma characters in the username section of the email address, but you should tolerate those anyway because there are some of those. shrughes fucked around with this message at 03:38 on Sep 24, 2009 |
# ? Sep 24, 2009 03:30 |
|
What exactly do you gain from validation that says that asdjfhklsdjfh@sdjhfiuyiulkjdhf.com is a valid email address?
|
# ? Sep 24, 2009 03:45 |
|
Plorkyeran posted:What exactly do you gain from validation that says that asdjfhklsdjfh@sdjhfiuyiulkjdhf.com is a valid email address? The truth is more important than the email account itself. Duh.
|
# ? Sep 24, 2009 03:58 |
|
Plorkyeran posted:What exactly do you gain from validation that says that asdjfhklsdjfh@sdjhfiuyiulkjdhf.com is a valid email address? Nothing guarantees it's a valid email address. It just shows that it's not garbage. There are situations where you aren't actually interested in seeing whether you can send emails to an email address, when you only want to recognize them and canonicalize them.
|
# ? Sep 24, 2009 04:29 |
|
shrughes posted:Nothing guarantees it's a valid email address. It just shows that it's not garbage. There are situations where you aren't actually interested in seeing whether you can send emails to an email address, when you only want to recognize them and canonicalize them. Why would you ever query a user for an email address without planning to use it? And, that email is garbage. That's the whole point. It will validate, but it's unusable. Also, this email regex discussion was specifically about validating an email address, not scraping them from web pages or finding them in other text. That's a different purpose, and obviously there you would want to use a more full-featured regex to make sure you don't pick up "Eat@Joe's" or something ErIog fucked around with this message at 04:42 on Sep 24, 2009 |
# ? Sep 24, 2009 04:38 |
|
shrughes posted:Nothing guarantees it's a valid email address. It just shows that it's not garbage.
|
# ? Sep 24, 2009 04:49 |
|
Plorkyeran posted:How is the result of mashing keys for a few seconds then tossing in @ and .com at the end not garbage? How would you ever gain something from treating that as an email address? Because it is a valid email address? heuntohuoercugeorcugo@eohuontihueifreier.com is a valid email address. You'd be an idiot to design your app such that coming across a fake email address causes it to incorrigibly lose all utility. There are plenty of situations where it doesn't, but you still need to distinguish between something that is an email address, or a phone number, or what have you, and something that obviously isn't. And "validating" can mean different things. It's pretty obvious that if you want to know you can email somebody, you can't know unless you send an email, I hope. That's not the purpose of using a regex to validate email addresses. Edit: quote:Also, this email regex discussion was specifically about validating an email address, not scraping them from web pages or finding them in other text. And there are not situations where you want to make sure something is an email address, and it's supposed to be, and you're not scraping web pages or finding them in other text?
|
# ? Sep 24, 2009 05:02 |
|
shrughes posted:You'd be an idiot to design your app such that coming across a fake email address causes it to incorrigibly lose all utility. Chances are that if you're getting an email address from someone for a utility, that both they and you want it to work. As there is no way to truly validate an email address without sending an email, "validating" the email with a crazy regex only serves to create false negatives: addresses that mail could be sent to that fail the regex you're bottlenecking these addresses through. Nobody ever said anything about the email address being the linchpin for the whole operation. You've said the second sentence multiple times without clarifying what the other purposes are. I only see one purpose for validating an email address. Call me crazy, but it's to actually send email to it in the future. If you don't plan on doing that, then why grab an email address? Please tell me what these purposes are.
|
# ? Sep 24, 2009 05:35 |
|
This is why you write a parser for the email address grammar. Some of us in this world do not have a fetish for regexes like Victor, who can't climax unless the woman uses zero-width assertions.
|
# ? Sep 24, 2009 05:52 |
|
ErIog posted:You've said the second sentence multiple times without clarifying what the other purposes are. I only see one purpose for validating an email address. Call me crazy, but it's to actually send email to it in the future. If you don't plan on doing that, then why grab an email address? Please tell me what these purposes are. Well, here's a hint: What if you want to read email addresses from something that contains email addresses, for the sake of knowing that information. And what if you want to discern between email addresses and the haikus that Billy-Joe-Bob Professional likes to put in the Email1, Email2, and Email3 fields.
|
# ? Sep 24, 2009 06:20 |
|
Anyone who considers finite state machines as a method of recognizing a context-free language is, of course, living in a state of sin.
|
# ? Sep 24, 2009 08:04 |
|
shrughes posted:Well, here's a hint: What if you want to read email addresses from something that contains email addresses, for the sake of knowing that information. And what if you want to discern between email addresses and the haikus that Billy-Joe-Bob Professional likes to put in the Email1, Email2, and Email3 fields. Yeah, we had that covered. We weren't talking about that situation because the original question was about validating them, not finding them. Then you decided to get your panties in a bunch because we didn't pander to your pedantic need to have it recognized that with a better regex, one might be able to search for emails. It had nothing to do with the original question or conversation. You took an answer for one situation, and then complained because it didn't fit a completely different situation.
|
# ? Sep 24, 2009 13:30 |
|
ErIog posted:Either way, you're going to have to decimate this data to a level that makes it manageable.
|
# ? Sep 24, 2009 13:49 |
|
Avenging Dentist posted:Some of us in this world do not have a fetish for regexes like Victor, who can't climax unless the woman uses zero-width assertions. There's a joke in there about zero-width assertions and penis length, but I'm going to need more coffee before I can put it together
|
# ? Sep 24, 2009 15:05 |
|
Does Victor even exist anymore?
|
# ? Sep 24, 2009 16:09 |
|
He was in #cobol like two weeks ago for a day or two, so he probably isn't dead
|
# ? Sep 24, 2009 18:53 |
|
Of course, simulated Victor will live on forever* *So long as I pay my vps bills
|
# ? Sep 24, 2009 18:53 |
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 |
|
I have a client running OSX and windows xp in virtualbox. This is working great except when she needs to print. From time to time, the usb printer will timeout or something, and the xp VM won't see it anymore. If somebody could show me how to reset the usb printer connection using apple script, this would be awesome. I'd bounty this out for $10.
|
# ? Sep 25, 2009 06:32 |
|
Okay, I looked through the OP and some of the other threads on here a bit, so I might have overlooked the answer to this one, but it should be a quick response anyway. I have basically no knowledge of coding/programming. I'm looking for a way to get a fairly basic program made for me, something that could probably be done in a day or two by anyone with experience. Specifically, I would like it to use GameMaker or Java (or any other program that would be superior; I could decide that when I explain what I'm looking for.) I am willing to pay/compensate a person who could make it for me. Is this something I should make an individual thread for? What's the etiquette here? Should I just ask in the Games Development megathread? Any answers are greatly appreciated.
|
# ? Sep 27, 2009 02:05 |
|
Eclipse12 posted:Okay, I looked through the OP and some of the other threads on here a bit, so I might have overlooked the answer to this one, but it should be a quick response anyway. Hey, post your email or chat name, and we can talk.
|
# ? Sep 27, 2009 04:38 |
|
Eclipse12 posted:Is this something I should make an individual thread for? What's the etiquette here? Should I just ask in the Games Development megathread? It is (allegedly) best to post questions about employing people in SA-MART. However, linking to such a thread here is fine.
|
# ? Sep 27, 2009 10:44 |
|
does anyone know of something like heroku or appengine but that is 100% in-browser? like a browser-ide + hosting?
|
# ? Sep 27, 2009 13:47 |
|
tef posted:It is (allegedly) best to post questions about employing people in SA-MART. However, linking to such a thread here is fine. Thanks for the info
|
# ? Sep 27, 2009 13:49 |
|
Eclipse12 posted:I have basically no knowledge of coding/programming. I'm looking for a way to get a fairly basic program made for me, something that could probably be done in a day or two by anyone with experience. Aside: If you have no knowledge how did you come up with that estimate of time?
|
# ? Sep 27, 2009 15:04 |
|
|
# ? May 23, 2024 15:45 |
|
tef posted:Aside: If you have no knowledge how did you come up with that estimate of time? People who don't know anything about the construction of virtual products think they can be made in Internet time.
|
# ? Sep 27, 2009 17:39 |