Ir para conteúdo
Fórum Script Brasil

Todas Atividades

Atualizada automaticamente

  1. Hoje
  2. Changer la sonnerie de son iPhone est une excellente manière de personnaliser son appareil et d'éviter la sonnerie par défaut que tout le monde utilise. Dans cet article, nous vous expliquons étape par étape comment changer la sonnerie de votre iPhone rapidement et facilement. 1. Utiliser les Sonneries Intégrées d'Apple Apple propose une large gamme de sonneries par défaut que vous pouvez utiliser sans effort. Voici comment les changer : Ouvrez l'application Réglages sur votre iPhone. Allez dans Sons et vibrations. Appuyez sur Sonnerie. Sélectionnez la sonnerie de votre choix dans la liste. C'est la méthode la plus simple pour changer la sonnerie de son iPhone. 2. Acheter une Nouvelle Sonnerie sur l'iTunes Store Si vous souhaitez une sonnerie plus originale, vous pouvez en acheter une sur l'iTunes Store. Accédez à l'application iTunes Store. Appuyez sur Plus, puis Sonneries. Recherchez une sonnerie et achetez-la. Une fois téléchargée, elle apparaîtra automatiquement dans les réglages des sonneries. 3. Créer une Sonnerie Personnalisée avec iTunes ou GarageBand Si vous préférez utiliser votre propre musique comme sonnerie, vous pouvez créer une sonnerie personnalisée avec iTunes ou GarageBand. Avec iTunes : Ouvrez iTunes sur votre ordinateur et importez la musique de votre choix. Découpez un extrait de 30 secondes maximum. Convertissez l'extrait en format AAC. Renommez le fichier en .m4r (format de sonnerie iPhone). Transférez-le sur votre iPhone via iTunes ou Finder. Accédez aux réglages et appliquez la sonnerie. Avec GarageBand : Ouvrez GarageBand sur votre iPhone. Importez un fichier audio et modifiez-le si besoin. Exportez-le en tant que sonnerie. Définissez-le comme sonnerie par défaut. 4. Utiliser une Application Tierce pour Changer la Sonnerie de son iPhone Certaines applications comme Zedge ou Ringtones for iPhone permettent de télécharger et de créer des sonneries facilement. Voici comment procéder : Téléchargez une application de sonneries sur l'App Store. Choisissez une sonnerie et suivez les instructions pour l'ajouter à votre iPhone. Appliquez la sonnerie via les réglages. Conclusion Changer la sonnerie de son iPhone est simple et rapide grâce aux différentes méthodes disponibles : utilisation des sonneries par défaut, achat sur iTunes Store, création via iTunes ou GarageBand, ou encore applications tierces. Suivez ces instructions pour personnaliser votre iPhone selon vos préférences !
  3. Última semana
  4. Boa noite/dia a todos os utilizadores deste forum. Vim por este meio pedir ajuda devio ao meu codigo gerar erros os quais a natureza calculo que seja divina. O meu codigo "funciona " como um corretor de ortografia, que l^e de um dicionario e compara as palavras lidas pelo stdin as suas, e se não tiver match, marca como errado. Este e compilado numa virtual machine de linux, usando gcc, e as seguintes opçoes -Wall -O3 -g. segue em anexo o codigo, um exemplo de bom funcionamento e o erro que esta a ocorrer. Ficaria eternamente grato a quem me pudesse ajudar. #include <stdio.h>//bibliotecas standard de input output// #include <stdlib.h>//bibliotecas standard de alocaçao de memoria// #include <string.h>//usada na manipulaçao de strings// //funçao de contagem do numero de palavras do dicionario// int contd(char *str2) { FILE *fd = fopen("words", "r"); if (fd == NULL) { printf("erro de leitura do dicionario\n"); exit(1); // caso erro na leitura do endereço dicionario, termina a execuçao do programa// } char folga[5000]; int t = 0; while (fgets(folga, sizeof(folga), fd) != NULL) { t++; } fclose(fd);//Como cada linha tem apenas uma palavra, cada leitura com sucesso invcrementa t// return t;} //devolve o total como um inteiro// //funçao standard de comparaçao, auxiliar do qsort, comparaduas palavras difrentes// int comp(const void *a, const void *b) {//passa de pointeiros void para pointers de palvras char*// return strcasecmp(*(const char **)a, *(const char **)b);//compara palavras na string sem ter em conta o tipo de letra// } //funçao de leitura, armazenamento e ordenaçao do dicionario// char **lerd(char *str2) { int tot = contd(str2);//recorrendo a contd, armnazena o tamanho do dicionario// FILE *fd = fopen("words", "r"); if (fd == NULL) { printf("erro de leitura do dicionario\n"); exit(1); // caso erro na leitura do endereço dicionario, termina a execuçao do programa// } char **dic = (char **)malloc(tot * sizeof(char *));//cria um array para guardar o dicionario lido// if (dic == NULL) { printf("erro de memoria relativa ao dicionario\n"); fclose(fd); exit(1);// caso não encontre o endereço do dicionario, termina a execuçao do programa// } char folga[5000]; int i = 0; while (i < tot && fgets(folga, sizeof(folga), fd) != NULL) { size_t tl = strlen(folga); if (tl > 0 && folga[tl-1] == '\n') { folga[tl-1] = '\0'; }//retira o \n de cada palavra lida do dicionario para facilitar funcionamento// dic[i] = (char *)malloc((strlen(folga) + 1) * sizeof(char)); if (dic[i] == NULL) { printf("erro de alocacao de memoria para palavra %d\n", i); for (int j = 0; j < i; j++) { free(dic[j]); } free(dic); fclose(fd); exit(1); }// caso erro na alocaçao de memoria para o dicionario, liberta toda a memoria já usada e termina a execuçao do programa// strcpy(dic[i], folga); i++; }//guarda cada palavra do dicionaria num valor do array dic// fclose(fd); qsort(dic, tot, sizeof(char*), comp);//organiza o vetor por ordem alfabetica// return dic; } //funçao de correçao ortografica// int main() { char *dic = "words"; int n = contd(dic); int erro_index = 0; char **dicop = lerd(dic); int n_linhas=0; int i=0; char folga [5000]; char folgop [5000]; char **frases; int *vect_pos; frases = (char **)malloc(500 * sizeof(char *)); vect_pos = (int *)malloc(300 * sizeof(int)); /* dic-pointer para a string do caminho do dicionario erro_index-qual a ordem do erro ortografico relativo a posiçao dos outros erros n-numero de palavras do dicionario dicop-pointer para o array onde esta o dicionario*/ if (frases == NULL || vect_pos == NULL) { printf("erro de alocacao de memoria para os arrays \n"); for (int j = 0; j < n; j++) { free(dicop[j]); } free(dicop); exit(1); } while (fgets(folga, sizeof(folga), stdin) != NULL) { size_t tl = strlen(folga); // Remove o \n do final da linha if (tl > 0 && folga[tl-1] == '\n') { folga[tl-1] = '\0'; } // Guarda a posição da linha atual vect_pos[i] = n_linhas + 1; // Guarda a posição começando em 1 // Aloca memória para a frase atual frases[i] = (char *)malloc((tl + 1) * sizeof(char)); if (frases[i] == NULL) { printf("erro de memoria para frase %d\n", i); // Libera memória já alocada for (int j = 0; j < i; j++) { free(frases[j]); } free(frases); free(vect_pos); for (int j = 0; j < n; j++) { free(dicop[j]); } free(dicop); exit(1); } // Copia a frase para o vetor strcpy(frases[i], folga); // Verifica cada palavra na frase char *frase_copia = strdup(frases[i]); // Faz uma cópia da frase para tokenização if (frase_copia == NULL) { printf("erro de alocacao de memoria para copia da frase\n"); for (int j = 0; j <= i; j++) { free(frases[j]); } free(frases); free(vect_pos); for (int j = 0; j < n; j++) { free(dicop[j]); } free(dicop); exit(1); } int linha_impressa = 0; // Flag para controlar se a linha já foi impressa char *palavra = strtok(frase_copia, " \"'\n-1234567890,.;()[]{}?!$&%.:");//divide a frase em palavras(tokens), usando o que esta na segunda parte como divisorias// while (palavra != NULL) { char *palop = palavra;//palop-pointer para a palavra lida para a bsearch// if (bsearch(&palop, dicop, n, sizeof(char*), comp) == NULL && strlen(palavra) > 0) { erro_index++; if (!linha_impressa) { printf("%d: %s\n", vect_pos[i], frases[i]); linha_impressa = 1; } printf("Erro na palavra \"%s\"\n", palavra); }//se não encontra a palavra no dicionario, imprime a e contabiliza-a como erro// palavra = strtok(NULL, " \"'\n-1234567890,.;()[]{}:?!$%&.");//retoma a leitura da frase e divisao em palavras// } free(frase_copia); // Libera a cópia da frase i++; n_linhas++; } for (int j = 0; j < i; j++) { free(frases[j]); } free(frases); free(vect_pos); for (int j = 0; j < n; j++) { free(dicop[j]); } free(dicop); return 0; } Codigo ainda prototipo com alguns place-holders feitos com IA, que alterarei posteriormente. Ex de bom funcionamento: INPUT "You may address me as the Count Von Kramm, a Bohemian nobleman. I OUTPUT 1: "You may address me as the Count Von Kramm, a Bohemian nobleman. I Erro na palavra "Von" Erro na palavra "Kramm" Ex de mau funcionamento: INPUT A SCANDAL IN BOHEMIA To Sherlock Holmes she is always the woman. I have seldom heard him mention her under any other name. In his eyes she eclipses and predominates the whole of her sex. It was not that he felt any emotion akin to love for Irene Adler. All emotions, and that one particularly, were abhorrent to his cold, precise but admirably balanced mind. He was, I take it, the most perfect reasoning and observing machine that the world has seen, but as a lover he would have placed himself in a false position. He never spoke of the softer passions, save with a gibe and a sneer. They were admirable things for the observer-excellent for drawing the veil from men's motives and actions. But for the trained reasoner to admit such intrusions into his own delicate and finely adjusted temperament was to introduce a distracting factor which might throw a doubt upon all his mental results. Grit in a sensitive instrument, or a crack in one of his own high-power lenses, would not be more disturbing than a strong emotion in a nature such as his. And yet there was but one woman to him, and that woman was the late Irene Adler, of dubious and questionable memory. I had seen little of Holmes lately. My marriage had drifted us away from each other. My own complete happiness, and the home-centred interests which rise up around the man who first finds himself master of his own establishment, were sufficient to absorb all my attention, while Holmes, who loathed every form of society with his whole Bohemian soul, remained in our lodgings in Baker Street, buried among his old books, and alternating from week to week between cocaine and ambition, the drowsiness of the drug, and the fierce energy of his own keen nature. He was still, as ever, deeply attracted by the study of crime, and occupied his immense faculties and extraordinary powers of observation in following out those clues, and clearing up those mysteries which had been abandoned as hopeless by the official police. From time to time I heard some vague account of his doings: of his summons to Odessa in the case of the Trepoff murder, of his clearing up of the singular tragedy of the Atkinson brothers at Trincomalee, and finally of the mission which he had accomplished so delicately and successfully for the reigning family of Holland. Beyond these signs of his activity, however, which I merely shared with all the readers of the daily press, I knew little of my former friend and companion. One night-it was on the twentieth of March, 1888-I was returning from a journey to a patient (for I had now returned to civil practice), when my way led me through Baker Street. As I passed the well-remembered door, which must always be associated in my mind with my wooing, and with the dark incidents of the Study in Scarlet, I was seized with a keen desire to see Holmes again, and to know how he was employing his extraordinary powers. His rooms were brilliantly lit, and, even as I looked up, I saw his tall, spare figure pass twice in a dark silhouette against the blind. He was pacing the room swiftly, eagerly, with his head sunk upon his chest and his hands clasped behind him. To me, who knew his every mood and habit, his attitude and manner told their own story. He was at work again. He had risen out of his drug-created dreams and was hot upon the scent of some new problem. I rang the bell and was shown up to the chamber which had formerly been in part my own. His manner was not effusive. It seldom was; but he was glad, I think, to see me. With hardly a word spoken, but with a kindly eye, he waved me to an armchair, threw across his case of cigars, and indicated a spirit case and a gasogene in the corner. Then he stood before the fire and looked me over in his singular introspective fashion. "Wedlock suits you," he remarked. "I think, Watson, that you have put on seven and a half pounds since I saw you." "Seven!" I answered. "Indeed, I should have thought a little more. Just a trifle more, I fancy, Watson. And in practice again, I observe. You did not tell me that you intended to go into harness." "Then, how do you know?" "I see it, I deduce it. How do I know that you have been getting yourself very wet lately, and that you have a most clumsy and careless servant girl?" "My dear Holmes," said I, "this is too much. You would certainly have been burned, had you lived a few centuries ago. It is true that I had a country walk on Thursday and came home in a dreadful mess, but as I have changed my clothes I can't imagine how you deduce it. As to Mary Jane, she is incorrigible, and my wife has given her notice, but there, again, I fail to see how you work it out." He chuckled to himself and rubbed his long, nervous hands together. "It is simplicity itself," said he; "my eyes tell me that on the inside of your left shoe, just where the firelight strikes it, the leather is scored by six almost parallel cuts. Obviously they have been caused by someone who has very carelessly scraped round the edges of the sole in order to remove crusted mud from it. Hence, you see, my double deduction that you had been out in vile weather, and that you had a particularly malignant boot-slitting specimen of the London slavey. As to your practice, if a gentleman walks into my rooms smelling of iodoform, with a black mark of nitrate of silver upon his right forefinger, and a bulge on the right side of his top-hat to show where he has secreted his stethoscope, I must be dull, indeed, if I do not pronounce him to be an active member of the medical profession." I could not help laughing at the ease with which he explained his process of deduction. "When I hear you give your reasons," I remarked, "the thing always appears to me to be so ridiculously simple that I could easily do it myself, though at each successive instance of your reasoning I am baffled until you explain your process. And yet I believe that my eyes are as good as yours." "Quite so," he answered, lighting a cigarette, and throwing himself down into an armchair. "You see, but you do not observe. The distinction is clear. For example, you have frequently seen the steps which lead up from the hall to this room." "Frequently." "How often?" "Well, some hundreds of times." "Then how many are there?" "How many? I don't know." "Quite so! You have not observed. And yet you have seen. That is just my point. Now, I know that there are seventeen steps, because I have both seen and observed. By the way, since you are interested in these little problems, and since you are good enough to chronicle one or two of my trifling experiences, you may be interested in this." He threw over a sheet of thick, pink-tinted notepaper which had been lying open upon the table. "It came by the last post," said he. "Read it aloud." The note was undated, and without either signature or address. "There will call upon you to-night, at a quarter to eight o'clock," it said, "a gentleman who desires to consult you upon a matter of the very deepest moment. Your recent services to one of the royal houses of Europe have shown that you are one who may safely be trusted with matters which are of an importance which can hardly be exaggerated. This account of you we have from all quarters received. Be in your chamber then at that hour, and do not take it amiss if your visitor wear a mask." "This is indeed a mystery," I remarked. "What do you imagine that it means?" "I have no data yet. It is a capital mistake to theorise before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts. But the note itself. What do you deduce from it?" I carefully examined the writing, and the paper upon which it was written. "The man who wrote it was presumably well to do," I remarked, endeavouring to imitate my companion's processes. "Such paper could not be bought under half a crown a packet. It is peculiarly strong and stiff." "Peculiar-that is the very word," said Holmes. "It is not an English paper at all. Hold it up to the light." I did so, and saw a large "E" with a small "g," a "P," and a large "G" with a small "t" woven into the texture of the paper. "What do you make of that?" asked Holmes. "The name of the maker, no doubt; or his monogram, rather." "Not at all. The 'G' with the small 't' stands for 'Gesellschaft,' which is the German for 'Company.' It is a customary contraction like our 'Co.' 'P,' of course, stands for 'Papier.' Now for the 'Eg.' Let us glance at our Continental Gazetteer." He took down a heavy brown volume from his shelves. "Eglow, Eglonitz-here we are, Egria. It is in a German-speaking country-in Bohemia, not far from Carlsbad. 'Remarkable as being the scene of the death of Wallenstein, and for its numerous glass-factories and paper-mills.' há, há, my boy, what do you make of that?" His eyes sparkled, and he sent up a great blue triumphant cloud from his cigarette. "The paper was made in Bohemia," I said. "Precisely. And the man who wrote the note is a German. Do you note the peculiar construction of the sentence-'This account of you we have from all quarters received.' A Frenchman or Russian could not have written that. It is the German who is so uncourteous to his verbs. It only remains, therefore, to discover what is wanted by this German who writes upon Bohemian paper and prefers wearing a mask to showing his face. And here he comes, if I am not mistaken, to resolve all our doubts." As he spoke there was the sharp sound of horses' hoofs and grating wheels against the curb, followed by a sharp pull at the bell. Holmes whistled. "A pair, by the sound," said he. "Yes," he continued, glancing out of the window. "A nice little brougham and a pair of beauties. A hundred and fifty guineas apiece. There's money in this case, Watson, if there is nothing else." "I think that I had better go, Holmes." "Not a bit, Doctor. Stay where you are. I am lost without my Boswell. And this promises to be interesting. It would be a pity to miss it." "But your client-" "Never mind him. I may want your help, and so may he. Here he comes. Sit down in that armchair, Doctor, and give us your best attention." A slow and heavy step, which had been heard upon the stairs and in the passage, paused immediately outside the door. Then there was a loud and authoritative tap. "Come in!" said Holmes. A man entered who could hardly have been less than six feet six inches in height, with the chest and limbs of a Hercules. His dress was rich with a richness which would, in England, be looked upon as akin to bad taste. Heavy bands of astrakhan were slashed across the sleeves and fronts of his double-breasted coat, while the deep blue cloak which was thrown over his shoulders was lined with flame-coloured silk and secured at the neck with a brooch which consisted of a single flaming beryl. Boots which extended halfway up his calves, and which were trimmed at the tops with rich brown fur, completed the impression of barbaric opulence which was suggested by his whole appearance. He carried a broad-brimmed hat in his hand, while he wore across the upper part of his face, extending down past the cheekbones, a black vizard mask, which he had apparently adjusted that very moment, for his hand was still raised to it as he entered. From the lower part of the face he appeared to be a man of strong character, with a thick, hanging lip, and a long, straight chin suggestive of resolution pushed to the length of obstinacy. "You had my note?" he asked with a deep harsh voice and a strongly marked German accent. "I told you that I would call." He looked from one to the other of us, as if uncertain which to address. "Pray take a seat," said Holmes. "This is my friend and colleague, Dr. Watson, who is occasionally good enough to help me in my cases. Whom have I the honour to address?" "You may address me as the Count Von Kramm, a Bohemian nobleman. I understand that this gentleman, your friend, is a man of honour and discretion, whom I may trust with a matter of the most extreme importance. If not, I should much prefer to communicate with you alone." I rose to go, but Holmes caught me by the wrist and pushed me back into my chair. "It is both, or none," said he. "You may say before this gentleman anything which you may say to me." The Count shrugged his broad shoulders. "Then I must begin," said he, "by binding you both to absolute secrecy for two years; at the end of that time the matter will be of no importance. At present it is not too much to say that it is of such weight it may have an influence upon European history." "I promise," said Holmes. "And I." "You will excuse this mask," continued our strange visitor. "The august person who employs me wishes his agent to be unknown to you, and I may confess at once that the title by which I have just called myself is not exactly my own." "I was aware of it," said Holmes dryly. "The circumstances are of great delicacy, and every precaution has to be taken to quench what might grow to be an immense scandal and seriously compromise one of the reigning families of Europe. To speak plainly, the matter implicates the great House of Ormstein, hereditary kings of Bohemia." "I was also aware of that," murmured Holmes, settling himself down in his armchair and closing his eyes. Our visitor glanced with some apparent surprise at the languid, lounging figure of the man who had been no doubt depicted to him as the most incisive reasoner and most energetic agent in Europe. Holmes slowly reopened his eyes and looked impatiently at his gigantic client. "If your Majesty would condescend to state your case," he remarked, "I should be better able to advise you." The man sprang from his chair and paced up and down the room in uncontrollable agitation. Then, with a gesture of desperation, he tore the mask from his face and hurled it upon the ground. "You are right," he cried; "I am the King. Why should I attempt to conceal it?" "Why, indeed?" murmured Holmes. "Your Majesty had not spoken before I was aware that I was addressing Wilhelm Gottsreich Sigismond von Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of Bohemia." "But you can understand," said our strange visitor, sitting down once more and passing his hand over his high white forehead, "you can understand that I am not accustomed to doing such business in my own person. Yet the matter was so delicate that I could not confide it to an agent without putting myself in his power. I have come incognito from Prague for the purpose of consulting you." "Then, pray consult," said Holmes, shutting his eyes once more. "The facts are briefly these: Some five years ago, during a lengthy visit to Warsaw, I made the acquaintance of the well-known adventuress, Irene Adler. The name is no doubt familiar to you." "Kindly look her up in my index, Doctor," murmured Holmes without opening his eyes. For many years he had adopted a system of docketing all paragraphs concerning men and things, so that it was difficult to name a subject or a person on which he could not at once furnish information. In this case I found her biography sandwiched in between that of a Hebrew rabbi and that of a staff-commander who had written a monograph upon the deep-sea fishes. "Let me see!" said Holmes. "Hum! Born in New Jersey in the year 1858. Contralto-hum! La Scala, hum! Prima donna Imperial Opera of Warsaw-yes! Retired from operatic stage-há! Living in London-quite so! Your Majesty, as I understand, became entangled with this young person, wrote her some compromising letters, and is now desirous of getting those letters back." "Precisely so. But how-" "Was there a secret marriage?" "None." "No legal papers or certificates?" "None." "Then I fail to follow your Majesty. If this young person should produce her letters for blackmailing or other purposes, how is she to prove their authenticity?" "There is the writing." "Pooh, pooh! Forgery." "My private note-paper." "Stolen." "My own seal." "Imitated." "My photograph." "Bought." "We were both in the photograph." "Oh, dear! That is very bad! Your Majesty has indeed committed an indiscretion." "I was mad-insane." "You have compromised yourself seriously." "I was only Crown Prince then. I was young. I am but thirty now." "It must be recovered." "We have tried and failed." "Your Majesty must pay. It must be bought." "She will not sell." "Stolen, then." "Five attempts have been made. Twice burglars in my pay ransacked her house. Once we diverted her luggage when she travelled. Twice she has been waylaid. There has been no result." "No sign of it?" "Absolutely none." Holmes laughed. "It is quite a pretty little problem," said he. "But a very serious one to me," returned the King reproachfully. "Very, indeed. And what does she propose to do with the photograph?" "To ruin me." "But how?" "I am about to be married." "So I have heard." "To Clotilde Lothman von Saxe-Meningen, second daughter of the King of Scandinavia. You may know the strict principles of her family. She is herself the very soul of delicacy. A shadow of a doubt as to my conduct would bring the matter to an end." "And Irene Adler?" "Threatens to send them the photograph. And she will do it. I know that she will do it. You do not know her, but she has a soul of steel. She has the face of the most beautiful of women, and the mind of the most resolute of men. Rather than I should marry another woman, there are no lengths to which she would not go-none." "You are sure that she has not sent it yet?" "I am sure." "And why?" "Because she has said that she would send it on the day when the betrothal was publicly proclaimed. That will be next Monday." "Oh, then we have three days yet," said Holmes with a yawn. "That is very fortunate, as I have one or two matters of importance to look into just at present. Your Majesty will, of course, stay in London for the present?" "Certainly. You will find me at the Langham under the name of the Count Von Kramm." "Then I shall drop you a line to let you know how we progress." "Pray do so. I shall be all anxiety." "Then, as to money?" "You have carte blanche." "Absolutely?" "I tell you that I would give one of the provinces of my kingdom to have that photograph." "And for present expenses?" The King took a heavy chamois leather bag from under his cloak and laid it on the table. "There are three hundred pounds in gold and seven hundred in notes," he said. Holmes scribbled a receipt upon a sheet of his note-book and handed it to him. "And Mademoiselle's address?" he asked. "Is Briony Lodge, Serpentine Avenue, St. John's Wood." Holmes took a note of it. "One other question," said he. "Was the photograph a cabinet?" "It was." "Then, good-night, your Majesty, and I trust that we shall soon have some good news for you. And good-night, Watson," he added, as the wheels of the royal brougham rolled down the street. "If you will be good enough to call to-morrow afternoon at three o'clock I should like to chat this little matter over with you." OUTPUT NORMAL: 21: from each other. My own complete happiness, and the home-centred Erro na palavra "centred" 33: summons to Odessa in the case of the Trepoff murder, of his clearing up Erro na palavra "Trepoff" 34: of the singular tragedy of the Atkinson brothers at Trincomalee, and Erro na palavra "Trincomalee" 58: spirit case and a gasogene in the corner. Then he stood before the fire Erro na palavra "gasogene" 86: of your left shoe, just where the firelight strikes it, the leather is Erro na palavra "firelight" 91: particularly malignant boot-slitting specimen of the London slavey. As Erro na palavra "slavey" 93: iodoform, with a black mark of nitrate of silver upon his right Erro na palavra "iodoform" 142: "I have no data yet. It is a capital mistake to theorise before one has Erro na palavra "theorise" 151: endeavouring to imitate my companion's processes. "Such paper could not Erro na palavra "endeavouring" 165: "Not at all. The 'G' with the small 't' stands for 'Gesellschaft,' Erro na palavra "Gesellschaft" 167: our 'Co.' 'P,' of course, stands for 'Papier.' Now for the 'Eg.' Let us Erro na palavra "Papier" Erro na palavra "Eg" 169: from his shelves. "Eglow, Eglonitz-here we are, Egria. It is in a Erro na palavra "Eglow" Erro na palavra "Eglonitz" Erro na palavra "Egria" 181: that. It is the German who is so uncourteous to his verbs. It only Erro na palavra "uncourteous" 192: the window. "A nice little brougham and a pair of beauties. A hundred Erro na palavra "brougham" 217: thrown over his shoulders was lined with flame-coloured silk and Erro na palavra "coloured" 223: part of his face, extending down past the cheekbones, a black vizard Erro na palavra "vizard" 236: have I the honour to address?" Erro na palavra "honour" 238: "You may address me as the Count Von Kramm, a Bohemian nobleman. I Erro na palavra "Von" Erro na palavra "Kramm" 239: understand that this gentleman, your friend, is a man of honour and Erro na palavra "honour" 268: plainly, the matter implicates the great House of Ormstein, hereditary Erro na palavra "Ormstein" 288: was aware that I was addressing Wilhelm Gottsreich Sigismond von Erro na palavra "Gottsreich" Erro na palavra "Sigismond" Erro na palavra "von" 289: Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of Erro na palavra "Ormstein" Erro na palavra "Cassel" Erro na palavra "Felstein" 314: Contralto-hum! La Scala, hum! Prima donna Imperial Opera of Warsaw-yes! Erro na palavra "Prima" 393: "To Clotilde Lothman von Saxe-Meningen, second daughter of the King of Erro na palavra "Clotilde" Erro na palavra "Lothman" Erro na palavra "von" Erro na palavra "Saxe" Erro na palavra "Meningen" 420: "Certainly. You will find me at the Langham under the name of the Count Erro na palavra "Langham" 421: Von Kramm." Erro na palavra "Von" Erro na palavra "Kramm" 429: "You have carte blanche." Erro na palavra "carte" 449: "Is Briony Lodge, Serpentine Avenue, St. John's Wood." Erro na palavra "Briony" 458: wheels of the royal brougham rolled down the street. "If you will be Erro na palavra "brougham" OUTPUT REAL 21: from each other. My own complete happiness, and the home-centred Erro na palavra "centred" 33: summons to Odessa in the case of the Trepoff murder, of his clearing up Erro na palavra "Trepoff" 34: of the singular tragedy of the Atkinson brothers at Trincomalee, and Erro na palavra "Trincomalee" 58: spirit case and a gasogene in the corner. Then he stood before the fire Erro na palavra "gasogene" 86: of your left shoe, just where the firelight strikes it, the leather is Erro na palavra "firelight" 91: particularly malignant boot-slitting specimen of the London slavey. As Erro na palavra "slavey" 93: iodoform, with a black mark of nitrate of silver upon his right Erro na palavra "iodoform" 142: "I have no data yet. It is a capital mistake to theorise before one has Erro na palavra "theorise" 151: endeavouring to imitate my companion's processes. "Such paper could not Erro na palavra "endeavouring" 165: "Not at all. The 'G' with the small 't' stands for 'Gesellschaft,' Erro na palavra "Gesellschaft" 167: our 'Co.' 'P,' of course, stands for 'Papier.' Now for the 'Eg.' Let us Erro na palavra "Papier" Erro na palavra "Eg" 169: from his shelves. "Eglow, Eglonitz-here we are, Egria. It is in a Erro na palavra "Eglow" Erro na palavra "Eglonitz" Erro na palavra "Egria" 181: that. It is the German who is so uncourteous to his verbs. It only Erro na palavra "uncourteous" 192: the window. "A nice little brougham and a pair of beauties. A hundred Erro na palavra "brougham" 217: thrown over his shoulders was lined with flame-coloured silk and Erro na palavra "coloured" 223: part of his face, extending down past the cheekbones, a black vizard Erro na palavra "vizard" 236: have I the honour to address?" Erro na palavra "honour" 238: "You may address me as the Count Von Kramm, a Bohemian nobleman. I Erro na palavra "Von" Erro na palavra "Kramm" 239: understand that this gentleman, your friend, is a man of honour and Erro na palavra "honour" 268: plainly, the matter implicates the great House of Ormstein, hereditary Erro na palavra "Ormstein" 288: was aware that I was addressing Wilhelm Gottsreich Sigismond von Erro na palavra "Gottsreich" Erro na palavra "Sigismond" Erro na palavra "von" 289: Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of Erro na palavra "Ormstein" Erro na palavra "Cassel" Erro na palavra "Felstein" 314: Contralto-hum! La Scala, hum! Prima donna Imperial Opera of Warsaw-yes! Erro na palavra "Prima" 372: house. Once we diverted her k(uma matriz 2x2 com 0 0 0 1 de entrada)" Erro na palavra "k(uma matriz 2x2 com 0 0 0 1 de entrada)" 393: "To Clotilde Lothman von Saxe-Meningen, second daughter of the King of Erro na palavra "Clotilde" Erro na palavra "Lothman" Erro na palavra "von" Erro na palavra "Saxe" Erro na palavra "Meningen" 420: "Certainly. You will find me at the Langham under the name of the Count Erro na palavra "Langham" 421: Von Kramm." Erro na palavra "Von" Erro na palavra "Kramm" 429: "You have carte blanche." Erro na palavra "carte" 449: "Is Briony Lodge, Serpentine Avenue, St. John's Wood." Erro na palavra "Briony" 458: wheels of the royal brougham rolled down the street. "If you will be Erro na palavra "brougham" Alguma questao indique nos comentarios.
  5. Ao iniciar o lavavel new Vai solicitar que selecione o start-kit o Laravel é semeliante ao Breeze
  6. Olá! Para verificar se a placa de um carro é do padrão Simples ou Mercosul, você pode se atentar a alguns detalhes que fazem parte do novo formato de placas do Mercosul. Aqui estão algumas dicas: Formato da placa: A placa do modelo Mercosul tem um formato específico de 3 letras - 1 número - 3 letras, enquanto a placa do modelo antigo (Simples) tem o formato 3 letras - 1 número - 2 letras. Elementos de segurança: A placa Mercosul possui elementos de segurança, como um QR Code, que pode ser escaneado para obter mais informações sobre o veículo. Cores e fundo: O fundo da placa Mercosul é diferente das placas anteriores. Ela possui a bandeira do Brasil no canto esquerdo superior e o nome do estado. Se você está tentando validar a placa para confirmar se ela segue o padrão correto, você pode usar serviços como o Detran do estado onde o veículo está registrado ou sistemas de consulta online que validam a placa do carro, informando se está de acordo com o novo padrão. Caso você precise de uma verificação mais técnica, uma boa opção é usar ferramentas específicas para consulta de dados do veículo, como o site do Detran ou sistemas de consulta de veículos pela placa. Espero que isso ajude! Se precisar de mais detalhes ou tiver outras dúvidas, só avisar!
  7. Como não é possível trabalhar com o JavaScript e Livewire ao mesmo tempo no Laravel 12 Livewire, fui obrigado a usar o método da tentativa e erro para simular o modal: arquivo app > Livewire > Modal.php <?php namespace App\Livewire; use Livewire\Component; class Modal extends Component { public $usernamePlaceholder="Olá mundo"; public $showModal = false; public $conta = null; public $contaDevedora = null; public $contaCredora = null; public $inputEscolhido = null; public function setConta($conta) { if($this->inputEscolhido=="Devedora") { $this->contaDevedora=$conta; } else { $this->contaCredora=$conta; } return $this->closeModal(); } public function openModalDevedora() { $this->showModal = true; $this->inputEscolhido = 'Devedora'; } public function openModalCredora() { $this->showModal = true; $this->inputEscolhido = 'Credora'; } public function closeModal() { $this->showModal = false; } public function render() { return view('livewire.modal'); } } arquivo resources > views > livewire > modal.blade.php <div class="w-[500px] m-0 m-auto"> <form method=post action=logout>@csrf<button type="submit">Sair</button></form> <flux:input value={{$contaDevedora}} wire:click=openModalDevedora class="border p-2 rounded" label="Conta Devedora" /> <flux:input value={{$contaCredora}} wire:click=openModalCredora class="border p-2 rounded" label="Conta Credora" /> @if ($showModal) <div class="fixed inset-0 flex items-center justify-center z-50"> <div class="bg-white p-5 rounded shadow-md"> <h2 class="text-lg font-bold">Plano de Contas</h2> <div wire:click="setConta('Ativo')">Ativo</div> <div wire:click="setConta('Passivo')">Passivo</div> <div wire:click="setConta('Despesa')">Despesa</div> <div wire:click="setConta('Receita')">Receita</div> <button wire:click="closeModal" class="btn btn-danger">Fechar</button> </div> </div> <div class="fixed inset-0 bg-black opacity-50"></div> @endif </div> arquivo resources > views > menuView.blade.php <livewire:scripts /> <livewire:styles /> <livewire:modal />
  8. Ontem, o Copilot tentou me ensinar como criar uma barra de navegação, usando o Liveware. Eu achei muito complicado e fiquei apavorado! Mas eu encontrei o arquivo resources > views > components > layouts > app > sider.blade.php, eu gostei a beça dele, e consultando a internet eu consegui montar o meu arquivo resources > views > components > layouts > app > navbar.blade.php <flux:header> <flux:navbar> <flux:navbar.item>Laravel 12</flux:navbar.item> <flux:dropdown> <flux:navbar.item icon-trailing="chevron-down">Menu</flux:navbar.item> <flux:navmenu> @if(auth()->user()->id==1) <flux:navmenu.item href="diarioInicio">Diário</flux:navmenu.item> @endif <flux:navmenu.item href="orcamentoMenu">Orçamento</flux:navmenu.item> <flux:navmenu.item href="vendaInicio">Relatório de Venda</flux:navmenu.item> </flux:navmenu> </flux:dropdown> <flux:dropdown> <flux:navbar.item icon-trailing="chevron-down">{{ auth()->user()->nome }}</flux:navbar.item> <flux:navmenu> <form method="POST" action="{{ route('logout') }}" class="w-full"> @csrf <flux:menu.item as="button" type="submit" icon="arrow-right-start-on-rectangle" class="w-full"> {{ __('Sair') }} </flux:menu.item> </form> <form method="POST" action="{{ route('logout') }}" class="w-full"> @csrf <flux:menu.item as="button" type="submit" icon="arrow-right-start-on-rectangle" class="w-full"> {{ __('Mudar a senha') }} </flux:menu.item> </form> </flux:navmenu> </flux:dropdown> </flux:navbar> {{$slot}} @fluxScripts </flux:header> O meu arquivo menuView.blade.php não funciona no Laravel 12, só funciona se você atualizar o navegador. Ele usava JavaScript, e acredito que o paradigma do LiveWare é trocar o JavaScript pelo PHP. E assim, o meu arquivo resources > views > menuView.blade.php ficou assim: @vite(['resources/css/app.css', 'resources/js/app.js']) <div class="w-[500px] m-auto m-0"> <x-layouts.app.navbar /> </div> Por enquanto, tudo é tentativa e erro. Para o diarioView.blade.php funcionar, eu fiz assim: @include('appView') <div class="w-[500px] m-0 m-auto"> <x-layouts.app.navbar /> <input type=submit value='Lançamentos' class="hover:bg-gray-200 py-1 px-2 font-semibold rounded text-gray-500" onclick="location.replace('diarioCria')" /> do dia <input type=date value=<?=$dia?> class="border-none font-semibold py-1 px-2 w-[110px] hover:bg-gray-200 rounded text-gray-500" onclick=this.showPicker() onchange="location.replace('diarioNovaData?data='+this.value)"> <?=$mensagem?> <a href=previsaoInicio class=text-blue-700>Previsão</a> <div class="py-1"></div> <div class="shadow-sm"> <div class="bg-gray-100"> <div class="flex bg-gray-200 py-1"> <div class='w-[40px] whitespace-nowrap px-2'>Lçto</div> <div class='w-[60px] whitespace-nowrap text-right'>Ctad</div> <div class='w-[60px] whitespace-nowrap text-right'>Ctac</div> <div class="w-[100px] whitespace-nowrap text-right">Valor</div> <div> <form action=diarioHistorico method=post> @csrf <input name=hist placeholder="Procurar no Histórico" onchange=submit() class="rounded py-0 ml-2 border-none bg-transparent text-black font-semibold" autocomplete=off> </form> </div> </div> <?php foreach ($lctos as $index => $lcto): ?> <div class="flex odd:bg-gray-200 even:bg-white"> <div class="w-[40px] px-2"> <a href="diarioEdita?docto=<?=$lcto->docto?>" class="text-gray-500 font-semibold"><?=$lcto->lcto?></a> </div> <div class="w-[60px] text-right"><?= $lcto->contad ?></div> <div class="w-[60px] text-right"><?= $lcto->contac ?></div> <div class="w-[100px] text-right"><?= dec($lcto->valor) ?></div> <div class="w-[370px] truncate px-2"><?= $lcto->hist ?></div> </div> <?php endforeach; ?> <div class="flex font-semibold odd:bg-gray-200 even:bg-white"> <div style="width:260px" class="text-right font-semibold"> {{dec($somaDebito)}} </div> <div class='whitespace-nowrap px-2 text-red-500'> @if($somaDebito!==$somaCredito) {{"Soma de Crédito ".dec($somaCredito)}} @endif </div> </div> </div> </div> </div> Tudo isso é gambiarra, não existe nenhum tutorial afirmando que essa é forma correta de usar o <flux>.
  9. Depois de atualizar o Laravel Installer fica bem mais fácil colocar o Laravel 12 no notebook, o problema é que ele pede para escolher uma extensão (React, Vue, LiveWire) ou nenhum. O problema do Laravel puro é que ele não tem uma rotina para o login, assim eu não tive outra escolha senão selecionar uma extensão, no meu caso foi o LiveWire. Após terminar a instalação, o Laravel manda você direto para a tela do 'dashboard' se passar pela rotina do login, é uma tela bonita, mas eu não tenho a menor ideia de como trabalhar com ela. Eu só sei trabalhar com texto, e assim eu tenho o meu 'menuView'. Eu encontrei a rotina do login, e eu alterei assim: arquivo app > Livewire > Auth > Login.php (listagem parcial) <?php //... class Login extends Component { //... public function login(): void { $this->validate(); $this->ensureIsNotRateLimited(); if (! Auth::attempt(['email' => $this->email, 'password' => $this->password], $this->remember)) { RateLimiter::hit($this->throttleKey()); throw ValidationException::withMessages(['email' => __('auth.failed'),]); } RateLimiter::clear($this->throttleKey()); Session::regenerate(); $this->redirectIntended(default: route('menuView', absolute: false), navigate: true); } //... } Fiz logoff, entrei de novo, mas acabei de cara com o 'dashboard'. Então, decidi fechar o navegador, e pedi para o VS Code executar composer dump-autoload, e só assim é que consegui chegar no menuView, depois da rotina do login.
  10. Boa noite, meu corel, resolveu que o branco agora é azul claro.. fundo da folha fica branco quando estou trabalhando nele. na exportação, exporta branco normal, só na visualização que esta esse azulado que não consegui resolver. o amarelo aparece meio azulado também, não consegui resolver ainda. na exportação exporta cor certa. alguém já passou por isso?
  11. Mais Cedo
  12. Criei um novo projeto para conhecer o Laravel 12, e acabei me perdendo. A tela de boas vindas mudou, só tem dois botões. Um fala sobre a documentação do Laravel 12 e outro é Deploy, e ele me mandou para o Laravel Cloud, onde eu abri a minha conta, e depois fiquei sem saber o que fazer. Procurei o YouTube, e ele não me ajudou em nada, o vídeo falava da época em que o pessoa pretendia atualizar o Laravel. Assim, eu tive que improvisar. Procurei o Laravel 11, e de lá eu instalei o Breeze Blade (isso não existe no Laravel 12); e assim eu consegui colocar a opção de login na tela de boas vindas e cheguei no painel de controle. Pelo que pude deduzir o Laravel 12 é para quem tem o código hospedado no Github, mas por enquanto vou continuar usando o meu notebook. Na minha opinião, o pessoal precisa colocar um tutorial de como usar o Laravel 12, não adianta mandar eu ler os conceitos básicos do Laravel que eu vou acabar dormindo. ============================================== No fórum do Laracasts encontrei a solução: https://laracasts.com/discuss/channels/laravel/add-livewire-starter-kit-to-existing-base-laravel-12-installation A primeira tarefa é atualizar o instalador do Laravel assim: composer global remove laravel/installer composer global require laravel/installer Em seguida, você usa o comando: laravel new novoProjeto Ele vai fazer uma série de perguntas, uma delas é starter kit, eu escolhi o LiveWire, apesar de não ter a menor ideia de como usar isso, e também tem um outro tanto de perguntas que fui respondendo de acordo com o meu nariz, e assim ele já embutiu a rotina de login no projeto. Como eu trabalho com mysql, eu alterei o arquivo .env. Durante dois dias fiquei batendo a cabeça na parede, mas hoje eu vi que o Laravel 12 é muito mais fácil de instalar. Eles mudaram o script para executar o código no computador local, você não precisa mais ter dois terminais, um para ativar o servidor e outro para ativar o vite, agora faz as duas tarefas com o comando composer run dev
  13. Se você já leu a documentação para emissão de uma NFe, já sabe que de simples isso não tem nada, um ERP vai ter que atender diversas legislações, se for emitir nota, existem regras estaduais, substituição de ICMS, etc, já trabalhei com ERP e existia consultoria tanto jurídica quanto contábil apenas para apoiar os programadores. A parte técnica não é difícil, no geral, CRUD vai resolver 90% dos problemas, a questão pega na legislação e na responsabilidade da empresa que estiver por trás do ERP.
  14. Nessa semana, eu consegui fazer o cálculo do Simples Nacional no meu notebook, mas eu não consegui fazer o valor do imposto ser igual ao que foi calculado pela Contabilidade, a diferença é de alguns centavos, mas eu posso usar o meu programa como uma estimativa. O problema foi na hora de copiar o meu código PHP na Hostinger, lá o PHP reclamou que o comando scandir não encontrou o diretório que mandei procurar. Levei um tempão para entender porque o scandir não funciona: o que funciona no notebook nem sempre vai funcionar na Hostinger. Na base da tentativa e erro, fui procurar a solução no HTML, no <input type="file" multiple>, mas o máximo que eu consegui foi obter uma lista de 20 arquivos, quando precisava ver coisa da ordem de 700 arquivos. O Copilot explicou que o navegador e o servidor podem definir restrição para o <input type="file" multiple>, e o Copilot disse que eu preciso estudar mais, ir além do PHP e aprender como fazer a Hostinger ter acesso remoto ao meu notebook, e assim calcular o Simples Nacional na internet. A minha primeira tentativa de calcular o Simples foi pelo comando zipArchive do PHP, e eu consegui fazer funcionar uma vez ou outra. O Windows sempre consegue abrir o arquivo .zip, já o comando zipArchive do PHP sempre reclamava que encontrou erro no arquivo, assim eu desisti dele. Conclusão: eu não sei se é possível calcular o Simples Nacional na internet, mas eu consegui calcular aqui no notebook com o PHP. Mas para calcular o Simples aqui no notebook, eu preciso da venda dos doze últimos meses que está no MySQL que está hospedado lá na Hostinger. Isso é constrangedor, mas pelo menos eu posso chorar a vontade, isso é o que dá para fazer quando estou num beco sem saída. bling.php (parcial) <?php class Bling { static function simplesSelecionado() { $diretorio="C:/Users/Frank/Downloads/".substr($_FILES['pasta']['full_path'],0,-4); $contaArquivos = count(scandir($diretorio)) - 2 - 2 ; $notasFiscais = []; $nfCanceladas = []; $nfces = scandir($diretorio); $notasCanceladas=0; $somaTotal=0; $comST=0; $semST=0; foreach($nfces as $nfce) { if($nfce !== '.' && $nfce !=='..' ) { if(strpos($nfce,'-can') !== false) { $nfCanceladas[] = intval(substr($nfce,28,6)); $notasCanceladas++; continue; } $numeroNota=intval(substr($nfce,28,6)); if(in_array($numeroNota,$nfCanceladas)) { continue; } $notasFiscais[]=$numeroNota; $dom = new DOMDocument(); $dom->load("$diretorio/$nfce"); $nfe=$dom->documentElement; if($nfe->getElementsByTagName('vNF')->item(0)) { $somaNF=$nfe->getElementsByTagName('vNF')->item(0)->nodeValue; $somaTotal+=$somaNF; $produtos=$nfe->getElementsByTagName('prod'); foreach($produtos as $p) { $cfop=$p->getElementsByTagName('CFOP')->item(0)->nodeValue; $vProd=$p->getElementsByTagName('vProd')->item(0)->nodeValue; $vDesc=0; if($p->getElementsByTagName('vDesc')->item(0)) { $vDesc=$p->getElementsByTagName('vDesc')->item(0)->nodeValue; } if($cfop==5405) { $comST += $vProd - $vDesc; } else { $semST += $vProd - $vDesc; } } } } } sort($notasFiscais); $primeiraNota=intval($notasFiscais[0]); $ultimaNota=intval($notasFiscais[$contaArquivos-1]); $totalDeNotas=count($notasFiscais); $rendas=bd::x('select * from tbrendabruta order by id desc limit 13')->get(); $renda=0; foreach($rendas as $key=>$r) { if($key>0) { $renda += $r->renda; } } // indices da primeira faixa da tabela do Simples Nacional 2025 no comércio $aliqICMS=1.36; $ICMS=round($semST*$aliqICMS/100,2); $aliqIRPJ=0.22; $IRPJ=round($somaTotal*$aliqIRPJ/100,2); $aliqCSLL=0.14; $CSLL=round($somaTotal*$aliqCSLL/100,2); $aliqCOFINS=0.5096; $COFINS=round($somaTotal*$aliqCOFINS/100,2); $aliqPIS=0.1105; $PIS=round($somaTotal*$aliqPIS/100,2); $aliqINSS=1.66; $INSS=intval($somaTotal*$aliqINSS)/100; $aliqSimples=4; $Simples=$ICMS+$IRPJ+$CSLL+$COFINS+$PIS+$INSS; view('blingSimples',['primeiraNota'=>$primeiraNota,'ultimaNota'=>$ultimaNota, 'notasFiscais'=>$notasFiscais,'somaTotal'=>$somaTotal, 'contaArquivos'=>$contaArquivos,'notasCanceladas'=>$notasCanceladas, 'totalDeNotas'=>$totalDeNotas,'nfCanceladas'=>$nfCanceladas, 'comST'=>$comST,'semST'=>$semST,'renda'=>$renda, 'aliqICMS'=>$aliqICMS,'ICMS'=>$ICMS, 'aliqIRPJ'=>$aliqIRPJ,'IRPJ'=>$IRPJ, 'aliqCSLL'=>$aliqCSLL,'CSLL'=>$CSLL, 'aliqCOFINS'=>$aliqCOFINS,'COFINS'=>$COFINS, 'aliqPIS'=>$aliqPIS,'PIS'=>$PIS, 'aliqINSS'=>$aliqINSS,'INSS'=>$INSS, 'aliqSimples'=>$aliqSimples,'Simples'=>$Simples, 'rendas'=>$rendas]); } } arquivo blingSimples.php (ele usa o CSS https://cdn.tailwindcss.com) <?php include 'menuView.php'; ?> <script>btMenu.innerHTML="Simples";document.title="Simples"</script> <div class=flex> <div>Total de Notas</div> <div class="ml-2"><?=$totalDeNotas?></div> </div> <div class=flex> <div>Notas Canceladas</div> <div class="ml-2 text-right mr-2"><?=$notasCanceladas.": ";?></div> <?php foreach($nfCanceladas as $n): echo $n."<br>"; endforeach; ?> </div> <div class=flex> <div>Total das Notas Fiscais</div> <div class="text-right ml-2"><?=dec($somaTotal)?></div> </div> <div class=flex> <div>Primeira Nota</div> <div class="text-right ml-2"><?=$primeiraNota?></div> </div> <div class=flex> <div>Última Nota</div> <div class="text-right ml-5"><?=$ultimaNota?></div> </div> <div class=flex> <div class="w-[120px]">Renda 12 Meses</div> <div class="w-[100px] text-right"><?=dec($renda)?></div> </div> <div class="flex"> <?php $contador = 0; foreach($rendas as $key=>$r): if($key>0): if ($contador % 4 === 0 && $contador !== 0): ?> </div><div class="flex"> <?php endif; ?> <div class="w-[50px]"><?php echo $r->apuracao; ?></div> <div class="w-[80px] text-right font-semibold mr-2"><?php echo dec($r->renda); ?></div> <?php $contador++; endif; endforeach; ?> </div> <div class=flex> <div class="w-[120px]">Com ST</div> <div class="w-[100px] text-right"><?=dec($comST)?></div> </div> <div class=flex> <div class="w-[120px]">Sem ST ICMS</div> <div class="w-[100px] text-right"><?=dec($semST)?></div> <div class="w-[100px] text-right"><?=dec($aliqICMS)."%"?></div> <div class="w-[100px] text-right"><?=dec($ICMS)?></div> </div> <div class=flex> <div class="w-[120px]">IRPJ</div> <div class="w-[100px] text-right"><?=dec($somaTotal)?></div> <div class="w-[100px] text-right"><?=dec($aliqIRPJ)."%"?></div> <div class="w-[100px] text-right"><?=dec($IRPJ)?></div> </div> <div class=flex> <div class="w-[120px]">CSLL</div> <div class="w-[100px] text-right"><?=dec($somaTotal)?></div> <div class="w-[100px] text-right"><?=dec($aliqCSLL)."%"?></div> <div class="w-[100px] text-right"><?=dec($CSLL)?></div> </div> <div class=flex> <div class="w-[120px]">COFINS</div> <div class="w-[100px] text-right"><?=dec($somaTotal)?></div> <div class="w-[100px] text-right"><?=dec($aliqCOFINS)."%"?></div> <div class="w-[100px] text-right"><?=dec($COFINS)?></div> </div> <div class=flex> <div class="w-[120px]">PIS</div> <div class="w-[100px] text-right"><?=dec($somaTotal)?></div> <div class="w-[100px] text-right"><?=dec($aliqPIS)."%"?></div> <div class="w-[100px] text-right"><?=dec($PIS)?></div> </div> <div class=flex> <div class="w-[120px]">INSS</div> <div class="w-[100px] text-right"><?=dec($somaTotal)?></div> <div class="w-[100px] text-right"><?=dec($aliqINSS)."%"?></div> <div class="w-[100px] text-right"><?=dec($INSS)?></div> </div> <div class=flex> <div class="w-[120px]">Simples</div> <div class="w-[100px] text-right">Estimativa</div> <div class="w-[100px] text-right"><?=dec($aliqSimples)."%"?></div> <div class="w-[100px] text-right font-semibold"><?=dec($Simples)?></div> </div>
  15. O Visual Studio não instala automaticamente todas as estruturas de desenvolvimento (.NET Framework, .NET Core, .NET 5+). Você precisa verificar e instalar o .NET Core SDK.
  16. Frank K Hosaka

    PHP: continue

    Comecei a estudar o cálculo do Simples Nacional, começando com um arquivo zipado da Bling, onde tem um monte de NFCE. O problema é a nota cancelada. A nota comum tem o formato 35...123-nfe.xml, já a nota cancelada tem o formato 35...123-can.xml. No Windows Explorer, o arquivo -can aparece antes do -nfe. Usei o famoso método da tentativa e erro e presumi que o comando PHP scandir($diretorio) seguisse o mesmo formato do Windows Explorer. O problema é como desconsiderar o arquivo -can e o arquivo -nfe correspondente. E assim o Copilot me ensinou a usar um novo comando do PHP, o continue. Eu achei esse comando muito esperto, digno de receber uma nota aqui no fórum, o comando continue simplesmente faz o ciclo foreach pular para o item seguinte: <?php class Bling { function faltanteSelecionado() { $diretorio="C:/Users/Frank/Downloads/".substr($_FILES['pasta']['full_path'],0,-4); $contaArquivos = count(scandir($diretorio)) - 2 - 2 ; $notasFiscais = []; $nfCanceladas = []; $nfces = scandir($diretorio); $notasCanceladas=0; $somaTotal=0; $comST=0; $semST=0; foreach($nfces as $nfce) { if($nfce !== '.' && $nfce !=='..' ) { if(strpos($nfce,'-can') !== false) { $nfCanceladas[] = intval(substr($nfce,28,6)); $notasCanceladas++; continue; } $numeroNota=intval(substr($nfce,28,6)); if(in_array($numeroNota,$nfCanceladas)) { continue; } $notasFiscais[]=$numeroNota; $dom = new DOMDocument(); $dom->load("$diretorio/$nfce"); $nfe=$dom->documentElement; if($nfe->getElementsByTagName('vNF')->item(0)) { $somaNF=$nfe->getElementsByTagName('vNF')->item(0)->nodeValue; $somaTotal+=$somaNF; $produtos=$nfe->getElementsByTagName('prod'); foreach($produtos as $p) { $cfop=$p->getElementsByTagName('CFOP')->item(0)->nodeValue; $vProd=$p->getElementsByTagName('vProd')->item(0)->nodeValue; $vDesc=0; if($p->getElementsByTagName('vDesc')->item(0)) { $vDesc=$p->getElementsByTagName('vDesc')->item(0)->nodeValue; } if($cfop==5405) { $comST += $vProd - $vDesc; } else { $semST += $vProd - $vDesc; } } } } } sort($notasFiscais); $primeiraNota=intval($notasFiscais[0]); $ultimaNota=intval($notasFiscais[$contaArquivos-1]); $totalDeNotas=count($notasFiscais); view('blingFaltante',['primeiraNota'=>$primeiraNota,'ultimaNota'=>$ultimaNota, 'notasFiscais'=>$notasFiscais,'somaTotal'=>$somaTotal, 'contaArquivos'=>$contaArquivos,'notasCanceladas'=>$notasCanceladas, 'totalDeNotas'=>$totalDeNotas,'nfCanceladas'=>$nfCanceladas, 'comST'=>$comST,'semST'=>$semST]); } }
  17. Ao invés de usar uma caixa de texto, usei uma célula do lado. Se a célula estiver vazia, isso gera erro. Para contornar esse contratempo, o melhor é pedir para o VBA não considerar se a célula estiver vazia, tipo: Sub Teste() If Not IsEmpty(Range("L5").Value) Then Range("K5").Value = Format(Range("L5").Value, "dd,mm,yyyy") Else MsgBox "A célula L5 está vazia. Por favor, insira um valor antes de executar a macro.", vbExclamation, "Aviso" End If End Sub
  18. Tentei fazer do seu jeito, insert into meus_contatos (id_contatos,sobrenome) values (null,'frank') e deu certo. Acredito que o problema estava nas aspas, eu tive que mudar um monte de aspas curvas com aspas simples '
  19. Obrigado, Frank. Estou aqui agora tentando entender o que estava errado. Eu copiei do livro Use a cabeça-SQL. Vi que você omitiu a chave primária. Eu havia feito outros exemplos sem omitir e não deu erro. Veja um do mesmo jeito e que não deu erro: CREATETE DATABASE banco_de_dados; USE banco_de_dados; CREATE TABLE lista_donut ( id_donut INT AUTO_INCREMENT PRIMARY KEY, nome_donut VARCHAR(20), tipo_donut VARCHAR(20) ); INSERT INTO lista_donut (id_donut, nome_donut, tipo_donut) VALUES (NULL, 'Bolinho', 'Levedura'); INSERT INTO lista_donut (id_donut, nome_donut, tipo_donut) VALUES (NULL, 'churros','doce de leite'); INSERT INTO lista_donut (id_donut, nome_donut, tipo_donut) VALUES (NULL, 'Redondo', 'Glaceado'); INSERT INTO lista_donut (id_donut, nome_donut, tipo_donut) VALUES (NULL, 'Rosca', 'frutas');
  20. CREATE TABLE meus_contatos ( id_contatos INT NOT NULL AUTO_INCREMENT PRIMARY KEY, sobrenome VARCHAR(30), primeiro_nome VARCHAR(20), sexo CHAR(1), email VARCHAR(50) UNIQUE, aniversario DATE, profissao VARCHAR(50), locall VARCHAR(50), estado_civil VARCHAR(20), interesses VARCHAR(100), procura VARCHAR(100) ); INSERT INTO meus_contatos (sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES ('Almeida', 'Jose', 'M', 'jose@gmail.com', '1970-02-02', 'pedreiro', 'brazlandia', 'casado', 'cinema', 'emprego'), ('Prado', 'Joao', 'M', 'joao@gmail.com', '1971-02-02', 'marceneiro', 'brazlandia', 'casado', 'jogos', 'relacionamento'), ('Oliveira Souza', 'Jonas', 'M', 'jonas@gmail.com', '1973-02-02', 'empresario', 'brazlandia', 'casado', 'futebol', 'emprego'), ('Gomes', 'Sergio', 'M', 'sergio@gmail.com', '1979-02-02', 'marceneiro', 'brazlandia', 'solteiro', 'voleibol', 'relacionamento'), ('Gomes', 'Joana', 'F', 'joana@gmail.com', '1980-02-02', 'marceneiro', 'brazlandia', 'casada', 'educacao', 'viagens');
  21. FRANK DESCOBRI O PORQUE NÃO FUNCIONAVA DIREITO, QUANDO EU MOVIA SEMPRE PRA UMA NOVA PLANILHA E ISSO OCASIONAVA A INCOSCISTENCIA DO NUMERO DO GRAFICO NA HORA DE CHAMAR. MAS TE AGRADEÇO PELA AJUDA. ABRAÇO.
  22. Boa tarde Frank. Faz o seguinte teste. crie uma planilha de dados e gere 4 gráficos como você fez mova os seus gráficos para a planiha gráficos crie uma planilha e coloque 4 botoes que cada um vai chamar um grafico nessa planilha crie o objetro image que a cada click no botão vai mostrar o grafico do botão correspondente e vamos ver se funciona. vou te passar o codigo para você colocar no botão que vai mostrar o grafico; coloque no seu botão1 esse codigo e nos outros mude somente o nome do grafico . 'On Error GoTo erro 'On Error Resume Next Dim pastanome As String Dim plan As String Planilha4.Activate ' ativa a planilha de nome gráficos a sua planilha pode ser outra planilha plan = Planilha4.Name ' pega o nome da planilha4 que é "gráficos" Me.Repaint Set nomecharts = Sheets(plan).ChartObjects("Gráfico 1").Chart ' pega a planilha e o grafico correspondente nesse caso janeiro grafico 1 pastanome = ThisWorkbook.Path & Application.PathSeparator & "grafico.gif" ' pega na pasta(caminho) o grafico 1 como grafico.gif nomecharts.Export Filename:=pastanome, filtername:="GIF" ' exporta o grafico.gif Image1.Picture = LoadPicture("E:\Controle Glicose\grafico.gif") ' coloca o grafico exportado na image1 no end selecionado Planilha4.Activate Me.Repaint Exit Sub erro: MsgBox "ERROR", vbCritical, "ERROR" copie essa mesma rotina para os outros botoes mudando o nome do grafico no set e troque o os nomes da planilha4 pela a da sua planilha. o nome do grafico e criado automaticamente quando movemos para outra planilha seleciona o grafico e aparece o nome. vamos ver se funciona, pra mim tem hora que funciona tem hora que mostra outro grafico. mas desde já´ te agradeço pela cooperação e ajuda; No seu exemplo você gera o grafico no mesmo lugar dos dados, no meu eu gero no mesmo lugar , mas movo eles para a planilha grafico e acesso essa planilha para mostrar o grafico no image1.
  23. Não to conseguindo resolver. Erro Query SQL: Copiar INSERT INTO meus_contatos (id_contatos,sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Almeida’, ‘Jose’, ‘M’, ‘jose@gmail.com’, ‘1970-02-02’, ‘pedreiro’, ‘brazlandia’, ‘casado’, ‘cinema’, ‘emprego’); Mensagem do MySQL: #1064 - Você tem um erro de sintaxe no seu SQL próximo a '@gmail.com’, ‘1970-02-02’, ‘pedreiro’, ‘brazlandia’, ‘casado’,' na linha 4 Veja minhas instruções: CREATE DATABASE banco_de_dados; USE banco_de_dados; CREATE TABLE meus_contatos ( id_contatos INT NOT NULL AUTO_INCREMENT PRIMARY KEY, sobrenome VARCHAR(30), primeiro_nome VARCHAR(20), sexo CHAR(1), email VARCHAR(50) UNIQUE, aniversario DATE, profissao VARCHAR(50), locall VARCHAR(50), estado_civil VARCHAR(20), interesses VARCHAR(100), procura VARCHAR(100) ); INSERT INTO meus_contatos (id_contatos,sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Almeida’, ‘Jose’, ‘M’, ‘jose@gmail.com’, ‘1970-02-02’, ‘pedreiro’, ‘brazlandia’, ‘casado’, ‘cinema’, ‘emprego’); INSERT INTO meus_contatos (id_contatos,sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Prado’, ‘Joao’, ‘M’, joao@gmail.com’, ‘1971-02-02’, ‘marceneiro’, ‘brazlandia’, ‘casado’, ‘jogos’, ‘relacionamento’); INSERT INTO meus_contatos (id_contatos, sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Oliveira Souza’, ‘Jonas’, ‘M’, ‘jonas@gmail.com’, ‘1973-02-02’, ‘empresario’, ‘brazlandia’, ‘casado’, ‘futebol’, ‘emprego’); INSERT INTO meus_contatos (id_contatos, sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Gomes’, ‘Sergio’, ‘M’, ‘sergio@gmail.com’, ‘1979-02-02’, ‘marceneiro’, ‘brazlandia’, ‘solteiro’, ‘voleibol’, ‘relacionamento’); INSERT INTO meus_contatos (id_contatos, sobrenome, primeiro_nome, sexo, email, aniversario, profissao, locall, estado_civil, interesses, procura) VALUES (NULL, ‘Gomes’, ‘Joana’, ‘F’, ‘joana@gmail.com’, ‘1980-02-02’, ‘marceneiro’, ‘brazlandia’, ‘casada’, ‘educacao’, ‘viagens’);
  24. Bom dia pessoal, estou realizando um projeto na empressa e fiquei travado em um ponto aqui, para realizar o cadastro tenho 9 textbox para registrar, porém apenas 5 são obrigatório para preencher as demais serão preenchidas posteriormente o atualizar ou editar o cadastro, estava tudo ok, porém eu tive um problema com as datas que estavam invertendo o dia e mês na tabela, eu corrigi isso, mais agora quando eu tento fazer o cadastro os outros campo das datas dão erro. Na imagem em anexo está onde deu o erro. Os 4 últimos range ali, eu irei preencher posteriormente. Existe uma forma de fazer ele entender que se o campo estiver vazio ele mesmo assim termine de realizar o cadastro?
  25. Mais uma tentativa: Criei um gráfico e copiei três vezes o mesmo gráfico; criei um userform,um ListBox com nomem lstCharts e um botão com nome cmdApplyBorder, e o código no ambiente do UserForm ficou assim: Private Sub UserForm_Initialize() Dim ws As Worksheet Set ws = ThisWorkbook.Sheets("gráficos") Dim cht As ChartObject For Each cht In ws.ChartObjects lstCharts.AddItem cht.Name Next cht ' Define o tamanho da fonte da ListBox lstCharts.Font.Size = 14 End Sub Private Sub cmdApplyBorder_Click() Dim ws As Worksheet Set ws = ThisWorkbook.Sheets("gráficos") Dim selectedChart As String selectedChart = lstCharts.Value If selectedChart <> "" Then Dim cht As ChartObject ' Define a borda preta fina para todos os gráficos For Each cht In ws.ChartObjects cht.Border.Color = RGB(0, 0, 0) cht.Border.Weight = xlThin Next cht ' Desenha a borda vermelha mais grossa no gráfico correspondente Set cht = ws.ChartObjects(selectedChart) cht.Border.Color = RGB(255, 0, 0) cht.Border.Weight = xlThick ' Fecha o UserForm Unload Me Else MsgBox "Por favor, selecione um gráfico.", vbExclamation End If End Sub No ambiente de código da planilha gráfico, criei o seguinte comando: Sub ShowUserForm() UserForm1.Show End Sub
  26. Frank, funcionou a criação do grafico, mas quando levo pra planilha de gráficos e chamo para mostrar o grafico ele não funciona. O problema e ue ele se perde quando direciono para a planilha de grafico e chamo o gafico correspondente. ele mostra outro grafico. ex. chamo para mostrar o grafico de janeiro(grafico1) e ele mostra o de março(grafico3). E uma coisa intermitente, tem hora que funciona e tem hora que não. Não sei porque. Mas mesmo assim OBRIGADO>
  27. Obrigado, vou tentar, pois já fiz de tudo e não adiantou, depois mando se resolveu.
  28. Boa noite Antes, avalie a necessidade da biblioteca string, ela é, relativamente, simples de implementar. Essas funções utilizadas no seu código-fonte são em alguns caso o exercício. strlen, strcmp, strcat Diga-me, o exercício é sobre; 1- A biblioteca ou 2- iterações sobre vetores? Depende do apontamento. Opções 1 e 2 tem lógica semelhante, elas diferem no código-fonte, sendo do mais ao menos sintético. Uma de suas falhas é a seguinte: o arroba dos endereços segue o nome. Entretanto, a expressão abaixo sugere o contrário. ^----- Falhou na semântica, no argumento e_mail o endereço (ponteiro) aponta uma string constante: se precisa modificar o seu valor, altere na função que chama. Revise!
  1. Mais Resultados


  • Estatísticas dos Fóruns

    • Tópicos
      152,4k
    • Posts
      652,2k
×
×
  • Criar Novo...