Zappa.com

The Official Frank Zappa Messageboards
It is currently Sat Jul 11, 2020 1:52 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 238 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 10  Next
Author Message
PostPosted: Mon Apr 06, 2020 7:35 pm 
Offline

Joined: Wed Sep 11, 2002 7:45 pm
Posts: 6756
Location: Québec country (let me dream...)
Folks here try to stay away from each others.
Streets are deserted.
We're getting maniac at washing hands.

Six straight months without work for me.
I sense it won't be over till September.
So, I learn Python in the meantime.
And phone some friends.

Summer is coming and I feel it will be boring times...

_________________
No doubt, we're doomed ! For a real diplomacy: abolish Electoral College
Ignore list: DiscoBoy


Top
 Profile  
 
PostPosted: Mon Apr 06, 2020 11:52 pm 
Offline
User avatar

Joined: Tue Jul 08, 2014 4:19 am
Posts: 17247
Location: misanthropia
@ work:
today is the day we start limiting the number of people who enter the store at one time.
that's right... only 300 people at a time.


side notes: the store only has 190 something carts.
not only that, we have never had anywhere near 300 shoppers all at once.

looks like we are going to have to start sending out invites.

_________________
that's what happens when you don't read you loose your link to higher thinking


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 3:03 am 
Offline
User avatar

Joined: Tue Oct 29, 2002 12:41 pm
Posts: 17934
Location: City Of Tiny Lites
Mij wrote:
So, I learn Python in the meantime

Way to to! Très bien!

_________________
Image


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 4:14 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:18 pm
Posts: 7685
Location: Over there! (last)
Gatis Sluka
Image


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 5:11 pm 
Offline
User avatar

Joined: Wed Dec 08, 2010 7:19 pm
Posts: 603
Location: USA
Last two times to the store I wore a mask. It's an N95 mask, I have four more. Fits well, I was fitted for these yearly. I got them so I could spray herbicide on mulberry that I was having trouble with. Some I just dug out but they were everywhere.

The masks are too large for my wife, though they would work.


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 5:56 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:18 pm
Posts: 7685
Location: Over there! (last)
cory1984 wrote:
Gray_Ghost wrote:
Image
Let's not forget how this man maintains such a disposition. He's stoned out of his gourd all the time. :mrgreen:
I've been trying to do my part by frequently visiting my favorite medical dispensary, in order to help them make payroll. :wink:


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 6:32 pm 
Offline
User avatar

Joined: Thu Nov 17, 2005 10:19 am
Posts: 7012
Location: Eastern CT coast
Mr_Green_Genes wrote:
Mij wrote:
So, I learn Python in the meantime

Way to to! Très bien!

:D

_________________
Lesser-evilism is war.


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 6:40 pm 
Offline
User avatar

Joined: Thu Nov 17, 2005 10:19 am
Posts: 7012
Location: Eastern CT coast
I bought season one of The Flintstones for 10 bucks on Prime

It turned out better than expected because so many scenes I remembered things in, it was like Holy Shit I remember that, Holy Shit I remember that, Holy Shit I remember that.

Holy Shit!

WTF happened, lol!

_________________
Lesser-evilism is war.


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 8:52 pm 
Offline

Joined: Wed Sep 11, 2002 7:45 pm
Posts: 6756
Location: Québec country (let me dream...)
Mr_ Green_Genes and Baddy, are you programmer too ?
:?:

_________________
No doubt, we're doomed ! For a real diplomacy: abolish Electoral College
Ignore list: DiscoBoy


Top
 Profile  
 
PostPosted: Tue Apr 07, 2020 9:58 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 7:51 pm
Posts: 37598
Location: >>==> Wellington New Zealand
Mij wrote:
Mr_ Green_Genes and Baddy, are you programmer too ?
:?:



Ah haaa, that kind of python Mij.....I was thinking snakes or maybe Monty Python :lol:

_________________
hey punk where you goin' with no mask on your face.....


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 5:42 am 
Offline
User avatar

Joined: Tue Oct 29, 2002 12:41 pm
Posts: 17934
Location: City Of Tiny Lites
I can program Hello, World, print a triangle and create variables, so far... :roll:

