Go to advanced search

by Paeryn
Tue Oct 08, 2019 2:52 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1148
Views: 55400

Re: Liberation through Computer Literacy

So what I'm hearing is Python's internal BIGINT is crap and GMP should be installed by default to make the language usable? No, Python's multi-precision integers are fine for most cases, you probably won't notice much difference in performance to GMP's until you get to really big numbers. The bigge...
by Paeryn
Mon Oct 07, 2019 3:17 pm
Forum: General discussion
Topic: RPI4: Why is everything still 32-bit?
Replies: 180
Views: 6106

Re: RPI4: Why is everything still 32-bit?

My plan is to win Powerball, buy the Pi foundation and force deprecation of 32 bit. If so many people love it let them maintain it while the supported OS goes 64 bit. Actually I'd probably just use the money to make a RISCV board This post is 100% humor Whilst humour, might be worth saying that you...
by Paeryn
Mon Oct 07, 2019 1:41 am
Forum: General discussion
Topic: piRoot: A way to run x86_64 Debian apps on Raspbian
Replies: 76
Views: 2757

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

One mystery someone may be able to explain to me - since 'sudo apt-get install qemu-user-static' I can now run any X86 Linux binaries. Eg FASM and FASMARM, outside the chroot piRoot sets up. Why ? Is it that installing qemu-user-static has enabled doing that or is it something which installing and ...
by Paeryn
Sun Oct 06, 2019 9:46 pm
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 478

Re: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]

Yes you can do it there, but its property can also be set is in qtcreator's form editor which will automatically set it in the window's ui_setupUi(), I've just tried it...
QPlainTextEdit.png
QPlainTextEdit
QPlainTextEdit.png (29.49 KiB) Viewed 192 times
by Paeryn
Sun Oct 06, 2019 9:34 pm
Forum: C/C++
Topic: qtcreator: how to write in a text frame widget by the program? [solved]
Replies: 12
Views: 426

Re: qtcreator: how to write in a text frame widget by the program?

You can move to an absolute position within the document with QTextCursor::setPosition(int pos, QTextCursor::MoveMode m = MoveAnchor) Setting it to an arbitrary line and column (assuming by line y you mean block y and by column x you mean xth character of block y ) then you could always do this to p...
by Paeryn
Sun Oct 06, 2019 12:37 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 478

Re: qtcreator: memory overflow in text box (PlainTextEdit) ?

As to the text box overflow (this topic), that is really an issue currently because in that case it comes to data/memory overflow as actually expected, so I need to clean up the first lines of the text box repeatedly - but how to do that? Or have anoter mobitor box instead? You can limit the amount...
by Paeryn
Sat Oct 05, 2019 8:12 pm
Forum: Beginners
Topic: [Solved] Run task every 5 mins starting at 3 minutes past the hour
Replies: 6
Views: 318

Re: [Solved] Run task every 5 mins starting at 3 minutes past the hour

Are you sure Stretch allowed the +n notation? Debian uses Vixie-cron and although they added a few extras over the original, I've never known them to use that. It would be strange if they'd added it for Stretch and then reverted it back for Buster. I don't think cronie allows that syntax either, can...
by Paeryn
Sat Oct 05, 2019 9:09 am
Forum: C/C++
Topic: qtcreator: how to write in a text frame widget by the program? [solved]
Replies: 12
Views: 426

Re: qtcretor: how to write in a text frame widget by the program?

thank you! as my EditBox is called "PlainTextEdit", so IIUC: one needs 2 commands to write 1 string after the other for write in PlainTextEdit (flowing text) #define Qwrite(str) { ui->PlainTextEdit->textCursor(); ui->PlainTextEdit->insertPlainText(str); } You don't need the ui->PlainTextEdit->textC...
by Paeryn
Sat Oct 05, 2019 1:53 am
Forum: C/C++
Topic: qtcreator: how to write in a text frame widget by the program? [solved]
Replies: 12
Views: 426

Re: qtcretor: how to write in a text frame widget by the program?

There is insertPlainText() which inserts the text at the current cursor position (if the cursor is a selection then the selection is replaced with the text). The edit box's current cursor can be obtained with EditBox->textCursor() Infact insertPlainText() is a convenience function which does EditBox...
by Paeryn
Fri Oct 04, 2019 11:40 am
Forum: Troubleshooting
Topic: Python Script will run in Thonny but not CLI or autorun method
Replies: 8
Views: 196

Re: Python Script will run in Thonny but not CLI or autorun method

I have one more question. (Esp since you have been SO helpful). I want the program to ignore input on the button (GPIO) for the length of the music, (about 25sec) so that it doesn't play it over itself. I have seen a couple of methods of the "lock out" - but what would you recommend? thank you!! I'...
by Paeryn
Fri Oct 04, 2019 1:41 am
Forum: Troubleshooting
Topic: USB 3 SPEED IS LOW
Replies: 8
Views: 296

Re: USB 3 SPEED IS LOW

HI, I connected RP4 to a custom board with chip, USB3.0 speed is very low , I tried with RO****4 and fine with that!!!!! why you claim USB3.0 while there was a problem with that? :-< angryyyyyyyyyyyyyyyyyyyyy What do you mean by "very low"? What are you trying to do? They claim USB 3.O because that...
by Paeryn
Thu Oct 03, 2019 1:58 pm
Forum: Python
Topic: GUI saving files problem
Replies: 3
Views: 94

Re: GUI saving files problem

The text file shows this rather than the channel values in MFCs: 2019-09-12 11:52:11 <fuction ADClogall at 0x75fe0e88> The fact that it says "<function ADClogall at 0x75fe0e88>" rather than any values suggests that in the call to writetotextfile you missed out the brackets after ADClogall causing i...
by Paeryn
Wed Oct 02, 2019 6:44 pm
Forum: Troubleshooting
Topic: Python Script will run in Thonny but not CLI or autorun method
Replies: 8
Views: 196

