.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Finding a specific part in a a whole statement (Negating regex expressions)

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF

Sorry for the lame title, but I couldn't think of another way to describe it. Basically I have been working on this all week and I am at the point now where I am not getting anywhere and need assistance.

I have this text which needs to be parsed;

text.set(Vector2(10,10), TEST, Vector2(20,20))

I am trying to find the second parameter of the method set which is a string(could be anything though besides an object definition like the first 2). I am able to find the other 2 parameters(just the numeric portions which is all I want) with this regex expression:


And I am able to find the "text." portion with this regex:


But what I cannot seem to do is to combine both of these negatively to give me the resulting string which should be "set(Vector2, TEST, Vector2)" which I could work with as output but ideally I would like just that second parameter. Important note is that this can't rely on positions as the second parameter wont always be available or a non-object declaration.

Here is a short back history if it is required and may help;

Basically I have designed a scripting language that works in the XNA framework for on the fly changes while running on windows. It all works fine and dandy with the way I hav

View Complete Post

More Related Resource Links

looking for a specific web part

I have seen a web part that displays an SSRS report with the parameters along the top.  What web part is this?  The report viwer web part displays them on the side which is undesireable for our customer.

How to print a customer statement with the return part at the bottom.

I have a customer statement that is being generated out of SSRS with the customer return stub at the top third of the document. The statement is printed on paper stock that breaks the paper up into 1/3 and 2/3rd's of a sheet after seperated. Because the statement portion that is returned by the customer then has perforations on it once it is torn off, and those perforations are on the bottom, our payment scanner does not handle these top portions very well. Basically we are experiencing lots of jams. We have found that if we place the return portion at the bottom of the page so that the perforation is at the top of the detached portion, the scanner processes the documents just fine because the documents are not riding on the perforation. I've been able to move the parts of the report around so that the part that returned by the customer is underneith the detail, however because the number of statement detail lines changes depending on the customer, the actual information that should be printed on the bottom third of the paper moves up and down depending on the number of statement lines. My problem is, the part that is returned by the customer is suppose to have some mailing information line up in window envelopes. The information changes depending on the company the statement represents. I've tried putting the fields in the 'Page footer', but you can't reference r

"Like", "In" Expressions in Lambda statement


Salam to all,

for my Lambda, i need to use Like Experssion, but this give me error, i dont know how to make this.

context.CreateObjectSet<ReportsManager_Entity>().Where(u => (u.ReportAdminInt like 123)).ToList();

also i need to use "in" expression (the same of 'in' experssion in sql) but also this give me an error

context.CreateObjectSet<ReportsManager_Entity>().Where(u => (u.ReportAdminInt in [1,2,3])).ToList();

please help me,


Nested CAML Querie results in exception " Some part of your SQL statement is nested too deeply. Rewr



I am trying to mimic SQL"IN" operation using CAML. Lets take a scenario where we need fetch all the ListItems with ID within a list of IDs. The target list is realy large ( 50k records)

Possible options are from the Working with large list Whitepaper

-> CAML (Object model) -> CAML (using Webservices) -> Portal Site Map Provider -> Search API

The Custom webpart that we are developing is on live data ( NO search API) and query is user dependent (No Portal Site provider)

As our code is deployed on to the server, we can use SPobject model SPQuery, but as CAML deosn't support "IN" Operator and not more than two logical operators in we have to nested query.

When the nested query hits the 478 nested ORs then the exception is raised

"Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries "

Firstly the Row lmit 2000 is resulting in multiple queries and on top of it, spliting it further results in performance impact.

Is there any other better solution???

Server Error Page: Some part of your SQL statement is nested too deeply.


Hello.  I've come across this error page with a Sharepoint Server 2007.  I've seen a few forums that say that Microsoft was going to fix this issue in its next major version, but I couldn't find out what version that was.  Is the 2007 version without a fix for this?  Is there a patch I could get, or is this part of a bigger issue?

I should mention, I've received this error page after simply editing html code in a web part.  There was no editing of sql statements.  Thanks in advance.

unable to retrieve specific section in CDATA part of XML with the help of XPath in XSLT



   I am unable to retrieve specific section in CDATA part of XML with the help of XPath in XSLT. How can i navigate into ?Frown

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

Various SQL Expressions

A comparison is a Boolean operation that produces a true or a false result, depending on the values on which the comparison is performed. A comparison is performed between two values of the same type; for example, you can compare two numbers, two characters, or the names of two cities. To support comparisons, Transact-SQL provides all necessary operators.

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Hello World to C# Threading Part 1

In this post we will see how we can implement simple threading. Why do we need threading? When you want you application to do more then one thing at same time, then you need to implement threading. One usual and common scenario would be when your application needs to get data from some other resource like web services and you don't want you application GUI to be freeze during this time. In that sort of case you will run the code to access web services in separate thread so your application GUI won't freeze. The System.Threading namespace .NET provide interfaces to implement multi threading.

Multithreading in .NET Applications, Part 3

Multithreading is a powerful design tool for creating high-performance applications, especially those that require user interaction. Microsoft .NET has broken down the barriers that once existed in creating multithreaded applications. The last two installments of the .NET Nuts & Bolts column were

What's new in ASP.NET 4.0 - Part II - Routing in Webforms

This post covers one such feature which is Routing in Webforms. Although Routing was available even in .NET 3.5 SP1, (check this excellent post by Phil Haack on implementing Routing in ASP.NET 3.5 with .NET 3.5 SP1), it was kind of less known. Also the plumbing work was too much for getting it implemented.

C# 3.0 new Features - Part 1

This article give you a brief description on the new features of C# 3.0 and make our life easier.

C# 3.0 new Features - Part 2

This articles describes the importance of Lambda Expressions.
This will reduce number of steps of code writing.

What is Lambda Expressions In LINQ

A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.

All lambda expressions use the lambda operator =>, which is read as "goes to". The left side of the lambda operator specifies the input parameters (if any) and the right side holds the expression or statement block. The lambda expression x => x * x is read "x goes to x times x." This expression can be assigned to a delegate type as follows:

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend