-
Replied To a Post in There is an elephant on the loo!
The Oktoberfest was created in 1810 by King Ludwig to celebrate his wedding. It's the time when the normally stuffy Germans ease up a little with loud music, lots of … -
Replied To a Post in iPython Notebook
A good way to start ... http://ipython.org/notebook.html -
Replied To a Post in start with python
There are a large number of Python programming videos on YouTube. YouTube itself is written using Python. Example ... http://www.youtube.com/watch?v=4Mf0h3HphEA&feature=channel or ... https://www.youtube.com/watch?v=tKTZoB2Vjuk -
Replied To a Post in Functors in Python
Another example using a typical closure function ... ''' func_functor_strip_char1.py a Python closure function mimics a functor a functor can remember initial information ''' def strip_characters(chrs): ''' a functor to … -
Replied To a Post in Syntax Error
Usually a point is given by its x, y coordinates. -
Marked Solved Status for Creating a program that creates a rectangle with two mouse clicks in Python
Hello guys, I really need help with this one. Can you please help me create a program in Python that displays information about a rectangle of any size. Input: two … -
Replied To a Post in Creating a program that creates a rectangle with two mouse clicks in Python
You can do it if the two points are at the ends of the diagonal. See ... http://www.mathsisfun.com/geometry/rectangle.html If you use the Tkinter GUI toolkit, the two points you need … -
Replied To a Post in Syntax Error
Here is a general example that might help ... ''' distance_two_points.py calculate the distance between two points given the coordinates of the points (x1, y1) and (x2, y2) in a … -
Replied To a Post in Count seconds in the background (Python)
Sorry, this was supposed to be an example of a class inheriting threading. If you are looking for an interruptable sleep() function, use threading.Timer(). -
Replied To a Post in Functors in Python
The class Accumulator is an example of a functor for closure. -
Edited Hide Private Message in an Image (Python)
Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python … -
Edited Hide Private Message in an Image (Python)
Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python … -
Replied To a Post in Percentage of loss
Do you need the answer in C or VB? -
Marked Solved Status for arguments
Hello, in which senario do we normaly use this (*args,**kwargs)type of arguments in python. -
Edited Count seconds in the background (Python)
Use Python module threading to count intervals (in seconds) in the background. You can use this to time any relatively slow event like the time it took to finish a … -
Replied To a Post in examples of if statement in python
python = 77777 if python: print("You picked a good language") -
Marked Solved Status for Draw Lines using Polygon Function
Below is a Python program I wrote to draw lines as many al there are mouse clicks. However, I wanted all the line segments to have the same attributes (eg: … -
Marked Solved Status for Help with Classes
I have a class containing: class CounterList: __n_comparisons__ = 0 def __init__(self, data=None): if data is None: self.data = [] else: self.data = data self.__n_accesses__ = 0 def __getitem__(self, i): … -
Marked Solved Status for displaying an image without adding the file format using PIL
hi, i have written a function that can search through a folder and display a picture in a new window if the file is present but i always have to … -
Marked Solved Status for TypeError: attribute of type 'NoneType' is not callable object
Hi all, I'm working on my python script as I'm pulling the data from the sqlite3 database. I'm trying to convert the string object to datetime object, but I have … -
Marked Solved Status for Factorial of a number
[code=c] /*factirial*/ #include<stdio.h> #include<conio.h> void main() { int n,s=1,i; clrscr(); printf("enter n "); for(i=1;i<n;i++) { scanf("%d",&n); } for(i=1;i<n;i++) { s=s*i; } printf("factorial is %d",s); getch(); }[/code] -
Marked Solved Status for Order of precedence
Hi, I am a basic learner in C language.Could u please provide me a good link or tutorial or explanation regarding "order of precedence". I have the table of "order … -
Marked Solved Status for starting a calculator program in C
im writing a calculator program in c and having some trouble.. basically it needs to have + - / * ^ functions as well as an integer only mode the … -
Marked Solved Status for opennig several file
Hello , i have in a director c:\files_t several files t1 t2 t3...t300 i need to analize each on-the analize operation is not importent how can i [B][U]open each file … -
Marked Solved Status for Is it possible to arange lines in a file alphabetically?
OK, so the part of my course about files is over, but now I am wondering: if you have a file with, say, a bunch of names (each in its … -
Marked Solved Status for Function doesnt work
I cant get my function code to work. Its should return an average of however many numbers are entered, but it always returns 775863 no matte what... can anyone tell … -
Marked Solved Status for i need help to convert characters
am beginner in C..am trying out some questions in books n i want to write a small encryption program that will encode a word..cn any1one help?i want to convert a … -
Marked Solved Status for stack
Hello, how can i check that pushing characters into stack is successful (logically)? -
Marked Solved Status for getrusage
Helloes! I'm using getrusage to get the usertime and systemtime, but sometimes the times returned are negative --> SELF: user time: 1313366639 microseconds system time: -1547562616 microseconds I'm not sure … -
Marked Solved Status for read text file
Hi all, I'd posted this problem previously but in the wrong place..:)..Hopefully, I can get the answer from this thread. I'm a newbie in C..Right now, I have to write … -
Marked Solved Status for Regarding previous programming q 2
Hi, Anyone here can advise me correction of my c programming? It doesn't seem to be working. #include<stdio.h> float x[4] = {1.2,2.4,3.6,4.8}; float f[4] = {0.1,0.2,0.3,0.4}; float xave = 0.0; … -
Marked Solved Status for a simple question
Hello...I need to write a program where i need to copy each word of a string into an array... Eg(string s="hello how are you" arr[0]=hello,arr[1]=how....). any help:?: ?? -
Marked Solved Status for Passing struct to procuedre
Hi I have a struct [code] struct s_list { char name[30]; char lowest[30]; int int_value; }LIST[100]; [/code] I want to pass the int_value to a the unix function qsort, but … -
Marked Solved Status for String to integer conversion
Hi, I'm a freshman in computer science and a new member to this forum. I'd like to convert the string representation of a number e.g "456" into its integer equivalent … -
Marked Solved Status for Start C
Hi Everyone here ; I am starting C and wanna you start C lessons here , so we (we new starters) can learn good and can discuss about some important … -
Marked Solved Status for Doubt on Strings
[CODE]void main(void) { char *p = "name"; p[0] = 's'; printf("%s", p); }[/CODE] The above piece [COLOR=black]of code is giving me eror at run time. The reason for this error … -
Marked Solved Status for Tricky Questions
I've got a 2 tricky questions for u. Can anyone write: 1). A "Hello World" program in 'C' without using any semicolon. 2). A 'C' program without using any loop … -
Marked Solved Status for 1-D array
Write a C-Program that swaps the elements of 1-D array (10 elements) : Example: If the given array is: 5 8 9 2 3 1 11 17 43 6 The … -
Marked Solved Status for switch quantity not integer
Helloe all I have this small program using switch statment. the problem that when I complie this C code using gcc under Linux I get message: switch guantity not integer!! … -
Marked Solved Status for insertSortedList
hi, can someone understand how the new element is being attached to the list in this code? [CODE] void insertSortedList (Node **head, int value) { /* creating a new node … -
Marked Solved Status for Windows gui
I know this is a noob question but where do i put my own code in this menu code for windows. [CODE]#include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK … -
Marked Solved Status for Binary Tree Traversal
#include<stdio.h> #include<conio.h> struct node { int data; struct node *right, *left; }*root,*p,*q; struct node *make(int y) { struct node *newnode; newnode=(struct node *)malloc(sizeof(struct node)); newnode->data=y; newnode->right=newnode->left=NULL; return(newnode); } void left(struct … -
Marked Solved Status for Is my machine 32 bit machine??
sizeof (int) gives me 4 bytes...is it sufficient to say that my machine is of type 32-bit -
Marked Solved Status for why memory allocation
[code] char *name; cout<<name; [/code] and [code] char*name; name=new char[20]; cout<<name;[/code] both of these work....then why do i need memory allocation....where does the first code fails -
Marked Solved Status for Digital Time Program
Okay fellows. I got a really tough one. I got it licked pretty much except for one part. This is the implementation of the ADT DigitalTime. You are to enter … -
Marked Solved Status for How to display graphics in 256 color in C
Hi, I have tried a VGA mode in C with graphics.h which displayed graphics in 256 color but 320X240 resolution. I want to know the way to display graphics in … -
Marked Solved Status for Please help with program - STUCK
I am ahving a problem with the do/while loop. When the YesNo function returns a yes, main() repeats;however, it prints out what is stored in the string from before. How … -
Marked Solved Status for Convert first character from lowercase to uppercase?
Hmm...how do i go about doing a conversion only the first letter of the string? << Thread split from [thread=13727]original[/thread] since this is taking on a life of its own. … -
Marked Solved Status for letter and word counter
i need to write a program that can count the number words the user enters and and the recurences of each letter. ex: Have a nice day Total words: 4 … -
Marked Solved Status for syntex Error
With the following line I get a syntex error relating to the ifstream file [code]if ifstream file(filename.c_str()).find string1 ++counter;[/code] I have already declared the input file and do not understand …
The End.