Tuesday, January 1, 2019

DiskPart Recovering SD card

My problem:
Tried installing Raspberian into 32 GB SD card. The file system went corrupt-somehow. Could not recover the other big part in windows because windows system.
The diskmanagement system showed the 30GB space in dark, which could not be accessed by simple formatting or change of the drive letter.

So, I had to go commando.
Went to the command mode.
Windows> CMD (admin mode)
Then executed the following codes...

Now I can see the whole SD card space!


Microsoft DiskPart version 10.0.ccc

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: xxx

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          476 GB      0 B        *
  Disk 1    Online          476 GB      0 B        *
  Disk 2    Online           29 GB    26 GB

DISKPART> select disk 2

Disk 2 is now the selected disk.


DiskPart succeeded in cleaning the disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> (then formatted the disk)

Friday, September 1, 2017

Change Printers Default Single Sided Setting #mac

 Well, there is an easy way...
This prompted me to do
cupsctl WebInterface=yes
to the terminal... which enabled opening up the printer options... then I could set up the duplex printing.
Went to
Then, I had to select "Two-sided, Long-edge binding".

This enabled printing on both sides.

Friday, July 21, 2017

Plot USA m_maps

  close all
 load coastlines
states = shaperead('usastatehi',...
        'UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
m_proj('miller','long',[-125 -67],'lat',[25 49.5]);
% m_gshhs_i('color','b');
% m_grid('box','fancy','tickdir','in');
m_coord('geographic');           % Switch to assuming geographic
% m_coast('patch',[1 1 0.99],'edgecolor','b');
  m_coast('patch',[.98 0.98 .98],'edgecolor','none');
    m_grid('box','fancy','linestyle','none','backcolor',[.8 .96 1]);
m_text(-121,38.08,  '*' ,'color','r','fontweight','bold','fontsize',24); % Tahoe
m_text(-116.8,33.03,  '*' ,'color','r','fontweight','bold','fontsize',24); % salton Sea

m_text( -77.8729,40.2547,  '*' ,'color','r','fontweight','bold','fontsize',24); % PSU
m_text( -89.9729,33.9,  '*' ,'color','r','fontweight','bold','fontsize',24); % GWN
m_text(-97.62,43.3,  '*' ,'color','r','fontweight','bold','fontsize',24); % SXF
m_text(-89.37,40.,  '*' ,'color','r','fontweight','bold','fontsize',24); % BND

for kk = 1:length(states)
m_line(states(kk).Lon,states(kk).Lat,'linewi',0.5,'color',[200 200 200]./255);

export_fig([ saveDir,  'USA_validationPoints'],'-png','-r250')

Wednesday, May 31, 2017

From Google Fusion table to Google Earth Engine!

First I made a Google Fusion table with few points with Latitue and Logitude geo-coded Names.
Then imported into fusion table

// import the fusion table
var Da = ee.FeatureCollection('ft:18RyzwhfBU0TVFa4HWFEp778Tkd9YV-X1pE_Q1hq6').geometry();

// Set center of map
Map.centerObject(Da, 6);

// show the layer
The cryptic code in the FeatureCollection is the ID of the fusion table.

See an example here

Tuesday, September 13, 2016

Insert degree symbol in MS word

Note to self:
  1. Press and hold "Ctrl"
  2. Press and hold "Shift"
  3. Press "@"
  4. Release "Ctrl", "Shift"
  5. Press "Space Bar"

Wednesday, July 13, 2016

installing #altair #python #conda

>conda install altair --channel conda-forge

The following packages will be downloaded:

    package                    |            build
    conda-4.1.8                |           py35_0         247 KB
    pandas-0.18.1              |      np110py35_0         6.9 MB  conda-forge
    vega-0.4.1                 |           py35_1         904 KB  conda-forge
    altair-1.0.0               |           py35_0         1.6 MB  conda-forge
                                           Total:         9.6 MB
Linking packages ...
[vega                ]|#########################                         |  50%
C:\Users\Userme>"C:\Users\Userme\AppData\Local\Continuum\Anaconda3\Scripts\jupyter-nbextension.exe" install vega --py --sys-prefix   && if errorlevel 1 exit 1

Just for my note
    To initialize this nbextension in the browser every time the notebook (or other app) loads:

          jupyter nbextension enable vega --py --sys-prefix

The documentation: