Skip to content

Instantly share code, notes, and snippets.

View 0xlitf's full-sized avatar

0xCalcifer 0xlitf

  • 19:12 (UTC +08:00)
View GitHub Profile
@0xlitf
0xlitf / XMLHttpRequest
Created December 27, 2016 07:04
XMLHttpRequest
var http = new XMLHttpRequest()
var url = "http://127.0.0.1:8080/hangzhoubaogongdian/findUser.do?";
var params = "usernameSch=" + user + "&passwordSch=" + password;
http.open("POST", url, true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {
Row {
id: contentRow2
spacing: 10
height: Math.max(remarkLabel.height, remarkRectangle.height)
width: parent.width
Text {
id: remarkLabel
anchors.verticalCenter: parent.verticalCenter
text: "备注:"
width: taskContentLabel
Rectangle {
id: infoText
anchors.centerIn: parent
width: parent.width
height: 40
color: "black"
Text {
color: "white"
anchors.centerIn: parent
text: "You can navigate between views using swipe or arrow keys"
void TableDialog::on_subComboBox_currentIndexChanged(int index)
{
int maxCount = 0;
auto itemmodel = static_cast<QStandardItemModel*>(ui->tableView->model());
if (!itemmodel)
{
return;
}
QComboBox* comboBox = NULL;
if (NULL != (comboBox = qobject_cast<QComboBox*>(this->sender())))
@0xlitf
0xlitf / http_get.go
Created September 20, 2016 08:24 — forked from ijt/http_get.go
Example of using http.Get in go (golang)
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
)
@0xlitf
0xlitf / Syntax Highlighter Example
Created August 23, 2016 07:03
Syntax Highlighter Example
Syntax Highlighter Example
The Syntax Highlighter application displays C++ files with custom syntax highlighting.
The example consists of two classes:
The Highlighter class defines and applies the highlighting rules.
The MainWindow widget is the application's main window.
@0xlitf
0xlitf / opencv录制视频
Created June 20, 2016 08:45
opencv录制视频
#include <highgui/highgui.hpp>
#include <cv.h>
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
CvCapture* capture = cvCaptureFromCAM(0);
@0xlitf
0xlitf / CommonSettings.props
Created May 16, 2016 14:47
CommonSettings.props
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<BuildDir>$(SolutionDir)..\Build</BuildDir>
<!--NOTE: CpuOnlyBuild and UseCuDNN flags can't be set at the same time.-->
<CpuOnlyBuild>true</CpuOnlyBuild>
<UseCuDNN>false</UseCuDNN>
<CudaVersion>7.5</CudaVersion>
<!-- NOTE: If Python support is enabled, PythonDir (below) needs to be
@0xlitf
0xlitf / vs编译完成自动拷贝dll
Created March 31, 2016 05:44
vs编译完成自动拷贝dll
@echo copy dlls to bin
if $(PlatformTarget)==x64 (
xcopy "$(SolutionDir)built\$(ProjectName)\$(Platform)\$(Configuration)\*.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin" /y
)
if $(PlatformTarget)==x86 (
xcopy "$(SolutionDir)built\$(ProjectName)\$(Platform)\$(Configuration)\*.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin" /y
)
@0xlitf
0xlitf / buffer->QImage
Created March 29, 2016 06:45
buffer->QImage
if ((pBuf = m_fingerPrinter->CaptureOneImage(true)))
{
QPixmap pix1;
pix1.loadFromData(pBuf, 256 * 360 + 1078, "BMP");
emit fingerPrintCatched(pix1.toImage());
delete[]pBuf;
}