28 February 2014

Windows Phone SDK installation problems

Generally programmers of windows apps faces problem while installing sdk 8.0, one of the major problem I would like to discuss with you. Most of the time we encounter following problem “Windows Phone 8 SDK: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file in other word we generally see  windows Software Development Kit Tools for Windows Store . A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file”.


There are two solution of this problem:

A)    By changing local time.  Details are as follows:

Set the computer's date to 16 July 2013 or earlier, run installation, then update the date

to the present

     1.      Right click date and time in lower right corner of screen.

2.      Select Adjust Date/Time

3.      Click the Change Date and Time button.

4.      Select 16 July 2013 on the calendar.

5.      Click OK.

6.      Click OK.

7.      Run the installer again.

When installation is complete, use steps 1 through 6 to set the date to the current one.

B)    By downloading small (.msi) file generally 344KB to fix this issue.

1) Uninstall the partially installed Windows Phone SDK 8.0 if it currently installed on your computer.

2) Download the .msi and .cab files from the following 4 locations and save them to the same folder on your computer:

http://go.microsoft.com/fwlink/?LinkId=257143

http://go.microsoft.com/fwlink/?LinkId=257144

http://go.microsoft.com/fwlink/?LinkId=257145

http://go.microsoft.com/fwlink/?LinkId=257146

3) Go to the folder where you have saved downloaded file and run this file named “Win8SharedSDKTools.msi”.

4) After installing Win8SharedSDKTools.msi, re-run windows Phone SDk 8.0 setup and install like normal.

For more details about this bug you can visit Microsoft web http://support.microsoft.com/kb/2897627

                                              Thanks for visit us


Read More...

How to Bleach Microsoft windows 8 apps security



Today I have found how to bleach windows 8 apps security. Due to apps security you are able to see and modify the code file of windows 8 apps. There are several steps to bleach this security as following.
    1.    Enable Hidden items view in view control.
    2.    Goto C:/Program Files
    3.    Find WindowApps folder.
    4.   Send this folder to you external drive(i.e Pendrive, Memory card etc) with admin permission.


     5. Wait for complete. It might take long time.
     6. Open windowApps folder in your external drive, now you will be able to see each files of your installed Apps in your windows.

v  7. Now modify the code, if you want.
    8. Paste windowApps folder in your  C:/Program Files
    9. Run your modified Apps, now  you can see the changes.


       

Read More...

25 February 2014

vigenere cipher

Description

Vigenere  cipher is used for encrypting alphabetic text. In a Caesar cipher, each letter of the alphabet is shifted along some number of places; for example, in a Caesar cipher of shift 3, A would become DBwould become EY would become B and so on. The Vigenère cipher consists of several Caesar ciphers in sequence with different shift values.
To encrypt, a table of alphabets can be used, termed as Vigenère square, or Vigenère table. It consists of the alphabet written out 26 times in different rows, each alphabet shifted cyclically to the left compared to the previous alphabet, corresponding to the 26 possible Caesar ciphers. At different points in the encryption process, the cipher uses a different alphabet from one of the rows. The alphabet used at each point depends on a repeating key.
For example, suppose that the plaintext to be encrypted is:
cryptograph
The person sending the message chooses a keyword and repeats it until it matches the length of the plaintext, for example, the keyword "vein":
veinveinvei
Each row starts with a key letter. The remainder of the row holds the letters A to Z (in shifted order). Although there are 26 key rows shown, you will only use as many keys (different alphabets) as there are unique letters in the key string, here just 4 keys, {v,e,i,n}. For successive letters of the message, we are going to take successive letters of the key string, and encipher each message letter using its corresponding key row. Choose the next letter of the key, go along that row to find the column heading that matches the message character; the letter at the intersection of row and column,  is the enciphered letter.
For example, the first letter of the plaintext, c, is paired with v, the first letter of the key. So use row v and column c of the Vigenère square, namely v. Similarly, for the second letter of the plaintext, the second letter of the key is used; the letter at row r and column e is v. The rest of the plaintext is enciphered in a similar fashion:
Plaintext:
cryptograph
Key:
veinveinvei
Ciphertext:
Xvgcojoevtb
Decryption is performed by going to the row in the table corresponding to the key, finding the position of the ciphertext letter in this row, and then using the column's label as the plaintext. For example, in row v (from vein), the ciphertext v appears in column c, which is the first plaintext letter. Next we go to row e (from vein), locate the ciphertext v which is found in column r, thus r is the second plaintext letter.

