Rss Feed Like Us on facebook Google Plus

November 5, 2014

Bypass the runonce web page to save Internet Explorer settings

IE7 changes my home page to http://go.microsoft.com/fwlink/?LinkId=74005


Solution 1 :
If Below Registry Exists then Change Values for these Registries to 1

KeyName: RunOnceHasShown
KeyType: REG_DWORD
KeyValue: 1


KeyName: RunOnceComplete
KeyType: REG_DWORD
KeyValue: 1


Solution 2 :
If Registry not Exists then Create these registries with same above configuration.

Problem Summary :
After installing Internet Explorer 7 all users are supposed to save their settings, the IE automatically redirects the page to "http://go.microsoft.com/fwlink/?LinkId=74005" which redirects to "http://runonce.msn.com/runonce2.aspx" till the user saves the settings to set their preferences such as the default search engine, whether turn on automatic Phishing Filter, language settings and so on.

If the customer does not want to be auto-directed to this web page, then they need to follow the below steps. Two values should be added/modified in the registry, so that IE 7 will go to the home page instead of the external link above:

1. Goto Run and Type regedit and press Enter.
2. Go to registry key:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
3. Right-click this key and select New -> DWORD Value.
4. On the right pane, create the new value to RunOnceComplete.
5. Right-click RunOnceComplete and click “Modify” and set the value data to 1.
6. Repeat Step 3 to Step 5 to create/modify the value name RunOnceHasShown and set the value data to 1.
7. Restart the IE 7 to see if it still visits the Save settings web site.

If you are familiar with using .REG files, then you can use what’s below to create one and use:

Windows Registry Editor Version 5.00


[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"RunOnceComplete"=dword:00000001
"RunOnceHasShown"=dword:00000001

Note: IE7 will query the two values RunOnceComplete and RunOnceHasShown every time it starts. If these values have been set as depicted above, IE will visit the home page set in the IE control panel.
Read More

November 3, 2014

How to change password of wi-fi Router

  • Open Internet Explorer and type the 192.168.2.1 (Router Default IP)  and press enter.
  • You will be prompted to login panel, use admin as username and password:
 

After Login Router DashBoard will open
  •  Go to Wireless Tab and then wireless security under wireless.
     

  • After changing password click on Save Settings and after that it will prompt Settings Saved Successfully and then close the browser. your password has been changed
Read More

October 8, 2014

Outlook attachment is not open. Error: Permission not defined

Solution


Outlook 2003
If you are using Outlook 2003, follow these steps:
  1. Click My Computer, and then double-click drive C.
  2. On the File menu, click New, and then click Folder.
  3. Name the folder temp0.
  4. Click Start, click Run, type regedit, and then click OK.
  5. Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security\
  1. In the right pane, double-click OutlookSecureTempFolder.
  2. In the Value Data field, type C:\temp0\ and then click OK.
  3. Exit Registry Editor.
  4. Restart the computer.
Outlook 2007
If you are using Outlook 2003, follow these steps:
  1. Click My Computer, and then double-click drive C.
  2. On the File menu, click New, and then click Folder.
  3. Name the folder temp0.
  4. Click Start, click Run, type regedit, and then click OK.
  5. Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security\
  1. In the right pane, double-click OutlookSecureTempFolder.
  2. In the Value Data field, type C:\temp0\ (Directory Which is created) and then click OK.
  3. Exit Registry Editor.
  4. Restart the computer.
Outlook 2010 
If you are using Outlook 2010, follow these steps:
  1. Click My Computer, and then double-click drive C.
  2. On the File menu, click New, and then click Folder.
  3. Name the folder temp0.
  4. Click Start, click Run, type regedit, and then click OK.
  5. Locate and then click the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\
  1. In the right pane, double-click OutlookSecureTempFolder.
  2. In the Value Data field, type C:\temp0\ and then click OK.
  3. Exit Registry Editor.
  4. Restart the computer.
Read More

September 16, 2014

Get Mobile Number of Sim Card on Android Device

You can use the TelephonyManager to do this:
TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); 
String number = tm.getLine1Number();
The documentation for getLine1Number() says this method will return null if the number is "unavailable", but it does not say when the number might be unavailable.
You'll need to give your application permission to make this query by adding the following to your Manifest:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
(You shouldn't use TelephonyManager.getDefault() to get the TelephonyManager as that is a private undocumented API call and may change in future.)





Example

Activity Class Look Like This

Class
GetMyPhoneNoActivity 
package com.kns;
 
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Toast;
 
public class GetMyPhoneNoActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);        
    
        String number =getMyPhoneNO();
        Toast.makeText(getApplicationContext(), "My Phone No is: "
        +number, Toast.LENGTH_SHORT).show();
        Log.v("Debug", number);        
    }
    
    private String getMyPhoneNO(){
     TelephonyManager mTelephonyMgr;  
     mTelephonyMgr = (TelephonyManager) getSystemService
       (Context.TELEPHONY_SERVICE);   
 
     String yourNumber = mTelephonyMgr.getLine1Number();
  return yourNumber; 
    }     
}

