Posts

Compare two files with PSPad

Image
You can go to http://www.pspad.com/en/download.php and download PSPad text editor. To get the difference between two text files open PSPad editor. Then go to Tools menu and select Text Differences then select first option that is Text Diff with This File...

Input string was not in a correct format in ASP.NET/C#

Image
ERROR:   Server Error in '/' Application. Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 31:         int ppi = Convert.ToInt32(Text1.Text); SOLUTION: I tried to change int ppi = Convert.ToInt32(Text1.Text); statement to int ppi = int.Parse(Text1.Text); and int ppi = Int32.Parse(Text1.Text); and int ppi = Int16.Parse(Text1.Text); but it didn't work. The reason was I was using a float value and parsing into an integer one, so I change the erroneous statement to the following, and it worked: float ppi =  float.Parse(Text1.Text);

Data analysis not available in Excel

Image
If you are using MS Excel version older than 2016 and if Data analysis option is not available in Analysis section under Data tab then follow the instructions below. Data analysis option is not available. Go to File menu > Options > Add-Ins > Select "Excel Add-ins" in Manage drop-down list that is located at the end of the window and hit go. Then select Analysis ToolPak and click OK it will add Data Analysis option under Analysis group in Data tab. This is how it looks like after enabling the add-in.

R: 'file' must be a character string or connection

Image
I was using the Shiny app in R , and I was trying to read a file using fileInput control, but I faced the following error:   Listening on http://127.0.0.1:3558 Error in read.table(file = file, header = header, sep = sep, quote = quote,  :   'file' must be a character string or connection Problem code: if(is.null(input$file1))       return(NULL)  file <- read.csv(file=input$file1,head=TRUE,sep=",", stringsAsFactors=FALSE) csv <- str(file) Solution: inFile <- input$file1 if (is.null(inFile))       return(NULL)     csv <- read.csv(inFile $datapath , header=TRUE, sep=",") The resolution was to use the datapath property of the input file and not the file itself.

IP Info [version 1.15.12.29]

Image
This tiny utility shows you public and private IP as soon as you open it so you don't need to go to any website such as whatismyip.com to find your current Public IP Address. Size: IP info.zip --> 3.94 KB IP info.exe --> 9.50 KB Download links: 1. Google Drive: https://drive.google.com/file/d/0B_HnjRcH9aTpQmNGUmw3cU5RQ2s/view?usp=sharing 2. MediaFire: http://www.mediafire.com/download/c1zn8yyh7zfsn3w/IP_info.zip 3. Kickass Torrents: https://kat.cr/ip-info-zip-t11825063.html This is a small Windows utility that shows your public and private IP address the moment you open it, so you do not have to visit a site such as whatismyip to look it up. A tiny local tool like this is convenient for quick network checks. As with any downloaded executable, run it only if you trust the source.

Introduction to R (Download PDF)

Image
Download Link: https://drive.google.com/file/d/0B_HnjRcH9aTpNG10ME1raW0zdTA/view?usp=sharing (Click this link to download pdf) This PDF is a part of Introduction to R workshop conducted by Chris Bruno , Dason Kurkiewicz and Adam Loy from Department of Statistics, IOWA State University on 15 July 2010. Reference: http://streaming.stat.iastate.edu/workshops/r-intro/ Breakdown of chapters is as following: 1. Introduction 2. Data Management 3. Graphics 4. Models 5. Programming 6. Advanced Manipulations Reference: http://streaming.stat.iastate.edu/workshops/r-intro/lectures/ This post shares a downloadable PDF introduction to R from a statistics workshop, aimed at newcomers to the language. R is a free environment widely used for statistics, data analysis, and graphics. A guided introduction like this is a good starting point before moving on to packages such as ggplot2 and dplyr for visualization and data wrangling.

Plot histogram in RStudio using Shiny

Image
CODE: # '#' denotes a comment # install.packages("UsingR") uncomment if package is not installed library (UsingR) # install.packages("shiny") uncomment if package is not installed library (shiny) # install.packages("Hmisc") uncomment if package is not installed library (Hmisc) # install.packages("corrplot") uncomment if package is not installed library (corrplot) # getwd() gives the current directory where R looks up for files wd <- getwd() setwd(wd)