Home Man
Search
Today's Posts
Register

Showing results 1 to 25 of 500
Search took 0.05 seconds.
Search: Posts Made By: Corona688
Forum: What is on Your Mind? 5 Days Ago
Replies: 4
Views: 105
Posted By Corona688
A note on books as gifts, 75% of books you give...

A note on books as gifts, 75% of books you give will go unread, no matter what you give to who. Just a fact of life. They might find it useful someday or might not.
Forum: What is on Your Mind? 5 Days Ago
Replies: 4
Views: 105
Posted By Corona688
They have to start somewhere, and have to want...

They have to start somewhere, and have to want to. Having the vague idea they want to program won't motivate them to crack books thicker than their wrist. Most people never learn this stuff, and...
Forum: OS X (Apple) 1 Week Ago
Replies: 13
Views: 492
Posted By Corona688
Absolutely. I don't post code for people to not...

Absolutely. I don't post code for people to not use it.

It's a kind of naive implementation though. Usually better to read values from stdin, but knowing how audioscope works I knew you'd need...
Forum: Programming 1 Week Ago
Replies: 4
Views: 160
Posted By Corona688
Tricky. Most large-scale architectures separate...

Tricky. Most large-scale architectures separate data and code.

What you might be able to find is the value of the pointer.

#include <stdio.h>

