[algogeeks] Re: Code to stop students from navigating during online examination

2012-02-24 Thread Don
This is not an algorithm question. I suggest announcing that any
student who uses any electronic device to do anything other than take
the test will fail the class. Have a TA or two sit in the back of the
room and watch.
Don

On Feb 24, 4:04 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
 hi guys i am a final year student of engineering and i am working on an
 ONLINE EXAMINATION SYSTEM just like GATE, GRE usually used by prometrics.
 now i am come across one problem, i want that during the exam the student
 is not able to navigate(can't open anything else just work on test)
 anywhere else except for the program screen unless they QUIT.
 can anyone please help me
 i am working in on versions:

 1) desktop based(Swings and panel)
 2) web based (jsp  servlet)

 can anyone help me with the code or any idea which function to call or how
 to do so for BOTH VERSIONS

 its just like

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code to stop students from navigating during online examination

2012-02-24 Thread Jasveen Singh
i agree it can be done but like in company training and GATE exam and even
certification exams when the test starts everything else gets disabled till
student either clicks QUIT TEST or time is over till then everything is
limited to that screen
a feature very common after 2006 to avoid cheating...the program goes to
full screen mode and can't be minimized

On Fri, Feb 24, 2012 at 7:27 PM, Don dondod...@gmail.com wrote:

 This is not an algorithm question. I suggest announcing that any
 student who uses any electronic device to do anything other than take
 the test will fail the class. Have a TA or two sit in the back of the
 room and watch.
 Don

 On Feb 24, 4:04 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
  hi guys i am a final year student of engineering and i am working on an
  ONLINE EXAMINATION SYSTEM just like GATE, GRE usually used by prometrics.
  now i am come across one problem, i want that during the exam the student
  is not able to navigate(can't open anything else just work on test)
  anywhere else except for the program screen unless they QUIT.
  can anyone please help me
  i am working in on versions:
 
  1) desktop based(Swings and panel)
  2) web based (jsp  servlet)
 
  can anyone help me with the code or any idea which function to call or
 how
  to do so for BOTH VERSIONS
 
  its just like

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code to stop students from navigating during online examination

2012-02-24 Thread Don
Yes, that would be a good thing to have. It's still not an algorithm
question. It depends on the OS and the specific tools you are using.
If it provides a full screen mode, use it. Without knowing more
there's not much else we can tell you. And if someone has a smart
phone or even a basic cell phone which can send and receive text
messages there is still the potential to cheat.
Don

On Feb 24, 8:25 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
 i agree it can be done but like in company training and GATE exam and even
 certification exams when the test starts everything else gets disabled till
 student either clicks QUIT TEST or time is over till then everything is
 limited to that screen
 a feature very common after 2006 to avoid cheating...the program goes to
 full screen mode and can't be minimized



 On Fri, Feb 24, 2012 at 7:27 PM, Don dondod...@gmail.com wrote:
  This is not an algorithm question. I suggest announcing that any
  student who uses any electronic device to do anything other than take
  the test will fail the class. Have a TA or two sit in the back of the
  room and watch.
  Don

  On Feb 24, 4:04 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
   hi guys i am a final year student of engineering and i am working on an
   ONLINE EXAMINATION SYSTEM just like GATE, GRE usually used by prometrics.
   now i am come across one problem, i want that during the exam the student
   is not able to navigate(can't open anything else just work on test)
   anywhere else except for the program screen unless they QUIT.
   can anyone please help me
   i am working in on versions:

   1) desktop based(Swings and panel)
   2) web based (jsp  servlet)

   can anyone help me with the code or any idea which function to call or
  how
   to do so for BOTH VERSIONS

   its just like

  --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code to stop students from navigating during online examination

2012-02-24 Thread Jasveen Singh
yes of course its in the instructions not to allow them to enter with
phones there in checking and cheating is prohibited i am making this to
give it to my college for free.
and thank you i will keep trying to look if i can do any change...search
for it...thank you for your help

On Fri, Feb 24, 2012 at 8:03 PM, Don dondod...@gmail.com wrote:

 Yes, that would be a good thing to have. It's still not an algorithm
 question. It depends on the OS and the specific tools you are using.
 If it provides a full screen mode, use it. Without knowing more
 there's not much else we can tell you. And if someone has a smart
 phone or even a basic cell phone which can send and receive text
 messages there is still the potential to cheat.
 Don

 On Feb 24, 8:25 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
  i agree it can be done but like in company training and GATE exam and
 even
  certification exams when the test starts everything else gets disabled
 till
  student either clicks QUIT TEST or time is over till then everything is
  limited to that screen
  a feature very common after 2006 to avoid cheating...the program goes to
  full screen mode and can't be minimized
 
 
 
  On Fri, Feb 24, 2012 at 7:27 PM, Don dondod...@gmail.com wrote:
   This is not an algorithm question. I suggest announcing that any
   student who uses any electronic device to do anything other than take
   the test will fail the class. Have a TA or two sit in the back of the
   room and watch.
   Don
 
   On Feb 24, 4:04 am, Jasveen Singh jasveen.sing...@gmail.com wrote:
