Re: [PHP] Re: Programmers and developers needed
See below. On 19 September 2012 04:45, Matijn Woudt wrote: > On Tue, Sep 18, 2012 at 8:52 AM, agbo onyador wrote: > > The growing power of the internet and global networks. > > (on the world’s politics, economies and even on daily life of ordinary > > people) Programmers and developers needed: > > > > > > Thanks > > > > I still cannot figure out if this is a joke or if you're really > looking for world peace.. If you're serious, you might want to stop > and take a look at Newton's third law, I quote from wikipedia: > "When a first body exerts a force F1 on a second body, the second body > simultaneously exerts a force F2 = −F1 on the first body. This means > that F1 and F2 are equal in magnitude and opposite in direction.", or > simplified "To every action there is always an equal and opposite > reaction." > It fits also easily on humans, take one step into peace, and it will > have an effect in opposite direction elsewhere. > > Also, why do you think you can make a better social network than the > already existing ones? Even the big internet giant Google can't seem > to make it's social network a big success, and you (without even an > concrete idea) can do that better? > > You might as well just open a simple website with a 'Like' button and > ask everyone to like that page, so we end up with peace!:) > Seems like an interesting point. But who says that good and evil are always cancelling each other out? To me good and evil depend on the point of view. So, what's good for A could be good for B too but bad for C, and therefore what's good for C is bad for both A and B? Not necessarily (following a implies b is not equivalent to b implies a). It gets complicated very quickly with more parties and we have more than 6 billion! One cannot really say that an action is good or bad for everyone following your argument. However, world peace, less pollution and equal or less diverse wealth would be good for everyone, because of less crime and less risk of loosing everything. Maybe it would trigger something bad at the other end of the universe, but the universe is pretty big (so I've heard :-), so what do we care? I vote for world peace in that sense. Strongly disagree with people saying "Someone else would do it if I didn't.". That's just a lame excuse to get rich quick, like I heard from people who sell weapons. Selling ads is not nearly as bad. It's just annoying if they are too intrusive. Google's ads are not so intrusive and look what great things Google does with the money they make in terms of Open Source. I would say Google is the programmers' friend and if anything the lesser evil. Sure they have ads all over, but I haven't yet been annoyed by them as much as other popup ads. Besides that I wouldn't be where I am today without Google (I'm not employed by them in case you're wondering). Sorry to make this a serious discussion if you take it that way. :-) Just hope to get some neurons firing. Twitter: @geekdenz Website: http://www.thheuer.com > > - Matijn > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Re: Programmers and developers needed
On Wed, Sep 19, 2012 at 11:53 AM, German Geek wrote: > See below. > > On 19 September 2012 04:45, Matijn Woudt wrote: >> >> On Tue, Sep 18, 2012 at 8:52 AM, agbo onyador wrote: >> > The growing power of the internet and global networks. >> > (on the world’s politics, economies and even on daily life of ordinary >> > people) Programmers and developers needed: >> > >> > >> > Thanks >> > >> >> I still cannot figure out if this is a joke or if you're really >> looking for world peace.. If you're serious, you might want to stop >> and take a look at Newton's third law, I quote from wikipedia: >> "When a first body exerts a force F1 on a second body, the second body >> simultaneously exerts a force F2 = −F1 on the first body. This means >> that F1 and F2 are equal in magnitude and opposite in direction.", or >> simplified "To every action there is always an equal and opposite >> reaction." >> It fits also easily on humans, take one step into peace, and it will >> have an effect in opposite direction elsewhere. >> >> Also, why do you think you can make a better social network than the >> already existing ones? Even the big internet giant Google can't seem >> to make it's social network a big success, and you (without even an >> concrete idea) can do that better? >> >> You might as well just open a simple website with a 'Like' button and >> ask everyone to like that page, so we end up with peace!:) > > > Seems like an interesting point. But who says that good and evil are always > cancelling each other out? To me good and evil depend on the point of view. > So, what's good for A could be good for B too but bad for C, and therefore > what's good for C is bad for both A and B? Not necessarily (following a > implies b is not equivalent to b implies a). It gets complicated very > quickly with more parties and we have more than 6 billion! One cannot really > say that an action is good or bad for everyone following your argument. > However, world peace, less pollution and equal or less diverse wealth would > be good for everyone, because of less crime and less risk of loosing > everything. Maybe it would trigger something bad at the other end of the > universe, but the universe is pretty big (so I've heard :-), so what do we > care? I vote for world peace in that sense. Do I hear a vote for communism? That didn't really work out in the past, so why would it now? > > Strongly disagree with people saying "Someone else would do it if I > didn't.". That's just a lame excuse to get rich quick, like I heard from > people who sell weapons. Selling ads is not nearly as bad. It's just > annoying if they are too intrusive. Google's ads are not so intrusive and > look what great things Google does with the money they make in terms of Open > Source. I would say Google is the programmers' friend and if anything the > lesser evil. Sure they have ads all over, but I haven't yet been annoyed by > them as much as other popup ads. Besides that I wouldn't be where I am today > without Google (I'm not employed by them in case you're wondering). I absolutely agree. > Sorry to make this a serious discussion if you take it that way. :-) Just > hope to get some neurons firing. Hmm.. Remember this is a PHP list, but since traffic is pretty low lately, it's ok I guess.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Programmers and developers needed
On 12-09-19 06:07 AM, Matijn Woudt wrote: On Wed, Sep 19, 2012 at 11:53 AM, German Geek wrote: See below. On 19 September 2012 04:45, Matijn Woudt wrote: On Tue, Sep 18, 2012 at 8:52 AM, agbo onyador wrote: The growing power of the internet and global networks. (on the world’s politics, economies and even on daily life of ordinary people) Programmers and developers needed: Thanks I still cannot figure out if this is a joke or if you're really looking for world peace.. If you're serious, you might want to stop and take a look at Newton's third law, I quote from wikipedia: "When a first body exerts a force F1 on a second body, the second body simultaneously exerts a force F2 = −F1 on the first body. This means that F1 and F2 are equal in magnitude and opposite in direction.", or simplified "To every action there is always an equal and opposite reaction." It fits also easily on humans, take one step into peace, and it will have an effect in opposite direction elsewhere. Also, why do you think you can make a better social network than the already existing ones? Even the big internet giant Google can't seem to make it's social network a big success, and you (without even an concrete idea) can do that better? You might as well just open a simple website with a 'Like' button and ask everyone to like that page, so we end up with peace!:) Seems like an interesting point. But who says that good and evil are always cancelling each other out? To me good and evil depend on the point of view. So, what's good for A could be good for B too but bad for C, and therefore what's good for C is bad for both A and B? Not necessarily (following a implies b is not equivalent to b implies a). It gets complicated very quickly with more parties and we have more than 6 billion! One cannot really say that an action is good or bad for everyone following your argument. However, world peace, less pollution and equal or less diverse wealth would be good for everyone, because of less crime and less risk of loosing everything. Maybe it would trigger something bad at the other end of the universe, but the universe is pretty big (so I've heard :-), so what do we care? I vote for world peace in that sense. Do I hear a vote for communism? That didn't really work out in the past, so why would it now? Not to say I'm all in for communism... but communism failed for the same reason capitalism is failing. Corruption! Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Programmers and developers needed
Not to say I'm all in for communism... but communism failed for the same reason capitalism is failing. Corruption! Here might be a way to deal with this political issue, while keeping on topic with the "world peace PHP project": I've had this idea for years, but why not start a "technocracy" or "ultra social-democracy" that runs on a decentralized server, kind of like P2P (Kad, Bitcoins, etc.) -- only problem being the logic running the system (say, PHP scripts) would need to be programmed as a whole (so anyone could re-program the structure of such a social system, so it functioned the way everyone wanted). Think Wikipedia, but completely decentralized -- nobody could "corrupt" the system unless they were a majority. This seems to be the direction we're heading in -- what with hidden corruption, and most governments being slow processing laws, reforms, etc. May seem like a far-fetched idea, but I see it being one of the final things to come in a rapidly evolving technological society, replacing most republics with a social system more run by the people. Nobody would ever again complain about stuff not getting done, when mobs of people could actually change the system the way they wanted -- and quicker. Socialism/communism/Marxism in the past has never worked, because a minority-elite would eventually take over and convert it into a totalitarian state with only the mere façade of socialism we see in countries today (not exactly the idea Karl Marx had in mind). -- Doug Heimbecker d...@tac.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Programmers and developers needed
On Wed, Sep 19, 2012 at 4:50 PM, Doug Heimbecker wrote: >> Not to say I'm all in for communism... but communism failed for the same >> reason capitalism is failing. Corruption! > > > Here might be a way to deal with this political issue, while keeping on > topic with the "world peace PHP project": > > I've had this idea for years, but why not start a "technocracy" or "ultra > social-democracy" that runs on a decentralized server, kind of like P2P > (Kad, Bitcoins, etc.) -- only problem being the logic running the system > (say, PHP scripts) would need to be programmed as a whole (so anyone could > re-program the structure of such a social system, so it functioned the way > everyone wanted). Think Wikipedia, but completely decentralized -- nobody > could "corrupt" the system unless they were a majority. This seems to be the > direction we're heading in -- what with hidden corruption, and most > governments being slow processing laws, reforms, etc. "unless they were a majority" is the thing that bothers me. Getting a majority is hard, take for example the Dutch Politics [1]. Our country is now led by a parliament of 10 different political parties. Getting things done now is really hard, because each party has their own goals and finding a majority is for almost impossible. If all the parties were strictly following their own will, there would probably only a handful things done. The only way to get things done now is by making compromises. Another example is of course religion [2]. You can see that there's no majority there. Christianity being the largest with 33%. Even if that would be over 50%, you won't get peace if you say Christianity is the only correct religion.. - Matijn [1] http://en.wikipedia.org/wiki/Politics_of_the_Netherlands [2] http://en.wikipedia.org/wiki/Religion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stream_read function for registered wrapper class.
I have a very large XML file that I have to process. It's about 7 GB. Some of the individual elements that I need are larger than 8192 bytes. I'm trying to write a Stream wrapper class to give me a specific element at a time, but I keep running into issues with the stream wrapper and fread, stream_get_content functions. fread will never return more than 8192 bytes (is that a bug?), so I can't use that at all. When I use stream_get_content, and pass in 16384, weird things happen in my stream_read method. If I return 16384 bytes, it gets truncated to 8192, and the stream_read method is called again and again, until the total returned is 16384. Normally, stream_read is called twice in this case (since it "returns" 8192 both times). This really screws up what I'm trying to do with this stream wrapper. Admittedly, I don't know much about stream wrappers. This is my first one, and I can't find much relevant documentation on them. But it doesn't seem like it's working correctly to me. If I ask for 16384 bytes with fread, shouldn't it give me 16384 bytes? And if I return 16384 bytes when I use stream_get_contents, shouldn't it return 16384 bytes the first time? Thanks for any help. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stream_read function for registered wrapper class.
On Wed, Sep 19, 2012 at 12:43 PM, Rob wrote: > I have a very large XML file that I have to process. It's about 7 GB. > Some of the individual elements that I need are larger than 8192 bytes. > I'm trying to write a Stream wrapper class to give me a specific element > at a time, but I keep running into issues with the stream wrapper and > fread, stream_get_content functions. You could just use the XML Parser (SAX) as it doesn't require loading the entire document into memory: http://php.net/manual/en/book.xml.php Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Re: Programmers and developers needed
On 19 Sep 2012 at 16:32, Matijn Woudt wrote: > "unless they were a majority" is the thing that bothers me. Getting a > majority is hard, take for example the Dutch Politics [1]. Our country > is now led by a parliament of 10 different political parties. Getting > things done now is really hard, because each party has their own goals > and finding a majority is for almost impossible. If all the parties > were strictly following their own will, there would probably only a > handful things done. The only way to get things done now is by making > compromises. And so Dutch governments only last short periods of time, and it takes a long time to create a coalition. This is why Proportional Representation is such a bad idea. Better to have strong government with a clear mandate, and if you don't like it, vote it out next time. By the way what does any of this have to do with PHP? Nothing, I think. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stream_read function for registered wrapper class.
On Wed, Sep 19, 2012 at 6:43 PM, Rob wrote: > I have a very large XML file that I have to process. It's about 7 GB. > Some of the individual elements that I need are larger than 8192 bytes. > I'm trying to write a Stream wrapper class to give me a specific element > at a time, but I keep running into issues with the stream wrapper and > fread, stream_get_content functions. > > fread will never return more than 8192 bytes (is that a bug?), so I can't > use that at all. When I use stream_get_content, and pass in 16384, weird > things happen in my stream_read method. If I return 16384 bytes, it gets > truncated to 8192, and the stream_read method is called again and again, > until the total returned is 16384. Normally, stream_read is called twice > in this case (since it "returns" 8192 both times). > > This really screws up what I'm trying to do with this stream wrapper. > Admittedly, I don't know much about stream wrappers. This is my first > one, and I can't find much relevant documentation on them. But it > doesn't seem like it's working correctly to me. If I ask for 16384 bytes > with fread, shouldn't it give me 16384 bytes? And if I return 16384 > bytes when I use stream_get_contents, shouldn't it return 16384 bytes the > first time? > > Thanks for any help. > > -- Rob I'm not sure if I'm missing something here, but PHP manual clearly states that when using fread on streams you need to call fread in a loop to get the amount of bytes required, as it will only return 1 packet at a time (TCP/IP are usually 8192 bytes). (Though Adam is probably right that the builtin XML parser is the best way) - Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stream_read function for registered wrapper class.
Sorry, I just realized my replies were going to email instead of the news group. I'm going to try upgrading to php 5.4 so I have access to this: http://php.net/manual/en/function.stream-set-chunk-size.php And see if that fixes some of my problems. Thanks for the suggestions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: stream_read function for registered wrapper class.
Followup: I installed php 5.4.7 and tried using stream_set_chunk_size. It is now working as expected with stream_get_contents. Here is my stream wrapper class: http://pastebin.com/aGhxSuQh Here is how it is used: http://pastebin.com/jd42uxiy Hope that helps someone else that is having issues with stream wrappers. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programmers and developers needed
On 2012-09-18, at 4:36 PM, Paul M Foster wrote: > [snip] > I've gone so far as to force my computer/browser to > believe most common providers of ad content are localhost, making > most requests for ad content yield 404 errors. I thought that ^^^ sounded really clever. Care to share your hosts file? ;-) Thanks, -Govinda -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programmers and developers needed
Hi, Can we let this thread die now? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programmers and developers needed
Aaron Holmes wrote: >Hi, >Can we let this thread die now? But, but, what about world peace and stuff?! -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programmers and developers needed
Op 20 sep. 2012 01:45 schreef "Ashley Sheridan" het volgende: > > > > Aaron Holmes wrote: > > >Hi, > >Can we let this thread die now? > > But, but, what about world peace and stuff?! > If it ever was alive, it will die the same way as this thread, after a long discussion...