Home
01101001's Journal [entries|friends|calendar]
01101001

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

Hiya [05 Sep 2008|09:53am]

chicknstu
Does anyone know where I could get a free c++ function which, when called, returns a random character which is weighted for correct letter frequencies for the English Language?
[ 5 thoughts || share your thoughts ]

dark developments [09 May 2008|05:09pm]

tonytraductor

hacking on transprocalc
hacking on transprocalc
I just had to share this shot. my desktop rocks...

[ share your thoughts ]

Circles in KML [11 Apr 2008|02:05am]

zewrestler
I am working on a perl script that takes in data from a CSV file and converts it to KML. I then load the file into google earth for viewing. I am interested in having some sort circular overlay surrounding certain points in the map. My question is what is the KML required to generate a full circle about 300 yards in radius from the point specified in by the longitude and latitude?
[ share your thoughts ]

Tickle Text 1.7 [02 Apr 2008|12:29pm]

tonytraductor
[ mood | amused ]
[ music | pook - six (from Khavi.org) ]


Tickle Text 1.7
Tickle Text 1.7
I re-arranged the Tickle Text menus to make a little more sense. (I had kind of just stuffed things in anywhere). Fixed openfile to open a new window if/onlyif the current window's textfield is occupied. I fixed the closefile option to ask if you want to save first, and to properly reset the filename variable, so one can close one file and open a new one without opening a new window. I made the special characters dialog a virtual keyboard (borrowed from Supernotepad). I moved the "go to line no." to the search (formerly find/replace) dialog, instead of on the main toolbar. So, most of these changes are cosmetic, but not entirely.
There have been numerous other changes recently that I haven't posted here, such as support for LaTeX and conversions to pdf and html, and other groOviness.

[ share your thoughts ]

Tickling Tunes [28 Mar 2008|11:56am]

tonytraductor









TickleTunes
TickleTunes

As if I didn't have enough to, this morning I wrote a tcl/tk front end to mplayer, for playing music (haven't attacked video).
It will play a song, or a dir, or build a list.
I started to work on shuffling the list, but that's proving complicated.
Of course, like other things I've tickled, I made it "skinnable", insofar as the colors are all configurable.
Obviously, this requires mplayer to work.
All I wrote was a front-end gui (as if there aren't enough of those for mplayer already, too).
I'm just experimenting, trying to learn how to do various stuff.
I do want to work on the shuffle function.
I also want it to show the list of songs in a dir when playing them.
At this point, it shows the name of a song being played, the dir being played (but not the contents thereof), or the list being played.
No, it doesn't open an existing .m3u or .pls list, either, nor does it save a list.
I may or may not work on that later, too.
Really, this is not very useful, considering that there are already front ends for mplayer, and, I have more important things to work on, just something I was playing with...
But, in the interests of expanding my tcl skills, I may or may not proceed with this later, at my leisure.




[ share your thoughts ]

VB6 study material recommendations [22 Mar 2008|11:41pm]

imgodsfavorite
I am new to programming and have landed my first programming job working with VB6.  I have a few instructional and reference books. 

My problem is that I need to spend more time just practicing.  Because I am new to programming conceptualizing new projects to practice has been a challenge for me.

I was hoping that someone here can recommend a book or a site that has a lot of practice activities.  I have been searching the internet and have found a lot of books, but it is really hard to tell from a short description if the book will be what I'm looking for.

I've already invested quite a bit of time in research and will continue to do so, but I thought I'd give the easy way a shot and see if anyone here has any recommendations for books containing lots of hands on beginner/intermediate projects.

thanks.
[ 9 thoughts || share your thoughts ]

Still tickling... [16 Mar 2008|10:13am]

tonytraductor
Still tickling...screenshots under here, plus questions about tabs, etc. ) I'm having one other minor issue.
I have embedded the xterm, as you can see, but, now I am noticing that quitting tickletext doesn't kill the xterm.
I end up having to the kill the xterm process by hand.
I wonder if I need to use something like
proc quit {} {
kill xterm
exit
}
Or something to get it to kill the xterm.

