Thursday, August 20, 2015

import ESRI shape file into mongoDB

import ESRI shape file into mongoDB


1) Go to http://www.ogr2gui.ca/ download GDAL ogr GUI tools

2) use tool to convert shape to geojson ( geoJSON use latitude and longitude, project code is
      4326: WGS84)

3) mongoimport will see it as single document, however I need multi document for each record, I need to modify the geojson file, first remove head portion (selected text), then remove foot portion( selected text)




 
4) remove , at each line end. each line should be a json object, it looks like {......} without ","
    So you should replace ] ] ] } },  with ] ] ] } } as show below


5) run mongoimport as

C:\Program Files\MongoDB\Server\3.0\bin>mongoimport --db civilgis --collection p
arks C:\Users\hu_j\Downloads\parks.geojson

--db : database name
--collection : table name
then the geojson file

this case it import 41 document


6) index the coordinate to speed up the performance
db.zoning.createIndex({"geometry":"2dsphere"})
db.parks.ensureIndex({"geometry":"2dsphere"})
db.collection.createIndex( { <location field> : "2dsphere" } )




Note: keep the format of "coordinate [[[ ]]]"  do not change to coordinate [[ ]],
otherwise, db.xxx.ensureIndex({"geometry": "2dsphere"}) will fail.


Error and fix

mongoimport error tells you location at line number #14683, in this case you need to replace
"geometry": null }, without ","




Error 2 and fix


  db.parcels.ensureIndex({geometry:"2dsphere"})

   
       "errmsg" : "exception: Can't extract geo keys:.......
          .....
            ] ] Duplicate vertices: 29 and 47",

fix by remove the duplicate coordinate(vertice). start from 0, the 29th point and 47th point are duplicate, remove 47th, note that last coordinate before ]]duplicate vertices is NOT the 29th nor 47th, you have to manually count 29th point and delete it.

first find by APNLINK: \"41051111\" copy that record to new document, then find the duplicate coordinate by count 29th

        "errmsg" : "exception: Can't extract geo keys: { _id: ObjectId('55ca7991
21167708171b06ba'), type: \"Feature\", properties: { CITYSTZPRP: \"Ca\", OWNER_N
AME: \"Casden Lakes\", Legal_Desc: \"N TR 12341 LOT A\", HOUSE_NO: null, APN: \"
410-511-11\", APNLINK: \"41051111\", ADDR_NUMBE: null, STREET: null, SUFFIX: nul
l, OBJECTID: 981, FID_points: 41051111, ADDRESS: null }, geometry: { coordinates
: [ [ [ -117.8772983067213, 33.69316895497129 ], [ -117.8771896001406, 33.693156


after fix the whole parcels.geojson, you have to drop current parcels in mongoDB, re-import parcels.geojson then create index

================================================================
http://zaiste.net/2012/08/importing_json_into_mongodb/


Importing JSON data into MongoDB can be tricky. By default, monogoimport assumes a special structure for a file to import from: similar to JSON format except that only one document per line is allowed with no comma after each of them - something like:
{ name: "Widget 1", desc: "This is Widget 1" }
{ name: "Widget 2", desc: "This is Widget 2" }
It would be easier, however, to use a traditional JSON instead of adapting it to this special format required by MongoDB. Luckily, we can force mongoimport to import the data as a JSON array using --jsonArray parameter.
Let's suppose we have a seed.json file with the following content:
[
    { name: "Widget 1", desc: "This is Widget 1" },
    { name: "Widget 2", desc: "This is Widget 2" }
]
We can import it to our local MongoDB database using following command:
λ mongoimport --db  --collection  --type json --file seed.json
--jsonArray
If the specified collection doesn't exist, it will be automatically created; otherwise new documents will be appended to the existing one.

Tuesday, August 04, 2015

visual studio publish local repository into github

NetBeam


select the project, choose "commit... "

Team --> remote --> push
then put URL into









---------------OK this worked for me.
  1. Open the solution in Visual Studio 2013
  2. Select File | Add to Source Control
  3. Select the Microsoft Git Provider
That creates a local GIT repository
  1. Surf to GitHub
  2. Create a new repository DO NOT SELECT Initialize this repository with a README
That creates an empty repository with no Master branch
  1. Once created open the repository and copy the URL (it's on the right of the screen in the current version)
  2. Go back to Visual Studio
    • Make sure you have the Microsoft Git Provider selected under Tools/Options/Source Control/Plug-in Selection
  3. Open Team Explorer
  4. Select Home | Unsynced Commits
  5. Enter the GitHub URL into the yellow box
  6. Click Publish
  7. Select Home | Changes
  8. Add a Commit comment
  9. Select Commit and Push from the drop down
Your solution is now in GitHub

how to publish local folder to github 如何把电脑硬盘里的文件上传到github.com

how to publish folder to github


1) add  -> browse to folder --> create a repository


2) write the name  --> create repository

3) publish repository --> write a name


4) uncommit change --> write something --> commit to master



5) click unsynced change  "sync + 1"  

