topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday May 8, 2021, 6:06 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vixay [ switch to compact view ]

Pages: prev1 [2] 3 4 5 6next
26
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:)

27
Developer's Corner / Re: Python Language Annoyances
« on: February 09, 2010, 10:06 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.
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 :).
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 :)

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:
##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 :)
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.

28
http://en.wikipedia....tiseat_configuration
no personal experience but i've been interested in this as well. Basically treating the modern day PCS as MINI computers :)
what i do have setup though is an expensive server with all celeron (5 yrs old) pcs as terminals via RDP. Works well enough.

29
General Software Discussion / Re: Best Python IDE
« on: December 07, 2009, 02:22 AM »
How do i configure pyscripter to use Instant Django?

30
General Software Discussion / Re: Text editor with filtering of lines
« on: November 30, 2009, 08:39 PM »
Or use Notepad++ with TextFX-Plugin:
 (see attachment in previous post)

Cool! I did not know this! I use Notepad++ on a daily basis, now i know how to go about it.
You know I'm beginning to think that all feature rich applications should have a built-in command line that matches and shows features. This way it would make it easy for power users to quickly find advanced features and such.
E.g in excel when you begin typing a function name. Emacs. Ubiquity for firefox? ...etc.
Just the other day i was looking for some advanced feature and i'd be damned if i could remember it, that's why i have to maintain a notes list with all the tricks that i use to refer to when i want to repeat the process.


31
Coding Snacks / Grid Clicking Script with visualization
« on: November 28, 2009, 05:50 AM »
http://www.autohotke...r=asc&highlight=

I wanted to share a script I modified here as well. Though I don't know what the etiquette is for cross-forums posting. Should I reproduce the content here or just give a link and drive people to the AHK forums? I think it's better to do both, but if anybody has any suggestions let me know.

see http://www.m2moo.com/program/ahk.html
I got the grid_clicker script from there
I got the GDIP library and samples from http://www.autohotke...rder=asc&start=0
I got the Gridmove script from donationcoder.com

Initially I was planning to use Gridmove's method of drawing to the screen, spent some time figuring it out, but it wasn't suitable for drawing diagonal lines.
After I discovered the GDIP library that became easier

Since I had Gridmove I used the read/write ini idea from there.

And voila I have a cool new grid clicking script for all those pesky farming games and such!

http://www.autohotke...ixay/GridClicker.zip

32
General Software Discussion / Re: Text editor with filtering of lines
« on: November 26, 2009, 03:32 AM »
mwb1100, Thanks! :up: I downloaded and tried it and it works as advertised! Simply brilliant :-*. Now I have to get used to a new text editor... :/
I use PSPad , Notepad2, Notepad++ on a regular basis, not I have to replace one of those with editpad i think.

Though the pro version is demo, and the feature is not available in the light version. Any freeware out there that can do this?

33
General Software Discussion / Re: Text editor with filtering of lines
« on: November 26, 2009, 02:49 AM »
I have gVimPortable installed, and i fired it up, loaded a file, and then i'm lost. Do you have any specific directions?

/edit: found the following after looking through the help files that could help. Any idea on how it would work for say 'fold all lines that don't contain the string popup'
==============================================================================
*28.8* Folding by expression

This is similar to folding by indent, but instead of using the indent of a
line a user function is called to compute the fold level of a line.  You can
use this for text where something in the text indicates which lines belong
together.  An example is an e-mail message where the quoted text is indicated
by a ">" before the line.  To fold these quotes use this: >

:set foldmethod=expr
:set foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','',\"g\"),'[^>].*','',''))

You can try it out on this text:

> quoted text he wrote
> quoted text he wrote
> > double quoted text I wrote
> > double quoted text I wrote

Explanation for the 'foldexpr' used in the example (inside out):
   getline(v:lnum) gets the current line
   substitute(...,'\\s','','g') removes all white space from the line
   substitute(...,'[^>].*','','') removes everything after leading '>'s
   strlen(...) counts the length of the string, which
is the number of '>'s found

Note that a backslash must be inserted before every space, double quote and
backslash for the ":set" command.  If this confuses you, do >

:set foldexpr

to check the actual resulting value.  To correct a complicated expression, use
the command-line completion: >

:set foldexpr=<Tab>

Where <Tab> is a real Tab.  Vim will fill in the previous value, which you can
then edit.

When the expression gets more complicated you should put it in a function and
set 'foldexpr' to call that function.

More about folding by expression in the reference manual: |fold-expr|

==============================================================================

34
General Software Discussion / Text editor with filtering of lines
« on: November 26, 2009, 01:05 AM »
This has been driving me nuts.
I need a text editor that can do filtering of lines in view like dopus. If you have ever used dopus you know that you can filter the visible files by typing wildcard masks (e.g. *txt) ...etc