Permission in Manifest File
<uses-permission android:name="android.permission.READ_PHONE_STATE">
</uses-permission>


Read More

August 1, 2014

Recover SQL Server Database from Suspect Mode

If your Database goes to Suspected Mode you can try below queries to retrieve the database in normal mode.

Reason for database to go into suspect mode:
1.    Data files or log files are corrupt.
2.    Database server was shut down improperly
3.    Lack of Disk Space
4.    SQL cannot complete a rollback or roll forward operation.

  1. Open SQL Server Management Studio 
  2. Open new query window and execute some queries:

    • use master
    • Alter Database TestDataBase Set Emergency
    • ALTER DATABASE TestDataBase  SET SINGLE_USER
    • DBCC CHECKDB (TestDataBase , REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;
    • ALTER DATABASE TestDataBase SET MULTI_USER
    • ALTER DATABASE TestDataBase SET ONLINE
    • SELECT STATE_DESC FROM SYS.DATABASES WHERE NAME='TestDataBase'
  3. If all queries executed successfully, then database is recovered from suspected mode (some data may be loss after completion of this process. Ask the store to do PI after this process.).
Refresh your database server and verify the connectivity of your database. Now users should be able to connect to the database properly.

Read More

July 28, 2014

Ways to bring positivity in life

मुश्किलें उतनी ही बड़ी होती हैं, जितना आप सोचते हैं। कहते हैं आपकी सोच ही आपको कामयाब या नाकामयाब बनाती है। जिस व्‍यक्ति की सोच सकारात्‍मक होती है, उसके लिए कोई भी चुनौती बड़ी नहीं होती। वह जीवन के कठिन से कठिन हालात का सामना आसानी से कर सकता है। लेकिन, जिस व्‍यक्ति की सोच ऐसी नहीं होती, उसके लिए हर समस्‍या बड़ी होती है।

ध्यान:



ध्‍यान की महत्‍ता को अब वैज्ञानिक भी स्‍वीकार करते हैं। ऐसा माना जाता है कि जब आप ध्‍यान करते हैं तो आपका मस्तिष्‍क किसी एक विचार पर केंद्रित हो जाता है। ऐसे में उसमें से जो ऊर्जा निकलती है वह उसे मजबूत बनाती है। इससे इनसान जीवन की मुश्किल से मुश्किल परिस्थितियों का सामना करने के लिए तैयार होता है। दिन मं कम से कम 20 मिनट ध्‍यान जरूर लगाएं। किसी अंधेरे कमरे में ध्‍यान लगाने से आपको एकाग्र होने में आसानी होगी। दिमाग से सारे विचार निकाल दें। शुरुआत में यह प्रक्रिया मुश्किल लगेगी पर अभ्यास से यह काफी आसान हो जाएगा।

positive thinking:अपने व्‍यवहार पर रखें काबू



अपने आप से वादा करें कि आप नकारात्‍मक नहीं सोचेंगे। आपकी यही सोच आपको सकारात्‍मक बनाने में मदद करेगी। जिंदगी को देखने का आपका नजरिया ही आपको कामयाब बना सकता है। याद रखिये, अपनी जिंदगी के मालिक आप हैं, किसी दूसरे व्‍‍यक्ति को इसे चलाने का मौका और अधिकार न दें। ऐसा करना आपके लिए नुकसानदेह हो सकता है। अपनी जिंदगी से जुड़े सभी अहम फैसलों का हक आपको है और यह हक किसी दूसरे को न दें।

लक्ष्य पर टिके रहें:



जो आपको पसंद हो, वही आपका लक्ष्‍य होना चाहिए। अपने लक्ष्‍य पर टिके रहें ओर खुद पर विश्‍वास रखें। मुश्किलों से डर कर न तो अपना लक्ष्‍य बदलें और न ही हिम्‍मत हारें। खुले दिमाग और आशावादी सोच से आगे बढ़ते है, तो आपके कामयाब होने की संभावनाएं बढ़ जाती हैं। कड़ी मेहनत कर आगे बढ़ते रहें, आपके जीवन में सफलता जरूर आएगी। हर छोटे या बड़े लक्ष्य को पाने के बाद आपमें अपनी क्षमता को लेकर आत्मविश्वास आएगा।



positivity:खुद से पूछें सवाल



इनसान आसानी से बदलावों को स्‍वीकार नहीं करता। वह हर बदलाव पर सवाल उठाता है। अपने आप से पूछें आखिर आपके प्रतिरोध का मकसद क्‍या है, तो आपकी समझ में आएगा कि आखिर मुश्किल इतनी बड़ी है, जितनी आप सोच रहे हैं। यह सवाल उठाना आपके रक्षात्‍मक स्‍वभाव को कम करेगा। इससे आप कामयाबी के लिए नयी संभावनाओं को देख पाएंगे। आपको यह ध्यान रखना चाहिए कि सकारात्मक सोच सकारात्मकता लाती है जबकि प्रतिकूल सोच रखने वाले नकारात्मकता को अपने पास बुलाते हैं।

सकारात्मक लोगों से मिलें:



ऐसे लोगों से मिलें जिनकी सोच सकारात्‍मक हो। सकारात्मक विचारधारा वाले व्यक्तियों से मिलने से आपकी सोच और उद्देश्य भी सकारात्मक होंगे। और आप भी सकारात्‍मक तरीके से उन पर आगे बढ़ सकेंगे। नकारात्मक सोच रखने वाले लोग आपकी जिंदगी से सकारात्मकता को निकाल देते हैं वे लोग आपको भी नकारात्‍मक बना सकते हैं। हर व्‍यक्ति की अपनी तरंगें होती हैं, ऐसे लोगों के साथ रहें, जो आपको सकारात्‍मक तरंगे देते हों। कुछ ही दिनों में आपको अपने भीतर एक बदलाव महसूस होगा।
Read More

July 12, 2014

Detach, Attach and Restore the Database with Transact-SQL

Detach, Attach and Restore The Database with Transact-SQL using a test Database. Here i'm using 'MyDataBase' as Test DB.

Prerequisites

  • The database must first be detached. Attempting to attach a database that has not been detached will return an error.
  • When you attach a database, all data files (MDF and LDF files) must be available. If any data file has a different path from when the database was first created or last attached, you must specify the current path of the file.
  • When you attach a database, if MDF and LDF files are located in different directories and one of the paths includes \\?\GlobalRoot, the operation will fail.

Detach The Database

USE master
EXEC sp_detach_db 'MyDataBase', 'true';

Attach The Database

USE master
CREATE DATABASE MyDataBase
ON 
(FILENAME = 'D:\DataBase\MyDataBase.mdf'), -- Location where to store Data File
(FILENAME = 'D:\DataBase\MyDataBase_log.ldf') -- Location where to store Log File
FOR ATTACH;

Restore The DataBase (.Bak File)

USE master
RESTORE DATABASE MyDataBase
FROM DISK = 'D:\DATABASE\MyDataBase'  -- Location where Bak file resides
WITH 
MOVE 'MyDataBase(ThisFashion)_Data' TO 'D:\DataBase\MyDataBase.mdf'  -- Location where to store Data File
MOVE 'MyDataBase(ThisFashion)_Log' TO 'D:\DataBase\MyDataBase_log.ldf'  -- Location where to store Log File


Read More

June 19, 2014

Accordion with Jquery Toggle

Accordion Displays Collapsible Content on very less space. I am going to give a demo of  accordion using JQuery Toggle.

You can achieve this also by using bootstrap. to see an advance version you can checkout CSS Tricks Website.


DEMO


Lorem Ipsum 1+
Lorem Ipsum 2+
Lorem Ipsum 3+

Code

<html>
<head>
<style>
.accordion_container {
    width: 500px;
}
.accordion_head
{
    background: linear-gradient(0deg, #F79711, #DC7E03) repeat scroll 0 0 #D07906;
    color: white;
    cursor: pointer;
    font-family: segoe ui;
    font-size: 15px;
    margin: 0 0 1px 0;
    padding: 7px 11px;
    font-weight: bold;
    background-color: #D07906;
}
 
.accordion_body h3
{
    background-color: #CCCCCC;
    font-size: 20px;
    font-variant: small-caps;
    margin: 0;
    padding: 5px;
}
.accordion_body a.anchorButton
{
    font-size: 14px;
    padding: 2px 15px;
    float: right;
    width: auto;
    height: auto;
}
.accordion_body
{
    background: #f1f1f1;
}
.accordion_body p
{
    padding: 8px;
    margin: 0px;
}
.plusminus
{
    float: right;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    //toggle the componenet with class accordion_body
    $(".accordion_head").click(function(){
        if ($('.accordion_body').is(':visible')) {
            $(".accordion_body").slideUp(600);
            $(".plusminus").text('+');
        }
        $(this).next(".accordion_body").slideDown(600);
        $(this).children(".plusminus").text('-');
    });
});
</script>
</head>
    <div class="accordion_container">
        <div class="accordion_head">Lorem Ipsum 1<span class="plusminus">+</span></div>
            <div class="accordion_body" style="display: none;">
            <p>Lorem Ipsum 1 is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p>
            </div>
        <div class="accordion_head">Lorem Ipsum 2<span class="plusminus">+</span></div>
            <div class="accordion_body" style="display: none;">
            <p>Lorem Ipsum 2 .It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
            </div>
        <div class="accordion_head">Lorem Ipsum 3<span class="plusminus">+</span></div>
            <div class="accordion_body" style="display: none;">
            <p>Lorem Ipsum 3 is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.   </p>
            </div>
 
    </div>
</html>


Read More

June 16, 2014

Remove HTML Tags from a String of HTML using C#

When a String contains HTML tags (may be using CKEditor) and want to display HTML string as Plain Text. You can achieve by using Regular Expression..

string noHTML = Regex.Replace(inputHTML, @"<[^>]+>|&nbsp;", "").Trim();
string noHTMLNormalised = Regex.Replace(noHTML, @"\s{2,}", " ");

Note : A Regex cannot handle all HTML documents. An iterative solution, with a for-loop, may be best in many cases: always test methods.

Alternative

    public static class HtmlRemoval
    {
        /// <summary>
        /// Remove HTML from string with Regex.
        /// </summary>
        public static string StripTagsRegex(string source)
        {
            return Regex.Replace(source, "<.*?>", string.Empty);
        }
 
        /// <summary>
        /// Compiled regular expression for performance.
        /// </summary>
        static Regex _htmlRegex = new Regex("<.*?>", RegexOptions.Compiled);
 
        /// <summary>
        /// Remove HTML from string with compiled Regex.
        /// </summary>
        public static string StripTagsRegexCompiled(string source)
        {
            return _htmlRegex.Replace(source, string.Empty);
        }
 
        /// <summary>
        /// Remove HTML tags from string using char array.
        /// </summary>
        public static string StripTagsCharArray(string source)
        {
            char[] array = new char[source.Length];
            int arrayIndex = 0;
            bool inside = false;
 
            for (int i = 0; i < source.Length; i++)
            {
                char let = source[i];
                if (let == '<')
                {
                    inside = true;
                    continue;
                }
                if (let == '>')
                {
                    inside = false;
                    continue;
                }
                if (!inside)
                {
                    array[arrayIndex] = let;
                    arrayIndex++;
                }
            }
            return new string(array, 0, arrayIndex);
        }
    }
Read More

May 26, 2014

Can’t Create File In The C Drive Root Directory – Windows

PROBLEM : while developing a java application or any windows application,writes a program to create a file in c drive but getting an error "Access Denied"Try to create an empty file in the C drive root directory manually, but no options to create any files, only new folder is allowed, although The logged in user is under administrator group.

SOLUTION


In Windows 7 or 8 (may be Vista), users (even administrators) are not allowed to create files in the C drive root directory, otherwise, an error message like “A required privilege is not held by the client” or  “access is denied” will be prompted.
To fix it, just turn off the User Account Control (UAC). In Windows 8, do not turn off the UAC via control panel, it must go through the registry.
  1. Press keys “Windows Key + R”, type regedit
  2. Locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA
  3. Update the EnableLUA value to 0 (turn if off)
  4. Restart Windows.


Alternatively
1. Go to control panel >> user accounts >> user account control settings >> set to never notify


2. If you think it’s not safe to turn off the UAC feature, then create a new folder under the C drive root directory and put the file inside.
C:\folder\your-file.txt - OK
C:\your-file.txt - NOT OK


 
Read More

© 2011-2016 Techimpulsion All Rights Reserved.


The content is copyrighted to Tech Impulsion and may not be reproduced on other websites.