Implementation in c++

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
void main(){
clrscr();
char *ptext,*cih,*key,alp[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
int padd[50],kadd[50],padd1[50],kadd1[50],keyval,pval,i;
cout<<"\nEnter Plain text:";
cin>>ptext;
cout<<"\nEnter Key:";
cin>>key;
pval=strlen(ptext);
keyval=strlen(key);
for(i=0;i<pval;i++){
key[i]=key[i%keyval];
}
int count=0,count1=0;
while(count<pval){
for(i=0;i<26;i++){
if(ptext[count]==alp[i]){
  padd[count]=i;
for(int j=0;j<26;j++){
  if(key[count]==alp[j]){
    padd[count]=padd[count]+j;
                   }
            }
  }
}
count++;
}
for(i=0;i<pval;i++){
kadd[i]=padd[i]%26;
}
cout<<"\nCipher Text will be:";
for(i=0;i<pval;i++){
cih[i]=alp[kadd[i]];
cout<<alp[kadd[i]];
}
while(count1<pval){
for(i=0;i<26;i++){
if(cih[count1]==alp[i]){
  padd1[count1]=i;
for(int j=0;j<26;j++){
  if(key[count1]==alp[j]){
    padd1[count1]=padd1[count1]-j;
                   }
            }
  }
}
count1++;
}
for(i=0;i<pval;i++){
kadd1[i]=padd1[i]%26;
if(kadd1[i]<0){
kadd1[i]+=26;
}
}
cout<<"\nOriginal Text will be:";
for(i=0;i<pval;i++){
cout<<alp[kadd1[i]];
}
getch();
}

Output

Enter Plain text: cryptograph
Enter key: vein
Cipher Text will be: Xvgcojoevtb
Original Plain text will be:cryptograph

Download Source code: Vigenere in c++
Read More...

23 February 2014

Find rank of matrices using SR modulus Method


In engineering mathematics it is not easy to find rank of matrices. SR Modulus method give us flexibility and  easy way to find rank of matrices. This method is working under the project “LOCO POCO SOCO”, developing by S.K. Chakravarti since 2009.

SR Modulus method:

If a matrix A= , then find the rank of matrix A.

B=A%(Prime Number P)
Let prime number be 2. Then matrix B will be
B=
Apply elementary row and column elimination. Try to do (n-1) elements of  any one row or column of matrix B to be 0.
If Maximum elements are in the form of 2n,3n,5n,7n…..,  then take prime number P as upper prime.
Apply these Modulus and elimination till every elements gets  {-1,0,1}.
Rank(A)=Number of none zero rows or columns of matrix B.

 Download .pdf file: Click Here

Example:
Given that a 3x3 matrix A=. Find the Rank of matrix A.
Solution:
Applying modulus 2, then B=A%2.
B=
Number of none zero rows or column = 2
Hence, Rank(A)=2    ANS.

If you have any problem regard this you can contact me via comments or email.



Read More...

Free chat without Internet connection in windows

Free chat without Internet connection

Steps:
1.       Open Run in windows PC , to open it press  windows  key with R key  simultaneously
2.        Now type  MSRA  in Run  prompt.




3.       Now there  you will able to see following screen
                                          
4.       Click on Invite someone, to call your friend to chat with you.
And select appropriate action according to your choice, how you want to deliver chat file to your friend. In this case I will like to go with save invitation file.



5.       Now send this file to your friend and password also to access this (typically pen drive is best media to deliver to your friend) . And you are done with this and ask your friend to run this file.


6.       Please give authentication when you receive confirmation message.  Now start chat.


Attention : you will able to share your screen also on making some setting. 
To make local connection use hotspot software or make ad-hoc network .

7.       Please like us on facebook at https://www.facebook.com/Only4student.in to know more updates. Thanks for coming.


Read More...

20 February 2014

Clustering in Matlab


Sample program for Clustering in matlab:     km_demo.m
% Demo for the kmeans algorithm

% First, generate sample data
%   We will test with 4 clusters in 3 dimensions,
%   by generating random data with gaussian density, variance 1,
%   with means (0,0,0), (0,0,6), (0,6,0) and (6,0,0)
%   and Ndata  200,       300,   100     and 500

K = 0;
dim = 3;
variance = 1;
sdev = sqrt(variance);
prompt={'Enter Number of Cluster(value between 2 to 4):'};
name='Input for Number of cluster';
numlines=1;
defaultanswer={'2'};
answer=inputdlg(prompt,name,numlines,defaultanswer);
x1=cell2mat(answer);
K=str2num(x1);
while(K>=7)
  answer=inputdlg('Wrong Input. Enter Number of Cluster(value between 2 to 6): ',name,numlines,defaultanswer);
x1=cell2mat(answer);
K=str2num(x1)
end
if(K==2)
 cluster1 = sdev*randn(200,dim) + kron(ones(200,1),[0,0,0]);
cluster2 = sdev*randn(300,dim) + kron(ones(300,1),[0,0,6]);
X = [cluster1 ; cluster2];
end
    if(K==3)
       cluster1 = sdev*randn(200,dim) + kron(ones(200,1),[0,0,0]);
cluster2 = sdev*randn(300,dim) + kron(ones(300,1),[0,0,6]);
cluster3 = sdev*randn(100,dim) + kron(ones(100,1),[0,6,0]);
X = [cluster1 ; cluster2 ; cluster3];
    end
   
 if(K==4)
    cluster1 = sdev*randn(200,dim) + kron(ones(200,1),[0,0,0]);
cluster2 = sdev*randn(300,dim) + kron(ones(300,1),[0,0,6]);
cluster3 = sdev*randn(100,dim) + kron(ones(100,1),[0,6,0]);
cluster4 = sdev*randn(500,dim) + kron(ones(500,1),[6,0,0]);
X = [cluster1 ; cluster2 ; cluster3; cluster4];
end

% Build data matrix


% Now apply K-means algorithm
% Note that order of results may vary
maxerr = 0;
[proto Nproto] = simple_kmeans(X,K,maxerr);
msgbox('Press OK to watch Cluster 1','Cluster1 Diagram');
pause(6);
plot(cluster1,'DisplayName','cluster1','YDataSource','cluster1');figure(gcf,'cluster1');
pause(20);
msgbox('Press OK to watch Cluster 2','Cluster2 Diagram');
pause(6);
plot(cluster2,'DisplayName','cluster2','YDataSource','cluster2');figure(gcf,'cluster2');
pause(20);
msgbox('Press OK to watch Cluster 3','Cluster3 Diagram');
pause(6);
plot(cluster3,'DisplayName','cluster3','YDataSource','cluster3');figure(gcf,'cluster3');
pause(20);
msgbox('Press OK to watch Cluster 4','Cluster4 Diagram');
pause(6);
plot(cluster4,'DisplayName','cluster4','YDataSource','cluster4');figure(gcf,'cluster4');

Sample code : simple_kmeans.m

function [means,Nmeans] = simple_kmeans(X,K,maxerr)


[Ndata, dims] = size(X);
dist = zeros(1,K);

for i=1:K-1
   means(i,:) = X(i,:);
end
means(K,:) = mean(X(K:Ndata,:));

cmp = 1 + maxerr;
while (cmp > maxerr)
   % Sums (class) and data counters (Nclass) initialization
   class = zeros(K,dims);
   Nclass = zeros(K,1);

   % Groups each elements to the nearest prototype
   for i=1:Ndata
      for j=1:K
         % Euclidean distance from data to each prototype
         dist(j) = norm(X(i,:)-means(j,:))^2;
      end
      % Find indices of minimum distance
      index_min = find(~(dist-min(dist)));
      % If there are multiple min distances, decide randomly
      index_min = index_min(ceil(length(index_min)*rand));
      class(index_min,:) = class(index_min,:) + X(i,:);
      Nclass(index_min) = Nclass(index_min) + 1;
   end
   for i=1:K
      class(i,:) = class(i,:) / Nclass(i);
   end

   % Compare results with previous iteration
   cmp = 0;
   for i=1:K
      cmp = norm(class(i,:)-means(i,:));
   end

   % Prototype update
   means = class;
end


Nmeans = Nclass;


This program gives you a better understanding of image clustering.

Read More...

Split string into different char[] in c#

It is not easy to implement this program in c/c++, but c# gives a very nice Method name +Spilt(char[]), which splits charactes according to the given char sequence.

Example:
using System;

public class SplitTest {
    public static void Main() {

        string words = "This is a list of words, with: a bit of punctuation" +
                       "\tand a tab character.";

        string [] split = words.Split(new Char [] {' ', ',', '.', ':', '\t' });

        foreach (string s in split) {

            if (s.Trim() != "")
                Console.WriteLine(s);
        }
    }
}

Results will be:

// The example displays the following output to the console: 
//       This 
//       is 
//       a 
//       list 
//       of 
//       words 
//       with 
//       a 
//       bit 
//       of 
//       punctuation 
//       and 
//       a 
//       tab 
//       character
Read More...

15 February 2014

Matlab R2010a crack

Matlab R2010a crack(32bit and 64 bit)

Download crack from: Here

we offer you two ways to license matlab r2010a:

Standalone

1) choose "install manually without using the internet"
2) enter the "file installation key"
   55013-56979-18948-50009-49060
3) use "license_standalone.dat" when asked for license file

Network

1) choose "install manually without using the internet"
2) enter the "file installation key"
   42149-27753-04517-22198-03397
3) if neccessary install "license manager"
4) use "license_server.dat" when asked for license file

enjoy !

Support blog.only4student.in
Read More...

Steps For Development of PHP Websites

Steps For Development of PHP Websites:
1. install Xampp,Wamp,or Apache server(Any one) Download:XamppWamp
2.install any php editor. Download Netbeans,Bluefish
3.Save files in c://xampp/htdocs/yourfile.php
4.Run on localhost as http://localhost/filename.php
|
|
|
Now Enjoy Php Coding
Read More...

Login Interface in Asp.net

Source Code Link:   CompleteLogin (10 KB)

Intorduction

Login Interface is most useful for knowing that who is accessing your website and protecting to unauthorized comments and access. In asp.net to implement login interface is quit easy. Platform needed: Visual Studio 12

Description

There are some steps to implements:
Step 1:
First of create an login form as given by drag and drop property of visual Studio 12
<form method=”get” action=”validate.aspx” >
<input id=”Text1″ type=”text” name=”username” style=”border-color:#0094ff;border-width:1px;border-radius:2px;margin-left:30px;color:#0094ff;opacity:0.7;” class=”auto-style2″ placeholder=”Email/Mobile” title=”Enter Email Address / Mobile Number” onfocus=”javascript:if(this.value==’Email/Mobile’){
this.value=”}” onblur=”javascript:if(this.value==”){
this.value=’Email/Mobile’}” />
<br /><br />
<input id=”Password1″ type=”password” name=”password” placeholder=”Password” style=”border-radius:2px;border-color:#0094ff;border-width:1px;margin-left:30px;color:#0094ff;” title=”Enter Password” class=”auto-style1″ onfocus=”javascript:if(this.value==’password’){
this.value=”}” onblur=”javascript:if(this.value==”){
this.value=’password’}” />
<br />
<a href=”forgot.aspx” style=”text-decoration:none;color:#0094ff;margin-left:30px;” title=”Click if you Forgot Password”>Forgot Password</a>
&nbsp;<input id=”Submit1″ type=”submit” value=”Signin” style=”margin-left:220px;color:#fff;background-color:#0094ff;height:30px;width:80px;” title=”Signin Now” />
</form>
Step 2: 
Create a Login validator file validate.aspx and edit validate.aspx.cs file as given below.  You need to create session for staying  user on the webpage. Cookies will hold you login details.
String username, password;
username = Request.QueryString["username"].ToString();
password = Request.QueryString["password"].ToString();
if (login(username, password))
{
Session["username"] = username;
Session["name"] = name;
HttpCookie registration = new HttpCookie(“username”);
HttpCookie registration1 = new HttpCookie(“password”);
registration.Expires.AddMonths(2);
registration1.Expires.AddMonths(2);
Response.Redirect(“search.aspx”);
}
else
{
Response.Redirect(“login.aspx”);
}
step 3:
 To verify email address create verify.aspx.cs as:
