Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

Jim Conigliaro

@Jim Conigliaro
About
Posts
60
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Regular Expression Problem
    J Jim Conigliaro

    The regular expression would be: (i|I)\d{5}\.\d (i|I) -> either a lower case or an upper case i \d{5} -> five sequential digits \. -> the decimal point \d - one digit so the fully escaped regex on .net would be var exp = new RegExp("(i|I)\\d{5}\\.\\d"); Note: you could also use the ignore case Regex option flag and just include the i instead of (i|I) P.S. I would recommend use of the Regex Coach - a nifty little tool for designing and testing regular expressions: http://www.weitz.de/regex-coach/[^]

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET help regex

  • How to find Date differences(dd/mm/yyyy)?
    J Jim Conigliaro

    When converting to a datetime object, you need to specify the format of the date if you are giving it a format other than the default for the server. Your server is expecting mm/dd/yyyy, so if you want to specify a different date format, you will need to tell the ToDateTime function what format you are providing the data in.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET help css tutorial question

  • IIS returns Bad Request (400) error [modified]
    J Jim Conigliaro

    IIS 6 has a wildcard mapping setting that is designed specifically to process requests that don't map to a specific file (i.e. a request with no file extension). When you configure your web site/app, click on the configuration button under the application settings. Under the application mappings, you should see a wildcard mappings section as well. Map the wildcard request to the aspnet_isapi.dll and make sure that it doesn't require that the file exist. That should solve your problem.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET help com windows-admin workspace

  • what functions could I use to get this effect in C#????
    J Jim Conigliaro

    If I understand what you are looking for, you should be able to create a basic windows form application and then use the web browser control to embed Internet Explorer into the application.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# csharp c++ php visual-studio question

  • ORA-01008: not all variables bound - ADO.NET
    J Jim Conigliaro

    Try adding the parameter without the colon ... cmd.Parameter.Add(“inputDate”,”01/01/2006”); Also, I don't know if it is a formatting issue with your post, but in your query, you appear to have a space between the colon and the variable name.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    Database help csharp database

  • Accessing images stored within a firewall??
    J Jim Conigliaro

    You shouldn't really be trying tp make the images directly accessible outside the firewall. The best way to handle this is to create a distributed architecture in which a machine inside the firewall streams the images to a machine in the DMZ which can then be streamed to the client. A simple web service should be sufficient. On your machine inside the firewall, create a web service that, given an image name/path, reads the file and returns a byte array representing the file data. On the web machine, call this web service and perform a BinaryWrite of the byte array.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET sysadmin database sql-server windows-admin help

  • One large table vs. several smaller tables
    J Jim Conigliaro

    Typically, anything greater than a few milliseconds is considered poor performance. You can easily achieve sub-10 second performance on an insert in a million entry table - assuming that your server is appropriately scaled for the job. For a million record table, you should still be able to achieve sub-second inserts. Make sure you do the math on your performance analysis. For example, if you shoot for 10 seconds in your insert time: 10 seconds * 5000 inserts/day = 50000 seconds/day spent inserting = 13.8 hours/day spent inserting records Create your table, inject a few million records into the table and then do some performance analysis. If the performance is acceptable, then you have your answer!

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    Database database question c++ visual-studio sysadmin

  • One large table vs. several smaller tables
    J Jim Conigliaro

    This isn't a trivial process. Though simple on the surface, there is a lot you need to think about. First, transfering one entry at a time will hurt performance. You would be better off ignoring the queuing concept entirely and just inserting directly to your main table. The general logic you want to follow is this: Start the transaction insert from queue into master delete from queue commit transaction syntax for inserting from one table to another is: INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1 Use a lock hint to lock your tables until the transaction is completed, so for example you might have the following code: BEGIN TRANSACTION INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM WITH (TABLOCKX) DELETE FROM TABLE2 COMMIT For performance purposes, you may also want to drop the indexes in your main table prior to the insert and then recreate them after the insert.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    Database database question c++ visual-studio sysadmin

  • user control properties
    J Jim Conigliaro

    Try adding the fillowing attributes before your property declarations: [Bindable(true)] [Category("Behavior")] [DefaultValue("")] [Localizable(true)] for an example, see http://www.jimconigliaro.com//FlashWebControl.ashx[^]

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET question

  • delete files from a directory
    J Jim Conigliaro

    Look at the System.IO namespace, particularly the Directory and Files classes. The Directory class as a static GetFiles member that gets a list of files and the File class has a static Delete method that can delete the file. foreach(string file in Directory.GetFiles([path]) {    File.Delete(file); }

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# question

  • random numbers
    J Jim Conigliaro

    I don't think your going to get it done in one line of code. If you are trying to keep your code simple, then I would write a routine that did the job and let calling it be your one line of code. So for example, I would write a function called GetRandomValue that handled all of the work, and then simply call that function when I needed it. private object GetRandomValue(object[] possibleValues, object illegalValue) {    Random randomIndexGenerator = new Random();    int index = randomIndexGenerator.Next(possibleValues.Length-1);    object randomValue = possibleValues[index];    while(object == illegalValue)    {       index = randomIndexGenerator.Next(possibleValues.Length-1);       randomValue = possibleValues[index];    }    return randomValue; }

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# question data-structures help lounge

  • character count
    J Jim Conigliaro

    Javascript is the way to go: Characters Remaining: 30 function countCharacters(source, outputId, maximum) { outputElement = document.getElementById(outputId); if(outputElement) { var length = source.value.length; outputElement.innerText= maximum - length; } }

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET csharp javascript asp-net tutorial question

  • One large table vs. several smaller tables
    J Jim Conigliaro

    If the tables are indexed, then as your table grows, the insert (and sometimes the edit) operations tend to slow down - this is because the database needs to manage the indexes during the insert. However, a million rows (on a properly indexed table) should not be a problem for a select statement. The referse holds true on a non-indexed table - inserts tend to remain fast but select operations slow down. There are a couple of design patterns that are applicable. One is to create multiple tables, one per month, one per year, whatever is necessary. This keeps the indivual table size small. You would then create a VIEW to represents a union of all your tables so your select statements always pull from a single entity. Another design pattern is to keep all of your data in a single, indexed, table but have a separate, non indexed, table that acts as an insert queue. New data gets inserted into the queue and that data is moved into the permenant table on a nightly basis (inerted into permenant table, delete from queue). You would still need a VIEW to provided a union between your queue and the permenant table, but you don't need to update the view as new tables are added.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    Database database question c++ visual-studio sysadmin

  • datareader
    J Jim Conigliaro

    It is usually a best practice to reference your data by column name, so the dr.Item([ColumnName]) method is best. The reasoning behind this is that if your query changes and you add or remove columns, you won't need to modify the your code to adjust for the resulting changes in column indexes. The GetOrdinal method returns the index of a column that can then be used to retrieve the data for the specified column. This method is often used if performance is a concern. Retrieving data by column index is faster than by nane, so if you are looping through a large number of columns, you will typically retrieve the column index by name using the GetOrdinal method and then use that index to retrieve the data.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET database help

  • aspx Window close
    J Jim Conigliaro

    Use the RegisterClientScriptBlock command to write the window.close script to the page.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET question javascript database

  • Fairly simple Regex question...
    J Jim Conigliaro

    Use the OR operator (|) in your regular expression: \w|\.|:|;|\? If you haven't already, you may want to get a copy of Regex Coach. It's a free utility for designing and testing regular expressions.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# regex help tutorial question

  • Problems with primary key
    J Jim Conigliaro

    What does the select command look like?

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# database question sql-server sysadmin help

  • File Download Response.....
    J Jim Conigliaro

    I don't believe that you can. Thie "open/save/cancel" options are handled entirely within the browser and do not send any data to the browser. The job of the server is simly to send the stream to the client and be done with it. The browser is responsible for receiving the stream and then asking the user what to do with it, which requires no server interaction.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    ASP.NET question sysadmin

  • Executing an executable unmanaged exe file...
    J Jim Conigliaro

    How about: myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# question

  • namespaces in VS 2005
    J Jim Conigliaro

    The "Web Site" project in VS05 is a fundamental shift in architecture from the web projects in VS03. The web site projects are operate less like applications and more like content managed web sites. Web pages get indivually compiled into their own dlls by default and as such, don't belong to a namespace. You could manually add namespaces and configure the project to compile to a single dll, however, I would recommend that you install the "Web Application" project, which didn't ship with VS05 but is available for download from: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx[^] The Web Application project is more consistent with the VS03 web projects and is easier to manage as a complex application.

    Jim Conigliaro jconigliaro@ieee.org
    http://www.jimconigliaro.com

    C# visual-studio com design career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups