Perte de cle de cryptage

Key for backup lost

J'ai eu le meme probleme , es ce lié a la nouvelle version de ios? Aucune aide d'apple

Similar Messages

  • How to list the available algorithms ?

    Hi,
    I would like to get all the available algorithms so that the user can choose the one he wants.
    Is it possible to write a generic function that can encryt/decrypt a file with an algorithm as parameter
    Because I've got the following problem : I use this code to list the available algorithms :
    public static String[] getCryptoImpls(String serviceType) {       
            Set result = new HashSet();                
            Provider[] providers = Security.getProviders();
            for (int i=0; i<providers.length; i++) {           
                Set keys = providers[ i].keySet();
                for (Iterator it=keys.iterator(); it.hasNext(); ) {
                    String key = (String)it.next();
                    key = key.split(" ")[0];   
                    if (key.startsWith(serviceType+".")) {
                        result.add(key.substring(serviceType.length()+1));
                    } else if (key.startsWith("Alg.Alias."+serviceType+".")) {                   
                        result.add(key.substring(serviceType.length()+11));
            return (String[])result.toArray(new String[result.size()]);
        }    I call it as : getCryptoImpls("Cipher");
    But some elements of the list are not available !
    Other problem :
    I encrypt/decrypt files using a password, and when I use different algorithms when encrypting and
    decrypting, it works ! Strange ...
    I create a key like this :
    SecretKey key = SecretKeyFactory.getInstance(algo).generateSecret(keySpec);here is the whole code for you to understand better :
        /*  CLASSE                  : CryptoUtils                                 */
        /*  PACKAGE                 : crypto.utils                                */   
        /*  AUTEUR                  : Guillaume YVON                              */
        /*  CREATION                : 15-07-2005                                  */
        /*  DERNIERE MODIFICATION   : 17-07-2005                                  */
        /*  DESCRIPTION             : gestion du cryptage / d�cryptage            */
    package crypto.utils;
    import crypto.component.*;
    import java.io.*;
    import java.util.*;
    import java.security.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.spec.*;
    public class CryptoUtils {   
        public static final int ENCRYPT_MODE = 1;
        public static final int DECRYPT_MODE = 2;
        /* ----- D�claration de variables ----- */
        private static Cipher ecipher;
        private static Cipher dcipher;      
        /* Cr�ation d'un vecteur d'initialisation de 8 octets */
        private static byte[] salt = {
            (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
            (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
        /* Compteur pour l'it�ration */
        private static int iterationCount = 19;
        /* Buffer utilis� pour transporter les octets entre les flux */
        private static byte[] buf = new byte[1024];
        /*            PROCEDURE D'INITIALISATION DES CLES DE CRYPTAGE             */
        /* PARAMETRES D'ENTREE                                                    */
        /*      - password => mot de passe pour le cryptage : String              */
        /* PARAMETRES DE SORTIE                                                   */
        /*      - aucun                                                           */
        private static void init(String password,String algo) {
            try {
                /* G�n�ration de la cl� de cryptage � partir du mot de passe */
                KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt, iterationCount);            
                SecretKey key = SecretKeyFactory.getInstance(algo).generateSecret(keySpec);
                ecipher = Cipher.getInstance(key.getAlgorithm());
                dcipher = Cipher.getInstance(key.getAlgorithm());
                /* Pr�paration des param�tres pour les ciphers */
                AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);
                /* Cr�ation des ciphers */
                ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
            } catch (Exception e){ System.err.println(e); }
        /*                   PROCEDURE DE CRYPTAGE / DECRYPTAGE                   */
        /* PARAMETRES D'ENTREE                                                    */
        /*      - mode        => mode de cryptage/decryptage : int                */
        /*      - in          => flux d'entr�e (lecture) : InputStream            */
        /*      - out         => flux de sortie (�criture) : OutputStream         */
        /*      - srcSize     => taille du fichier source : long                  */
        /*      - progressBar => barre de progression                             */
        /* PARAMETRES DE SORTIE                                                   */
        /*      - aucun                                                           */
        private static void crypt(int mode, InputStream in, OutputStream out, long srcSize,
    JProgressBarWindow progressBar){
            try {           
                if(mode == ENCRYPT_MODE){
                    /* Les octets �crits dans out seront crypt�s */
                    out = new CipherOutputStream(out, ecipher);
                }else if(mode == DECRYPT_MODE){
                    /* Les octets lus dans in seront d�crypt�s */           
                    in = new CipherInputStream(in, dcipher);
                /* Lit dans le texte clair les octets et �crit dans out pour le cryptage */
                int sum = 0;
                int numRead = 0;           
                while ((numRead = in.read(buf)) >= 0) {               
                    out.write(buf, 0, numRead);
                    sum += numRead;
                    Float percent = sum / (new Float(srcSize)) * 100;
                    if(progressBar!=null) progressBar.setValue(percent.intValue());               
                out.close();
            } catch (java.io.IOException e) { System.out.println(e); }
        /*             PROCEDURE DE LANCEMENT DU CRYPTAGE/DECRYPTAGE              */
        /* PARAMETRES D'ENTREE                                                    */
        /*      - mode        => mode de cryptage/decryptage : int                */
        /*      - algo        => algorythme � utiliser : String                   */
        /*      - srcFile     => flux d'entr�e (lecture) : String                 */
        /*      - tgtFile     => flux de sortie (�criture) : String               */
        /*      - password    => taille du fichier source : String                */
        /*      - progressBar => barre de progression : JProgressBarWindow        */
        /*      - text        => texte � afficher : String                        */
        /* PARAMETRES DE SORTIE                                                   */
        /*      - aucun                                                           */
        public static void launch(int mode,String algo,String srcFile,String tgtFile,String password,
                                    JProgressBarWindow progressBar,String text){
            try {           
                init(password,algo);                                  
                if(progressBar!=null && text!=null) progressBar.setLabelText(text);
                crypt(mode,new FileInputStream(srcFile),new
    FileOutputStream(tgtFile),FileUtils.getFileSize(srcFile), progressBar);                           
            } catch (Exception e) {}
        /*      FONCTION QUI RENVOIE LES IMPLEMENTATIONS DISPONIBLES POUR         */
        /*                          UN TYPE DE SERVICE                            */
        /* PARAMETRES D'ENTREE                                                    */
        /*      - serviceType => nom du service                                   */   
        /* PARAMETRES DE SORTIE                                                   */
        /*      - liste des impl�mentations : String[]                            */
        public static String[] getCryptoImpls(String serviceType) {       
            Set result = new HashSet();                
            Provider[] providers = Security.getProviders();
            for (int i=0; i<providers.length; i++) {           
                Set keys = providers[ i].keySet();
                for (Iterator it=keys.iterator(); it.hasNext(); ) {
                    String key = (String)it.next();
                    key = key.split(" ")[0];   
                    if (key.startsWith(serviceType+".")) {
                        result.add(key.substring(serviceType.length()+1));
                    } else if (key.startsWith("Alg.Alias."+serviceType+".")) {                   
                        result.add(key.substring(serviceType.length()+11));
            return (String[])result.toArray(new String[result.size()]);
        /*     FONCTION QUI RENVOIE LA LISTE DES TYPES DE SERVICE DISPONIBLES     */   
        /* PARAMETRES D'ENTREE                                                    */
        /*      - aucun                                                           */   
        /* PARAMETRES DE SORTIE                                                   */
        /*      - liste des services : String[]                                   */
        public static String[] getServiceTypes() {
            Set result = new HashSet();           
            Provider[] providers = Security.getProviders();
            for (int i=0; i<providers.length; i++) {           
                Set keys = providers[ i].keySet();
                for (Iterator it=keys.iterator(); it.hasNext(); ) {
                    String key = (String)it.next();
                    key = key.split(" ")[0];   
                    if (key.startsWith("Alg.Alias.")) {                   
                        key = key.substring(10);
                    int ix = key.indexOf('.');
                    result.add(key.substring(0, ix));
            return (String[])result.toArray(new String[result.size()]);
    }Any tip is welcome !
    (sorry for the french comments...)

    From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
    JAVAJAR$
    JAVAJAROBJECTS$
    By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
    These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
    But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.

  • ORACLE 8.1.6 install Linux 7.1(CLE 1.0) problem

    when I run oracle install progrm
    oralce installer can't display chinese character in the install from.
    Any problem on CLE 1.0 or ORACLE ?
    null

    I find cause of error:
    I export LC_ALL=C
    and LANG=C and installer starts.
    Now I have another problem:
    after installing jre oracle says:
    Error setting permisissions
    of file/directory
    /ora8/product/jre/1.1.8/LICENSE
    and then, if I skip install of JRE
    I have no NET8 configuration
    and database creation :(

  • Encrypt passwords in cle-providers.xml

    Hi,
    I posted this question on JHeadstart forum but they advised me to find help here.
    I have a JHeadstart application (say the shipped jhsdemo) use 9iAS R2 OC4J 9.0.3 and consider to use OEM for managing the application.
    How can I use encryption to protect the user passwords in cle-providers.xml. I know I must enter encryption value BASE-64, but how can I get the password to be encrypted and how is it decrypted again?
    Another question: why do I need to enter username+password once as part of the jdbc thin URL in "connectionstring" and once as separate arguments "user" and "password"? The same question for db host, sid and port.
    Thnx,
    Rinse Veltman
    My cle-providers.xml:
    <?xml version = '1.0'?>
    <cle-providers>
    <provider name="SomeServiceProvider" class="oracle.clex.persistence.bc4j.ApplicationModuleProvider">
    <property name="persistencebase" value="comp.app.persistence.bc4j"/>
    <property name="modulename" value="comp.app.persistence.bc4j.Bc4jModule"/>
    <property name="connectionstring" value="jdbc:oracle:thin:<user>/<pwd>@<host>:1521:<sid>"/>
    <property name="user" value="<user>"/>
    <property name="password" value="<pwd>"/>
    <property name="host" value="<host>"/>
    <property name="sid" value="<sid>"/>
    <property name="port" value="1521"/>
    <property name="encryptiontype" value=""/>
    <property name="drivertype" value=""/>
    <property name="failover" value=""/>
    <property name="scope" value="request"/>
    <property name="managestate" value="false"/>
    </provider>
    </cle-providers>

    Ahhh. The forum isn't showing it as I meant.
    This is my connectionstring property:
    <property name="connectionstring" value="jdbc:mysql://localhost:3306/opa?ultraDevHack=true& amp; user=root& amp; password=test"/>
    <property name="connectionstring" value="jdbc:mysql://localhost:3306/opa?ultraDevHack=true& a m p ; user=root& a m p ; password=test"/>
    (without the spaces)
    (without the spaces)

  • USB 3G cle and Mac book pro

    I cant get my orange fr 3G usb cle do work on my new mac book pro - it automatically downloaded on my friends mac but won't on mine

    Thanks!

  • Reference a dataSource in cle-providers.xml

    How can I reference in cle-providers.xml a dataSource specified in data-sources.xml in my OC4J configuration. So that I can specify my datasources in a generic way
    outside my application?
    My cle-providers.xml :
    <?xml version = '1.0'?>
    <cle-providers>
    <provider name="IarEntryServiceProvider" class="oracle.clex.persistence.bc4j.ApplicationModuleProvider">
    <property name="persistencebase" value="asml.iar.persistence.bc4j"/>
    <property name="modulename" value="asml.iar.persistence.bc4j.IarBc4jModule"/>
    <property name="connectionstring" value="jdbc:oracle:thin:<user>/<pwd>@<host>:1521:<sid>"/>
    <property name="user" value="<user>"/>
    <property name="password" value="<pwd>"/>
    <property name="host" value="<host>"/>
    <property name="sid" value="<sid>"/>
    <property name="port" value="1521"/>
    <property name="encryptiontype" value=""/>
    <property name="drivertype" value=""/>
    <property name="failover" value=""/>
    <property name="scope" value="request"/>
    <property name="managestate" value="false"/>
    </provider>
    </cle-providers>
    My data-sources.xml:
    <?xml version="1.0" standalone='yes'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" " " target="_new">http://xmlns.oracle.com/ias/dtds/data-sources.dtd"> <data-sources>
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="MyDataSource"
    location="jdbc/MyDataSource"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@<host>:5521:<sid>"
    username="<username>"
    password="<pwd>"
    inactivity-timeout="30"
    />
    </data-sources>
    I also posted this question on cleveland forum. In the JHeadstart documentation I miss a proper description of what
    my options are in cle-providers.xml. In the Jheadstart developer guide there are references to Cleveland docs but
    where can I find these; is it possible to ship these together with the JHeadstart documentation?
    Regards,
    Rinse Veltman
    CIBER Solution Partners

    Rinse,
    Do you want BC4J to use your connection defined in data-sources.xml, instead of its own connection pooling mechanism? Or do you want to use the connection straight in your own code?
    For configuring BC4J to use data-sources.xml, I copied this from the Jdev online help:
    For Local or web module deployment, you can use a JDBC URL or a JDBC data source. However, make sure that you rebuild the Middle Tier BC4J project to make the configuration available to the JSP client. You'll also need to edit the x:\<ORACLE_HOME>\j2ee\home\config\data-sources.xml file to include a matching <location> value that you are using in your BC4J project. By default, local or web module deployments use the JDBC URL connection.
    In combination with the MVC Framework cle-providers.xml, this means you should specify the data-osurces.xml <location> value as the value of the connectionstring attribute within the <provider> element. We have not tested this though...
    Note that although using data-sources.xml is more "standards-based", the connection pooling facility of BC4J is superior with its support for high-water marks. See jdev online help for more info on this. I also think that password encryption is not yet possible in data-sources.xml.
    I could not find the MVC Framework User Guide on OTN anymore. I will check where it is located and let you know.
    Steven Davelaar,
    JHeadstart Team.

  • Does & in cle-providers.xml connectionstring work ?

    I have following connectstring in the cle-providers.xml file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <cle-providers>
    <provider name="OpaServiceProvider" class="oracle.clex.persistence.bc4j.ApplicationModuleProvider">
    <property name="persistencebase" value="oravision.opa.persistence.bc4j"/>
    <property name="modulename" value="oravision.opa.persistence.bc4j.OpaModule"/>
    <property name="connectionstring" value="jdbc:mysql://localhost:3306/opa?ultraDevHack=true&amp;user=root&amp;password=test"/>
    <property name="user" value=""/>
    <property name="password" value=""/>
    <property name="host" value=""/>
    <property name="sid" value=""/>
    <property name="port" value=""/>
    <property name="encryptiontype" value=""/>
    <property name="drivertype" value=""/>
    <property name="failover" value=""/>
    <property name="scope" value="request"/>
    <property name="managestate" value="false"/>
    </provider>
    </cle-providers>
    Does the &amp; work ?
    The connectstring URL should be:
    jdbc:mysql://localhost:3306/opa?ultraDevHack=true&user=root&password=test
    which works in the BC4J tester!

    Ahhh. The forum isn't showing it as I meant.
    This is my connectionstring property:
    <property name="connectionstring" value="jdbc:mysql://localhost:3306/opa?ultraDevHack=true& amp; user=root& amp; password=test"/>
    <property name="connectionstring" value="jdbc:mysql://localhost:3306/opa?ultraDevHack=true& a m p ; user=root& a m p ; password=test"/>
    (without the spaces)
    (without the spaces)

  • Perte connexion usb

    Bonjour,
    J'utilise un cDAQ-9174 et j'observe des perte de communication càd que j'ai des erreurs NI qui apparaîssent comme-ci je déconnectais le module du port usb.
    Sous Windows, dans la barre des taches, j'observe la perte de com et la nouvelle détection du module juste après ???
    Avez-vous déjà rencontré ce problème ? C'est + un problème Windows ou NI ?
    Merci d'avance.
    Philippe B.
    Certified Associate Developer / Dépt Moyens d'essais
    www.ingenia-system.com

    Bonjour,
    Il se peut que Windows passe le port USB en veille (mode sleep ou hibernate) et cela peut parfois causer ce type de comportement.
    Vous pouvez essayer de désactiver la mise en veille des ports :
    Clique droit sur le Poste de travail » Propriétés » Matériel » Gestionnaire de périphérique » Concentrateur USB Racine » Gestion de l'alimentation.
    Ce n'est qu'une hypothèse. Pouvez vous fournir le code d'erreur associé ?
    Est-ce le cable USB original ?
    Disposez vous d'un sniffer USB ? (matériel ou logiciel).
    Cordialement,
    Da Helmut

  • Does any actually use Pert view?

    The Pert view seems to very hard to organize activities especially when you're working with a couple hundred of them. Does anyone actually use the Pert view, and why do you use it instead of the bar chart? Is Pert better for small projects that don't have many activities?

    Mike M ,
    Under most circumstances we do not use a "pert" formatted chart. They are cumbersome with larger projects but every once in a while a stakeholder has a preference for that particular "look". It all depends on the way the project manager or lead is used to working with his or her schedules.
    I find them useful in the planning stages of putting a schedule together.
    hope this helps,

  • PERT Functionality in SAP

    Hello sap experts,
    Can you please tell me the availability of PERT functionality in SAP PS ? I know CPM is available in sap.
    Prasad

    Yes, Pert Model is supported in SAP PS:
    You have features like Milestone monitoring, critical path analysis,Cost analysis, alerts, network representation and gant representation, relations between activities etc.
    Can you eloborate on what kind of functionalities are expecting ?
    Regards,
    Ramesh.

  • Bonjour, je suis en voyage et j'ai quelques soucis pour me connecter au wifi, tant avec mon iPhone qu'avec mon MacBook Pro. Après avoir introduit la cle wpe, il ne se passe plus rien. Si ce n'est un point d exclamation sur l indicateur reseau.

    Bonjour, je suis en voyage en irlande et j'ai quelques soucis pour me connecter au wifi, tant avec mon iPhone qu'avec mon MacBook Pro. Après avoir introduit la cle wpe, il ne se passe plus rien. Si ce n'est un point d exclamation sur l indicateur reseau.  Idem avec les reseau publics sans code d acces.
    Si vous wives une brillante idee cela m aiderait
    Merci

    Merci jmlevy de te pencher sur mon problème.
    Voilà une photo de mon panneau page :
    Puis une autre d'une page qui ne ressemble plus à rien après changement de pagination:
    Voici une ancienne page 28 devenue page 29. Fantastique, non ?
    On peut voir :
    Que mes blocs sont décalés par rapport à la maquette
    que le bloc noir de la page 28 déborde sur la page 29.
    Que mon bloc de texte est perturbé par l'ajout sous-jacent d'une page de maquette
    que ma pagination a conservé les attributs d'une page pair (numérotation à gauche) alors qu'elle est passée impaire.
    J'aurai considéré comme normal que mon ancienne p.28 se soit déplacée en page impaire avec le bloc texte bien placé ET avec les attributs de page (liés au gabarit, tels que pagination, filets, bas de page roulants) modifiés automatiquement. Or il n'en est rien.
    Tu me demandais des éclaircissements par rapport à "J'importe mes gabarits dans le document au fur et à mesure de la construction du livre et je libère les éléments de gabarit afin de pouvoir couler le texte et disposer l'icono. Lorsque c'est fait, je ne retourne pas dans le mode page d'InDesign. J'attaque la page suivante." Voici, plus en détails ce que je fais au moment où je monte une nouvelle page. Mes gabarits ont été  préparé en amont.
    J'ajoute une page au document (ex : une page de texte)
    je lui confère le gabarit qui va avec (ex : C-présentation ch1, cf plus haut)
    je libère les éléments de gabarits pour pouvoir couler le texte et disposer les images.
    quand ma page est finie je recommence l'étape 1.
    Est-ce que c'est à l'étape 3 que je me plante ?
    Est-ce qu'il y aurait d'autres explications à ce malheureux schmilblick ?
    Merci d'avance.

  • Bonjour, problème de connexion car perte du mot de passe ?. comment débloquer la situation ?., Bonjour, problème de connexion car perte du mot de passe ?. comment débloquer la situation ?.

    Bonjour, problème de connexion car perte du mot de passe ?. comment débloquer la situation ?., Bonjour, problème de connexion car perte du mot de passe ?. comment débloquer la situation ?.

    Bonjour,
    D'abord, ce forum est essentiellement en anglais, donc ce serait le bon moment pour se replonger dans la langue de Shakespeare...
    Ensuite, pour résoudre ton problème, il te faut le CD ou DVD d'installation de ton OS (la version de MacOS X actuellement installée sur ton Mac). Après ça, il te faut :
    1) Démarrer sur le CD/DVD en appuyant sur la touche "alt" au démarrage, puis en choisissant le CD sur l'écran ;
    2) Sur l'écran d'installation, au menu "Installeur", tu as un choix qui s'intitule "Reset password" ou "Changer le mot de passe utilisateur" si tu es en français ; alternativement, tu peux cliquer sur Outils/Utilitaires, sélectionner le volume de démarrage, puis le compte pour lequel tu dois remettre un nouveau mot de passe. Entre un nouveau mot de passe dans les cases prévues à cet effet, confirme le nouveau mot de passe, et voilà...
    Redémarre ton Mac normalement, sans le DVD, et tu devrais être tiré d'affaire.

  • Suite a perte du mot de passe windows comment désaciviter lightroom par l'accès invité ?

    .Suite à la perte du mot de passe desinstaller windows 8.1 sur mon portable ASUS. Comment désactiviter lightroom 5 par l'accès invité pour pouvoir le réactiver ?

    There is no need (or means) to deactivate Lightroom.  Just reinstall and reactivate using the serial number you have.

  • Pls help me to execute this code for pert analysis..

    hi friend;
    i m new in java and i have downloaded some code for pert analysis which is giving some exception called run time .so,pls tell how to give the i/p..bcoz i faceing some at tha time. aur if u have pls send me pert analysis code..
    the code is below.......
    thanks
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.StringTokenizer;
    public class Proyecto {
         * @param args
         public static void main(String[] args) {
              String texto = null;
              int n = 0, t = 0;
              Tarea tareas[] = null, inicio = null, fin = null;
              try {
                   BufferedReader in = new BufferedReader(new InputStreamReader(
                             System.in));
                   texto = in.readLine();
                   n = Integer.parseInt(texto);
                   tareas = new Tarea[n];
                   inicio = new TareaInicio();
                   fin = new TareaFinal();
                   inicio.setNombre("Inicio");
                   inicio.setTiempo(0);
                   fin.setNombre("Fin");
                   fin.setTiempo(0);
                   for (int i = 0; i < n; i++) {
                        texto = in.readLine();
                        tareas[i] = new Tarea();
                        StringTokenizer st = new StringTokenizer(texto, ",");
                        String nombre, tipo, tiempo;
                        nombre = st.nextToken();
                        tipo = st.nextToken();
                        tareas.setNombre(nombre);
                        if (tipo.equals("F")) {
                             tiempo = st.nextToken();
                             tareas[i].setTiempo(Integer.parseInt(tiempo));
                        } else if (tipo.equals("A") || tipo.equals("P")) {
                             tareas[i].setTiempo(0);
                   texto = in.readLine();
                   t = Integer.parseInt(texto);
                   for (int i = 0; i < t; i++) {
                        String org, des;
                        Tarea torg = null, tdes = null;
                        texto = in.readLine();
                        StringTokenizer st = new StringTokenizer(texto, ",");
                        org = st.nextToken();
                        des = st.nextToken();
                        if (org.equals(inicio.getNombre())) {
                             torg = inicio;
                        } else {
                             for (int j = 0; j < n; j++) {
                                  if (org.equals(tareas[j].getNombre())) {
                                       torg = tareas[j];
                                       break;
                        if (des.equals(fin.getNombre())) {
                             tdes = fin;
                        } else {
                             for (int j = 0; j < n; j++) {
                                  if (des.equals(tareas[j].getNombre())) {
                                       tdes = tareas[j];
                                       break;
                        if (torg == null || tdes == null) {
                        torg.addConcecuente(tdes);
                        tdes.addAntecedente(torg);
              } catch (IOException e) {
                   System.out.println("Error en entrada de datos");
              fin.terminacionRapida();
              inicio.inicioTardio();
              System.out.print("Ruta Critica: Inicio, ");
              for (int i = 0; i < n; i++) {
                   if (tareas[i].isCritico()) {
                        System.out.print(tareas[i].getNombre() + ", ");
              System.out.print(" Fin\n");
              System.out.println("Tiempo: " + fin.inicioTardio());
              System.out.println(inicio.getNombre() + " holgura: "
                        + inicio.getHolgura());
              for (int i = 0; i < n; i++) {
                   System.out.println(tareas[i].getNombre() + " holgura: "
                             + tareas[i].getHolgura());
              System.out.println(fin.getNombre() + " holgura: " + fin.getHolgura());
    import java.util.ArrayList;
    public class Tarea {
         private String nombre;
         private int tiempo;
         private int holgura;
         private ArrayList antecedentes;
         private ArrayList consecuentes;
         private int iniciomasrapido;
         private int terminacionmasrapida;
         private int iniciomastarde;
         private int terminaciontarde;
         Tarea(){
              this.antecedentes = new ArrayList();
              this.consecuentes = new ArrayList();
         void setNombre(String nombre){
              this.nombre=nombre;
         void setTiempo(int tiempo){
              this.tiempo=tiempo;          
         public String getNombre() {
              return nombre;
         public int getTiempo() {
              return tiempo;
         public int terminacionRapida(){
              this.iniciomasrapido=0;
              for (int i = 0; i < antecedentes.size(); i++) {               
                   if(((Tarea)antecedentes.get(i)).terminacionRapida()>this.iniciomasrapido){
                        this.iniciomasrapido=((Tarea)antecedentes.get(i)).terminacionRapida();                    
              this.terminacionmasrapida=this.iniciomasrapido+this.tiempo;
              return (this.terminacionmasrapida);
         public int inicioTardio(){
              this.terminaciontarde=999999;
              for (int i = 0; i < consecuentes.size(); i++) {
                   if(((Tarea)consecuentes.get(i)).inicioTardio()<this.terminaciontarde){
                        this.terminaciontarde=((Tarea)consecuentes.get(i)).inicioTardio();                    
              this.iniciomastarde=this.terminaciontarde-this.tiempo;
              return (this.iniciomastarde);
         int getHolgura(){
              this.holgura=this.iniciomastarde-this.iniciomasrapido;
              return this.holgura;
         @SuppressWarnings("unchecked")
         public void addAntecedente(Tarea t){
              this.antecedentes.add(t);
         @SuppressWarnings("unchecked")
         public void addConcecuente(Tarea t){
              this.consecuentes.add(t);          
         boolean isCritico(){
              return (this.getHolgura()==0);          
    public class TareaFinal extends Tarea {
         public int inicioTardio(){
              return this.terminacionRapida();          
         public int getHolgura(){
              return 0;          
    public class TareaInicio extends Tarea {
         public int terminacionRapida(){
              return 0;
         public int getHolgura(){
              return 0;          

    Here is your code in code tags
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package proyecto;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.util.StringTokenizer;
    public class Proyecto {
        private static int i;
         * @param args the command line arguments
        public static void main(String[] args) {
            String texto = null;
    int n = 0, t = 0;
    Tarea tareas[] = null, inicio = null, fin = null;
    try {
    BufferedReader in = new BufferedReader(new InputStreamReader(
    System.in));
    texto = in.readLine();
    n = Integer.parseInt(texto);
    tareas = new Tarea[n];
    inicio = new TareaInicio();
    fin = new TareaFinal();
    inicio.setNombre("Inicio");
    inicio.setTiempo(0);
    fin.setNombre("Fin");
    fin.setTiempo(0);
    for (int i = 0; i < n; i++) {
    texto = in.readLine();
    tareas[i] = new Tarea();
    StringTokenizer st = new StringTokenizer(texto, ",");
    String nombre, tipo, tiempo;
    nombre = st.nextToken();
    tipo = st.nextToken();
    tareas.setNombre(nombre);
    if (tipo.equals("F")) {
    tiempo = st.nextToken();
    tareas[i].setTiempo(Integer.parseInt(tiempo));
    } else if (tipo.equals("A") || tipo.equals("P")) {
    tareas[i].setTiempo(0);
    texto = in.readLine();
    t = Integer.parseInt(texto);
    for (int i = 0; i < t; i++) {
    String org, des;
    Tarea torg = null, tdes = null;
    texto = in.readLine();
    StringTokenizer st = new StringTokenizer(texto, ",");
    org = st.nextToken();
    des = st.nextToken();
    if (org.equals(inicio.getNombre())) {
    torg = inicio;
    } else {
    for (int j = 0; j < n; j++) {
    if (org.equals(tareas[j].getNombre())) {
    torg = tareas[j];
    break;
    if (des.equals(fin.getNombre())) {
    tdes = fin;
    } else {
    for (int j = 0; j < n; j++) {
    if (des.equals(tareas[j].getNombre())) {
    tdes = tareas[j];
    break;
    if (torg == null || tdes == null) {
    torg.addConcecuente(tdes);
    tdes.addAntecedente(torg);
    } catch (IOException e) {
    System.out.println("Error en entrada de datos");
    fin.terminacionRapida();
    inicio.inicioTardio();
    System.out.print("Ruta Critica: Inicio, ");
    for (int i = 0; i < n; i++) {
    if (tareas[i].isCritico()) {
    PrintStream printf = System.out.printf(tareas[i].getNombre(), ", ");
    System.out.print(" Fin\n");
    System.out.printf("Tiempo: ", fin.inicioTardio());
    System.out.printf(inicio.getNombre()+ " holgura: ", inicio.getHolgura());
    System.out.printf(tareas[i].getNombre()+ " holgura: ", tareas[i].getHolgura());
    System.out.printf(fin.getNombre()+ " holgura: ", fin.getHolgura());
    }the a another class /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package proyecto;
    import java.util.ArrayList;
    * @author Kenneth Rinderhagen
    class Tarea {
    private String nombre;
    private int tiempo;
    private int holgura;
    private ArrayList antecedentes;
    private ArrayList consecuentes;
    private int iniciomasrapido;
    private int terminacionmasrapida;
    private int iniciomastarde;
    private int terminaciontarde;
    Tarea(){
    this.antecedentes = new ArrayList();
    this.consecuentes = new ArrayList();
    void setNombre(String nombre){
    this.nombre=nombre;
    void setTiempo(int tiempo){
    this.tiempo=tiempo;
    public String getNombre() {
    return nombre;
    public int getTiempo() {
    return tiempo;
    public int terminacionRapida(){
    this.iniciomasrapido=0;
    for (int i = 0; i < antecedentes.size(); i++) {
    if(((Tarea)antecedentes.get(i)).terminacionRapida()>this.iniciomasrapido){
    this.iniciomasrapido=((Tarea)antecedentes.get(i)).terminacionRapida();
    this.terminacionmasrapida=this.iniciomasrapido+this.tiempo;
    return (this.terminacionmasrapida);
    public int inicioTardio(){
    this.terminaciontarde=999999;
    for (int i = 0; i < consecuentes.size(); i++) {
    if(((Tarea)consecuentes.get(i)).inicioTardio()<this.terminaciontarde){
    this.terminaciontarde=((Tarea)consecuentes.get(i)).inicioTardio();
    this.iniciomastarde=this.terminaciontarde-this.tiempo;
    return (this.iniciomastarde);
    int getHolgura(){
    this.holgura=this.iniciomastarde-this.iniciomasrapido;
    return this.holgura;
    @SuppressWarnings("unchecked")
    public void addAntecedente(Tarea t){
    this.antecedentes.add(t);
    @SuppressWarnings("unchecked")
    public void addConcecuente(Tarea t){
    this.consecuentes.add(t);
    boolean isCritico(){
    return (this.getHolgura()==0);
    then another class /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package proyecto;
    * @author Kenneth Rinderhagen
    public class TareaInicio extends Tarea {
    public int terminacionRapida(){
    return 0;
    public int getHolgura(){
    return 0;
    }and then  the tereaFinal class/*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package proyecto;
    * @author Kenneth Rinderhagen
    public class TareaFinal extends Tarea {
    public int inicioTardio(){
    return this.terminacionRapida();
    public int getHolgura(){
    return 0;

  • Cle non valide pour l'utilisation dans l'etat specifie sur installation de la version d'essai de PSE Premiere 12

    Bonjour. Je ne parviens pas à installer la version d'essai de PSE premiere 12. J'ai déla la version PSE Photoshop 12 qui est installée et qui fonctionne correctement. J'ai le message "cle non valide pour l'utilisation dans l'etat specifie" qui apparaît. Merci d'avance pour votre aide.

    Bonjour,
    Lorsque vous rencontrez cette erreur,Lancez le programme en tant qu'administrateur puis changez le répertoire d'installation sur un autre lecteur (exemple Disque D: ), j'ai rencontré le problème et cette solution a fonctionné pour moi.
    Bien cordialement

Maybe you are looking for