Re: Python Script will run in Thonny but not CLI or autorun method

Thank you, what if I want the program to run indefinitely? It's supposed to be part of a kiosk so it would need to run essentially forever. signal.pause() only returns after a signal has been caught. Typically the only signal you are likely to get is SIGINT which Python catches and throws as a Keyb...
by Paeryn
Tue Oct 01, 2019 8:33 pm
Forum: General discussion
Topic: Raspberry Pi CPU usage management
Replies: 2
Views: 209

Re: Raspberry Pi CPU usage management

How are you updating the values in your GUI? I've seen people do this by creating new widgets / elements over the top of previous ones each time rather than updating the existing ones (or not deleting the existing ones before adding the replacements) which will slowly bring things to a crawl.
by Paeryn
Mon Sep 30, 2019 1:57 pm
Forum: C/C++
Topic: geany compilation failure
Replies: 9
Views: 377

Re: geany compilation failure

i have been trying to compile a program in geany but it is showing errors. i have included the wiringPi library in the compile and build comands. here are the error messages: /bin/sh: 1: wiringPi: not found gcc: fatal error: no input files compilation terminated. From those errors it looks like you...
by Paeryn
Thu Sep 26, 2019 9:48 pm
Forum: Troubleshooting
Topic: Python Script will run in Thonny but not CLI or autorun method
Replies: 8
Views: 196

Re: Python Script will run in Thonny but not CLI or autorun method

If that is all of the program then you need to keep the program running otherwise when running it from the command line the program immediately exits after setting the callback. It keeps running in Thonny (or IDLE) because from IDEs Python drops to interactive mode when your program ends rather than...
by Paeryn
Thu Sep 26, 2019 2:48 pm
Forum: C/C++
Topic: C++ in real world, is it only me, or real world C++ is different from C++ in books and conferences?
Replies: 20
Views: 1153

Re: C++ in real world, is it only me, or real world C++ is different from C++ in books and conferences?

Good luck. Rust has got to be the most counter intuitive language I've ever encountered. "foobar".to_string() just looks absurd, and folks will give you three different ways of doing it right! In my experience it doesn't quite deliver the safety, clarity, and performance it promises. I must have be...
by Paeryn
Thu Sep 26, 2019 2:04 pm
Forum: General discussion
Topic: problem running a program
Replies: 9
Views: 291

Re: problem running a program

It looks like you've taken working code written in English and changed the text into your own language (Spanish?). The problem you have is that argsparser creates names based on the options passed to it which you have in Spanish but you test for the options using English names, Python can't do that ...
by Paeryn
Wed Sep 25, 2019 8:40 am
Forum: General discussion
Topic: Gap in Raspbian images
Replies: 10
Views: 433

Re: Gap in Raspbian images

Generally it's down to optimisations for the SD card like trying to make sure the two partitions are in different erase blocks. This reduces the wear and hopefully limits the erase/write block operations on one partition from affecting another.
by Paeryn
Wed Sep 25, 2019 12:31 am
Forum: Python
Topic: Simple password input
Replies: 17
Views: 363

Re: Simple password input

I know I am running Python3 because I change it in the bashrc file. What I mean by the program "breaking" is: it stops running. As I stated everything works fine when you enter the correct password or even any integer, but as soon as a string is entered the program throws a NameError and stops runn...
by Paeryn
Tue Sep 24, 2019 2:38 pm
Forum: Python
Topic: Simple password input
Replies: 17
Views: 363

Re: Simple password input

What do you mean by "If the user inputs a string the program breaks"? If you mean the test for equality never evaluates to True even if the correct number was entered then that is because an integer never equals a string, you have to be comparing equivalent types otherwise you will always get False....
by Paeryn
Fri Sep 20, 2019 1:40 am
Forum: Bare metal, Assembly language
Topic: BCM2711B0
Replies: 33
Views: 3936

Re: BCM2711B0

Well, it has been about 10 weeks since I kicked off this thread and I still have not found and datasheets or other documentation on the BCM2711B0 ! Anyone else ? Until Broadcom or RPF/RPT (if they are allowed to, I don't know whether RP has the rights to without BCM's permission) get around to it y...
by Paeryn
Thu Sep 19, 2019 2:06 pm
Forum: General discussion
Topic: ARMv8 32-bit mode and 64-bit division
Replies: 11
Views: 662

Re: ARMv8 32-bit mode and 64-bit division

64bits just encourages the compiler to use NEON more for 64-bit integer operations. This was considered costly in the past because of the long time required to move data to and from the NEON unit. Now that NEON is no longer a co-processor for armv8, that may not be the case any more. It doesn't see...
by Paeryn
Mon Sep 16, 2019 2:41 pm
Forum: General discussion
Topic: how to update tkinter page with new values
Replies: 9
Views: 464

Re: how to update tkinter page with new values

You need to re-edit your post and move the closing code tag to after your code, as you have it your code isn't inbetween the code tags. The label isn't getting updated because (a) you aren't using labeltxt_1 for the label rather you just set it to a constant string, and (b) you don't update labeltxt...
by Paeryn
Mon Sep 16, 2019 1:29 am
Forum: Troubleshooting
Topic: Problems with date after read-only configuration
Replies: 4
Views: 152

Re: Problems with date after read-only configuration

Since running the commands listed work after the reboot I had hopes that putting them in /etc/cron.d would work, but it has no effect. The contents of my cron.d file are: @reboot root /etc/init.d/ntp stop @reboot root ntpd -q -g @reboot root /etc/init.d/ntp start @reboot root sleep 10 @reboot root ...

Go to advanced search