What I want is something similar but for lines in text files, using regex/wildcards/characters. Almost all editors (ultraedit, pspedit, notepad++) have this feature in find and replace, with ability to list output in separate window ...etc but none do it in place.  

This is basically useful for when i need to find certain types of lines in files and edit them. Visually narrowing the file from a bunch of lines to just a few entities that I'm interested in quickly to edit is very appealing and necessary!
Especially for log files, xml files ...etc.

The key difference is I want to have it in-place (i.e. in the editor window itself). The editor can collapse the other lines or hide them from view in another way, I don't care.
Similar to incremental search, but this is incremental filtering.
Similar to Find all, but this is in editor view
 

Does anybody know of  any text editor that can do this? I bet emacs can but I don't know how, I wouldn't mind using that as my default text editor if it did this!

/edit: an editor, not a viewer, I know grep and other viewers exist for filtering lines.

35
Post New Requests Here / Re: IDEA: resize window from centre
« on: November 04, 2009, 10:52 PM »
what you are looking for is NiftyWindows
Already done in AHK. I think you'll find it is very userful.
You can also search for WinManagement AHK script, or GridMove for some other window management programs

36
...I'm trying to copy a bunch of email addresses to use in another program.  All the recipients are already on one of my Outlook emails.  .... there's no email address shown, only the name (since Outlook will process it later).  For the outsiders that are not in an addressbook, the full email is shown.  Now, I'm trying to copy all the email addresses to another program, so the name does me no good.  I need the actual flippin' email address.  Is there anyway to copy it easily using ctrl-c?  NO!!  I hate this shitty program.

I had the exact same problem, being a tinkerer i wrote a simple macro/vb to get that functionality. see below
/EDIT: I realized i've done this only for a distribution list.... i.e. when i wanted to export the distribution list to another program....etc. It could be modified with some research to work with the active email.

Code: Visual Basic [Select]
  1. Sub CopyCSVEmail()
  2. 'This puts a comma seperated email list for a distribution list on the clipboard
  3. Dim myDistList As DistListItem
  4. Dim j As Integer
  5. Dim iOutFormat As Integer
  6. Dim iPos As Integer
  7. Dim sOutput As String
  8.     'Check type of object in current view
  9.    If TypeName(Application.ActiveInspector.CurrentItem) <> "DistListItem" Then Exit Sub
  10.     'Assign it to a typed variable
  11.    Set myDistList = Application.ActiveInspector.CurrentItem
  12.     iOutFormat = 1
  13.     sOutput = InputBox("Please Choose a MODE: " & vbCrLf _
  14.     & "1 = Address,.." & vbCrLf _
  15.     & "2 = Name (Address),.." & vbCrLf _
  16.     & "3 = Name <Address>,..", "Mode", "1")
  17.     On Error Resume Next
  18.     iOutFormat = CInt(sOutput)
  19.     On Error GoTo 0
  20. '    If (MsgBox("Do you want the addersses with names?", vbQuestion + vbYesNo, "With names?") = vbYes) Then
  21. '        iOutFormat = 2
  22. '    End If
  23.    'do what you want
  24.    sOutput = ""
  25.     For j = 1 To myDistList.MemberCount
  26.         If iOutFormat = 1 Then
  27.             sOutput = sOutput & myDistList.GetMember(j).Address & ", "
  28.         ElseIf iOutFormat = 2 Then
  29.             sOutput = sOutput & myDistList.GetMember(j).Name & ", " '" <" & myDistList.GetMember(j).Address & ">, "
  30.        ElseIf iOutFormat = 3 Then
  31.             iPos = InStr(1, myDistList.GetMember(j).Name, "(") - 1
  32.             If iPos < 0 Then iPos = Len(myDistList.GetMember(j).Name)
  33.             sOutput = sOutput & Trim(Left(myDistList.GetMember(j).Name, iPos)) & " <" & myDistList.GetMember(j).Address & ">, "
  34.         Else
  35.             sOutput = "Error: Incorrect Mode specified"
  36.         End If
  37.     Next j
  38.     sOutput = Left(sOutput, Len(sOutput) - 2) 'Trim last two characters
  39.    'MsgBox sOutput
  40.    InputBox "Copy (Press Ctrl+C) the following line to wherever you want.", "Email Address(es)", sOutput
  41.     'PutOnClipboard (sOutput)
  42.    'reset vars
  43.    Set myDistList = Nothing
  44. End Sub

Google how to add macros in outlook to see where you can paste this.

37
General Software Discussion / Re: Organize desktop icons and more...
« on: September 14, 2009, 03:27 AM »
is it just me or does the latest fences app not allow you to drag icons into fences anymore? People have been complaining about it and it is disappointing.

