Ir para conteúdo
Fórum Script Brasil

Pesquisar na Comunidade

Mostrando resultados para as tags ''Erro''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Programação & Desenvolvimento
    • ASP
    • PHP
    • .NET
    • Java
    • C, C++
    • Delphi, Kylix
    • Lógica de Programação
    • Mobile
    • Visual Basic
    • Outras Linguagens de Programação
  • WEB
    • HTML, XHTML, CSS
    • Ajax, JavaScript, XML, DOM
    • Editores
  • Arte & Design
    • Corel Draw
    • Fireworks
    • Flash & ActionScript
    • Photoshop
    • Outros Programas de Arte e Design
  • Sistemas Operacionais
    • Microsoft Windows
    • GNU/Linux
    • Outros Sistemas Operacionais
  • Softwares, Hardwares e Redes
    • Microsoft Office
    • Softwares Livres
    • Outros Softwares
    • Hardware
    • Redes
  • Banco de Dados
    • Access
    • MySQL
    • PostgreSQL
    • SQL Server
    • Demais Bancos
  • Segurança e Malwares
    • Segurança
    • Remoção De Malwares
  • Empregos
    • Vagas Efetivas
    • Vagas para Estágios
    • Oportunidades para Freelances
  • Negócios & Oportunidades
    • Classificados & Serviços
    • Eventos
  • Geral
    • Avaliações de Trabalhos
    • Links
    • Outros Assuntos
    • Entretenimento
  • Script Brasil
    • Novidades e Anúncios Script Brasil
    • Mercado Livre / Mercado Sócios
    • Sugestões e Críticas
    • Apresentações

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. 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.
  2. Olá gente, Sou novo no fórum, desculpe alguma coisa. Já faz um tempo que venho tentando solucionar um problema que vem me incomodando muito, à um tempo atrás meu Corel Draw estava perfeito, porém de uns meses para cá ele não consegue salvar ou exportar as ilustrações pra PDF, já tentei re-instalar, procurar novos drives instalar versões anteriores e nada deu certo, até já tentei salvar em .ai(adobe illustrator) para depois salvar como PDF mas também descobri que ele também não estava salvando corretamente esse tipo de arquivo. Quando o Corel Converte o PDF fica sempre no mesmo tamanho (um quadrado) e em branco. Para o .aí aparece uma mensagem de erro (não lembro a mensagem, mas vou postar um print). Encontrei uma solução temporária, exportar em JPG e depois converter para PDF, mas essa solução faz com que se perca a qualidade e os objetos "achatam" em uma só imagem. Meu computador é muito potente: Windows 7 Core i7 8gb de RAM 4T de HD Por favor peço a ajuda de vocês para solucionar esse problema, espero ter escrito tudo para poder ajudar a descobrir o problema. Obrigado
  3. Fala rapaziada, recentemente comprei o pacote oficial da Adobe, tudo certinho, só que apenas com o Photoshop estou tendo este problema, anexei a imagem aqui. Tento abrir o Photoshop mas não vai por nada e da esse erro, já tentei instalar versões anteriores mas não funcionou, não achei nenhuma solução até agora, alguém ai já teve esse problema?
  4. Pessoal Boa Tarde! Se alguém puder me ajudar estou utilizando rodando um sisteminha PDV em wampserver utilizando PHP 7.0.33 funciona tudo certinho mais ao realizar a impressao do cupom fiscal ele não apresentar a descricao do produto. segue abaixo o codigo que esta apresentando o erro <?php $tax_summary = array(); foreach ($rows as $row) { echo '<tr><td class="text-left">' . product_name($row->product_name) . '</td>'; echo '<td class="text-center">' . $this->tec->formatNumber($row->quantity) . '</td>'; echo '<td class="text-right">'; if ($inv->total_discount != 0) { $price_with_discount = $this->tec->formatMoney($row->net_unit_price + $this->tec->formatDecimal($row->item_discount / $row->quantity)); $pr_tax = $row->tax_method ? $this->tec->formatDecimal((($price_with_discount) * $row->tax) / 100) : $this->tec->formatDecimal((($price_with_discount) * $row->tax) / (100 + $row->tax)); echo '<del>' . $this->tec->formatMoney($price_with_discount+$pr_tax) . '</del> '; } echo $this->tec->formatMoney($row->net_unit_price + ($row->item_tax / $row->quantity)) . '</td><td class="text-right">' . $this->tec->formatMoney($row->subtotal) . '</td></tr>'; } ?>
  5. Olá senhores! Eu trabalho como afiliado, e preciso clonar uma página de vendas de um produto digital para usar na minha estrutura própria. Eu clonei a página, e descobri que o site era feito no wordpress / elementor. Funcionou perfeitamente, porém todos os links fazem referência ao site original, como imagens, css, scripts e outros. Porém seria mais interessante que o arquivo index puxasse todas essas referências direto dos diretórios locais, para manter a organização e evitar problemas futuros. Pensando nisso eu removi o endereço do site original das referências, mas quando eu faço isso o site quebra, e não faz sentido sendo que os arquivos referenciados existem nos diretórios locais. Por exemplo, uma referencia que teria: <link rel='stylesheet' id='hello-elementor-css' href='https://nome-do-site.com/wp-content/themes/hello-elementor/style.min.css?ver=2.6.1' media='all' /> Sabendo que os diretórios e os arquivos referenciados existem no diretório local, eu removo https://nome-do-site.com porém não funciona e o site quebra. Por favor, há algum detalhe que eu não percebi, ou teria alguma outra forma de resolver esse problema? Não estou conseguindo achar uma solução por conta própria, e agradeço qualquer ajuda.
  6. Boa noite quando executo o código aparece a 1 pergunta (Nome do neto) e a aplicação simplesmente da erro 0xC0000005 e fecha. Erro Já revi o código várias vezes e não consigo encontrar o erro. Alguém me pode ajudar por favor ? ( Sou novo em programação). #include <stdio.h> #include <locale.h> #include <stdlib.h> int main (){ setlocale(LC_ALL, ""); int nomedoneto, nomedoavoM1, nomedaavoP1, nomedoavoM2, nomedaavoP2; //nome do neto e dos 4 avós. int idadedoneto, idadedoavoM1, idadedaavoP1, idadedoavoM2, idadedaavoP2; //idade do neto e dos 4 avós. printf("O nome do neto é: \n"); scanf("%s", nomedoneto); printf("A idade do neto é: \n"); scanf("%d", &idadedoneto); printf("O nome do avôM1 é: \n"); scanf("%s", nomedoavoM1); printf("A idade do avôM1 é: \n"); scanf("%d", &idadedoavoM2); printf("O nome do avôM2 é: \n"); scanf("%s", nomedoavoM2); printf("A idade do avôM2 é: \n"); scanf ("%d", &idadedoavoM2); printf("O nome da avóP1 é: \n"); scanf ("%s", nomedaavoP1); printf("A idade da avôP1 é: \n"); scanf ("%d", &idadedaavoP1); printf("O nome da avóP2 é: \n"); scanf ("%s", nomedaavoP2); printf("A idade da avóP2 é: \n"); scanf ("%d", &idadedaavoP2); int diferencadaidade1 = idadedoavoM1 - idadedoneto; int diferencadaidade2 = idadedoavoM2 - idadedoneto; int diferencaidade3 = idadedaavoP1 - idadedoneto; int diferencadaidade4 = idadedaavoP2 - idadedoneto; printf("A diferença da idade do neto e da sua avó materna é: %d \n, com o seu avô materno é de: %d \n, com a sua avó paterna é: %d \n e com o seu avô paterno é de: %d \n "); return 0; }
  7. Olá. Eu estou começando agora a programar e estava tentando executar um código para a reprodução de áudio pelo VSCode a partir da biblioteca pygame usando Python. Eu copiei o arquivo de áudio para a mesma pasta onde está salvo o arquivo do código, mas continua me devolvendo erro e eu não sei o que fazer já que este era supostamente um código simples(kk). No caso estou usando o linux Lite. Erro: /bin/python3.9 "/home/samuel/Desktop/programmer/python/exercicios python curso em vídeo/21-playSound.py" Traceback (most recent call last): File "/home/samuel/Desktop/programmer/python/exercicios python curso em vídeo/21-playSound.py", line 1, in <module> import pygame File "/usr/lib/python3/dist-packages/pygame/__init__.py", line 120, in <module> from pygame.base import * ModuleNotFoundError: No module named 'pygame.base' código: import pygame pygame.mixer.init() pygame.init() pygame.mixer.music.load('som.wav') pygame.mixer.music.play(loops=0,start=0.0) pygame.event.wait()
  8. Bom dia! Como resolvo: Escreva um programa que calcula a área de um retângulo. O programa deve pedir ao usuário que entre com a altura e a largura do retângulo. Em seguida deve imprimir uma mensagem com a resposta. Tentei fazer assim: altura_retangulo = input ("Entre com a altura do retângulo") largura_retangulo = input ("Entre com a largura do retangulo") area_retangulo = (altura_retangulo * altura_retangulo) print(area_retangulo) Só que dá erro. Vocês podem me ajudar? Obrigado!
  9. Olá pessoal, tudo bem? Tenho uma planilha com macros para tratamento de dados e está habilitada para macros, porém, acontece um bug que ela simplesmente some com todos os códigos e não deixa salvar a plan. Aparecendo os erros abaixo e quando dou atl+F11 os módulos estão em branco. Já aconteceram 3x com planilhas diferentes. Ela funciona por um período e do Nada acontece esse erro. uso ela todos os dias para atualizar as bases de dados. Alguém já passou por um problema semelhante? Vlw, pessoal.
  10. SCRIPT: @echo off & setlocal DisableDelayedExpansion set counter=4 :senha Title %~n0 Mode 50,5 & Color 0e if %counter% equ 0 goto :senha2 set /p input="Enter Username: " set "psCommand=powershell -Command "$pword = read-host 'Enter password' -AsSecureString ; ^ $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^ [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)"" for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p ) if %input%==joao123 ( if %password%==1234 goto :Senha4 ) goto :senha3 :senha2 echo echo Account Locked Out Timeout In 5 timeout /t 5 exit :senha3 echo, set /a counter -=1 echo. @echo on @echo off color 40 echo USERNAME OR PASSWORD INCORRETO(S) echo. if %counter% lss 4 echo %counter% tentativas restantes pause goto senha :senha4 echo Username and Passwords corretos! color 0a pause
  11. Olá! Gostaria de pedir ajuda. Quando quero fazer o rastreio de contorno de alta qualidade , na janela do meu corel draw x7 é impossível clicar no botão de ok para finalizar o processo! Como faço para conseguir?? Obrigada =D
  12. Tenho um sistema onde são cadastrados médicos e plantões, para mostrar ao cliente todos os plantões preciso fazer um join na tabela de médicos. Porém, o join está retornando com erro: todos os dados dos médicos vem certo, porém os do plantão vem um mesmo valor em todas as linhas. Acredito que seja um erro de join, pois com 2 selects os valores retornados ficam normais. Alguém pode me ajudar? (está em anexo o print de como está retornando os valores) Código: SELECT * FROM TB_PLANTOES join TB_MEDICOS on PLANT_MED_CODIGO = PLANT_CODIGO order by field(PLANT_DIA,'Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado');
  13. Olá pessoal, to começando a programa e me indicaram o VS Code, podem está dando erro na hora de compilar. Estou começando a programar em C, sempre que peço para o programa compilar aparece que deu erro, alguém poderia me ajudar???
  14. Olá, Quando tento executar um comando para criar uma PROCEDURE, este erro aparece: "Error Code: 1558. Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100411. Please use mysql_upgrade to fix this error" Pesquisei e executei este comando: sudo mysql_upgrade -u root -p Que me retornou este erro: "mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server. Upgrade process encountered error and will not continue." Como posso resolvê-lo? Obrigada.
  15. Bom dia, Tenho um pequeno sistema de registro de denúncias. O cadastro funciona, de boa, mas a pesquisa quando vou escolher as datas, aparece esse erro aqui: Erro em tempo de execução '-2147467259(80004005)': Erro não especificado Eis o código: Private Sub btnPesquisar_Click() Dim linhaFinal, linha, x As Integer ListBox1.Clear // o erro para aqui e não depura mais linhaFinal = Planilha1.Cells(Rows.Count, 1).End(xlUp).Row x = 0 For linha = 2 To linhaFinal If Planilha1.Cells(linha, 1).Value >= MonthView1 And Planilha1.Cells(linha, 1).Value <= MonthView2 Then ListBox1.AddItem Planilha1.Cells(linha, 1).Value ListBox1.List(x, 1) = Planilha1.Cells(linha, 2).Value ListBox1.List(x, 2) = Planilha1.Cells(linha, 3).Value ListBox1.List(x, 3) = Planilha1.Cells(linha, 4).Value ListBox1.List(x, 4) = Planilha1.Cells(linha, 5).Value x = x + 1 End If Next End Sub Porque isso acontece e o que pode ser feito? Preciso da ajuda dos colegas! Forte abraço! Resposta Rápida Resposta 1
  16. Tive um problema com arquivos em PDF, alguns dos arquivos abrem normalmente por leitores de PDF, porém ao abrir no CorelDraw ele apresenta um erro "O arquivo está danificado", mas, como comentado, o arquivo pode ser aberto por seus leitores, alguém sabe o que poderia arrumar o erro? Obrigado!
  17. #include <gtk/gtk.h> //Uma novidade que vem do c.. //Os comentarios podem ser escritos com // ou /* */ /* Esta é uma função callback. Os argumentos de dados são ignorados * neste exemplo. Mais sobre callbacks abaixo. */ static void hello( GtkWidget *widget, gpointer data ) { g_print ("Hello World\n"); } static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { /* Se você retornar FALSE no tratador do sinal "delete_event", * o GTK emitirá o sinal "destroy". Retornar TRUE significa * que você não quer que a janela seja destruída. * Isso é útil para exibir diálogos do tipo 'tem certeza de * que deseja sair?'. */ g_print ("evento 'delete' ocorreu\n"); /* Mude TRUE para FALSE e a janela principal será destruída com um * "delete_event". */ return TRUE; } /* Outro callback */ static void destroy( GtkWidget *widget, gpointer data ) { gtk_main_quit (); } int main( int argc, char *argv[] ) { /* GtkWidget é o tipo de dado para os widgets */ GtkWidget *window; GtkWidget *button; /* Esta função é chamada em todas as aplicações GTK. Argumentos da linha * de comando são interpretados e retornados à aplicação. */ gtk_init (&argc, &argv); /* criar uma nova janela */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); /* Quando a janela recebe o sinal "delete_event" (dado pelo gerenciador * de janelas, geralmente pela opção "fechar", ou na barra de título), * nós pedimos que ela chame a função delete_event () como definido * acima. Os dado passado para a função callback é NULL e é ignorado. */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event), NULL); /* Aqui conectamos o evento "destroy" a um tratador de sinal. Esse * evento ocorre quando chamamos gtk_widget_destroy() na janela, ou * se retornamos FALSE no callback "delete_event". */ g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL); /* Ajusta a largura da borda da janela. */ gtk_container_set_border_width (GTK_CONTAINER (window), 10); //Coloca um nome na janela gtk_window_set_title (GTK_WINDOW (window), "Aqui o nome da Janela"); /* Cria um novo botão com o texto "Hello World". */ button = gtk_button_new_with_label ("Hello World"); /* Quando o botão recebe o sinal "clicked", chamará a função hello() * passando NULL como argumento. hello() é definida acima. */ g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (hello), NULL); /* Isso fará com que a janela será destruída pela chamada * gtk_widget_destroy(window) quando o botão for clicado ("clicked"). * Novamente, o sinal destroy poderia vir daqui ou do gerenciador * de janelas. */ g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (window)); /* Isto empacota o botão na janela (um recipiente gtk). */ gtk_container_add (GTK_CONTAINER (window), button); /* O passo final é exibir o widget recém-criado. */ gtk_widget_show (button); /* e a janela */ gtk_widget_show (window); /* Toda aplicação GTK deve ter uma chamada gtk_main(). O controle * termina aqui e espera por um evento (como um apertamento de tecla * ou evento do mouse). */ gtk_main (); return 0; }
  18. escrevi este código ele apresenta um erro quando tento compilar // DuasBolas.java public class DuasBolas { public static void main(String args[]) { // Instanciando um objeto DuasBolas bola1 = new DuasBolas(); //Armazenando valores nos atributos do objeto bola1.raio = 0.34f; bola1.oca = false; bola1.cor = 10; bola1.material= 33; // Instanciando um outro objeto DuasBolas bola2 = new DuasBolas(); // Armazenando valores nos atributos do outro objeto bola2.oca = true; bola2.material = bola1.material; // Usando valores armazenado bola2.raio = 5 * bola1.raio; bola2.material = bola1.cor+1; System.out.println("Bola1 : "); System.out.println(" raio = " + bola1.raio ); System.out.println(" oca = " + bola1.oca ); System.out.println(" cor = " + bola1.cor ); System.out.println("Bola2 : "); System.out.println(" raio = " + bola2.raio ); System.out.println(" oca = " + bola2.oca ); System.out.println(" cor = " + bola2.cor ); } } este é o erro .\DuasBolas.java:8: error: cannot find symbol bola1.raio = 0.34f; ^ symbol: variable raio location: variable bola1 of type DuasBolas .\DuasBolas.java:9: error: cannot find symbol bola1.oca = false; ^ symbol: variable oca location: variable bola1 of type DuasBolas .\DuasBolas.java:10: error: cannot find symbol bola1.cor = 10; ^ symbol: variable cor location: variable bola1 of type DuasBolas .\DuasBolas.java:11: error: cannot find symbol bola1.material= 33; ^ symbol: variable material location: variable bola1 of type DuasBolas .\DuasBolas.java:15: error: cannot find symbol bola2.oca = true; ^ symbol: variable oca location: variable bola2 of type DuasBolas .\DuasBolas.java:16: error: cannot find symbol bola2.material = bola1.material; ^ symbol: variable material location: variable bola2 of type DuasBolas .\DuasBolas.java:16: error: cannot find symbol bola2.material = bola1.material; ^ symbol: variable material location: variable bola1 of type DuasBolas .\DuasBolas.java:18: error: cannot find symbol bola2.raio = 5 * bola1.raio; ^ symbol: variable raio location: variable bola2 of type DuasBolas .\DuasBolas.java:18: error: cannot find symbol bola2.raio = 5 * bola1.raio; ^ symbol: variable raio location: variable bola1 of type DuasBolas .\DuasBolas.java:19: error: cannot find symbol bola2.material = bola1.cor+1; ^ symbol: variable material location: variable bola2 of type DuasBolas .\DuasBolas.java:19: error: cannot find symbol bola2.material = bola1.cor+1; ^ symbol: variable cor location: variable bola1 of type DuasBolas .\DuasBolas.java:21: error: cannot find symbol System.out.println(" raio = " + bola1.raio ); ^ symbol: variable raio location: variable bola1 of type DuasBolas .\DuasBolas.java:22: error: cannot find symbol System.out.println(" oca = " + bola1.oca ); ^ symbol: variable oca location: variable bola1 of type DuasBolas .\DuasBolas.java:23: error: cannot find symbol System.out.println(" cor = " + bola1.cor ); ^ symbol: variable cor location: variable bola1 of type DuasBolas .\DuasBolas.java:25: error: cannot find symbol System.out.println(" raio = " + bola2.raio ); ^ symbol: variable raio location: variable bola2 of type DuasBolas .\DuasBolas.java:26: error: cannot find symbol System.out.println(" oca = " + bola2.oca ); ^ symbol: variable oca location: variable bola2 of type DuasBolas .\DuasBolas.java:27: error: cannot find symbol System.out.println(" cor = " + bola2.cor ); ^ symbol: variable cor location: variable bola2 of type DuasBolas 17 errors error: compilation failed Poderiam me ajudar? já fiz de td e não consegui resolver
  19. Bom dia pessoal. Estou com um problema na hora da execução de um programa simples que fiz durante meu estudo sobre "structs". Simplesmente o programa não faz a leitura correta das letras que possuem acento. #include<stdio.h> #include<stdlib.h> #include<locale.h> main() { setlocale(LC_ALL,"portuguese"); struct dados { char name[40], disciplina[30]; float nota1, nota2; } aluno; printf("\n\t\t\t\t------------ Cadastro de Aluno ------------\n"); printf("\nInsira seu nome....: "); fflush(stdin); fgets(aluno.name, 40, stdin); printf("\n\nDisciplina.........: "); fflush(stdin); fgets(aluno.disciplina, 30, stdin); printf("\n\nInsira a 1° nota...: "); scanf("%f",&aluno.nota1); printf("\n\nInsira a 2° nota...: "); scanf("%f",&aluno.nota2); printf("\n\n"); printf("\n\t\t\t\t------------ Lendo dados inseridos ------------\n"); printf("\nNome...........: %s\n", aluno.name); printf("Disciplina.....: %s\n", aluno.disciplina); printf("Nota 1.........: %.2f\n", aluno.nota1); printf("Nota 2.........: %.2f\n", aluno.nota2); return 0; }
  20. Boa tarde pessoal do Forum, Vou explicar primeiro a cituação: tenho minha index que dentro dela tenho um FORM que envia a informação digitada em um campo text para minha pagina php "ex.php", nesta pagina eu pego o conteudo digitado e trato ele para uma busca no diretória para realizar o download de um arquivo. Até ai tudo funcionando as mil maravilhas só que caso o arquivo não exista eu criei um ELSE com o seguinte código: header("Location: ".$_SERVER['HTTP_REFERER'].""); Oque faz o usuario retornar a pagina anterior onde foi preenchido o FORM, ok porem eu queria caso não encontrar o arquivo mostar ao usuário a janela de alerta. Tentei a seguinte maneira: else{ echo "<script>alert('Janela de Alerta.');</script>"; header("Location: ".$_SERVER['HTTP_REFERER'].""); } Porem a pagina parece que ignora o alerta e já retorna executando só o HEADER. Caso eu coloque só o aviso funciona porem eu fico na pagina "ex.php" ao invés de retornar para a pagina inicial. alguém pode me ajudar a resolver isto?. Estou longe de ter um bom conhecimento em PHP porem creio que estou muito perto ou totalmente longe rs
  21. Boa tarde! 😀 Estou utilizando um código VBA para consolidação de planilhas afim de enviar um relatório semanal. Preciso de ajuda pois o código está buscando os dados certos, porém eu não preciso que me retorne a planilha inteira e sim apenas da A6 até a coluna E6 em todas as planilhas, e apenas os dados contidos, não precisa vim a formatação original pois se preciso for, formato depois do jeito que eu precisar. Tentei usar o Offset mas está dando erro "tempo de execução 9". Em anexo coloquei o print do modelo da planilha que será consolidada. Código Utilizado: Option Explicit Private Sub btExecuta_Click() Application.ScreenUpdating = False 'Definição das variáveis '-------------------------------------- Dim W As Worksheet Dim WNew As Workbook Dim ArqParaAbrir As Variant Dim A As Integer Dim NomeArquivo As String 'Capturar arquivos para tratamento '--------------------------------------- ArqParaAbrir = Application.GetOpenFilename("Arquivo do Excel (*.xlsm), *.xl*", _ Title:="Escolha o arquivo a ser importado", _ MultiSelect:=True) If Not IsArray(ArqParaAbrir) Then If ArqParaAbrir = "" Or ArqParaAbrir = False Then MsgBox "Processo abortado, nenhum arquivo escolhido", vbOKOnly, "Processo abortado" Exit Sub End If End If 'Começa a importação dos dados '------------------------------------- Set W = Sheets("CONSOLIDADO") W.UsedRange.EntireColumn.Delete W.Select 'Loop para importação dos arquivos '-------------------------------------- For A = LBound(ArqParaAbrir) To UBound(ArqParaAbrir) NomeArquivo = ArqParaAbrir(A) Application.Workbooks.Open (NomeArquivo) Set WNew = ActiveWorkbook ActiveSheet.Range("a6").CurrentRegion.Select Selection.Copy Destination:=W.Cells(W.Rows.Count, 1).End(xlUp).Offset(1, 0) Application.DisplayAlerts = False ActiveWorkbook.Close savechanges:=False Application.DisplayAlerts = True W.Cells(W.Rows.Count, 1).End(xlUp).Offset(1, 0).Select Next A Application.ScreenUpdating = True MsgBox "Processo concluído. Arquivos copiados..." End Sub **** Desde já agradeço.
  22. E AI MEU POVO, GOSTARIA DE UMA AJUDINHA, TENHO ESSE SISTEMA DE CADASTRO QUE LÉ OS DADOS, ARMAZENA NAS LINHAS DA MATRIZ E DEPOIS IMPRIME NA TELA O CADASTRO, EU GOSTARIA DE SABER COMO FAÇO PRA REMOVER O ÍNDICE ESPECIFICADO PELO USUÁRIO, É O CÓDIGO VERIFICAR SE O O ÍNDICE DIGITADO PELO USUÁRIO EXISTE, E SE EXISTIR, GOSTARIA QUE ELE EXCLUÍSSE OS DADOS DESSE ÍNDICE, E OS ÍNDICES POSTERIORES RETROCEDESSEM, DESDE JÁ OBRIGADO! #include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZE 100 void cadastro(); void pesquisa(); void lista(); void remover(); char nome[SIZE][50]; char email[SIZE][50]; int cpf[SIZE]; char op; int op2; int main(void) { int r; do{ system("cls"); printf("\n====MENU=====\n"); printf("1 - CADASTRO\n"); printf("2 - LISTAR TODOS\n"); printf("3 - PESQUISAR\n"); printf("4 - EXCLUIR\n"); printf("5 - SAIR\n"); scanf(" %c", &op); switch(op){ case '1': cadastro(); break; case '2': lista(); system("pause"); break; case '3': pesquisa(); break; case '4': remover(); break; default: printf("\nOpcao invalida\n"); system("pause"); break; } }while(op>4); } void remover(){ int posicao; int i; lista(); printf("\nCodigo Para remover: "); scanf("%d", &posicao); for(i=0; i<SIZE; i++){ if(posicao == nome[i]){ printf("\nAluno excluido!\n"); system("pause"); }else{ break; } i--; } } /*FUNCAO PARA IMPRIMIR OS CADASTROS*/ void lista(){ int i; for(i=0; i<SIZE; i++){ if(cpf[i]>0){ printf("\nCodigo: %d", i+1); printf("\nNome: %s", nome[i]); printf("\nEmail: %s", email[i]); printf("\nCPF: %d", cpf[i]); printf("\n++++++++++++++++++++++\n"); }else{ break; } } } /*FUNCAO DE CADASTRO*/ void cadastro(){ static int linha; do{ printf("\nDigite o nome: "); scanf("%s", &nome[linha]); printf("\nDigite o email: "); scanf("%s", &email[linha]); printf("\nDigite o CPF: "); scanf("%d", &cpf[linha]); linha++; printf("\n1 - continuar \tSAIR - Qualquer tecla"); scanf("%d", &op2); }while(op==1); } /*FUNCAO PARA PESQUISAR O USUARIO já CADASTRADO*/ void pesquisa(){ int cpfPesquisa; char emailPesquisa[50]; char nomePesquisa[50]; int i; do{ printf("\nl - CPF: "); printf("\n2 - EMAIL: "); printf("\n3 - NOME: "); scanf(" %c", &op); switch(op){ case '1': printf("Digite o CPF: "); scanf("%d", &cpfPesquisa); for(i=0; i<SIZE; i++){ if(cpf[i] == cpfPesquisa){ printf("\nNome: %s", nome[i]); printf("\nEmail: %s", email[i]); printf("\nCPF: %d", cpf[i]); }else{ printf("\nNao a cadastro com esse CPF\n"); system("pause"); } } break; case '2': printf("Digite o seu email: "); scanf("%s", emailPesquisa); for(i=0; i<SIZE; i++){ if(strcmp(email[i], emailPesquisa) == 0){ printf("\nNome: %s", nome[i]); printf("\nEmail: %s", email[i]); printf("\nCPF: %d", cpf[i]); }else{ printf("\nNao a cadastro com esse Email\n"); system("pause"); } } break; case '3': printf("digite o nome: "); scanf("%s", &nomePesquisa); for(i=0; i<SIZE; i++){ if(strcmp(nome[i], nomePesquisa) == 0){ printf("\nNome: %s", nome[i]); printf("\nEmail: %s", email[i]); printf("\nCPF: %d", cpf[i]); }else{ printf("\nNao a cadastro com esse Nome\n"); system("pause"); } } break; default: printf("\n Valor invalido"); system("pause"); pesquisa(); break; } printf("\n1 - continuar \tSAIR - Qualquer tecla"); scanf("%d", &op2); }while(op==1); }
  23. Bom dia pessoal, tudo bem? Então galera meu professor pediu para a gente desenvolver um programa em C que encontre todos os pares de números amigos entre 1 e 1.000 (Para aqueles que não sabem oque é um numero amigo basta acessar esse link https://pt.wikipedia.org/wiki/Número_amigo). Então eu desenvolvi o programa mas não esta dando o resultado esperado já que de 1 a 1.000 os únicos pares de números amigos existente é 220 e 284 e não são esses números que estão sendo imprimidos na tela. Enfim vou colar meu código aqui e gostaria que vocês me ajudassem a identificar onde esta o meu erro e corrigi-lo :) ------------------------------------------------------------------------------------------------------------------------------------------------ CÓDIGO --------------------------------------------------------------------------------------------------------------------------------------------------- #include <stdio.h> int main () { int n1, divisor, r, soma1 = 0, somareal; int n2, divisor2, r2, soma2 = 0,somareal2; for (n1 = 1, n2 = 1; n1 <= 1000; n1++, n2++) { for (divisor = 1, divisor2 = 1; divisor <= 1000; divisor++, divisor2++) { if (n1 % divisor == 0) { r = n1 / divisor; soma1 += divisor; //printf("\nN1 = %d\t DIVISOR = %d\t N1 / DIVISOR = %d\n",n1, divisor, r); } if (n2 % divisor2 == 0) { r2 = n2 / divisor2; soma2 +=divisor2; //printf("\nN2 = %d\t DIVISOR2 = %d\t N2 / DIVISOR2 = %d SOMA = %d\n",n2, divisor2, r2, soma2); } } somareal = soma1 - n1; somareal2 = soma2 - n2; //printf("\nSOMA: %d\n",somareal); //printf("SOMA2: %d\n",somareal2); if (n1 == somareal2 && n2 == somareal) { printf("N1 %d e SOMA2 %d ",n1,somareal2); printf("N2 %d e SOMA %d são NUMEROS AMIGOS!\n",n2,somareal); } //printf("\n--------------------------------------------\n"); soma1 = 0; soma2 = 0; } return 0; } ----------------------------------------------------------------------------------------------------------------------------------------- FIM DO CÓDIGO----------------------------------------------------------------------------------------------------------------------------------------------- Obrigada pessoal!
  24. Boa noite pessoal! sou novo no mundo da programação e estou com um problema que não sei como resolver. Eu uso o Dreamweaver para minhas edições e não tenho do que reclamar do editor porém, ao começar os estudos de jQuery e Bootstrap, o DW encontra erros nas bibliotecas tanto do jQuery quanto do Bootstrap. Já procurei em muitos lugares e não consegui resolver.
  25. Olá, sou iniciante em programação e tenho uma atividade para fazer. Uma das questões é sobre notas e médias, logo, pensei em usar vetores. O programa roda normalmente até sair do For. Depois que ele sai, ele quebra nos If e else (PS.: eu coloquei um scanf qualquer antes do if e foi normal). Obs: utilizo o CodeBlocks. Segue abaixo um código que não funciona: #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int opc; char opcao; do { printf("+-------------------------------------+\n"); printf("|>>>>>>>>>>>>>>> MENU <<<<<<<<<<<<<<<<|"); printf("\n+-------------------------------------+"); printf("\n| 1 - IMC |"); printf("\n| 2 - Notas |"); printf("\n| 3 - CNH |"); printf("\n| 4 - Operacoes |"); printf("\n| 5 - Media |"); printf("\n+-------------------------------------+"); printf("\n--> "); scanf("%d", &opc); switch (opc) { case 5: char nomes[3][256]; float notas; float somas; float medias [3]; int posicao; printf("\n+-------------------------------------+\n"); printf("| MEDIA |"); printf("\n+-------------------------------------+\n"); for(int i=0; i < 3; i++) { printf("Informe o nome do %do aluno: ", (i+1)); nomes[i][256] = scanf("%s", &nomes); for(int k=0; k < 3; k++) { printf("Informe a nota %d:", (k+1)); scanf("%f", &notas); somas = (somas + notas); } medias[i] = (somas / 3); somas = 0; } if (medias[0] > medias[1] && medias[0] > medias[2]) { printf("A maior média pertence à : %s", nomes[0]); printf("A média é : %.2f", medias[0]); } else if (medias[1] > medias[0] && medias[1] > medias[2]) { printf("A maior média pertence a : %s", nomes[1]); printf("A media é : %.2f", medias[1]); } else if (medias[2] > medias[1] && medias[2] > medias[1]) { printf("A maior média pertence à : %s", nomes[2]); printf("A média é : %.2f", medias[2]); } break; } printf("\nDeseja continuar? (s/n)\n"); printf("--> "); scanf("%s", &opcao); printf("\n"); } while(opcao == 's'); system("pause"); return 0; }
×
×
  • Criar Novo...