15,790,957 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 Python questions
View PHP 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 Jorge J. Martins (Top 31 by date)
Jorge J. Martins
9-Oct-14 9:43am
View
Thanks for trying Dipak.
The TRY CATCH part is not the problema.
I've been using that in DML triggers and stored procedures for quite a while.
I've improved my quetion for clarity.
Jorge J. Martins
19-Jun-14 6:50am
View
Hi Sergey
I'm parsing a flexible xml structure that comes from a REST service and I don't know in advance what members are referenced in that xml.
I could create a switch/case for every member on the class but it seemed a bad idea at the time for the class has a lot of members (above was just an example).
So far the reflection solution is working fine and I haven's noticed any performance issue on the client side.
Jorge J. Martins
18-Jun-14 7:29am
View
My mistake then. I'm really sorry man.
I really wanted to give You a 5.
Jorge J. Martins
18-Jun-14 7:05am
View
DamithSL
I'm prety sure I voted 5, that was my intention.
You did help me solve my problem why would I vote any other way?
Jorge J. Martins
17-Jun-14 13:07pm
View
Your answer has been very useful.
So far I've made it with Reflection and it is working.
The performance issue made me think.
Now that I have a working solution I can go on improving it taking the performance issue into acount.
My 5 for your answer and thanks.
Jorge J. Martins
20-Feb-14 7:18am
View
Then your issue is with the data, not the query. It's better then.
Please be a sport and mark this as answered or delete it, ok?
Jorge J. Martins
23-Jan-14 9:58am
View
This ThreadPool hint was great for I discovered a 200 thread limit on my machine.
On my stress tests i fired around 4000 notifications meaning 4000 threads on the system!
With TreadPool I've rewriten my code and replaced:
Thread t = new Thread(new ParameterizedThreadStart(this.notifyClient));
t.Start(new Callback_info { CallBackContract = channel, Message = DateTime.Now.ToString() + "\n" + message });
with:
ThreadPool.QueueUserWorkItem(this.notifyClient, new Client_info { CallBackContract = channel, Message = DateTime.Now.ToString() + "\n" + message });
It's still working and I don't have to bother about disposing.Thanks
Jorge J. Martins
23-Jan-14 8:10am
View
The ServiceBehavior is configured that way.
The real problem is when a user closes the browser or a network problem arises, the service, being synchronous, hangs for about a minute tryig to callback the unexistent client and all subsequent notificaions are delayed.
That's why I went to multithreading. This way, each notification uses a diferent thread and doesn't interfere with the rest of the notifications to be sent.
And it works great this way.
P.S. I think WCF handles well, as You said, but it aplies to Requests. Here I I'm dealing with Callbacks.
Jorge J. Martins
30-Sep-13 4:12am
View
Here it is:
http://www.codeproject.com/Articles/660423/ObservableCollection-notification-on-member-change
Jorge J. Martins
29-Sep-13 13:06pm
View
You mean:
insert into Hadiths_Books (Book_Id, Book_Arabic_Name, Book_Urdu_Name, Book_English_Name) select distinct (select MAX(Book_id) from Hadiths_Books) + ROW_NUMBER() OVER(ORDER BY Book_English_Name) as Book_Id, hadith_book_name, CAST(hadith_eng_book as varchar(50)) as Book_English_Name from Hadiths
I tried it and it works.
Jorge J. Martins
29-Sep-13 12:55pm
View
What subquery?
Jorge J. Martins
29-Sep-13 12:41pm
View
I tried your query and there is a problem with the parenthisis count.
Here is the one that works.
insert into Hadiths_Books (Book_Id, Book_Arabic_Name, Book_Urdu_Name, Book_English_Name) select (select MAX(Book_id) from Hadiths_Books) + ROW_NUMBER() OVER(ORDER BY Book_English_Name) as Book_Id, hadith_book_name, CAST(hadith_eng_book as varchar(50)) as Book_English_Name from Hadiths
Jorge J. Martins
29-Sep-13 12:25pm
View
Try to enclose it in ().
insert into Hadiths_Books (Book_Id, Book_Arabic_Name, Book_Urdu_Name, Book_English_Name) select (((select MAX(Book_id) from Hadiths_Books) + ROW_NUMBER() OVER(ORDER BY Book_English_Name)) as Book_Id, hadith_book_name, CAST(hadith_eng_book as varchar(50)) as Book_English_Name from Hadiths
This as been working well in SQL Server 2008 R2.
Jorge J. Martins
29-Sep-13 12:09pm
View
Try this
insert into Hadiths_Books (Book_Id, Book_Arabic_Name, Book_Urdu_Name, Book_English_Name) select ((select MAX(Book_id) from Hadiths_Books) + ROW_NUMBER() OVER(ORDER BY Book_English_Name) as Book_Id, hadith_book_name, CAST(hadith_eng_book as varchar(50)) as Book_English_Name from Hadiths
Jorge J. Martins
28-Sep-13 11:00am
View
Hi Bill
Promiss I'll write that article soon on how I use this ObservableCollectionEx!
My need of this solution is related to DependencyProperties Binding, Value Converters and Lambda Expressions and it's being used on several parts of this project for diferent needs.
I'll use one of this parts as an example on that article.
Thanks
Jorge
Jorge J. Martins
26-Nov-12 12:56pm
View
I didn't think I needed to.
I heven't setup any limitation to it. Besides, both trigger work when they are plain T-SQL.
Jorge J. Martins
1-Aug-12 11:05am
View
I never found out what was really going on.
After reinstalling the hole VS package I picked an earlier backup of the project and restarted coding.
Haven't seen these errors since.
Jorge J. Martins
12-Jul-12 12:56pm
View
I'm accepting this answer for future reference.
For my solution, Abhinav's answer gave me a simpler idea.
Since I don't need to know witch handler is beeing handled I'm going for a local boolean turned true or false when a handler is attached or detached and an if(), using that boolean, for attaching another handler or not.
Thanks
Jorge J. Martins
12-Jul-12 12:29pm
View
I think You missed the point.
I know witch events are to be activated and deactivated and I do it in code behind.
As an example I want to create an handler to the MouseEnter event on a control only if that event has no other handler already defined.
What I need to do in code behind e find out how many handlers are defined for that control and that event, if any.
Jorge J. Martins
14-Apr-12 14:18pm
View
OK, I suppose You want only the salary.
You would have to group the salary.
SELECT TA.Salary FROM (SELECT ROW_NUMBER() OVER (ORDER BY Salary ASC) AS rownumber, Salary FROM Empdetails GROUP BY Salary) AS TA WHERE rownumber = 6
Jorge J. Martins
14-Apr-12 10:42am
View
You could try:
DELETE FROM Empdetails
FROM Empdetails INNER JOIN Empdetails AS Empdetails_1 ON Empdetails.ID < Empdetails_1.ID AND Empdetails.EmpID = Empdetails_1.EmpID
Jorge J. Martins
14-Apr-12 9:56am
View
I mean a unique ID for every record.
Jorge J. Martins
14-Apr-12 9:37am
View
I'm sorry!
Does your table has an ID column?
Jorge J. Martins
13-Apr-12 18:32pm
View
Deleted
Anyone? Please ...
Jorge J. Martins
27-Feb-12 11:58am
View
Any how, the expander is part of a UserControl witch is included in the ScrollViewer's itemscollection making It hard to manage from within the UserControl.
Jorge J. Martins
27-Feb-12 10:13am
View
The ScrollViewer control doesn't have property "CanContentScroll".
Jorge J. Martins
20-Jan-12 17:39pm
View
Would it be a solution to make a copy at the OS level and use that copy on the handler?
Can I do that with this type of handler? It's server side, correct?
Jorge J. Martins
7-Nov-11 6:11am
View
Yes but it has to be done in two steps.
The events on the files are managed on a Service (this is what I'm working on). Then the service notifies the clients (no problems here).
Jorge J. Martins
7-Nov-11 6:04am
View
Thanks for info.
Does the Changed event is raised on the following cases?
- user opens the file (I don't realy need this one);
- user closes the file without any changes;
- user saves the file without closing it.
If the answer is No, No, Yes then it doesn't suit the needs.
What I realy need is the Closed event! :-)
Jorge J. Martins
20-Aug-11 21:18pm
View
That did the trick! Thanks.
Jorge J. Martins
20-Aug-11 20:32pm
View
Simon
Thanks for Your answer.
The thing is that my next step will be creating a UserControl to be used in a DataGrid and all ComboBoxes in that DataGrid would be named "CriteriosOpcoesComboChecks" and that is what I need the relative path for.
I looked at the link You suggested but Silverlight doesn't have the LogicalTreeHelper Class.
Show More