
 <!DOCTYPE HTML>
<html >
<head>
  <meta charset="UTF-8">
  
    <title>One Night in Mok&#39;s Studio</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
    
    <meta name="author" content="Moky">
    
    <meta name="description" content="念念不忘，必有回响。">
    
    
    
    
    <link rel="alternate" href="/atom.xml" title="One Night in Mok&#39;s Studio" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/pacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/pacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css" type="text/css">

</head>

  <body>
    <header>
      <div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.svg" alt="One Night in Mok&#39;s Studio" title="One Night in Mok&#39;s Studio"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="One Night in Mok&#39;s Studio">One Night in Mok&#39;s Studio</a></h1>
				<h2 class="blog-motto">Life is a beautiful struggle.</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
					<li>
					
					<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="text" id="search" name="q" autocomplete="off" maxlength="20" placeholder="Search" />
						<input type="hidden" name="q" value="site:moky.cc">
					</form>
					
					</li>
				</ul>
			</nav>			
</div>

    </header>
    <div id="container">
      <div id="main">

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/14/解决UnicodeEncodeError-ascii-codec-can-t-encode-characters-in-position问题/" title="解决UnicodeEncodeError: &#39;ascii&#39; codec can&#39;t encode characters in position问题" itemprop="url">
  
    <h1 itemprop="name">解决UnicodeEncodeError: &#39;ascii&#39; codec can&#39;t encode characters in position问题</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://blog.sina.com.cn/s/blog_64a3795a01018vyp.html

今天把一个列表转换成字符串输出的时候出现了UnicodeEncod</p>
        
    
    <time datetime="2015-03-14T03:20:41.000Z" itemprop="datePublished">Mar 14 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/13/Python-time-模块详解/" title="Python time模块详解" itemprop="url">
  
    <h1 itemprop="name">Python time模块详解</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://blog.csdn.net/kiki113/article/details/4033017

简介
time模块提供各种操作时间的函数说明：一般有两种表示时间的</p>
        
    
    <time datetime="2015-03-13T02:40:07.000Z" itemprop="datePublished">Mar 13 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/11/Qt的setMouseTracking使用/" title="Qt的setMouseTracking使用" itemprop="url">
  
    <h1 itemprop="name">Qt的setMouseTracking使用</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://blog.csdn.net/marlene0312/article/details/5221261

bool mouseTracking: 这个属性保存的是窗</p>
        
    
    <time datetime="2015-03-11T01:38:30.000Z" itemprop="datePublished">Mar 11 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/10/Murphy's-Law/" title="Murphy&#39;s Law" itemprop="url">
  
    <h1 itemprop="name">Murphy&#39;s Law</h1>
    
     
           <p itemprop="description" >原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。

如果你担心某种情况发生，那么它就更有可能发生。 -墨菲定律
最近老觉得自己的档案会出问题，汗~还真满足了我的愿望啊。没想到我这样没满一年换工，还真会有档案问题啊。想想毕业有一段</p>
        
    
    <time datetime="2015-03-10T02:53:58.000Z" itemprop="datePublished">Mar 10 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/09/QT-获取系统屏幕分辨率/" title="QT 获取系统屏幕分辨率" itemprop="url">
  
    <h1 itemprop="name">QT 获取系统屏幕分辨率</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://blog.csdn.net/zhb123168/article/details/6744982


在Windows下可以使用 GetSystemMetrics</p>
        
    
    <time datetime="2015-03-09T13:16:22.000Z" itemprop="datePublished">Mar 9 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/08/Python对小数进行除法运算的正确方法示例/" title="Python对小数进行除法运算的正确方法示例" itemprop="url">
  
    <h1 itemprop="name">Python对小数进行除法运算的正确方法示例</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://www.jb51.net/article/54278.htm

这篇文章主要介绍了Python对小数进行除法运算的正确方法示例,正确的方法是需要转换成浮点数,否</p>
        
    
    <time datetime="2015-03-08T12:21:42.000Z" itemprop="datePublished">Mar 8 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/07/Python格式化输出百分比/" title="Python格式化输出百分比" itemprop="url">
  
    <h1 itemprop="name">Python格式化输出百分比</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://www.douban.com/note/289063219/

