- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
49 Posted Topics
hi im using tkinter and have a scroll bar that works with my text widget but its so small i dont know why ?? [CODE] scroll = tkinter.Scrollbar(content,borderwidth=50) Text = tkinter.Text(content,wrap=CHAR, width=50, height=20) scroll.config(command=Text.yview) Text.config(yscrollcommand=scroll.set) Text.grid(row=2, column=1,columnspan=1, rowspan=3, sticky=(N)) scroll.grid(row=2,column=3) [/CODE] | |
Task Your task is to write a file archive utility similar to that of the Unix tar program. This program will be a command line program (i.e. there will be no graphical user interface). The purpose of this file archive utility is to allow users and system administrators alike to … | |
can anyone tell me how should i go about hiding messages in whitespaces in the end of a text for example | = whitespace hell my name is bob|| i work at home |||| | |
[CODE] $url = $_GET['url']; echo $url; [/CODE] i dont know why i get a Undefined index error | |
can anyone explain tkinter in object oriented style where you would have it in a class ? | |
how would you write this function in non oop [CODE] def highlight(self, seq): if "highlight" in self.textWidget.tag_names(): self.textWidget.tag_delete("highlight") i = len(seq) idx = "1.0" while True: idx = self.textWidget.search(seq, idx, nocase=1, stopindex='end') if idx: idx2 = self.textWidget.index("%s+%dc" % (idx, i)) self.textWidget.tag_add("highlight", idx, idx2) self.textWidget.tag_config("highlight", background="yellow") idx = idx2 else: return … | |
i got a working highlight code example that works in python 2.7.2 [CODE] import Tkinter """ Edit a file and save the text. """ textFont1 = ("Courier New", 16, "normal") class ScrollbarX(Tkinter.Scrollbar): def set(self, low, high): if float(low) <= 0.0 and float(high) >= 1.0: self.grid_remove() else: self.grid() Tkinter.Scrollbar.set(self, low, high) … | |
i have random mobile number with text messages, how would i go about only viewing the numbers i want for example 1234 i have [CODE] foreach($message as $msg) echo $msg; [/CODE] which displays all the messages ![]() | |
how would you go about highlighting text in the tkinter text widget ? | |
is there a way to keep the format of a html source code for example when you view a source code of a website, is there anyway to keep the same structure, i have tried using read() readlines() i tried saving the source code then opening it up in my … | |
hi i want to know how i would display i file that has been open and read into the tkinter text widget do i have to write it out the file to a variable than insert it into tkinter text widget? | |
i have variable a with binary values then i have variable b with another set of binary values, i want variable b to into variable a and stored into variable c, i hope that not confusing a = "01101000011001010111100100000000000000000000" b = "011000100111100101100101" c = "01100010011110010110010100000000000000000000" | |
Re: [QUOTE=;][/QUOTE] dealing with memory can be a nightmare in c | |
hi i got a a Tkinter text widget and a string i want to know how to display the string in the text widget ?? [CODE] abc = "hello world" text = Text(app, width=80,height=40, wrap='none').grid(row=2, column=2) [/CODE] | |
hi created a simple python program that reads the source code of a url and stores into a variable then saves the sourcecode into a file on the computer but the problem that i have that is when python reads the sourcecode it stores it all in one line in … | |
hi i just started php, my code works on ie, bit when i open the webpage on firefox and chrome the image does not display?, can anyone help [CODE] $car = "C:\wamp\www\porche.jpg"; $banner = "<img src=\"$car\" "; $banner .= "width=\"380\" height=\"110\" border=\"0\" >"; echo($banner); [/CODE] | |
Hi i want to know if C is the best language for image manipulation and creating a steganography tool?, if so how would i go implementing steganography and can anyone recommend any reading materials and libraries needed. | |
does anyone know where to start on this i want to make a command line c program which hides messages in images and audio files is there any books i can read to get this started | |
i am trying to write a simple webserver which serves 1 htnl file but i dont know where i am going wrong i am not able to read the file any suggestions ? [CODE] listen(sockfd,5); clilen = sizeof(cli_addr); newsockfd = accept(sockfd,(struct sockaddr *) &cli_addr, &clilen); if(newsockfd < 0) error("eror on … | |
i am writing a web server thats serves one html file but when i go to my browser and type in localhost:50000/home/user/www/index.html i get something like this viewd on my browser heres my code for writing to a socket [CODE] n = read(connectfd, buffer, 255 ); if (n < … | |
i just want to know if there is any good example tutorials using http post and put requests ? | |
i cant seem to send my html file through a socket, when vere i connect to the server via web browser [url]http://localhost:7000[/url] it just freezes. and the server stops [CODE] open_ptr = open("/home/user/www/home.html",'r'); while((n = read(open_ptr,buffer,256)) > 0) { n = write( new_sock,buffer,256); } close(open_ptr); return 0; } [/CODE] | |
hi i am just wondering how would you send a website through a socket as i am trying to make my own web server. do you just open up the file, read the file and write out to the socket ? [CODE] openfile = open(home/username/www/index.html, "r"); n = read(openfile,buffer,256); n … | |
the problem that i have is when i ever create a file the Linux operating system sets the the permissions automatically so how do i remove the permissions within the program ? | |
i just want to kno if the default gw part is correct should it be with or without the brackets ? [CODE] #!/bin/bash ifconfig eth0 146.192.188.106 netmask 255.255.255.0 broadcast 146.192.188.255 up sudo route add default [gw] 146.192.188.254 dev eth0 ifconfig eth1 10.10.160.188 netmask 255.255.255.0 broadcast 10.10.160.255 up sudo route add … | |
i have this to check for numeric inputs, which returns then menu if a number is entered less or grater than 5 but how would you do this with alphabets ? for any alphabet or any other charterer apart from numbers should return the menu [CODE] while (select < 1 … | |
can some one help me why its not copying the file ? [CODE] if(choice = 2) { puts("please open your archive\n"); scanf("%s",&archive); archive_pointer = fopen( archive, "r+b"); //opens the archive puts("please select the file you want to be copied into your archive\n"); scanf("%s",&original_file); open_pointer = fopen( original_file, "r+b"); //opens the … | |
[CODE] while (choice != QUIT) { choice = get_menu_choice(); if (choice == 1) { while(1)//while loop that i want to break out of { puts("please give your archive a name and a path:\n"); scanf("%s", &archive_name); if( create_pointer = fopen(archive_name, "r") != NULL) { printf("file already exists\n"); continue; } else { … | |
i want to know how to check if the file already exists before creating the file? [CODE] puts("please enter a file name to create:\n"); scanf("%s", &file_name); create_pointer = fopen( file_name, "ab"); if( create_pointer == NULL) //create file// else { //file already exist// how would you check if the file already … | |
is it possible to copy specificity from a file for example i want to copy x number of bytes from x position to x position? | |
my program creates a file then copies a file into the file created then i can copy another file into the file created turning it into one bog file i am having troubles when coming to extracting the exact file, can anyone suggest anything on how about to achieving this.? … | |
hi if i copy a copy file into another file does it equal 2 files with 2 eof or does it become 1 file ? | |
i get a undefined reference to get_menu_choice error message but i dont know why ? [CODE] int get_menu_choice( void); int main() { //code// while (choice != QUIT) { choice = get_menu_choice(); if (choice == 1) //code// } else if (choice == 2) //code// } if (choice == 3){ puts("you chose … | |
hi does anyone know any good tuorials about file managment file copying file storing etc and also tutorials on end of files, storing eofs and string manipulation thanks it would be much appreciated | |
im new to shell scripting i want a simle script to configure the ip adress and add a default gw this is what i got so far [CODE] #!/bin/bash ifconfig eth0 "ipadress" route add default gw "gw adress" [/CODE] it does not recognise route ? can anyone help? | |
i have creaed a loop that lets the user creates a file then copy a file to it and also allows the user to add more than 1 file to be copied. the problem that i found out is that when the progam goes back round the loop it drops … | |
when the user types in ls i want the program to show the listed files in his directory but it is not working i cant list the files can anyone help ? this is what i have done so far. it breaks fine when the user enters x [CODE] while(1) … | |
i cant break out of this loop its driving me crazzy!! [CODE] while (1) { printf("please type in the path for the file you want to archive\n"); scanf("%s",&original_file); open_pointer = fopen( original_file, "rb"); original_pointer = fopen(original_file,"rb"); copy_pointer = fopen( archive_name,"ab"); if (copy_pointer NULL) { printf("\n copied successfull"); puts("\nenter x to … | |
so far the user can select a file that he want to open to be copied, is there a way of letting the user selecting multiple files to be copied to one file? i was thinking of looping around asking the user to add another file if the user wanted … | |
[CODE] ]void menu() { int option; printf("what would you like to do?"); printf("\n\t1. Create an Archive"); printf("\n\t2. extract an archive"); printf("\n\t3. Exit."); scanf("%d", &option); action( option ); } void action(int option) { int n1,n2; if (option == 1) { // how do i get from here to my code thats … | |
after my program finishes i get this message and dont why, can anyone explain *** glibc detected *** ./tryp: double free or corruption (top): 0x089b8008 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xb7729591] /lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xb772ade8] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb772decd] /lib/tls/i686/cmov/libc.so.6(fclose+0x14a)[0xb7719aaa] ./tryp[0x804875c] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb76d4bd6] ./tryp[0x8048521] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 07:00 1725249 /home/k/cprog/tryp 08049000-0804a000 r--p 00000000 07:00 … | |
[CODE] unsigned char buffer[1000] while(buffer < 0) num = fread(buffer,1, 1000, original_pointer); fwrite(buffer,1,num,copy_pointer); if(buffer > 1000) { //this is the place where i am stuck if the buffer exceeds how do i clear it then carry on reading and writing to a file ? [/CODE] | |
| |
hi i made a program that lets a user creates a file and then lets the user open a file that he would like to copy into the new file that he created. now the question is how do i extract the copied file or extract multiple coped file from … | |
hi i can copy text based files to other files but when it comes to images i cant copy them it gives me a distorted image. [CODE] printf("please give your archive a name:\n"); scanf("%s", &archive_name); create_pointer = fopen( archive_name, "wb"); printf("please type in the path for the file you want … | |
hi has anyone know detailed info on the mkdir function plus the open dir and how to use it ? | |
| |
i want it to print out 4 is larger than 2 but it prints out 2 is larger than 2293572 [CODE] #include <stdio.h> #include <stdlib.h> void largest(int num1, int num2, int *larger) { if(num1 > num2) { *larger = num1; } else{ *larger = num2; } } int main() { … | |
hi i just started c programming and i am stuck on a question Write a void C function called largest that takes two integers passed by value and returns the larger of the two using a third integer parameter which is passed by reference. this is what i came up … |
The End.