Quantcast
Browsing all 45 articles
Browse latest View live

ReadProcessMemory to find a pattern - granularity?

I need to find a pattern into another process' memory and I'm using ReadProcessMemory. Since I'm using algorithms like rabin karp or similars (pattern matching) and since ReadProcessMemory copies...

View Article


Facebook Javascript: display more posts on the wall

I am creating a Chrome extension which has a Javascript modifying Facebook page layout, how can I make the wall displaying older posts?I've tried injecting a script into the page and calling the...

View Article


CUDA - how much slower is transferring over PCI-E?

If I transfer a single byte from a CUDA kernel to PCI-E to the host (zero-copy memory), how much is it slow compared to transferring something like 200 Megabytes?What I would like to know, since I know...

View Article

Answer by Marco A. for Function calling conventions

Calling conventions are commonly used to have a function call adhere to an ABI.An example with a different architecture (a gpu): when calling low-level CUDA routines (device functions) you have to...

View Article

Answer by Marco A. for Getting GitLab CI to clone private repositories

I'm posting this as an answer since others weren't completely clear and/or detailed IMHOStarting from GitLab 8.12+, assuming the submodule repo is in the same server as the one requesting it, you can...

View Article


Doxygen - any way to get a module hierarchy?

It seems that even if I specify my groups as follows:@defgroup MainGroup@brief ...@defgroup SubGroup1@brief ...@ingroup MainGroup@defgroup SubGroup2@brief ...@ingroup SubGroup1The hierarchy in the...

View Article

Appending compiler flags to a file with CMake

How do I add a compiler flag (I want to APPEND it, not overwrite the others) to a single translation unit with cmake?I tried with set_source_files_properties(MyFile.cpp PROPERTIES CMAKE_CXX_FLAGS...

View Article

PTX - what is a CTA?

I'm studying PTX and I don't understand how a CTA (compute thread array) is different from a CUDA block. Are they the same thing? It seems to me that for now (I'm just at the beginning of the PTX...

View Article


Answer by Marco A. for Can a Macro with a goto statement and a label be defined?

A macro is a textual substitution taken care by the preprocessor so, yes you can. You can define a macro for a goto statement and/or a label.Ps. anyway that's a terrible practice.. both using lots of...

View Article


Answer by Marco A. for Convert RGBA to HEX

Since alpha value both attenuates the background color and the color value, something like this could do the trick:function rgba2rgb(RGB_background, RGBA_color){ var alpha = RGBA_color.a; return new...

View Article

Why doesn't a left fold expression invert the output of a right fold expression?

I'm taking a look at C++17 fold expressions and I'm wondering why does the following program outputs4 5 6 4 5 6 for both of the for_each callstemplate<typename F, typename... T>void for_each1(F...

View Article

Answer by Marco A. for The consequences and pros/cons of flushing the stream...

When buffering occurs you will have no guarantees that the data is immediately received before a flush occurs. Under particular circumstances you might experience wrong output ordering and/or loss of...

View Article

Removing a macro with doxygen

I have the following function:void MYMACROTOEXPORTFUNCTION function1()how do I instruct doxygen to remove the "MYMACROTOEXPORTFUNCTION" part from the documentation and prevent it from being shown? I...

View Article


How to check Windows version in CMake?

How do I check with CMake whether I'm configuring a Visual Studio solution for e.g. Windows 7 or Windows 8?Is there any way to do this?

View Article

Answer by Marco A. for How is a template instantiated?

In your specific case a declaration doesn't mean an instantiation#include <iostream>using namespace std;template <typename T> class Stack { typedef typename T::ThisDoesntExist StaticAssert;...

View Article


Answer by Marco A. for Simple stripchart in C++ / Qt

Take a look at the following widgets:http://qwt.sourceforge.net/http://kde-apps.org/content/show.php?content=14017http://www.qcustomplot.com/Also charts might be a good choice (easy to implement with...

View Article

CUFFT - padding/initializing question

I am looking at the Nvidia SDK for the convolution FFT example (for large kernels), I know the theory behind fourier transforms and their FFT implementations (the basics at least), but I can't figure...

View Article


CMake express the "greater or equal" statement

I know that in CMake I can check for the compiler version like thisif(MSVC_VERSION LESS 1700)... // MSVC is lower than MSVC2012but how do I express this in CMake syntax?if(MSVC_VERSION...

View Article

Can't get eclipse to recognize my plugin

I exported my eclipse plugin through the "Export Wizard" in the manifest and seems like everything went well (no errors). It created a .jar file within a plugin directory in a zip file.I thought...

View Article

Answer by Marco A. for Casting char[] to usigned int gives: dereferencing...

The problem with your code is that violates strict aliasing rules and thus it's potentially unsafe.You can either hide the warning with -Wno-strict-aliasing (this won't solve your problem), modify your...

View Article
Browsing all 45 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>