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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

Need RegEx for four decimal place

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
 
Hello All, I have total 19 digits in which i have 4 decimal place. What would be the pattern. ThanksBizTalk Beginner


View Complete Post


More Related Resource Links

Quick way to widen a decimal column in place?

  
Hi all, I have a table with over 400 million rows in it, and it turns out that one of the columns that was defined as decimal(14,5) needs to be widened to decimal(18,5).  The column is not used an any keys or indexes. What's the fastest way of doing that?  When I attempt to change the column definition (right-click the table in SSMS, select Design, update the column definition, then attempt to save), SSMS complains, saying Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.... Thanks, Matthew  

Quick way to widen a decimal column in place?

  
Hi all, I have a table with over 400 million rows in it, and it turns out that one of the columns that was defined as decimal(14,5) needs to be widened to decimal(18,5).  The column is not used an any keys or indexes. What's the fastest way of doing that?  When I attempt to change the column definition (right-click the table in SSMS, select Design, update the column definition, then attempt to save), SSMS complains, saying Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.... Thanks, Matthew  

decimal place problem in convert string to double

  

Hi guys, i have a strange error creaping into my web app but am unsure as to how to fix it.  When i run this code on my debug workstation it works fine but when i transfer it to my server things seam to go wrong.

dev station (windows 7) + VS2010
regional and language settings all set to uk
server (windows 2008r2)
regional and language settings all set to uk

What seams to be happening is that when converting a string to a double it works correctly on the dev environment but moves the decimal place to the end on the server.

example code(vb)

dim lat as string = "52.983829"
dim long as string = "-0.036500"

dim latint as double = lat
dim longint as double = long

now on the dev server the value of latint is 52.983829 as you might expect but on when published to the server it becomes 52983829.0

the same with longint on the dev staion it is -0.036500 but on the server it becomes -36500.0

i get equally confusing problems if i try to change it to an integer instead.

 

can anyone help point be in the right direction?


Create a 12 place decimal value in a select statement

  
I am needing to create a 12 place decimal field in sql2005 using a select statement.  I can do select 999999999.99 as 'Amount' but I really don't want the 9's.  Any idea how this can be done without creating the 9's? 

save the pdf onto some place

  

I am opening a pdf using reporting services. Is there a way to directly saving the pdf to desktop or some place directly without opening? 


Regex pattern for validating IPv6

  

Can anyone can make a regular expression pattern for validating IPv6 (not IPv4)?

