Thursday, March 26, 2015

iOS微信技巧:不用上传可直接分享视频到朋友圈

  首先,打开任意一个聊天界面,公众号或者私人号码,总之视频发出去没关系的就行(艳照门飘过~)
点击发送照片,选择要分享的视频。发送出去后,长按视频,选择收藏。
收藏完了以后,在下方列表的“我”中找到“我的收藏”,点开刚才收藏的视频。
点开视频后,点击右上角的“…”,然后分享到朋友圈就ok啦~

C# What is the difference between the | and || or operators

 C# What is the difference between the | and || or operators

Just like the & and && operator, the double Operator is a "short-circuit" operator.
For example:
if(condition1 || condition2 || condition3)
If condition1 is true, condition 2 and 3 will NOT be checked.
if(condition1 | condition2 | condition3)
This will check conditions 2 and 3, even if 1 is already true. As your conditions can be quite expensive functions, you can get a good performance boost by using them.
There is one big caveat, NullReferences or similar problems. For example:
if(class != null && class.someVar < 20)
If class is null, the if-statement will stop after "class != null" is false. If you only use &, it will try to check class.someVar and you get a nice NullReferenceException. With the Or-Operator that may not be that much of a trap as it's unlikely that you trigger something bad, but it's something to keep in mind.
No one ever uses the single & or | operators though, unless you have a design where each condition is a function that HAS the be executed. Sounds like a design smell, but sometimes (rarely) it's a clean way to do stuff. The & operator does "run these 3 functions, and if one of them returns false, execute the else block", while the | does "only run the else block if none return false" - can be useful, but as said, often it's a design smell.
There is a Second use of the | and & operator though: Bitwise Operations.

Wednesday, March 25, 2015

entity framework generate from database

  • First, open server explorer, add connection to the table you want to work on. 

    Second, generate class model.
  • Project -> Add New Item…
  • Select Data from the left menu and then ADO.NET Entity Data Model
  • Enter BloggingModel as the name and click OK
  • This launches the Entity Data Model Wizard
  • Select Generate from Database and click Next

3. Reverse Engineer Model

We’re going to make use of Entity Framework Designer, which is included as part of Visual Studio, to create our model.
  • Project -> Add New Item…
  • Select Data from the left menu and then ADO.NET Entity Data Model
  • Enter BloggingModel as the name and click OK
  • This launches the Entity Data Model Wizard
  • Select Generate from Database and click Next
    Generate from Database selected in first step of wizard
  • Select the connection to the database you created in the first section, enter BloggingContext as the name of the connection string and click Next
    DatabaseFirst.Blogging database selected and BloggingContext entered as connection string name in second step of wizard
  • Click the checkbox next to ‘Tables’ to import all tables and click ‘Finish’
    All tables selected for import in final step of wizard

Once the reverse engineer process completes the new model is added to your project and opened up for you to view in the Entity Framework Designer. An App.config file has also been added to your project with the connection details for the database.
EF Designer showing model with Blog and Post entity









How to manually update your Entity Framework model classes when they get out of sync with your database


The ADO.NET Entity Framework is an awesome way to quickly pull data into an app.  I’ve been building apps for a really long time and have used all the frameworks that have come out over the years.  IMO EF is the best one I’ve used yet.
Well, I should say it is awesome MOST of the time.  The biggest beef I have with it is that the models can get out of sync with the database and saving the EDMX file and running the “Update Model from Database…” feature doesn’t work.
image
(The Update Model from Database option doesn’t update the object model and class files)
For example, let’s say I start with this model:
image
And I add a new table to the DB called Foo:
image
I then go back to my app and add my new table to the model using the “Update Model from Database…” feature:
image
And it is added to the diagram:
image
But the corresponding object model and CS file wasn’t generated:
image
Up until today I would have recreated the EDMX file, which is a big pain.  But I discovered that there’s a context menu item called “Run Custom Tool”.
The most obvious choice is to select “Run Custom Tool” from the EDMX file, but that doesn’t do anything:
image
If you F4 the corresponding T4 file you can see that the custom tool associated with the T4 file is: TextTemplatingFileGenerator
image

So, I selected “Run Custom Tool” from the T4 context menu:
image
And that generated the Foo.cs file:
image
But I still didn’t have the Foo class in my object model:
image
So I selected the “Run Custom Tool” on the “ConfSpeakers.Context.tt” file:
image
And that generated the correct object model:
image
So anytime you find your EF model and/or class files out of sync with your database then you need to manually run the “Run Custom Tool” command on both the [Entities].tt file and the [Entities].Context.tt file.

This is a big pain.  I will ping the product team to see if they can run the custom tool on the EDMX file when it is saved and recursively run on all the tt files associated with that EDMX parent.

Tuesday, March 17, 2015

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.



Friday, March 6, 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