This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul class="pagination"> | |
| {% if page_obj.has_previous %} | |
| <li> | |
| <a href="?page={{ page_obj.previous_page_number }}"> | |
| {% else %} | |
| <li class="disabled"> | |
| <a href="#"> | |
| {% endif %} | |
| <span>«</span> | |
| </a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef _TRAYICON_H_ | |
| #define _TRAYICON_H_ | |
| // 简单的支持气泡的 trayicon | |
| // z4none@gmail.com | |
| #include <ShellAPI.h> | |
| #define WM_TRAYICON_NOTIFY (WM_USER + 8964) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| import pyaudio, wave | |
| frame_rate = 8000 | |
| sample_count = 512 | |
| channel_count = 1 | |
| pcm_file = open("1.pcm", "wb+") | |
| audio = pyaudio.PyAudio() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <urlmon.h> | |
| #pragma comment(lib, "urlmon.lib") | |
| typedef HRESULT STDAPICALLTYPE MYSHOWHTMLDIALOGFN(HWND hwndParent, IMoniker * pmk, VARIANT * pvarArgIn, TCHAR * pchOptions, VARIANT * pvArgOut); | |
| // | |
| int APIENTRY WinMain(HINSTANCE hInstance, | |
| HINSTANCE hPrevInstance, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CDialogBasedDlg dlg; | |
| if(dlg.Create( CDialogBasedDlg::IDD )) | |
| { | |
| dlg.ShowWindow( SW_HIDE ); | |
| m_pMainWnd = &dlg; | |
| INT_PTR nResponse = dlg.RunModalLoop(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <windows.h> | |
| #include "resource.h" | |
| // | |
| INT_PTR CALLBACK DialogProc( | |
| HWND hwnd, | |
| UINT uMsg, | |
| WPARAM wParam, | |
| LPARAM lParam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;(function ($, window, document, undefined) { | |
| var pluginName = 'pluginName', //自定义一个插件名称 | |
| defaults = { //定义插件的默认属性 | |
| }; | |
| function Plugin(element, options) { | |
| this.element = element; //缓存element,让原型链上的方法都可以访问 | |
| this.options = $.extend({}, defaults, options); //默认属性和自定义熟悉合并处理 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadScript(url, onLoaded) { | |
| var loaded = false; | |
| var scriptTag = document.createElement('script'); | |
| scriptTag.src = url; | |
| scriptTag.onload = scriptTag.onreadystatechange = function(){ | |
| if(!loaded && onLoaded) { | |
| loaded = true; | |
| onLoaded(); | |
| scriptTag.onload = scriptTag.onreadystatechange = null; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| list<string> Split(string s, string delimiter) | |
| { | |
| list<string> result; | |
| unsigned int beg = 0, pos = 0; | |
| while((pos=s.find(delimiter, beg)) != string::npos) | |
| { | |
| result.push_back(s.substr(beg, pos-beg)); | |
| beg = pos + delimiter.length(); | |
| } |