15,899,474 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 rohith naik (Top 51 by date)
rohith naik
17-May-19 23:14pm
View
Hi Gerry, I am not specific at all about my requirement. I just need something to indicate that a Redis instance has started up. I am very flexible in terms of what I can do to figure it out.
rohith naik
29-Sep-16 12:16pm
View
Well that is not what I intended at all. Fixed the issue and posted the solution.
rohith naik
29-Sep-16 12:00pm
View
I do have another problem I just figured out. I am pasting the zip file in the same directory as the main file. This would mean that the zip files I have created this week would get zipped again next week. I have used this syntax but this again seems wrong
$rootFolder = "C:\MyFiles\Output"
$tempVariable = $rootFolder + "*.*"
$files = Get-ChildItem -Path $rootFolder -exclude *.zip
Mind telling me whats wrong?
rohith naik
29-Sep-16 11:56am
View
Thank you, powershell syntax goes over my head, however I have posted my solution after I figured it out. Please feel free to tell me what can be improved.
rohith naik
29-Sep-16 11:39am
View
Thank you. Turns out I was not doing the full file names properly. I have added my solution below
rohith naik
22-Oct-14 8:56am
View
Thanks !
rohith naik
12-Feb-14 11:36am
View
I have solved this by using a very complex and bad algorithm. That is why I have not posted it here. If anyone does want it please let me know.
rohith naik
12-Feb-14 11:31am
View
Basically I am using a mod in Solr to return the hit words back to me and trying to map the words back to the original text. Unfortunately This is as much info I can cram into a comment. This is kind of like a sub - sequence problem.
rohith naik
12-Feb-14 11:30am
View
Deleted
Basically I am using a mod in Solr to return the hit words back to me and trying to map the words back to the original text. Unfortunately This is as much info I can cram into a comment. This is kind of like a sub - sequence problem.
rohith naik
12-Feb-14 10:50am
View
we need only one element from a row. You method will yield ones with many elements from one row.
rohith naik
12-Feb-14 7:04am
View
the problem is that i do not know how many elements there are lstInts. Therefore i cannot use nexted loops like you did.
rohith naik
12-Feb-14 6:42am
View
Honestly this makes no sense. I do not think you understood my problem.
rohith naik
12-Feb-14 5:27am
View
it just shows how to loop through all the elements. It doesnot tell how to get the unique combinations.
rohith naik
7-Feb-14 8:54am
View
Thnaks man - I was thinking of using the same thing. In fact already did it.
rohith naik
4-Feb-14 9:56am
View
hi, the problem is that all connection strings are with in the dataManager class. I cannot use them. All I can use in myProject is DataManager.GetNames(). The programs has to automatically use the appropriate dll depending on the location.
rohith naik
6-Nov-13 9:17am
View
you can check out this link http://stackoverflow.com/questions/2265412/set-timeout-to-an-operation
rohith naik
6-Nov-13 9:15am
View
I would after trying all approaches, i would HIGHLY recommend not using the task.wait() as it causes the application to become VERY unstable. The thread.abort method seems to be the best method. I ended up going for a !t.join(...) clause as it seemed the best way with fewest errors. Needed a few mods to the calling function to include the try catch blocks to catch the abort thread exception but seems to be worth it. Thanks Man
rohith naik
31-Oct-13 9:10am
View
Thanks man, will get back to you after going through this.
rohith naik
31-Oct-13 5:01am
View
Here was is a solution i thought of but I am having difficulty implementing it. I start 2 threads from my main loop. I make one thread sleep for 10 minutes and the other thread actually run my function. If the function returns a value before my sleeping thread then it is fine else abort the thread. But implementing it seems very hard.
rohith naik
31-Oct-13 4:03am
View
Answers it the best !
rohith naik
31-Oct-13 3:58am
View
This not what i want. I want the program to 'automatically detect' if a particular iteration is taking more than 10 minutes. For example ,
Stopwatch sw = new Stopwatch();
sw.Start();
for (int i = 0; i < 10000; i++)
{
if (sw.Elapsed.TotalMinutes >= 10)
{
// some actions before breaking out the loop
sw.Stop();
break;
}
MyFunction.Run(i);
}
if (sw.IsRunning)
{
sw.Stop();
}
If a loop in MyFunction.Run(i) takes more than 10 minutes this will not break/continue my loop. What I want to say is that the program must not wait for the loop to end but must take affirmative action as soon as 10 minutes is up. your code waits for it to end the current iteration and then checks for the condition in the next iteration. I think we need to use threads but i'm noob in that.
Thanks for the reply though.
rohith naik
12-Sep-13 8:33am
View
can you tell me what characters come in this range ?? + to x ??
rohith naik
12-Sep-13 8:09am
View
Are you sure that the tag property is string ??
rohith naik
12-Sep-13 3:42am
View
The problem is that creating regexes for expressing the same thing in different ways(there are hundreds of ways documents can express information). It would be VERY hard to use regexes for this. There are no 'regular' patterns in the documents as they use free speech. That is why using regular expressions is so hard.
rohith naik
11-Sep-13 14:11pm
View
Hi Tadit, this was my very first go at the problem. However, I have more than 100k documents to process and making regular expressions to match even 1k documents is very very hard. I think I need to use something more complex. I wanted to know what are the various approaches to this problem and how people solved it and the references they used. Thanks
rohith naik
11-Sep-13 14:06pm
View
I wanted to know if Natural language processing could solve my problems. Regexes were just my first (not very good) effort at the problem. I wanted to know other solutions to this. Thanks.
rohith naik
3-Jun-13 7:07am
View
Any idea how I can color individual words in a paragraph?? He only gives an example of coloring the whole paragraph.
rohith naik
3-Jun-13 6:58am
View
The example project is not opening on my computer :(
rohith naik
3-Jun-13 3:48am
View
Hi, both the links you provided are for richtextBoxes in WinForms. I am working in WPF. Thanks. BTW I am not really specific to RichTextBoxes. Any other control will work just fine for me as long as it is a WPF control.
rohith naik
31-May-13 9:19am
View
How so ?
rohith naik
31-May-13 9:13am
View
Thanks but i have a predefined set for this already.
rohith naik
30-May-13 7:34am
View
Additionally, I am not using XAML as there is a very complex logic to which cells I want to highlight. This works fine if the datagrid fits into 'one page' of sorts, i.e, there is no need to scroll. But if i scroll down and lose sight of the cell, The background change which I made jumps around.
rohith naik
30-May-13 7:07am
View
Can you atleast tell me why you think using a IValueConverter will help my problem ?
rohith naik
30-May-13 7:06am
View
Deleted
Could you please elaborate on that? This link seems to be something you throw around whenever some one asks anything about cell highlighting as far as I can see.
rohith naik
29-May-13 10:02am
View
Please help me with the problem I have. Your link is almost completely irrelevant.
rohith naik
29-May-13 1:15am
View
Furthur, I need two way binding because I can keep changing the cell I checked and the Textbox has to reflect the new value in the newly selected cell. Thanks for your help.
rohith naik
29-May-13 1:13am
View
"The x:Name of the datagrid." what do u mean by that. Could you please help me with more specific syntax as I am still a bit confused ? What is Element Name and how is it different from path ??
rohith naik
20-May-13 3:39am
View
Thanks, this works. No need to add to the cell to SelectedCells and it is read only as you said. Very helpful mate :)
rohith naik
16-May-13 2:40am
View
Do i need to add the DataGridCellInfo for the specified cells into SelectedCells or will be automatically done if I set the IsSelected option to true ?
rohith naik
16-May-13 2:30am
View
Thanks Pheonyx, I will try out the solution now. Will get back to you on this.
rohith naik
15-May-13 9:40am
View
basically i know how to change the background colour of the cell. I can get the cell using this method (already using this), you can ignore the highlight flag stuff as it is specific to my app.
public void ColourCell(int row, int column, Color color, bool HighlightFlag = true)
{
DataGridRow rowContainer = GetRow(row);
if (rowContainer != null)
{
DataGridCellsPresenter presenter = GetVisualChild<datagridcellspresenter>(rowContainer);
// try to get the cell but it may possibly be virtualized but enable virtualizion is off
DataGridCell cell = (DataGridCell)presenter.ItemContainerGenerator.ContainerFromIndex(column);
// now try to bring into view and retreive the cell
if (HighlightFlag == false)
cell.Background = new SolidColorBrush(Colors.MediumPurple);
else
{
cell.Background = new SolidColorBrush(color);
}
}
}
public DataGridRow GetRow(int index)
{
DataGridRow row = (DataGridRow)DataGridControl.ItemContainerGenerator.ContainerFromIndex(index);
if (row == null)
{
row = (DataGridRow)DataGridControl.ItemContainerGenerator.ContainerFromIndex(index);
}
return row;
}
static T GetVisualChild<t>(Visual parent) where T : Visual
{
T child = default(T);
int numVisuals = VisualTreeHelper.GetChildrenCount(parent);
for (int i = 0; i < numVisuals; i++)
{
Visual v = (Visual)VisualTreeHelper.GetChild(parent, i);
child = v as T;
if (child == null)
{
child = GetVisualChild<t>(v);
}
if (child != null)
{
break;
}
}
return child;
}
rohith naik
4-Apr-13 2:32am
View
Thanks Kenneth and SA for the edit, but i wanted to know the implementation in MVVM pattern and not in the event-driven programming model. I am sort of experienced in Winforms and already have the implementation in that(dataTable binding) but i am unable to wrap my head around the Commanding aspect of MVVM. Anyways My 4 for giving me the answer I deserve and not the answer I need :P
rohith naik
26-Mar-13 4:26am
View
I wanted to say ObservableCollection(DataGridTextColumns) - the tags must have been deleted !!
rohith naik
25-Mar-13 13:37pm
View
I would have named the properties "column1", "column2" and so on so that I could dynamically generate the property names based on the row or column number.
rohith naik
25-Mar-13 13:33pm
View
I do have a Table Class as you say. I have simplifies the problem here a bit so that I could get a generic answer. I have found a nice example of adding properties dynamically here "http://www.shujaat.net/2012/09/dynamically-generated-properties-using.html" which I was planning to use but I could not find a way to bind the columns dynamically. Maybe a ObservableCollection ?
Thanks for taking the time to help me out - appreciated
rohith naik
25-Mar-13 13:33pm
View
Deleted
I do have a Table Class as you say. I have simplifies the problem here a bit so that I could get a generic answer. I have found a nice example of adding properties dynamically here "http://www.shujaat.net/2012/09/dynamically-generated-properties-using.html" which I was planning to use but I could not find a way to bind the columns dynamically. Maybe a ObservableCollection<datagridtextcolumn> ?
Thanks for taking the time to help me out - appreciated
rohith naik
25-Mar-13 10:46am
View
Thanks Yair-I, i didnt know about the EnableModelessKeyboardInterop(). Thanks for all the links too.
rohith naik
23-Mar-13 6:44am
View
If you tell us your errors we can help you.
rohith naik
23-Mar-13 6:41am
View
And again another problem is that the number of rows and columns are not fixed. I have another assembly which sends me this data.
rohith naik
23-Mar-13 6:02am
View
The data represented in the matrix is a real table(example http://corpeconresearch.files.wordpress.com/2009/08/corpecon-philipppine-stocks-guide-sample-3_page_4.jpg). Each node has a reference to its column header and row header. There is no advantage of having as equally sized grid. I want to be able to edit and modify the data in the table and add new rows / columns. Hope this clarifies why i want to use a Data Grid
rohith naik
22-Mar-13 11:21am
View
Members of MyClass :
String MyText;
List (tuple(int,int,int)) reference;
//Each node references other nodes. On selection of a node the other referenced nodes must be highlighted. the tuple is of the format "row, column, referencetype"
Show More