Articles of the Week

Pubbies of the Week

Discord Bot

Categories: Tech | Pubby Cash Received:  0

Discord is an American proprietary freeware instant messaging and VoIP application and digital distribution platform designed for creating communities ranging from gamers to education and businesses. Discord specializes in text, image, video and audio communication between users in a chat channel. Discord lets you set up a chat room it refers to as a server, to which you can invite people. When you invite someone to the server, they get a link that lets them join it, where they can either text or voice chat with other people using that server. One of the most unique features of Discord is the ability to implement bots in the server, making it more fun for the group and easier for moderation.

These bots are AIs that can perform a number of useful automated tasks on your server, such as welcoming new members, deleting inappropriate messages, and banning misbehaving members. You can program them to add games, videos, music, and other content to your server. Discord bots totally bring more life to the server and holds the group together as a whole. Of course there are already numerous bots out there already, but it's always best to create one ourselves.

We will be using Python to build a basic Discord bot. Install the appropriate packages on your machine first. Then create an app on the Discord Developers website. Inside your app, create a bot and add that to your server. (That's the bot you will control using the Python code.) So far, you've created a bot, but it doesn't know anything yet. You can find many tutorials for a simple communication bot. Here is an example:

import discord
client = discord.Client()
async def on_message(message):
    if message.content.find("!hello") != -1:
        await"Hi") # If the user says !hello we will send back hi

Now that it's working great, it is time to deploy the bot. There are many options out there. You could deploy it yourself (by just running it on your computer). I like to use Heroku. Start by creating a new app on Heroku. Change the buildpack to Python in the settings panel. Now you have to make a 'requirements.txt' file with all the necessary packages for Heroku to install along with a 'Procfile', which includes the instructions to run the bot. Make sure that both of these files are in the same directory as the bot script. Now you have to upload everything to GitHub. Finally, in the Heroku app, choose run from GitHub in the Deploy tab and you're good to go!

...  Read more

Our Poor Bunny Passed Away

Categories: General | Pubby Cash Received:  0

So sad our "small bunny" just passed away today. She was the last bunny we have. We call her "small bunny" because she was the smaller one when we brought her home together with her sibling "big bunny" on December 11, 2018. At that time, she was around 3 months old, and her sibling "big bunny" was around 6 months old. I got them at $6 each from bidding at the farmers' market in Lancaster PA, saving these two littles from being sent to the slaughterhouse. We did a lot of restructuring of our basement to build them a nice home. Their potty training was effective after half a year, and the cleaning work was easy on bi-weekly basis. They are our most closest family members in the animal category in our home besides two aquatic turtles, two parakeets, and one hamster. They can respond to our simple directions such as "jump up" and "jump down" to and from our laps, and quickly greet us begging for food whenever we walk downstairs. Today when we walked downstairs cleaning the cage, the "small bunny" did not greet us, she hided herself in a weird spot - a gap between the cage and the wall with no exit and barely no movement room. I did not know how she got into there. I could tell she was quite sleepy, because her eyes were closed and she barely moved. After cleaning her cage, I held her belly with both hands and carefully took her out from that awkward hiding spot. To my surprise, her body temperature was quite high. I had a sense of her normal body temperature when I held her in the past, definitely was not as high as that. Obviously, she was sick, struggling against a fever. But what caused the fever? She lived indoors all the time, and was unlikely to touch undesirable transmissible bacteria and viruses. Food was the only cause as I could think of. She was given a large watermelon peel and several small tomatoes in addition to regular main food of timothy hays. Her body weight was quite okay, with no symptom of decreasing as her sibling - "big bunny" did, who passed away on January 30, 2020 at an age of approximately 20 months old with an obvious symptom of losing weight. And she was quite energetic, with the ability of jumping up easily, unlike her sibling who lost the ability of jumping several weeks before she died. My diagnosis of her death reason was the uterine cancer, which limited her peeing ability when given too many fruits. As I was holding her body after she died, I could feel her stomach was quite full, and there was liquid on the floor coming out from her mouth at the scene of her death. Our bunnies were not spayed, and the unspayed/unneutered rabbits in the wild can live 1-2 years, while spayed/neutered rabbits can have a life span of...  Read more

A Windows 10 Activation Tip

Categories: Tech | Pubby Cash Received:  0

In the last article, I introduced our experiences of migrating the Windows 10 Home Version Operating System from one standby OEM computer to two self-built PCs – one succeeded and one failed. I concluded in that article that Microsoft might have an algorithm that forbids one from maliciously using one license on multiple machines. As I continued searching for activation methods including an option of purchasing a cheap product key from a third-party seller, I was directed to a website that sells Windows 10 product keys for 40 bucks each. This sounds too good to be true. I usually don’t buy anything from non-reputable websites for the sake of protecting me from experiencing credit card fraud and personal information stolen things. However, since I was intrigued by this, I kept on reading the reviews of the website. Although there were no complaints, it turned out the customers of the website did experience bad product keys they sold. The situations were generally like this – the first try failed, indicating the product key had been used, and then they contacted the customer service and were instructed to talk to the bot by clicking the help button in the activation page. The bot would instruct them to complete the rest of the process. This sounds very interesting to me, as I’ve never thought of talking to bot is an approach. I always think that, by clicking the help button, I will be directed to a real person. Since I had the same type of issue – “first try failed, showing the product key has been used”, why not try their method by talking to the bot? That was amazing, the bot did solve my problem. It appeared that the bot automatically communicated with my computer, extracted some information, and gave me a long string of code to enter. After this code was entered, windows was activated right away! I’m very happy about that....  Read more

What is Visual Basic?

Categories: Tech | Pubby Cash Received:  0

Visual Basic is one of those languages that are widely used but isn't at the top. Visual Basic (VB) is an event-driven programming language and the environment from Microsoft that provides a graphical user interface (GUI) that allows programmers to modify code by simply dragging and dropping objects and defining their behavior and appearance. VB is derived from the BASIC programming language and is considered to be event-driven and object-oriented. So it appears as though it's truly simple to learn and utilize this language, and it is. In numerous novice programming courses, understudies learn Python alongside Visual Basic. VB is a GUI-based advancement instrument that offers a quicker RAD (Rapid Application Development) than most other programming dialects. VB likewise includes a linguistic structure that is more direct than different dialects, a visual situation that is straightforward and high information based availability.

How Visual Basic is Used
The structure of VB is designed to allow programmers to use the environment to write executable files (exe files). The most mainstream kind of Visual Basic being used today is VBA. VBA is an adaptation of Visual Basic that can be utilized to program Microsoft Office applications, for example, Excel and PowerPoint. Typical users engage VBA to make repeated, everyday tasks less monotonous through the use of macros. Macros automate almost any activity—such as performing word and data processing or generating custom charts and tables. For example, a typical user might write a macro that allows them to create and fill a spreadsheet with a single click. Computer professionals use VBA and macros in more entangled manners. Developers will regularly compose macros that can reproduce enormous parts of code or characterize explicit dialects.

Advantages of Visual Basic
VB provides not only a programming language but an integrated development environment (IDE) that has been written and optimized to best support RAD. This permits software engineers to effortlessly construct GUIs and interface them to capacities inside the application. In Python, there is a module called PyQt5 that is utilized to create GUIs. Like Visual Basic, PyQt5 has fundamentally the same as utilization and sentence structure.

...  Read more

Windows 10 Activation after a Major Hardware Change

Categories: Tech | Pubby Cash Received:  0

Can windows 10 be activated after you do a major change to your hardware such as motherboard and hard drive? Why not? If it cannot be activated, it is a rip-off for Microsoft to charge you multiple times on the same computer. But it can be activated, what will happen if you migrate the license to multiple computers and that will make activating unlimited computers with one license purchase possible, and Microsoft will be losing money. This appears to be very confusing. We happen to experience such a dilemma when building two PCs: one with successful license migration, and the other failed. For our two cases, we were not doing a major hardware change on the original computer, we were building two completely new computers with an old computer with activated Windows 10 standby. The first build used the an M2 SSD with cloned hard drive data from the standby computer. Windows was activated on the spot while the standby computer was not affected. So, we had two activated computers with the same license. That was a saving of $120 - the cost of purchasing a new Windows 10 Home license. Our second build was done several weeks later. It was another completely new computer. Again, we used an M2 SSD with cloned hard drive data from the standby computer. The steps were followed exactly like our first build. However, there was no luck this time. Windows were not activated no matter how many times we repeated the process. The message on the Control Panel's activation page read something like "The license has been used". While reading a few articles on license migration after major hardware change, I understood the principle: the activated license info is printed in the motherboard. Upon a motherboard change, such info is definitely lost, and that's why you need to reactivate it. That's why we failed the second build. But how to explain our first build while the activation appeared to be carried over to the new computer automatically and we did not do any re-activation at all? I believe the trick was on the first login event with a same Microsoft account of the standby computer during the initialization of the first build. Microsoft detected the same login, which might trigger the re-activation automatically. However, if such change was done again in a short period of time (in our case, it was several weeks), it was not recognized as a regular major hardware change, because no one will upgrade a motherboard in several weeks, the license was marked as used and there was nothing you can do about it except purchasing a new license. This was our Windows 10 activation experience after many hours of tries. Obviously Microsoft will not tell you this, and you learn through your own tries. ...  Read more

1 2 3 4 ... 32

Daily Deals