- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 4
- Upvoting Members
- 5
- Downvotes Received
- 10
- Posts with Downvotes
- 6
- Downvoting Members
- 5
- Interests
- Music , Guitar , Games
- PC Specs
- Pentium Core2Duo 2.93GhZ , OCZ Gold Edition 2 GB , 320 GB Seagate SATA , XFX GTS250 1 GB , Gigabyte…
25 Posted Topics
Re: for n in range(2,20,1): for x in range(2,n,1): if n%x == 0: print n,'equal',x,'*',n/x break else :print n,'is a prime no' | |
Here is a weird regular expression for emails . We can have various kind of email addresses [email]string1@somemail.com[/email] [email]string1@somemail.co.in[/email] [email]string1.string2@somemail.com[/email] [email]string1.string2@somemail.co.in[/email] The following regular expression can find any of the mails above email2="santa.banta@gmail.co.in" email1="arindam31@yahoo.co.in'" email="bogusemail123@sillymail.com" email3="santa.banta.manta@gmail.co.in" email4="santa.banta.manta@gmail.co.in.xv.fg.gh" email5="abc.dcf@ghj.org" email6="santa.banta.manta@gmail.co.in.org" [CODE]re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email) >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email2) >>> x.group() 'santa.banta@gmail.co.in' >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email1) >>> x.group() 'arindam31@yahoo.co.in' … | |
Re: Is there a way to check if the button is disabled or not? I want to enable them ..IF ..they are disabled | |
I am trying to find out if a button is disabled....If it is , I want to enable it . For example : if button disabled: self.convertButton.setDisabled(False) So what can be button disabled be? | |
Hi, I have the a situation here . My motive : Hiding one panel and showing another. Whats Working :Layout wise , my app is behaving like i want it to . The Problem : After the I hide one panel and show another , the button in this panel … | |
Hi , I want to achieve something like this . Consider the example [CODE]>>> txt 'arin.thearc@gmail.com' if '@' or '.' in txt: do something[/CODE] I just want to know how can we nest ORs and ANDs inside the if or while loops... | |
Hi All . I am trying to make a Frame to which we add dynamically Add panels. Also I want to remove panel dynamically . The dynamic Addition is working perfect. Please see the code below: # panels.py #self.Fit() causes the whole frame to shrink.So we are using self.Layout instead … | |
Re: Mere khayal se ye to tumhare teacher se tumhe poochna chahiye.........:) | |
Hi Guys , this questioned has been asked before , but the answers haven helped me . I want to seperate lines when i am appending the text control. But "\n" is simply not working . I am using Python 2.7 , on Windows 7. Please help. I want to … | |
Hi Everyone, I am trying to call a function after every T secs . When i use time.wait() , the app hangs, i do not have control over the app. For now , this programs will do the process once , and then after T secs . But i do … | |
Hi Guys, I am trying to make a text box that will accept a password from user.The password should be masked while typing. [CODE]def MyFunc2(self,event): box2=wx.TextEntryDialog(None,"Enter Password","PASSWORD","Waiting",style=wx.TE_PASSWORD) if box2.ShowModal()==wx.ID_OK: global pwd1 pwd1=box2.GetValue()[/CODE] The code is a piece of a program . The above code when run , shows the text … | |
Hi , I am trying to save the output of "help('tkinter')" in a text file. But i get error. I want to know if there is a Way to get the output of help file redirected to a file , or save in a variable. By the way , the … | |
Hi guys, My intention is to find all possible words starting with any letter of my choice example 'p' from a paragraph.I want all the possible results . How can i do that . Take the example : 'This rule says that any match that begins earlier in the string … | |
Re: Totally agree with Vishesh........We can break the whole idea and make different files , keeping one main file........individual compiling will help rectify problems easily and makes changes too... | |
Regular Expression (RE) They can be used with string operations. Using this, we specify the rules for the set of possible strings that we want to match (Searching for patterns in another string). Note : its finds FIRST instance of that pattern We can also use REs to modify a … | |
Re: Next time when the problem arises , do some things 1) Check if processor fan is rotating . 2) Check if there is a beep sound coming from the CPU (on board micro speaker) 3) Check if the system has actually booted up (you can check if the HDD light … | |
Re: Dude , you didnt print the output anywhere in the program . By the way , the program seems not to meet the terminating condition of do-while loop , thats why its printing more than once. I tried a different approach.And it works fine,although i don know what to do … | |
[CODE]struct marks{ int p:3; int c:3; int m:2; }; void main() { struct marks s={2,-6,5}; printf("%d %d %d",s.p,s.c,s.m); }[/CODE] Output 2 2 1 | |
Re: [CODE]#include <stdio.h> #include <ctype.h> #include <string.h> int main(void) { char prose[] = "to be or not to be that is the question\n"; char *ptr; ptr = prose; puts (prose); *ptr = *ptr-32; printf("The new text with starting letter CAPS is \n"); puts(prose); return 0; }[/CODE] [B][U]OUTPUT:[/U][/B] [CODE]to be or not … | |
Re: Yeah , where did you write this "select " statement anyway? | |
Re: [CODE]#include <stdio.h> int main (void) { char grade[32] = { 'A', 'B', 'C', 'D', 'f', 'I', 'b', 'C', 'd', 'F', 'I', 'a', 'C', 'D', 'F', 'I', 'A', 'B', 'D', 'F', 'I', 'A', 'B', 'c', 'I', 'D', 'F', 'F', 'A', 'B', 'a', 'b'}; char letters[6] = { 'A', 'B', 'C', 'D', … | |
Re: [CODE]#include <stdio.h> #include <string.h> int main(void) { int i ; i = 0; char *cptr; char str[] = ".aif: audio/x-aiff"; cptr = str; while(*cptr != ':') { printf("%c",str[i]); i++; cptr++; } return 0; }[/CODE] This can be modified for more accuracy but its just a suggestion | |
Re: [CODE][COLOR="Green"]#include<stdio.h>[/COLOR] void main() { int arr[]={102,201,30,41,5,6,17,8,9,10}; int sml,lar,sum; int i; sum=0; for(i=0;i<10;i++) sum=sum+arr[i]; printf("[COLOR="Red"]The sum is %d\n[/COLOR]",sum); lar=arr[0]; sml=arr[0]; for(i=1;i<10;i++) { if (lar<arr[i]) lar = arr[i]; } printf("[COLOR="red"]The largest number is %d\n[/COLOR]",lar); for(i=1;i<10;i++) { if (sml>arr[i]) sml = arr[i]; } printf("[COLOR="red"]The smallest number is %d\n[/COLOR]",sml); }[/CODE] | |
Re: You can try this........I took the labor to not take input for my convinience [CODE]#include<stdio.h> void main() { int n[]={1,2,3,4,5,6,7,8,9,10}; int i , total; total=0; for(i=0;i<10;i++) { if(n[i]%2==0) //Checking for even numbers total = total + n[i]; } printf("%d",total); }[/CODE] | |
Re: I got this. warning: array subscript is above array bounds output: -1075036048 Any one can get any value ...So don worry about '2'...its a garbage value too |
The End.