Posts

Showing posts from December, 2021

Why do these 2 UIGraphics drawing operations produce images of different sizes?

 Convert CGPDFPage to UIImage This article is to help readers understanding about converting CGPDFPage to UIImage. The CgpdfDocument has the CGPDFPage class, which stores all of the pages in a PDF document into a single memory page. This means that all the text, shapes, images and graphical objects that make up a particular page are drawn from a ready-made drawing bitmap on the CgpdfMemoryPage. In almost every case, this bitmap is drawn from a PNG file without any compression. I’ll put together a sample project to showcase all of this information, and walk you through how creating a PDF document from scratch. We'll begin by creating a new Xcode project, and follow through with adding some basic starter features to make a functional app quickly. Converting CGPDFDocument to UIImage As the name implies, this class is designed to convert CGPDFDocument to UIImage. To do this, we first need to create an instance of the class. The next step is to create a CGPDFPage from the PDFDocument...

Train/Test Set Proportion in cv.glmnet from glmnet package in R

Train/Test Set Proportion in cv.glmnet from glmnet package in R 1. Train set is the data set on which the model is trained 2. Test set is the data set on which the model performance is evaluated The model is trained using Train Set and then its performance is evaluated with Test Set, where once Test Set satisfies some condition, it can be used as TL-test set for further evaluation or as Seed for another Train/Test Split. etc. Detection of feature importances are another additional reason to have a test-set, while classification models are classified as models where predictive accuracy has only one single correct answer. New neural network models are usually evaluated with evaluation sets of 8n%,25%,50%of their training sets respectively, i.e. If the training set is of size N, then the test set can be made of size N, N/2, N/4 and N/8. The rest of the training set is then used to retrain the model. This way we get models which have good generalization capability. But the accuracy of ...

(Python) Creating and solving a word search puzzle by entering the specifics as input

(Python) Creating and solving a word search puzzle by entering the specifics as input This blog post will show you how to create a word search puzzle with custom terms. Afterward, the same script will be used to solve the puzzle. This post will cover three topics: Creating a word search puzzle with custom terms, using Python to create the same puzzle list, and using Python to solve the list. When completing word searches that are not created by an original program or website, there are words that need to be added manually. For example, let’s say that you are looking for a puzzle that is only missing one word. In this case, it’s important to know that the word can be anywhere on the puzzle board. The word can be at the center of the board, or it can be at the edge. In this blog post, you will learn how to create a word search puzzle with custom terms. You will use Python to create the same puzzle list. You will use Python to solve the list. Let’s begin by defining some terms. A p...

fix JavaScript fetch is delayed

JavaScript fetch is delayed From This is a tutorial of fetching data from the server using JavaScript and jQuery. The fetch() function is not new to JavaScript. It has been supported for a while by major browsers, but only recently was it implemented in jQuery. Actually, this article will focus on one particular topic: how and why is the fetch() delayed? Create an epic blog intro: "JavaScript fetch is delayed" is a tutorial of fetching data from the server using JavaScript and jQuery. The fetch() function is not new to JavaScript. It has been supported for a while by major browsers, but only recently was it implemented in jQuery. Actually, this article will focus on one particular topic: how and why is the fetch() delayed? Why is fetch() delayed? The fetch() function is a synchronous function. Synchronous functions wait for an operation to finish before moving to the next line. For example, if you have a function called setTimeout(), you must wait for that function to fin...

Fix KB5008212 Update with Build 21H2 error

Fix KB5008212 Update with Build 21H2 error KB5008212: This security update resolves a vulnerability in Windows and Windows Server. The vulnerability could allow information disclosure if an attacker sends specially crafted data to the TCP port at 10,000. Computers that receive this invalid data can silently discard it and return no response, which could indicate that computers are vulnerable to this type of attack New Feature: KB5008211 (Build 21H2): The Fall Creators Update (FCU) is now supported on Azure for deployment to VMs with FCU preinstalled as the guest. VMs that are already installed with Windows Server 2016, Windows 10, or Windows Server 2012 R2 can be upgraded to the latest version of Windows. The current version of Windows Server 2016, Windows 10, or Windows Server 2012 R2 will be installed on the VMs with FCU. Computers that receive this invalid data can silently discard it and return no response, which could indicate that computers are vulnerable to this type of atta...

The System Detected overrun of a stack-based buffer in this application

Image
The System Detected overrun of a stack-based buffer in this application Due to a buffer overrun by a system call, an application may enter an undesirable state. On my blog, I will demonstrate the error and show how this can be fixed. An application may enter an undesirable state due to an overrun in the stack-based buffer. Due to a stack-based buffer overrun, an application may enter an undesirable state. In this example, a stack-based buffer overrun may cause the application to enter an undesirable state. To fix this problem, you must change the code to not overrun the buffer. In this example, a stack-based buffer overrun may cause the application to enter an undesirable state. To fix this problem, you must change the code to not overrun the buffer. I. A Stack-Based Buffer Overrun The following sections discuss the problems associated with a stack-based buffer overrun. A stack-based buffer overrun is a problem that can occur when an application is written with buffer overruns. s...