hi guys i am a final year student of engineering and i am working on
 an
ONLINE EXAMINATION SYSTEM just like GATE, GRE usually used by
 prometrics.
now i am come across one problem, i want that during the exam the
 student
is not able to navigate(can't open anything else just work on test)
anywhere else except for the program screen unless they QUIT.
can anyone please help me
i am working in on versions:
 
1) desktop based(Swings and panel)
2) web based (jsp  servlet)
 
can anyone help me with the code or any idea which function to call
 or
   how
to do so for BOTH VERSIONS
 
its just like
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
 
  - Show quoted text -

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-11-11 Thread NAMAN KOHLI
@Utkarsh

In this code I am writing on the source code file at time of execution 
Every time the file executes it changes its own source code...However I too
would like to know if we can do that in c ...

On Fri, Nov 11, 2011 at 12:38 PM, UTKARSH SRIVASTAV usrivastav...@gmail.com
 wrote:

 @NAMAN i don't know python but i think u r writing in a new file .
 what i want to say a c code that could write on a.out without the use of
 another file


 On Fri, Nov 11, 2011 at 12:32 PM, NAMAN KOHLI naman09...@iiitd.ac.inwrote:

 I think @Don meant this

 For a *New Text Document.py* in my folder I am running this script in
 python

 File = open(New Text Document.py,'r')
 data = File.readlines()
 print 1
 value = int(data[2].split( )[1])
 print value
 File.close()
 File = open(New Text Document.py,'w')
  value += 1
 data[2]=print +str(value)+'\n'
 for i in data:
 File.writelines(i)
 File.close()

 This prints a new value every time the program runs... The only catch is
 that you have to shut the program after running it once and then again
 restart it.. Please tell if there is any error

 On Fri, Nov 11, 2011 at 1:48 AM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 @don can u give a code for your logic

 On Wed, Oct 19, 2011 at 2:45 PM, Azhar Hussain azhar...@gmail.comwrote:

 I am not sure about the program to do it. But, 'strace' on linux would
 give the details of a program(parameters passed, retrun values, signals
 recieved etc). If you are looking for something similar then you can loot
 at strace source.

 mean while a.out does not not have information of stack pointer etc
 which will be built only at run time and it just tells what data goes to
 text, stack etc. it is dumb it does not do anything, the interpreter
 recollects all the info from a.out.


 -
 Azhar.


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja 
 rajkumar.cs...@gmail.com wrote:

 Can someone give me an idea about how to see the range of segments
 like data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 
 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed
 is one way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions
 easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Naman Kohli
 Roll No. 2009027

 --
 You received this message because you are 

Re: [algogeeks] Re: Code it...

2011-11-11 Thread saurabh singh
for an executable its not possible.
open will return with ETXTBSY error.

OS:ubuntu.

On Fri, Nov 11, 2011 at 1:50 PM, NAMAN KOHLI naman09...@iiitd.ac.in wrote:

 @Utkarsh

 In this code I am writing on the source code file at time of execution
  Every time the file executes it changes its own source code...However
 I too would like to know if we can do that in c ...


 On Fri, Nov 11, 2011 at 12:38 PM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 @NAMAN i don't know python but i think u r writing in a new file
 . what i want to say a c code that could write on a.out without the
 use of another file


 On Fri, Nov 11, 2011 at 12:32 PM, NAMAN KOHLI naman09...@iiitd.ac.inwrote:

 I think @Don meant this

 For a *New Text Document.py* in my folder I am running this script in
 python

 File = open(New Text Document.py,'r')
 data = File.readlines()
 print 1
 value = int(data[2].split( )[1])
 print value
 File.close()
 File = open(New Text Document.py,'w')
  value += 1
 data[2]=print +str(value)+'\n'
 for i in data:
 File.writelines(i)
 File.close()

 This prints a new value every time the program runs... The only catch is
 that you have to shut the program after running it once and then again
 restart it.. Please tell if there is any error

 On Fri, Nov 11, 2011 at 1:48 AM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 @don can u give a code for your logic

 On Wed, Oct 19, 2011 at 2:45 PM, Azhar Hussain azhar...@gmail.comwrote:

 I am not sure about the program to do it. But, 'strace' on linux would
 give the details of a program(parameters passed, retrun values, signals
 recieved etc). If you are looking for something similar then you can loot
 at strace source.

 mean while a.out does not not have information of stack pointer etc
 which will be built only at run time and it just tells what data goes to
 text, stack etc. it is dumb it does not do anything, the interpreter
 recollects all the info from a.out.


 -
 Azhar.


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja 
 rajkumar.cs...@gmail.com wrote:

 Can someone give me an idea about how to see the range of segments
 like data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program
 itself (while in execution), like using stack pointer for stack 
 segment ??




 On 18 October 2011 19:54, sravanreddy001 
 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed
 is one way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions
 easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more 

