Skip to content

Instantly share code, notes, and snippets.

@ccnyou
ccnyou / example.cpp
Last active October 28, 2020 07:05
大学时候使用C++在Windows环境下实现的读写锁
class CXxx
{
//other code...
cc::CSharedMutex m_xxxMutex; // 声明要互斥变量
}
CXxx::SomeMethod()
{
{ //限定锁的作用域
@ccnyou
ccnyou / make_app_icon.py
Created September 26, 2018 13:16
make iOS app icon
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author ervin
import sys
from PIL import Image
for input_file_name in sys.argv[1:]:
need_1x_image_size = [1024]
need_2x_image_size = [20, 29, 40, 60]
// baseclass.m
- (void)_fuck {
NSLog(@"fuck base class");
}
// subclass.m
- (void)_fuck() {
NSLog(@"fuck sub class");
}