if (Session["email"] == null)
{
Response.Redirect(“verify1.aspx”);
}
else { 
email=Session["email"].ToString();
if (TextBox2.Text.Length >= 5)
{
if (TextBox2.Text.Equals(TextBox3.Text))
{
set_password(email, TextBox3.Text, TextBox1.Text);
}
else
{
Label1.Text = “Password not Matched..”;
TextBox2.Text = “”;
TextBox3.Text = “”;
}}
else
{
Label1.Text = “Password must be greater than 4 character..”;
}}}
step 4:
To verify Mobile Number create verify1.aspx.cs file
String email = “”;
if (Session["email"] != null)
{
Response.Redirect(“verify.aspx”);
}
else
{
email = TextBox4.Text;
if (TextBox2.Text.Length >= 5)
{
if (TextBox2.Text.Equals(TextBox3.Text))
{
set_password(email, TextBox3.Text, TextBox1.Text);
}
else
{
Label1.Text = “Password not Matched..”;
TextBox2.Text = “”;
TextBox3.Text = “”;
}
}
else
{
Label1.Text = “Password must be greater than 4 character..”;
}}}
Step 5:
If user forgot password then create password reset link by creating forgot.aspx.cs file. First of all check whether user exist or not. If user is not registered then need to register. Md5 encryption is needed for securing the http data, while you are creating the password reset link.
String source = @”Data Source=PROT\SQLEXPRESS;Initial Catalog=cms;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False”;
protected void Page_Load(object sender, EventArgs e)
{
}
Boolean validate_email(String email)
{
if (email.Contains(‘@’) && email.Contains(‘.’))
{
return true;
}
else
return false;
}
Boolean mailSender(String code, String taget_email)
{
try
{
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(taget_email);
message.From = new System.Net.Mail.MailAddress(“inform@only4student.in”);
message.Subject = “Password Recovery mail for ISS”;
message.Body = “As you requested for recovery of password .<br/> Password recovery code : <b> ” + code + “</b> <br/> Go on following link to reset your Password : <br/>Thnak you”;
System.Net.Mail.SmtpClient smtp =new System.Net.Mail.SmtpClient();
smtp.Port = 25;
smtp.Host = “mail.only4student.in”;
smtp.EnableSsl = false;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(“email@mail.in”, “*****”);
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Send(message);
return true;
}
catch (Exception ex)
{
Label2.Text = “We are not able to Change your password due to Network Problem.”+ex.Message;
//Error.Visible = true;
//Error.Text = “Recovery code IS : ” + code + “\n Plz. Copy it for further use and click on Hyperlink “;
//HyperLink1.Visible = true;
return false;
}
}
Boolean email_check(String email) {
String code = Membership.GeneratePassword(10, 5);
string select = “SELECT * FROM freeuser where email=’” + email + “‘”;
String query = “UPDATE freeuser SET recovercode=’” + code + “‘ where email=’” + email + “‘”;
SqlConnection conn = new SqlConnection(source);
conn.Open();
SqlCommand cmd = new SqlCommand(select, conn);
object o = cmd.ExecuteScalar();
if (o == null)
{
Label2.Text = “Your Email is not Registered….<a href=’Default.aspx’>Register Today</a>”;
return false;
}
else
{
//conn.Open();
SqlCommand cmd1 = new SqlCommand(query, conn);
int rowsReturned = cmd1.ExecuteNonQuery();
conn.Close();
Session["email"] = email;
if (mailSender(code, email))
return true;
else
return false;
}}
protected void Button1_Click(object sender, EventArgs e)
{
String email=”";
email = TextBox1.Text;
if (!email.Equals(“”))
{
if (validate_email(email))
{
if (email_check(email))
{
Label2.Text = “Your Password verification code is sent to your email address….<a href=’verify.aspx’>Verify Now</a>’”;
}
else
{
}
}
else {
Label2.Text = “Not a Valid Email Address…”;
}
}
else {
Label2.Text = “Please Specify you email Address..”;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect(“login.aspx”);
}
}

Time Required:

It will take 30-40 minutes to implement.
Read More...