Skip to content

Instantly share code, notes, and snippets.

void CYourDialog::OnFileOpen()
{
CFileDialog FileDialog(TRUE,
"*.*",
NULL,
OFN_HIDEREADONLY,
"Text Files: (*.txt)|*.txt||");
if(FileDialog.DoModal() == IDOK)
{
table! {
arrays (ns) {
ns -> Array<Integer>,
}
}
#[test]
fn test_min_pg_array() {
use self::arrays::columns::*;
use self::arrays::table as arrays;
// rustc 1.24.0-nightly (560a5da9f 2017-11-27)
//
test mysql::connection::tests::batch_execute_handles_multi_queries_with_results ... FAILED
test mysql::connection::tests::execute_handles_queries_which_return_results ... FAILED
test mysql::connection::tests::batch_execute_handles_single_queries_with_results ... FAILED
test mysql::types::date_and_time::tests::dates_decode_correctly ... FAILED
test mysql::types::date_and_time::tests::dates_encode_correctly ... FAILED
test mysql::types::date_and_time::tests::times_of_day_encode_correctly ... FAILED
test mysql::types::date_and_time::tests::times_relative_to_now_encode_correctly ... FAILED
gasabr@gasabrMacPro:docker-debian$ docker image build .
Sending build context to Docker daemon 14.85 kB
Step 1/2 : FROM debian:latest
---> da653cee0545
Step 2/2 : RUN apt-get -qq update && apt-get -qq install -y gcc nasm make gdb
---> Running in fc09b9bfdc77
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package sgml-base.
(Reading database ... 6487 files and directories currently installed.)
Preparing to unpack .../00-sgml-base_1.29_all.deb ...
image image_sepia_c_threaded(image* img, size_t n_threads) {
size_t i=0;
thread_info_t tinfo;
image filtered;
filtered.height = img->height;
filtered.width = img->width;
filtered.data = malloc(sizeof(pixel*) * img->height);
for (i = 0; i < filtered.height; i++) {
gasabr@debian:~/bmplib/bmplib$ make
mkdir -p ./build ./bin
nasm -felf64 src/sepia.asm -o ./build/sepia.o
gcc -std=c99 -pedantic-errors -Wall -Werror -o@ -lm -c src/pixel.c -o build/pixel.o
gcc -std=c99 -pedantic-errors -Wall -Werror -o@ -lm -c src/bmp.c -o build/bmp.o
gcc -std=c99 -pedantic-errors -Wall -Werror -o@ -lm -c src/main.c -o build/main.o
gcc -std=c99 -pedantic-errors -Wall -Werror -o@ -lm -c src/image.c -o build/image.o
gcc -lm ./build/pixel.o ./build/bmp.o ./build/main.o ./build/image.o ./build/sepia.o -o ./bin/bmp_transform
gasabr@debian:~/bmplib/bmplib$ ./bin/bmp_transform images/very_big.bmp images/big_sepia.bmp sepia
sepia time: 5.473416
@gasabr
gasabr / interfaces_lab4.cpp
Created November 21, 2017 17:28
The example from lectures
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include "KWnd.h"
#include "resource.h"
#define Pi 3.14159265
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
void DrawBall(HWND, HDC, HBITMAP, BITMAP, FLOAT, FLOAT, int);
@gasabr
gasabr / interfaces_lab4.cpp
Created November 21, 2017 17:28
The example from lectures
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include "KWnd.h"
#include "resource.h"
#define Pi 3.14159265
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
void DrawBall(HWND, HDC, HBITMAP, BITMAP, FLOAT, FLOAT, int);
@gasabr
gasabr / diesel_matching_error.rs
Last active November 19, 2017 23:58
Diesel question about error handling
// function on which match is used
pub fn delete_user_and_player(conn: &PgConnection,
user_id: i32) -> Result<(), Error> {
use diesel;
use diesel::prelude::*;
use schema::{players, users};
diesel::delete(players::table.filter(players::id.eq(user_id)))
.execute(conn)?;
Verifying that "gasabr.id" is my Blockstack ID. https://onename.com/gasabr