I'd like to figure out how to give the user control over the xterm colors, too.
At this point, I have them preconfigured within the script that embeds the terminal in the window.
I'd also like to free xterm from being this specific size, so it will expand with the tickletext window.
Of course, I also still want to add line numbers.
I can't find for the life of me any documentation anywhere on how this is done.
I have several editors written in tcl on my system, and haven't been able to determine how
they're doing it, either.
I do know it can be done, of course.
I'll figure it out.
If I get the line numbers and tabs worked out, I'll be ecstatic.


(groOvy penguinlove icon courtesy Roberta Sulls/ [info]bertasart)
[ share your thoughts ]

tclers [16 Mar 2008|10:34am]

tonytraductor
I have made a journal for tclers (tcl and tcl/tk devs).
[info]ticklers
If you hack tcl, please join.
Thanks.
[ share your thoughts ]

YOU ALL ARE SMART! [11 Mar 2008|05:03am]

arromanches
[ mood | frustrated ]

I'm in desperate need of help. I hope this os alright i posted this here. If not let me know and i'll take it down... So my problem is with a myspace layout.

I got the code to work in my personal, non-band myspace but when I go to put the code into the band bio section it shows up like normal but there is no submit button. So i'm wondering if I left something out of the code, didn't close something.... i just need some help because this is a huge deal.

Note: I tried removing the main image to see if I could find the submit buttom and I did. It was behind the image but I can't click on it.

please...anyone...i'd love you FOREVER )

[ share your thoughts ]

tickled... [11 Mar 2008|01:29am]

tonytraductor
I have re-worked Tickle Text. )
[ 2 thoughts || share your thoughts ]

font configure woes with tcl [09 Mar 2008|05:17pm]

tonytraductor
Like many before me, I am making my own text editor,
using tcl.
Being old, I've decided to add some fluff features, to make it easy on the eyes (other editors I have on my system
don't offer such fluff, and the user must stare at size 10, default font text against a blaring white background).

I have successfully made it
a) change font size
OR
b) change the font family.
BUT, not both.

If I change the font family first,
I get an error when trying to change the size:
font "$fontfamily" doesn't exist"
ie. error font "Arial Black" doesn't exist.

I can change the font, initially, to Arial Black (or any other font currently
installed on my system), but when I then try to change the size, I get the error above.

