-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
If you want to have your script do something different for each name, then you are going to have to specifically address each name.
-
your $save_file just has the path. Where's the actual filename?
-
$fp = "[Querying whois.arin.net] [Redirected to whois.ripe.net:43] [Querying whois.ripe.net]"; preg_match_all('~\[Redirected to ([^:]*):~i',$fp,$matches); echo $matches[1][0];
-
use \s+ instead of \s{2}
-
They should put something like that in the manual. Seems like something that would be helpful to know.
-
that's an outdated version. I'm not on it.
-
...and then your pay rate will go down. Easier the work is, the lower the pay. Double edged sword.
-
Suggestion: Project Announcement Forum?
.josh replied to wilco's topic in PHPFreaks.com Website Feedback
If you are wanting to announce your project for the purpose of getting people to help on the project (paid or non-paid) you could post in the freelance section. But FYI: "I'm starting a new project, check it out here! <some link>" == BAD "I'm starting a new project, anybody wanna help out? contact me at ..." == GOOD -
Funny most people believe in and worship the almighty dollar. They don't just outright label it as such.
-
Large IMAP loop starts to hang around 20,000 emails...
.josh replied to youneek's topic in PHP Coding Help
holy crap! I bet that sure would piss the guys off at the data center. Would it make other servers connected to it blow up too?? -
Can you show how you implemented it? It should look something like this: $fcontent = file('./msgs.txt'); // you can use your for loop but this is what foreach loops are really there for... foreach ($fcontent as $line) { $line = preg_replace('~^\d+\.\s+~','',$line); echo $line . "<br/>"; } taquitosensei's code might work for you, but if it does, it would be a lucky shot. It would only work if that's actually a tab in there. The \s in my preg_replace matches tabs or spaces.
-
as far as why your current solution doesn't work, my first guess would be that if your file starts at 1. , well you start your counter at 1 and increment it before your explode/implode so it's always off by one so nothing actually gets exploded. Or it does, but since the delimiter doesn't match in the explode, the whole line gets put into one element.
-
Allowing JavaScript to execute before following a link
.josh replied to hellonoko's topic in PHP Coding Help
yep. you would have to do that all clientside. You would have to be more specific than "follow the link" to get a more detailed answer, but for instance, if you don't want the link to be displayed until some js is executed, you could a) put the js into an onload call in your body tag or a document.load event listener, have the link display by document.write after the js code executes, b) have js change the visibility of the link (by making some div around it visible or something, once it is done executing. But no, you cannot have that logic in php. php looks at js as plain text to be sent to the browser. -
The point pfm was making is why do you need that info in the first place. Not sure if it's possible (can't try, not on my computer), but it might be possible to grab it with javascript, using document.getElementById('elementidhere').value (and then sending it as a hidden field value) Or maybe possibly using .innerHTML on some surrounding tag and regexing for it. I mean, if it's physically in the browser window, theoretically you should be able to somehow pluck it out using javascript.
-
First you said you would do it and now you're saying you may not actually do it. So you believe in taking the life of an innocent child for another belief? When does it stop? Would you blow up New York City for your belief? Read my followup post on that. I knew you'd spot that. but that's my point. It's not possible to simultaneously believe in conflicting things. You either believe in one thing or the other.
-
To clarify that bolded part: In other words, I can say right now (not being in the situation) that I wouldn't say computer. But I have the luxury of not being in that situation. I may find out in a situation like that that my faith isn't as great as I claim right now. That's why I shy away from making claims about my faith. Instead, all I can say is that God promises that He will not give us more than we can handle, or put us into situations that we can't handle. So if you do truly believe in God, and you do find yourself in that situation, then remember that.
-
Okay I'm not saying that doing the right thing is the easy thing. In fact, the bible says doing the right thing is actually the harder thing, the narrow path, etc.. You would not be okay if your child decides to do what you want them to do, whenever they feel like it. Well, you would, depending on the situation, because you recognize that you are not perfect. But God is perfect. So if He is perfect, there would be no instances of you saying "I know you said this, but..." Therefore, doing what God tells you to do should trump everything else, because God is perfect and knows everything and the bigger picture, and you do not. I have 4 kids. They do stupid shit all the time. I'd say 99% of the time they do something stupid, it's because they don't know any better. But they think they do. Kids think they know and understand everything, but they don't. That doesn't change when you grow up. At least, not from God's level of experience. Adults are prone to think they know everything just the same. So to make a long story short, if I truly believe in God, and saying "computer" is a no-no to Him, and someone was going to kill my daughter if I didn't say it, then I would not say it. If I were to say it, that would mean that I was putting my daughter above God. But I can't really believe that God is, well, God, if someone or something could be put above Him. That doesn't mean it's an easy thing to do. And that doesn't mean I'd actually do it in that situation. And that doesn't mean that God won't forgive you if you were acting out of ignorance. But we aren't exactly talking about acting out of ignorance; you are right: you can't just say "hey I can do bad things and just go to confession later."
-
all I'm saying is that if you really believe in God (the end-all-be-all of everything) and you really believe that when he says something is wrong and if you do that wrong thing, you're in trouble..if you turn around and did it, then you can't say that you really believed that previous stuff. You can't say you don't care, because if God is the end-all-be-all, then there's nothing beyond that. It's impossible not to care, unless you don't really believe in the first place. If God says he's going to take care of you, and something comes along that would be a bad thing, ignore it. If you really believe God is going to take care of you, he's not a hypocrite. He's not gonna tell you not to do this, but make this the only thing you can survive by. So if you believe you have no other choice, then you can't honestly say you believe what God says at the same time.
-
no that's rigged. The way you have it setup, your first elseif implies ($a && $b) is true by virtue of the previous being not true. that's playing word games. You can play word games all day long like that, spin it how you want to sleep better at night. people do it all the time. "I just cut 20,000 jobs so I can get a bigger paycheck. I'm not REALLY a bad guy, I'm giving 20,000 people an opportunity to find a better job, so really, I'm doing something GOOD." That sort of thing.
-
because believing in "A" and believing in "A or B" is not the same thing. Or look at it in programming terms. if (A) is not the same as if (A || B)
-
well I don't think money vs. morals is really a debatable thing, when it comes to deciding for yourself. If you really believe in something, it would outweigh the money. So if money weighs in more than the moral, then you can't really say it was something you really believed in to begin with.
-
I personally will not do pr0n related work. I did do some work for a site that offered lingerie. But it was pretty tasteful, like a mom-and-pop shop version of Victoria's Secret. I don't mind doing stuff like that. I would not do it for moral reasons mostly, but even if I had no moral issues with it, you have to consider your professional image. What you put on your resume has a big impact on getting other jobs. So you have to decide whether having a list of pr0n related jobs are going to help or hurt you as far as getting other jobs. But, I do know a lot of coders who have no issues whatsoever doing it. As far as they are concerned, code is code, and they have nothing to do with what its being used for, therefore, not a moral issue. I tend to disagree with that logic. I mean, I personally could not sleep at night if I helped build the atom bomb, even if I wasn't the one who pushed the button. But again, that's just me.