Welcome Guest.   Make a donation to an author on the site September 02, 2014, 04:37:53 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2012! Download dozens of custom programs!
   
  Forum Home Thread Marks Chat! Downloads Search Login Register  
  Show Posts
      View this member's profile 
      donate to someone Donate to this member 
Pages: [1] 2 3 4 5 6 Next
1  Main Area and Open Discussion / Living Room / Re: Best USB/Bootable recovery and "utility" tools on: April 19, 2012, 03:16:26 AM
I've used this before successfully.
http://www.pendrivelinux....mi-multiboot-usb-creator/


For others see:
http://www.pendriveapps.com/software/live-usb/
2  Other Software / Developer's Corner / Re: The Finch - $100 Robot for Teaching Computer Programming on: June 20, 2011, 02:02:05 AM
Look's great. I wonder what should be the minimum starting age? 5 is good enough, how about 10?
3  DonationCoder.com Software / Finished Programs / Re: DONE: Open images without program window showing. on: June 20, 2011, 02:01:01 AM
the only addition that I can think of would be to set the images to close after a given period

This functionality would be very easy to add.

skwire, what did you use to write frameless?

It's written in AHK and it's really not much more than simply reading in the command-line parameters and creating a very simple GUI using a standard picture control.

I see, that's what I'd guessed. btw, are you not sharing your source code on the website? Somehow I thought that handling pictures was a lot more complicated than that, because of various formats and types ...etc. you make it look easy though! So why do all they image viewers cost a bunch and stuff?
I guess that would be because or writing native decoding algorithms versus using libraries.
Still good job on this.

In a previous thread I started on this forum it was pointed out to me that what I was trying to do at that time was already available in the OS but if it had not been pointed out to me, like now, I would probably never have found it. embarassed
Always did prefer mechanical things, at least you can take them apart and see how they work.

It's the same with computers it's just it follows a different set of rules, and the basics are the code, which can be hidden. I guess you need training with it just like you need some basic understand of physics (which can be intuitive) to deal with mechanical things.
4  Main Area and Open Discussion / General Software Discussion / Re: Fold 2.0.1.0 on: June 20, 2011, 01:11:22 AM
File managers with quad windows may be a solution but I haven't found a free one that seemed stable and predictable.
Have you tried Q-Dir ? It's free and seems to work well.
5  DonationCoder.com Software / Finished Programs / Re: DONE: Open images without program window showing. on: June 16, 2011, 07:35:59 AM
oh see this http://www.donationcoder....18081.msg162996#msg162996
I forgot that it had gone payware later. Anyway I am glad it worked out for you.

skwire, what did you use to write frameless? I don't see any source in the bundle or link on the website, I'd thought you'd done it in AHK and was curious to look at the code.
6  Main Area and Open Discussion / Living Room / Re: Wiki software with authentication on: June 16, 2011, 03:18:36 AM
compare at http://www.wikimatrix.org/

further i use dekiwiki the free version (www.mindtouch.com) with ldap authentication.
You can have permissions and restrict pages ...etc.
7  DonationCoder.com Software / Finished Programs / Re: DONE: Open images without program window showing. on: June 16, 2011, 03:08:40 AM
how about maxview by faststone? You'll have to see the documentation for the commandline parameters

Also for scripts, if you are using win7 and up, I'd recommend use powershell. If this is only for your computer you could also use other scripting languages by installing their runtime, python, ruby ...etc, they would be overkill but would work well and expand even better. This is if you know programming languages already.

skwire would recommend ahk as well as that is what he used to create the app. 

as for examples, first link on google is this which looks good.
8  Main Area and Open Discussion / Living Room / Re: I'm Confused on: February 01, 2011, 11:14:52 PM
Imagine a Microsoft car! Takes 15 minutes to start  Thmbsup

Then again, I'd rather have that than the Apple car, where you can only fill up at Apple gas stations...

Hahahah~! cheesy

I suppose gas for Linux cars is free, but you need to refine it yourself...

And allow anybody else who wanted to use it to do so.  tongue

No, anyone who wanted to clone it to do so smiley, you get to keep your copy. And if you come up with a wicked new navigation or nitro system, you have to share its specs so others can clone it smiley
9  Main Area and Open Discussion / Living Room / Re: I have a very hard announcement to make on: October 14, 2010, 06:55:30 AM
First, what you have accomplished can be seen as an example for many young people here. It is more than what many have done.

