topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Monday March 18, 2024, 9:15 pm
  • 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 - Codebyte [ switch to compact view ]

Pages: [1] 2 3 4 5 6next
1
#include <hello_world.h>

Link to Page: http://codebyter.com/2010/10/30/php-street-validation-commercial-or-residential/

I have been working on a PHP script to supply the answer to whether an address is classified as “residential” or “commercial.” Originally, I started designing scripts around UPS’s validation services. That’s where I went wrong.

UPS offers two types of address validation web services (both XML-based). The first is an Address Validation (AV) tool, which allows you to use their web service to determine whether or not an address is valid by supplying city, state, and zip. To my knowledge, the AV web service only works for U.S. addresses. The second service is XAV, street level address validation, which allows you to query their servers for address validations, given the address supplied exists within New York or California. Thats great and all, but what about the rest of the country?

To prevent some poor individual from going through the same headaches as I went through, and for the general purpose of building my code collection, I have uploaded the UPS address validation script for you to check out along with the FedEx street level address validation script.

Needless to say, after spending further time researching, I have concluded that FedEx currently has the best street validation web service. FedEx’s version of address validation provides the following features:

    * Provides street-level matches
    * Contains a growing database of company listings to improve your results (not all companies are currently
      listed)
    * Receives monthly updates to its address database
    * Checks addresses within the U.S., Puerto Rico, and Canada.
    * Distinguishes between business and residential addresses in the U.S. if an exact match is found
    * Is Coding Accuracy Support System (CASS)-certified (a service and rating system for mailers that measures and helps to improve address accuracy)
    * Checks up to 100 addresses in one Web Service request

Enough said.

I just wanted to repost my thoughts about this and share some code with the world. Maybe it will save you some frustrations. If you found this helpful, all I ask is that you leave me a comment on my site :) Enjoy!

2
Today, I stumbled across this rare gem. It's a website called Kodingen. They support free web hosting for web developers. They offer support for PHP and everything. You sign up, create your account and BAM. instant FTP access from web based stuff AND your desktop ftp client... It's sick. I might consider switching my web service to them for hosting once I feel better about centralizing my ftp credentials and checking to see how they do things, etc. Check it out:

http://kodingen.com/

Make sure you watch the screen cast. It's amazing.

I modified the title for a more eye-catching note in hopes of inspiring conversation about this amazing service.

3
N.A.N.Y. 2011 / NANY 2011 Withdrawn: ProtoCards
« on: October 01, 2010, 03:51 PM »
Mouser, myself and possibly a few others will be pledging for this year's NANY event. We will be writing a generic browser-based board/card game table system. We will be releasing more details concerning this project in the coming days/weeks. We plan to release our project for NANY and then ask YOU for as much feedback and participation as possible to help us prepare it for entering in this years 1st Ever Mozilla Gaming Labs Competition. The competition is located here: http://gaming.mozillalabs.com in case you have not had the chance to check it out.

Stay tuned for more updates!

Relevant Links:
https://www.donation...ex.php?topic=21494.0
http://www.codebyter.com - I'll be blogging here about my experiences with the project if you want to stay up to date.
https://www.donation...ex.php?topic=24147.0 - Post by Lashiec for Mozilla Labs Gaming

4
Developer's Corner / Re: What path to take for learning Web Development?
« on: September 20, 2010, 08:43 AM »
Honestly, I would try your best to pickup XHTML and CSS first. Since you are visually talented, this should be a pretty simple task with a little code mixed in. When you understand XHTML and CSS and how they work together, you should be able to pickup JS (Javascript) pretty easily. My love for Javascript has grown fond over the past year. The combination of the three (XHTML, CSS, and JS) can be some pretty insane web apps.

After you feel pretty good with those 3, you can experiment with a little PHP to make things work server-side, ie. - storing data, handling data, validating logins, etc.

Just a fair warning - Web Development can be ADDICTING.

If at any point you need help with anything, always feel free to send me a PM.