Fix : Built-in Adminstrator Account No Longer Create Folder

Image
Fix : Built-in Adminstrator Account No Longer Create Folder The built-in Administrator account can no longer create folders in OneDrive for Business when syncing. "A warning is displayed saying that the built-in Administrator account cannot create folders because permissions have been adjusted," Microsoft stated. Until a resolution is found, a managed administrator needs to create a new Office 365 group and add the user account that previously had folder creation privileges to that group. "Once this has been done, the user will be able to share their OneDrive for Business with one more collaborator." When creating new files or folders, right click on the file or folder you want to create and select Sharing -> Guest Access > OK . You will get a quick prompt from OneDrive asking if you confirm adding guest access. Select yes and confirm specifying the date of expiration. This is an issue that was introduced with version 1806 of the Windows 10, the April 2018...

Fix - Windows Event - 103

Image
Windows Event - 103 One of the most common problems in IT support is Windows event message 103. We call this problem the “Get Short Pathname” error because it occurs when you try to launch or open various applications, like Excel or Word. Usually, the problem only affects the current user, preventing them from using these apps for a variety of reasons. The main issue with Windows event message 103 is that people can't find it in Microsoft’s Knowledge Base articles, so there are often unanswered questions about how to fix it. But by following this simple set of steps, you should be able to get your programs back up and running in minutes. Step 1: Reboot your PC The first step is to restart your PC. Our best guess has been that something has become corrupted, preventing certain .dll files to properly load up during system booting. To fix this problem, you’ll need to start your PC again and see if that fixes the problem. Step 2: Check for file corruption The next step is to check ...

Some files and folders have strange overlays on the bottom left of their icons

Some files and folders have strange overlays on the bottom left of their icons You may have come across this before, or not. Every now and then you might find that some of your folders or files are overlaid with an overlay. I myself found the situation today when I opened up C:\Program Files\Steam\steamapps\common\Toribash The only odd thing about it is there doesn't seem to be any rhyme or reason to which ones have the overlay and which ones don't, so after some research it appears there are a few things you can try if you're experiencing this yourself. The first would simply be an issue with your system being low on memory, especially if you're trying to open more than one folder or file at once. This is because Windows wants to keep enough memory free to work at its best, so there's possibly just not enough left for Toribash. This can be fixed by either: Running Windows in Safe Mode, and only opening Toribash Opening Windows in Normal Mode, and only opening To...

Can't reactivate Windows 10 after motherboard and hardrive change

Image
  Can't reactivate Windows 10 after motherboard and hardrive change When you first start up your computer, there is a page that prompts you to enter the code on the Windows disc. A few months ago I swapped out my old hard drive with a new one (Windows 10) and since then I can't get past the page. A week ago I changed out my motherboard RAM because I felt like was getting too slow to keep up with my work. Now it says "Windows cannot find the agreement to allow this PC to act as your credentials." Can anyone help? After researching online, it sounds like what you experienced is called “Windows Activation” which would be an issue if you’d installed Windows 10 without first reactivating it. If you had skipped this step, then Windows would have automatically activated once your PC connected to the internet for the first time.  Ever experienced this problem when you installed Windows 10 on your computer, and then you experience the issue that the "recovery" pa...

Is it possible to recreate an old hard drive from a .vhd file ?

Image
 Is it possible to recreate an old hard drive from a .vhd file? This blog post will explore if it is possible to recreate a physical hard drive using only the .VHD file. A question arises with the rise of new technology; how do you make the switch without wiping out all of your data? After an upgrade or refresh, you might be tempted to erase all the files on your hard drive and create a fresh start. Often times this is a better idea as to keep things running smoothly. But what if you want to keep the old system to the one it has been? Can an old hard drive from a .vhd file be recreated from scratch? The joy of computer knowledge is understanding how it all works, but if you're a novice that just wants to use a computer without having to know the details then there are some things that need to be understood. One being, why would an old hard drive from a .vhd file be a good way to keep your system? The answer is that the system in the.vhd file can be used as a fresh install ...

Hal.dll file missing or corrupt after swapping GPUs

Image
Hal.dll file missing or corrupt after swapping GPUs After upgrading my graphics card and transferring my disk to a new computer, I was met with this error: "hal.dll is missing or corrupt" The good news is that you can easily resolve it - just follow this tutorial and you'll be done in no time! When I finished changing my Graphics Cards (I swapped from Nvidia to AMD), I realised I couldn't find the file HAL.DLL (it wasn't in the old Windows directory). Apparently, something went wrong during the move to the new computer for some reason). I had my rig running with no issues for about 3-4 months with the most recent Nvidia drivers, with no issues or blue screens. All I was getting is occasional (maybe 1 in 10 GPU-to-CPU-load errors). A week ago, I swapped out my 980 ti for a 980 ti kingston edition. Ever since then, the machine has not gone into deep sleep (pretty much always off or black), it will randomly blue screen with hal.dll (sometimes three times in one h...