在有些情况下，需要百分比输出数据，我们可以继续使用Python内建函数format来实现百分比的</p>
        
    
    <time datetime="2015-03-07T12:26:50.000Z" itemprop="datePublished">Mar 7 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/06/CSS3快速弄明白border-image/" title="CSS3快速弄明白border-image" itemprop="url">
  
    <h1 itemprop="name">CSS3快速弄明白border-image</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://www.cnblogs.com/niuniu/archive/2010/06/21/1761803.html

在看这个属性时，好像国内的文章都没给大家说太明白</p>
        
    
    <time datetime="2015-03-06T11:31:32.000Z" itemprop="datePublished">Mar 6 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/05/Python模块之uuid/" title="Python模块之uuid" itemprop="url">
  
    <h1 itemprop="name">Python模块之uuid</h1>
    
     
           <p itemprop="description" >【转】原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。http://blog.csdn.net/zhaoweikid/article/details/1649786

uuid是一种唯一标识，在许多领域作为标识用途。python</p>
        
    
    <time datetime="2015-03-05T09:43:46.000Z" itemprop="datePublished">Mar 5 2015</time>
  </a>
</section>

  <section class="post" itemscope itemprop="blogPost">
  
    <a href="/2015/03/04/在QtWebKit-QWebView中显示透明背景的网页/" title="在QtWebKit.QWebView中显示透明背景的网页" itemprop="url">
  
    <h1 itemprop="name">在QtWebKit.QWebView中显示透明背景的网页</h1>
    
     
           <p itemprop="description" >原创作品，允许转载。转载时请务必以超链接形式标明文章原始出处、作者信息和本声明，否则将追究法律责任。

Qt中的QtWebKit让我们可以轻而易举地在客户端里面嵌入网页，而网页的灵活性远远大于需要编译动作的客户端，当我们有变动只需要发布修改的网页而无需重新编译客户端，大大提高了我</p>
        
    
    <time datetime="2015-03-04T07:53:39.000Z" itemprop="datePublished">Mar 4 2015</time>
  </a>
</section>


  <nav id="page-nav" class="clearfix">
    <a class="extend prev" rel="prev" href="/page/5/">&laquo; Prev</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/4/">4</a><a class="page-number" href="/page/5/">5</a><span class="page-number current">6</span><a class="page-number" href="/page/7/">7</a><a class="page-number" href="/page/8/">8</a><a class="page-number" href="/page/9/">9</a><a class="extend next" rel="next" href="/page/7/">Next &raquo;</a>
  </nav>

</div>
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  
<div class="categorieslist">
	<p class="asidetitle">Categories</p>
		<ul>
		
			<li><a href="/categories/C/" title="C++">C++<sup>5</sup></a></li>
		
			<li><a href="/categories/CSS/" title="CSS">CSS<sup>2</sup></a></li>
		
			<li><a href="/categories/Git/" title="Git">Git<sup>2</sup></a></li>
		
			<li><a href="/categories/PyQt/" title="PyQt">PyQt<sup>9</sup></a></li>
		
			<li><a href="/categories/Python/" title="Python">Python<sup>27</sup></a></li>
		
			<li><a href="/categories/Qt/" title="Qt">Qt<sup>28</sup></a></li>
		
			<li><a href="/categories/SVN/" title="SVN">SVN<sup>1</sup></a></li>
		
			<li><a href="/categories/Shell/" title="Shell">Shell<sup>4</sup></a></li>
		
			<li><a href="/categories/杂类/" title="杂类">杂类<sup>3</sup></a></li>
		
			<li><a href="/categories/猿人日常/" title="猿人日常">猿人日常<sup>4</sup></a></li>
		
		</ul>