I don't often think about how some members are so older than me here. When reading posts I automatically assume they are around my age... bizarre huh? Or maybe I just follow the logic of the post and not try to reconstruct a real person behind those thoughts as you would do face to face.

I don't know why you'd say that you are not where you need to be as a programmer as your applications have clearly shown that you possess enough to solve various computer problems. But then your goals might have been a lot bigger, and that is what I want to know. Since I hardly have any goals of mine, I like to spy on other people's goals ! smiley
What level would you need to get a permanent employment near where you leave? Do you have an objective way to measure that?

10  Other Software / Developer's Corner / Re: Organizing code written by oneself and others downloaded from elsewhere on: September 28, 2010, 11:10:08 PM
so Archivarius + Total Commander + File System for Tranglos

I find myself in a similar boat, I end up mostly using the file system, naming conventions and a search engine. I was hoping to get a package that would force good habits and be an all in one package, and for something that would be portable, as I do still using windows. Does arvhivarius show formatted code?
11  Other Software / Developer's Corner / Organizing code written by oneself and others downloaded from elsewhere on: September 28, 2010, 05:37:26 AM
I need some advise/tips on organizing one's source code. Since so many of you are developers here I wanted to know how you guys manage your code as well. (A code library with low overhead I guess).
I am taking this step now, as I am switching my main pc to ubuntu and wanted to reorganize my professional and personal life in terms of documents on there.

There are several key concepts that I use to think about the problem so please understand those first.

high maintainence - high feature set (versioning, quick search and indexing, rapid updates and deployment, secure offsite backups, notes/documentation)

low maintainence - low feature set (versioning, throwaway scripts, testing)

Features I wanted for my solution:

- version control (git? or something with multiple project support)
- quick search within contents (???)
- backup (dropbox? mozy? rsync? simple-backup?)
- browseable, ie. must be organized/tagged. Is there a good tagging architecture?
- maintain documentation for all scripts/programs as well (PAD? wiki? txt files with a program? dokuwiki?)

So what do you guys do? and any ideas?

/edit: other discussions similar to this (nothing exactly like this though)
http://www.donationcoder....m/index.php?topic=10318.0
http://www.donationcoder....m/index.php?topic=19302.0
12  Main Area and Open Discussion / Living Room / Re: How to manage large clipart collections? on: August 15, 2010, 11:25:44 PM
I had a similar problem but not as extensive as yours. Since this was a work related issue, i assigned one graphic designer to create thumbnails in PNG for all AI files (in retrospect should have chosen jpeg for the metadata, don't know if png has a widely supported metadata structure). Then I used Gallery Server Pro to read the folder structure and serve it on a different pc. So now the collection is accessible via the network, easily searchable, and easy to add to as well. It actually takes care of a lot of these problems.
I also tried to use imagemagick to convert ai files automatically, but for that to work, the AI needs to be saved with the PDF option enabled, else it won't work. I am sure it can convert the .eps files directly though. So this might be a start.
13  Main Area and Open Discussion / General Software Discussion / Re: Best way to collaborate (chat-like) within in the office? on: August 14, 2010, 12:56:08 AM
I have a similar requirement, but it needs to be cross-platform. I've looked at jabber, but haven't found a decent cross-platform client yet. It's a mess to try and use them. Do you know of any program that doesn't require user registration/passwords ...etc. Just use the hostname?
14  Other Software / Found Deals and Discounts / Re: Take Command Console LE from JPSoft on: August 06, 2010, 07:54:04 AM
I just heard about another free console enhancer:  Console
Pretty unstable, though - and it's relatively laggy as well, unless you bump down the update timeout and burn CPU cycles. And has problems with some "fullscreen console apps" (like hexit and hiew).
It's stable enough here.  I have tabs configured to run CMD.EXE, Windows Powershell, TCC LE, Cygwin bash, and MinGW zsh.  I can also run things like Eric Meyer's VDE editor and Necromancer's DOS Navigator.  I had problems with alpha-blending and transparency, and simply turned that off.  Transparency is eye-candy I don't need in daily use.

And I load Kris Sweger's ANSIPlus in CONFIG.NT for ANSI support in DOS apps, and Jason Hood's ANSICON in CMD.EXE/TCC LE sessions for ANSI support there.  It all works fine in Console 2 tabs.  I haven't found a need to diddle the update settings.

Console 2 doesn't do full screen, but I wouldn't want to.  I have a 19" monitor in 1600x1200 resolution, and prefer everything in a window.


That sounds awesome... I had just discovered TCC LE today and set it up in console 2 and while I was at it, i added powershell, and thought that I should probably add bash/cygwin or msys to it (though portable versions of it) and i soon got lost on researching those solutions rather than getting it done. So I would be very happy if you could tell me how you have set it up, and if your setup is portable.  (posting your console.xml would be cool as well)

And just FYI, TCC le wouldn't work with console 2 for me, until i updated it to the latest version 146 (had 144 earlier).

 Thmbsup Thmbsup for console2 from me as well.
15  DonationCoder.com Software / Post New Requests Here / Re: IDEA: VPR, visual people randomizer! on: July 01, 2010, 12:49:35 AM
sorry, my bad. I assumed the screenshot was excel. No as far as i know it shouldn't  work in openoffice, but hmm that gives me an opportunity to try macros in open office smiley
As for stand alone... I don't have enough time for that, though I do have one flash application lying about which did something similar. I'll see if i can find it.
16  DonationCoder.com Software / Post New Requests Here / Re: IDEA: VPR, visual people randomizer! on: June 30, 2010, 07:22:25 AM
since you are already using excel... here's a simple module for it, i've tested it and it works well enough.

just put your active cell within your table and run the macro StartRandomizer()

[copy or print]
'Module by Vixay for DonationCoder
Option Explicit
'API for windows sleep
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub StartRandomizer()
'Moves a shape along the cells, and changes color of the final cell
' No exclusivity for now
'30 ms = fast
'100 ms = slow
'150 ms = stop
Dim shpActive As Shape
Dim rCell As Range
Dim lSpeed As Long
Dim lSpeedMax As Long
Dim lWinner As Long
Dim lCount As Long

lSpeed = 30
lSpeedMax = 150
Randomize
lWinner = SelectWinner()
Debug.Print "to be winner:" & lWinner
'get the shape we will use ( must exist or will cause an error )
If ActiveSheet.Shapes.Count > 1 Then
    Set shpActive = ActiveSheet.Shapes(1)
Else
    Set shpActive = ActiveSheet.Shapes.AddShape(msoShapeRoundedRectangle, 10, 10, 10, 10)
    shpActive.Fill.Transparency = 0.8
End If

For lSpeed = 30 To lSpeedMax Step 20
    lCount = 0
    For Each rCell In ListArea.Cells
        lCount = lCount + 1
        AlignShapeTo shpActive, rCell
        'Debug.Print rCell.Address
        DoEvents
        'Application.ScreenUpdating = True
        Sleep lSpeed
        'slow down speed randomly with a low probability
        ' i.e. continue through all cells most of the time at the current speed
        ' except no random slowdowns on the last stage
        If Rnd >= 0.95 And lSpeed < 130 Then
        'can tweak the number here to change how often we randomly switch speeds
            lSpeed = lSpeed + 20
            Debug.Print "random speed slowdown:" & lSpeed
        End If
        'if at winner cell, and at final slowdown stage
        If lSpeed >= lSpeedMax And lCount = lWinner Then
            Debug.Print "Found our winner"
            rCell.Interior.Color = vbRed
            Exit For 'stop here
        End If
        'Debug.Print lSpeed
    Next rCell
    Debug.Print "next slowdown:" & lSpeed
Next lSpeed

End Sub

Sub AlignShapeTo(ByRef shpObj As Shape, rCell As Range)
shpObj.Top = rCell.Top
shpObj.Left = rCell.Left
shpObj.Height = rCell.Height
shpObj.Width = rCell.Width
End Sub

Function ListArea() As Range
'Change this function to suit your needs or just make sure your
' active cell is within your table range
Set ListArea = ActiveCell.CurrentRegion
'Set ListArea = Selection
End Function

Function SelectWinner() As Long
'Randomly choose a cell amongst all the cells
Dim lCellCount As Long
lCellCount = ListArea.Count
Randomize
SelectWinner = Rnd * lCellCount + 1
Debug.Print SelectWinner & " / " & lCellCount
End Function

Sub ClearBackgrounds()
ActiveCell.CurrentRegion.Interior.ColorIndex = xlColorIndexNone
End Sub

Let me know what you think.
Should be easy for you to customize colors and all.
17  Main Area and Open Discussion / General Software Discussion / Re: How to watch folders and perform certain actions automatically? on: March 27, 2010, 01:11:54 AM
http://www.freeware-guide.com/download/index2.html

Log Monitor
I've used it in the past to watch directories. seems to work well enough.

18  Main Area and Open Discussion / General Software Discussion / Re: Recreate files but without content to target drive on: March 25, 2010, 08:39:44 AM
Alright fellas,

2 hours spent trying to fix the script and here are the results for the python script!
[copy or print]
08:25:33 PM
08:25:46 PM
a grand total of 13 seconds!!!

Zipfile about 12 MB. with 54827 files (created a few files since last count)

Things I had to fix:
Quote
bugfixes
 modified time errors
 path length exceeded errors

resolution:
 #set time to unix epoch 0 = 'Thu Jan 01 07:00:00 1970'
so there will be some files with incorrect timestamps in the zipfile

I hope this helps everyone... though I still got some warnings while running the script... probably due to windows handling of files and or paths...
Quote
makeTreeZip.py:32: DeprecationWarning: struct integer overflow masking is deprecated
  zf.fp.write(zinfo.FileHeader())
makeTreeZip.py:32: DeprecationWarning: 'H' format requires 0 <= number <= 65535
  zf.fp.write(zinfo.FileHeader())
makeTreeZip.py:79: DeprecationWarning: struct integer overflow masking is deprecated
  zf.close()
makeTreeZip.py:79: DeprecationWarning: 'H' format requires 0 <= number <= 65535
  zf.close()

Here's the final code so far
Formatted for Python with the GeSHI Syntax Highlighter [copy or print]
  1. #!/usr/bin/python
  2. import os, sys, zipfile, optparse, zlib, fnmatch, time
  3.  
  4. optp=optparse.OptionParser(usage="%prog [options] <target-zip> <source-dir> [<source-dir...>]")
  5. optp.add_option("-x", help="exclude mask", action="append", dest="exclude", default=[])
  6. optp.add_option("-q", help="be quiet", action="store_true", dest="quiet", default=False)
  7. optp.add_option("-e", help="omit empty directories", action="store_true", dest="omit_empty", default=False)
  8. err=optp.error
  9.  
  10. options, args = optp.parse_args()
  11.  
  12. if len(args)<2:
  13.  optp.print_usage()
  14.  sys.exit(1)
  15.  
  16. zf=zipfile.ZipFile(args[0], "w")
  17.  
  18. def zfAddNullFile(zf, arcname, date_time, extattr=0):
  19.  """ Adapted from the method in zipfile """
  20.  arcname = os.path.normpath(os.path.splitdrive(arcname)[1])
  21.  arcname = arcname.lstrip(os.sep + (os.altsep or ""))
  22.  zinfo = zipfile.ZipInfo(arcname, date_time)
  23.  zinfo.external_attr = extattr
  24.  zinfo.compress_type = zf.compression
  25.  zinfo.file_size = 0
  26.  zinfo.flag_bits = 0x00
  27.  zinfo.header_offset = zf.fp.tell()    # Start of header bytes
  28.  zf._writecheck(zinfo)
  29.  zf._didModify = True
  30.  zinfo.CRC = CRC = zlib.crc32("")
  31.  zinfo.compress_size = 0
  32.  zinfo.file_size = 0
  33.  zf.fp.write(zinfo.FileHeader())
  34.  zf.filelist.append(zinfo)
  35.  zf.NameToInfo[zinfo.filename] = zinfo
  36.  
  37. def printFilename(f, msg=None):
  38.  if not options.quiet:
  39.    if msg:
  40.      print msg,
  41.  
  42.    try:
  43.      print f
  44.    except:
  45.      print f.encode("charmap", "replace")
  46.  
  47. for sourceDir in args[1:]:
  48.  try:
  49.    sourceDir=sourceDir.decode("latin-1")
  50.  except:
  51.    print sourceDir
  52.    print "Exception while trying to process directory"
  53.  for dp, dn, fn in os.walk(sourceDir):
  54.    if fn:
  55.      for f in fn:
  56.        f=os.path.join(dp, f)
  57.        ok=True
  58.        for xmask in options.exclude:
  59.          if fnmatch.fnmatch(f, xmask):
  60.            ok=False
  61.            break
  62.        if ok:
  63.          try:
  64.            mtime=time.localtime(os.stat(f).st_mtime)
  65.          except ValueError:
  66.            print "Error: Modified time out of range."
  67.            printFilename(f)
  68.            print os.stat(f).st_mtime
  69.            mtime=time.localtime(0) #set time to unix epoch 0 = 'Thu Jan 01 07:00:00 1970'
  70.          except WindowsError:
  71.            print "Error: Can't find file due to windows limitations."
  72.            printFilename(f)
  73.            mtime=time.localtime(0) #set time to unix epoch 0 = 'Thu Jan 01 07:00:00 1970'
  74.  
  75.          zfAddNullFile(zf, f, (mtime.tm_year, mtime.tm_mon, mtime.tm_mday, mtime.tm_hour, mtime.tm_min, mtime.tm_sec))
  76.    elif not options.omit_empty:
  77.      mtime=time.localtime(os.stat(dp).st_mtime)
  78.      #printFilename(dp, "(empty directory)")
  79.      zfAddNullFile(zf, dp, (mtime.tm_year, mtime.tm_mon, mtime.tm_mday, mtime.tm_hour, mtime.tm_min, mtime.tm_sec), 16)
  80.  
  81. zf.close()
  82. print "All Done."

I hope you all enjoy this. I'll attach the exe as well, though I can't make any guarantees for it.

19  Main Area and Open Discussion / General Software Discussion / Re: Recreate files but without content to target drive on: March 25, 2010, 07:23:08 AM
Ok I needed to use the utility again and decided to do the speed comparison.

I ran it on A folder with
[copy or print]
67.8 GB (72,906,108,928 bytes)
54,824 Files, 5,364 Folders

Here's ZeroZipper
Quote
Start - 06:29:44 PM
End - 06:36:41 PM
It took 7 minutes!! Out of which 5 minutes was spent just recreating the 0-byte structure! 1 minute to delete files and <1 to create the zip.
So this method is definitely not good for large folders.
And I think I found a bug. For the zip I didn't put a path just a name "zz.zip", the zip was created in the temp correctly but then it didn't move it to the same location as the zerozipper... it was strange... and the zip was then deleted! so I didn't get any output after waiting for so long!

I then had high hopes for the python version, as it would avoid the slow Disk I/O. So
 i finally used the py2exe and converted the code to an exe and tried that (rather than the script just to make a fair comparison).
It died again on unicode filenames Sad. I did use the new version too this time!
Quote
Traceback (most recent call last):
  File "makeTreeZip.py", line 61, in <module>
    mtime=time.localtime(os.stat(f).st_mtime)
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'J:\\Share\\Categorized Appz\\Compression Utilities\\Just Extractor\\??-readme.txt'

Can someone help with this problem? It seems like the filenames which contain unrecognizable characters are converted to ?? and then we we use them again it crashes... how do we retain the filenames in the original format? regardless of whether it contains Legible/illegible unicode?

After this i tried running the script directly and it seemed to work but then
I encountered another mysterious error
Quote
Traceback (most recent call last):
  File "makeTreeZip.py", line 63, in <module>
    mtime=time.localtime(os.stat(f).st_mtime)
ValueError: (22, 'Invalid argument')

I tried debugging this the value for st_mtime was 1189361328.0 i converted that using time.localtime() and it worked, so i can't figure out exactly what is causing this error.

Actually the file in question have a modified date of
Quote
Tuesday, September 25, 3427, 10:40:30 PM
so i can see how python would choke on that. how can i resolve this issue?
20  Main Area and Open Discussion / Living Room / Re: Desktop Icons on: March 08, 2010, 11:55:03 PM
some autohotkey code i use for this functionality
[copy or print]
;function to return toggled values
;first call returns true
toggle() {
 static t
 t := !t
 Return, t
}
EnableDisableDesktopIcons()
{
  ;relies on having DetectHiddenWindows OFF
  if toggle()
    WinShow,Program Manager
  Else
    WinHide,Program Manager
}


#`::EnableDisableDesktopIcons() ;;Enable/disable desktop icons (shortcut key Win+`)

Doesn't work with fences installed though, but you can then use fences, ESC key to toggle it.
21  Main Area and Open Discussion / General Software Discussion / Re: virtual display utility on: March 08, 2010, 11:48:10 PM
How about setting a resolution higher than what is allowed?

Sometimes this is what happens: You see only a part of the screen (i.e. your native resolution) but if you move your mouse in any direction, the screen scrolls and shows that part... and voila your screen acts like a window for a larger screen!

This is happened to me when playing games ...etc and the switch back to the desktop was not made correctly, i don't know if it's possible to induce this behavior!
22  Main Area and Open Discussion / Living Room / Re: Blog Essay: In Praise of Online Obscurity on: March 08, 2010, 11:02:17 PM
http://en.wikipedia.org/wiki/Dunbar%27s_number

The theoretical hard limit on how many social connections we can actively maintain.

About 150.

The discussion reminded me about this.
23  Other Software / Developer's Corner / Re: What's your *favorite* programming language and *why* ? on: February 09, 2010, 10:12:08 PM
javascript for now, just because it's one of the ones I learnt recently, and it was absolutely thrilling to discover the fun things it could do, you know the whole dynamic programming thing:)
24  Other Software / Developer's Corner / Re: Python Language Annoyances on: February 09, 2010, 10:06:22 PM
I think the issue is like one poster said meta-programming. Like the list below, moving up you move to a higher level of abstraction and higher level of programming. So some of your gripes about hiding details, old syntax ...etc is necessary. The higher you go the less you care about the implementation in the layers below.
Quote
English/Ideas/Abstract concepts/thought
Frameworks/Django/...etc
Python/Javascript
C++
C
Assembly
I frankly can't wait until we get to the ' just express an idea, and poof program done' stage smiley.
What debuggers/compilers/run-time checking do is give feedback on your ideas, about feasibility, errors ...etc, which is what they should continue doing. I'd rather have computers working harder, than people, as resource wise people are more expensive smiley

some other valid comparisons were, newbie to programming's introduction to python experience is different, compared to an experienced programmer learning it.

Anyway I just learn python from diveintopython a couple of weeks ago, and since then i've used it to solve a couple of puzzles, and I had fun... The old style program was like this:
[copy or print]
##def hours12():
##    #using loops
##    li = []
##    for h in range(1,13):
##        for m in range(60):
##            li.append('%02d%02d' %(h, m))
##    return li
##
##def hours12_b(): # this version is faster
##    #using list comprehension
##    return ['%02d%02d' %(h, m) for h in range(1,13) for m in range(60)]
##
##def duplicates(li):
##    li2 = []
##    for t in li:
##        dup = 0
##        old_d = t[0]
##        for d in t[1:]:
##            if d == old_d:
##                dup += 1
##            elif 0 < dup < 2:
##                dup = 0 #reset duplicate count if non consecutive duplicates found
##            old_d = d
##               
##        if dup >= 2:
##            # print t, dup
##            li2.append(t)
##    #print len(li2)
##    return li2
##
##import re
##repattern = re.compile(r'(\d)\1{2}')
##
##def duplicates_b(li):
##    li2 = []
##    # print 'testing regular expressions for matching duplicates'
##    for el in li:
##        result = repattern.search(el)
##        if result:
##            li2.append(el)
##            # print result.group()
##    #print len(li2)
##    return li2
##
##def duplicates_c(li): #this version is fastest
##    li2 = filter(repattern.search, li)
##    #print len(li2)
##    #return [x.group() for x in li2]
##    return li2
##
##import timeit
##li = hours12_b()
##
##ta = timeit.Timer('digits_in_clock.duplicates(digits_in_clock.li)','import digits_in_clock')
##tb = timeit.Timer('digits_in_clock.duplicates_b(digits_in_clock.li)','import digits_in_clock')
##tc = timeit.Timer('digits_in_clock.duplicates_c(digits_in_clock.li)','import digits_in_clock')
##print 'a dup method', ta.repeat(1,1000)
##print 'b dup method', tb.repeat(1,1000)
##print 'c dup method', tc.repeat(1,1000)
####li2 = duplicates(li)
####print li2
####li2 = duplicates_b(li)
####print li2

and the python way in the end was like this smiley
[copy or print]
import re
repattern = re.compile(r'(\d)\1{2}')#find a number followed by 2 consecutive duplicates
# the \1 is for first number that we match
li = ['%02d%02d' %(h, m)
      for h in range(1,13)
      for m in range(60)]
li2 = filter(repattern.search, li)
print li2
print len(li2)

Frankly I like the list comprehension idea, and how intuitive and simple python makes it.
25  Main Area and Open Discussion / General Software Discussion / Re: Two users with own KVM(keyboard, monitor, mouse) on one Windows PC? on: December 23, 2009, 11:22:28 PM
http://en.wikipedia.org/w...i/Multiseat_configuration
no personal experience but i've been interested in this as well. Basically treating the modern day PCS as MINI computers smiley
what i do have setup though is an expensive server with all celeron (5 yrs old) pcs as terminals via RDP. Works well enough.
Pages: [1] 2 3 4 5 6 Next
DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.081s | Server load: 0.16 ]