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
| <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
| int width = m_view_size.width(); | |
| int height = m_view_size.height(); | |
| uint8_t * data = new uint8_t[width * height * 4]; | |
| m_gles2->ReadPixels(m_context->pp_resource(), 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); | |
| cv::Mat rgbFrame, outputFrame; | |
| cv::Mat glFrame = cv::Mat(height, width, CV_8UC4, data); | |
| cv::cvtColor(glFrame, rgbFrame, CV_BGRA2RGB); | |
| cv::flip(rgbFrame, outputFrame, 0); |
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 <sys/time.h> | |
| /** | |
| * Returns the current time in microseconds. | |
| */ | |
| long getMicrotime(){ | |
| struct timeval currentTime; | |
| gettimeofday(¤tTime, NULL); | |
| return currentTime.tv_sec * (int)1e6 + currentTime.tv_usec; | |
| } |
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
| import datetime | |
| from django.conf import settings | |
| from rest_framework.authentication import TokenAuthentication | |
| from rest_framework import exceptions | |
| from django.utils.translation import ugettext_lazy as _ | |
| from django.core.cache import cache | |
| EXPIRE_MINUTES = getattr(settings, 'REST_FRAMEWORK_TOKEN_EXPIRE_MINUTES', 1) |
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
| sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | |
| phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ | |
| electron_mirror=https://npm.taobao.org/mirrors/electron/ | |
| registry=https://registry.npm.taobao.org |
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
| void EnableDlgItem (CWnd *dlg, int items[], BOOL bEnable) | |
| { | |
| int i = 0, item ; | |
| while ((item = items[i++]) != 0) | |
| { | |
| CWnd *pControl = dlg->GetDlgItem(item) ; | |
| if (pControl != NULL) | |
| pControl->EnableWindow(bEnable) ; | |
| } |
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
| USES_CONVERSION; | |
| A2CT(str); | |
| CT2A(str); |
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
| class IfRegexNode(Node): | |
| def __init__(self, var1, var2, nodelist_true, nodelist_false, negate): | |
| self.var1, self.var2 = Variable(var1), Variable(var2) | |
| self.nodelist_true, self.nodelist_false = nodelist_true, nodelist_false | |
| self.negate = negate | |
| def __repr__(self): | |
| return "<IfRegexNode>" | |
| def render(self, context): |