Journaling on estrip is free and easy. get started today

Last Visit 2026-06-08 12:37:45 |Start Date 2003-07-07 03:39:31 |Comments 5,617 |Entries 6,443 |Images 14,761 |Sounds 121 |SWF 21 |Videos 322 |Mobl 2,935 |Theme |

Category: programming

10/11/08 02:38 - ID#46055

Surebert Flash Player 10 Uploads Fixed

Well, after working like 24 hours staright, I have upgraded surebert toolkit a bunch and released a flash player 10 compliant javascript accessible multi file upload way ahead of everyone else . I have to hurry an intergrate it into all my projects before people start moving en massse to flash player ten and no one can upload multifiles anymore.

I am much happier with the new version and I learned a lot. Like how much MXML application suck for tiny things. The smallest I could get it as an MXML application was about 150k which is so freakin lame considering it is just a bttton. I didn't even think to look at the size until I was done and I was so pissed. There was no way I was going to add a 150k button to pages.

So I scapped where I was at and build one form scratch as and Actionscript 3 project in Flex and used the flash drawing API to draw the button states etc. Its nice with an actionscript project you can really get the project size so tiny. I ended up managing to get it all under 10K which is a lot more reasonable. You can style everything bou tthe button from javascript and all the event handlers are the same as the old surebert multifile uploader ones so implementation should be easy. I commented the javascript API but no so much the flex code. The Javascript is here and assumes you are using the surebert toolkit although you could adapt it to run on anything else. Anyways, the flex code is here if you are interested

image
print add/read comments

Permalink: Surebert_Flash_Player_10_Uploads_Fixed.html
Words: 295


Category: programming

10/07/08 10:37 - ID#45984

Adobe and Safari I hate you tonight

Spent a lot of today working with one of my new co-workers James. He seems like a fun guy. Apparently, he read my journal. I suggested he start one of his own. If you are reading this, start one.

On another note, I can't believe I am still at work. I am trying to finish this video uploading site for a contest they are hosting. Unfortunately, the magic that is my surebert multi file unloader is about to die as Flash Player 10 changed the way you can call the FileReference browse method and calling it from javascript is no longer an option. They want it to have a flash interface. Adobe says it makes it safer, I say it just makes it flashier and makes me mad.

I plan on creating a new multi file uploader widget based on my previous work but I won't have time tonight and they needed a solution now. I decided to just use traditional file uploads seeing as they are only uploading one file.

Cool enough, but sadly you don't get the progress which is really the fun part of the surebert uploader. Luckily, there is a php extension that allows you not only track how much of the file has been uploaded but how long it expects to take, the current speed, etc. Its really so easy and you can quickly get the data back via json. You add an extra random ID attribute to your form and it uses that as a key to track the file upload. Then you can make requests back to the server to get updates on the time remaining, etc. You make the requests via ajax which is really simple and great.

Sadly, after testing in IE6 and firefox and everything working, I tested it in Safari which refuses to receive ajax responses after it has initiated a file upload. I send them, it just won't process any responses. I hate you safari. Seriously, its always you that has to make everything fucked up.

Anyways, so I re-factored and ended up going with an iframe solution as safari was happy with that and so were the other browsers. Its cool to get an estimated finish time.

image
image
print add/read comments

Permalink: Adobe_and_Safari_I_hate_you_tonight.html
Words: 386


Category: programming

09/01/08 12:35 - ID#45530

Flash Debug Player

I have been doing a lot of flash/javascript interface development and am using the flash debug player for development. It is funny what type of messgaes that other sites send to the debug console.

At somepoint today I found this in the logs


1
NO YOU SUCK! DON'T TAKE THE LORD'S NAME IN VAIN
Stop All Animation
Stop All Animation



I also found that javascript was sending my location was being sent a bunch.

var tf_partner_attributes={122: ['','',''],107: ['','','']};
var tf_zip = '14263';
var tf_city = 'Buffalo';
var tf_state = 'NY';
var tf_pub_attributes = ['#F78200',false,1,true,false,true,2,5,true,'1.0em' ];
var tf_on_fly_flag=0;
tf_show_fly_ads(tf_ads);

print add/read comments

Permalink: Flash_Debug_Player.html
Words: 126


Category: programming

07/13/08 02:05 - ID#44995

Mobile posting from blackberry email

I think mobl posting via email should work with blackberry now too.
I would have rather gone dancing at HEMF on grand island but seeing
a nobody got back to me I just programmed some more, lame.

image
print add/read comments

Permalink: Mobile_posting_from_blackberry_email.html
Words: 42


Category: programming

07/12/08 06:27 - ID#44958

Should have been sleeping

now I get three hours of sleep as I stated up all night making the
iPhone able to post pictures so (e:jim) and I could blog from dancing
today. Which I will be too tired to to, LOL. I am such a loser.
image
print addComment

Permalink: Should_have_been_sleeping.html
Words: 48


Category: programming

07/04/08 03:33 - ID#44862

Learning Iphone

I started programming my first iphone app that lets you take a pic and send it to your journal. So far I got the take a pic or select from your library and send it to the site. I am able to capture on the site and save the photo. The next step is like some sort of loading feedback and adding username password protection.

The real issue is then I can't just post it on the site for everyone to use once it's done. You are going to need some sort of itunes acct and get it from apple "if" they approve my app. Its all really annoying. Maybe I will just get sick of it and quit, lol.

