-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
A lot of "small town" places still have smoking sections but more and more larger cities are banning smoking indoors - even in your own residency.
-
"protection against social engineering malware" - does that mean they are leaders in not allowing people to create addons/mods for their browser?
-
that's because we can't be bothered with stupid things like "time". Foolish Mortals.
-
there is nothing wrong with type casting if that's all it takes to validate data format. For instance, with pagination. You are already gonna have condition to make sure number is within range 1-X, so that's covered. As for the rest of it, forcing the value to int nicely covers everything else: making sure it's a whole number. Right tool for the right job, sort of thing.
-
point of a function is for a bit of code to be encapsulated with its own scope. Without that, you cannot guarantee that your function will work and/or return what it is supposed to 100% of the time. The better thing to do would be to pass those variables as arguments and return when you are done. Also your function should also validate those vars, make sure they are what they are supposed to be. Or pass validation off to a separate function...for example, you have that $user_id directly in a query... where is that coming from? Is it being validated somewhere else? Can the user somehow change/influence its value at some point in time before that query?
-
right, I more or less agree. "Right tool for the right job" is always true, no argument there. My point was that doing quite fine without a degree still involves a lot of effort on someone's part, and I sort of got the impression that OP was just looking for a reason(s) not to pursue a degree, without considering that those reasons are only legit if you actually put in the alternative efforts involved in getting to the same point w/out one.
-
See IMO he's not necessarily caring at all whether xyz is specifically worth pursuing...I think he's just tired of his future in-laws hassling him and he wants to go back and tell them going through the effort to get some piece of paper is little more useful than having something to wipe your ass with. As I have mentioned, that's fine and dandy if you actually have a "Plan B" and are pursuing it.
-
Php script to view computers hardware information
.josh replied to xionhack's topic in PHP Coding Help
If you mean "show the user their computer's specs"... $_SERVER has a few things gleaned from the client request to the server that might be helpful like browser, OS, but you won't be able to get things like RAM, HDD space, etc... and even what you can get can easily be spoofed. So the short answer is no, you can't do that with php. You would need to make and have the user download and run something on their computer (like a java applet or activeX control) that can access that sort of stuff. -
Okay comparing degrees is fine and dandy but I think the overall point here is whether a(ny) degree is worth pursuing in the first place.
-
If you have some decent people-skills, degrees are practically worthless. You can very easily learn what you need to on your own, claim you went to xyz university and land a job. Is that lying? Technically... but it's kinda hard to feel bad about it when Average Joe Company does not actually check your credentials. Universities do not offer you something you cannot get on your own. All they offer is a 3rd party seal of approval, to give a company reassurance that you can do what you say you can do. At the end of the day, companies don't give a shit about pieces of paper; they give a shit about the needed job being done. When you are sitting in an interview, they are looking for confidence. Your technical knowledge means jack shit if you aren't confident. Having some xyz paper in your hand means jack shit about whether you are a lazy bum, procrastinator, asshole, etc.. those things are just as important, and arguably MORE important than actual technical skills. That is not to say that you don't need technical knowledge. What that means is at the end of the day, it doesn't matter where you got it, if you can convince them of that. ...but I would not be so quick to tell them that getting a degree is not your style...a degree is a good way to get your foot in the door if you don't have the people skills and have gained the knowledge on your own. So telling your future in-laws that a degree is not necessary won't really work unless you do have the knowledge and know how to "work the room" - and have plans to actually put that to use (do you? have you told them?). Thing is, the very existence of this post and your thoughts within it and statement of in-laws bitching...makes me believe you don't have the people skills (..and do you even have the actual knowledge that going to college offers?). Bottom line is you aren't making as much money as they think you should be making. It sounds to me like you're working some min. wage job or not making enough money to pay the bills, or just not making the amount of money they consider to be "okay", so your in-laws are worried/bitching that you won't be able to provide for their daughter. It sounds to me you are inclined to believe that going to college is not a necessary step, but do you actually have an alternative plan? Because pointing out how others succeed w/out higher education means absolutely nothing: it does not somehow make YOU move up. It takes real effort and work just the same to do it w/out college.
-
I don't think $(document).ready waits for images to completely load...
-
Search all my posts in one board
.josh replied to The Little Guy's topic in PHPFreaks.com Website Feedback
You could write a script to scrape your Profile Info > Show Posts pages and use your own script to filter/search through them. -
I don't see anything wrong in the post thorpe made. He told you what the forum was there for, and what it was not there for. I think SA hit the nail on the head: you just think you deserve some kind of special treatment because you allegedly made a donation. This isn't our job, we don't get paid for it. We do not follow "the customer is always right" mantra around here. If you expect someone to cater to you and you're (supposedly) willing to pay for it, I suggest you hire a freelancer.
-
ninjas don't talk about being ninjas.
-
that's mostly because the script kiddies tainted it.
-
shot in the dark, but maybe all the avatars are stored in same dir and the filename already exists. I know that was (dunno if it still is) an issue with uploading files in posts.
-
Not sure you could hack your way out of a paper bag. I might if it was wet. Most guys strive to get in to wet things...
-
yes, because you have to be clean-shaven and wear nice clothes to be able to code.
-
many times, one does not know the answer because one does not know the question. IMO learning to ask questions properly will lead you to being able to answer them yourself, yes.
-
hmm are you sure your card has a tv tuner installed on it? that s-video is probably just an out jack, not a tv tuner that actually takes it as input and descrambles the signal. I did a quick search on the model you listed and it seems to list the s-video as out. You need to buy a pc tv tuner card/usb device in order to watch tv on your pc. Some of the higher end graphics cards may have that built in but most do not.
-
Different people have different ways that work best for them. Some people find it easiest to watch video tuts, some like to take snippets of code and poke at it, some are fine reading tuts online, some like having a physical book. There's no "one way" that works best for everybody. Trick is to find the way that works best for you. The thing that seems to universally not work / be acceptable is expecting people to spoon-feed you stuff. Hard fact to accept, but if you need to be spoon-fed, you obviously won't be able to make it on your own...maybe find something else out there that suits you better. Some other language, or some other thing altogether. Too many people out there think coding is some easy thing that can be picked up on the fly, but it's not. Just like not everybody can be a doctor or scientist. Just that...coding, especially something open-source like php, really easy for average joe to get access to it, and that makes average joe think easy access == easy learning.
-
if I understand correctly, you are looping through a string and replacing matches, but if it finds a match, you don't want it to keep preg_replacing stuff, yes? Use a loop, preg_replacing one at a time (use the 4th argument in the preg_replace to limit to 1 replace) and if something is replace, break out of the loop.
-
Your problem is your stars are greedy. change .* to .*? though personally I'd probably suggest using a negative char class instead: [^|]* Also since you are replacing it with nothing, no reason to capture anything in there (get rid of the parenthesis) Also judging by your example, you may need to add the s modifier to your pattern.