Gray_Ghost wrote:
Mij wrote:
Mr_ Green_Genes and Baddy, are you programmer too ?
:?:



Ah haaa, that kind of python Mij.....I was thinking snakes or maybe Monty Python :lol:

Python, the programming language was actually named after of that other Python :wink:

_________________
Image


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 7:49 am 
Offline
User avatar

Joined: Sat Jun 09, 2012 7:25 pm
Posts: 3796
Location: Oregon
Image

_________________
“Listen to everyone, read everything; believe absolutely nothing unless you can prove it in your own right!”


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 3:08 pm 
Offline
User avatar

Joined: Thu Nov 17, 2005 10:19 am
Posts: 7012
Location: Eastern CT coast
Mij wrote:
Mr_ Green_Genes and Baddy, are you programmer too ?
:?:

I know some C++, Java, and my favorite is the instant gratification of VB :)

No Python though, I wanted to do it as it's not so strongly typed, but there's a bunch ahead of it on my To Do lost.

I am not a programmer for my job, but I graduated CS Associates a couple years ago...retiring soon, just for fun.

Are you into VB with Visual Studio? I put together a fun blackjack game modeled after Thorps decision charts for blackjacks. The decks are manipulateable and I was working towards having it play itself and track players winnings, so I could pull cards from the deck and let it play as Thorpe did (in Fortran), to see the effect on winnings on players winnings.

It was filled with fun stuff to program, # players, and a module to track turns (when it's one person's turn, everyone else is disabled. It has stuff like 5 card Charlie, and buttons to recommend to each player if he should hit or stand according to the situation and Thorpes charts...ah hell...here is is...

The first screen (not shown), asks how many players, and how many decks.

Here is the exe, it'll work on Windows above .NET 4

Here 's all the code if anyone wants to play with it

Here's what play looks like...PS if you don't shuffle before it runs out of cards, it errors, you run out of cards fast in one deck mode.

First, an unshuffled deck to prove deal order is correct as a dealer would do it...
Image

Since Automatic is checked, play proceeds, each player has a window to "see" the dealers up card, although I left his other one exposed for developing...

