-
Posts
1,853 -
Joined
-
Last visited
Never
Everything posted by neylitalo
-
Cronjob syntax is as follows: minute hour day-of-month month-of-year day-of-week So a task that runs every minute would be as follows: * * * * * task A task that runs every seven minutes would be as follows: */7 * * * * task The way you've got it set up, the first one will technically run every minute, although the /1 is unnecessary. However, the second one will only run at 07:00 each day. This is all assuming that your cron manager follows the POSIX cron standards.
-
Can you show us the cronjob?
-
I display all emails as plain text by default, but I will very rarely view them as HTML.
-
Agreed. The customer wants to know two things: What it's going to do, and how much it's going to cost them. They don't care how it works - all they know is that they want a big button in the corner for people to click and give them money.
-
[SOLVED] Programming Challenge #1 (Numbered in case there's more)
neylitalo replied to roopurt18's topic in Miscellaneous
roopurt18, I think I can honestly say that I never want to work at your place of employment. I didn't exactly analyze the whole thing, but I got the general idea - very impressive work. If I ever want to do the same thing or similar, I'll definitely be coming back to this thread. -
I give a time estimate and cost estimate, but that's all unless the client wants to know more. I also haven't gotten any large projects (bigger than a few hundred dollars) so there hasn't really been anything to break down.
-
TLDP's bash scripting guide is exactly what I was going to recommend. However, I recommend the introduction guide before the advanced guide - http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html. And if that's even too much, try http://www.ee.surrey.ac.uk/Teaching/Unix/.
-
[SOLVED] Programming Challenge #1 (Numbered in case there's more)
neylitalo replied to roopurt18's topic in Miscellaneous
Daniel0: In both of your posts, you have replaced: <?php if(empty($m)){ $result = 1; $result *= $bar; } ?> with: <?php if(empty($m)) { return 1 / $bar; } ?> $result *= $bar is equivalent to $result = $result * $bar, and since $result is 1, ($result * $bar) is equal to $bar. And good catch with very_expensive_operation() - here's the updated code. <?php function doThis($foo, $bar, $asdf, $x, $y, $z, $m, $n, $o){ $result = 0; if(empty($m)){ return $bar; } if($n == 'one'){ if($x < $y && $x > $z){ $result = ($y * $z + $x) * $bar; }else{ $result = ($y / $z - $x) * $bar; } return $result; } if($o == 'two'){ if($x < $y && $x < $z && ($y + $z <= 10)){ $result = ($y * $z + $x) * $bar; }else{ if($x < $y && $x < $z && ($y + $z > 10)){ $result = ($y * $z + $x) * $bar; }else{ $result = ($bar + very_expensive_operation($m, $n, $o)) / $foo; } } return $result; } $result = $foo / $bar; return $result; } ?> -
[SOLVED] Programming Challenge #1 (Numbered in case there's more)
neylitalo replied to roopurt18's topic in Miscellaneous
<?php function doThis($foo, $bar, $asdf, $x, $y, $z, $m, $n, $o){ $result = 0; $value = very_expensive_operation($m, $n, $o); if(empty($m)){ return $bar; } if($n == 'one'){ if($x < $y && $x > $z){ $result = ($y * $z + $x) * $bar; }else{ $result = ($y / $z - $x) * $bar; } return $result; } if($o == 'two'){ if($x < $y && $x < $z && ($y + $z <= 10)){ $result = ($y * $z + $x) * $bar; }else{ if($x < $y && $x < $z && ($y + $z > 10)){ $result = ($y * $z + $x) * $bar; }else{ $result = ($bar + $value) / $foo; } } return $result; } $result = $foo / $bar; return $result; } ?> This is logically consistent with the original. I tried to do something with this, but couldn't find any way to clean up the conditions. if($x < $y && $x < $z && ($y + $z <= 10)){ $result = ($y * $z + $x) * $bar; }else{ if($x < $y && $x < $z && ($y + $z > 10)){ This is the logic for that section: ONLY IF: Conditions a, b, and c are all true. ONLY IF: Conditions a and b are true, and c is false ANYTHING ELSE The only place I was really able to clean anything up was in the if($n == 'one') area. If one of the first conditions is false, we know that its opposite counterpart is true - thereby making the else clause unnecessary. If the first conditions were not met, the second conditions were met by necessity. -
Hmm, is that the case throughout universities in the US, including the better ones? I've just applied for Computer Science in the UK, and it seems that most still teach C in the first year, although perhaps alongside Java. Quite a lot of them use Haskell as a starter language too - apparently it's good for teaching. Anyone happen to have any experience of that? In my Computer Science course, C and C++ are postponed until after your first year. Java was just an easy way to teach the basic concepts and techniques, and then they really teach you what you're doing in your second through fourth years.
-
If you want to stick with languages that can be easily deployed on the web, perl is a good option. It's also very, very common in the "Unix-like" world; you might even say it's a necessary skillset to have.
-
Macbook Air - imagine writing PHP on this thing
neylitalo replied to emehrkay's topic in Miscellaneous
It looks very pretty, but it also looks very fragile. My congratulations go to Apple Corp. for making everything that much smaller, though. -
[SOLVED] new to php and my sql can anyone please help me?????
neylitalo replied to artweb's topic in MySQL Help
It's a Really Bad Idea to put your mysql user information in public places. I could've logged in and deleted everything. -
Oh, I know how to do differentiation and integration (single variable only... haven't gotten to double/triple differentiation or integration yet) without a calculator - and since you have to show your steps on examinations and homework anyway, you need to know how to. The calculator comes in incredibly handy when it comes time to check your answers, though.
-
Very Limited Modification Time On A Post
neylitalo replied to phpQuestioner's topic in PHPFreaks.com Website Feedback
Technically, the content belongs to PHP Freaks. Every bit of helpful content is important, and we need to preserve as much as possible of it. (We can't be held liable for the content, but it still belongs to us - pretty neat, right? ) Very seriously though, we had big problems in the past, and setting the time limit solved those problems. Unfortunately, the best I can do is tell you that I will ask the administrators to consider extending the time limit. (It's possible that they'll try it, but I can't guarantee anything.) I realize that the short time limit has problems, and I really wish that weren't the case, but we have to choose between making things less comfortable for the readers and moderators, and making things less comfortable for the writers. Regarding posting multiple times: We understand that it's not always possible to add an extra bit of information before the two minutes are up, and we aren't irrational people. If you need to, feel free to make an additional post - the one above is fine, for example. There are a few conditions where multiple posts aren't appreciated, but these conditions are in the extremes. Duplicating posts and only changing a word or two, or posting ten times in a row are examples of situations that are likely to irritate people. -
Very Limited Modification Time On A Post
neylitalo replied to phpQuestioner's topic in PHPFreaks.com Website Feedback
It's actually set to two minutes, assuming that it got set back to the original time. See this sticky on why we have the time limit. As for correcting mistakes, that's what the Preview button is for. -
The TI89 can do symbolic differentiation and integration? Yes - a tidbit that I kept from my calculus teachers for as long as possible.
-
I think they might look better if you dropped the soft blue border around each letter. If you don't want to do that, you could also try switching to a smaller, harder, more contrasting border. Also, the main reason people use gradients on buttons is that it looks like there is a light source illuminating the top of a three-dimensional button, and casting a shadow over the bottom half. The bottom button is very odd in that respect, since the button would have to be very strangely colored. (On an entirely different note, it makes me think of sunset in a desert. If that's the effect you were shooting for, then you've got it spot on. )
-
I see this: [attachment deleted by admin]
-
For those of you who are dying to try it, but don't want to go through all the trouble of downloading packages, etc., there is an OpenSuSE LiveCD for i686 here, with links both to the actual ISO and a torrent. (Be a good netizen and use the torrent.)
-
I have quite a few theories, one of which is that everybody takes everything far too seriously. I've seen what happens when people take things too seriously (anger, jealousy, and depression), and I don't want that to happen to me. I used to be quick to anger, but then I realized that there is very little in life that really matters. (This is probably the primary cause of the sudden lax attitude I adopted towards school when I was a teenager. ) So, through the past few years, I've adopted this general thought process: Will this particular thing have any real effect on my survival or happiness if I take it seriously? (Most things do not.) If it does, then I make sure to concentrate on it or worry about it. However, if the thing in question is so insignificant as to be completely irrelevant to my basic survival or contentedness (Princeton says it's a word - good enough for me ), then it is water off of the proverbial duck's back. (There are, of course, exceptions to both rules.) The point of all of that is this: I can handle flak. It's awesome that you saw unfairness and pointed it out, but there wasn't any "drawing of straws" or anything - I just posted it. (After it was determined that there was no staff objection to the new policy, of course.)
-
Super Moderators were created with the intent that if one of the three administrators was unavailable, too busy, etc., to handle the routine forum administration details, then there would be a group of people with the privileges necessary to take on those tasks. Note that this does not mean that Super Moderators have the same privileges as Administrators, but just some very commonly used ones.
-
Use a monospace font and adjust your image size accordingly. With monospace fonts, all characters are the same width. For example: 101010101010101010 111111111111111111 As opposed to: 101010101010101010 111111111111111111
-
I have a countdown timer on my blog, wrote an article on it last night, and have been reading every KDE 4 document I can get my hands on. And I don't even use KDE. I'm a Gentooer, but KDE takes ages to compile on a laptop, and it's going to be a while before it makes its way into the package repository. I'll probably just find a livecd with it on it. Oh, come on... am I that bad?!
-
If you're planning on doing anything functional with these pieces of paper with writing on them, then yes, I'd say you have. On a similar note, I quite often use a pen and paper to outline an interface, an application's flow, or pseudocode.