Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

Tool: Encrypting/Decrypting a password manually

Tuesday

Password Encryption/Decryption Tool:
                                       Some times we need to encrypt or decrypt a password manually, for example If you set a password using a configuration file, you must encrypt or decrypt the password manually. This is the simple tool to encrypt or decrypt a password. By using this tool you just enter the input string(base64 strings) and click Encrypt/Decrypt button and you will get the corresponding output. Simply said this  a very useful tool for encrypt/decrypt base64 strings.


              
    on above the screen shot I'm encrypting the string codingcluster and the encrypted sting displayed in another one alert box.

Download:
           You can download the Password Encryption/Decryption tool from here.

ASP.NET - Create a DIV Tag using C#

Monday


Create div tag dynamically in ASP.NET using c# :
           Below is the sample (c#) code for create  a div tag in asp.net. The following code will give out put like this...


Code for create dynamic div in ASP.NET using csarp:
protected void Page_Load(object sender, EventArgs e)
    {
        System.Web.UI.HtmlControls.HtmlGenericControl createDiv =
        new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");      
        createDiv.ID = "createDiv";
        createDiv.Style.Add(HtmlTextWriterStyle.BackgroundColor, "Yellow");
        createDiv.Style.Add(HtmlTextWriterStyle.Color, "Red");
        createDiv.Style.Add(HtmlTextWriterStyle.Height, "100px");
        createDiv.Style.Add(HtmlTextWriterStyle.Width, "400px");
        createDiv.InnerHtml = " I'm a div, from code behind ";
        this.Controls.Add(createDiv);
    }

iPhone - Memory leak issues and solution

Saturday

Incorrect decrement of the reference count of an object that is not owned at this point by the caller:
                                                                                                               If you're try releasing an object returned from a property getter method, which in many cases would be the indication of a possible bug. To resolve this problem you can "release" the following way,
    
            [date release];
            date= nil;


               (OR)

   [date release], date= nil;

Argument in message expression is an uninitialized value:
              If you declare any variable without default value this error could be occur. To resolve this issue just you add a default value for your variable.
You can declared like...

       NSString *name = nil;
       NSString *date = nil;


Instead of

      NSString *name;
      NSString *date;


Receiver in message expression is an uninitialized value:
                                                                     You should initialize the value to nil when declaring it.

       personDetails *personInfo = nil;
Instead of
      personDetails *personInfo;


Logic error “Undefined or garbage value returned to caller:
                                                                 Assign default value of your string to nil; where you declared it.
NSString *title; should be changed as  NSString *title = nil;

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets