Go to advanced search

by PeterO
Wed Jun 20, 2018 9:48 am
Forum: Troubleshooting
Topic: Repeated external USB drive corruptions
Replies: 7
Views: 165

Re: Repeated external USB drive corruptions

The Pi cuts power to USB too early for your drives, they are probably busy saving when the Pi reaches the end of shutdown and cuts power to the USB ports. Using the external automounter (autofs5) should solve this; systemd tries to stop the automounter early in the shutdown process, so the drives h...
by PeterO
Mon Jun 18, 2018 9:46 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3710

Re: Dynamic sized arrays

jahboater wrote:
Mon Jun 18, 2018 9:30 am
Thanks for posting that, very interesting.
If you read it all, he is not that negative.
But I saw this amusing spoof in the comments :-
http://www-users.cs.york.ac.uk/susan/joke/cpp.htm
:)
That's so ...... believable :-)

PeterO
by PeterO
Mon Jun 18, 2018 9:08 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3710

Re: Dynamic sized arrays

http://www.theregister.co.uk/2018/06/18 ... plus_plus/

"What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++
Language creator calls proposals 'insanity'"

Clearly even BS realises C++ is out of control !

PeterO
by PeterO
Sun Jun 17, 2018 7:33 pm
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 10
Views: 443

Re: glDrawElements abysmally slow

SO one obvious question is how is the memory split set up ?
PeterO
by PeterO
Sun Jun 17, 2018 5:52 am
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 10
Views: 443

Re: glDrawElements abysmally slow

triangle.c looks like old GLES 1 code so I don't think it's worth trying to diagnose anything based on that.

PeterO
by PeterO
Sat Jun 16, 2018 7:47 am
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 10
Views: 443

Re: glDrawElements abysmally slow

Without seeing some example code it is hard to diagnose your problem, Can you at least post your modified "triangle" example that shows the problem ? I have some quite complex OpenGL ES code that runs fine, but it is composed of lots of small objects that each have their own call to drawElements. Pe...
by PeterO
Wed Jun 13, 2018 4:06 pm
Forum: Raspbian
Topic: Raspbian + Pi3B+ = low voltgae warning?
Replies: 4
Views: 281

Re: Raspbian + Pi3B+ = low voltgae warning?

The 3B+ needs the latest firmware as the way the low voltage detection circuity works has changed.
PeterO
by PeterO
Wed Jun 13, 2018 9:54 am
Forum: Advanced users
Topic: Write Raspbian img to external drive partition
Replies: 5
Views: 274

Re: Write Raspbian img to external drive partition

The image file is a "whole disk" image that includes a partition table with two partitions (for boot and root filesystems). It will not work if you try and write it into an existing partition. See the instructions here : https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.m...
by PeterO
Wed Jun 13, 2018 9:04 am
Forum: Advanced users
Topic: Write Raspbian img to external drive partition
Replies: 5
Views: 274

Re: Write Raspbian img to external drive partition

The image file is a "whole disk" image that includes a partition table with two partitions (for boot and root filesystems). It will not work if you try and write it into an existing partition. See the instructions here : https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md...
by PeterO
Tue Jun 12, 2018 7:22 am
Forum: Raspbian
Topic: The usbbootgui functiion
Replies: 10
Views: 468

Re: The usbbootgui functiion

It might help if you told us what "it" is exactly !
PeterO
by PeterO
Thu Jun 07, 2018 6:12 am
Forum: C/C++
Topic: Raspberry with C++ program
Replies: 17
Views: 824

Re: Raspberry with C++ program

by PeterO
Wed Jun 06, 2018 10:22 pm
Forum: Troubleshooting
Topic: Asci codes; who knows how to get 'asci codes' so the varieties of the letters a e i o u ?
Replies: 9
Views: 274

Re: Asci codes; who knows how to get 'asci codes' so the varieties of the letters a e i o u ?

:roll: Who knows how to make varieties of the letters a e i o u, which you get in Windows with the alt in combination with numbers? Thanks in advance, Monica To get letters like é I do this.... Google for "utf8 e accute" to find the utf8 value (00E9 in this case) Press Control-Shift-u which changes...
by PeterO
Wed Jun 06, 2018 10:16 pm
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3710

Re: Dynamic sized arrays

ejolson wrote:
Wed Jun 06, 2018 7:48 pm
I think the usual distinctions are

