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 <stdio.h> | |
| #include <stdbool.h> | |
| #include <ctype.h> | |
| #define def_reg(n) int reg##n; scanf("%d", ®##n) | |
| #define print_reg(n) printf("%d ", reg##n); | |
| #define case_assign(target, n) \ | |
| case n: \ | |
| target = reg##n; \ |
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
| set(CMAKE_AUTOMOC OFF) | |
| set(CMAKE_CXX_STANDARD 14) | |
| find_package(Qt5Widgets) | |
| target_link_libraries(qt Qt5::Widgets) | |
| add_executable(demo_error demo_error.cpp) | |
| target_link_libraries(demo_error Qt5::Widgets) |
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
| declare module 'react-relay' { | |
| // fragments are a hash of functions | |
| interface Fragments { | |
| [query: string]: ((variables?: RelayVariables) => string) | |
| } | |
| interface CreateContainerOpts { | |
| initialVariables?: Object | |
| prepareVariables?(prevVariables: RelayVariables): RelayVariables |
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 swap_row!{T}(X::Array{T,2}, i, j) | |
| if i != j | |
| @inbounds for k in 1:size(X, 2) | |
| X[i, k], X[j, k] = X[j, k], X[i, k] | |
| end | |
| end | |
| return X | |
| end | |
| function swap_column!{T}(X::Array{T,2}, i, j) |
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 <iostream> | |
| #include <ctime> | |
| #include <cstdlib> | |
| #include <cassert> | |
| #include <thread> | |
| #include <queue> | |
| #include <sstream> | |
| #define MAX 100 | |
| #define MAX_SMALL 10 |
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
| package edu.zju; | |
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import java.io.*; | |
| public class PagedFileBrowser extends JPanel | |
| implements ActionListener { |
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 <glib.h> | |
| #include <stdlib.h> | |
| #include <assert.h> | |
| #include <math.h> | |
| #include <glib-object.h> | |
| #define ax_deref(type, value) (*((type*)value)) | |
| /** | |
| * | |
| */ |
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 <iostream> | |
| #include <sstream> | |
| #include <utility> | |
| #include <tuple> | |
| #include <string> | |
| #include <cstring> | |
| #include <cassert> | |
| #include <list> | |
| #include <vector> | |
| #include <deque> |
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 <iostream> | |
| #include <thread> | |
| #include <list> | |
| #include <deque> | |
| #include <tuple> | |
| #include <cassert> | |
| #include <sstream> | |
| #include <unordered_map> | |
| #define MAX 10 |
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
| # Check if SSE instructions are available on the machine where | |
| # the project is compiled. | |
| MACRO (FindSSE) | |
| IF(CMAKE_SYSTEM_NAME MATCHES "Linux") | |
| EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) | |
| STRING(REGEX REPLACE "^.*(sse2).*$" "¥¥1" SSE_THERE ${CPUINFO}) | |
| STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE) |