Posts

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...