博文

目前显示的是 2017的博文

小程序优秀开发资源

https://sdk.cn/news/7677

IP 地址数据库

https://github.com/lionsoul2014/ip2region

Java SVG

http://www.jfree.org/jfreesvg/ https://github.com/AJcodes/SVG-Editor-Java https://github.com/eseifert/vectorgraphics2d http://www.kiyut.com/products/sketsa/sketsa.png https://inkscape.org/en/credits/ https://github.com/blackears/svgSalamander Drop Drop Lib http://www.manageability.org/blog/uncategorized/open-source-structured-graphics-libraries-in-java/view

小程序的坑

https://zhuanlan.zhihu.com/p/23536784

Enabling Nginx mod_rewrite | DigitalOcean

Enabling Nginx mod_rewrite | DigitalOcean https://www.digitalocean.com/community/questions/enabling-nginx-mod_rewrite

apache网站访问缓慢的处理记录

朋友在阿里云上开通了一台ubuntu服务器(2G内存,2核CPU),用apache搭建了一个公众号网站。 网站初期,他没有做相应的优化,在后续公众号推广活动时,网站并发突增,访问十分缓慢 。 登陆服务器,具体现象为: 1)uptime查看负载较高; 2)ss -a(或netstat命令) 查看连接数较多,并且WAIT_TIME比较多 ; 3) apache日志显示prefork工作模式下的并发连接数设置有问题 ;[mpm_prefork:error] [pid 13848] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting 4)重启apache服务后,网站暂时访问稍快,但过一会后又十分缓慢。 针对上面的现象, 帮他做了一些优化操作后,网站高并发下访问正常,速度很快 。操作记录如下: 1)修改apache的最大并发连接数(默认是256) 有日志报错可知,apache采用的是默认的prefork模式(使用apache2 -l或httpd -l命令也能查看处理 ) 找到mpm_prefork.conf文件进行连接数的修改(若是work模式,就修改mpm_worker.conf) [root@wang ~]# vim /etc/apache2/mods-available/mpm_prefork.conf       StartServers                     10       MinSpareServers               10       MaxSpareServers              20       ServerLimit             ...

Check Apache bottle neck

You first need to determine what is the root-cause of things running slowly. I suggest to  strace  the apache process like this: First, determine the process id of the parent apache process by running: $ ps axu | grep apache | grep root The first number in the output (2nd field) should list the process-id. Output example: root 9446 0.0 0.0 255620 15124 ? Ss Aug02 0:06 /usr/sbin/apache2 -k start Now  strace  the process and its children processes like this: $ sudo strace -f -p 9446 -T (make sure to replace the process id  9446  by your actual process id as revealed by the 1st command.) The output will list all system calls followed by the time it took them to complete. It should make it very clear where are you spending your time or getting stuck. Please note that system calls that are blocking by nature, like  select  or  accept  would normally block until an external event occurs, so they are expected to not return ...

Free pascal assign procedure as TNotifyEvent

http://forum.lazarus.freepascal.org/index.php?topic=31306.0      procedure  DoSomeThing ( aself ,  Sender : TObject ) ;    begin      writeln ( 'Hello' ) ;    end ;      function  MakeMethod (  Data ,  Code :   Pointer   ) :  TMethod ;    begin     Result . Data   : =  Data ;     Result . Code   : =  Code ;    end ; xxxx.xevent = TNotifyEvent( MakeMethod(timer, @dosomething));

TConsoleApp

http://forum.lazarus.freepascal.org/index.php?topic=33937.0 program  consoleapp ;   {$mode objfpc}{$H+}   uses    {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads ,    {$ENDIF}{$ENDIF}   Classes ,  SysUtils ,  CustApp    { you can add units after this } ,   fpTimer ;   type      { TConsoleApp }     TConsoleApp  =  class ( TCustomApplication )    protected      procedure  DoRun ;   override ;    public     Timer1 :  TFPTimer ;      constructor  Create ( TheOwner :  TComponent ) ;   override ;      destructor  Destroy ;   override ;      procedure  Timer1Exec (  Sender  :  TObject  ) ;    end ;   { TConsoleApp }   procedure ...

小程序动画

http://blog.csdn.net/qq_31383345/article/details/53841192

小程序高颜值UI

https://github.com/simsir-lin/simui-wxapp

Couple of ways of dealing with AV file on iOS

filehandler: http://willtosky.com/2017/01/05/iOS小记/ http://www.cnblogs.com/iOSCain/p/4035359.html About Sand box http://www.infocool.net/kb/IOS/201611/215753.html writeDataForAssetResource https://stackoverflow.com/questions/33278540/phasset-afnetworking-upload-multiple-videos http://www.jianshu.com/p/2af1c0365ee4 - ( void )assetsPickerController:( GMImagePickerController *)picker didFinishPickingAssets:( NSArray *)assetArray {     if (assetArray. count == 0 ){         [picker. presentingViewController dismissViewControllerAnimated : YES completion : nil ];         return ;     }     __weak CDVCamera * weakSelf = self ;     __weak CDVCameraPicker * cameraPicker = ( CDVCameraPicker *)picker;     PHAsset *asset = [assetArray objectAtIndex : 0 ];          dispatch_block_t invoke = ^( void ) {         __block ...