Tuesday, October 29, 2013

How to setup A FTP Server On Windows 8 And Windows 8.1

This step-by-step guide shows how to set up FTP server on Windows 8 or Windows 8.1 without installing any third-party software or tools

  1. Open the ‘Control Panel‘ and click on ‘Programs and Features’-Click on ‘Turn Windows features on or off”.
  2. Look for ‘Internet Information Services‘ and activate the check boxes ‘FTP Extensibility‘ and ‘FTP Service‘ and WWW services and press ‘OK‘.
  3. Go back to the ‘Control panel‘ and click on ‘Administrative tools‘. Double-click ‘Internet Information Services (IIS) Manager‘. 
  4. In the freshly opened windows make a left-click on ‘Sites‘, follow by and right-click. Then choose ‘Add FTP Site…‘.Add a name for your FTP server like ‘My FTP‘ and select a physical path for your server. This will be the default directory to access your FTP server.For a common FTP server choose the folder E:\FTP server. Click ‘Next‘.
  5. In the next step select your Window PC’s FIXED IP address (Look for your IP address in your router setting. Fix the IP address there). Choose ‘No SSL‘ (If you do have an SSL certificate, you can choose either ‘Require SSL‘ or ‘Allow SSL‘.) and press ‘Next‘. Note: For security reasons be aware to require SSL, if you intend to make this FTP server accessible via the Internet!
  6. Choose ‘Authentication Basic’ (require’s that the FTP users specify a login ID and password). For a common FTP server create a local user account and give it permission on the FTP content directory. If you prefer to use an already existing local computer user account instead of creating a new one, you can skip this step and you can directly assign permissions to the folder:
  7. For your private cloud (access to your local files) select ‘Allow access to‘: ’All users‘ for general access of all users of your PC or ’specified users‘ for dedicated users, select ‘Read‘ and ‘Write‘. Click on ‘Finish‘.
  8. Now your ‘My FTP’ built-in Windows 8 / 8.1 FTP server is set up. Click on ‘Start‘ to get it running. Note: If another FTP server is already running you first have to stop it and then start ‘My FTP‘ FTP server.
  9. If after starting FTP service it does not work then check following
    • Check firewall. Disable it if you care less about security or allow FTP server in exceptions.
    • Check FTP-Authorization rules in Windows 8 / Windows 8.1
    • Check FTP-Authentication in Windows 8 / Windows 8.1

Friday, October 25, 2013

How to enable Windows device driver debug logs

Different options to enable Windows Device Driver Installation Logs

Option1: Enable setupapi.dev.log

