博文

目前显示的是 五月, 2018的博文

Swagger & RESTful Web service

Swagger is an open source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. While most users identify Swagger by the Swagger UI tool, the Swagger toolset includes support for automated documentation, code generation, and test case generation. The Swagger API project was created in 2011 by Tony Tam, Technical co-founder of the dictionary site Wordnik. During the development of Wordnik's products, the need for automation of API documentation and client SDK generation became a major source of frustration. Tam designed a simple JSON representation of the API, building upon the flexibility of the REST style of architecture and using many features of tooling built for the SOAP protocol. The concept for the user interface was proposed by Ayush Gupta who suggested that an interactive user interface would benefit end users who wished to "try out" and develop against the API. Rame

Alexandre poirot

/* ***** BEGIN LICENSE BLOCK ***** # Copyright 2010 Alexandre Poirot # # Contributor(s): # Alexandre poirot <poirot.alex@gmail.com> # # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library. If not, see <http://www.gnu.org/licenses/>. # # ***** END LICENSE BLOCK *****/ var NativeBridge = { callbacksCount : 1 , callbacks : {}, // Automatically called by native l

tools in .Net

1.System.Web.HttpContext.Current string mapPath = System.Web.HttpContext.Current.Server.MapPath("~/Data"); 2.AssemblyUtil.GetCurrentAssemblyPath(); 3.Directory Directory.GetParent("ccc").FullName 4.Path Path.Combine(Directory.GetParent(mapPath).FullName, "Data"); 5.using System.Xml.Serialization; //T is generic var se= new XmlSerializer(typeof(T)); using (var r = new System.IO.StreamReader("test.xml")) {                         result = (T)se.Deserialize(r); }