Wednesday, April 11, 2012

Visual Studio shortcut for commenting program lines

Ctrl-K, Ctrl-C – Comments selected text

Ctrl-K, Ctrl-U – De-Comment selected text

Friday, January 20, 2012

Making mesh plot out of discrete points in Matlab

If you are wondering how to make a mesh plot out of discrete points, check out following link :
http://www.mathworks.se/help/techdoc/ref/triscatteredinterpclass.html

*Picture from Matlab website

Wednesday, January 11, 2012

Having two Excel 2010 files beside each other in Windows 7


Wanna have two Excel files beside each other and you can't get it done !!! Well remember you are using Microsoft products, so don't be surprised that they don't manage normally to let you have two windows beside each other. Well but there is a hard way to do this : 
  1. Open the first workbook any way you want. 
  2. Start a second instance of excel. either double click on shortcut to excel.exe on your desktop or through windows start button | run, then type: excel and hit enter. Then file|open the second workbook. 
  3. Now files are separated and you can have them beside each other ... Siiiiiigggggghhhhhhh :-S

Monday, November 28, 2011

Different editions of SQL 2008


Different editions of SQL Server 2008 :
  • Enterprise Edition
    Data management and business intelligence platform providing enterprise class scalability, high availability, and security for running business-critical applications
  • Standard Edition
    Data management and business intelligence platform providing ease of use and manageability for running departmental applications
  • Workgroup Edition
    Data management and reporting platform providing secure, remote synchronization, and management capabilities for running branch applications
  • Developer Edition
    May be installed and used by one user to design, develop, test, and demonstrate your programs on as many systems as needed
  • Web Edition
    A low-TCO, scalable, and manageable database option for web hosters and end customers looking to deploy publicly facing web applications and services
  • Express Edition (FREE)
    A free edition of SQL Server ideal for learning and building desktop and small server applications and for redistribution by ISVs
  • Compact Edition (FREE)
    A free, SQL Server embedded database ideal for building stand-alone and occasionally connected applications for mobile devices, desktops, and web clients
  • Evaluation Edition (Temporary FREE)
    This edition may be installed for demonstration and evaluation purposes until an expiration period of 180 days.

Tuesday, November 08, 2011

Next line in a cell in Excel


As it sounds very easy, but if you are visiting this page, you know it is not that easy as it sounds ;-) Usually in such cases Shift+Enter is the right combination, but strangely Microsoft use that for another operation in Excel and instead uses Alt + Enter. Hold Alt key down and press enter.

Wednesday, October 26, 2011

Thumbnails not showing on Windows Explorer, windows server 2008


  • Start button 
  • click Run
  • Enter SystemPropertiesPerformance
  • Click OK
  • Inside Performance Options window check the Show thumbnails instead of icons
You're done :-)

Photo Gallery Viewer on Windows Server 2008

If you are suffering lack of Photo Gallery Viewer after installing Windows Server 2008, then you need to read the following. It's easy to install this feature, and it can be easily done by installing the "Windows desktop experience" from the Server Manager -> Features -> Add Feature. This package includes the Windows Photo Gallery viewer as well.

Thursday, October 20, 2011

Enable Wireless Networking on MS Windows Server 2008


Start -> All Programs -> Administrative Tools -> Server Manager

Choose Features in Service Manger and then choose the check-mark beside Wireless LAN Service and click Next. Later you need to click install and you are done. Wireless networking is now installed on your Windows Server 2008.

OBS : Bear in mind that using wireless services is not as secure as cable and therefore deactivated.

Monday, October 17, 2011

Adding up all values in a column in Excel

To add up all the values from one Excel column in one cell, we only need to do this :


  • click on the cell
  • Write =SUM(COLUMN:COLUMN)
E.g. in following example it is =SUM(B:B), because my numbers are in column B.


Thursday, September 08, 2011

Changing the default font of a document at MS Word 2010


  1. Click on the expansion sign beside the Font panel on your tool bar.
  2. Choose your favorite font for this document and click OK for the changes to effect JUST this document, or Save it as default, for the changes to apply to all future documents.


Thursday, September 01, 2011