Ipv6 has many formats and aliases. I tried making the pattern but written in a lot of codes (i'm not sure my code below will be 100% accepting valid formats and 100% declines invalid formats).

(([0-9a-fA-F]{1,4}:){1,1}(:[0-9a-fA-F]{1,4}){1,6})
|
(([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5})
|
(([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4})
|
(([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3})
|
(([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2})
|
(([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}){1,1})
|
((([0-9a-fA-F]{1,4}:){1,7}|:):)
|
(:(:[0-9a-fA-F]{1,4}){1,7})
|
(((([0-9a-fA-F]{1,4}:){6})(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}))
|
((([0-9a-fA-F]{1,4}:){5}[0-9a-fA-F]{1,4}:(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}))
|
(([0-9a-fA-F]{1,4}:){5}:[0-9a-fA-F]{1,4}:(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3})
|
(([0-9a-fA-F]{1,4}:){1,1}(:[0-9a-fA-F]{1,4}){1,4}:(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3})
|
(([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,3}:(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3})
|
(([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,2}:(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3})
|
(([0-9

Go Global: Make the .NET World a Friendlier Place with the Many Faces of the CultureInfo Class

  

CultureInfo is a complex .NET class whose objects are used for resource loading, formatting, parsing, casing, sorting, and other conventions that change as the language, location, or writing system is changed. It can be tricky to use correctly in every situation. Here Michael Kaplan explains some common scenarios in which you will use CultureInfo and provides information about the behavior, best practices, and consequences of a wrong decision.

Michael Kaplan

MSDN Magazine March 2005


Design: Place XML Message Design Ahead of Schema Planning to Improve Web Service Interoperability

  

Web Services are all about exchanging data in the form of XML messages. If you were about to design a database schema, you probably wouldn't let your tool do it for you. You'd hand-tool it yourself to ensure maximum efficiency. In this article, the author maintains that designing a Web Service should be no different. You should know what kind of data will be returned by Web Service requests and use the structure of that data to design the most efficient message format. Here you'll learn how to make that determination and how to build your Web Service around the message structure.

Yasser Shohoud

MSDN Magazine December 2002


decimal value validation and round off by javascript

  
The article decimal value validation and round off by javascript was added by hiral.hapani on Wednesday, June 02, 2010.

Hi All, I have createdone javascript by which you canvalidate a decimal value of any textbox for which you want. By thisjavascriptwecan bind user to enter only digits in textbox. and when he will enter any decimal value javascript will do round off it

Which one is better: Money or Decimal?

  

Hi

I want a field to keep money value (up to 100,000,000.00). And I didn't  work with money or decimal data type.

Money data Type is 8 byte

Decimal (9, 2) is 5 byte. (Exactly msdn only say Decimal (9, 0) is 5 byte and I don't really know how byte is Decimal (9, 2))

Please tell me which one is better to work with in sql and VS.net (handling sql in VS)

Best Regards. Morteza


Regex.replace [h2] to

  

I try to replace [h2] to <h2>
I use this coding:

string o = "<h2>test</h2>";
o = Regex.Replace(o, "[h2]", "<h2>");
o = Regex.Replace(o, "[/h2]", "</h2>");

 

But the result after the first regex is:

[<h2><h2>]test[/<h2><h2>]

So that is not what i want.
After the first 1, he should make:

<h2>test[/h2]

Whats wrong?


Where to place if statement

  

I have a design problem I could use some help determining how to code this problem.

I have a table with 3 fields, catCode, startDate and endDate. I am having trouble deciding how to query my DB based on the following...

By default a gridview will return all records that match the catCode selected from a dropdown list.

 

If the user checks a check box, only records are returned where....

startDate <= today AND endDate >= today

 

How can I apply the If condition to compare when the check box is selected? I used the wizard to build the select statment for the gridview, but I can switch that to a SP if that makes life easier.

 

Thanks for any and all help and suggestions.


Video: SharePoint 2010: In Place Records Management

  
SharePoint now has a record management feature that can be activated on any site so that you no longer need to create a separate record center site to manage your documents. (Length: 2:33)

regex: How to allow a comma?

  
Hi,How to allow a comma?"^ \ $? (\ D (1.3),? (\ D (3 },?)* \ d (3) (\. \ D (0.2))? | \ D (1.3) (\. \ d (0.2))? | \. \ d (1.2 }?)$"  This is works, I need character ","Helpthanks

multi-line regex in C#

  
Hi, I am sure this is really simple, but i can't figure it out. I have a string that looks like this: REV=A1 STATUS=Working I would like to grab 'A1' and 'Working', in a single regex, but i cannot seem to handle the linebreak. I have tried putting something together in Rad's Regular expressions designer and this pattern will match it all: REV=(?<Rev>.{2}) STATUS=(?<Status>.+) but i don't know to write a two-lined regex in C#. I have also tried to include the linebreak, with both \n and \r, but none of them worked. So, how is my pattern suppoed to look for this?Nicolai Søndergaard LM Glasfiber A/S

I need a regex for the following sentence

  
I have a line of text which is as follows  : This should occur before variable1 = 1 variable2 =2 variable3=6 variable4=9   I want a regex which checks if this text (This should occur before ) comes before  the string of the variables (variable1, variable2, variable3, variable4 ) and also  should pass if the placement of the variables can occur anywhere in the sentence.Also the regex should pass only if the variable4 has a value greater than 9.  
Categories: 
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