5
housetier, you should check out "easing". This will help you do alot of things with calculating progress. I use this in my animator library for js. Here is the link for the easing stuff:

http://robertpenner.com/easing/

and here is how I use it:

http://concepts.code...com/js/cb_animator2/

calculating easing is a really cool concept and there are a ton of things you can do with it. You can specify your own effects etc.

6
Mouser,

To answer your original question concerning the much debated "iframe or direct content injection" topic, let me first begin by explaining my own personal experiences.

While at work, I use a total of 3 methods for content injection and asychronous javascript and xml (ajax) calls. The three methods include:
1. Getting a script by creating a new dom element and injecting it somewhere to the page  which forces the clients browser to go get the data. I use this method the most to call php scripts that handle content and echo out javascript. It's ideal for dealing with data clientside (nothing important like passwords etc) but still being able to use server side code because php has access to mysql which can cache your data among other endless possibilities.
2. the traditional ajax methods - creating a new httprequest. i rarely ever use this method anymore.
3. using a combo of YQL (Yahoo Query Language) and #1. - i use this approach the most to scrape data from any web page i need. Yahoo actually caches the results for you which result in faster data returns.

Now you'll notice that none of my methods include iframes. My personal opinion concerning iframes is that they are deprecated. Tons and tons of headaches are created by using methods that include iframes. When traversing the DOM, iframes create more work than necessary. On another note... Iframes are absolutely required when uploading files without reloading a clients browser.

It all depends on your objective... Let me propose an example:

You have a personalized dashboard system for when a customer/user logs in. They have the ability of customizing what "widgets" they want. One customer in particular specifies he wants te latest tweets to display in a beautifully skinned widget box that you've created. the only problem is that you need to get his tweets.

in this example, i would create a few javascript functions to execute when the page is rendering that show a loading bar, use method #1 to create a script element that calls a php file i created to check the last time this users tweets were grabbed. if less than 1 hr ago, i would use mysql to grab the cached tweets and eliminate the extra server connection to twitter (which is overloaded constantly and could result in a timeout or hang.) if the users tweets were grabbed more than 1 hr ago, php can use cURL to grab the new tweets from the server and echo out an object response using JSON so that you can populate the widget with the data the user needs in an easily accsssible manner.

Anyways, let me know if you have questions. I'm uncomfortable typing from my iPhone and can provide more help at a better hour tomorrow ;)

7
hrm, not quite as a popular thread as I assumed. only been a day though. anybody have any comments, questions, sarcasm :) lol

8
great questions!

I think CHM/PDF support would be great for this plugin! It would def. add more flexibility to the plugin. However, adding too much flexibility might stray from the point of the plugin. I think that using an existing indexer might be too much extra fluff for stuff we don't really need, resulting in slower indexing and slower processing?. It might be easier on the developer though. opinions?

9
FARR Plugins and Aliases / [IDEA] FARR Plugin: FARRDevelopersBible
« on: April 27, 2010, 09:28 AM »
Project Name: FARRDevelopersBible
Project Codename: FARRDB

Project Description:
FARRDB will allow developers to enable FARR with an offline developers "bible" that contains descriptions of functions for each language. This allows FARR to quickly search the developers "bible" using a syntax like "fdb php explode". After typing this expression, FARR will search its dev. bible for php functions, find explode, and return a beautiful description of how to use the explode() function, its parameters, a few examples of explode()'s common usage, etc. (Note: explode() is just an example.) When a user types the expression and then hits enter after viewing its usage, FARR adds an example to the clipboard so we can paste it into place and modify as needed.

Reasoning:
I cannot begin to tell you how annoying it is to waste a browser tab to php.net or some other web source. This plugin would be ideal for developers of any age or experience as we all forget syntax every now and then, especially when switching languages on the go (javascript and php are very close.) I was looking for something like this on DC and found FARRWebMetaSearch. While FARRWebMetaSearch is a great idea, the purpose of this plugin is to use an offline version to eliminate the requirement of internet access. Syntax doesnt change, internet access does.

