Profilo di Ashish"Getting better never st...FotoBlogElenchiAltro ![]() | Guida |
|
30 giugno The SOAP vs RESTA very interseting comparision of REST vs SOAP :-
An analogy of SOAP and REST is an envelop vs a postcard (which one is bulky..huh..! :-) ) 07 giugno Create a RESTful service using WCF
Ok,so I decided to learn creating the REST services using WCF. a) WCF REST Starter Kit Preview 2 After you have installed the starter kit,you should see a set of templates under “File > New > Project”:- 06 giugno Roadmap to learn REST (Representational State Transfer)1) What is REST? Question :- Are you
Question :- Are you c) How to create a REST ful service? 1) c)High REST and Low REST ful service I started here at 12:33 PM 6/6/2009:- What is a Service ? REST is an architectural style for building resource oriented services by defining the resources that implement uniform interfaces using standard HTTP verb LIKE Get,POST,PUT and DELETE. Tenets of REST ful service:-
Addressing scheme – URI B) Scales best when Stateless C) Hyperlinks!- and right, internet would just suck if there are no links! If you look at how we write web services,you see that we follow SOAP which in no doubt an incredible way of interoperability between the clients and the services.
a) How to map REST verbs with HTTP verbs
28 gennaio Quickly open a file in VS2005/VS2008Just in case you know the name of a file and want to open the among many without finding in the solution explorer,check out the following option in the VS.NET.
Just type "> open" followed by first few characters of the file in the "Find" in the toolbar and it would give you all the matching results(irrespective of the location or extensiton). You just hit enter on the file you want to open. Update :- And how to go to that Find bar in the VS 2008. Just hit Ctrl+/ and you are there! :-)Just hit Ctrl+/ and you are there! :-) 26 gennaio ASP.NET performace tricksPerformance Issues in ADO.NET DataTable Usage - Use Enum to Access Items in DataRow
http://www.knowdotnet.com/articles/adoenums.html
03 gennaio Lyrics - "You had me from hello" - song by Kenny ChesneyIf there is one reason why I started liking country music,it is because of Kenney Chesney. He is an outstanding country singer and following is lyrics of one of the songs I really like. Its "You had me from hello".
One word, that's all you said
Somethin' in your voice caused me to turn my head. Your smile, just captured me And you were in my future as far as I could see And I don't know how it happened, but it happened still You asked me if I love you, if I always will Well you had me from "Hello" I felt love start to grow The moment that I looked into your eyes, you won me It was over from the start You completely stole my heart And now you won't let go I never even had a chance you know You had me from "Hello" Inside, I built a wall So high around my heart, I thought I'd never fall One touch, you brought it down The bricks of my defenses scattered on the ground And I swore to me I wasn't gonna love again The last time was the last time I let someone in But you had me from "Hello" I felt love start to grow The moment that I looked into your eyes, you won me It was over from the start You completely stole my heart And now you won't let go I never even had a chance you know You had me from "Hello" That's all you said Somethin' in your voice caused me to turn my head You had me from "Hello" You had me from "Hello" Girl I've loved you from "Hello" Some of his many gems are-
28 dicembre My introduction to the Assembly LanguageSo,I started studying Assembly Language.It is very silly to say that it is interesting language at the first glance when you look at those hexadecimal codes with some weird command like MOV on the command prompt and also when you are coming from working on all the high level languages like C++,Java and C#.However,there is no denial to the fact that you start to learn a lot about the CPU architecture especially "registers". Most important thing is Assembly language is just one level up from the machine language and hence are bound to be real fast compared to the high level (read "layered/abstract/sugar coated") languages. I would be really cool if I can get my fundamentals straight out here and then get into something real deep. I am sure it would help me in writing efficient code (or better understanding) in the language I speak,C# ! :-) Why Assembly language all of a sudden?? Ok,ok,let me confess,it is one of the papers in my MS (Computer Science) degree. :-). I realized that this subject (which I have never worked on),deserves some time to be understood and and there is an opportunity to learn a new thing. See..I am thinking! :-) I started with real basic introduction and a good place is http://www.swansontec.com/sprogram.htm. Which basically says that the Assembly language is a mnemonic language i.e. a set of instructions mapping to the machine language. It has a pretty small but basic example of creating a assembly language program. I read about the Assemblers and Loaders which,respectively are responsible for converting the Assembly language to the machine language and loading the machine language to the memory. 26 dicembre "kaise Mujhe Tum Mil Gayee" - From GhajiniJust in case you cant see the video above..following is the link:-
Of all the songs from the soundtrack of Ghajini, my favorite is Kaise Mujhe Tu Mil Gayi. A great composition by A R Rehman, the lyrics by Prasoon Joshi,as usual are are really deep and meaningful. Listen to the song at the dead of the night and you'll really like it. Hoo hooo oooo.. Hoo hoo hooo… Oooo..hoo…hooo..oooo Hooo hooo… Kaise mujhe tu mil gayi, Kismat pe aaye naa yaakeen, Utar aayi jheel mein jaise chand utarta hai kabhi, Haule haule dheere se, Gunguni dhoop ki tarah se taranum mein tum, Choo ke mujhe guzari hu yu, Dekhu tumhe ya mein sunu, Tum ho sukoon, tum ho junoon, Kyu pehle naa aayi tum? Kaise mujhe tu mil gayi, hoo hoo.. Kismat pe aaye naa yaakeen, hoo hoo.. Mein to yeh sochta tha ki aaj kal, Upar wale ko fursat nahi, Phir bhi tumhe bana ke woh, Meri nazar mein chadh gaya, Rutbe mein woh aur badh gaya.. Aaaa..aaaaa… Aaaa..aaaa…. Hoo..hoo…hooo.. Badle raaste jharne aur nadi, Badli deep ki timtim, Chedhe zindagi dhun koi nayee, Badli barkha ki rimjhim, Badlengi rituyein adaa, Par mein rahungi sada, Ussi tarah teri bahon mein baahein daalke, Har lamha, har pal.. Aaaa..aaaaa… Aaaa..aaaa…. Zindagi sitar ho gayi, Rimjhim malhaar ho gayi, Mujhe aata nahi kismat pe apni yakeen, Kaise mujhko mili tum 29 novembre Gazal by Jagjit Singh - Hai Lau ZindagiThis is one of the numerous beautiful gazals from Jagjit Singh. I first heard this in a documentary named "Hello Zindagi" on Doordarshan hosted by Nalini Singh. I loved this song and after some searching I got this.
Find the online song at :- http://ishare.rediff.com/filemusic-Hai-Lau-Zindagi-id-58965.php
Lyrics:-
hai lau zindagi...zindagi noor hai
magar isme jalne(?) ka dastoor hai adhoore se rishton me jalte raho adhoori si sasson me pal te raho... magar jiye jaane ka dastoor he... rawayat hai ke zindagi gahana hai If you see a spelling mistake and ,please ldo me a favor to let me know and I would correct the same.. Thanks, 08 agosto Nice add-ins for ReflectorNice add-ins for Reflector:-
(if you dont have reflector,download the same from http://www.aisto.com/roeder/dotnet).
One of the very useful add-in is the "diff" add-in. Which would point out the differences between the two versions of the same assemblies including any added/changed/deleted members/methods.
And also the "File Diassembler" where all you have to do is provide the assembly (with the dependent assemblies) you want to disassemble and it would generate the class library out of the same with all the source code.
Others are code search,Code Metrics and many more.
In order to use an add-in in the Reflector :-
a) Copy the all the binaries for the add-in in the same directory as the Reflector.exe.
b) In the reflector,View > Add-In. In the Add-ins dialog,Add the dll for the Add-in.
c) You should see the added "Add-In" under Tools menu.
23 luglio Gios PDF .NET libraryVery sleek open source PDF creation library built in .NET and its up for commercial use. http://www.codeproject.com/KB/graphics/giospdfnetlibrary.aspx Use sections in the config file and access them...( NameValueCollection)ConfigurationManager.GetSection("applicationSettings/ConnectionStrings");for the following XML fragment in the config file:-
<applicationSettings>
<ConnectionStrings>
<add key="DevConnectionstring" value="server=myserver1;database=mydatabase;uid=ashish;pwd=password"/>
<add key="QAConnectionstring" value="server=myserver2;database=mydatabase;uid=ashish;pwd=password"/>
<add key="ProdConnectionstring" value="server=myserver3;database=mydatabase;uid=ashish;pwd=password"/>
</ConnectionStrings>
</applicationSettings> 02 giugno Visual studio 2005 Build error :- The volume for a file has been externally altered so that the opened file is no longer validJust clean the solution and rebuild.
Just dont have any idea why the above error happened this morning when I tried to add some code to a windows service and tried to build the solution.But it has a simple resolution,just clean the solution. :-) [Solution Explorer > Right click on the Solution> Select "Clean Solution"].
26 maggio Convert string to byte array and viceversa byte[] elementByteContent= contentObject.Content; // this byte array content string elementStringContent = System.Text.Encoding.UTF8.GetString(elementByteContent); elementStringContent = elementStringContent.Replace(" ", ""); if (elementStringContent == string.Empty) { elementStringContent = "<P> </P>"; contentObject.Content = System.Text.Encoding.UTF8.GetBytes(elementStringContent); } Removing comments using XPathNavigator.SelectDescendants(System.Xml.XPath.XPathNodeType.Comment,false);
#region Remove XML commentsSystem.Xml.XPath.XPathNavigator path = xmlDoc.SelectSingleNode("w:document",xmlNSMgr).CreateNavigator(); System.Xml.XPath.XPathNodeIterator commentsIterator = path.SelectDescendants(System.Xml.XPath.XPathNodeType.Comment,false); if (commentsIterator.Count > 0) { while (commentsIterator.MoveNext()) {commentsIterator.Current.DeleteSelf();}} #endregion
For the following XML:-(We needed to remove "<!-- Generated by Aspose.Words for .NET 4.4.1.0 --> ")
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> Process.Start() - Open the file from the application after writing on the fileThere are instances where you write to a file (say XML/Text file/word) fo debugging/testing etc.In those scenarios,your program finishes writing to the file and then you open the file manually in the application(IE/Notepad/Microsoft word) to see what the program has written in that file.You can actually launch that application after you finish writing to that file from with in the program making the whole process quick.The file opens in its default application right after you finish debugging without you needing to manually open it.
The steps:- (2 lines):-
a) Include the namespace:-
using System.Diagnostics; b) Start the process for the saved file:-
//
//Code to save the file
//
// Following line would open the saved file in its default application
Process.Start("SavedFullFilePath");
Example:-
// Code to save the file
XmlDocument Xdoc = new XmlDocument(); string folderPath = @"C:\Ashish\"; string upload = folderPath + "2007.docx"; string savename = folderPath + "WordPackage.xml"; ZipPackage zipPackage = null; byte[] packageData = null; Stream stream; packageData = GetBytesFromFile(upload); stream = new MemoryStream(packageData); if (stream != null) zipPackage = GetZipPackageFromStream(stream); Xdoc = RRD.DSA.SCP.OfficeAssembler.WordToXyXmlAssembler.ConvertToXyXml(zipPackage); Xdoc.Save(savename); // Following line would open the saved file in its default application (Internet explorer) Process.Start(strSave); 05 marzo Checking for the existence of a temporary tableIF object_id('tempdb..#MyTempTable') IS NOT NULL
BEGIN DROP TABLE #MyTempTable PRINT 'Table dropped' END CREATE TABLE #MyTempTable ( ID int IDENTITY(1,1), SomeValue varchar(100) ) GO Returning value from sp_executesqlUSE Northwind DECLARE @Count int execute sp_executesql N'select @Count = COUNT(*) from Northwind.dbo.Orders', N'@Count int OUT', @Count OUT SELECT @Count 27 gennaio baawra mann dekhne chala ek sapna - Lyricsbaawra mann dekhne chala ek sapna ..
baawra mann dekhne chala ek sapna .. baawre se man ki dekho, baawri hain baatein baawre se man ki dekho, baawri hain baatein baawri si dhadkanein hain, baawri hain.. saansein baawri si karvaton se, nindiya door bhaage baawre se nain chahe.., baawre jharokhon se.., baawre nazaaron ko takna.. baawra mann dekhne chala ek sapna .. baawre se is jahaan mein, baawra ek saath ho
is sayaani bheed mein, bas haathon mein tera haath ho baawri si dhun ho koi, baawra ek raag ho baawri si dhun ho koi, baawra ek raag ho baawre se pair chahe.., baawre taraanon ke.., baawre se bol pe thirakna .. baawra mann dekhne chala ek sapna .. baawra sa ho andhera, baawri khamoshiyan
baawra sa ho andhera, baawri khamoshiyan thartharaati lau ho madham , baawri madhoshiyan baawra ek ghunghtha chahe, haule haule bin bataaye baawra ek ghunghtha chahe.., haule haule bin bataaye.., baawre se mukhde se sarakna .. baawra mann dekhne chala ek sapna ... baawra mann dekhne chala ek sapna ... 16 dicembre can not drop user from databaseProblem :-
I can not delete user from a database in sql2005 beta 3. the message errror is : TITLE: SQL Server Management Studio ---------------------------------------- Drop failed for User 'Amministratore'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft SQL Server&ProdVer=9.00.0981.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476 ---------------------------------------- An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ---------------------------------------- The database principal owns a schema and cannot be dropped. (Microsoft SQL Server, Error: 15138)
Solution:- 1) Expand Schemas(should be like a folder under <yourdatabase> -> Security) . 4) Associate the schema back to the user by running the script. |
|
|