Latest revision (8) of article Feb 13 contains my latest changes I made manually using Code Project editor. It should be marked as "publicly available" (currently the previous revision 7 has this mark) because actually it is publicly visible. Feb 12 I pushed my last commit to GitHub. However, it didn't change the article content on Code Project, I noticed that GitHub webhook returned HTTP response code 500. The same day, couple minutes later I only changed headers of the article by Code Project editor. The next day Feb 13 I tried to manually redeliver GitHub webhook but without success (HTTP error 500 again). So I decided to make the changes manually on Code Project directly. Kind regards, Adam.
amatecki
Posts
-
Updating of article imported from GitHub -
Updating of article imported from GitHubhi, I imported an article from GitHub and couple of days later I pushed my recent commits to GitHub. However, I can't see any changes of article content on Code Project. Shouldn't it be automatically updated after commit to GitHub? Please help. Best regards, Adam.
-
how to: minutes to hours conversionI found this piece of PL/SQL code in application exporting data into financial system. field_number is value of field type number (precision = 2)
trunc(field_number / 60, 0) || ',' || round(100 * (field_number / 60 - trunc(field_number / 60, 0)), 2)
ok, the code is pretty subtle but.. for example: what will be the result for field_number = 10 [min]. Let me guess, 0,16,67 ?
-
C++ templateswhat is the "myBA" ?
-
debugger position does not correspond source codeSorry for my mistake, proper hex values of CRLF are: '\x0D' for CR and '\x0A' for LF. Values which I wrote earlier are related decimal values 13 and 10 respectively. I was thinking about hex values but wrote decimal :) it happens. In Your switch condition there is actually decimal value of 16 but not 10 as You expected. So, it not may be the cause of problem.
-
debugger position does not correspond source codehi, it may be cause of fault in encoding of lines endings in Your source file, ie. from any reason at end of line instead of standard windows CRLF code ('\x0D','\x0A') appear the CR code ('\x0D'). Debugger counts line endings and if any encoding of line end differs from the other it may results in wrong line highlighting. To eliminate this problem You can use any text tool that can re-encode the line endings in Your source file to standard windows encoding or You can use Visual Studio editor feature "Save With Encoding" into "Save File As..." dialog. I would try first in VS do "Save File As..." -> Unix/Macintosh and next "Save File As..." -> Windows.
modified on Tuesday, August 25, 2009 9:28 AM
-
Sending keystrokes to other *non-focus* applicationSendInput
andkeybd_event
functions insert keyboard events into the keyboard input stream and these events are received by active/focused window. If You would like to send keystroke to non-focused window You probably should send message directly to that window. -
Default constructors...«_Superman_» wrote:
The auto generated default constructor will initialize all class data members to 0.
Are You sure? I think it may be behavior of specific compiler You use.
«_Superman_» wrote:
The auto generated copy constructor will do a bit by bit copy of all data members from one instance to the other.
It's true rather for members of built-in types. For members of user defined types, straightway, is used method of constructing member objects with the help of their constructors.
-
difficulty coming up with the right format.function declaration should look rather like the following: int AddY(System::Object __gc * yValue __gc []); or int AddY(System::Object* yValue[]);
params
keyword isn't supported in C++, so this function should be called with argument of type array of Object*.int AddY(Object* yValue[])
{
return yValue->Length;
}Object* arr[] = new Object*[2];
ar[0] = __box(1.1);
ar[1] = __box(2.1);
AddY(arr); -
How to pass a pointer of data to the managed side on a C++ wrapperHi, You could try something like this:
// CnvBuffLib.h
#pragma once
#include <memory.h>;
#include <string.h>;using namespace System;
namespace CnvBuffLib
{
public __gc class ConvertBuffer
{
const char __nogc * const _buffer;
static const int bsize = 256;public: ConvertBuffer() : \_buffer(new char \_\_nogc \[bsize\]) { } ~ConvertBuffer() { delete \[\] \_buffer; } int GetPacket() { // sample of source data char tmp\[\] = {'t', 'e', 's', 't'}; int tmplen = sizeof(tmp); // clear buffer char \_\_nogc \* \_bp = const\_cast<char\*>(\_buffer); \_bp = static\_cast<char\*>(memset(\_bp, 0, bsize)); // copy data to buffer memcpy(\_bp, tmp, tmplen); return tmplen; } // this function copies native buffer to managed buffer (C# side) SByte GetData() \_\_gc \[\] { int rlen = strlen(\_buffer); if(rlen == 0) return 0; SByte result\[\] = new SByte\[rlen\]; char \_\_pin \* presult = &result\[0\]; memcpy(presult, \_buffer, rlen); return result; } };
}