Go to advanced search

by Paeryn
Fri Sep 06, 2019 7:38 pm
Forum: Troubleshooting
Topic: authentication token manipulation error
Replies: 1
Views: 88

Re: authentication token manipulation error

Hello my raspberry pi 4 keeps coming up with authentication token manipulation error when I try to reset my password. I have tried sudo passwd -d And other methods and they work until I reboot it then it goes back to normal saying incorrect password. Running sudo passwd -d will delete root's passwo...
by Paeryn
Fri Sep 06, 2019 7:17 pm
Forum: Python
Topic: Data input from an A/V cable
Replies: 11
Views: 739

Re: Data input from an A/V cable

If I got a Composite Capture Device, can I still get the data coming through it with python, using a module or something, or would I need a different program? Most likely when using a capture device it will appear as a v4l2 device in /dev/video* (the * will be a number). There is a v4l2 module for ...
by Paeryn
Fri Sep 06, 2019 1:37 am
Forum: Beginners
Topic: [Solved] Run task every 5 mins starting at 3 minutes past the hour
Replies: 6
Views: 400

Re: run task every 5 mins starting at 3 minutes past the hour

Code: Select all

3-59/5 * * * * command_to_run
Is the easiest way, (minutes range from 3 to 59 stepping by 5). Other notations bar writing the list in full might not work on debian's (and hence raspbian's) cron.
by Paeryn
Fri Sep 06, 2019 1:06 am
Forum: Python
Topic: Autostarted script does not log
Replies: 5
Views: 251

Re: Autostarted script does not log

The reason you get no data in your log file is because of the " & " after the program call, Change your line to this. python /home/pi/my_script.py >> /var/log/my_script_log.log 2>&1 Note I also change the line to enable appending of data to the file so that it does not over write the data on each e...
by Paeryn
Mon Sep 02, 2019 10:56 pm
Forum: Troubleshooting
Topic: startx issue from command line ....
Replies: 2
Views: 166

Re: startx issue from command line ....

There was a report a few weeks ago on here where this issue cropped up and the fix was to delete either a directory or file as the ownership is wrong. Sorry that I cannot find it for you now but you may have luck searching here for sudo startx delete Apologies but my mind and googlefoo are weak tod...
by Paeryn
Mon Sep 02, 2019 2:12 am
Forum: General discussion
Topic: Why moving to 64bit?
Replies: 259
Views: 23084

Re: Why moving to 64bit?

I've heard when compiled for 64-bit architectures that Python uses 64-bit integers internally for everything including characters. The Pi is a bit unique, apparently, in being a 64-bit processor tied to memory by a 32-bit memory. For comparison, the width of a standard DDR4 SIMM is 64-bits and many...
by Paeryn
Sun Sep 01, 2019 4:03 pm
Forum: Troubleshooting
Topic: Adjusting Graphic memory on pi4b
Replies: 5
Views: 251

Re: Adjusting Graphic memory on pi4b

I tried a bit but i think i went to high, not nu pi goed error on the boot. No problem, New installment is easy and quick. Is nu thinking correct ? And if so, What is the best wat to set the memory? Are there any rules to be held in mond ? Try as I might I fail to understand what on earth you mean ...
by Paeryn
Sun Sep 01, 2019 2:06 pm
Forum: Beginners
Topic: UDP and IF Statement confusion
Replies: 12
Views: 978

Re: UDP and IF Statement confusion

As hippy said earlier, testing the whole data rather than individual elements is better especially for readability as long as data isn't going to have extra characters after the ON or OFF. if data == b'ON': .... If data == b'OFF': .... The thing with the type btyes is that it is an array of 8-bit un...
by Paeryn
Sat Aug 31, 2019 4:16 pm
Forum: C/C++
Topic: GCC frustrations
Replies: 4
Views: 640

Re: GCC frustrations

