Loading ...

  • I installed Windows XP SP3 image on Virtual Box VM in my machine. Everything worked well in the installation but I was not able to connect to internet. In order to fix that I selected the following option as the Network Settings for me: i.e Select Adapter 1. Check the "Enable Network Adapter" checkbox. Select "Bridged Adapter" o
    Raghav Khunger  · 1/30/2014  · 0  · 3965
    internet networking virtualbox windows-xp
     /5
    Avg: 0 / 5 (0votes)
  • Importing new stored procedures from database project to destination database
    We recently started using database project in our application. To get the updated stored procedures from database project to destination database we were using "Build" option. The issue with this option was that it was not importing new stored procedures from database project to destination database. The fix for this issue was to select &
    Raghav Khunger  · 1/22/2014  · 0  · 9119
    database sql-server visual-studio database-project
     /5
    Avg: 0 / 5 (0votes)
  • C#: Swap two integer variables value
    In this blog I will show you how to swap two integer variables. I will be using Interlocked.Exchange to do the same: using System; using System.Threading; namespace SampleConsoleApplication { class Program { static void Main(string[] args) { int i = 1; int j = 2; Console.WriteLine("Before Swapping: i={0}, j={1}", i, j); Interlocked.Exchan
    Raghav Khunger  · 1/17/2014  · 2  · 3380
    c#
     /5
    Avg: 0 / 5 (0votes)
  • VS2012: Unable to open database project
    I tried creating a database project todat in VS2012 but was encountered with the following error: Unable to open Database Project This version of SQL Server Data Tools is not compatible with the database runtime components installed on this computer. The solution was to install the lastest version Data tools from here http://msdn.microsoft.com/en-u
    Raghav Khunger  · 1/16/2014  · 0  · 3004
    visual-studio-2012
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will help you how to delete duplicate rows from a table where there is no primary key in the table. Below is the script to insert data: CREATE TABLE MyTable ( Col1 INT , Col2 VARCHAR(10) , Col3 VARCHAR(11) ); GO INSERT INTO MyTable VALUES ( 1, 'Jack', '555-55-5555' ); INSERT INTO MyTable VALUES ( 2, 'Joe', &am
    Raghav Khunger  · 1/13/2014  · 0  · 3219
    Sql sql-server
     /5
    Avg: 0 / 5 (0votes)
  • If you are facing 404 error while accessing iso extension file this blog will help you. You need to add following code in your web.config: <remove fileExtension=".iso" /> <mimeMap fileExtension=".iso" mimeType="application/octet-stream" /> Here is the location wehere to add the same:
    Raghav Khunger  · 1/12/2014  · 0  · 2736
    asp.net web.config mine-type
     /5
    Avg: 0 / 5 (0votes)
  • If you want to resize the hiberfil.sys on your machine running on Windows 7 you need to run following command: powercfg -h -size 50 Above 50 is the percentage by which you want to reduce
    Raghav Khunger  · 1/9/2014  · 1  · 2546
    windows-7 hibernate
     /5
    Avg: 0 / 5 (0votes)
  • Windows7: Enable Hibernation
    If you want to enable hibernation on your machine running on Windows 7 you need to run following command: powercfg -h on You can verify whether the above command was successfull or not by checking start menu. Hibernation option should be visible now.
    Raghav Khunger  · 1/9/2014  · 0  · 2390
    windows-7 hibernate
     /5
    Avg: 0 / 5 (0votes)
  • Windows7: Disable Hibernation
    If you want to disable hibernation on your machine running on Windows 7 you need to run following command: powercfg -h off You can verify whether the above command was successfull or not by checking start menu. Hibernation option should be gone now.
    Raghav Khunger  · 1/9/2014  · 0  · 2319
    windows-7 hibernate
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to replace single backslash with double backslash in a string with REGEX. Let's say we have a string "This is \ test \ string" and we want to replace single backslash with double backslash so that the output comes "This is \\ test \\ string". Below is the sample code to do the same: using System;
    Raghav Khunger  · 1/9/2014  · 0  · 3254
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to replace uppercase letter with "underscore and the letter "in a string with REGEX. Let's say we have a string "ThisIsTestString" and we want to replace uppercase letter with "underscore and the letter" so that the output comes "_This_Is_Test_String". Below is the sample code
    Raghav Khunger  · 1/9/2014  · 0  · 3137
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to replace underscores with hyphens in a string with REGEX. Let's say we have a string "This_is_test_string" and we want to replace underscores with hyphens so that the output comes "This-is-test-string". Below is the sample code to do the same: using System; using System.Linq; using System.Text.
    Raghav Khunger  · 1/9/2014  · 0  · 2460
    regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to get number only from a string with REGEX. Let's say we have a string "Hello 123456789 user 456 welcome." and we want the output to be "123456789456". Below is the sample code to do the same: using System; using System.Linq; using System.Text.RegularExpressions; namespace SampleConsoleApplicati
    Raghav Khunger  · 1/8/2014  · 0  · 2449
    regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to validate a string to allow alphanumeric characters only in a string with REGEX. Below is the sample code to do the same: using System; using System.Text.RegularExpressions; namespace SampleConsoleApplication { class Program { static void Main(string[] args) { Regex regex = new Regex("^[a-zA-Z0-9]*$"); //Fir
    Raghav Khunger  · 1/8/2014  · 0  · 2622
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to remove all non numeric characters from a string with REGEX. Let's say we have a string "(912)-555-7777" and remove all non numeric characters so that the string looks like "9125557777". Below is the sample code to do the same: using System; using System.Text.RegularExpressions; namespace Sampl
    Raghav Khunger  · 1/7/2014  · 0  · 2311
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to remove all non alpha numeric characters from a string with REGEX. Let's say we have a string "Hello!@#$123456789~~-_user456welcome" and remove all non alpha numeric characters so that the string looks like "Hello123456789user456welcome". Below is the sample code to do the same: using System; u
    Raghav Khunger  · 1/7/2014  · 0  · 3089
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to reverse all numbers in string with REGEX. Let's say we have a string "Hello 123456789 user 456 welcome." and we want to reverse it like "Hello 987654321 user 654 welcome.". Below is the sample code to do the same: using System; using System.Linq; using System.Text.RegularExpressions; namespace
    Raghav Khunger  · 1/6/2014  · 0  · 2172
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • I encountered a piece of code where regex replacement was done in the following way: Regex.Replace(@"\d+", m => new string(m.Value.Reverse().ToArray())); It was giving the following error: Can not access non-static method Replace in static context The issue with the above code was that the inputstring parameter was missing. The osl
    Raghav Khunger  · 1/6/2014  · 0  · 2545
    c# regex
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to replace multiple spaces with a single space with REGEX. Let's say we have a string "a b c d e f g" and we want to replace multiple spaces with a single space so that the output comes "a b c d e f g". Below is the sample code to do the same: using System; using System.Text.RegularExpressions; n
    Raghav Khunger  · 1/6/2014  · 0  · 2052
    regex
     /5
    Avg: 0 / 5 (0votes)
  • Plugin com.intellij failed to initialize and will be disabled: null
    I was getting the folowing screen while loading IntelliJ IDEA editor: Plugin com.intellij failed to initialize and will be disabled: null The solution for this issue was to set the JAVA_HOME path in Environment variables like below: For me the path was at following location C:\Program Files\Java\jdk1.7.0_25
    Raghav Khunger  · 1/5/2014  · 0  · 3034
    intellij-idea
     /5
    Avg: 0 / 5 (0votes)
  • In this blog I will show how to validate whether a string is a valid IP address not with REGEX. Below is the sample code to check the same: using System; using System.Text.RegularExpressions; namespace SampleConsoleApplication { class Program { static void Main(string[] args) { const string inputString = "192.168.1.1"; Regex regex = new R
    Raghav Khunger  · 1/3/2014  · 0  · 5233
     /5
    Avg: 0 / 5 (0votes)
  • Let's say we have a string and we want to match that string not containing a word say alpha . I have used Regex class in order to do so
    Raghav Khunger  · 1/3/2014  · 0  · 12749
    regex
     /5
    Avg: 0 / 5 (0votes)
  • I encountered with a piece of code today where anchor tag was having label tag inside it like this: <a href="/targeturl" class="no-underline"> <label> Dummy Text </label> </a> The issue with the above code was that the anchor click was not working in IE. The culprit for thi
    Raghav Khunger  · 1/2/2014  · 0  · 2725
    anchor
     /5
    Avg: 0 / 5 (0votes)
  • Page 1 of 1 (23 items)

Filter blogs

Top Producers

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?