Coder Profile - Show off your skills, get a coder profile.
 
 
 
User Name VBAssassin
Unique Hits 5,029
Real Name Scott Thompson
Location United Kingdom
Lincolnshire
Occupation Web Technologist & Director
Gender Male
Age 21 Years Old
WebSite coderprofile.com/
Post A Profile Comment
Some Random Friends
  view more
elbekko
Ben
synchris
Syn Chris
STN
 
Recently Added Articles
  view more
[PHP] - Lets kill the complex IF
Programming
Hi ya guys, Have you ever nested that many if conditions that your code starts to get quite complicated? Let's give you an example Just some simple data checks on the $_POST['name'] value. But I'm not happy with that code. For something so simply, why is the code so complex? Let's use a technique with functions to make this much simpler. Then explain how it works in regards to simplifying it. [code language='php']function get_name() { //make sure it's set if (isset($_POST['name']) == false) { return 'Error Occured'; View In Full
6 Comments 7.00 out of 10
How to use Memcache on Windows
Web Development
I will quickly run you through an example of HOW to use memcache and how it works. Download Memcache http://jehiah.cz/projects/memcached-win32/ And load up the .exe - you should just get a blank command box appear - the server is then running on localhost:11211 Install the Memcache extensions in to PHP If you use something like xamp or easyphp - just enable the memcache exentions (just a case of maybe uncommenting a line or ticking a box like in easyphp). Code Example Put that code in a .php page (remember to have the memcache server running). Now simply run the script and it will save my name in memory for 60 seconds! To retrieve the value from memory now put this in the script (within 60 seconds else it will expire from memory). And you will see that my name is still there! It's quite simple really. You use add() to add new values to memory where they are View In Full
3 Comments 8.00 out of 10
PHP Sessions = Member Database Cache
Web Development
Let�s go over what a session is. Sessions First you call session_start() which gives you a unique ID such as: dde2ds2g67xs2zxjh89s3j8923 Everything you then save to $_SESSION is saved in a file on the server such as: $_SESSION['message'] = 'hello'; Would be saved to: tmp/phpsess_dde2ds2g67xs2zxjh89s3j8923 and next time you call session_start(), $_SESSION['message'] will still exist and will have 'hello' in it! Database Problem So, you record a members total page hits on your site, and the last time they made a page hit on your site. You keep these stats up to date like this (which is executed on EVERY page hit by the member): $time = time(); mysql_query("UPDATE `members` SET `timestamp_last_seen` = '{$time}', `hits` = `hits` + 1 WHERE `member` = 'VBAssassin' LIMIT 1;"); Now, all you�re doing is keeping track of the last time they were seen, and the total page hits they have made while logged in. Solution You need to keep track of your active sessions u... View In Full
2 Comments 8.00 out of 10
Recently Added Source Codes
  view more
Compare Ratings, and Return Similar Tastes
Language Posted Comments
PHP (Hypertext Preprocessor) 21 Days Ago 2
Rating Downloadable Plain Text
- - - - - - 4,894 Chrs
Lets say you have 5 books... and 5 people rate each of those books. Now you want to find out who's interests, based on each users 5 ratings, are similar to who? That's what this algorithm calculate
Settings Class
Language Posted Comments
PHP (Hypertext Preprocessor) 43 Days Ago 0
Rating Downloadable Plain Text
- - - Yes 1,459 Chrs
Lets you easily deal with "settings" for an application based on key=value
Dynamic Parameters (Using Reflection)
Language Posted Comments
PHP (Hypertext Preprocessor) 152 Days Ago 7
Rating Downloadable Plain Text
7.75 - - - 2,468 Chrs
Allows for you to call a method of a class with the parameters in no particular order! Example: function print($string, $size = 12, $color = 'red); If you want to skip size, but you want to chan
Profile Comments
  
Please login to post comments.
 
CyberGeek     Posted 48 Days Ago
 
 
Not a problemo.
 
CyberGeek     Posted 48 Days Ago
 
 
So ya, I was being an idiot and posted a comment that was meant for your profile on
mine. So, here it is:

Ya. Understandable. I was told my numerous doctors and specialists back 4 or 5
years
ago, that I have severe carpel and I was told I was suppose to go and get surgery.
However, talking with other people who have had it - they had told me it helps for
a
while, but then it fails. Also, another thing is the fact that I make a living
coding, and I was told that I would not be able to use a computer in the fact of
typing for at least 6 months. First thought was, HELL NO! And actually, that is
still
my thought today.

If you do have problems with your wrists, what I had found was that if I woke up
mornings and it happened a lot where each morning my wrists would get worse and
hurt
with extreme pain, etc. as soon as I woke up, wearing a wrist brace when sleeping
helped in the mornings along with the next day of sitting of typing. Just make sure
that the wrist brace if you do end up trying it is a solid brace not an only fabric
one, but one with a piece of solid plastic.
 
CyberGeek     Posted 48 Days Ago
 
 
Interesting new features. I look forward to their implementations in the future.
 
CyberGeek     Posted 48 Days Ago
 
 
Ah, well the one thing I would like to see is just a new topic/post flag on the forum
and topics button. Other then that, I am really impressed.
 
CyberGeek     Posted 49 Days Ago
 
 
Hey Mate,

Great work with the community. I had registered ages ago, but was into the whole
community thing way back when. However, I am and will be contributing various
articles and various libraries.

@watermarks: They can be found at:
http://vantagewebstudios.com/content/public/connect/index.php. The two images used on
the left in the content block areas. :)
1. http://vantagewebstudios.com/images/graphics/maintenance.png
2. http://vantagewebstudios.com/images/graphics/security.png

I did not notice anymore though. Thought I would just let you know.
 
CyberGeek     Posted 49 Days Ago
 
 
Hey,

Great work!

After reading your "About Me" section, it has stated that you are
directory of Vantage Businesses with a trading names of Vantage Web Studios and
Vantage Windows. I assume http://www.vantagewebstudios.com is the web studios
website. If so, I love the iStockPhotos :) ( ... looking at the watermark. )
 
Craige     Posted 57 Days Ago
 
 
Haha. Because I'm a retard, I wrote in my own profile first :p. I'm used to
FB wall-to-wall's. Is something like that coming in V2?
------


I've known some for a long time, such as Singleton, Factory, Registry, etc. I
just bought the Design Patterns book a couple weeks ago though. I'd be done it
already if I had the time.

Anyway, design patterns are very useful. When you learn them, you're just
learning industry wide solutions to common problems. The solutions have been proven
which means if you use them for their intended purpose, they'll do exactly
what
they are meant to.
 
java     Posted 62 Days Ago
 
 
Hey thanks for the help here is /etc/hosts:

[code]
127.0.0.1 localhost
127.0.1.1 sam-desktop
sam-linux sam-linux sam-linux



# The following lines are desirable forsam
IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
[code]

/etc/hostname is blank with nothing in it. (Which could be where I went wrong?)

Thanks for your help ;)

S

P.S. I think I'll take the DNS stuff to the forum :)
 
java     Posted 63 Days Ago
 
 
Hi thanks for your replying tip.

You must be pretty advanced then - and you've been doing it only 3 months.
Nice :)

My other ubuntu computer runs as an apache webserver but I have no clue of how to
get it linked into a domain - rather than typing in the unmemorable ip I want a
domain to like redirect.

Aaah yes I have a small linux problem that I hope you can answer. On this comp I
tried setting up a web server and followed a weird tutorial that told me to edit the
hosts file located at: /etc/hosts

I somehow managed to make it so theres no host. E.g. at the startup up screen it
used to say //sam-linux but now its just a //

and whenever I run sudo commands before it executes it it says: "Unable to
resolve host".

How would I edit this to make it right again?

Its a small thing but I guess its getting on my nerves.

Thanks,

S
 
n00bCoder     Posted 76 Days Ago
 
 
Hey VB! To be honest, I'm not really sure where it came from. I was just sick of
seeing the same old little symbol for not having an avatar. So I just found that one
on the internet lol.
Page of 22 :: Next Page >>
Scott Thompson (21)
United Kingdom, Lincolnshire
VBAssassin has 28 fans
become a fan
� Applications
Articles Articles (14)
Source Codes Source Codes (59)
� About Me
About Me About Me
User Groups User Groups (9)
Portfolio Portfolio (8)
Friends Friends (176)
� Misc
Overview Overview
Send A Friend Invite
Send Message Send A Message
RSS Whole Profile Feed
 
 
Latest News About Coder Profile
Coder Profile Poll
Do you contribute to Open Source projects?

Yes, love it
Yes, sometimes, when i can be bothered
No, but i would if i could find a good project
No, i'm not skilled enough
No, just not interested


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
159 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright � 2007 - 2009, Scott Thompson, All Rights Reserved