Now, if I don't change the font (stay with the default)
I can change the size all I want, without error from 6 to 72 (haven't tried larger or smaller).
It is only when I change the font family, first, that I can not change the size.

Also, if I change the size first (with the default font, always successful),
I can change the font family afterwards, but it reverts to the default size (10),
and, of course, as described above, I can not, then, change the size.

Here's what I've done to manipulate these values:

[ttk::combobox .fluff.font -value [lsort [font families]] -state readonly]\
[ttk::combobox .fluff.size -width 4 -value [list 10 12 14 16 18 20 22 24 28 32] -state readonly]

bind .fluff.font <> [list changeFont .txt.txt .fluff.font]
bind .fluff.size <> [list sizeFont .txt.txt .fluff.size]

# this proc successfully changes font family, but always reverts to default size #
proc changeFont {txt combo} {
$txt configure -font [list [$combo get]]
}

# this proc successfully changes font size, but only for default font family. #
proc sizeFont {txt combo} {
set font [$txt cget -font]
font configure $font -size [list [$combo get]]
}


Incidentally, I have successfully changed font color (and bg color), but that's easy, since I
don't actually have to use font configure, but merely
configure the fg color for the text widget.

[ttk::button .fluff.fg -text "Font Color" -command "color foreground"]\
[ttk::button .fluff.bg -text "Background Color" -command "color background"]\

proc color {type} {
global i
set color [tk_chooseColor -initialcolor [.txt.txt cget -$type]]
if {$color != ""} {.txt.txt configure -$type $color}
}

All of the above, of course, only make changes to the display, not to the actual
file in the editor (ie, when saved, font information, color, etc. are not preserved,
so, you won't end up with a py script that is always displayed with a green background
and Arial Black size 14 text.)

Another thing I can't seem to figure out is how to display line numbers.
I know it's possible, because I've seen several other editors, in tcl, that can do so, but, I haven't,
for the life of me, been able to identify the code that is actually displaying the line numbers.
I've googled all over, too, and found nothing of use, besides tk_LineNumberText, which
none of the editors I've seen are using, and which I have also not successfully implemented.
At the moment, I'm focusing on the fluff/visual features.
I'll figure out line numbers, eventually.
When that is done, I will consider the editor quite complete.
I already use it for a lot of work; It is light, quick, and, of course, aesthetically pleasing, but,
it is lacking line numbers, which would be most helpful.
[ 4 thoughts || share your thoughts ]

pizza py [27 Feb 2008|01:31am]

tonytraductor
[ music | soda stereo ]

I wrote my first python script.

I was given an assignment by a new online friend/tutor guy I met right here on LJ,
and he told me to write a program that generates 5 random numbers, with a loop.
And no gui stuff with tcl.tk.

So I made pizza.py

# make a nice pizza py

from random import randint

print "I'm hungry!"
print "Let's make a nice pizza, eh!"

ing = ("pepperoni", "ham", "onions", "sausage", "bacon", "peppers", "spiders", "mozzarella", "anchovies", "chocolate chips", "dog hairs", "toe-nail clippings", "fried clams", "lollipops", "paper clips", "calamari", "m&ms", "broccoli", "gum drops", "green beans")

print "Let's make a pizza with"

for i in range(5):
p = randint(0,19)
print ing[p]

print " "
print "That's a nice pie, eh! "
print "Mangeamos!"

[ 8 thoughts || share your thoughts ]

TickleText [26 Feb 2008|10:12am]

tonytraductor
I wrote my own text editor.
It's light, fast, and groOvy.





TickleText



You can edit a wide variety of text files or scripts, including .txt, .py, .tcl, html, etc., of course, like any other text editor.
I wrote this entire page using Tickle Text!.
TickleText will run in Windows and Mac, but who cares?
Some of it's functions only work in Linux, such as,
TickleText will call xterm, and will print via lpr.
If your eyes get tired of staring at a white background wil working on your files, TickleText has a nice feature:
You can change the backgroung color. Choices include seashell, tomato, orange, yellow, palegreen, lightblue, plum,
and, of course, plain, old white.
TickleText has an external program launcher, so you can launch a browser to check html files you are editing,
or open another terminal, or launch kshisen and take a break...whatever you like.
Oh, and, of course, it's FREE (as in beer and speech).
[ share your thoughts ]

tcl proc issue [15 Feb 2008|03:18pm]

photodharma
Why isn't this process working?

proc toprch {} {
if {[catch {
set ::totproch [expr {$::sv1ch+$::sv2ch+$::sv3ch}]
}]!=0} {
set ::totproch " "
}
}


This one, which is almost identical, works:

proc totpdo {} {
if {[catch {
set ::totpdo [expr {$::pout+$::pout2+$::pout3}]
}]!=0} {
set ::totpdo " "
}
}


The only difference is the variable names.
I 've gone over and over my code and can't figure out why proc toprch
is not working.
The variables $::sv1ch, etc., are all defined, but the process toprch returns
no output.
While, proc totpdo, which is nearly identical, works great.

I'm stumped...

Any and all assistance appreciated.

Thanks.
[ 2 thoughts || share your thoughts ]

TransProCalc [11 Feb 2008|12:04am]

photodharma
Well...I started a little program on Friday, and posted to a few translator forums, and a few
people downloaded it and like it and made suggestions.

And I spent the whole weekend implementing their suggestions.

What's really cool is, I started learning a bit about programming in November.
I started learning Tcl.tk on Thursday, and by Friday I had released a
little program...
And now, on Sunday, I have released a full-fledge, complex, powerful tool.

I'm, like, OCD when it comes to learning stuff...or something...

TransProCalc is a calculation and report generation tool, now, for translators, project managers,
and Agencies, alike.

I generates relevant financial data for translation projects, and outputs that data to
a report that can be edited, printed, etc.

I will be using it to generate data and print reports for book-keeping and tax purposes, myself.
Here's a screenshot:


TransProCalc - Translation Project Calculator

TransProCalc is FREE (gratis & libre) Open Source Software,
and cross-platform, meaning it runs on Linux, Windows and Mac.

Of course, I have developed it, and am using it, on Linguas OS, Linux for Translators,
but I have already heard from a translator in Sweden, and an agency in Italy, who are both already using TransProCalc on Windows, and say it works great.

I haven't heard from any Mac users, yet.

Hacking is like smoking crack...Once you start, you can't stop...
[ share your thoughts ]

newbie [07 Feb 2008|01:46am]

photodharma
I'm new here.
I've been using Linux for 8 years, but am just now learning to hack around a bit.
I'm learning shell scripting, python, java, a little C, but I don't like the C so much,
and today I started learning tcl.tk.

I'm a translator and linguistics agency owner, and, made my own Linux distro for translators,
and decided I'd better learn a thing or two about programming.
I've been writing some scripts and stuff, little tools for the trade.

I wrote this today. )

