Convert PDF to Word Using 60 Lines of Python Code with Multithreading

In the workplace, we often encounter situations where we need to extract text from PDF files. For a single PDF, copying and pasting doesn’t take much time, but what if you need to convert a large number of PDFs to Word documents? Today, I’ll teach you how to use 60 lines of code to achieve multithreaded batch PDF to Word conversion. If you’re not interested in the detailed process, you can skip to the end for the code. ...

March 3, 2018 · 3 min · Zhiya

Attempting to Hack Scores in 'Snake Battle'

Yesterday, a classmate recommended a popular game called “Snake Battle,” which has recently climbed to the second spot on the App Store’s overall rankings. Whenever I had some free time over the past couple of days, I’d pull out my phone to play a few rounds. However, I hit a bottleneck in the endless mode around 3000 points, so I decided to take a closer look at the game’s API purely out of curiosity… ...

August 28, 2016 · 3 min · Zhiya

Configuring a Flask Project with Nginx+Supervisor+Gunicorn on Alibaba Cloud CentOS7

This document records the setup of a production environment for a Flask application on Alibaba Cloud’s CentOS7. Configuring CentOS7 After logging in as root, first create a new regular user and set a password: adduser user passwd user Next, copy the user’s public key to ~/.ssh, name it authorized_keys, and modify /etc/ssh/sshd_config to disable root login via SSH, change the default SSH port, and use certificate login. Modify the following settings: ...

June 11, 2015 · 3 min · Zhiya

Issue with PushViewController in viewDidAppear

I needed to push another ViewController (SecondViewController) from the viewDidAppear method of a ViewController (FirstViewController), so I used the following code: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; UIViewController *secondViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"]; [self.navigationController pushViewController:secondViewController animated:YES]; } In iOS 8, this code works well. When FirstViewController appears, SecondViewController is pushed immediately, and even if the animated parameter is YES, the push animation does not display. However, in iOS 7, the situation is different. It seems that the pushViewController method does not execute, and SecondViewController is not pushed. Breakpoints show that the pushViewController method is indeed executed, but there is no effect on the interface. ...

March 13, 2015 · 1 min · Zhiya

Using TestFlight for App Beta Testing

TestFlight has been integrated into iTunes Connect by Apple, making it very convenient to conduct beta testing for apps. Here’s an introduction on how to use TestFlight for testing, along with some minor issues you might encounter. First, you need to enable TestFlight in iTunes Connect. You can decide whether to enable TestFlight for a specific version of each app. Go to iTunes Connect -> My Apps -> a specific app -> Prerelease, and in the upper right corner of the uploaded build, turn on the TestFlight switch. This will start TestFlight for that version. ...

October 30, 2014 · 3 min · Zhiya