Not compressing string from input file

I can’t seem to figure out why my compressed string is wrong. The input file is

aaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

and my output should be aCbc but I keep getting aCba.

I am using compression scheme that is used by Fax machines, called run length encoding.

Here is the code behind it:

 public static void comp(Scanner scan)
 {
  String input = scan.next();

  String numChars =
  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

  for (int i = 0; i < input.length(); i++)
  {
     char x = input.charAt(i);
     int count = 0;
     int y = 0;
     boolean t = true;
     for (int j = i; j < input.length(); j++)
     {
        if (x != input.charAt(j))
        {
        t = false;
        }
        if ((t < input.length()) && (j+1 < input.length())
        {
           y++;
        }
     }
     count = y;
     while (y > 61)
     {
        System.out.print(x + "" + 'z');
        y -= 61;
     }
     System.out.print(x + "" + numChars.charAt(y));
     i += count;
  }
}
Posted in Codes & Scripts | Tagged , , , , | Leave a comment

is the mainwindow. xaml a class in c# please need help in 5minutes or less!

Gyazo – 4f32a3a484e5bed1a59dc4a7072f5bef.png (http://gyazo.com/4f32a3a484e5bed1a59dc4a7072f5bef)

please answer quick in 5minutes

Posted in Codes & Scripts | Tagged , , , , , , , | Leave a comment

Add New Feature To Our Plugin

We urgently new to add a new feature to the wordpress plugin created by our in house programmers

The plugin works like a cloaking plugin that has many other features and analytics of links tools

The new feature we want to add to the plugin is a keyword linking to… Required Skills: CSS, Javascript, PHP, Programming

Posted in Custom Requests | Tagged , | Leave a comment

Clone Phonecall entity

I am going to clone a phone call record, for that i do following

Entity originalToDo = crmService.Retrieve("phonecall", new Guid(originalToDoId), cols);

Entity cloneToDo = originalToDo;

and remove activityid and activitypartyid

if (originalToDo.Attributes.Contains("to"))
                {
                    foreach (Entity item in ((EntityCollection)(originalToDo.Attributes["to"])).Entities)
                    {
                        RemoveProperties(item, "activityid");
                        RemoveProperties(item, "activitypartyid");

                    }

                }

cloneToDo.Attributes["to"] = (EntityCollection)originalToDo.Attributes["to"];

 CreateRequest crRequest = new CreateRequest();  crRequest.Target = cloneToDo;

CreateResponse crResponse = (CreateResponse)service.Execute(crRequest);

But above line gives me an exception : Cannot insert duplicate key

Please suggest me, what i have missing ?

Posted in Codes & Scripts | Tagged , , | Leave a comment

Question Need help.

first of all apologies if i say something silly in my post since im not a professional developer.

Anyways my question is I have created a html email signature and it’s working fine when i browser it, but when I copy it from my browser (select all) and paste it into my outlook (by creating new…

Posted in Codes & Scripts | Tagged , , | Leave a comment