fixed length -- determined at compile time
variable length -- determined at run time
dynamic length -- changes during run time
By that list i should have called them "variable length".

PeterO
by PeterO
Tue Jun 05, 2018 9:52 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3710

Re: Dynamic sized arrays

PeterO, I just came across an idea for dynamically growing arrays called "stretchy buffers" and thought might be an ideal fit for your problem. As I said some way back up the thread I don't want or need "Dynamic" arrays (I used the wrong word), all I wanted was a clean way to deal with arrays of un...
by PeterO
Tue Jun 05, 2018 7:46 am
Forum: Off topic discussion
Topic: All Your Code Are Belong To Us (Microsoft buys Github)
Replies: 10
Views: 954

Re: All Your Code Are Belong To Us

"Acquisition will empower developers, accelerate GitHub’s growth and advance Microsoft services with new audiences"
Not sure that much of the new audience will have any use for anything from Microsoft !
PeterO
by PeterO
Mon Jun 04, 2018 8:33 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

It doesn't need a reboot, all it needs is a logout/login. If running GUI it might only need a close and open a terminal window.

PeterO
by PeterO
Mon Jun 04, 2018 6:04 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

That is a mystery to me. Pretty sure I did not do it and by the way it's done it seems very unlike me. It includes $HOME/.local/bin for example. Well, until you understand how it is working on your own system it might be a good idea to not criticise those who do understand how it works on Raspbian....
by PeterO
Mon Jun 04, 2018 5:48 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

Heater wrote:
Mon Jun 04, 2018 5:46 pm
@OeterO
What does "which stretchy-buffers" produce ?
It says:

Code: Select all

$ which stretchy-buffers
/home/heater/bin/stretchy-buffers
As expected.
In which case how did /home/heater/bin get into the PATH ? Was it there already ?
PeterO
by PeterO
Mon Jun 04, 2018 5:07 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

PeterO, Actually you've not tried it have you ? As n67 points out above it is needed and does work ! Actually I did. With a bit of code I happened to be hacking on an Ubuntu machine. Like so: $ cd $ gcc -std=c99 -o stretchy-buffers stretchy-buffers.c $ mkdir bin $ mv stretchy-buffers bin/ $ stretch...
by PeterO
Mon Jun 04, 2018 4:43 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

n67, Why do you say logout or reboot in your suggestion? That does nothing but waste time. You suggestion will not work if your ~/bin directory is not in your PATH Really, you need to look into remedial reading. Stop being an insulting, elitist plonker. Actually you've not tried it have you ? As n6...
by PeterO
Mon Jun 04, 2018 4:42 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

Don't do that. If you want to put it anywhere put it in /usr/local/bin or make your own bin directory in your home directory and add that to your PATH. OK - now you got it. It may be that there was no mention of adding to the PATH that made me misread it ! But as I just discovered that is no longer...
by PeterO
Mon Jun 04, 2018 3:49 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

n67 wrote:
Mon Jun 04, 2018 3:43 pm
Or, ...

$ cd
$ mkdir bin
$ mv path/to/hello bin
$ logout or reboot ...

Once back up:

$ cd /any/where
$ hello
Opse, misread that....
PeterO
by PeterO
Mon Jun 04, 2018 2:40 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

That's what should happen :lol: ~/Desktop/program is not a directory where bash will look for exectable files. The list of places it does look is held in a variable called PATH On this desktop machine it is this.... petero@HP173 ~ $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:...
by PeterO
Mon Jun 04, 2018 9:33 am
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 899

Re: having problem to compile C && C++ program on PI3

Parth1234 wrote:
Mon Jun 04, 2018 9:19 am
I have rasbian I am not able to compile c program on Pi. Do i need to install gcc compiler. or it has inbuilt in rasbian
gcc is installed by default.
How exactly does it fail ? Any error messages ?
PeterO
by PeterO
Mon Jun 04, 2018 9:17 am
Forum: Troubleshooting
Topic: Boot from External HDD
Replies: 3
Views: 121

Re: Boot from External HDD

Hi, This has probably been answered a 100 times, but since the process keeps changing, I need help. What I've tried: 1. Downloaded the newest raspbian image from this website and extracted it so I get the .img 2. Flashed the .img onto my external hard drive using Win32DiskImager and confirmed parti...

Go to advanced search