I've written other tools for various file format conversions and stuff, too, mostly using
bash scripting and using zenity to give them a gui, but, I was beginning to feel
the limitations of bash, and, tcl.tk seemed like the quickest, easiest way for me to learn
to write gui applications, and, heck, it's cross platform, right?
I've written a few little math game things for my daughter, too.
Will the above program run on Mac or Windows?
AFAIK, it should, but I don't have a Mac or WindowsPC to test it on.
Works great on Linguas OS (PCLinuxOS derivative for translators).
[ 1 thought || share your thoughts ]

Ask about Nokia 3220 [08 Oct 2007|12:37pm]

krolanioi

Hello everyone!
I'm new in this community and I joined because I am looking for code in visual basic 6.0 that allows me to control the movil phone Nokia 3220.
See, I need to make an app that can turn on or off the movil by code.
I installed the DKU 5. I can see the references for Nokia's dll in visual basic, but I have no idea how to use them.

I found this code that came as a sample code in the DKU 3, but can't find the sample code for DKU5... but this also works.

Option Explicit
Private WithEvents PhoneInfo As PhoneInfo4
Private PhoneInfoItem As IPhoneInfoItem
Private lngEventCounter As Long

Private Sub Form_Load()
On Error GoTo errorHandler
Set PhoneInfo = New PhoneInfo4
chkEnabled.Value = vbChecked 'Causes Click event
MsgBox PhoneInfo.GetClockTime
Exit Sub
errorHandler:
MsgBox Err.Description
End Sub


Questions are: Does anyone have any information about this issue? Thanks a lot in advance. :D

I have lots of code to share, hope I can also help in this comm!!
[ share your thoughts ]

Help with C# 2005 and Microsoft Word [21 Sep 2007|02:02pm]

celeste_spartan
[ music | Seasons ]

Ok.. I'm new here but I'm about to embark on a huge undertaking (for me.)
I work with my dad on writing commercial appraisals. He has a bunch of templates made in word that his typist has, and he writes up what he needs to, and then drops them off at his typist, who then types up the information. It is then shipped back to me, and I go and throw in all the photos and exhibits to finish up the report. Needless to say, this is very inefficient and time consuming (of course this would all be moot if my dad would just learn how to f***ing type, but that boat sailed away a LONG time ago.) I want to write a program that will generate text based on user input, but also needs to work along with some static text that does NOT change. Also, these reports average in size of 40-60 pages, so I'm not sure what to do about generating text for it, whether I can just merge a bunch of different text into one file, or if I need to create one BIG file each time and then reference numerous modules or files of this static text. Can anyone give me any advice with this or refer me to any tutorials or text about this subject? I tried to do this within VBA but after 6 hours of getting nowhere I turned to VS.Net integration (I figured if it could be done in Powerbuilder, imagine what VS could do with such things.) Anyways if anyone knows of ways to help out assist with this, I can post various questions and inquiries as they come up.
-Dave

