78-Thread Cleaning Function

Sometimes we want the thread to automatically execute certain functions when it exits. In order to achieve this goal, OS provides two functions to help us accomplish this function: void pthread_cleanup_push(void (*rtn)(void*), void *arg); void pthread_cleanup_pop(int execute); 1. Usage If you want your thread to execute the cleanup function ...

Posted on Fri, 12 Apr 2019 12:45:31 -0700 by Rhysickle

Replacement of ldd and strace on Mac OS X

ldd is often used under Linux to see which shared link libraries are used by programs. It is a convenient tool. This command is not available on Mac OS X. If you want to see which link libraries are used in Mac OS X, you can use otool instead. Example: $ otool -L /usr/bin/vim /usr/bin/vim: /usr/lib/libncurses.5.4.dylib (compatibili ...

Posted on Fri, 08 Feb 2019 20:24:17 -0800 by mistertylersmith

Analysis of Recruitment Information in Lagoon (I)

Weekend routine data processing study, the whim of the Lab on Python job recruitment is very interested, so take some data as learning and practice. Get the fields: Job title Corporate name Wages and salaries Hands-on background Academic requirements Data acquisition ideas: Simulate human browsing behavior, add header, increase l ...

Posted on Mon, 28 Jan 2019 03:18:15 -0800 by bUcKl3

Reading Notes in iOS Drawing Practical UIKit Solutions (4) - Masks, Blurs and Animations

Masks, blurs and animations will add a lot to our APP. Now let's get to know it. Drawing Images with Blocks Using the following tool functions, you can simplify the process of creating an image. typedef void(^DrawingStateBlock)(); UIImage * DrawIntoImage(CGSize size, DrawingStateBlock block) { UIGraphicsBegin ...

Posted on Sun, 23 Dec 2018 01:18:06 -0800 by vbzoom.com