Parts:
This plugin is a HUGE project as it contains several parts: the FARR plugin that handles searching and reading the individual developer "bibles," the actual developer "bibles" themselves and the example usages for functions.

This plugin would be EXTREMELY popular in my honest opinion. It will add alot more functionality to FARR (as if FARR doesn't already have enough functionality - thanks mouser :))

Note: It's probably a good idea to let this post age into maturity before developing this plugin. The reason I am posting this idea and not coding it is due to the fact that I am extremely busy with my web development and side projects as it is, I wouldnt be able to take on another project for awhile.

Please post your ideas for this plugin so we can formulate, as a community, what would be the best way to approach the project, what features to add, and who would be up for coding it :)

Updates:
- [Change] Made FARRWebMetaSearch a link in 'Reasoning.'

10
Developer's Corner / PHP GD Library
« on: February 18, 2010, 01:15 PM »
So question for all you PHP coders out there... I've been writing a class to deal with image manipulations, such as adding watermarks to images etc... Is there anyway to speed up the image load process? I understand this is a very generic question, but i'm hoping it sparks the conversation im looking for :) Thanks for your time!

11
Developer's Corner / Re: C++ Help
« on: February 12, 2010, 08:53 PM »
nevermind... after doing some research I figured out that gameguard blocks the API calls and filters what is returned... this would make sense as to why its returning 0 for a color call...

12
Developer's Corner / C++ Help
« on: February 12, 2010, 08:30 PM »
Alright so here it goes... I've been experimenting with creating macros based on pixel color changes... I'm not understanding why GetPixel() is returning 0 constantly when I have the target game open... I can see the cursor coordinates, but not the color value... What am I doing wrong? I need to find the color of the pixel underneath the cursor while in a full screen game window.

Here is my example I wrote in a couple minutes to output coordinates and color:

Code: C [Select]
  1. //------------------------------------------------------------------------------
  2. #include <windows.h>
  3. #include <iostream>
  4. //------------------------------------------------------------------------------
  5. using namespace std;
  6. //------------------------------------------------------------------------------
  7. int main(void)
  8. {
  9.         HWND wowHandle = FindWindow(NULL, "World of Warcraft");
  10.         if(!wowHandle)
  11.         {
  12.                 cout << "WoW is not open atm..." << endl;
  13.                 system("pause");
  14.                 return 0;
  15.         }
  16.         else
  17.         {
  18.                 cout << "WoW is OPEN..." << endl;
  19.                 ShowWindow(wowHandle, SW_SHOWNORMAL);
  20.                 SetForegroundWindow(wowHandle);
  21.                
  22.                 while(1)
  23.                 {
  24.                         POINT cursorPoint;
  25.                         GetCursorPos(&cursorPoint);
  26.                         COLORREF color = GetPixel(GetDC(wowHandle), cursorPoint.x, cursorPoint.y);
  27.                         system("cls");
  28.                         cout << "(" << cursorPoint.x << ", " << cursorPoint.y << ")" << endl;
  29.                         cout << "COLOR: " << color;
  30.                 }      
  31.         }
  32.        
  33. }
  34. //------------------------------------------------------------------------------

it's probably sloppy... don't hate on the 5 minute "im at work and in a hurry on my break" coding...

13
wow very nice ham! great work as usual :)

14
Post New Requests Here / Re: Making a tree organization folders
« on: February 28, 2009, 12:03 AM »
Hello Contro :)

I made this program awhile back. Let me know if you want any options added to it... I hope it helps...

http://www.codebyter...software/filesorter/

15
N.A.N.Y. 2009 / Re: NANY Developer Interviews
« on: February 19, 2009, 12:12 AM »
Very cool :) Thanks for taking the time to set this up :)

16
Living Room / Re: My 5000 posts commemorative DC mug
« on: February 18, 2009, 10:42 PM »
f0dder: nice mugs. We share the same laptop :) I love my Gateway P-7811FX :)