In Windows 7 the log level is set in the registry at HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel. The key may not exits and you may have to create it. The default on my computer turned out to be 0x2000ff00, which means maximal logging is achieved. 
On Windows 7, the file is C:\Windows\inf\setupapi.dev.log which can look like this when an successful driver is installed. The helpful information here is mostly which parts of the INF file were read and interpreted, and what was actually installed.
 dvi:                {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 23:23:08.208
 ndv:                Device install status=0x00000000
 ndv:                Performing device install final cleanup...
 ndv:           {Core Device Install - exit(0x00000000)} 23:23:08.208
 ump:           Server install process exited with code 0x00000000 23:23:08.224
 ump:      {Plug and Play Service: Device Install exit(00000000)}
 dvi:           No class installer for 'Xillybus driver for generic FPGA interface'
 dvi:           No CoInstallers found
 dvi:           Default installer: Enter 23:23:08.239
 dvi:           Default installer: Exit
 dvi:      {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 23:23:08.239
 ndv: {Update Driver Software Wizard exit(00000000)}
<<<  Section end 2012/02/08 23:23:11.281
<<<  [Exit status: SUCCESS

When an unknown PCI device is detected by the system:

     dvi:           {Select Best Driver}
!    dvi:                Selecting driver failed(0xe0000228)
     dvi:           {Select Best Driver - exit(0xe0000228)}
!    dvi:      Default installer: failed!
!    dvi:      Error 0xe0000228: There are no compatible drivers for this device.
     dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 20:55:17.716
     ndv: {Core Device Install} 20:55:17.716
!    ndv:      Installing NULL driver!
     dvi:      Set selected driver complete.
     dvi:      {DIF_ALLOW_INSTALL} 20:55:17.716
     dvi:           No class installer for 'PCI Device'
     dvi:           Default installer: Enter 20:55:17.716
     dvi:           Default installer: Exit
     dvi:      {DIF_ALLOW_INSTALL - exit(0xe000020e)} 20:55:17.716
     dvi:      {DIF_INSTALLDEVICE} 20:55:17.716
     dvi:           No class installer for 'PCI Device'
     dvi:           Default installer: Enter 20:55:17.716
!    dvi:                Installing NULL driver!
     dvi:                Writing common driver property settings.
     dvi:                {Restarting Devices} 20:55:17.736
     dvi:                     Restart: PCI\VEN_10EE&DEV_EBEB&SUBSYS_EBEB10EE&REV_00\4&27574D66&0&0008
     dvi:                     Restart complete.
     dvi:                {Restarting Devices exit} 20:55:17.906
     dvi:           Default installer: Exit
     dvi:      {DIF_INSTALLDEVICE - exit(0x00000000)} 20:55:17.906
     ndv:      Device install status=0xe0000203
     ndv:      Performing device install final cleanup...
!    ndv:      Queueing up error report since device installation failed...
     ndv: {Core Device Install - exit(0xe0000203)} 20:55:17.906
     ump: Server install process exited with code 0xe0000203 20:55:17.916
<<<  Section end 2012/02/08 20:55:17.916
<<<  [Exit status: FAILURE(0xe0000203)]
Need More details, refer here - http://msdn.microsoft.com/en-us/library/gg675585(v=winembedded.60).aspx


Option 2: If a driver is installer using Driver Package Installer (DPInst)

Some drivers use DPInst package to install the windows driver.  You can find the corresponding logs here
DPInst logs high-level installation information and error messages in a log file (%SystemRoot%\DPINST.LOG). The DPInst log file is a plain-text file that you can use to troubleshoot DPInst driver installation.

Read more here http://msdn.microsoft.com/en-us/library/windows/hardware/ff544842(v=vs.85).aspx

Option # 3: Intel driver installation logs

By default all Intel devices driver installation logging is stored at C:\Intel\Logs.
This is very useful if you are looking at install issues related to Intel Graphics, USB andIntel wifi driver install issues.

Thursday, October 10, 2013

How to use TwitterR Package to get twitter data.

I did this on my windows machine using R version 3.0.2 and Rstudio 0.98.

Open R studio and Installer twitterR

#install and load the necessary packages
#necessary step for Windows
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
#to get your consumerKey and consumerSecret Login to your twitter account(dev.twitter.com), create an app and go to app settings and not down the consumer key and ConsumerSecretKey
cred <- OAuthFactory$new(consumerKey='XXX',
#necessary step for Windows

# copy the URL and paste in browser- accept the authentication and put the PIN here.
#save for later use for Windows
save(cred, file="twitter authentication.Rdata")
##the cainfo parameter is necessary on Windows
s=searchTwitter('GOOG',cainfo="cacert.pem") s[[1]] me <- getUser("manjeetjakhar", cainfo="cacert.pem") me$getId() me$getFriends(n=6, cainfo="cacert.pem") #get six friend list m_tweets=userTimeline('manjeetjakhar',n=6,cainfo="cacert.pem") #look in to users tweet m_tweets

#create Corpus on Windows
r_stats<- searchTwitter("#Rstats", n=1500, cainfo="cacert.pem")

#save text
r_stats_text <- sapply(r_stats, function(x) x$getText())
#create corpus
r_stats_text_corpus <- Corpus(VectorSource(r_stats_text))
#clean up
r_stats_text_corpus <- tm_map(r_stats_text_corpus, tolower)
r_stats_text_corpus <- tm_map(r_stats_text_corpus, removePunctuation)
r_stats_text_corpus <- tm_map(r_stats_text_corpus, function(x)removeWords(x,stopwords()))


#you can also see what's trending
trend <- availableTrendLocations(cainfo="cacert.pem")

## Use tm (text mining) package
# build a corpus
mydata.corpus <- Corpus(VectorSource(mydata.vectors))
# make each letter lowercase
mydata.corpus <- tm_map(mydata.corpus, tolower)
# remove punctuation
mydata.corpus <- tm_map(mydata.corpus, removePunctuation)
# remove generic and custom stopwords
my_stopwords <- c(stopwords('english'), 'prolife', 'prochoice')
mydata.corpus <- tm_map(mydata.corpus, removeWords, my_stopwords)
# build a term-document matrix
mydata.dtm <- TermDocumentMatrix(mydata.corpus)
# inspect the document-term matrix
# inspect most popular words

findFreqTerms(mydata.dtm, lowfreq=30)