Search Results

Search: Posts Made By: wisecracker
Forum: OS X (Apple) 2 Hours Ago
103
Posted By wisecracker
As the clock is very quickly cycling inside the...
As the clock is very quickly cycling inside the microsecond part there is always a possibility of these values '00000' to '09999' occurring. These are obviously NOT octal but decimal with leading...
Forum: OS X (Apple) 21 Hours Ago
103
Posted By wisecracker
Generate a random number in a fully POSIX compliant shell, 'dash'...
Hi all...
Apologies for any typos, etc...
This took a while but it didn't beat me...

Although there are many methods of generating random numbers in a POSIX shell this uses integer maths and a...
Forum: Shell Programming and Scripting 2 Weeks Ago
502
Posted By wisecracker
The perfect example to RudiC's post #6... OSX...
The perfect example to RudiC's post #6...
OSX 10.14.6 default bash terminal...

Last login: Fri Jan 3 13:50:35 on console
AMIGA:amiga~> set
...
IFS=$' \t\n'
...
AMIGA:amiga~> _
744
Posted By wisecracker
Using Python 2.7.x and 3.7.x... ...
Using Python 2.7.x and 3.7.x...


#!/bin/bash
# inline.sh
echo "It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness..." > /tmp/text
...
Forum: Shell Programming and Scripting 3 Weeks Ago
728
Posted By wisecracker
Hi Chaos_Lord... Just an observation; you...
Hi Chaos_Lord...

Just an observation; you have shown figures that apparently create a true integer value on integer division...
What happens if the number of seconds is not fully divisible by 60?...
Forum: What is on Your Mind? 3 Weeks Ago
600
Posted By wisecracker
Apologies for any typos. No it doesn't make...
Apologies for any typos.

No it doesn't make you dumb, it means you have not found your niche to create an "_app'_" to take on and maybe even excel at compared to your peers.
It also means that...
Forum: What is on Your Mind? 3 Weeks Ago
600
Posted By wisecracker
A terrific quote:
Food for thought!

"""
Everybody in this country should learn to program a computer...because it teaches you how to think.
"""
Steve Jobs.

So, SO, true!

Merry XMAS all...
Forum: Programming 3 Weeks Ago
877
Posted By wisecracker
Hopefully this does NOT attach to the previous...
Hopefully this does NOT attach to the previous post #4...
Hi Neo...

Here is another little snippet aimed at WinUAE, the AMIGA emulator, I created also around 2008-9, if you are interested...
(It...
Forum: Programming 3 Weeks Ago
877
Posted By wisecracker
Apologies to everyone... The circuit GIF...
Apologies to everyone...

The circuit GIF image is incorrect this is the correct one:
(I will correct the zipfile and reload...)


EDIT:
This image is now in post #1...

7936
Forum: Programming 3 Weeks Ago
877
Posted By wisecracker
More Arduino Stuff...
HI all...
(Apologies for any typos.)

To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format.
Ignore "*.info" files these are AMIGA icons only and also the "HAM"...
Forum: Programming 4 Weeks Ago
1,705
Posted By wisecracker
Hi Neo... Apologies for any typos... ...
Hi Neo...
Apologies for any typos...

Remember to quote your Arduino Programmer version as there have been a great many variations over the years. Mine is Version 0015 and is ancient along with my...
Forum: Programming 12-13-2019
1,305
Posted By wisecracker
E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.
Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import.
It is well known that Euler's Identity E**(i*pi)+1=0...
892
Posted By wisecracker
Hi... It goes without saying: What is/are...
Hi...
It goes without saying:

What is/are your machine[s] and OS[es].
What is your preferred shell and version.
And most importantly what have you attempted yourself and where does it fail?
916
Posted By wisecracker
Hi jejemonx... This is what vbe was referring...
Hi jejemonx...
This is what vbe was referring to assuming you are using 'bash':
Last login: Thu Dec 12 13:15:18 on ttys000
AMIGA:amiga~> bash --version
GNU bash, version 3.2.57(1)-release...
1,085
Posted By wisecracker
You could modify this method to suit your...
You could modify this method to suit your needs...
# get_variable_from_external_command.py

# # with subprocess

# import subprocess
# proc = subprocess.Popen(['ls', '-l'],...
Forum: What is on Your Mind? 12-09-2019
894
Posted By wisecracker
The poorest of computer users are programmers...
Hi guys and gals...
A mildly humourous blog from 2013, but I come into this category... ;oDD

Languager: The Poorest Computer Users are Programmers...
Forum: What is on Your Mind? 11-28-2019
1,361
Posted By wisecracker
Hi Chubler_XL... WOW! Terrific stuff....
Hi Chubler_XL...

WOW! Terrific stuff. Congrats, you have earned it...
922
Posted By wisecracker
Hi Chubler_XL... I have never seen that...
Hi Chubler_XL...

I have never seen that before, thanks a lot.
Just shows how much I don't know. Once seen never forgotten...
(But sadly, it won't work in dash.)
922
Posted By wisecracker
Nice and I thanked the post but... Be aware,...
Nice and I thanked the post but...
Be aware, this only works in ksh93 and zsh on Apple gear.
'bash 3.2.x which is all we have with Apple, and POSIX' is a non-starter.
922
Posted By wisecracker
You could use XOR but here is a solution that is...
You could use XOR but here is a solution that is fully POSIX complaint:
#!/usr/local/bin/dash
# decimal2binary.sh <integer_-128_to_127>
#
# USAGE: [/full/path/to/][./]decimal2binary.sh...
956
Posted By wisecracker
A quicky demo for 0 to 127 only using OSX...
A quicky demo for 0 to 127 only using OSX 10.14.6, default 'bash' version 3.2.x...
Called as [./]decimal2binary.sh <integer_from_0_to_127> ...
#!/bin/bash
# decimal2binary.sh <integer_0_to_127>...
Forum: Programming 11-23-2019
2,551
Posted By wisecracker
Hi Neo... Much like my pocket Oscilloscope....
Hi Neo...
Much like my pocket Oscilloscope. That is not backlit either, and has a blue trace that is difficult to see...
That Data Logger idea and Python reminded me of this I tried to upload the...
Forum: Programming 11-23-2019
2,551
Posted By wisecracker
Hi Neo... The one in post #3 is way, way...
Hi Neo...
The one in post #3 is way, way cool...
I did notice with all its capability though that it has not got Double Factorial capability, not that it really matters though.
Nevertheless an...
630
Posted By wisecracker
Apologies for any typos... There is no better...
Apologies for any typos...
There is no better use than a working example...
Longhand using OSX 10.14.6, default bash terminal:
Last login: Mon Nov 18 09:29:24 on ttys000
AMIGA:amiga~> # My maths...
1,264
Posted By wisecracker
Hi nezabudka... Remember! Only on bash version...
Hi nezabudka...
Remember! Only on bash version 4.0.x and above.
We Apple users and probably others only have version 3.2.x so associative arrays are a none starter.
As the OP has not quoted his...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy