-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
Also you should consider your area/cost of living. In some areas of the world, you can live like a king for 8 U.S. dollars an hour. In the U.S. though, that's barely above minimum wage and no experienced freelancer would work for that.
-
OP: I priced something very similar at about $5.5k to a potential client, a while back. Told him I didn't have the availability to do it, but that's what I'd charge if I did, so he'd have some kind of idea of what he was getting himself into. The project involved a bit more than just data gathering, but I'd say about $4.5k of it was the bot(s). But... our ETAs might not be the same. Dunno how long you mean by "it takes me a long time"
-
Hey I still telnet to nethack, best game EVAR! Been playing various incarnations of it for like 25 years now.
-
Whatever. Back in my day we called it DOS. I understand it has evolved since then but...meh, can't teach an old dog new tricks such and all.
-
the op link is broken but you can find it easy enough by going to the site and searching for it. btw, I have vista 64 and I confirmed the "rumor" that it crashes explorer.exe if you try it. Problem is, it KEEPS crashing it, every time explorer.exe tries to restart. If you are like me and just had to scratch that itch, to fix it, restart windows in safe mode with command prompt, navigate to your desktop folder in DOS, and remove the directory.
-
i've been on vacation for last 2.5 weeks I do NOT look forward to logging in today and seeing the millions of emails piled up
-
clearly a case of someone too young taking on something too big and cracking.
-
if nothing else, you should be able to make a macro, yes?
-
i don't understand how an earthquake happening on the 31st is funny. I didn't know mother nature respected the calendar.
-
see that's what's throwing me off. I urban dictionaried it and saw piss/pee my pants laughing but xcoderx uses it in many different contexts that don't seem to make sense for it being that, so I'm wondering if it means something totally diff or he's just being dumb
-
and may your pubescent squeaky voice be not as shrill as the guy next to you.
-
okay i have got to know, what does "pmpl" mean? I keep wanting to think it means "pimple" but that can't be right, and you use it a lot, so it can't be a random typo.
-
how are you uploading it, what column type are you storing it in, and how are you outputting it?
-
or just explode it...
-
why don't you google it and find out? omg I'm gonna die of ironies
-
List an array in a table with predefined columns?
.josh replied to benphp's topic in PHP Coding Help
so I was randomly thinking about this, and I came up with a different approach: $list = range(1,20); $numCols = 7; $numRows = ceil(count($list) / $numCols); echo "<div style='float:left'>"; foreach ($list as $c => $item) { echo ($c % $numRows == 0)? "</div><div style='float:left'>" : ""; echo "<div style='border:solid 1px green;padding:2px'>$item</div>"; } echo "</div>"; Basically the idea here is to minimize the scripting (logic) involved in displaying the values, and let css do the formatting work, instead. I mean after all, isn't that what it's there for? There is one tiny "bug" in this that that ceil() kinda makes it want to not be forced to certain column amounts. For instance, trying to set the columns at 6 will make it format as 5 columns. The numbers are still ordered right, though. This may or may not be an issue to you, as you may not need it to be 6 columns. -
HELP All my PhP worked... moved identical files to GoDaddy.. now its hosed
.josh replied to JTapp's topic in PHP Coding Help
no. only data coming in from a form or url query string needs to be changed to $_POST['variable'] or $_GET['variable'] -
it's a matter of encapsulation, or scope. In general, you want to have a getter and setter method for your properties, and have other methods (or other things outside of the class) access and change the value of your properties through its getter and setter methods. This prevents direct access to the property. For example, let's say you have the property $weight, and you expect it to at all times be an integer. Well directly accessing it does not guarantee that it will always be type int. Anything can randomly assign some other data type to it, which could cause other methods, functions, etc... to fail, since they may depend on it being type int. So you make $weight private or protected, and you have a setter method for it, and in your setter method, you make sure that the value is cast as int, or within a certain range, format, etc.. (whatever is relevant). It's kind of same principle as form validation, except for class properties. So instead of doing $weight = 123; you would do $this->set_weight('123');
-
HELP All my PhP worked... moved identical files to GoDaddy.. now its hosed
.josh replied to JTapp's topic in PHP Coding Help
no, you don't need to change your form. you just need to change how your 3results.php handles the incoming data -
HELP All my PhP worked... moved identical files to GoDaddy.. now its hosed
.josh replied to JTapp's topic in PHP Coding Help
to clarify, your old server sucked, because it allowed register globals, and your code sucks, because it uses them. register globals being "on" means you can do this: <input name='something' type='text' /> and then in your code, simply use the variable $something to access what was entered in that form field. This is a bad thing. To illustrate, let's say I have this internal sql query. Let's say it grabs info based on an id found from a login script (user provides login info, script queries db, retrieves id associated with it): $sql = "select * from table where id = '$id'"; well with register globals on and being used, I can simply do this: http://www.yoursite.com/page.php?id=xxx and there's a good chance it will now select * where id = any id I want or let's do some sql injection ("good chance" meaning, if there's nothing on that page overwriting what I put into the url query string, before it's used in the sql query) So as you can see, register globals being enabled and using them is generally a bad idea, which is why they've been set to off by default for a long time, and are being removed. So basically what you need to do is with all of your form elements, change that $something to $_POST['something'] or $_GET['something'], depending on what form method you are using (also, params passed in the url query string are also found in in $_GET). But you should not put them directly into your sql query string. You should always sanitize your variables first. You can leave the variables in your query string as-is, by putting above the query string something as simple as this: $metode = mysql_real_escape_string($_POST['metode']); $search = mysql_real_escape_string($_POST['search']); This will escape quotes if user tries to put quotes in the form fields in attempt at sql injection, and assign that to the variables you are using in your sql query string. -
That's pretty much how it is with me. I personally code the way SA does, but depending on who I'm coding for, I try to adhere to their standards. You'd be surprised how many people out there actually believe that it somehow makes a difference in a "best practice" or "this somehow makes the code run (better)" way, and it's not worth the time or effort arguing with them about it.
-
okay, you still aren't making any sense. At best, you are talking as if I'm sitting in front of your computer screen with you pointing at stuff. Well I'm not, so I have no idea what you are talking about, because I don't know the context of your situation. Are you talking about for example, when I am making a post on a forum, if I click on for example the "bold" button, it auto-inserts the bbcode where my caret is?
-
to remove the underscore, change \w to a-zA-Z0-9 [ot] dude the new t-mobile site redesign sucks monkey balls. It has a ton of bugs in it that make me scared of seeing my bill each month. Twice now I've had to call up customer service (which is also shitty, btw), to correct some billing inconsistency due to bugs on their site. I'm glad my contract with them is over in Feb [/ot]
-
uh, well that 2nd half of my sentence mentioned you explaining to me in more detail what you are wanting...
-
i actually thought to do that but then i thought if i posted something like that, then the OP would come back and inform me that all that shit is arbitrary :/ cuz that's how it usually goes.