[ 3 thoughts || share your thoughts ]

help with writing excel program? [12 Sep 2007|05:39am]

youthgonewild23
Hello everyone. I am currently taking a Digital Circuits class and am required to write a program in MS Excel for a project. What I am required to do is write a program (using excel, of course) that converts a 16-bit binary number into decimal and hexadecimal. This program needs to be set up so when someone enters a 16-digit binary number, it will automatically convert this number into decimal and hexadecimal. I can't use any of the available excel functions. I have very, very little experience using Excel and all I know how to do is type numbers into the different columns. That's it. I also have NO prior experience in computer programming. None at all.

Does anyone know of any good resources online that can help me with writing an Excel program? Maybe, would anyone know what code to use for this binary-decimal and binary-hexadecimal conversion process? If anyone has any suggestions, tips, hints, tricks, or information that could assist me, I'd really appreciate it. I'm not looking for someone to do the project for me. I'm just looking for an experienced excel user that has written programs using this software or similar software, that could give me some advice.

Thank you very much.
[ 4 thoughts || share your thoughts ]

[25 May 2007|04:52pm]

lordsaibat
Why does the second test not work?
ignore the space in the <>. it was the only way to get the code to show.

?php
session_start();

$number = $_POST['verify'];
$test = md5($number);

if ($test == $_SESSION['image_random_value']){


$name=$_POST['name'];
$number=$_POST['number'];
$email="email@email.com";
$reply_email =$_POST['email'];
$headers="Reply-to: <$email>\r\n";
$subject="Appointment";
$body[0]="$name would like an appointment on \n";
$body[1]=" $date \n";
$body[2]="They can be contacted at $number";
$body[3]="Their email is $reply_email";
$body=$body[0].$body[1].$body[2].$body[3];

if (strpos($reply_email, '@') !== FALSE && strlen($reply_email) > 6){
mail($email,$subject,$body,$headers);
echo "Email has been sent";
}
else {
echo "< html>";
echo "< head>";
echo "< meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>";
echo "< /head>";

echo "";
echo "< form method='post' action='email2.php'>";
echo "< p>Name:";
echo "< input name='name' type='text' id='name' />";
echo "< /p>";
echo "< p>Number:";
echo "< input name='number' type='text' id='number' maxlength='12' />";
echo "< /p>";
echo "< p>email:";
echo "< input name='email' type='text' id='email' maxlength='150' /> Input a correct email ";
echo "< /p>";
echo "< p>";
echo "Date and time your would like the appointment.";
echo "< input name='date' type='text' id='date' />";
echo "< /p>";
echo "< p>Verify your human:";
echo "< input name='verify' type='text' id='verify' maxlength='5' /> ";
echo "< /p>";
echo "< p>";
echo "< input type='submit' name='Submit' value='Email' />";
echo "< /p>";
echo "< /form>";
echo "< /body>";
echo "< /html>";
}

}

if ($test != $_SESSION['image_random_value']){
echo "< html>";
echo "< head>";
echo "< meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>";
echo "< /head>";

echo "< body>";
echo "< form method='post' action='email2.php'>";
echo "< p>Name:";
echo "< input name='name' type='text' id='name' />";
echo "< /p>";
echo "< p>Number:";
echo "< input name='number' type='text' id='number' maxlength='12' />";
echo "< /p>";
echo "< p>email:";
echo "< input name='email' type='text' id='email' maxlength='150' />;
echo "< /p>";
echo "< p>";
echo "Date and time your would like the appointment.";
echo "< input name='date' type='text' id='date' />";
echo "< /p>";
echo "< p>Verify your human:";
echo "< input name='verify' type='text' id='verify' maxlength='5' /> Incorrect number " ;
echo "< /p>";
echo "< p>";
echo "< input type='submit' name='Submit' value='Email' />";
echo "< /p>";
echo "< /form>";
echo "< /body>";
echo "< /html>";
}

?
[ 2 thoughts || share your thoughts ]

navigation
[ viewing | most recent entries ]
[ go | earlier ]