Player 1 had a blackjack, so the active window automatically moved to player 2 (only player 2 can do anything, player 3 can move after 2 hits "stand." You don't have to do that, (full automatic play will do that so thousands of hands can play quick, whenever that gets enabled, lol!
Image

Then after all play, credits awarded. Dealer took none as he must stand on 17, Player 1 got paid 1.5x for his blackjack, Player 2 busted and lost 10, Player 3 beat the dealer on a soft 20 and was paid his bet of 10, Player 4 busted and lost 10.
Image

Boy, one of these days I gotta take a day off and clean off my desktop...


Here's the algorithm for processing
Try
'Check for busted players, take credits even if dealer busts also.
If Integer.Parse((PlayersForm(i).ScoreLabel.Text).Substring(5)) > 21 Then 'Player busted
'Deduct bet and update both TotalCreditsTextBox.
PlayersForm(i).TotalCreditsLabel.Text = (Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) –
Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
'Update Module1 Credits(5) array to hold score between hands.
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text
Else

'Check for dealer Blackjack, if yes then take players credits,
(if player also has blackjack, it will be processed below on parse exception above).

If ScoreLabel.Text = "Blackjack" Then 'Take players credits,
he cannot have a blackjack as player Blackjacks processed below on parse exception above.
PlayersForm(i).TotalCreditsLabel.Text = (Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) –
Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text

Else
'Check for DEALER bust, if not busted, then process numerical scores.
If Integer.Parse((ScoreLabel.Text).Substring(5)) > 21 Then
'Dealer busted, player did not, pay 1x amount of players bet.
PlayersForm(i).TotalCreditsLabel.Text = (Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text)
+ Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text
Else
'Neither dealer nor player busted. If two scores =, then a push (nothing happens),
otherwise look for highest score.

If Integer.Parse((ScoreLabel.Text).Substring(5)) >
Integer.Parse((PlayersForm(i).ScoreLabel.Text).Substring(5)) Then 'Dealer won, take money

PlayersForm(i).TotalCreditsLabel.Text =
(Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) –
Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text

Else 'Player won, pay credits.

PlayersForm(i).TotalCreditsLabel.Text =
(Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) +
Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text
End If
End If
End If
End If
Catch ex As Exception

'Non-number in label, process the Charlie or Blackjack here.
If PlayersForm(i).ScoreLabel.Text = "Blackjack" Then

'Pay Blackjack at 1.5x bet if dealer does not also have blackjack,
if he does, then it's a push and no change to player's credits
.
If Not ScoreLabel.Text = "Blackjack" Then 'Dealer does not have Blackjack, pay player,
(if dealer does have blackjack, do nothing to player credits).

PlayersForm(i).TotalCreditsLabel.Text = (Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) +
1.5 * Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text
End If

Else ' It's a Charlie, the only other possibility for a non-parsing player score label.
'Process Charlie at 1x bet.

PlayersForm(i).TotalCreditsLabel.Text = (Integer.Parse(PlayersForm(i).TotalCreditsLabel.Text) +
Integer.Parse(PlayersForm(i).BetTextBox.Text)).ToString
Module1.Credits(i) = PlayersForm(i).TotalCreditsLabel.Text
End If
End Try
Next

'Stop buttons from being enabled while waiting for MessageBox OK.
DealerHitButton.Enabled = False
DealerStandButton.Enabled = False

MessageBox.Show("Click OK for next hand", "Hand Complete", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub


Here are the decks it currently has, some decks for generating scenarios for testing, and regular deck for play, the cards are just png's in resources, and I set their file names so the algorithm would know what they were...

To play with any particular deck, you just uncomment it and leave the others commented out...

Public Sub New()

'Normal 4 decks for play.
Static faces() As String = {"_11Ace", "_02Two", "_03Three", "_04Four", "_05Five", "_06Six",
"_07Seven", "_08Eight", "_09Nine", "_10Ten", "_10Jack", "_10Queen", "_10King", "_11Ace",
"_02Two", "_03Three", "_04Four", "_05Five", "_06Six", "_07Seven", "_08Eight", "_09Nine",
"_10Ten", "_10Jack", "_10Queen", "_10King", "_11Ace", "_02Two", "_03Three", "_04Four",
"_05Five", "_06Six", "_07Seven", "_08Eight", "_09Nine", "_10Ten", "_10Jack", "_10Queen",
"_10King", "_11Ace", "_02Two", "_03Three", "_04Four", "_05Five", "_06Six", "_07Seven",
"_08Eight", "_09Nine", "_10Ten", "_10Jack", "_10Queen", "_10King"}
Static suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds",
"Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades"}

' 'Ace rich deck for testing
' Static faces() As String = {"_11Ace", "_11Ace", "_03Three", "_11Ace", "_05Five",
'"_11Ace", "_07Seven", "_11Ace", "_09Nine", "_11Ace", "_10Jack", "_11Ace", "_10King", "_11Ace", "_11Ace",
"_03Three", "_11Ace", "_05Five","_11Ace", "_07Seven", "_11Ace", "_09Nine", "_11Ace", "_10Jack", "_11Ace",
"_10King"},
'suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades"}

' 'General Blackjack producing deck for testing
' Static faces() As String = {"_11Ace", "_11Ace", "_11Ace", "_11Ace", "_10King",
'"_10King", "_10King", "_10King", "_10King", "_11Ace", "_10Jack", "_11Ace", "_10King", "_11Ace", "_11Ace",
"_10King", "_11Ace", "_10King","_11Ace", "_10King", "_11Ace", "_11Ace", "_11Ace", "_10Jack", "_11Ace", "_10King"},
'suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades"}

' 'Player1 gets Blackjack for testing.
' Static faces() As String = {"_11Ace", "_03Three", "_03Three", "_03Three", "_10King",
'"_10King", "_10King", "_10King", "_10King", "_11Ace", "_10Jack", "_11Ace", "_10King", "_11Ace", "_11Ace",
"_10King", "_11Ace", "_10King",
'"_11Ace", "_10King", "_11Ace", "_11Ace", "_11Ace", "_10Jack", "_11Ace", "_10King"},
'suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades"}