Seems really lame to me that you can't just distribute your own apps to your own audience.
print addComment

Permalink: Learning_Iphone.html
Words: 137


Category: programming

12/04/07 10:13 - ID#42391

Does this seem like advanced Java, lol?

Still sitting in java class. I swear this is as procedural as it gets. I followed the instructions exactly.

package lab_04c;

/**
 *
 * @author visco
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       
        System.out.println("Student Score Grade");
         
        int[] scores = {76,91,80,55,71,98,70,88,69,60};
        String[] names = {
            "Suzie Q",
            "Peggy Forsnacht",
            "Boy George",
            "Flea",
            "Captain Hook",
            "Nelson Mandela",
            "he Might Thor",
            "Oedipa Maas",
            "Uncle Sam",
            "The Tick"};

        String[] grades = new String[scores.length];
        System.out.println("Name	Grade	Score");

        for(int x=0;x<scores.length;x++){
            
            int score = scores[x];
            String grade = "";
            
            if(score < 60){
                grade = "F";
            } else if (score < 70){
                grade = "D";
            } else if (score < 80){
                grade = "C";
            } else if (score < 90){
                grade = "B";
            } else {
                grade = "A";
            }
            grades[x] = grade;
            
            System.out.println(names[x]+"	"+score+"	"+grade);
            
        }
        
        String[] possibleGrades = {"A", "B", "C", "D", "F"};
        int[] frequency = {0,0,0,0,0};
        double total=0;
        
        Student: for(int student=0;student<scores.length;student++){
           Grades: for(int g=0;g<possibleGrades.length;g++){
               if(grades[student] == possibleGrades[g]){
                   frequency[g]++;
               }
           }
           
           total += scores[student];
        }
        
        System.out.println("
Statistics:");
       
        for(int g=0;g<possibleGrades.length;g++){
            System.out.println("Total "+possibleGrades[g]+"s: "+frequency[g]);
        } 

        System.out.println("
The mean score was : "+(total/scores.length));
    }

}

print add/read comments

Permalink: Does_this_seem_like_advanced_Java_lol_.html
Words: 203


Category: programming

10/23/07 05:30 - ID#41765

Sometime computer commands are scary

chown -R viscop aids



Thats it. I was updating a site about AIDS for work and the content is still so old. I hope they update it soon. I feel like people with a NYS grant for an AIDS website should be on top of it, argh. The current site is this one

I think am thinking the information should be organized more like this (that is just the test version) but the problem is the content is so out of date. Seems like anything dated 1998 about AIDS must be outdated, right - I mean that is ten years ago - or has nothing progressed?

In 1998, the Department of Health announced the results of a study which found that partial Zidovudine (ZDV) prophylactic regimens begun during delivery or within 48 hours after birth may have substantial benefit in reducing the risk of perinatal HIV transmission (NEJM 1998;339:1409-1414). HIV infected mothers who began ZDV prophylaxis therapy during labor and delivery had almost the same reduced rate of HIV transmission (5.3%) as HIV infected mothers who began prophylaxis during the prenatal period (5.0%). HIV exposed newborns whose mothers had never taken ZDV, but began therapy in the first 48 hours of life, experienced significantly reduced HIV transmission (9.5%) as compared to infants whose therapy was initiated after 48 hours of life (25%) and infants receiving no therapy (31.6%).



It was so hard to come up with a design for AIDS. I kept going black and red and it was hard to not make it depressing.
print add/read comments

Permalink: Sometime_computer_commands_are_scary.html
Words: 254


Category: programming

07/18/07 05:18 - ID#40156

Surebert 3.1 is here!

I significantly improved the codebase in this last release of surebert adding some fixes for safari now that I have a mac, in addition to a CSS selector compliant updated sb.$, an extended sb.element, a few new array prototypes emulating javascript 1.8 and more. See the changelog

image
print addComment

Permalink: Surebert_3_1_is_here_.html
Words: 57


Category: programming

07/06/07 09:37 - ID#39974

Programming for the iphone

This is crazy. I revamped the old email based posting system because (e:jim) and (e:jenks) 's iphones cannot do file uploads in mobile safari. This just blows my mind, it reminds me of my sidekick 1. I used to have the email posting system expressly for that phone. Why no file upload? They could easily just spoof it and allow you to only upload from your photo gallery instead of browsing the file system.

So anyways it gets worse. Not only can you only email photos via email. You can email only one photo per email. Basically, this translated to one picture per mobile entry from the iphone. And to make it even more ridiculous every attachment is named photo.jpg so that when they arrive the new ones were replacing the old ones.

I ended up writing a script that would take the file name and add part of the title after talking with (e:jim) about it. But as he pointed out, although I was able to script around it - what about all the grandmothers saving pictures of there grandkids all named photo.jpg. They will end up just replacing all the old photos.

Who the fucks decision was this. I think they should be fired.
print add/read comments

Permalink: Programming_for_the_iphone.html
Words: 210


Search

Chatter

New Site Wide Comments

joe said to joe
I am so happy it's opening again..Downtown needs something attracting people the whole week
....

ExBuffalonian said to joe
We’re a few months into the “new” year already, and I was thinking it has been a little better than ...

ExBuffalonian said to joe
Quite nice of them to let you in with the wrong tickets. I’m super excited the theater will be openi...

joe said to joe
Never send a man to do a grandma's job...