RegEx - Large Filenames That Follow Standard Naming Practice

Feb 29, 2012

I have pretty large file names that follow a standard naming practice and I am attempting to write a RegEx to match them. When you are reading the file name it follows the convention:
p_d(set of 8 numeric)_t(set of 8numeric)images.ext(any# of alphanumeric)

For example:
p_d12345678_t12345678_images.ext_0

The few I attempted brought back unrecognized escape sequence OR no matches found. For example this one brings back no matches:
fileInfo = value
'that changes depending on what file I'm looking for
RegEx("p_dd*_t" & fileInfo & "d*_images\.ext_w*")

View 3 Replies


ADVERTISEMENT

.net - Naming Standard For Generics - Of T Or Of TEntity?

Mar 16, 2011

I know this is a stupid question maybe, but what is the naming standard for generics?Of t or Of TEntity or Of..it doesn't really matter?I see IQueryable(Of T) but then DBSet(Of TEntity).

View 3 Replies

Standard Practice For Accessing Back End Data Which Logon To Use

Feb 8, 2012

What is the standard method for accessing back end data, which logon should you use? For example we have applications that require the user to login but then use an admin account to access the data from the backend.But there are also applications that require the user to login and use those credentials to access the backend data.We are in the process of creating an application that will require the user to login and would like to implement the more common method(standard practice) of accessing data.If there are alternatives those are also welcome.This will be made in ASP.Net 3.5 or higher and may include Windows Applications(VB.Net) as well.I dont want to have two sets of credentials. What I am asking is which credentials are normally used to access the Database. For example one one application may access 2 or more database's. Now would you use the same credentials they used to login to the application or would you use the admin account to access the data?Maybe this should be a seperate question but if I ended up using integrated security to access the database would the user be able to simply connect to the database using his AD account? Either through an ODBC connection and MS Access or equiv.

View 2 Replies

Best Practice - VB Projects - Using Such A Large Database With Many Tables

Feb 21, 2012

The Adventureworks database is used extensively for tutorials in Visual Basic applications. This has many tables that can be bound to a solution. What I would like to know is, when using such a large database with many tables and using lots of them, is it better to construct your program with a number of projects all under one solution or to put everything into a single project. If you use a number of projects, what is the syntax for accessing each module from a menu strip in your main form? I know how to do this in a single project - all you do is Form(x).show. In Adventureworks, you have a table for Employees that could be put into a single project with a number of forms - one for data entry, one for displaying all of the employees, a filter to a single employee, etc., etc.

If two small projects rely on each other for some reason, again the syntax for linking them could be an issue. Would it be better to combine them into a single project? My reason for asking is that I would feel safer if I created an application on a project by project basis and then brought them all together in one solution. This way they can be tested individually and then linked together where necessary. Making a disastrous mistake in one then only requires a small re-write rather than the headache caused by a total crash of the whole solution. I would like to know which option professional developers take. I am using Visual Studio 2008 Professional and SQL 2005 Express

View 5 Replies

VS 2010 Comboboxes Follow Committed To Change Just Once And DataGridView Do Not Follow Filter?

Dec 11, 2011

I've uploaded in SkyDrive my project to give a better picture of my problem:Cascading Combobox works just once in _SelectionChangeCommitted, and, DataGridView do not follow 3rd Combobox filter?

View 2 Replies

Regex - Reading File Large File Very Slow?

Aug 26, 2011

this code takes about 30 mins and high cpu usage, what is the problem

Do
strLine = objReader.ReadLine()
If strLine Is Nothing Then

[code].....

View 3 Replies

Can't Capture Message Of Standard Output (Stdout) And Standard Error

Dec 15, 2011

I build program to launch application(launch application can as local profile or can as network credentials) using Advapi32 "Create Process WithLogonW".but I got the problem, I can't capture message of standard output(Stdout) and Standard Error(stderr).could everyone help me how to capture message and the code?

View 1 Replies

Add Standard Button To Toolstrip / Make Toolstripbutton As Standard?

May 27, 2009

I usually use standard button and do the settings like causevalidation etc if required.

i decided to use toolstrip and inserted some buttons but end up that it doesn't do the validation for control and also doesn't call leave event of textbox control.

so my question is, anyway to use regular button functionality for toolstripbutton or there is a way to add regular button on toolstrip.

View 4 Replies

Get The Standard BackColor Of A Standard TabPage?

Mar 11, 2009

I am trying to add a TabPage containing a UserControl to a TabControl at runtime, because the number of TabPages to add are determined at runtime.

The UserControl (objDataInfo) is just two Textboxes, two labels and two Radiobuttons, nothing too exciting...

The TextBoxes have their Anchor properties set to Left, Up, Right so they scale with the width of the usercontrol.

The TabPages are added in the constructor of the form, which takes the number of tabpages to create (n) as an argument:

vb.net
Dim cList As List(Of objDataInfo)
Public Sub New(ByVal n As Integer)

[Code]....

So... How can I get the standard BackColor of a standard TabPage?

(I tried leaving out the usercontrol all-together, but the TabPage still has a gray background...)

View 9 Replies

Large Multidimensial Array - Write A Program To Do Markov Chain But States Are Quite Large

Jun 9, 2011

I want to write a program to do Markov chain, but my states are quite large. First of all I calculate all the transition probabilities and revenues for all states(1381860 total states), and store in a multidimensional array. Public RevArr(0 To 9, 0 To 750, 0 To 282) As Long

After that the iteration of markov chain should use these as inputs to calculate the steady-state probabilities. But when I try to run the main code I got this error.Exception of type 'System.OutOfMemoryException' was thrown.

The following is the declaration of second array I add just another dimension for storing all the iterations, but I get this error. Dim stateprob(IT + 1, 0 To 9, 0 To 750, 0 To 282) As single

View 1 Replies

Concatenating A Variable With A Regex Group Match In Regex.replace?

Apr 5, 2012

I am having an issue where I am using regex.Replace to replace part of a string. The basic idea is that I want to capture the beginning of the string then replace the end of the string with a value from code. For an example pretend I have a string that says "Test Number " followed by number and I want to increment that number. I capture the "Test Number " but when I try to concatenate that capture with the new number it treats the capture ($1) as a literal and replaces the entire string with $1[new number].

[code]...

This will output "We are on Test Number 2", as expected. how I can use a variable in the replacement string portion of the Regex.Replace when including a captured group?

View 1 Replies

Regex: Take Text & Some Special Characters Between The Xml Tags Using Regex On C#.net?

Feb 23, 2012

I want to take the text and some special characters between the xml tags.. My input file contains:

[Code]...

now i want the Regex to take text and the special characters between the tags <line>,<inline>..

View 2 Replies

Increment Regex Match Using Regex.Replace

Jun 21, 2012

I'm creating a program in VB.NET to output multiple images. Some images will have the same file name. If there is multiple files with the same name I want to add "_1_" to the end of the file name. If the "_1_" file already exists I want to increment the 1 to be "_2_". If this file already exists I want to continue incrementing the number ultil it doesn't exist. So for example "filename", filename_1_", "filename_2_", etc. Here is the code that I have tried

[Code]...

View 1 Replies

Regex Builder That Actually BUILDS RegEx From A Highlight

Nov 17, 2011

I've been working straight since yesterday trying to get this to work. I'm a noob to RegEx and I've tested out about 5 different RegEx "builders" but each of them require you to navigate through the options to build the Regex...each of them has failed when I try to use them.Is there an application out there free/paid where you select the line you want to grab and the RegEx is auto generated from that highlight rather than having to try to build the line of code? [code]

View 1 Replies

Do You Follow All The Rules Of FXCop?

May 27, 2010

If we won't know what Exception will be thrown then why cannot we catch a general exception? I just cannot follow this and some more.

View 14 Replies

How To Check If A Link Is No Follow Or Not

Mar 23, 2011

If we have a htmlanchor element. Is there an elegant way to know whether the link is no follow or do follow after taking into account that tag and context of the links.

View 4 Replies

What To Use For Naming Conventions

Mar 25, 2011

What everyone uses for naming conventions?

View 3 Replies

IDE :: Differences Standard - Professional - Team Suite - Team Foundation Server Standard & Team Foundation Server WorkGroup Edition

Jul 15, 2009

1) Can anyone post a link or tell me the differences between these versions of VISUAL STUDIO please? >>