' 'Dealer gets Blackjack deck for testing.
' Static faces() As String = {"_03Three", "_03Three", "_03Three", "_11Ace", "_05Five",
'"_11Ace", "_07Seven", "_10King", "_09Nine", "_11Ace", "_10Jack", "_11Ace", "_10King", "_11Ace", "_11Ace",
"_03Three", "_11Ace", "_05Five",
'"_11Ace", "_07Seven", "_11Ace", "_09Nine", "_11Ace", "_10Jack", "_11Ace", "_10King"},
'suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades", "Hearts", "Diamonds", "Clubs", "Spades"}

' 'Very Low card deck for testing.
' Static faces() As String = {"_02Two", "_02Two", "_02Two", "_02Two", "_02Two",
'"_02Two", "_02Two", "_02Two", "_02Two", "_02Two", "_02Two", "_02Two", "_02Two"},
'suits() As String = {"Hearts", "Diamonds", "Clubs", "Spades"}

_________________
Lesser-evilism is war.


Last edited by baddy on Wed Apr 08, 2020 5:11 pm, edited 6 times in total.

Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 3:17 pm 
Offline

Joined: Wed Sep 11, 2002 7:45 pm
Posts: 6756
Location: Québec country (let me dream...)
I'm mostly a SAS programmer. Since 1990.
I worked with versions 6, 8, and the 4 versions of 9.
Along the way, I studied VB6, C, C++, JAVA but didn't find job in these techs.
So I went back to SAS. I get certifications for SAS Base and SAS Macros.
I also touched a bit of UNIX (which I don't really like).
I learned SQL. Also PL/SQL which I'm not a wiz but I can manage.
There's no jobs in SAS now. I'm waiting since last Ocober.
So, I thought I could learn Python while the COVID-19 is on its way.
A recruiter told me I could find some contracts.

Oh, I did some COBOL in 1989, and some VBA, but I don't really have enough experiences to help me get some jobs.
Think I thought I could do a living as a musician when I was young.
:roll:

_________________
No doubt, we're doomed ! For a real diplomacy: abolish Electoral College
Ignore list: DiscoBoy


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 3:27 pm 
Offline
User avatar

Joined: Sun Aug 31, 2003 2:41 pm
Posts: 16797
I have a degree in Unix programming. Took Cobol, C++ and assembly. That was about 30 years ago....


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 5:46 pm 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:18 pm
Posts: 7685
Location: Over there! (last)
I know how to operate an adding machine.


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 6:06 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 7:51 pm
Posts: 37598
Location: >>==> Wellington New Zealand
pass me the abacas please :lol:

_________________
hey punk where you goin' with no mask on your face.....


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 6:25 pm 
Offline
User avatar

Joined: Thu Nov 17, 2005 10:19 am
Posts: 7012
Location: Eastern CT coast
I read a sci-fi story in detention in 7th grade about the future where a boy had figured out how to make marks on paper, and do all kinds of crazy things to them, and come out with other marks that translated exactly to what their computers were doing with their keys...they couldn't believe he could do it by making marks on paper.

_________________
Lesser-evilism is war.


Top
 Profile  
 
PostPosted: Wed Apr 08, 2020 6:40 pm 
Offline

Joined: Wed Sep 11, 2002 7:45 pm
Posts: 6756
Location: Québec country (let me dream...)
I began in 1976. So, yeah, I'm aware of punched cards too.
And the machines to sort them and read them.
That was the IBM era. IBM was king. No Microsoft, no Apple, no Steve Jobs, no Bill Gates.
IBM thought in 1981 that personal computer would never catch up.
So, they lost the game.
The Peter principle at its best.

Oh, they're still big, but not as what they should be.
:smoke:

_________________
No doubt, we're doomed ! For a real diplomacy: abolish Electoral College
Ignore list: DiscoBoy


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 1:11 am 
Offline
User avatar

Joined: Tue Oct 29, 2002 12:41 pm
Posts: 17934
Location: City Of Tiny Lites
Mij wrote:
I began in 1976.

I also begun in 1976, I was born then... :wink:

_________________
Image


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 2:50 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 7:51 pm
Posts: 37598
Location: >>==> Wellington New Zealand
Mr_Green_Genes wrote:
Mij wrote:
I began in 1976.

I also begun in 1976, I was born then... :wink:


:lol:

_________________
hey punk where you goin' with no mask on your face.....


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 3:08 am 
Offline

Joined: Mon Mar 17, 2008 9:56 am
Posts: 227
baddy wrote:
I read a sci-fi story in detention in 7th grade about the future where a boy had figured out how to make marks on paper, and do all kinds of crazy things to them, and come out with other marks that translated exactly to what their computers were doing with their keys...they couldn't believe he could do it by making marks on paper.

I got my doctorate in detention in 7th grade.


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 3:31 am 
Offline
User avatar

Joined: Tue Jul 08, 2014 4:19 am
Posts: 17247
Location: misanthropia
Image

_________________
that's what happens when you don't read you loose your link to higher thinking


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 8:59 am 
Offline
User avatar

Joined: Mon Jan 20, 2014 6:18 pm
Posts: 7685
Location: Over there! (last)
Mij wrote:
I'm mostly a SAS programmer. Since 1990.
I worked with versions 6, 8, and the 4 versions of 9.
Along the way, I studied VB6, C, C++, JAVA but didn't find job in these techs.
So I went back to SAS. I get certifications for SAS Base and SAS Macros.
I also touched a bit of UNIX (which I don't really like).
I learned SQL. Also PL/SQL which I'm not a wiz but I can manage.
There's no jobs in SAS now. I'm waiting since last Ocober.
So, I thought I could learn Python while the COVID-19 is on its way.
A recruiter told me I could find some contracts.

Oh, I did some COBOL in 1989, and some VBA, but I don't really have enough experiences to help me get some jobs.
Think I thought I could do a living as a musician when I was young.
:roll:
calvin2hikers wrote:
I have a degree in Unix programming. Took Cobol, C++ and assembly. That was about 30 years ago....
COBOL programmers are in demand. If you are under 70, you are probably wondering: "What's COBOL?" Well, it was a (dreadful) programming language used on room-sized IBM mainframe computers in the 50s, 60s and 70s. Note that that means the 1950s, 1960s, and 1970s, of course, but you can take a shortcut and leave out the "19"s to save a bit of space. COBOL programmers did the same thing, which caused the Y2K problem in 2000, when computers couldn't tell if John Smith, born in 00, was a newborn or eligible for Social Security. But for a massive effort to patch millions of lines of COBOL code, that would have been a massive disaster on the scale of COVID-19, with electricity plants shutting down automatically because the software thought that the mandatory maintenance had been delayed for 100 years and much more. Anyway, COBOL is back in the news because the software that handles unemployment claims in many states is written in COBOL and desperately needs to be updated. But nearly all COBOL programmers are either long retired or dead, and universities haven't taught COBOL in 40 years, so there are no young ones. States in New England plus Oklahoma and Mississippi are working together to update their software, but they expect it to take at least a year. Meanwhile, their existing software can't handle the massive flood of applications.

ImageTwo men operating a mainframe computer, circa 1960.

related article :arrow: https://edition.cnn.com/2020/04/08/business/coronavirus-cobol-programmers-new-jersey-trnd/index.html


Top
 Profile  
 
PostPosted: Thu Apr 09, 2020 9:33 am 
Offline

Joined: Wed Sep 11, 2002 7:45 pm
Posts: 6756
Location: Québec country (let me dream...)
The only thing I did in COBOL was the extent of the year from 2 to 4 spaces in all the programs (maybe 100).
I did well. No error.
After that, my coach directed me to SAS.
I never touched COBOL after that.
So, I can't say that I am a COBOL programmer, I would make a Trump of myself (bragging and lying)
There's not much demand for COBOL here in Quebec !!

And I wouldn't want to work in the USA now. Too fucked up.
:P

_________________
No doubt, we're doomed ! For a real diplomacy: abolish Electoral College
Ignore list: DiscoBoy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 238 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 10  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group