Re: [algogeeks] Re: Code it...

2011-11-10 Thread UTKARSH SRIVASTAV
@don can u give a code for your logic

On Wed, Oct 19, 2011 at 2:45 PM, Azhar Hussain azhar...@gmail.com wrote:

 I am not sure about the program to do it. But, 'strace' on linux would
 give the details of a program(parameters passed, retrun values, signals
 recieved etc). If you are looking for something similar then you can loot
 at strace source.

 mean while a.out does not not have information of stack pointer etc which
 will be built only at run time and it just tells what data goes to text,
 stack etc. it is dumb it does not do anything, the interpreter recollects
 all the info from a.out.


 -
 Azhar.


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja 
 rajkumar.cs...@gmail.comwrote:

 Can someone give me an idea about how to see the range of segments like
 data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is
 one way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-11-10 Thread NAMAN KOHLI
I think @Don meant this

For a *New Text Document.py* in my folder I am running this script in
python

File = open(New Text Document.py,'r')
data = File.readlines()
print 1
value = int(data[2].split( )[1])
print value
File.close()
File = open(New Text Document.py,'w')
value += 1
data[2]=print +str(value)+'\n'
for i in data:
File.writelines(i)
File.close()

This prints a new value every time the program runs... The only catch is
that you have to shut the program after running it once and then again
restart it.. Please tell if there is any error

On Fri, Nov 11, 2011 at 1:48 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:

 @don can u give a code for your logic

 On Wed, Oct 19, 2011 at 2:45 PM, Azhar Hussain azhar...@gmail.com wrote:

 I am not sure about the program to do it. But, 'strace' on linux would
 give the details of a program(parameters passed, retrun values, signals
 recieved etc). If you are looking for something similar then you can loot
 at strace source.

 mean while a.out does not not have information of stack pointer etc which
 will be built only at run time and it just tells what data goes to text,
 stack etc. it is dumb it does not do anything, the interpreter recollects
 all the info from a.out.


 -
 Azhar.


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja 
 rajkumar.cs...@gmail.comwrote:

 Can someone give me an idea about how to see the range of segments
 like data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is
 one way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Naman Kohli
Roll No. 2009027

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-11-10 Thread UTKARSH SRIVASTAV
@NAMAN i don't know python but i think u r writing in a new file .
what i want to say a c code that could write on a.out without the use of
another file

On Fri, Nov 11, 2011 at 12:32 PM, NAMAN KOHLI naman09...@iiitd.ac.inwrote:

 I think @Don meant this

 For a *New Text Document.py* in my folder I am running this script in
 python

 File = open(New Text Document.py,'r')
 data = File.readlines()
 print 1
 value = int(data[2].split( )[1])
 print value
 File.close()
 File = open(New Text Document.py,'w')
 value += 1
 data[2]=print +str(value)+'\n'
 for i in data:
 File.writelines(i)
 File.close()

 This prints a new value every time the program runs... The only catch is
 that you have to shut the program after running it once and then again
 restart it.. Please tell if there is any error

 On Fri, Nov 11, 2011 at 1:48 AM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 @don can u give a code for your logic

 On Wed, Oct 19, 2011 at 2:45 PM, Azhar Hussain azhar...@gmail.comwrote:

 I am not sure about the program to do it. But, 'strace' on linux would
 give the details of a program(parameters passed, retrun values, signals
 recieved etc). If you are looking for something similar then you can loot
 at strace source.

 mean while a.out does not not have information of stack pointer etc
 which will be built only at run time and it just tells what data goes to
 text, stack etc. it is dumb it does not do anything, the interpreter
 recollects all the info from a.out.


 -
 Azhar.


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja rajkumar.cs...@gmail.com
  wrote:

 Can someone give me an idea about how to see the range of segments
 like data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is
 one way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 3rd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Naman Kohli
 Roll No. 2009027

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 

Re: [algogeeks] Re: Code it...

2011-10-19 Thread Rahul
http://valgrind.org/

I am not sure but this may help on linux.
I have a question that how to determine the number of system calls a program
has made ?
That too of a particular type
Rahul


On Wed, Oct 19, 2011 at 11:07 AM, kumar raja rajkumar.cs...@gmail.comwrote:

 Can someone give me an idea about how to see the range of segments like
 data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself (while
 in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.com wrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is one
 way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-10-19 Thread Rahul
http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
Rahul


On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
 Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja rajkumar.cs...@gmail.comwrote:

 Can someone give me an idea about how to see the range of segments like
 data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is one
 way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-10-19 Thread Azhar Hussain
I am not sure about the program to do it. But, 'strace' on linux would give
the details of a program(parameters passed, retrun values, signals recieved
etc). If you are looking for something similar then you can loot at strace
source.

mean while a.out does not not have information of stack pointer etc which
will be built only at run time and it just tells what data goes to text,
stack etc. it is dumb it does not do anything, the interpreter recollects
all the info from a.out.


-
Azhar.

On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://www.dgp.toronto.edu/~ajr/209/notes/memoryos.html
 Rahul


 On Wed, Oct 19, 2011 at 2:29 PM, Rahul raikra...@gmail.com wrote:

 http://valgrind.org/

 I am not sure but this may help on linux.
 I have a question that how to determine the number of system calls a
 program has made ?
 That too of a particular type
  Rahul


 On Wed, Oct 19, 2011 at 11:07 AM, kumar raja rajkumar.cs...@gmail.comwrote:

 Can someone give me an idea about how to see the range of segments like
 data ,heap,stack and text segments of an executable file.(a.out)

 Is there anyway to access the those segments from the program itself
 (while in execution), like using stack pointer for stack segment ??




 On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.comwrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is one
 way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-18 Thread Don
It depends on the language.
If is is a scripted or interpreted language then you can just change
the source code.
If it is a compiled language you would change the binary code where
the output value is stored.
I'm not saying that it is a recommended approach, but it is possible.
Don

On Oct 17, 10:24 pm, sravanreddy001 sravanreddy...@gmail.com wrote:
 @don
 Do you mean read the source and modify the hard coded value..
 This will involve the the compile and linking steps right?

 Did you mean some thing else?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-18 Thread Gene
Not really.  Most executable formats have a way to include extra data
that's not used by the loader.  You could store a count in such data
and have the program modify the executable every time it runs.  Not
recommended, though.  A separate file is a much better idea.

You could also play games by actually changing the BSS area (or
equivalent) of the executable.  You must assume the binary isn't
compressed or encyrpted in any manner (a big assumption), then do
something very ugly like:

char magic[256] = run number is here --00;

then open  the program's own executable (argv[0] is helpful for this)
in read-write mode, scan it to find the string run number is here --
, print the count stored after it, then write back the same bytes
after incrementing the number.

Back in the day this kind of trick was used for various things like
copy protection.  Today it's likely to cause some security program or
the OS to get very upset.  (Some OS's lock the executable of a running
program (for paging purposes), so this won't work at all.)



On Oct 18, 5:24 am, sravanreddy001 sravanreddy...@gmail.com wrote:
 @don
 Do you mean read the source and modify the hard coded value..
 This will involve the the compile and linking steps right?

 Did you mean some thing else?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-18 Thread sravanreddy001
@Don, Gene:
very good insights, 
didn't even thought of the changing the executable, but it indeed is one way 
to do.
:)

@Don: agree with scripts and interpreted code.. :) 
[coming out of the same language helps answers some questions easily]

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Code it...

2011-10-18 Thread kumar raja
Can someone give me an idea about how to see the range of segments like data
,heap,stack and text segments of an executable file.(a.out)

Is there anyway to access the those segments from the program itself (while
in execution), like using stack pointer for stack segment ??



On 18 October 2011 19:54, sravanreddy001 sravanreddy...@gmail.com wrote:

 @Don, Gene:
 very good insights,
 didn't even thought of the changing the executable, but it indeed is one
 way to do.
 :)

 @Don: agree with scripts and interpreted code.. :)
 [coming out of the same language helps answers some questions easily]

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ONw7a6q9VRMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards
Kumar Raja
M.Tech(SIT)
IIT Kharagpur,
10it60...@iitkgp.ac.in

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-17 Thread Don
Could be done by a self-modifying program.
Don

On Oct 15, 5:26 am, kumar raja rajkumar.cs...@gmail.com wrote:
 you have to write a program which tell about how many times it has run.
 ex:
 if you run first time it will print 1.
 if you run second time it will print 2.
 like this.

 --
 Regards
 Kumar Raja
 M.Tech(SIT)
 IIT Kharagpur,
 10it60...@iitkgp.ac.in

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-17 Thread sravanreddy001
@don
Do you mean read the source and modify the hard coded value..
This will involve the the compile and linking steps right?

Did you mean some thing else?

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/FnH0_GX-9gsJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Code it...

2011-10-16 Thread sravanreddy001
the only way to do this is to store in an external space like file.

if its a function that is called, a static variable can be used to track 
count.

Question: Can extern variables span accross processes? They cannot right. I 
mean two forked process share the same extern variable instance??

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/z-zCWgyer20J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.