Slightly late reply, had to stop mid writing whilst I got off the bus. compiled with the commands: gcc gettypes.c -Warch=armv7-a -Wfpu=vfp ld gettype.out -o gettype And the error that I get at run-time: Inconsistency detected by ld.so: dl-lookup.c: 971: _dl_setup_hash: Assertion `(bitmask_nwords & (...
by Paeryn
Fri Aug 30, 2019 3:03 pm
Forum: Python
Topic: problem with sleep, and apending to a file
Replies: 11
Views: 1096

Re: problem with sleep, and apending to a file

To add to what pcmanbob said, you also need to declare global dirsong in any function that uses it. With def chdr() commented out the function calculate_track() first tries to print dirsong and then later assigns a value to it, since you haven't declared global dirsong for that function python has s...
by Paeryn
Thu Aug 29, 2019 4:39 pm
Forum: Beginners
Topic: UDP and IF Statement confusion
Replies: 12
Views: 978

Re: UDP and IF Statement confusion

If data = b'ON' then the type of data is bytes and the type of one element e.g. data[0] is integer.

This is why trying to compare data[0] == 'O' or data[0] == b'O' fails, an integer is neither a string nor a bytes so will always fail to be equal.
by Paeryn
Thu Aug 29, 2019 11:03 am
Forum: Troubleshooting
Topic: Need help with "undefined reference makedev"
Replies: 3
Views: 289

Re: Need help with "undefined reference makedev"

The problem is a missing function called makedev, not a program. makedev() is actually a macro and you need to include the correct header for it. At the top of mailbox.c add the following line #include <sys/sysmacros.h> I assume if the code used to compile under Stretch then one of the other include...
by Paeryn
Thu Aug 29, 2019 10:37 am
Forum: Beginners
Topic: How to use RSP in company
Replies: 25
Views: 1449

Re: How to use RSP in company

Hello, I am still RSP beginner and I want to know how RSP is utilized in the company. Although I went around on us/uk yahoo, I could not get the information. Does anyone provide me the hint? Thank you. Regards, Kazuya It might help if you tell us what RSP stands for (the only thing vaguely RPi rela...
by Paeryn
Sat Aug 24, 2019 8:09 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

Kira says that tea and coffee is overrated and that pre-lactarinism is the one true way so that he can drink the milk before it is tainted by anything afterwards (and it had better be lactose free).

Personally I'm post, if there's too much milk I can't drink my tea.
by Paeryn
Sat Aug 24, 2019 7:49 pm
Forum: General discussion
Topic: Help using this forum please!
Replies: 16
Views: 757

Re: Help using this forum please!

The copy all on code blocks has been broken in Chrome for quite a while. From what I remember, it's a case of where browsers used to be lenient on how the selection is written (selecting the start position is wrong I think) but since then they tightened it up so now the incorrect code doesn't work. ...
by Paeryn
Sat Aug 24, 2019 12:50 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

I've improved the memory usage of my Haskell code, the culprit was the amount of ByteString s it generated. The overheads in using them for small strings is quite big, they require 9 words + length of string each, that's 36 bytes extra per word (72 on 64-bit) and due to how they are allocated the GC...
by Paeryn
Thu Aug 22, 2019 4:25 pm
Forum: Troubleshooting
Topic: Pi zero with Raspbian shows 28% constant CPU usage?
Replies: 10
Views: 502

Re: Pi zero with Raspbian shows 28% constant CPU usage?

No,I mean, Ram operates fine at 400 and 600Mhz, but crashes at 575Mhz. Same with GPU, runs fine at 525Mhz and 550Mhz, but crashes at 533Mhz. System overclocked works fine, I then decide to increase one value, say Arm_freq. After reboot the settings don't work, so I set the setting back to last know...
by Paeryn
Thu Aug 22, 2019 2:20 pm
Forum: Python
Topic: Strings in a directory path
Replies: 9
Views: 472

Re: Strings in a directory path

Well it almost works.. I am getting mplayer /home/pi/desktop/music/A1 What I need is: mplayer /home/pi/desktop/music/A1/ *.mp3 I am having trouble tacking on the last bit. Amy ideas? I found why some of the scripts didn't work, there were hidden CR at the end of the lines. You just need to add the ...
by Paeryn
Thu Aug 22, 2019 3:09 am
Forum: Troubleshooting
Topic: Pi zero with Raspbian shows 28% constant CPU usage?
Replies: 10
Views: 502

Re: Pi zero with Raspbian shows 28% constant CPU usage?

After debug there is no folders The /tracing/... folder it doesn't accept You can't access that directory as a normal user, only root can. It probably needs the kernel compiled with tracing enabled, I tested it on mine running Buster and it worked, I don't know if previous versions had it enabled i...
by Paeryn
Thu Aug 22, 2019 12:38 am
Forum: Troubleshooting
Topic: Pi zero with Raspbian shows 28% constant CPU usage?
Replies: 10
Views: 502

Re: Pi zero with Raspbian shows 28% constant CPU usage?

kworker threads are threads that process the kernel's workqueues. The first number says which CPU it's running on (so always 0 on an RPi 0), the second is it's id number and the string at the end is I think related to what the thread is for (so events would be something to do with monitoring events)...
by Paeryn
Wed Aug 21, 2019 4:52 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

The word list is already sorted. If you use a hash method properly the only sorting going on is the dictionary word to build the hash key . I think the ScriptBasic approach is the most efficient but using associative arrays rather than the hash extension module is its downfall. I already know how t...
by Paeryn
Wed Aug 21, 2019 1:32 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

The "need" is down to how it's implemented, it just uses sorted lists, it doesn't search for matching hashes rather it relies on sorting them all which puts all matching hashes next to each other. Using a proper tree to store and search the list of anagrams would be better (like Kira did in C) but I...
by Paeryn
Wed Aug 21, 2019 10:30 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

Hmm.. I see... But, but, the input data is already sorted, it's a dictionary after all, so there is no need to do any sorting to get the anagrams out (except for sorting letters in words perhaps). To group entries together it needs the lists sorted by the ordered letters, this list is no longer in ...
by Paeryn
Wed Aug 21, 2019 7:44 am
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Liberation through Computer Literacy

Heater wrote:
Wed Aug 21, 2019 5:06 am
How on Earth can juggling 650,000 words, only 6.6M bytes, manage to consume 2 giga bytes?!
The sort function is a merge sort, it generates a huge number of temporary lists. Sorting lists is expensive when you have such long lists.
by Paeryn
Tue Aug 20, 2019 7:52 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1699
Views: 82953

Re: Project Digital Apocalypse Not Now

Sorry for taking so long getting the Haskell version of the anagrams done, I've not been too well and got fed up trying to write an efficient version so I've done it by sorting the letters of each word and using that directly to sort the list of words and group identical entries. I've not run it on ...

Go to advanced search