expression

how to make Regular expression into non-greedy ?

Hi everyone! I have made a Work with JQ. My Work is a string width a special character block begin and end of string. I want take the text in that special characters, i used regular expression for find in string, but how to make JQ find multi result when have two special character or more. My html here; <div id="container"> <div i...

Freeze Table Header with Microsoft Expression

I am using the below code to achieve the results. The scenario is working fine with single DIV on the page. But when i am adding one more DIV to the page, then problem comes into picture. Find my HTMLcode @ http://docs.google.com/Doc?docid=0Adbmqz8tzPkZZGQ3cjQ5YnJfM2c2NTZkc2Nk&amp;hl=en When i scroll first DIV, the header of second DIV...

Calling a Generic Method using Lambda Expressions (and a Type only known at runtime)

You can use Lambda Expression Objects to represent a lambda as an expression. How do you create a Lambda Expression Object representing a generic method call, if you only know the type -that you use for the generic method signature- at runtime? For example: I want to create a Lambda Expression Objects to call: public static TSource L...

Why do I get errors when using unsigned integers in an expression with C++?

Given the following piece of (pseudo-C++) code: float x=100, a=0.1; unsigned int height = 63, width = 63; unsigned int hw=31; for (int row=0; row < height; ++row) { for (int col=0; col < width; ++col) { float foo = x + col - hw + a * (col - hw); cout << foo << " "; } cout << endl; } The values of foo ar...

How to allow users to define financial formulas in a C# app

I need to allow my users to be able to define formulas which will calculate values based on data. For example //Example 1 return GetMonetaryAmountFromDatabase("Amount due") * 1.2; //Example 2 return GetMonetaryAmountFromDatabase("Amount due") * GetFactorFromDatabase("Discount"); I will need to allow / * + - operations, also to assign...

Express XPath as an expression tree

If I have an XPath query like NodeA/NodeB[@WIDTH and not(@WIDTH="20")] | NodeC[@WIDTH and not(@WIDTH="20")]/NodeD Is there any API available to visualize this XPath query as a stack of atomic expressions, something like (following is generic) Get results of NodeA, call it "first set" Get results of NodeB from "first set" Filter wher...

Pushing to Publishing Point isn't connecting and can't generate physical wma file when completed, Expression Encoder 3 SDK

Hello, I am currently migrating code over from a custom WME9 application to one built in EE3, however certain pieces of functionality I cannot seem to be able to achieve. I am trying to have the user push to a publishing point after they have entered the server and PPN. Below is my code to attempt to push to the Publishing Point. Wind...

Simulating Start and Stop archive in Expression Encoder 3 SDK

I would like to be able to start an encoding session and then like in Windows Media Encoder 9, start and stop recording my live stream while the encoder is still running. Is this possible? ...

VB.NET logical expression evaluator

I need to test a logical expression held in a string to see if it evaluate to TRUE or FALSE.(the strig is built dynamically) For example the resulting string may contain "'dog'<'cat' OR (1>4 AND 4<6)". There are no variables in the string, it will logically evaluate. It will only contain simple operators = > < >< >= <= and AND , OR and O...

Are there any libraries for parsing "number expressions" like 1,2-9,33- in Java

Hi, I don't think it is hard, just tedious to write: Some small free (as in beer) library where I can put in a String like 1,2-9,33- and it can tell me whether a given number matches that expression. Just like most programs have in their print range dialogs. Special functions for matching odd or even numbers only, or matching every numb...

How can I factor out repeated expressions in an SQL Query? Column aliases don't seem to be the ticket...

So, I've got a query that looks something like this: SELECT id, DATE_FORMAT(CONVERT_TZ(callTime,'+0:00','-7:00'),'%b %d %Y') as callDate, DATE_FORMAT(CONVERT_TZ(callTime,'+0:00','-7:00'),'%H:%i') as callTimeOfDay, SEC_TO_TIME(callLength) as callLength FROM cs_calldata WHERE customerCode='999999-abc-blahblahblah' AND ...

How do I programmatically set property of control in aspx file ?

This may be a very dumb question but I can't seem to get it working. I use at many places the following syntax for dynamically binding a property of a control in aspx file to the resource entry, e.g. <SomeFunnyControl Text="<%$ Resources : ResClass, ResEntry %>" /> I want to do a similar thing with a class containing some constants, s...

NHibernate Criteria - How to filter on combination of properties

I needed to filter a list of results using the combination of two properties. A plain SQL statement would look like this: SELECT TOP 10 * FROM Person WHERE FirstName + ' ' + LastName LIKE '%' + @Term + '%' The ICriteria in NHibernate that I ended up using was: ICriteria criteria = Session.CreateCriteria(typeof(Person)); criteria.Add(...

validating the mobile numbers

I need a regular expression to validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered. The numbers must start either with 9 or 8 with above criteria. ...

How can I skip some block content while reading in Perl.

Hello. I plan to skip the block content which include the start line of "MaterializeU4()" with the subroutin() read_block below. But failed. # Read a constant definition block from a file handle. # void return when there is no data left in the file. # Otherwise return an array ref containing lines to in the block. sub read_block {...

How can I get the type I want?

There are a lot of such classes in my project (very old and stable code, I can't do many changes to them, maybe slight changes are OK) public class MyEntity { public long ID { get; set; } public string Name { get; set; } public decimal Salary { get; set; } public static GetMyEntity ( long ID ) { MyEntity e = new MyE...

Silverlight clipping UserControl when parent column width is set to GridUnitType.Star

Hi, I have a user control that contains an ellipse. The ellipse is translate transformed to the right until it lies partially outside its parent control. I put the user control into the middle column of a 3 column grid. If I set the column width to GridUnitType.Auto I can see the ellipse overflowing the column. If I set the column...

MSDN Subscription Expression Studio 4 licence details

I logged into my MSDN subscription (Premium) today to download the new expression studio, and I noticed that unlike Expression 3, it requires you to enter a key, and they only provide 1. Previously I installed Expression 3 on 2 computer, my home and my work computer. So my question is, is this no longer allowed? or is it a key that can ...

Regular expression for matching functions

I am using the following regular expression (from http://www.simple-talk.com/dotnet/asp.net/regular-expression-based-token-replacement-in-asp.net/) (?<functionName>[^\$]?)\((?:(?<params>.*?)(?:,|(?=\))))*?) it works fine, except when I what to include brackets within the parameters such as "<b>hello<b> renderHTML(""GetData(12)"") " so...

Multiple group expressions in list (ssrs 2005)

Hi, I have a problem with group expressions in a list. I want to use two expressions: '=Ceiling(RowNumber(Nothing)/3)' and '=Cint(Fields!kpilevel.Value)' They work both individually, but when I insert them together only 1 works. I inserted them like this: img718.imageshack.us/img718/736/problemxq.png Does anyone know how to solve this...