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 <time.h> | |
#include <stdio.h> | |
int main() { | |
int i; | |
int j; | |
int k; | |
int a; | |
int b; | |
const int n = 100000000; |
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
(defun smart-split () | |
"Split the frame into 80-column sub-windows, and make sure no window has | |
fewer than 80 columns." | |
(interactive) | |
(cl-lables ((smart-split-helper (lambda (w) | |
(if (> (window-width w) (* 2 81)) | |
(let ((w2 (split-window w 82 t))) | |
(smart-split-helper w2)))))) | |
(smart-split-helper nil))) |
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 "onyx/screen_proxy.h" | |
#include "onyx/sys_status_public.h" | |
/// Create my own widget. | |
class MyWidget : public QWidget | |
{ | |
public: | |
MyWidget(QWidget *parent = 0) : QWidget(parent) {} | |
~MyWidget() {} |
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
TEST(DatabaseTest, BasicTest) { | |
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); | |
db.setDatabaseName(":memory:"); | |
ASSERT_TRUE(db.open()); | |
QSqlQuery query; | |
EXPECT_TRUE(query.exec("CREATE TABLE IF NOT EXISTS testtable " | |
"(title, url);")); | |
EXPECT_TRUE(query.prepare("INSERT INTO testtable (title, url) " | |
"VALUES (:title, :url);")); | |
query.bindValue(":title", "some title"); |