How to make a picture background transparent in GIMP


  1. Open the file
  2. Layer -> Transparency -> Add Alpha channel
  3. Choose Fuzzy Selector and try to remove the area you want to make transparent by selecting it and pressing DELETE button on keyboard or through the menu by clicking Edit -> Clear.
  4. Your image now is transparent in those areas that you have taken away.

Sunday, August 07, 2011

Error importing SQL database in Wordpress

If you get; CREATE TABLE IF NOT EXISTS ; error, when you try to import your SQL backup into your newly installed Wordpress, then you just need to export your database again(at your old PhpMyAdmin section) and while doing it, dont forget to tick DROP all WordPress tables, when you export your SQL database.

Restoring SQL database in your new wordpress

  1. You make a back up file of your SQL database from your Cpanel -> PhpMyAdmin -> Export*** You need to DROP all WordPress tables in your database to make room for the restore(This is a check box when you are exporting your DB).
  2. You upload the file in your new hosting plan/new website on your Cpanel -> PhpMyAdmin -> Import
  3. Blank page ??? Check your themes. Faulty theme can cause blank page. Try changing to another theme.

Tuesday, May 24, 2011

Disable Taskbar Thumbnail Preview in Windows 7; HOWTO

1. Start button -> type on search bar gpedit.msc & Enter
2. Go to User Configuration, Administrative Templates, and Start Menu and Taskbar
3. Fina “Turn off Taskbar Thumbnails” and open it.
4. Select Disable from the opened window
5. Done :-)

Tuesday, April 19, 2011

start jFrame in the center of the screen


// Get the size of the screen
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    
    // Determine the new location of the window
    int w = window.getSize().width;
    int h = window.getSize().height;
    int x = (dim.width-w)/2;
    int y = (dim.height-h)/2;
    
    // Move the window
    window.setLocation(x, y);

Monday, April 18, 2011

Integrating power of Java & Processing :-)

In the following link you can find how to import processing libraries to a Java class where you can combine the power of Java with the flexibility of Processing and make miracles ;-)

http://processing.org/learning/eclipse/

Source : Processing.org

Saturday, March 12, 2011

"Fatal error: Call to undefined function" after automatic upgrade in Wordpress

"Fatal error: Call to undefined function" is always a sign of an incomplete upgrade, where not all the files got upgraded.

Thursday, March 10, 2011

Live USB of different Linux distributions in Windows, HOWTO

Universal USB Installer, is a very easy tool to do this. Manual :

  1. Insert a USB stick with at least 2GB of free space
  2. (Optional) You can download the iso file of the Linux distro that you want to have it on your USB / The download can be done through the Universal USB Installer later as well.
  3. Download the Universal USB Installer (Both Download link & user manual)
  4. Select the desired Linux distro from the dropdown list
  5. Click 'Browse' and open the downloaded ISO file/ OR simly download it by clicking on the "Download iso(optional)"
  6. Choose the USB drive and click 'Create'

    Thursday, March 03, 2011

    Android & WiFi information, Wifimanager + Wifiinfo

    For having access to the WiFi connection, you can use the WifiManager and WifiInfo classes in Android SDK. The following code can show you how you can do get access to things like your IP address, the connected network name or the available networks around you :

            WifiManager myWifiMananger = (WifiManager) getSystemService(WIFI_SERVICE);
    
            WifiInfo myNetInfo = myWifiMananger.getConnectionInfo();
    
            showIp.append(changeIp(myNetInfo.getIpAddress()) + " \n");
    
            showIp.append(myNetInfo.getSSID() + " ");
    
            List<ScanResult> scanList = myWifiMananger.getScanResults();
    
            for(ScanResult element : scanList){
    
             showIp.append(element.SSID + " Level: " + element.level + " freq : " + element.frequency + " Cap: " + element.capabilities + "\n");
    
            }
    //DONT forget that the getIpAddress returns an int value. Convert it to string :
    public String changeIp(int ipAddress){
    
         return String.format("%d.%d.%d.%d",
    
           (ipAddress & 0xff),
    
           (ipAddress >> 8 & 0xff),
    
           (ipAddress >> 16 & 0xff),
    
           (ipAddress >> 24 & 0xff));
    
        }
    
    
    

    *** VERY IMPORTANT : To use this you need to add couple of lines to android manifest(XML file -> AndroidManifest.xml).

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    
      <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />