Sunday, December 29, 2013

Experimenting IOS 1:–How to resolve SVN Connection (Certificate) issue

This article may help you ; if you are struggling to integrate SVN to XCode.

Being a hardcore Microsoft lover It was not very easy for me to work with IOS and Mac OS X versions when came from a hardcore Microsoft background Smile . It was the most terrible decision to carry a Mac machine to client site instead of my very own win 8 machine . But the scenes awaited were more terrific than expected . Imagine using a MAC machine to do your regular windows stuff Sad smile . Situation was pathetic for couple of days . But there was no other option other than to live with it ; third day onwards started finding workarounds and little tweaks . Here I am listing down one of the issues faced during that time and the fix for that .

Please follow the below steps only if you only wanted to seamlessly integrate SVN with X Code

Step 1: Navigate to Applications folder and locate X Code

c1

2. Right click and say “Show Package Contents”

c2

3. Navigate to /Contents/Developer/usr/bin

c3

4. Open terminal and paste the svn executable path

c4

5. Execute the SVN check out command and you will get a certificate error prompt . Accept the certificate permanently by typing (p) and hit enter

c5

6. The code will be downloaded to the directory path selected in the terminal . Now open the project in XCode and you open the Source Control menu . You can see the source control menu items enabled Smile

c6

Happy coding !

“Storage space running out “ Samsung Galaxy Android Phone’s Storage Space Issue and Solution

This is a hectic issue you may face if you are using Any of the Samsung galaxy series . For me it was terrible and literally I couldn’t do anything with my phone . Day by day the available space was getting reduced in the phone and did a lot of research to find that the issue was actually caused by dump files and logs created by system . Please follow the below steps if you are facing the same issue

Step 1 : Open the Phone application and dial *#9900#

android1

Step 2: Tap on the below highlighted button “Delete dumpstate/logcat”

android2

Enjoy using your phone Smile

Wednesday, October 2, 2013

Passing value of an array to WCF Test Client

This blog might look very simple but at least useful for first time users of  WCF test client .

The Question here is how to pass the value of an array to WCF Test Client

Your Service Method method looks like the below ; you may notice that the method accepts a List<String> Values as input parameter .

 

image

Now Lets Run the WCF Project and see how it look like in the Test Client

image

Your Test Lists the method and its Parameters as shown in the above screen shot

 

image

 

Now Lets see how we can Pass the Values to the array . In Normal scenario you may not notice how we can enter the values . But you may notice one thing that the length of the array is Zero (0) .

Now change the length of the array to 2  and see what is the change happening

 

image

Now you can see the array value section is modified with an expander an you are provided with two options to enter the values

 

image

 

Enter the values in the Value field and test your service .

 

Happy Coding :)

Monday, January 28, 2013

Resolving Same Origin Policy restrictions ( Cross Domain Issues) using JQuery Ajax Calls and JSONP

 

Being a  web developer , you must be at least one time used JQuery Ajax requests from your client end . And the growing popularity of HTML 5 demands more such calls . And the main headache occurs when you want to access some thing from server , which may be hosted in a different domain .

The commonly suggested solution to this problem is to use  “JSONP” as data type in your Ajax request . Even though the same thing is repeated in all forums , but none clearly mentions what is JSONP and how you can implement it for cross domain – “GET” requests .

JSONP

JSONP is an addition JSON request ( JSON with Padding )  , it wraps JSON in a function call.  For example, the following might be returned from the third-party server:

mycallback({"key" : "value"});

Code Snippet

In your regular JQuery Ajax Call , modify the “dataType “ Parameter to “jsonp”  and add a new parameter called “jsonpCallback” .  set the value to the call back function same as the one which you are going to specify in your server file. here in this example it is “mycallback”  . 

Your Script Would looking like the below

<script type="text/javascript">
var URL = "
http://MyServer/OL/version.txt";
$.ajax(URL, {
crossDomain: true,
dataType: "jsonp",
jsonpCallback: mycallback,
success: function (data, text, xhqr) {
alert(data.text);
},
error: function (xhqr) {
console.log("Error");
}
});
</script>

Now your client is ready to send and receive cross domain Ajax calls  .  Now we’ll have a look at your server side file from which you are returning some data to client side .

Now modify your server side file say for example “version.txt”   as shown below .

mycallback({"text" : "Hello World This Text is from cross domain server "})

The above statement is a method which wraps your Json Data .

Happy Coding Smile