17
Tonight a highly subjective question was proposed concerning "What Beautiful Code should be." There are a lot of important questions and while I understand this might be a very debatable topic, let's take some time to talk about this... Why? you might ask. Well, because it's important... Take a look at some of the following points made by our very own mouser, Gothi[c] and Deozaan:

1. It is better to have 20 lines of understandable clear simple code than 4 lines of complexity. - Mouser
2. The real question is does it make any non-negligable difference when it's all compiled down to bytecode anyway? If so, it probably needs to be evaluated for each programming language. - Deozaan
3. If it uses more memory, so what? Premature optimization is the root of all evil. Lets not optimize that until a problem is created by being too organized, which is near impossible. - CodeByter
4. Would you rather have a program use 100k extra memory or have the same program crash more often because its code is hard to understand? - mouser
5. If the program needs to read millions of pieces of data, then 1ms of delay can add up. - Deozaan
6. There's a balance between clear code and complex code with less lines. Just clarity at the cost of crazy insane slowdown would be silly. - Gothi[c]
7. Even when code is slower, you have to ask yourself, is it happening in a place that matters. There are very very few cases where it is better to have ugly short code than longer clearer code. - Mouser
8. We shouldn't strive to write longer code but rather to write code that is easy to understand. - Mouser
9. The goal should be: efficient easy to understand, short if possible, code. - Gothi[c]

In this discussion, Mouser mentions a list that I post on my site. Take a look at the list here: http://www.codebyter...9/02/beautiful-code/

Now, you are completely briefed and ready to go. Post some thoughts you have concerning this highly debatable topic and keep in mind that no one is against you :)

18
N.A.N.Y. 2009 / Re: NANY 2009 Release: WishList Maker
« on: February 17, 2009, 08:44 AM »
Thank you very much gexecuter :) I'm very happy for you and your site! It seems that it's taking more and more to even be noticed in society today, lol!

19
Take it from me, don't play this game. It is a waste of your time... I can speak from experience and I hope you will heed my advice... It steals your life; it becomes an obsession that will inevitably steal your time whether you think you can control it or not. Please, trust me... I just got over the addiction and I won't go back for anything... I've played this game longer than most people... I played since BETA of the original WoW and quit this past christmas... That's a few years of my precious time that I wish I could re-live... Nevertheless, I am over it; I no longer come home and logon the game. I dont think about it. I dont WANT it. I wont have anything to do with it. I can concentrate on life and enjoy the things that I never thought I'd lost until I realized they were already gone...

Quitting has made me a better person and I hope you can see i'm credible enough for advice in this situation...

20
N.A.N.Y. 2009 / Re: Post your NANY 2009 Mug/Shirt Pics here..
« on: February 04, 2009, 11:36 PM »
omg......

21
N.A.N.Y. 2009 / Re: Post your NANY 2009 Mug/Shirt Pics here..
« on: February 04, 2009, 10:11 PM »
Jealous?

22
N.A.N.Y. 2009 / Re: Post your NANY 2009 Mug/Shirt Pics here..
« on: February 04, 2009, 08:26 PM »
HAHAHAHAHA!!! So much love!!

23
N.A.N.Y. 2009 / Re: Post your NANY 2009 Mug/Shirt Pics here..
« on: February 03, 2009, 05:22 PM »
HAHA! I didnt mean to include the iphone, but i was kind of posting it up there in a hurry to get back to work :) Thnx scan, I agree with u :)

Edit: Bold for scancode

24
N.A.N.Y. 2009 / Re: Post your NANY 2009 Mug/Shirt Pics here..
« on: February 03, 2009, 05:10 PM »
Haha... take it for what you will... I hate pictures! Here is my shirt!!!

codebyter.jpg

25
I see what you're trying to accomplish although im not sure this way is the most efficient... Does this thread do anything for you: https://www.donation...ex.php?topic=16467.0 ? If not, let me know...

Pages: [1] 2 3 4 5 6next