Standard, Professional, Team Suite, Team Foundation Server Standard & Team Foundation Server WorkGroup Edition

2) I imagine Team Foundation Server WorkGroup Edition is the most expensive and therefore has the most functionality?

3) Are there any others I have not mentioned?

View 4 Replies

.net - Best Practice On IF/ELSE Statement Order?

Aug 20, 2009

Which is a better practice? (I'm coding in .Net if that makes a difference)

IF condition = true THEN
...true action--even if rare...
ELSE

[code].....

View 10 Replies

Best Practice For A Search SQL Query?

Jul 1, 2009

I have a SQL 2008 Express database, which have following tables: [code] Now I need SQL query to search for word (i.e. Beyonce Halo Music Video) against these tables.

-For Title exact phrase will get 0.5 points
-For Description exact phrase will get 0.4 points
-For tags exact phrase will get 0.3 points
-For title all words will get 0.2 points
-For description all words will get 0.2 points
-For title one or more words will get 0.1 points
-For description one or more words will get 0.1 points

And I will show these videos on basis of points. What will be the SQL Query for this? A LINQ query will be more better.

View 2 Replies

Best Practice For Location Of A Query

Feb 4, 2011

I'm writing in VB.net 4.0 and using SQLExpress 2008 R2. In a DataGridView, I would like to display (no edits) data coming from multiple tables in my database.A second Grid (different data, still multiple tables) will need to allow editing and saving of data.I understand creating a View in the database and using that as a source for the DataGridView.I also assume that there are ways to query and create a data source for the Grid totally within my VB program.Would someone explain the consequences and implications of the different approaches?

View 2 Replies

Best Practice For Saving Images

Apr 9, 2009

I am allowing users of the admin panel of my website to upload photos, its a simple process where I check the validity of the image and then save it to a folder, then I also have to record a couple of database records for that image to be able to retrieve it later, my saving function is as follows...The function that uploads and saves the picture in the folder with a name i construct in another function: [code] and the function that creates the database record for that same picture: [code] Now I know that what I am doing is full of best-practices violations, so please point me out to what I should do, keep in mind that the users might delete the pictures later, so I wanna make sure that I can delete the database and file of the picture, and the whole issue of the path.

View 2 Replies

Best Practice While Working With Dataset?

Jun 25, 2009

What is the best practice while working with dataset amd datatable.Actually I have seen that very few information is online when it comes to working with multiple base table.Suppose there is one master table and a details table. The need of MASTER table is suppose just one column (say ProductName), while the application mainly works with the DETAILS table.My idea, we use JOIN to create a single datatable and work with it. But am surprised how little information is available when it comes to working with Multiple Base Table and the limitation of SQLCOmmandBuilder in such situation.

View 15 Replies

Internet Connection Best Practice?

Dec 8, 2010

What is the best practice way of detecting internet connection?

From Windows Vista onwards, a status is set in windows that is displayed in the task bar. However, I cannot call this function/api/whatever, since some of the client pc's are still on xp, and only due for upgrade in 18 months.

so do i use and request something like [url]... to try and see it it works, and on the catch block set the return value to false, or is there another way?

Second part of this question, If no network connection is available, I can use [url]... to dial a connection. Will this use internet explorer's settings, or dial the connection marked as default in DUN?

Public Sub Life(ByVal AnyEvent As Object) Dim myNewLife As New Life Dim Happiness As New Collection Happiness.Add(AnyEvent) myNewLife.Experience(Happiness) End Sub

View 4 Replies

Set Variables To 'Nothing' Is A Good Practice?

Jan 27, 2011

If I got Dim myRect As Rectangle = New Rectangle(0,0,100,100)Is it necessary or just fine to later do this: myRect = Nothing Or it isn't necessary?IF it is necessary, are there other cases it isn't for my variables?

View 2 Replies

WCF Data Objects Best Practice

Mar 24, 2011

I am in the processing of migrating from web services to WCF, and rather than trying to make old code work in WCF, I am just going to rebuild the services. As a part of this process, I have not figured out the best design to provide easy to consume services and also support future changes.

[Code]....

View 1 Replies

Buttons That Follow Form Resize?

Nov 24, 2011

I have anchored textboxes to follow form resizing but buttons stay in the same place :/ Any ideas? (Sorry if this is a "Noob" question)

View 1 Replies

Getting Progress Bar To Follow Subs And Functions?

Jun 2, 2011

Earlier I was working on a project, and I added a StatusToolStrip and the the ToolStrip I added a label and a progress bar. The label will say the current sub or function that is in progress and the progress bar will show how far along it is through the sub or function. I have tried this myself but I cannot figure it out as I rarely use progress bars.

An example of a code that I would like the progress bar to show would be like this:
Private Sub StopServer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopServer.Click
'Checks to give server notice
If My.Settings.warningmessages = True Then
Dim cmd As String = My.Settings.warningmessagetext(2)
[Code] .....

So while the sub is running the label would say "Stopping Server" and the progress bar would show how far along the sub is.

View 4 Replies

How To Get One Image To Follow Mouse Cursor

Dec 11, 2007

I have a short little program that has an image follow my mouse cursor. But the problem is that the image keeps drawing itself over and over. I only want 1 image following my mouse.

Public Class Form1
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Dim myBitmap As System.Drawing.Bitmap
Dim myGraphics As Graphics
[Code] .....

View 8 Replies

Image Follow Mouse Pointer?

Apr 17, 2012

i want to make a custom mouse cursor but I found that can be hard so I want to go the next best route. I want to see how you make an image follow the mouse pointer. I assume it would use some kind of image = mousepinter new point (x, y) or somethign like that. Suggestions or samples? In the end i want to take this code snippet and make a duck hunt game and a whack a mole type game

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved