Skip to content

Instantly share code, notes, and snippets.

#include <QCoreApplication>
#include <QRegularExpressionMatch>
#include <QStringList>
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QStringList results;
QRegularExpression this_regex("(\\wog)|(\\wee)");
# Ruby - A nested hash example
# Load each pair of args on the command-line as a key-value pair
# For example from CMD.exe:
# call ruby.exe ruby_nested_hash_example.rb Age 30 Name Mary Fav_Hobby Ataraxia Fav_Number 42
# Output would be:
# {
# "data_info": {
# "types": {
# "nums": {
# "Age": 30,
# Original class developed by dbjsy of StackOverflow
# User_URL: http://stackoverflow.com/users/4293919/dbjsy
# Question_URL: http://stackoverflow.com/questions/7014052/ruby-multidimensional-array
# Answer_URL: http://stackoverflow.com/a/35429385/3543437
#
# Produces a PHP/Classic-style multidimensional array.
#
# Example:
# arr = MArray.new
# arr[1][2][3] = "foo"
/*
* Derived from an answer at StackOverflow
* Answer: http://stackoverflow.com/a/40737306/3543437
* Question: http://stackoverflow.com/questions/8312459/iterate-through-object-properties
* Answer Author: http://stackoverflow.com/users/1073330/frank-roth
* Purpose: Illustrate how the single-liner can be split up into multiple lines using map((key)=>(value))
*/
Object
.keys(mock_json_complex)
var empty_obj = {};
if(Object.entries(empty_obj)==undefined)
{
console.log('is undefined');
}
else if(Object.entries(empty_obj)==null)
{
console.log('is null');
}
else if(Object.entries(empty_obj)=={})
using System;
using System.Reflection;
using System.IO;
namespace DotNetInspectorGadget
{
class DotNetInspectorGadget
{
static int Main(string[] args)
{
if(args.GetLength(0) < 1)
/*
* Get Dependency List of DLLs
* Lists names of DLLs used to build the binary
* CAVEAT 1: Will not tell you what DLLs are loaded into the module at runtime
* CAVEAT 2: Will not tell you .NET Assembly Information
* CAVEAT 3: This app seems to crash on 64-bit applications; not sure why, exactly. Even occurs on itself when compiled as x86_amd64.
*
* I take no credit for this. It was wholly derived from a forum post of the C Boards. This is my hacked diff to only get DLL names.
*
* Forum Post Internet Archive Snapshot: http://web.archive.org/web/20090327115720/http://cboard.cprogramming.com:80/windows-programming/82906-problem-while-reading-inport-table.html
+ addy 0x000000a578d2f3a8 {0x0000000000001000} unsigned __int64 *
argc 0x00000002 int
+ argv 0x0000029771432410 {0x0000029771432428 "C:\\Users\\TheUser\\documents\\visual studio 2017\\Projects\\load_pe\\x64\\Debug\\load_pe.exe"} char * *
coverted_base_address 0x0000029771370000 unsigned __int64
data_directory_optional_header_offset 0x0000000000000070 unsigned __int64
direct_access_size_stack 0x0000000000001000 unsigned __int64
error_check 0x00000000 int
+ filesystem_image {_Mystr=L"C:\\pathToFile\\some_test.exe" } std::experimental::filesystem::v1::path
+ image_directory "C:\\pathToFile" std::basic_string<char,std::char_traits<char>,std::allocator<char> >
image_loaded true bool
+ addy 0x0000004032f4e238 {0x0000000000001000} unsigned __int64 *
argc 0x00000002 int
+ argv 0x000001560ce43920 {0x000001560ce43938 "C:\\Users\\TheUser\\documents\\visual studio 2017\\Projects\\load_pe\\x64\\Debug\\load_pe.exe"} char * *
Characteristics 0x00000022 unsigned long
coverted_base_address 0x000001560cd90000 unsigned __int64
data_directory_optional_header_offset 0x0000000000000070 unsigned __int64
direct_access_size_stack 0x0000000000001000 unsigned __int64
error_check 0x00000000 int
fDOSImage 0x00 '\0' unsigned char
+ FileHeader 0x000001560cd90100 {Signature=0x00004550 FileHeader={Machine=0x8664 NumberOfSections=0x0008 TimeDateStamp=...} ...} _IMAGE_NT_HEADERS64 *
#include "Windows.h"
#include "tchar.h"
#include "stdio.h"
#include "stdlib.h"
#include <string>
int _tmain(int argc, _TCHAR* argv[])
{
STARTUPINFOA startup_info = { 0 };