</div>


  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			<li><a href="/tags/ASCII/" title="ASCII">ASCII<sup>1</sup></a></li>
		
			<li><a href="/tags/Aero/" title="Aero">Aero<sup>1</sup></a></li>
		
			<li><a href="/tags/Branch/" title="Branch">Branch<sup>1</sup></a></li>
		
			<li><a href="/tags/C/" title="C++">C++<sup>1</sup></a></li>
		
			<li><a href="/tags/C2065/" title="C2065">C2065<sup>1</sup></a></li>
		
			<li><a href="/tags/CloseEvent/" title="CloseEvent">CloseEvent<sup>1</sup></a></li>
		
			<li><a href="/tags/ConfigParser/" title="ConfigParser">ConfigParser<sup>1</sup></a></li>
		
			<li><a href="/tags/Git/" title="Git">Git<sup>1</sup></a></li>
		
			<li><a href="/tags/JSON/" title="JSON">JSON<sup>1</sup></a></li>
		
			<li><a href="/tags/Linux/" title="Linux">Linux<sup>2</sup></a></li>
		
			<li><a href="/tags/Notepad/" title="Notepad++">Notepad++<sup>1</sup></a></li>
		
			<li><a href="/tags/PyChecker/" title="PyChecker">PyChecker<sup>1</sup></a></li>
		
			<li><a href="/tags/PyQt/" title="PyQt">PyQt<sup>5</sup></a></li>
		
			<li><a href="/tags/Python/" title="Python">Python<sup>5</sup></a></li>
		
			<li><a href="/tags/QFontMetrics/" title="QFontMetrics">QFontMetrics<sup>1</sup></a></li>
		
			<li><a href="/tags/QLabel/" title="QLabel">QLabel<sup>3</sup></a></li>
		
			<li><a href="/tags/QSS/" title="QSS">QSS<sup>2</sup></a></li>
		
			<li><a href="/tags/QScrollBar/" title="QScrollBar">QScrollBar<sup>1</sup></a></li>
		
			<li><a href="/tags/QTabWidget/" title="QTabWidget">QTabWidget<sup>1</sup></a></li>
		
			<li><a href="/tags/QThread/" title="QThread">QThread<sup>2</sup></a></li>
		
		</ul>
</div>


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>

</aside>
</div>
    </div>
    <footer><div id="footer">
    
    <div class="line">
        <span></span>

        <div class="author"></div>
    </div>
    
    
    <section class="info">
        <p> Hi, I&#39;m Moky. <br/>
            I wanna share all my stuffs with u ~</p>
    </section>
    
    <div class="social-font clearfix">
        
        <a href="http://weibo.com/218889128" target="_blank" title="weibo"></a>
        
        
        
        <a href="https://github.com/mokyue" target="_blank" title="github"></a>
        
        
        
        <a href="https://www.linkedin.com/pub/matthew-mok/69/9a3/641" target="_blank" title="linkedin"></a>
        
    </div>
    <p class="copyright">Powered by <a href="http://hexo.io" target="_blank" title="Hexo">Hexo</a> and themed by <a
                href="https://github.com/A-limon/pacman" target="_blank" title="Pacman">Pacman</a>
        © 2015
        
        <a href="http://moky.cc" target="_blank" title="Moky">Moky</a>
        
        <br>
        <a class="icp" href="http://www.miitbeian.gov.cn/" target="_blank"
           title="粤ICP备15013592号">粤ICP备15013592号</a>
        <a href="http://www.miitbeian.gov.cn/" target="_blank" title="中华人民共和国工业和信息化部">
            <img src="/img/copy_right.png" alt="中华人民共和国工业和信息化部"/>
        </a>
    </p>
</div>
</footer>
    <script src="/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else
    {
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
        
    }
  });
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
});
</script>






<div id="to_top" style="position: fixed; bottom: 80px; right: 7.5%; cursor: pointer;">
    <a title="返回顶部" style="display: block; line-height: 25px !important; text-align: center; box-shadow: 2px 4px 5px rgba(3, 3, 3, 0.2); width: 28px; height: 28px; border-radius: 50%; font: normal 28px 'FontAwesome'; background-color: #ea6753; color: #ffffff"></a>
</div>

<script src="/js/to_top.js"></script>

  </body>
 </html>
