Skip to main content

Featured

How To Configure Mail Client From "mobileconfig" File ( iOS )

If you want to configure mail client of your web email address from mobileconfig to your ios device.
Follow the steps: Download the mobileconfig file from your email provider. In my case cPanel Email (->Email Configuration -> Select the email address -> IMAP (application:ios) ->Proceed ).Now you will get mobileconfig.Upload that mobileconfig file to files.fm. And note down generated that link.Open that link from safari your iOS device.Click on the file.Now opens a screen showing the profile. Click install -> Type passcode -> install.Now it will ask for the password of your email address.Done. Now you can use your new email profile for sending and receiving emails.



ASCII STRING FORMING







Input is taken from the user and that string is formed from scratch.
Individual character of the string is taken. Each char is incremented on its ASCII value and checked against the given string.
This process is carried out till we get all the characters of the formed string match the given string.


SourceCode:

import java.awt.Toolkit;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author sooryagangarajk
 */
public class StringMagic {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in).useDelimiter("");
        String s = in.nextLine();
        int[] cia = new int[s.length()];
        int[] ans = new int[s.length()];
        int[] ciaf = new int[s.length()];
        for (int i = 0; i < s.length(); i++) {
            cia[i] = (int) s.charAt(i);
            ciaf[i] = 0;
            ans[i] = 32;
        }
        System.out.println("------------------------------------");
        System.out.println("String forming:");
        for (int j = 0; j < 255; j++) {
            int flag = 0, count = 0;
            for (int i = 0; i < s.length(); i++) {
                if (ciaf[i] == 0) {
                    if (ans[i] != cia[i]) {
                        ans[i]++;
                        Toolkit.getDefaultToolkit().beep();
                    } else {
                        ciaf[i] = 1;
                    }

                }
                System.out.print((char) ans[i]);
            }
            try {
                Thread.sleep(500);
                for (int clear = 0; clear < 1000; clear++) {
                    System.out.println("\b");
                }
            } catch (InterruptedException ex) {
                Logger.getLogger(StringMagic.class.getName()).log(Level.SEVERE, null, ex);
            }
            for (int i = 0; i < s.length(); i++) {
                if (ciaf[i] == 1) {
                    count++;
                }
                if (count == s.length()) {
                    flag = 1;
                    break;
                }

            }
            if (flag == 1) {
                break;
            }

        }
        System.out.print(s + " "); //// S G K ////

    }
}

Popular Posts