Re: [SLUG] making fgets fail during testing
> - power off you hard drive in process to get real read failure (EIO), if > you have nothing to loose on your hdd :) > > Putting the file on an (old) flash drive and pull it midway might be a bit easier (and safer). Could also try and read a file off a failed drive if you still have one lying around, always some interesting results doing that. Menno -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] A couple of electronics projects
I sometimes go to a meeting of hobby electronics enthusiasts in the City. they meet once a month. Its called The PIC Club but its not exclusive to people using Microchip's PIC MCU, people take their Arduino's and ARM based MCUs, and even the odd Parallax Propeller as well. http://www.sesame.com.au/picclub/ On Fri, Sep 13, 2013 at 10:15 AM, miloska wrote: > You can get help if you want to do it yourself at http://robodino.org/ > > Saturday is the safest bet to show up at the place and the mailing list is > open in 24/7. > > I guess you can also find freelancer folks on the mailing list if you just > want to have it done. > > Also if you give some more details I may have some idea how doable it is. > > > > On Fri, Sep 13, 2013 at 9:52 AM, Felix Sheldon >wrote: > > > > > Hi Ben, > > > > I'm in Newcastle, but I can probably offer some advice. > > > > What sort of things do you want to do? > > > > > > -- > > Felix > > > > > > > > > > On 13/09/13 08:01, Ben Donohue wrote: > > > Hi all, > > > > > > I've got some ideas on a couple of projects but I need the help of > > > someone who knows how to design electronics circuits. > > > > > > Also could involve an Arduino or Raspberry Pi as the brains behind > it... > > > don't know as yet... early stages. > > > > > > Anyway, anybody out there in Sydney able to help / point me in the > right > > > direction / recommended sites / whatever? > > > > > > I'm in Ashbury, Inner West. > > > > > > Thanks, > > > Ben > > > > > > > > > > -- > > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > > > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- Kind Regards, Christopher Barnes e. chris.p.bar...@gmail.com -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] A couple of electronics projects
You can get help if you want to do it yourself at http://robodino.org/ Saturday is the safest bet to show up at the place and the mailing list is open in 24/7. I guess you can also find freelancer folks on the mailing list if you just want to have it done. Also if you give some more details I may have some idea how doable it is. On Fri, Sep 13, 2013 at 9:52 AM, Felix Sheldon wrote: > > Hi Ben, > > I'm in Newcastle, but I can probably offer some advice. > > What sort of things do you want to do? > > > -- > Felix > > > > > On 13/09/13 08:01, Ben Donohue wrote: > > Hi all, > > > > I've got some ideas on a couple of projects but I need the help of > > someone who knows how to design electronics circuits. > > > > Also could involve an Arduino or Raspberry Pi as the brains behind it... > > don't know as yet... early stages. > > > > Anyway, anybody out there in Sydney able to help / point me in the right > > direction / recommended sites / whatever? > > > > I'm in Ashbury, Inner West. > > > > Thanks, > > Ben > > > > > > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] A couple of electronics projects
Hi Ben, I'm in Newcastle, but I can probably offer some advice. What sort of things do you want to do? -- Felix On 13/09/13 08:01, Ben Donohue wrote: > Hi all, > > I've got some ideas on a couple of projects but I need the help of > someone who knows how to design electronics circuits. > > Also could involve an Arduino or Raspberry Pi as the brains behind it... > don't know as yet... early stages. > > Anyway, anybody out there in Sydney able to help / point me in the right > direction / recommended sites / whatever? > > I'm in Ashbury, Inner West. > > Thanks, > Ben > > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] making fgets fail during testing
Morning, On Fri, Sep 13, 2013 at 8:33 AM, Ashley Maher < ashley.ma...@didymodesigns.com.au> wrote: > > What can I put in a test text file to get fgets to fail? > > Can hand indicate the condition fail but would like to trigger a "real" > read failure well into the file. A lot of references about testing for > failure but nothing how to trigger fgets to fail. > > What sort of failure do you expect? You may - seek the pointer at the end of file just before fgets to get eof error - lock part of the file exclusively from another process to get EAGAIN, if mandatory file locking is supported and file was opened with non-blocking flag. - open a pipe instead of regular file and kill other end in process. - send a signal to the process while it's waiting for read (pipe of socket) to get EINTR. - power off you hard drive in process to get real read failure (EIO), if you have nothing to loose on your hdd :) http://www.dataparksearch.org/ Twitter: @Maxime2 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] making fgets fail during testing
Hi Ashley, One thing you could try is putting non-ASCII characters in the file, i.e. above 0x7f. I haven't played with PHP, but in python, if you are using ASCII encoding for text strings and try to load a non-ASCII character into a string, an exception is raised. Better still, tell PHP you are using UTF-8 encoding for Unicode characters and then stuff in some badly formed UTF-8 characters. Some random bytes ought to do it, as UTF-8 is fairly strict. Let us know how you go. Text encoding and decoding has always been a PITA. cheers rickw Ashley Maher wrote: Morning, Posting here as the coders list is now dead. Using php in a web app. Reading in a large text file. Using fgets to read line by line for processing. What can I put in a test text file to get fgets to fail? Can hand indicate the condition fail but would like to trigger a "real" read failure well into the file. A lot of references about testing for failure but nothing how to trigger fgets to fail. Thanks for any hints. Regards, Ashley -- Rick Welykochy || Vitendo Consulting The chief source of problems is solutions. -- Eric Sevareid -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] coders list
On 13/09/2013 07:33, Ashley Maher wrote: Is the coders list now defunct?? Certainly looks it. As such, I'd say coding questions are now on-topic for this list. :-) -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] A couple of electronics projects
Hi all, I've got some ideas on a couple of projects but I need the help of someone who knows how to design electronics circuits. Also could involve an Arduino or Raspberry Pi as the brains behind it... don't know as yet... early stages. Anyway, anybody out there in Sydney able to help / point me in the right direction / recommended sites / whatever? I'm in Ashbury, Inner West. Thanks, Ben -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] making fgets fail during testing
Morning, Posting here as the coders list is now dead. Using php in a web app. Reading in a large text file. Using fgets to read line by line for processing. What can I put in a test text file to get fgets to fail? Can hand indicate the condition fail but would like to trigger a "real" read failure well into the file. A lot of references about testing for failure but nothing how to trigger fgets to fail. Thanks for any hints. Regards, Ashley -- == Ashley Maher Director Didymo Designs Phone: 1300 762 599 (+61 2) 8090 2847 (+61 2) 4203 2716 Mob: 0412 351 451 Fax: (+61 2) 8002 0071 Web: http://www.didymodesigns.com.au P.O. Box 410 North Sydney NSW 2059 P.O. Box 1122 Wollongong NSW 2500 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] coders list
Good Morning, Is the coders list now defunct?? Regards, Ashley -- == Ashley Maher Director Didymo Designs Phone: 1300 762 599 (+61 2) 8090 2847 (+61 2) 4203 2716 Mob: 0412 351 451 Fax: (+61 2) 8002 0071 Web: http://www.didymodesigns.com.au P.O. Box 410 North Sydney NSW 2059 P.O. Box 1122 Wollongong NSW 2500 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html