16,004,564 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 .NET 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 chaau (Top 144 by date)
chaau
11-Jan-18 18:46pm
View
Why don't you use the PeakBandwidth parameter for this? From MSDN: PeakBandwidth - The upper limit on time-based transmission permission for a given flow, in bytes per second. https://msdn.microsoft.com/en-us/library/windows/desktop/aa373702(v=vs.85).aspx
chaau
11-Oct-17 21:24pm
View
yes, you can. You can use a window function for this. See my improved solution
chaau
26-Sep-17 2:27am
View
"he paid commission of 2.5% which is 0.25"
2.5% is 0.025
chaau
9-May-16 2:37am
View
Please provide sample data and an expected result.
chaau
25-Aug-14 21:03pm
View
This simple function sndPlaySound http://msdn.microsoft.com/en-us/library/aa909803.aspx will play your test.wav file
chaau
7-Aug-14 19:10pm
View
have a look at this question: http://www.codeproject.com/Questions/261535/vcplusplus-web-browser-control-catching-javascript It has some helpful answers
chaau
7-Aug-14 19:04pm
View
So, what's your question? It is not a xls file format. It is a csv. You will be better off if you spool it as a csv file and open with Excel. Wy do you need an extra comma at the end of the lines?
chaau
7-May-14 18:50pm
View
It would be great if you show us your existing query
chaau
22-Apr-14 20:11pm
View
You just need to add that for C# there is only one compiler: Microsoft. But for C/C++ - dozens
chaau
6-Apr-14 20:02pm
View
Just a small hint: to "add" values you need to use a "+" operator. Applies to every programming language. Do you want to ask a question about how to take away a value?
chaau
2-Apr-14 18:27pm
View
Does your MobileList.accdb contain a table called Mobile?
chaau
25-Mar-14 17:53pm
View
Can't see a cursor in your code. Can you show us? Perhaps your manager has asked you to use cursors in place of loops?
chaau
20-Mar-14 20:40pm
View
Please note that both of these methods are just reinventing the wheel. Much simpler and better option is one that is described in the comment here: http://www.codeproject.com/Messages/4771552/My-vote-of-Useless-hack-to-solve-a-problem-that-al.aspx. Please research WM_NCHITTEST message, it is very easy to implement.
chaau
12-Mar-14 1:17am
View
I think these type of validations need to be done in ON_EN_CHANGE handler. This will cover both the direct user input and Paste from clipboard
chaau
12-Mar-14 1:10am
View
try to change it via Command Prompt:
SET AllUsersProfile = C:\NewLocation
chaau
12-Feb-14 0:20am
View
Is this col4 required to be selected as a fourth column in your query, or in place of one of already selected columns (i.e. col2)?
chaau
6-Feb-14 1:41am
View
Yes, you are right. Use COALESCE function, as Tomas suggested to replace the Null values with the '00:00'
chaau
5-Feb-14 23:14pm
View
Is it pure C++, or you can use MFC?
chaau
4-Feb-14 13:16pm
View
And I am replying: fix the bug first, and then see. May be the problem will go away
chaau
3-Feb-14 1:47am
View
what version of SQL Server it is? In SQL Server 2008 you do it like this: CAST(todaysDate AS DATE)
chaau
3-Feb-14 1:04am
View
Please read about PIVOT: http://technet.microsoft.com/en-us/library/ms177410%28v=sql.105%29.aspx
chaau
2-Feb-14 20:21pm
View
I think you are performing unrealistic test scenarios. Who is going to change the settings back in forth in real life? Perhaps Windows is trying to protect your and others applications against unnecessary changes
chaau
2-Feb-14 20:00pm
View
I think after setting to current locale in the "case WM_SETTINGCHANGE:" code you will need to re-initialise all the edit boxes with double values by re-reading from database
chaau
2-Feb-14 19:56pm
View
Just wondering how you turn ODBC on and off? I have not seen such an option before
chaau
27-Jan-14 23:09pm
View
I think PIVOT will not do what the OP asks. Do you want to review your answer?
chaau
27-Jan-14 23:06pm
View
What have you tried? I recommend you google "SQL Server dynamic PIVOT query"
chaau
27-Jan-14 22:50pm
View
MSDN http://msdn.microsoft.com/en-us/library/3szh5e2z.aspx has it closer to the bottom: Required header: <locale.h>
chaau
27-Jan-14 22:40pm
View
MSDN http://msdn.microsoft.com/en-us/library/3szh5e2z.aspx has it closer to the bottom: Required header: "locale.h" (can't insert here less and more symbols)
chaau
2-Jan-14 15:56pm
View
I guess you have rows in t2 with duplicate sel_col
chaau
4-Dec-13 1:15am
View
What is the the base class of your m_page1 and m_page2. I think the second parameter of the Create function (GetDlgItem(IDC_TAB1)) is incorrect
chaau
2-Dec-13 19:01pm
View
Just wondering if you already played with Internet Options of your Internet Explorer. One setting is particular: "allow scripting of microsoft webbrowser control" under Security->Custom level->Settings. You need to figure out though what zone your DHTml content falls into
chaau
2-Dec-13 18:39pm
View
What about fireEvent()? http://msdn.microsoft.com/en-us/library/ie/ms536423%28v=vs.85%29.aspx
chaau
18-Nov-13 20:23pm
View
Please learn about sql injections and how to protect against them. Your code is prone to them. As for your error, it is most likely caused by Scottish surname (like O'Connor, etc) or other strings with single quote (') in them. To fix it you need to add string txt = jLastnameTxt.getText(); txt = replace("'", "''");
chaau
14-Nov-13 0:59am
View
I do not have MySQL admin console on this PC, but if I had the first thing I tried was to try to connect to "109.130.15.111" using "pesystem","tstcpe" credentials. Are you sure you want to post this information on the Internet?
chaau
12-Nov-13 18:30pm
View
Just let me know if @@ERROR worked and I will update the solution
chaau
12-Nov-13 13:41pm
View
I think in this case the try catch block will not be executed, as the severity of the error is too low. Try to use @@ERROR http://technet.microsoft.com/en-us/library/ms188790.aspx
chaau
12-Nov-13 9:59am
View
If not the custom error, what error are you receiving?
chaau
12-Nov-13 9:54am
View
What are you doing to generate the erroneous situation? Obviously it is not an integrity violation. Are you generating a deadlock situation?
chaau
6-Nov-13 23:32pm
View
And how does it work on your PC? Via Outlook?
chaau
31-Oct-13 0:43am
View
There is a way, using TOP. Is this your homework? If yes, please research. Hint: goggle "SQL pagination using TOP"
chaau
30-Oct-13 22:56pm
View
Just wanted to add: if you want it in > sign pattern (like in your question) then use
print '1 '+replicate('0 1', @y)
(Basically, you do not need @x)
chaau
30-Oct-13 22:54pm
View
BTW, your print space(@x)+replicate('1',@y)+replicate('1',@y+1) will produce the pattern like < sign (e.g. left-padded with spaces). Is this what you want? If yes, then modify the statement to this:
print space(@x)+'1 '+replicate('0 1', @y)
chaau
30-Oct-13 15:00pm
View
Try to use CListCtrl. See if it is better.
chaau
28-Oct-13 23:18pm
View
Why do you declare Point ordinates[v] inside for(). I think you need to declare Point ordinates[4], then run for() loop to ask for four coordinates and then construct your shapes outside the for() loop
chaau
28-Oct-13 1:46am
View
Have you also tried to ask on stackoverflow? Expert-Exchange has your question.
chaau
23-Oct-13 19:59pm
View
most likely the relationship between one of the table pairs is not one-to-one. It would be great if you show us some sample data and the output from the "store predure"
chaau
16-Oct-13 19:02pm
View
BTW, have a look at TrackPopupMenuEx http://msdn.microsoft.com/en-us/library/7d3s8f57%28v=vs.90%29.aspx.
The last parameter specifies an area of the screen the menu should not overlap. This parameter can be NULL. I guess if you specify the area outside your window menu is supposed to be displayed inside it
chaau
16-Oct-13 18:56pm
View
What is pContextMenu? Is it CMenu? If not, why don't you do it manually using CMenu:
// the patient popup is stored in a resource
CMenu menu;
menu.LoadMenu(IDR_MENU); // load from the registry
CMenu* pPopup;
pPopup = menu.GetSubMenu(0);
ClientToScreen(&ptMousePos);
pPopup->TrackPopupMenu(TPM_LEFTALIGN, ptMousePos.x, ptMousePos.y, this );
chaau
25-Sep-13 20:28pm
View
Please try to escalate the question to a simpler one. Your post is way too long. TL;DR, sorry
chaau
18-Sep-13 2:31am
View
Please read about and google for examples for the http://msdn.microsoft.com/en-us/library/windows/desktop/ms741540%28v=vs.85%29.aspx WSAAsyncSelect function. It works by the way of callbacks. I believe this is what you are after
chaau
18-Sep-13 2:20am
View
and then copy it to vector(vector(vector))...
chaau
18-Sep-13 2:17am
View
Sockets aside, Are you sure that these lines are ok:
Port=port;
szServerName = servername;
Didn't you want to initialise Port and szServerName as char[some number] use strcpy instead?
chaau
12-Sep-13 17:58pm
View
Mike is right. Remove "set identity_insert #temp_tutor_details on" lines
Also, @to should be initialised like this: "set @to = @page * @pagesize"
chaau
12-Sep-13 0:38am
View
distinct will produce the same result. Have a look at date_request
chaau
11-Sep-13 1:34am
View
You need to group by UserId only. But you need to decide which values you want for other columns, like MAX(), MIN(), AVG(). You may also want the record with the last AchievedDate. In this case the approach will be slightly different
chaau
10-Sep-13 20:11pm
View
Please check the compiler settings for your dll and the main program. Open project properties, navigate to C/C++->Code Generation. Check what Runtime Library is selected. Should be a Multi-Threaded one
chaau
10-Sep-13 20:00pm
View
I believe it only happens in Debug builds. In release mode no messages will be displayed
chaau
21-Aug-13 20:46pm
View
I think you need to use SetKeyboardState http://msdn.microsoft.com/en-us/library/windows/desktop/ms646314(v=vs.85).aspx
chaau
25-Jun-13 20:01pm
View
I have a chunk of code that I use in my application to change the permission of a registry key. It is Win32 C. If interested I can post it here
chaau
25-Jun-13 19:59pm
View
What happens if you use just Today.ToString?
chaau
25-Jun-13 1:49am
View
What happens if you right click on your application and select "Run As Administrator"?
chaau
25-Jun-13 1:20am
View
If you just need the number of rows use this:
Set @countValue = (SELECT COUNT(*) FROM Invoice)
If you really need to do this via the cursor use this:
Declare @countValue INT
Declare CUR_Invoice CURSOR FOR Select * From Invoice
OPEN CUR_Invoice
Set @countValue = 0;
FETCH NEXT FROM CUR_Invoice INTO @......
While(@@FETCH STATUS = 0)
BEGIN
Set @countValue = @countValue + 1;
FETCH NEXT FROM CUR_Invoice INTO @......
END
CLOSE ...
DEALLOCATE...
chaau
25-Jun-13 1:06am
View
I do not understand what is the purpose of these two lines:
Set @countValue = @@ROWCOUNT;
BREAK;
What are you trying to count?
chaau
17-Jun-13 22:03pm
View
It is not really clear what you have asked
chaau
17-Jun-13 0:46am
View
How many rows do you have? Hundreds, Thousands, or Millions? For the first two cases you will not find any difference, and honestly you can use either of them. When you have millions of records, SELECT count(*) approach will not be very fast.
BTW, do not forget to clear SQL Server cache (DBCC FREEPROCCACHE) when checking the performance
chaau
13-Jun-13 19:19pm
View
Just wondering what happens if you export the class as a fully qualified name together with the namespace. Also, it sounds a bit silly, but can you rename it to something not related to asm reserved names?
chaau
6-Jun-13 0:36am
View
The third parameter in the Add method is not a value. It is a size for the string values
chaau
5-Jun-13 22:41pm
View
That is fine. (whispering) The true solution would be to tell the OP about the square brackets
chaau
5-Jun-13 21:52pm
View
Are you sure this is what you want. It is a very bad design. You will be better off if you put all the dates in a column and have a value associated with the date put in another column. You can always run PIVOT queries against the table to achieve the result in the desired format
chaau
5-Jun-13 21:43pm
View
There is no overload with a string as a third parameter. Use:
.Add("@ApplicationDate", SqlDbType.DateTime)
chaau
5-Jun-13 2:38am
View
I believe this is one of the modern "Windows 8 App" development guidelines from Microsoft using Visual Studio 2012
chaau
5-Jun-13 2:17am
View
What have you tried? Hint: for fully matched you would use INNER JOIN, for unmatched you would use LEFT/RIGHT JOINs.
To compare using part of the strings you would use SUBSTRING.
Show us some code that you have written yourself, and we will help you
chaau
28-May-13 1:38am
View
Show your code for:
word& operator=(const word& _Right)
chaau
30-Apr-13 0:49am
View
have you searched this site? Search for a term "Mapi", I am pretty sure you will find a few articles
chaau
20-Mar-13 19:01pm
View
I have updated the solution for you
chaau
13-Mar-13 21:05pm
View
I suggest you monitor your program using a tool as easy accessible as task manager. In the task manager use View->Select Columns. There, select Thread Count, Handle Count, memory related columns, GDI Handles (I doubt they are involved). View the numbers when error happens. I bet one of them will be unusually high
chaau
9-Mar-13 6:57am
View
yes, there was a typo. Forgot the closing bracket. Please check again
chaau
3-Mar-13 19:06pm
View
The thing you want to achieve has nothing to do with sub-classing. All you need to do is to "hook" the WindowProc of the child view. To do so, in you mainframe, after you create the child views do the following:
WNDPROC wndproc = ViewProcInMainFrame;
_WndProc = (WNDPROC)SetWindowLongPtr(*pFrame, GWLP_WNDPROC, LONG_PTR(wndproc));
Where ViewProcInMainFrame is the function defined in the mainframe as follows:
LRESULT CALLBACK CMainFrame::ViewProcInMainFrame(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
But, I think, after you implement this solution, you will realise that it is too much hassle.
chaau
27-Feb-13 18:35pm
View
I think in this case you just need to create the control message handlers inside your views. Then, just use
CMainFrame* pMainFrame = reinterpret_cast<cmainframe*>(theApp.GetMainWnd());
pMainFrame->OnView1Button1Clicked();
Something like this.
chaau
25-Feb-13 19:04pm
View
usually this works fine. I used Access very often. It has some limitations. Have you tried to run this query in access Query Wizard (when you switch to SQL Design View)? Does it show any errors?
chaau
13-Feb-13 1:09am
View
Why didn't you split the data in your code? Would have been much easier
chaau
13-Feb-13 0:43am
View
this is how microsoft does the handling for WM_INITDIALOG. See, if you can apply it to your case
if (message == WM_INITDIALOG)
{
// special case for WM_INITDIALOG
CDialog* pDlg = DYNAMIC_DOWNCAST(CDialog, CWnd::FromHandlePermanent(hWnd));
if (pDlg != NULL)
return pDlg->OnInitDialog();
else
return 1;
}
return 0;
Anyway, why do you need to create your own DlgProc? I believe if you pass NULL values, the framework will take care of it
chaau
12-Feb-13 17:47pm
View
Can you show your CMainDialog::DialogProc function implementation
chaau
7-Feb-13 0:33am
View
I think CryptEncrypt depending on your BUFFERSIZE needs to be called in sequence until all chunks are encrypted
chaau
29-Jan-13 23:55pm
View
There is no DATE(WEEKDAY, DateValue ) in my answer. I used DATENAME.
chaau
29-Jan-13 4:53am
View
this is because you need to substitute the MyTable and the Users, as well as UserID in the query above with the real table names. I guess you have already designed and created a table that will hold the login information
chaau
28-Jan-13 19:17pm
View
How is ReadJunk initialised?
chaau
24-Jan-13 23:47pm
View
what kind of error do you see? Is it debug assertion error?
chaau
23-Jan-13 21:46pm
View
are you sure you have data with this datetime value? Can you post here some example from your student table?
chaau
22-Jan-13 20:24pm
View
looks like Google Translate could not handle such a complex question
chaau
22-Jan-13 19:17pm
View
very cool: +10 points for posting an answer, and -16 for a downvote.
chaau
21-Jan-13 22:42pm
View
the above solution will also match:
'SQL Server 2008 is the best'
'I hate SQL Server 2008'
chaau
6-Jan-13 19:34pm
View
Please run unit tests and compare the results with your code for all possible values. I am not sure if it works as expected for the border values (when m_iCurrentStrip = 8, 16, 32, etc). If it's wrong, you may need to use min(m_iCurrentStrip / 8, NUM_UNITS - 1).
Also, please note, that the code does not validate the values of NUM_UNITS > 5 (same as your code). You may wish to consider including this check.
chaau
20-Dec-12 20:23pm
View
BTW, it is a very good interview question. I recommend you learn more about this OVER PARTITION BY clause
chaau
20-Dec-12 20:22pm
View
It is possible now. With the help of OVER PARTITION BY clause.I had to learn it myself just recently for a project I was working on.
chaau
20-Dec-12 20:11pm
View
looks like I could finally post my solution. codeproject is slow today for some reason
chaau
20-Dec-12 20:05pm
View
for some stupid reason I can't submit the solution.
select *
from dataset
order by row_number() over (partition by type_id order by value), type_id
SQL Fiddle:
http://sqlfiddle.com/#!3/0004d/17
chaau
19-Dec-12 22:00pm
View
Please, please, please check the if statement again. Can you see extra brackets there? if(tmp()). This is not a test for a valid pointer, this is a call of the function "a", with the return value of which has been casted to int. If he needed to test that the pointer valid he would have to use if(tmp)
chaau
19-Dec-12 21:49pm
View
why do you think it resolves to 0. I do not remember seeing it anywhere in C or C++ documentation
chaau
19-Dec-12 21:40pm
View
Please do not post your questions as Solutions. Use "Have a Question or Comment" button instead
chaau
19-Dec-12 21:36pm
View
be careful here. Someone downvotes the proper answers
chaau
19-Dec-12 21:34pm
View
If you want to check the address of the function pointer, you need to change if(tmp()) to if(tmp). Otherwise, you are calling function "a" via the pointer tmp. Function a returns void. void gets converted to 0 in your compiler. BTW, who is that person who downvoted my answer? Please explain the reason for this.
chaau
19-Dec-12 21:29pm
View
can you tell me why you believe that "a returning 0". What made you assume this?
chaau
19-Dec-12 21:26pm
View
he is trying to cast void a() to int (*fun)(). So, different compilers treat void differently. MS thinks that void is true, GCC thinks that void is false.
Anyway, this is an unsafe casting, and needs to be fixed, as I suggested in my solution
chaau
13-Dec-12 16:16pm
View
I do not understand what you are asking, but I noticed that this line is incorrect C syntax:
if(o=='+'||'-'||'*'||'/')
chaau
13-Dec-12 13:57pm
View
have you replaced the "<=" with "<" I have suggested in #3? It is the core of your issues.
chaau
10-Dec-12 1:15am
View
I think the problem is that you use the passed-in HINSTANCE as a first argument to the CreateDialog function. I think, in your ::CreateDialog(hInstance,MAKEINTRESOURCE(IDD_MEMORYCORNER),parent,DlgProc) line you need to replace hInstance with ::GetModuleHandle(NULL), so that the instance of the dll is used for the resource template
chaau
4-Dec-12 20:28pm
View
what is stringvalue in your code?
chaau
29-Nov-12 19:42pm
View
As a small guide, JEFT JOIN and RIGHT JOIN should be your starting points
chaau
26-Nov-12 17:04pm
View
do you set pf2.cbSize = sizeof(PARAFORMAT2) somewhere in your code after ZeroMemory call? Have you tried using dySpaceBefore and dySpaceAfter instead?
chaau
14-Nov-12 23:25pm
View
I think if you have an index on Name, the query will work very fast
chaau
14-Nov-12 20:25pm
View
my five
chaau
12-Nov-12 16:47pm
View
1. Can you clarify what is relativest and relativend, and where they are defined.
2. I do not believe it is a good idea to call drawing functions inside Mouse events. I think yon need to call Invalidate() within these events and do all the drawing within OnPaint()
3. Can you show where you defined and initialised sel and selind variables
chaau
12-Nov-12 16:37pm
View
I do not believe count(*) where [FailureModels].[Id] = [PrimaryEvents].[FailureModels] is a valid SQL syntax. As the snorkie suggested, use COUNT([FailureModels].[Id]). Do not forget to add GROUP BY statement at the end of your query.
chaau
12-Nov-12 0:20am
View
This is a trick to allow grouping by month. See, how the result magically become 'YYYYMM'
chaau
8-Nov-12 5:30am
View
See this:
http://www.codeproject.com/Questions/488003/How-to-disable-few-right-click-options-in-window.aspx
chaau
3-Nov-12 18:20pm
View
you have specified many tags: C, C++, Visual Studio. What technology are you planning to use? strtok is C
chaau
3-Nov-12 17:21pm
View
What is return value?
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
chaau
3-Nov-12 6:17am
View
What is the return code of RegCreateKeyEx, and what error code returned by GelLastError(). Do you also have a space between CurrentVersion and \\Policies in your code?
chaau
3-Nov-12 6:04am
View
try this one:
RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion \\Policies\\Explorer\\DisallowRun", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey,0);
chaau
2-Nov-12 6:48am
View
Please note that the user will still be able to copy/paste using the command prompt. As suggested above, you need to hook the CopyFile, MoveFile, and DeleteFile API functions. E.g. check this great article:
http://www.codeproject.com/Articles/730/APIHijack-A-Library-for-easy-DLL-function-hooking
chaau
1-Nov-12 18:03pm
View
Can you post separately the returns of these two select statements:
SELECT B.dbname AS [db_name], B.tblname AS [tbl_name], B.object_id
FROM [linkedserver].[dbo].[tableTime] AS B
and
SELECT A.idx AS [remoteCol_idx], A.object_id, A.name AS [column_name], A.column_id
FROM [linkedserver].[dbo].[remoteColumns] AS A
chaau
1-Nov-12 17:10pm
View
What do you mean by wrap? Do you want to call exported functions from that dll?
chaau
1-Nov-12 17:08pm
View
What errors are you getting?
chaau
31-Oct-12 15:13pm
View
No, you need to create this key (if it does not exist):
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun
Then, for all programs that you need to disallow create string values, like this:
1=iexplorer.exe
2=notepad.exe
3=calc.exe
4=VlcPlayer.exe
Please note these two things:
* The numbers should be consecutive
* You need to type the exe name.
Try TweakUI program, and see how it does. Then replicate the same in your program
chaau
31-Oct-12 5:59am
View
Is spam filter working on this server?
chaau
29-Oct-12 7:39am
View
The link you have provided is great. I still can't get my head around this correlated subquery business.
chaau
24-Oct-12 21:19pm
View
Looks like trolling to me.
chaau
21-Oct-12 17:30pm
View
I have updated the solution above
chaau
19-Oct-12 8:14am
View
you're welcome. this function is from my program. I am using it for error reporting. You can use it in your program as well
chaau
18-Oct-12 18:52pm
View
Also, do not forget Alt-Space + X combination. It does some magic things
chaau
18-Oct-12 18:50pm
View
it could happen very easily. Sometimes when click on "Show Desktop" icon in Windows, all the windows get minimised, even those with the popups. If you start clicking on the minimised windows in the taskbar, and if you are fast enough in clicking, the windows re-open in some bizarre way (maximised, or full screen). That's probably what happened
chaau
16-Oct-12 15:16pm
View
I just showed you a trick you could use. You do not need to use it in every case, because it may affect the performance when SQL will try to optimise the query. In your case, I think you could just join the tables similar to this:
SELECT Table_3.GroupId, Table_1.Id, Table_1.Word, Table_1.Description
FROM Table_3, Table_1
WHERE
Table_3.GroupID = @GroupID
AND Table_1.GroupID = Table_3.GroupID
AND Table_1.Id <> @ExcludedItem
AND Table_1.Id NOT IN (SELECT SimilarWordID FROM Table_2 WHERE WordId = @ExcludedItem)
AND Table_1.Id NOT IN (SELECT WordId FROM Table_2 WHERE SimilarWordID = @ExcludedItem)
Order BY Table_3.GroupID
chaau
16-Oct-12 6:59am
View
Just remember that SQL allows for a little trick. If you grab a working select statement (no matter how complicated it is) and enclose the whole statement in the brackets it will automatically become a view (or a temp table if you are more confident with them) that can be manipulated further (like joined to other tables, or grouped). You can also assign an alias for this view.
For the example above you can do this:
SELECT * FROM
(SELECT Id, Word, Description
FROM Table_1
WHERE Id <> @ExcludedItem
AND Id NOT IN (SELECT SimilarWordID FROM Table_2 WHERE WordId = @ExcludedItem)
AND Id NOT IN (SELECT WordId FROM Table_2 WHERE SimilarWordID = @ExcludedItem)
) AS A
GROUP BY A.Word
ORDER BY 2
OR you can use the view for joins with other tables:
SELECT * FROM
Table_3,
(
SELECT Id, Word, Description
FROM Table_1
WHERE Id <> @ExcludedItem
AND Id NOT IN (SELECT SimilarWordID FROM Table_2 WHERE WordId = @ExcludedItem)
AND Id NOT IN (SELECT WordId FROM Table_2 WHERE SimilarWordID = @ExcludedItem)
) AS A
WHERE Table_3.Id = A.Id
AND Table_3.GroupId = @GroupId
Order BY Table_3.GroupID
etc. If you need more help with that, just give us more details about your GroupID and we can build a statement for you
chaau
15-Oct-12 20:17pm
View
Ok, you asked a question, and you posted the solution to yourself.
You asked a question how to retrieve excluded records, and posting the solution how to retrieve included items.
What exactly did you want?
chaau
14-Oct-12 18:40pm
View
Try replacing the line:
if(hWndMain) ::SendMessage(hWndMain, WM_SHOWWINDOW, SW_HIDE, 0);
with:
::ShowWindow(hWndMain, SW_HIDE);
See my updated solution
chaau
11-Oct-12 1:00am
View
are you sure that you have the right file? my afxwin.h does not contain a symbol called exception.
chaau
10-Oct-12 14:51pm
View
yes, but in this case you will be able to SetWindowPos(hAtl, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE).
Also, when creating the hAtl, try to replace WS_CHILD to WS_POPUP
chaau
9-Oct-12 20:37pm
View
Yes, but is he calling reza() function before price() within the same process? He might expect that calling the function within the exe will bring the value to "other platform(Metatrader)" (whatever it means)
chaau
9-Oct-12 17:44pm
View
Where do you initialise your global variable pp? What exact line of code you use?
chaau
9-Oct-12 17:43pm
View
I think this can be achieved through AppLocker http://technet.microsoft.com/en-us/library/dd723678.aspx. There are also PS script commands for it.
However, this works only for Windows 7 and 2008
chaau
9-Oct-12 6:42am
View
I think this question will be best answered here:
http://forum.sysinternals.com/forum_topics.asp?FID=8&title=pstools
chaau
9-Oct-12 0:42am
View
It would be great if you could provide more information: e.g. error codes during compilation
chaau
23-Sep-12 18:54pm
View
Reason for my vote of 5
thanks mate. nice little trick
Show More