Administrator

[email protected]

Total likes received: 115 | Pubby Cash: 377


Andy Tang is the creator of Gopubby.com who has a passion for programming and everything related to technology and is skilled in many areas of coding including Python, HTML/CSS, Bootstrap, and SQL. He is experienced with many Python modules including Pygame, Flask, BeautifulSoup, and Kivy. He also has a solid knowledge of Windows, Mac, and Linux/Unix operating systems.

Articles Liked by Me: 82

The Raffle Game

Categories: Tech | Pubby Cash Received:  10

It would be fun to find ways for pubbies to spend and earn Pubby Cash. Purchasing a raffle ticket is one of the ways the admin team has developed. Let me explain how this is realized. 1. Create a table in the database with sufficient columns to record all relevant raffle related information. The columns are: raffle id, date raffle opened, date raffle closed, current raffle pool, max raffle pool, transaction activities (a list with player id), winner id, and raffle status. The table should be declared as a model and linked to the code. 2. When a player trying to buy a raffle ticket, the database will be queried for the most recent game. If the most recent game is closed, a new game will be created. When the max raffle pool has reached (100 Pubby Cash) in this case, the status of the game will be changed to a closed state. Random number will be generated to determine who is the winner. 3. Update the database with relevant info. The tables that will be affected are the cash table, message table, user table, and of course the raffle game table. For the cash table, record the purchase transaction details. If a player wins, insert an additional transaction on the amount that he/she won. For the message table, update the table with a new message sent to the winner. For the user table, all players' Pubby Cash balance should be updated. For the raffle game table, the game record should be updated. 4. Generate a plot visualizing the dynamic purchasing activities of pubbies involved in the raffle game. This would require a data visualization module "matplotlib", which will generate a bar chart plotting the number of tickets each pubby purchased on the x axis, and the name of each pubby who purchased ticket(s). Then, a raffle game is all set to go! ...  Read more

Sublime Text vs. Pycharm, Which One is Better?

Categories: Tech | Pubby Cash Received:  20

Text editor is essential for python programming. Specifically, the default notepad that comes with the computer should be avoided, as it does not provide the debugging ability. The text editors programmers use have a fancy name: IDE, which is the abbreviation of Integrated Development Environment. IDE provides features like autocomplete, libraries, compiling, debugging, executing, etc., in one place to make tasks simpler. So far I've used PyCharm for several months and just switched to Sublime Text. Here is a review of what I feel about the two IDEs. 1. Both Pycharm and Sublime Text have the free version and the paid version. The paid version of PyCharm costs $199 per user per year, while the paid version of Sublime Text cost $80 per user. As for the free version, PyCharm is more clean, while Sublime Text prompt you to purchase from time to time when you are trying to save a file, which can be annoying. 2. PyCharm creates a virtual environment, which makes the launching process long. If you have an old computer like I do, it takes over 1 minute to launch the program. Sublime Text is more clean and opens in the blink of an eye, and thus is better in this aspect. 3. PyCharm is more GUI based, as you can click a button to run a py file after you add it to the configurations. Sublime Text is more terminal based. You must run command lines in terminal windows to test your file. But it does not slow you down at all as long as you are experienced in doing this. 4. Sublime Text has some cool features such as generating dummy text by typing "lorem" in an HTML file, populating a schema of an HTML file by typing "html", freely enlarging and reducing font sizes on screen by pressing Ctrl + or Ctrl -, auto wrapping codes, freely changing indentation styles, displaying codes full screen, etc, that PyCharm does not have. My preference goes towards Sublime Text at this time, as it speeds up my old computer. There are some other well-known python IDEs, such as Spyder, Pydev, Idle, Atom, Jupyter Notebook, etc. I could try them all one day. ...  Read more

A Product

Categories: General | Pubby Cash Received:  0

...  Read more

The Apple Watch Series 5

Categories: Tech | Pubby Cash Received:  10

Do you hate carrying your large phone around for the whole day? Well, the Apple Watch Series 5 is the right watch for you. This watch is convenient and can be customized. This watch is very convenient for many reasons. The watch display never sleeps, it has an app that keeps an eye on your heart, it tells you when things are getting loud. Furthermore, it is capable of telling you directions, getting apps in a snap, and lets you pay things fast. Also, you can customize it in infinite ways in any way you like. There are hundreds of watch faces and many watch colors to choose from. This is why the Apple Watch Series 5 is a great watch and I would highly recommend you to buy it. ...  Read more

Connection of three "no-mirror display" monitors to one computer

Categories: Tech | Pubby Cash Received:  10

Experienced writers need big monitors. Although you can purchase one super big monitor with a size of 38" or above, the price is too high and it is not adaptable to different writing scenarios. For example, landscape is the default orientation of a monitor. When you are writing, there is a lot of unused space to the left and right of the word processing window. If you enlarge the text size to fill the entire window, the vertical view would be restricted. In this case, you may want to rotate the monitor and use in a portrait mode. If you only have one monitor, no matter the monitor is big or small, it is not practical to change back and forth between the landscape and portrait modes frequently. Thus, a secondary monitor that is oriented in a fixed portrait mode in addition to a primary landscape mode monitor would be very handy. Mac is relatively weak compared to Windows in this case, as its ability to extend screens to multiple monitors in an extended screen mode is restricted. If you don't have the latest mac products, it is likely that your mac system would support mirror display only. But mirror display is useless, since our purpose is to write, not to give presentations to people. With a Windows system, even for my $300 bucks old desktop computer, extended display mode can be easily set. I have one 27" monitor in landscape mode connected to a HDMI port, one 24" monitor in portrait mode connected to a VGA port, and the third 24" one in portrait mode connected to a USB 3.0 port. You will need to buy a USB 3.0 to HDMI port converter to add the third monitor. I've put the link below. I'm not in short of screen any more! ...  Read more

1 ... 12 13 14 ... 17

Daily Deals


MECHANICSBURG WEATHER