Archive for the ‘Samples’ Category

JavaScript Calculator

Sunday, November 9th, 2008

So I made this online calculator that lets you type in commands and equations

http://www.sapethemape.com/calc.html

I based it off of a Mac Widget Calculate I had that was AWESOME! Windows Sidebar Gagdet Calculatorium is also very good.  What I liked was it had history and it was more of a command line calculator than a typical button presser.  Instead of pressing buttons, you could enter mathmatical expressions and it would solve it.

For mine, you can hit up and down arrows to scroll through your input history, exape clears it, and if you hit + - * / it automatically enters answer (the previous answer); next I need to resize it… But I want to port it to AIR.  Except ActionScript doesn’t have an EVAL function. Javascript does.  Eval basically does all the work, parses the expression for me. There is a ? for help, just lists the JS Math function available.  A friend just pointed out 1^4 = 5, so I need to add parsing for that.

Then I want to make it for my G1.  I tested this version, but the keycodes for + - * / are different on the mobile keyboard because it wouldn’t automatically add ‘answer’.  If you want to help, you can add errors to the comments here.  Just view source for source code. Yes, you can steal it. But its prolly not worth stealing =P.

KatanaPG Bug Fix / Update

Thursday, June 12th, 2008

I noticed that the max upload allowed was really 100KB and not 100MB, so I fixed the calculations and also added an address location in the browser. Hopefully the next update will have some basic photo editing features, like cropping, brightness, contrast. Maybe even add a feature that will email the link to the group. I will have to get with Nick, but it would also be cool to upload directly to a group and do some more managing in the air app, like moving pictures from group to group, etc.

Here is the new version: katanapg-v101-beta.air.zip

KatanPG Uploader Beta 1

Thursday, May 8th, 2008

I made a lot of updates to the KatanaPG picture up-loader. I added a little browser to view your Katana Inbox (where the picture are uploaded to). I could not get the authentication to stay outside of the AIR program; meaning, the AIR browser keeps you logged in or you can use your normal browser and have to login again. The browser will automatically pop up once your upload finishes or after you login and you click on the “username Inbox” button.

I also added a directory tree for those directories that are filled with subdirectories of pictures. Basically the list will display the thumbs of the pictures and the tree to the left are the sub directories that may contain more pictures (or no pictures). Double clicking on a directory in the tree will update the picture list. The max file upload is 100MB and it won’t let you upload more than that.

Download: katanapgair-v1beta.zip

KatanaPG AIR Pic Uploader

Wednesday, April 30th, 2008

I made a simple AIR app to upload pictures to my buddy’s online photo gallery, Katana Photo Groups.  The AIR app is very basic (first workign version released); but it does in fact work.  So this is what you do:

  1. Select directory to upload pictures from. OR
  2. Drag and Drop files onto app.
  3. Slecect the pictures you would like to upload.
  4. Login to KatanaPG.
  5. Click upload to upload pictures.
The above order clearly isn’t set in stone, but it gives you a basic idea of how the application works.

After that your pictures will be uploaded into your Inbox. You will need to already have a KatanaPG account for this to work.

It uses FZip (Actionscript zipping library) to compress the images into a zip and then uploads the zip to Katana.  I hope to had some basic images editing, drag and drop support, and it also needs some optimization.

Here is the package: katanapgair.zip

You will need Adobe AIR to run this.

UPDATE:

Added drag and drop from the PC and also fixed some memory issues.

Magic Deck Builder Updates

Friday, April 25th, 2008

I added some updates to the Magic Deck Builder.

  • Double click on a card to see a detailed view of the card.
  • Keyword search, so if you want to search for “slivers” type it in and only slivers will show.
  • Added mana images and the ability to sort cards by mana amount in the Library Grid.
  • Can save decks (only for the current session) and double click on decks to simulate the different ones.
Still need to develop the database and get all those card images in there…

Magic The Gathering Deck Builder (v.1alpha)

Thursday, April 10th, 2008

The guys at work and I like to play Magic The Gathering. After a while, we started to want an easier way to make and organize our decks. Most use spreadsheets, others nothing and hope the deck works out. Some how, after “Evil Jar” stayed up till 3:32 AM looking for “Deck Builders,” he wanted to make one. Me, being bored and looking for something to do, decided to try and make on Flex. I decided not to deal with the database yet, just creating the interface; and since everyone else is dumping that on him, I conned “H” into being the DB guy.

So the Magic Deck Builder is up and running. Just for playing around and so “Rat Bastard” can tell me how he likes it! (There is also a link to the right under “Apps.”)

Active Directory Password Expiration Email Notifier in C#

Thursday, April 3rd, 2008

At work we have our passwords expire every 90 days, but some people are off-site and do not get the friendly Windows log-on reminders that your password is expiring in, say, 14 days. So my boss thought, “Hey, it would be cool if AD could send out a email to everyone saying their password will expire! Sam, make one!”

So after googling around, I found some posts at CodeProject and some other places I can’t remember, and made a little Windows console app that reads in an XML file for the settings (AD server, email, etc) and sends an email to those whose passwords are expiring in the given number of days. And here is the C# Studio Express Solution…

adpassexpnotifier.zip