6) You should have it upload to github




How to use git bash command line?

1) use cd /c/jh/backup to go the folder you want to upload. (先进入到要上传的地方)

2) git init ( 把要上传的文件夹先变成git repository )

3)  git add * 【or  git add /* 】 【git add --all folder】(把这里所有的文件都加到local git repository )


4) git commit -m " message " (必须得commit一次,-m是message的意思,message写什么都行)

5)git remote add origin http://......myproject.git (在github.com上先建好一个repository,再把URL链接用在这里。
      这样local git repository 和 github.com上的online, git repository  就链接起来了


6)最后再把所有local的上传,
git push origin master  【git push -u origin master

然后网上就应该看到上传的东西了。




git remote -v
是检查目前online repository 是什么路径,
online repository 和 local repository 要对接。

git status
显示状态,

-----------------------------------------------------------------

Set up your project in GitHub Desktop

The easiest way to get your project into GitHub Desktop is to drag the folder which contains your project files onto the main application screen.
Screenshot of drag and drop in Mac app
If you are dragging in an existing Git repository, you can skip ahead and push your code to GitHub.com.
If the folder isn’t a Git repository yet, GitHub Desktop will prompt you to turn it into a repository. Turning your project into a Git repository won’t delete or ruin the files in your folder—it will simply create some hidden files that allow Git to do its magic.
Screenshot of Git init in Mac app

Your first commit

All Git repositories are based on commits—snapshots of your code at a point in time. You need to make at least one commit before you can push your code up to GitHub.com.
Screenshot of committing in Mac app
Navigate to the Changes tab and click Commit to create your first commit. You’ll need to create a new commit every time you change files. Creating a commit is like saving a file—you are telling Git that you’d like to remember this point in history.
Make as many commits as you like locally. No one but you can see those commits until you push them to GitHub.com.

Push your code to GitHub.com

Screenshot of pushing in Mac app
Click the “Publish” button in the upper-right corner and GitHub Desktop will ask you what kind of repository to create:
  • Public repository — Anyone can see a public repository, but you choose who can commit (make changes) to it. You can create as many public repositories as you want on GitHub.com for free.
  • Private repository — By default, only you can see a private repository. You choose who can see and commit to this repository by adding collaborators. Private repositories require a paid subscription on GitHub.com.
Now that you’ve published the repository, you have it in two places:
  • Local repository on your computer — You can work on this repository without an Internet connection using GitHub Desktop. This is where you edit files and make changes to your project.
  • Remote repository on GitHub.com — You can send people links to your repository on GitHub.com so they can see your code and use all of GitHub’s other features (like Issue management and Pull Requests).
Each time you make changes to your local repository, you’ll need to sync your changes (by clicking the button in the upper-right corner of GitHub Desktop) to make sure they show up online.

Getting code from GitHub.com

If you want to get some code from GitHub.com onto your computer or synchronize changes between multiple computers, you’ll need to either pull changes or clone a repository:
  • Pull changes — Click the “Sync” button in the upper-right corner of GitHub Desktop to bring code from an online repository (for example, changes that your co-worker pushed up) onto your computer. Note: This will also push changes you haven’t pushed yet.
  • Clone a repository — Click the “Clone in Desktop” button on GitHub.com to create a new copy of a repository on your computer.

duplicate an android project

http://stackoverflow.com/questions/5170425/quickest-way-to-duplicate-an-android-project



Here's the procedure I've been using for making a new copy of a project. It's worked fone for a large project I wanted to break down to a smaller more specialized and I also have a scene manager template that I clone from for the start of each new project. All these steps seem to work fine and it's done within Eclipse/ADT
how to clone a project and rename it. ------------------------------ open up the source project, (ie just click on it. name of project and leave it highlighted) then control-c control-v , give it a new name..note this is a TEMP name because you will have to rechange it in a second so "the copy" is just fine.
The copy should paste in place, open up the copy ,right click on top line and select "refactor--> rename--> give the new name you want to name the whole project and check "update references" if it's not already checked.
Then go into manifest and change the name there. Be sure and make the change in the "manifest" tab NOT in the xml code . and hit save icon , a pop-up will ask if you want to "update your Launch Configurations", hit "YES"
Click on "SRC" at the top of the package. Notice how the package name under the src folder has not changed names. right click that and select refactor>, Change the name. ... a rename menu appears, all the boxes should be checked and hit "preview" (you might get a warning it already exists...go on anyway) that should then change the package names in the individual class files. Open a few and check the top line for the package is updated. under res/values is a file strings.xml. Open it you should see this. XXXXXXXX
and change the XXXXXXX part to the new name you want for your icon on the device/emulator, probably the Apps name that's it. It was such a pain to do this each time so I created my own "doc" to help. I've double checked this a few time

visual studio replace namespace in solution and project

visual studio replace namespace in solution and project

You need to replace 'Nop' with 'whatever'
      in text based file( .sln  .csproj  .cs ),
      in file name
      in folder name




1) replace 'Nop' with 'eBuild' in all text based file( .sln  .csproj  .cs )
    use Notepad++  , search -> find in file -> specify the directory to root folder of entire solution.
    Do not check match whole word only, only check match case, filter should be *.*


2) replace file name and folder name that has Nop to eBuild
use Far  --> Find

--> Rename



3) Replace folder name with win 7 x folder



You have to do above multiple 4 times for each for library, plugin, presentation, test folder 
  Because it does not replace sub-directory, it only rename the current directory.



  RhinoMocks is not install properly. So use Nuget to uninstall it and re-install it will works.

netbean push to github

netbean push to github



First to create local git repository by 1)  - 2)

Second on github create repository and copy http link to clipboard

Third in netbean config to connect to remote http URL you have just created.


1) new project -->  choose PHP ---> choose PHP from existing source code


2) Team -> Git -> initialize repository
     Team -> Git -> commit  write some commit message


3) on github create repository and copy http URL link to clipboard


4)Team -> remote -> push
    Fill in the URL and github user name and password
   click next -> choose  master branch, next then finish.








git

(ladbs)
city permit, 
city permit online

City of Los Angeles Department of building and safety. 

City permit online application and payment system. 




(lax)

Los Angeles international airport capital project management

Developed the Capital Project Management System (CPMS) to aid capital project planning processes at airports. Airports capital improvement programs require Airport planning and future development of airports consistent with local, State and national goals. That require planning to have the scope and forecast costs clearly defined for approval and hand-off within the organization. CPMS is php based web application has the following features: Access Role based security. Single Sign-On. The administrative tool allows for management of project milestone etc. Manage Portfolio allows you to view, edit and add to your portfolio of projects. Assign Project Managers, Sponsors and drives the role based security for each project. Trend Details, Planning Phases,Quad Worksheets. The application allows users to generate Project Detail Report, Budget Sum Report, Project Change Detail Worksheet and Project Report.





(fleetSCE) (openGTS) java     (traccar) ios android

fleetSCE is  web-based fleet tracking applications, provides visibility into all the vehicle and driver behavioral data  such as vehicle location, fuel usage, speed, mileage etc with valuable fleet reports. Reduce operating and capital costs, Improve fleet safety and security.
Use of open layer 3 api and open street map




==================================
web development 


 .NET MVC Developer:
strong command of the middle tier and connected systems, specifically with C#, WCF, and Entity Framework. Experience with client-side Javascript libraries like Angular or real-time communication with SignalR 
------------------


20 years of Web Development Experience

Expert with Hands on Experience with HTML 5/CSS3  Javascript framework (Jquery, AngularJS ) development
Expert in css Preprocessors such as Bootstrap LESS Sass, Stylus
Experience with server side javascript Node.js

Expert with Php/Wordpress, MySQL, Magento, WordPress, LightCMS or other CMS
Expert in Responsive web design with  REST/Web API  JSON, AJAX
Be able to work on the project proactively from Requirements analysis, design, development, testing and go-live
Experience working in deadline situations as part of a web development team.

Ability to build mock-ups that can be easily translated into real web applications; create standards-compliant, cross-browser compatible HTML & CS; create web graphics, user interfaces, icons, style sheets, templates, and layouts for use in product development websites


experience with C#, ASP.NET Razor, Experience with LINQ and Entity Framework 
Experience with Nunit, TDD, SVN,and GIT

================================

Southern California Edison

Leads development of eWorld, a geospatial one-stop for all GIS data and maps for SCE.

GIS subject matter expert and led the development of Smart Meters visualization tool.

Created an automated outage communication application to show power outages to the public. 

Led and developed customer focused applications for Overhead and Underground Detailed Inspection groups.

Subject matter expert in GIS for a comprehensive GIS project to convert all company assets into a single GIS repository.

Worked on installing Autodesk software in Citrix Xen App environment to provide access to user base and contractors.

Maintains the Oracle Spatial database of Transmission & Distribution Assets consisting of over 70 million records.

Automated street light map production using ArcObjects through python script.

Provides Tier 3 support for GIS production issues in the areas of webGIS and Autodesk software.

Assist in the creation of logical and physical design documentation.

Directs the work of external contractors.


San Antonio River Authority

GIS lead for FEMA’s flood map update. Developed application for public to view flood maps.

Maintains and optimizes arcSDE, and arcGIS servers.

Developed GIS mapping standards used in map production and web serving accessible through a GIS “one stop” portal.

Led and developed of Enterprise ArcGIS Server Javascript API applications.

Provide GIS tech support throughout the River Authority for GIS.

Management of project budgets and schedules.

Oversees and assists GIS technicians under general direction of Watershed Management Manager.

Managed effort to establish GIS in rural counties in River Authority jurisdiction.

Developed an award winning Service Locator for citizens to find county services.

Developed an award winning land management repository web application.

GIS Lead for county wide electronic permitting application.

Managing and processing of large data.

Building GIS applications using ArcIMS, ArcMap, Cold Fusion, ASP.

Installation/Administration of GIS software on County Servers.


Wednesday, January 14, 2015

izometric love -

izometric love -

Tuesday, January 13, 2015

magnetic girls - 平行世界

    你在哪里?
       在哪里?
       在天空里
       在大海里


   

     你在哪里?
       在哪里?
       在我的脑海里


你在哪里?
       在哪里?
       在天空里
       在大海里
       在我的脑海里

没有你的世界里
没有颜色

也许在另一个平行世界里
我们是在一起


没有你的世界
没有颜色
也许在另一个平行世界里
我们是在一起


没有你的世界
没有颜色
也许在另一个平行世界里
我们是在一起


没有你的世界
没有颜色
也许在另一个平行世界里
我们是在一起


Tuesday, January 06, 2015

平行世界


座位前座位后。  
一回头,你的微笑,
让我魂萦梦牵了好多年,
牵绊了一生。

因为爱你,
使我勇敢,

没有你的世界,是没有颜色的,

暮色降临,
夕阳挂在海滩的尽头
在另一个平行世界里,
我们是在一起的。


-------------------------
因为爱你
我可以很勇敢,
做一切不可思议的事。

深深得爱一个人会给你勇气,
被人深爱会给你自信

你相信有平行世界吗?

也许在那个平行世界,

我们是在一起的。


座位前座位后。  一回头,女孩的微笑,让男孩魂萦梦牵了好多年,牵绊了一生。

Being deeply loved by someone gives you strength, while loving someone deeply gives you courage.
只要够喜欢,就没有办不到的等待

再见,再见,再见。你永远都看不见我放弃的背影有多么伤心