But I must say fences is the app I have been thinking of all these years. The only thing missing now is auto-sorting and tagging by default (i.e. i don't want to bloody configure all the rules! Maybe some people do, but generally intelligent defaults is the way to go.)


38
Living Room / Re: Super Mario AI Competition
« on: September 11, 2009, 01:34 AM »
did you see the youtube video about it? it's awesome. Posting some of those links here would drive more interest. I looked through their site but had a hard time understanding most of it and since I haven done that kind of programming in a while I gave up on it. I think for those starting from scratch the time commitment would be huge.

39
General Software Discussion / Re: Timeline Software
« on: August 21, 2009, 01:52 AM »
ampa, once you've chosen something let me know. I have been on a quest to do this as well, but never been satisfied. I used dandelife.com once but meh. It's a matter of laziness.

The objective i had with such a project was to give a summary of ones life and emotional state to a new person, to clarify the formation of core beliefs and behaviors.
Anyway so far I've just used paper and pencil for it. :P

What would also work would be to go through your memories and add photos/blog post/comment in a blog software and then use one of those MIT's exhibit/timeline tools to create a summary from those. This would require some programming and such, but it would work.

Regardless let me know when you have chose something. I don't know why but a particular class of users are interested in this application and there haven't been many providers.

40
Living Room / Re: Betamax (a VoIP company) — a large-scale fraud?
« on: August 06, 2009, 01:17 AM »
I have used VoipCheap FreeCall, VoipDiscount all from these betamaxx dudes.
I (and several friends) lost accounts on VoipCheap & VoipDiscount. Lost credits ranging from $10 - $50 per account. Further cannot create new accounts with those either! For some unknown reason. Same error code i  think 33.

Anway but we've been using FreeCall for a while, with auto-top up and no problems so far. We are using an VOIP Gateway device (Grandstream something) to integrate it with our PABX and use the phone to direct dial. Works great :)

I am keeping my fingers crossed to hope that it keeps working. I have never been able to contact customer support either. I've always suspected it's a scam as well, considering they have so many clones... and why? What's the need for all these clones? see
http://en.wikipedia....x_%28VoIP_company%29

41
that's interesting. How fast is it compared to the desktop search programs we have? I have heard that the indexing system by ms slows downs things a lot!
Care to share the GUI for your search app? do you just specifiy an IP address and use the logged in users credentials? or is that not necessary for accessing the index?

how about integration with the intranet?
just idle questions.

42
Living Room / Re: 1st Person Shooter Disease
« on: July 27, 2009, 07:23 AM »
That was hilarious!! I guess this must be to make developers take note that it's lame to add such gimmicks :P

43
i had another thought that might work.
Grab list of file & folder names, and put it in text file with created/modified dates.
zip the text file. output file

on destination take output file, extract text file, create files according to text file.

This would result in a smaller file ultimately and be quicker as there are fewer disk I/O.

Actually this could be done with one utility that dumps directory structure to file, and can recreate directory structure from file. the zipping part could be manual, this way we could easily use text/excel programs to generate a desired file structure as well. I'm sure unix has a tool to do this, where you can redirect a text file to the mkdir command or something.
The problem i see with this approach is how to handle created/modified times. I guess you could output a tab delimited file.

I guess this is a tangent and just ideas. The current implementation will have a wider compatibility since it uses a standard zip file.


44
I have done some more modifications to suit my purpose, which was to rename the files to include the folder path it had.
i.e.
root
 a
   1
 b
   1
   2
would become
root
a-1
b-1
b-2

here's the code for it
FlattenWithFolderNames.ahk
fileselectfolder,MyFold,::{20d04fe0-3aea-1069-a2d8-08002b30309d}
SetWorkingDir, %MyFold%
loop, *.*,0,1
{
parentpath := RegExReplace(A_LoopFileDir,"\\","-")
;StringReplace, parentpath, A_LoopFileDir, \,-,All
newname = %parentpath%-%A_LoopFileName%
;msgbox %newname%
If a_loopfiledir <>
filemove, %a_loopfilefullpath%,%newname%
}

loop, %myfold%\*.*,2,1
fileremovedir, %a_loopfilefullpath%,1

exitapp

45
Akx, you are right. I didn't realize it! Thanks for the script! I didn't have python installed, (doing it now), so i didn't have a quick way of trying it. I guess that means an exe would be welcome as well :P.

skwire, you should upload your webpage so that we can quickly see your apps. and regarding the speed, it is not slow, it's just that some of those nifty utilities have spoiled us with their speed, what with their scans of terabytes of data in seconds. :P

I did a test, 56 seconds for 18,736 files

same test for the script. it failed, doesn't support unicode. :(
J:\Share\Programs\@Network\eToolz\Language\English.lng
Traceback (most recent call last):
  File "makeTreeZip.py", line 43, in <module>
    mtime=time.localtime(os.stat(f).st_mtime)
WindowsError: [Error 123] The filename, directory name, or volume label syntax i
s incorrect: 'J:\\Share\\Programs\\@Network\\eToolz\\Language\\Fran?ais.bmp'

46
SkWire that's perfect!  :up: :up: And exactly what i had in mind! Pure genius! I tried it out and works. And you guys did this in less than 24 hours! Sending some credits your way.

And you are right, I needed the 0 byte files not just the folders.

Some further thoughts. The test zip file i created has 18,375 files and weighs in at 3.27 MB. That must mean that the filenames storage takes up that much space. And that zips don't optimize that part? or something else?

Scanning for files was slower than everything/locate, i don't know how they do it, but they can scan filenames super fast. just a thought, to see if it could be sped up. Since you don't actually need to touch the file, and just need the information from the MFT.

The date/time is not preserved for filenames. This was not an original requirement but when i think about it, it's better to have that information preserved  (not required though). If it will make the program slower then it should not be there (or maybe as an optional thing).

Can you share your ideas on how you did it? You used IZarc to compress, did you just use flags for the command line , or dump the filename list and then create the zip?

Fabulous work!

47
Is there a way to recreate file/folder structure from source to target but without any content?
better yet, is it possible to zip it up?

I think this will be better understood with an example.

Say if i have a source drive D: with the following

D:\test.txt (size 100 MB)
D:\a\b.ini (size 1 MB)
D:\z\y\x\c.pdf (size 1 GB)

After the zip/copy operation i want this on the target E: drive (can be another computer)

E:\test.txt (size 0 bytes)
E:\a\b.ini (size 0 bytes)
E:\z\y\x\c.pdf (size 0 bytes)

...

I was thinking that xxcopy or robocopy or some other copy utility or zip utility might have this feature but for the life of me i can't find it.

This is useful in recreating directory and file structures on which you can run various tests for finding files ...etc. and it would be easy to transfer over the internet without the size implications.
I have to do this for about 50000+ files
I've used Cathy, Locate, Everything, and i know those things are wicked fast, and they have the information i need, but then how to create a routine/plugin to create those files?

I know there is a manual way to do it, something like dump all filenames to a text file, zip it up, and then extract it, and send it through a program that will create a file for each line. But then this requires the program to exist on one end, whereas if it were a zip it would work wherever.

Sigh, i'm over thinking this. But any ideas will be appreciated.


48
read free image manager - https://www.donation...ex.php?topic=17543.0
read the shootout review
read photo workflow reviews
read tons of other stuff
read http://photo-organizing-s...review.toptenreviews.com/ (is this legit? or promo?)

still can't find one with face recognition for photos...

does anyone know when this will be available? or of any software that supports it...?

I want something that will be easy for the whole family to use, and on their laptops! That means it has to have a portable database scheme...

I'm thinking the best after all this is a website (hosted at home), that can act like flickr, for each family member! Anyone know of a good solution for that?

Sigh, I am so worried of approaching my photo collection to try and tag and organize it, coz I've already been burnt once, where I lost all the tagged info (from iMatch, then Adobe Elements)...

It's frustrating, we haven't managed to find a good multi-user family friendly image management software yet.

Let's see from the top of my head I remember that for image management these are free & non free contenders
(Commercial)
adobe lightroom
adobe photoshop elements
imatch
idimager
acdsee
(Freeware)
picasa
pictomio
itag
Stuidioline
(website Freeware)
Gallery2
coppermine
(website cloud)
facebook
flickr

Some mentions of Vista Photo gallery, and the home server variants for photos..

I need help!

Currently system is "Dated folders + event name\camera file name"

maybe i'm thinking all wrong...

The primary reason i need tags is to find people in my photos!
especially family members...
that too to make presentations on special occasions.

i feel so bummed out whenever i think of this monumental task, it's been on my todo for 4 years now! and still nothing has evolved to make it trivial to do this.

this seems like a incoherent rambling train going towards the edge of a cliff


ok ok... summarizing for myself
features like websites (flickr,facebook ...etc.)
 - i.e. individually managed collections
 - private areas
 - backup of photos
 - search for individuals photos (if tagged)

features like apps
 - portable data(base),
 - quick scrolling through thousands of pictures
 - copy photos

http://en.wikipedia....nagement_application
has a good write up

maybe i should go bang my head there...

49
Post New Requests Here / Re: IDEA: Allign desktop icons to right
« on: March 09, 2009, 05:01 AM »
new one works well for me...
it can capture new icons as well...

Stardock fences...

Try it

50
Actually I just saw the email and realized that it was that way. The question is though, to contribute to your March Fundraiser, I have to donate to the site, right?
I noticed, that after the newsletter went out, the donations skyrocketed! :) Are you going to make a nifty graph after this is done to show the time and donation? :P

/EDIT: Never mind I just donated to the site.

Pages: prev1 [2] 3 4 5 6next