15,894,546 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by barneyman (Top 200 by date)
barneyman
11-Jul-17 0:32am
View
this question is >2.5 years old
barneyman
29-Jun-17 0:57am
View
ok
barneyman
22-Jun-17 23:20pm
View
yeah - i saw that too - but %n is doc'd as returning 'chars printf'd so far' - TIL !
barneyman
22-Jun-17 20:09pm
View
i quoted the EXACT general case
DO NOT concat strings, use arguments
barneyman
21-Jun-17 19:05pm
View
DO NOT concat strings, use arguments ... a quick google turned up this http://php.net/manual/en/pdo.prepare.php
barneyman
7-May-17 23:58pm
View
what have you tried?
(and TeamSales is a completely redundant column, it can be calc'd)
barneyman
7-May-17 19:59pm
View
Griff is suggesting (correctly IMO) you use another referential table, so to get to the images you'd do something like this (using his schema)
SELECT Imagedata FROM IMAGES WHERE ProductId=@ID
where @ID is got form the Products table
if you want another column, person, then you need another Person table and personid
you need to research SQL Normalisation - and for the love of cheese, use GUIDs as IDs and UTC as your timezone
barneyman
8-Feb-17 19:21pm
View
admin elevation required?
barneyman
19-Jan-17 20:56pm
View
what exception do you get?
barneyman
18-Jan-17 18:17pm
View
that URL and the explanation does not preclude you from using C++
it talks about creating it and the messages you have to intercept
barneyman
9-Jan-17 21:03pm
View
you could do it with a trigger on the insert
Why are you trying to do it this way, it seems (on the face of it) a bit confusing - What happens if a price is added, or removed, later?
Adding strings to rowids is a bad idea too ... that should be done by the presentation layer - IMHO
barneyman
22-Sep-16 21:31pm
View
the first linked example is pretty much step by step ...
how is it failing for you?
barneyman
20-Sep-16 20:14pm
View
QBW has an ODBC driver http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2347/49/how-do-i-build-a-connection-string-with-all-the-available-qodbc-parameters--connection-string-with-qodbc-parameters
so you could just try importing direct into SQL
barneyman
13-Sep-16 22:40pm
View
because that's the standard way of expressing hex and octal, in programming
barneyman
4-Aug-16 18:23pm
View
you may need a more pro-active approach - something like VLD https://vld.codeplex.com/ may be useful
You may not have a leak, you may simply be fragmenting the heap?
i generally round the allocation size up to a the nearest para when a have a *lot* of heap hits
barneyman
2-Aug-16 19:26pm
View
the matrices are very important to understand, there are a few tutorials around
http://www.toymaker.info/Games/html/matrices.html
barneyman
2-Aug-16 2:21am
View
does the DX device paint anything, i.e. the background? is your render called?
Try just using a colour triangle rather than a textured one to start with
if it's painting, but you're not seeing anything, odds are your view matrix is broken
barneyman
31-Jul-16 19:08pm
View
what exactly fails? the build, or it executes and nothing happens?
please be explicit
barneyman
27-Jul-16 1:06am
View
CMyClass::StdDispatchImpl<cmyclass>::CreateInstance ?
barneyman
21-Jul-16 2:52am
View
you need some form of read/write locking on that data buffer - currently it has the potential to change while printf is traversing it
barneyman
20-Jul-16 5:52am
View
you're in the middle of an interrupt service routine - you have to get out as quickly as possible,and make no blocking calls
push the data into a pre-allocated buffer, and let another, normal, thread do something with it
barneyman
20-Jul-16 0:47am
View
32767 columns?
sounds like a singed int max limit
barneyman
13-Jul-16 19:08pm
View
are you in a CWnd derived class when you call this?
Sounds like you're getting ::GetDC, which returns an HDC
barneyman
5-Jul-16 19:49pm
View
why on earth are you storing dates as strings?
ok - so you're going to have to CONVERT each row datestring into a DATE and the min/max datestrings also into DATEs
barneyman
11-Jun-16 20:20pm
View
you've asked this question before, and been given the answer
http://www.codeproject.com/Questions/1105390/Different-value-pixel-in-C-and-Python-language
in python the image is being parsed/interpreted by the image library, in C you're reading the raw bytes
barneyman
10-Jun-16 0:20am
View
there's only one semicolon in that procedure!
and it shouldn't be there
barneyman
9-Jun-16 7:46am
View
so, what's the problem? obviously you have to determine the threshold for B vs W
barneyman
7-Jun-16 19:43pm
View
you don't have an exit condition ... it'll find 3 fives, then it won't find any - so it'll return .end() - which you then try to increment
barneyman
6-Jun-16 19:56pm
View
depends on the format of the image
barneyman
5-Jun-16 20:55pm
View
because you're still messing with the local decl (of m_coordslist inside OnInit..) and not the member
barneyman
5-Jun-16 19:54pm
View
i don't see anywhere where you're creating, or attaching to, that list control (which is LOCAL to the OnInit... it's obscuring the global)
barneyman
2-Jun-16 18:15pm
View
you're guessing until you debug it - windbg or vs remote debugging - the latter is easier, the former less invasive
barneyman
26-May-16 22:00pm
View
if regsvr32 doesn't give any errors (and you were UAC elevated) then the registration worked ...
it sounds like the proxy isn't proxying ... define 'doesn't work' please
is this a proxy/stub or just a proxy - is the com object it's proxying for registered .. if you watch the regsvr32 process with procmon.exe is it making the right registry entries
barneyman
18-May-16 20:02pm
View
you might want to look at RARP
barneyman
10-May-16 20:27pm
View
as pwasser says, it's probably something broken in the header, or one of it's children
that said, i DO recall an incident where the preprocessor barfed because there wasn't a trailing \n\r after the last directive (on the last line) in a file
barneyman
2-May-16 0:15am
View
from memory (this is 1999!), irDA is implemented in Windows using the winsock libraries
barneyman
15-Mar-16 19:29pm
View
two observations
1. you don't do any bounds checking (ie when count==SIZE)
2. how does displayCoins know how many coins were input in getCoins, magic?
barneyman
6-Mar-16 16:04pm
View
also worth pointing out that some optimisers will consider the inline keyword a suggestion, and may decide not to honour it
barneyman
27-Jan-16 21:19pm
View
you're trying to populate the DA with the entire rowset ...
try using Fill paging
barneyman
18-Jan-16 19:33pm
View
no, no you don't - then you're messing with a container AND its contents, every time you add/del from it .... as SA says, use a std::string, or CString
barneyman
7-Jan-16 15:56pm
View
Edit/Find ?
i'd look for the string .. it'll either be in the DIALOG rc definition or it'll be a string in the stringtable (in which case then look for that define elsewhere) or it'll be inline in the code
barneyman
10-Dec-15 20:25pm
View
see my other comment down the thread ... google
i could give you a salmon, but you learning to fish is best
barneyman
10-Dec-15 19:58pm
View
no - 426 was being obtuse :)
the function 'Increment' is simple - google 'c++ how to call a function' will help you
Increment2 is more complex because of the pointer (*) qualifier - you need to get the addressof count, which is where the ampersand comes in .. again google 'c++ pass pointer to function'
barneyman
10-Dec-15 19:48pm
View
the word 'loop' wasn't mentioned in your original question
you just call them ? they're functions .... it's a procedural language ...
Perhaps you've not outlined your *actual* requirement fully?
barneyman
9-Dec-15 21:06pm
View
true
barneyman
9-Dec-15 20:31pm
View
also, pass the array by reference max(float &vec[]) - code will be faster, especially for large arrays
barneyman
9-Dec-15 20:24pm
View
only if you want it to work :)
barneyman
9-Dec-15 20:11pm
View
what value does max start with?
barneyman
5-Nov-15 21:13pm
View
good catch!
barneyman
5-Nov-15 19:21pm
View
cursory examination looks ok - have you tried debugging it?
barneyman
28-Oct-15 22:45pm
View
use the TCHAR and _T("" )defines - that will be char or wchar depending on your compile - the Regex and Http libs have both impls
barneyman
27-Oct-15 18:43pm
View
as i said, error code 1638 is for a different situation - additionally, 1638 is returned WELL before any copies start - installUIsequence
barneyman
27-Oct-15 18:34pm
View
arg0 is automatically supplied by the startup code - you don't need to specify it
barneyman
26-Oct-15 17:26pm
View
argv[4] would be the *path* to the input file (ie /usr/binaryoffset/wibble.bmp), similarly argv[5] is the output *path*
barneyman
19-Oct-15 22:37pm
View
i use the 2nd method (in C++/OLDEB) and always found it returned the same result set as the datalinks dialog (UDL)
barneyman
14-Oct-15 1:03am
View
http://download.osgeo.org/geotiff/samples/
i used google with "geotiff examples"
barneyman
14-Oct-15 1:00am
View
how does using a public key make it vulnerable, and why does using the private key resolve this? it's asymmetric - you're robbing peter to pay paul!
barneyman
12-Oct-15 17:50pm
View
no idea - tho' NSIS doesn't install using the MSI engine, so maybe win10 is locking it out - UAC possibly?
And DO NOT change the browser without user interaction - that get's you immediately uninstalled in my world
barneyman
11-Oct-15 23:29pm
View
dupe of http://www.codeproject.com/Questions/1038455/How-do-I-Load-Data-from-Multiple-Source-Text-Excel?arn=4
please don't do that
barneyman
1-Oct-15 0:32am
View
please edit/rephrase the question - your first version is not exactly clear
barneyman
30-Sep-15 20:32pm
View
why are you using directx to do this?
do you simply want to screengrab an arbitrary HWND (including desktop)?
barneyman
27-Sep-15 7:28am
View
Macie is right - we need code ...
writexml will honour the structure in the order you add nodes to it
barneyman
24-Sep-15 19:07pm
View
couple of observations/questions here ..
1. your xml (both examples) as quoted, are broken - they're not closed - have you simply pasted them incorrectly?
2. are you saying the XSD re-orders it, or the writexml method?
barneyman
23-Sep-15 7:32am
View
neither make sense and will do what's posited
the second won't even compile
barneyman
22-Sep-15 6:09am
View
my money is on you calling the first method/member on a null pointer to a class
barneyman
21-Sep-15 6:09am
View
that's a core dump ... your program is crashing
you're going to have to debug the program or examine the core dump
barneyman
20-Sep-15 0:45am
View
http://sourceforge.net/p/polyclipping/code/HEAD/tree/trunk/cpp/clipper.cpp#l1061
it's not excepting on that line, but throwing just before it ...
learn how to catch and handle exceptions
http://www.tutorialspoint.com/cplusplus/cpp_exceptions_handling.htm
barneyman
19-Sep-15 19:46pm
View
have you tried catching the exception and using the what() method?
barneyman
10-Sep-15 8:31am
View
have a look at cursors
barneyman
10-Sep-15 8:27am
View
where are you stuck? what code have you written?
barneyman
7-Sep-15 18:27pm
View
it would appear your DB is broken then ... advice under that condition is to restore from a recent backup, and apply the log files forward
and check your disks, they caused the problem
barneyman
3-Sep-15 21:13pm
View
presumably because the backup job is locking pages to, er, backup?
barneyman
3-Sep-15 6:33am
View
i'd reverse the input string ... what are your thoughts?
barneyman
2-Sep-15 2:41am
View
good eyes!
barneyman
31-Aug-15 8:13am
View
good luck
i'm hoping Adobe publish their Photoshop code one day
barneyman
25-Aug-15 18:46pm
View
what's the code, what call fails, what's the error, (GetLastError()), where are you writing it to etc, etc
"my washing machine isn't working" - can you diagnose and fix it from that one statement? ;)
barneyman
24-Aug-15 15:50pm
View
please delete this solution, and respond to Richard's ...
i'd suggest he'll say "same error, same problem - that's not how you cast in VB"
barneyman
20-Aug-15 4:42am
View
for the love of cheese, use ATL to create a COM object - trying to use flat C to provide an OOP solution is an exercise in frustration
barneyman
19-Aug-15 22:08pm
View
reply to karsten's comment, or he won't be notified - you've added a new solution
barneyman
19-Aug-15 7:52am
View
no, but i can google
https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=c%2B%2B%20windows%20service&es_th=1
barneyman
18-Aug-15 23:31pm
View
no - your original problem is that you're trying to write to the sample.xml file, in your install directory - which you don't have write access to
So, create the sample.xml file somewhere you DO have write access to, my example was the temp folder, but appdata is equally viable
barneyman
18-Aug-15 23:13pm
View
https://msdn.microsoft.com/en-us/library/system.io.path.gettemppath(v=vs.110).aspx
barneyman
18-Aug-15 18:58pm
View
unlikely - if it's in the typelib, it's in the api - it's a property tho, so it would be get_length
anyway, there are a number of other ways of iterating thru the swatches, have you tried them?
barneyman
18-Aug-15 1:47am
View
have you tried 'length' ?
barneyman
13-Aug-15 20:22pm
View
elevation, i'd guess
barneyman
9-Aug-15 7:52am
View
have you confirmed the name is correct?
barneyman
9-Aug-15 6:42am
View
it's not mandatory to register progid's, only clsid's - i don't know if vbs can instantiate using clsids, maybe look at the clsid moniker "clsid:xxxxxxxxx" or register your own progid -> clsid mapping
barneyman
9-Aug-15 6:36am
View
so, have you done what it suggested?
barneyman
6-Aug-15 18:31pm
View
intellisense will whinge until the idl is first compiled, because none of the headers have been created by midl
what *build* errors did you get?
i generally ignore intellisense errors
barneyman
5-Aug-15 7:18am
View
create an atl dll project, then add an atl simple object - add your method to the idl, and impl to the cpp/h - done
barneyman
4-Aug-15 1:46am
View
i'm not sure i understand ... if you want to know what that code's doing, single step it and find out (it looks to be building 2 digit sets from all the permutations of the array 0..9)
if you want to know how a std::set works, look at the header, though knowing the specifics wouldn't be too useful IMHO
barneyman
4-Aug-15 0:53am
View
it's an insert OF a vector into a set, not ON a vector
barneyman
3-Aug-15 22:27pm
View
sql server profiler
barneyman
2-Aug-15 20:29pm
View
does pActiveDialog get changed by another thread, or message handler?
i'd put a mutex round it if that's the case
barneyman
2-Aug-15 18:06pm
View
it'll have to be a deferred action, to run during the install - MSI's run 'twice', once to generate the scripts, then the execute the scripts - it's very difficult to get user data to a deferred action that's not been worked out in the scripts (the latter includes file#, and properties, including directories)
barneyman
26-Jul-15 9:59am
View
not really helpful, i've had the same issues :) SetRate never worked for me either - you might have to look at using pull via IAsyncReader
barneyman
25-Jul-15 8:09am
View
just guessing, but if you can't google for 'javascript xml', maybe coding isn't for you?
barneyman
23-Jul-15 7:05am
View
have a look at xpath queries
barneyman
19-Jul-15 23:14pm
View
can't you just use multiple FTDI usb boards?
barneyman
9-Jul-15 5:46am
View
it's challenging because your explanation is not entirely clear
why not import to Excel directly from SQL, or export from SQL directly to Excel - both are easy google searches
barneyman
8-Jul-15 6:32am
View
dont forget to handle paste, and selection edits
barneyman
5-Jul-15 23:25pm
View
sounds like you need to add a 'balance' column to the sql query you're populating the gridview with
barneyman
2-Jul-15 20:15pm
View
those two implementations fundamentally do the same thing, you'd need to detach the t object for it to run in parallel
as regards the 'appears to hang' - feel free to break into it with the debugger and find out what it's doing
barneyman
29-Jun-15 20:12pm
View
there's an installer creation tool, called WiX, it's pretty powerful, and can run scripts for you ( https://gist.github.com/rrreese/4104368 )
caveat: i don't use WiX, i use something i wrote, which is almost identical ... simultaneous invention :)
barneyman
28-Jun-15 21:30pm
View
as scripts that create the db, tables, sps, and logins etc
barneyman
25-Jun-15 1:33am
View
right - so does that file exist on the E drive, and does the user you're running the script as have access to that path?
barneyman
25-Jun-15 0:57am
View
<sigh> what error do you get?
barneyman
23-Jun-15 19:35pm
View
because it does!
google for 'circular dependency' and you'll find some solutions
barneyman
23-Jun-15 19:12pm
View
well spotted!
the OP's putc will be failing (because ftest is opened for R)
another win for logging, error-checking and debugging
barneyman
23-Jun-15 3:13am
View
what model are you initialing COM with in your console app?
barneyman
22-Jun-15 20:14pm
View
randomly :) be aware that the IStream created by the shell and create...hglobal cannot be QI'd for ISequentialStream, which may or may not be a problem for you
barneyman
22-Jun-15 2:12am
View
all the clues are there
barneyman
9-Jun-15 1:10am
View
the hanoi tower problem is the standard example for recursive algorithms - either single-step it thru the debugger, or walk it manually, noting diskSize, source, dest, and spare on every recursion - shouldn't take long
barneyman
4-Jun-15 8:02am
View
lol - that wasn't your original question - i answered your first question (setting background colour)
we don't do your work for you - we help you to help yourself
what have you tried, where are you stuck?
barneyman
4-Jun-15 7:06am
View
?
barneyman
2-Jun-15 23:17pm
View
https://www.google.co.nz/search?q=Chrome_OmniboxView&rlz=1C1CHLW_enAU503AU503&oq=Chrome_OmniboxView&aqs=chrome..69i57j69i61&sourceid=chrome&es_sm=122&ie=UTF-8
it's a known issue, with known solutions
barneyman
2-Jun-15 2:38am
View
there's nothing special about the code S[x[0]] - it's original value is 0xCCCCCCCC (which is stack 'undefined' value in debug) - i don't know where you're getting 0x32FBC0 from
S is initialised to -1 in preSo, and then there's some XORing going on ...
Debug it ...
barneyman
2-Jun-15 2:03am
View
you're correct - it means the S[97] (where 97 is gleaned from x[0])
barneyman
1-Jun-15 19:50pm
View
the registration of the COM element would be the first thing to investigate ... regsvr32 should be done as a post build step
barneyman
27-May-15 22:33pm
View
there is no representation for the ascii null character, so even if you could get the MsgBox or SetWinText to take a pascal string it wouldn't know how to display it
i'd advise having some function that takes the array, and the size, and returns a string with the null converted to some other character
barneyman
26-May-15 7:08am
View
it doesn't have a format - it's just time ... what makes it UTC is that it has no timezone (technically, it has TZ0), or DST applied .. it can be expressed (according to ISO8601) as a time string with Z at the end
barneyman
26-May-15 7:01am
View
i'd guess so - the docs would suggest the 3rd overload would do exactly what you want
https://msdn.microsoft.com/en-us/library/windows/desktop/dd371803(v=vs.85).aspx
i've never used d2d, my experience is with d3d, however, a bitmap is a bitmap is a bitmap :)
barneyman
26-May-15 1:21am
View
so your scanline (Width) is 256 with 3bytes per pixel - 3 * 256
there MAY be padding in there too - divide the filesize by 256, don't be surprised if it's not 768
i assume that ctor for CD2DBitmap creates a bitmap that's the same size/format as the render target? if that's 256*256*24 it should be fine, otherwise you're going to have to create an HBITMAP from the raw data and use the CRenderTarget ctor that uses HBITMAP - MFC's CBitmap is ok for that
barneyman
26-May-15 1:01am
View
the stride will be determined by the format of your RGB - if its RGB8 it'll be 3x your scanline, if it's RGBA8 it'll be 4x etc
barneyman
25-May-15 22:25pm
View
lol - i can - you couldn't afford my hourly rate
barneyman
25-May-15 22:24pm
View
i get that ... we all were once, but me fixing it *for* you doesn't make you any more senior :)
InsertBST is broken ... the contents of your first if(T==NULL) clause is the root cause of your problem (i'm guessing, you've not actually expressed what the problem is) - format it so it's legible, and read it ... it's 10 lines when formatted correctly - the problem should jump out at you
when you've fixed that, have a look at #2 i made
barneyman
25-May-15 22:04pm
View
i thought i just did?
barneyman
22-May-15 1:02am
View
it's better than my Vietnamese ;)
The link you point to is *specifically* about using the SQL profiler, which is a performance and monitoring tool for SQL, that API provides no ability to access SQL data securely - i'm unsure what you're trying to achieve ..
barneyman
22-May-15 0:29am
View
that looks quite easy - you have a couple of inner joins on a criteria select
where are you stuck?
barneyman
21-May-15 23:46pm
View
you're assuming you get the entire frame in your UDP receive .. you make no attempts to validate the size of the buffer you got, and if it's of the expected size - then you hand that buffer off to Decode... which also assumes it's the correct size ... and blindly starts peeking away at it
some error checking and some tracing would go a long way
barneyman
21-May-15 5:20am
View
oh - you just want to talk to a SQL database from C#?
that's EASY ...
barneyman
20-May-15 22:03pm
View
what are you trying to achieve? there's plenty of example code in there to create, replay and examine traces ..
barneyman
17-May-15 5:40am
View
for the love of cheese, please no-one visit that link - this *post* is itself a phish
barneyman
13-May-15 19:32pm
View
by following the code comments, and sms'ing it?
barneyman
12-May-15 21:17pm
View
you'll probably find that having tn > ~Number of (virtual) chips won't yield any performance increase - additionally, if they're all hitting the disk, you may get concurrency issues in the OS and DiskElevator - multithreading performance improvement is not simply a case of throwing threads at it, you may need to rethink your IO strategy
barneyman
11-May-15 23:33pm
View
no problem - i only suggested it because i have some code i wrote with some extremely angry comments about just this sort of behaviour because of DC corruption
barneyman
11-May-15 0:08am
View
sounds like a GDI leak :)
you ARE re-selecting the old font back into the DC before you destroy it?
barneyman
2-May-15 9:13am
View
yes - pki/x509 are about key exchange for streaming (normally) encryption .. it could be used for anything
barneyman
30-Apr-15 20:45pm
View
i don't think the arduino family has either the stones or memory to handle PKI/SSL - the rpi has OS suppport for it
barneyman
29-Apr-15 23:17pm
View
one example of pseudo-encryption, that MAY be useful, but is by no means truly secure is something like ...
Implement the mersenne twister (or similar RNG algo) on the arduino - during commissioning for a particular 'site' all devices store the same random number in the nvram - this number represents the seed number for the RNG algo - when any device on the same 'site' wants to send, the first 2 bytes are a random number, this represents the offset into the RNG sequence that both the sender and receiver need to align to - then you simply continue along the RNG sequence XOR'ing with your data as a one-time-pad analog
you get inferred authentication (because the nvram number has to match within the same site) and encryption
*not foolproof by ANY means, and can be compromised by getting the site number, but may be enough for your needs*
barneyman
29-Apr-15 22:58pm
View
- SSL is just the negotiation of a 'secure tunnel' through which any protocol can travel
- x509 is not peculiar to SSL, that's where it's most widely used, x509 is also used in code-signing for instance
- the key TYPE is defined in the x509 - it's intended use, and algorithm it's good for ##
- you misunderstand - each sender encrypts with the OTHER'S public key, the server is encrypting using the temp public key you generated, you are encrypting with the servers public, a MitM attack requires knowledge of one/both PRIVATE keys
- you need to understand the above point and the implications - the private key never leaves the owner
PKI/SSL is a very big hammer to be wielding in a arduino environment - i'd suggest you look for alternative approaches - your primary problem is key exchange (for symmetric encryption)
## asymetric (PKI) encryption is VERY slow, so typically what happens in the credential/key-exchange/message-exchange phase is a random symmetric key is generated, THAT latter key is used to encrypt the data (because symmetric encryption is very fast), the symmetric key is encrypted using the asymmetric encryptor and handed over
barneyman
26-Apr-15 4:51am
View
the HKEY being accessed is gleaned from the IGroupPolicyObject, it's not a normal registry key
barneyman
22-Apr-15 2:21am
View
not technically accurate ... :)
32bit code will quite happily run on 64bit machines, what you can't do (as per the OP's problem) is run 32bit DLLs from a 64bit process
barneyman
22-Apr-15 2:06am
View
they're not registry based -- read the link again ...
barneyman
21-Apr-15 19:36pm
View
i understand what you're trying to achieve, and while i can't help you, i would make the following observation - what you're trying to do is not a familiar (windows) UI mechanic, scrolling while dragging is traditionally done by hovering over the head/tail of the listview
you risk spending an age implementing something no-one's going to use - remember, shipping beats functionality, every time
barneyman
20-Apr-15 21:06pm
View
run it under a debugger, its only ~30 lines of code, and it's not complex - it should be easy to work out where it's going wrong
barneyman
20-Apr-15 8:12am
View
change the fwrite to only write what you've read ... review the documentation on read and fwrite, fix the code, then run it under a debugger
barneyman
16-Apr-15 21:18pm
View
your cluster_mutex is killing any parallelism
those thread functions are members of the class, they have explicit access to the vector/int already - you're already calling the mutex
i'm not sure i understand your problem/required solution
barneyman
16-Apr-15 7:52am
View
i'd GUESS you're trying to access a member 32 bytes into the vtable/offset of a class, when the instance is NULL; look at the stack trace, and work back to your codebase - should stick out like a zit
barneyman
13-Apr-15 2:22am
View
http://en.wikipedia.org/wiki/Recursion_termination
barneyman
13-Apr-15 2:10am
View
what you've implemented is a basic recursive mistake - you CAN call a contructor from itself, in the same way you CAN call a function from itself - but if you do that you need to method of 'short-circuiting' out, or you'll run out of stack
barneyman
13-Apr-15 1:58am
View
no - you can't de-allocate this memory because you've created a recursive, infinite loop - it needs re-engineering ... quite WHY you're instancing a new Employee inside the constructor baffles me
barneyman
9-Apr-15 21:16pm
View
as Tomas says, no - you could do what you want in a trigger
barneyman
9-Apr-15 19:28pm
View
600mb is a HUGE binary to hold in SQL as a single blob - either cut it up into sections in the DB (and join it back up at the client) or look at FILESTREAM
barneyman
8-Apr-15 22:35pm
View
the [double(*f)(double)] is mandating a function signature that takes a double and returns a double i.e. double sin(double rad), &sin would qualify
barneyman
8-Apr-15 18:21pm
View
have a look at the ESP8266 - you can give your arduino wifi for $5
barneyman
31-Mar-15 0:07am
View
it's subjective, but that 'for' notation would fail a code-review here - i insist that empty clauses are bound with braces and commented as being empty
barneyman
30-Mar-15 1:42am
View
it's just a bubble sort really - with the binarySearch optimising discovery of the 'bubbleto' point in the array
run it in a debugger if you can't mentally visualise what it's doing ...
barneyman
26-Mar-15 1:46am
View
with reference to your comment about mem-mapping ...
DLLs share the process memory *of the process they're loaded into* ... they do not have their own - so you can't share memory between processes and (similarly) you can't share memory between DLL's loaded in the different processes
barneyman
25-Mar-15 17:20pm
View
sorry - no idea - a quick google, and you're not the first to find that problem with GDI+
barneyman
25-Mar-15 8:22am
View
interview question?
barneyman
25-Mar-15 7:06am
View
knowing nothing about your tables, i'd suggest you have some serious index/locking/contention issues - 50x concurrent use is easily within the capabilities of SQL - you ARE doing this with SPs?
Run a trace (while scaling access) and find out what's taking so long
barneyman
25-Mar-15 6:58am
View
did you look at that link? it explains that all DCs you get are normally for the primary monitor - it suggests using EnumDisplayMonitors/GetMonitorInfo/CreateDC
barneyman
23-Mar-15 20:01pm
View
store them sorted, binary search them to find your lowest, continue ascending until you exceed your highest - your worst case search is O(log n)
barneyman
23-Mar-15 9:23am
View
generally in 3D gfx programming, you have one set of object world models, and you position/repeat them with world & view transforms
barneyman
23-Mar-15 2:30am
View
without the PDBs and source, there's not much you can do to either find the problem (unless your x86 assembly knowledge is tremendous) and NOTHING you can do to resolve it
That said, the fault is because the code used LeaveCriticalSection using a critsec object it didn't own - the reason for that can be legion, crap code, memory corruption to name the two most likely
barneyman
18-Mar-15 22:19pm
View
as SA notes, 'time' in a multithreaded/multicore OS is a thorny issue - your program could appear to run for 5 seconds, but did it use the CPU for all that time (probably not), if it used 10CPUs for 20% of that time, did it run for 10 seconds? How much of *your* runtime was you, and not the Exec running/sleeping/spinning
Similarly with memory - do you want to know how much your code 'used', or how much was allocated to you by the OS, do you mean real memory, or virtual memory - do you wish to include your static/code/stack in that
Simply calling HeapSize and QueryPerformanceCounter (in windows) will give you results that are simultaneously right, and wrong :)
barneyman
18-Mar-15 19:45pm
View
i either don't understand the comment about txtBdate or i've completely misunderstood your initial problem :)
barneyman
18-Mar-15 18:04pm
View
it's a COM itf, so can't you just AddRef to the interface from your hook proc, #importing the TLB?
barneyman
18-Mar-15 1:46am
View
you want to change *existing* ids - say the ID now for an employee is 'id001' you want to make that 'newidAAA1' ?
barneyman
15-Mar-15 22:11pm
View
elevation?
barneyman
15-Mar-15 20:32pm
View
i use the same form of query to achieve the same sort of thing (build nodes for a build system)
the only difference is i use an UPDLOCK in the update - http://www.sqlnotes.info/2012/10/10/update-with-updlock/
barneyman
12-Mar-15 1:44am
View
guid is the correct solution if you want it globally unique - why does the fact it's a complicated string (it's not a string, that's just how the UI renders it) matter?
barneyman
10-Mar-15 23:57pm
View
where are you stuck, how far have you got?
barneyman
9-Mar-15 20:01pm
View
are you saying you want to *duplicate* tblEmployeeInformation into tblEmployeeLoginDetails? that's fundamentally the wrong way to do it
your tblEmployeeInformation should have a primary, unique key that is then used by tblEmployeeLoginDetails to refer to them, so in your example above (assuming txtIDNumber is their unique employee number), tblEmployeeLoginDetails should have column txtIDNumber which your second INSERT adds, then you can use INNER JOINS to consolidate the two tables
barneyman
9-Mar-15 18:52pm
View
done something similar using xslt to transform into a 'common superset' which then gets parsed/queried - actually, cheated slightly, had an xlst v1->v2, xlst v2->v3, etc etc
Meant that any change velocity only affected the parser (for the 'latest' schema), and an additional xlst to go vlast->vnow
barneyman
9-Mar-15 18:09pm
View
are you trying to use an exe running in SYSTEM context to log the current (interactive) user off?
look at ImpersonateLoggedOnUser
barneyman
4-Mar-15 23:19pm
View
so have your insert accepts NULLs and do it 4 times
value,null,null,null
null,value,null,null
null,null,value,null
null,null,null,value
barneyman
2-Mar-15 23:06pm
View
i don't know the specific solution to your problem, but i do know that blob handling in the SQL client is normally limited to one per returned rowset (NOT one per row), so you'd have to do 4 discrete inserts and 4 selects
i'd also check your columns do have 4 different pics in them - use DATALENGTH to find out how long they are, and put 4 different sized pictures in
(source http://www.codeproject.com/Articles/7590/Managing-Blobs-Using-the-ATL-OLE-DB-Consumer-Templ )
barneyman
2-Mar-15 20:41pm
View
no, an HRESULT of 1 is S_FALSE, 0 is S_OK
a -ve hresult is failure
barneyman
2-Mar-15 18:57pm
View
you're mixing two interface mechanics there - IDL refers to the use of COM, where you'd instantiate a COM object via CoCreateInstance
LoadLibrary is used for getting to exported (via .DEF files) classes/functions
the latter is quick and dirty and suitable for most 'old school' forms of DLL use (C/C++ consumption), the former is much more flexible (C, scripting, etc consumption), but 'troublesome' to understand properly
which do you want?
barneyman
2-Mar-15 18:44pm
View
45 seconds sounds like it timed out ... Piebald's connection string is good for SQL, tho' hyou'll have to change the server name
IME ODBC is as fast as OLEDB, even out to Azure, so you shouldn't be experiencing slowness unless your LAN and/or DNS is flakey
barneyman
26-Feb-15 18:29pm
View
you've created a solution rather than answer RyanDev - if you can, delete this solution, and answer on that thread
barneyman
26-Feb-15 18:29pm
View
Deleted
paging RyanDev
barneyman
24-Feb-15 19:59pm
View
nothing obvious - tho' you're using the REF device - it'll work, but it's VERY slow :)
try turning directx debugging on (directx control panel, direct3d9 tab) - that positively vomits useful information
barneyman
24-Feb-15 19:17pm
View
you'll have to be more explicit - by 'failed' do you mean your DX initialisation is failing, or you're still getting an exception?
barneyman
23-Feb-15 18:49pm
View
you're reading and writing into the same file, you're overwriting data you haven't read yet
it would be much more efficient to create an in-memory array/buffer, read a row from file, write a column to memory, then when done, dump the array to file
barneyman
18-Feb-15 17:44pm
View
should you not 'break' from the inner loop if you find a match?
barneyman
15-Feb-15 18:01pm
View
this is a common misconception when handling dates in SQL - SQL itself does not NEED to understand the locale for a date - it just stores a generic dateval given to it by the client, either directly (shudder) or via sp's - conversely, it's up the client to present the data the way the client expects - remember 5% of the planet show the date backwards :)
So, your client piece should do the heavy lifting of ensuring the right format is interpreted before going in
also, good practice to stores datetimes as utc
barneyman
2-Feb-15 19:39pm
View
it only goes to the top window, you'll have to have an internal mechanism to broadcast it to your child windows - just enum your child windows and repeat the message if you don't want to have children register for it
barneyman
1-Feb-15 17:54pm
View
View / Error List
or
View / Output
?
barneyman
20-Jan-15 20:23pm
View
you don't need to go as low as winsock if you're talking to a web server - have a look at WinInet ( https://msdn.microsoft.com/en-us/library/windows/desktop/aa385473(v=vs.85).aspx )
barneyman
15-Jan-15 20:32pm
View
http://www.codeproject.com/Articles/43629/Top-steps-to-optimize-data-access-in-SQL-Serv
barneyman
12-Jan-15 18:47pm
View
if your splash is not *owned* by your main hwnd, it's a bunfight as to who gets zorder when the splash screen closes - have a look at ::BringWindowToTop(...)
barneyman
5-Jan-15 17:12pm
View
horses for courses - we have a 64bit only product, i develop/build/test it in 32bit *specifically* for E&C
barneyman
19-Dec-14 19:48pm
View
sorry i didn't help
https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=visual%20studio%20hangs%20on%20breakpoint
barneyman
19-Dec-14 5:49am
View
yes
barneyman
19-Dec-14 1:48am
View
it's probably going to take you significantly less time to understand c#, than it is to port, and debug to VB.net
barneyman
18-Dec-14 17:42pm
View
if(fgets(c,1000,input)){ int a,b,c; sscanf("%d:%d:%d",&a,&b,&c); } would be simpler, but using strok would be safer
barneyman
17-Dec-14 6:12am
View
repeat of ...
http://www.codeproject.com/Questions/854309/is-it-possible-to-convert-jpeg-to-bytes-or-some-ot?arn=9
why?
Show More