int main(void)
{
printf("%p\n",...
Forum: Programming 1 Week Ago
Replies: 3
Views: 117
Posted By Corona688
You have to follow the method I showed...

You have to follow the method I showed to-the-letter. (*arr[a][b])[c] is not the same as (*arr)[a][b][c].

void arrbyptr(int (*ptr[2][2])[2]) {
int result, i, j, k;
for ( i = 0; i <...
Forum: UNIX for Beginners Questions & Answers 1 Week Ago
Replies: 6
Views: 183
Posted By Corona688
This being a pi, you can remove the micro-SD card...

This being a pi, you can remove the micro-SD card and put it in a different computer to edit the crontab and/or login files. Sometimes brute force is the simplest way.
Forum: Programming 1 Week Ago
Replies: 4
Views: 160
Posted By Corona688
Text strings won't be embedded in the code, they...

Text strings won't be embedded in the code, they will reside in the data segment.
Forum: Shell Programming and Scripting 1 Week Ago
Replies: 3
Views: 96
Posted By Corona688
There's no particular reason -vf shouldn't work...

There's no particular reason -vf shouldn't work in a while loop. It's just very tricky to get all the quoting and escaping right. Shove printf "\t%s\n" in front of ffmpeg to see what its really...
Forum: OS X (Apple) 1 Week Ago
Replies: 13
Views: 492
Posted By Corona688
Another thing you can do to speed it up is keep...

Another thing you can do to speed it up is keep it running - feed it input and read it output at need, rather than starting and killing it all the time. How to do that depends on what your input...
Forum: OS X (Apple) 1 Week Ago
Replies: 13
Views: 492
Posted By Corona688
awk version: $ cat fft.awk # Don't...

awk version:


$ cat fft.awk

# Don't feed it REAL/IMAG/K/T, those are local variables
function fft(REAL_ARRAY, IMAG_ARRAY, K, T, SUMREAL, SUMIMAG,
ANGLE, COS_ANGLE, SIN_ANGLE)
{
...
Forum: OS X (Apple) 1 Week Ago
Replies: 13
Views: 492
Posted By Corona688
People have wanted a good awk fft for years. ...

People have wanted a good awk fft for years. From this example I'll try and write an awk version. That should help. It has all the facilities needed.
Forum: What is on Your Mind? 1 Week Ago
Replies: 11
Views: 258
Posted By Corona688
Welcome!

Welcome!
Forum: Programming 1 Week Ago
Replies: 6
Views: 177
Posted By Corona688
Here's how I had to use it: #include...

Here's how I had to use it:

#include <stdio.h>

void arrbyptr(int (*ptr[2][2])[2]) {

printf("[0][0][0]=%d,[0][0][1]=%d,[0][1][0]=%d,[0][1][1]=%d\n",
(*ptr)[0][0][0],...
Forum: Shell Programming and Scripting 3 Weeks Ago
Replies: 3
Views: 108
Posted By Corona688
Quotes inside quotes don't work that way. Once...

Quotes inside quotes don't work that way. Once they're in a string, they're literal characters. This is to prevent chaos and unintended results whenever your input contains ".

What problem are...
Forum: Shell Programming and Scripting 3 Weeks Ago
Replies: 3
Views: 118
Posted By Corona688
Your script shouldn't be doing sudo su - in the...

Your script shouldn't be doing sudo su - in the first place. Trying to automate an interactive login is the root of all that trouble. Just do sudo -u root /path/to/whateveryouwanttorun
Forum: Shell Programming and Scripting 4 Weeks Ago
Replies: 6
Views: 273
Posted By Corona688
A single quote is a single ' character. Strings...

A single quote is a single ' character. Strings inside single quotes are purely literal -- i.e. echo '$VARIABLE' prints $VARIABLE instead of the value of that variable.

A double-quote is a single...
Forum: Shell Programming and Scripting 4 Weeks Ago
Replies: 6
Views: 273
Posted By Corona688
" " are not single quotes. ' ' are single...

" " are not single quotes. ' ' are single quotes.

for url in $(cat url.txt); do This is a useless use of cat (http://porkmail.org/era/unix/award.html) and dangerous and would throw up on many...
Forum: Shell Programming and Scripting 4 Weeks Ago
Replies: 6
Views: 273
Posted By Corona688
Also, I have no idea what's in your file. ...

Also, I have no idea what's in your file. Anything wrong with that could cause problems.
Forum: Shell Programming and Scripting 4 Weeks Ago
Replies: 6
Views: 273
Posted By Corona688
Doubling up on double quotes means your string...

Doubling up on double quotes means your string isn't quoted at all.
"$COL1"
Forum: Programming 4 Weeks Ago
Replies: 6
Views: 308
Posted By Corona688
Thanks for correcting my too-specific answer. 16...

Thanks for correcting my too-specific answer. 16 bits is still too small for his numbers, be they signed or unsigned, so the point stands however.
Forum: Programming 4 Weeks Ago
Replies: 6
Views: 308
Posted By Corona688
Single and double quotes are very different...

Single and double quotes are very different things in C. In C, "A" means a string -- amounting to the array { 'A', '\0' }. And 'A' is just the number 65.



Numbers that large won't fit in your...
Forum: Programming 08-20-2018
Replies: 6
Views: 308
Posted By Corona688
for (j = 0; j < data[INPUT_BUFF]; j++){ This is...

for (j = 0; j < data[INPUT_BUFF]; j++){ This is wrong.

for (j = 0; data[j] != 0; j++){ This is probably what you want.

switch(data[j]){
case 0:
...
case 1:
...
case 2:
Forum: What is on Your Mind? 08-16-2018
Replies: 1
Views: 90
Posted By Corona688
Usually, crop. Anything else would be a ton of...

Usually, crop. Anything else would be a ton of manual work.
Forum: Programming 08-16-2018
Replies: 2
Views: 200
Posted By Corona688
int * isn't enough information for C to know what...

int * isn't enough information for C to know what kind of array is being pointed to. That assumes a single integer or 1D array.

int *matrix[size][size] does not make pointers to 2d arrays -- it...
Forum: Shell Programming and Scripting 08-11-2018
Replies: 4
Views: 169
Posted By Corona688
find simply doesn't return nonzero unless...

find simply doesn't return nonzero unless something prevents it from doing what you asked it to do. If it tries to do open a directory and the system tells it "Permission denied", that's an error...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 07:16 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password