Autocomplete in Codeigniter 2.1.0 and Eclipse pdt

I have recently started working with Codeigniter for a few side projects and to help me stay up to date with php. I am using eclipse pdt as my ide. In order to get auto complete to work it is quite simple. (Note, these steps are the exact same for Aptana. Just adding a user library…)

Download the 2.1.0 files to an easy to find location as you will be referencing it for multiple projects. Modify /system/core/controller.php and /system/core/model.php with the code changes listed below In your actual Codeigniter project, add a new user library (/preferences) and point it to the 2.1.0 files and folders

Now you should have auto complete for all your CI methods!

Code Changes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

//Put this code right before: class CI_Model { ...
/**
  * @var CI_Config
  */
 var $config;
 /**
  * @var CI_DB_active_record
  */
 var $db;
 /**
  * @var CI_Email
  */
 var $email;
 /**
  * @var CI_Form_validation
  */
 var $form_validation;
 /**
  * @var CI_Input
  */
 var $input;
 /**
  * @var CI_Loader
  */
 var $load;
 /**
  * @var CI_Router
  */
 var $router;
 /**
  * @var CI_Session
  */
 var $session;
 /**
  * @var CI_Table
  */
 var $table;
 /**
  * @var CI_Unit_test
  */
 var $unit;
 /**
  * @var CI_URI
  */
 var $uri;
 /**
  * @var CI_Pagination
  */
 var $pagination;

(The code is from this post here)

My Sponsored Child – Samson

[ http://www.youtube.com/embed/eg_huPYC3A0 ]

While still working at World Vision USA a few members of my team had the opportunity to go over and meet my sponsored child. It was such a cool feeling to watch video footage of my team members interacting with him and his family. I hope I can make it over there some day and meet him personally.

My WordPress site was hacked, how can I recover?

My blog went largely unused in the past few months which in turn caused me to be lazy about applying updates. (A big no no in the WordPress world.) Then a few weeks ago I got a wild hair to start writing again. Upon logging in I was greeted with this fun message:

wordpress hacked

It turns out that not only was my site hacked but a few others I have on the same server were as well.

Here are the steps that I completed to go about and fix it. (NB: I had installed a plugin which had been emailing me daily backups of my data which really saved my skin in this case. I highly recommend it.)

Identify infected files. Have a look at the tool that Cory provides over on his blog that I used to figure out when the date of the hack occurred.  (My hack involved someone uploading a dodgy plugin called: ‘tool‘ which allowed them to create administrative users in my install.) Remove the infected files. Change your website’s FTP username/password Change your mysql username and password (you will also need to update the wp-config.php file) Login to PHPMyAdmin and create a full database backup Choose a backup that was from before you were hacked.* (NB: “Although just because execution happened a certain time, doesn’t mean infection did”) As I had not written anything in 3 months, I simply choose a backup that was a few days after my last post. (The infection manifested itself on the 9th of Dec) In the SQL field in PHPMyAdmin, run the sql statement. (NB: This will delete and then restore EVERYTHING, if it goes south, make sure you completed Step 5) After it has finished, go to your WordPress dashboard. If you had upgraded WordPress before the hack (as I had), WordPress is smart enough to inform you it needs to upgrade the db. Change your WordPress admin username and password. (I recommend creating a new admin user and deleting the old one. You can assign all your posts to the new user…) Check the user list to see if there is anyone else listed as an admin. That’s it, you should be all good to go!
* Unless you were keeping daily backups, you may not be able to do this step
Now that you have done this, you should do a few things to help prevent this in the future or if it does happen at least make restoring easier.
Prevention:
Make sure your passwords are STRONG passwords. Don’t user ‘admin’ as the name for your admin user.
Recovery:
Make sure you have the wordpress backup plugin installed. (This post describes exactly what I have done with Gmail filters) Schedule daily/weekly wordpress site backups (post on this forthcoming)

 

Does the page fold matter?

I know this topic has been discussed ad nauseum but sometimes I still get questions on it so I wanted to put this post together that I can refer people to.

One of my favourite articles on the subject which has a lot of good information:

Debunking the Myth of the Page Fold in Web Design

A few highlights from the article:

Although it might run against your aesthetics as a designer, clipped text and cut off images are also high on the list of things that encourage scrolling.

Have a small amount of content just visible, poking up above the fold to encourage scrolling.

(the page fold is) … a term leftover from newspapers where the primarily headlines are above the fold, so those walking by a newsstand would see the important stuff even though the paper was folded in half.

The article I linked to above has a report about usability studies and the effect of ‘the page fold’:

The myth of the page fold evidence from user testing

One of the Key Takeaways:

Over the last 6 years we’ve watched over 800 user testing sessions between us and on only 3 occasions have we seen the page fold as a barrier to users getting to the content they want.

Other Articles on the subject:

Eastbay – the solution to outrageous shoe prices in Australia

Melbourne retailers have been complaining of slumping sales in the industry but that is probably because of the outrageous pricing of items here. (This post focuses on shoes but most clothing, apparel etc is too expensive…)

The internet is the great equalizer… You cant expect people to pay $200-250 for a pair of shoes that can be purchased online for less than half the cost. (yes shipping is $30 but you are still saving a lot of $$$)

So retailers, lower your prices. In the meantime, myself and friends will order our gear from Eastbay[image]

Apologies for the off topic post but just wanted to get this out there.

Remove WorkSpaces from Flash (Flex) Builder 4.5

Flash Builder’s list of workspaces can get unwieldy after a few months of use. In order to delete them you need to modify the .settings file and remove the ones you dont want from the RECENT_WORKSPACES variable. The .settings file location changes based on your OS:

Windows XP:

C:\Documents and Settings\username\Adobe Flash Builder 4.5\cascaded\308971\configuration\.settings

OSX: (FB4)

 [install-dir]/configuration/.settings/org.eclipse.ui.ide.prefs 

OSX 4.5:

… preference page under Flash Builder > Preferences > General > Startup and Shutdown > Workspaces

Thanks to Hasan Otuome for the OSX locations.

Twitter ScreenNameMonitor (like TweetClaims)

A LONG time ago I was browsing the tweetclaims site and thought it would make a good Flex/Twitter learning project. This has been sitting in my unfinished projects list and I finally got around to completing it. Basically it takes a list of usernames that you are looking to register and scans to see if they are available. If they are not, it estimates their availability based on the latest status update, when they registered etc…

[image]

40HourFamine – Latest Project

I wanted to brag on the team I get to work with for a minute. We just launched the 40 Hour Famine Site and it was a beast of an effort. I had a few small parts including my first crack at character animation in flash (sign up and watch it), the photo upload functionality, and various other pieces. The real work was done by the rest of the squad uploading content, creating amazing designs, and enabling a lot of behind the scenes functionality. Looking forward to creating more great work like this.

At least watch the video (Meet the Strike) on the homepage…

AS3 Typewriter Text Effect

I had a need to use a typewriter text effect to populate text in a textfield. This was easily solved with two lines of code using the Greensock SplitTextfield class.

import com.greensock.TweenMax;
import com.greensock.text.SplitTextField;
import com.greensock.easing.*;
var stf:SplitTextField = new SplitTextField(text_tf);
TweenMax.allFrom(stf.textFields, .01, {alpha:0}, .1);

You can still see the text fading in somewhat but I feel that it works well enough for my use.

Moving to Melbourne

It is official, I have accepted the role as Flash Developer for World Vision Australia and will be moving to Melbourne in the first week of January!!! I am very excited for this new role, the challenges/opportunities that it represents, and the chance to get to work with a team of really talented people that I have heard so much about.

It is fun to look back at my (almost) 5 years at World Vision US and some of the projects I had the opportunity to be a part of:

Being told by our Information Architect that I should investigate ‘this Atlassian wiki software thing’, championing its usage from only myself & a small group of people, into an enterprise wide application that many groups depend on. Our first foray into web services, championing them to various groups in the organization to show how powerful they could be. (Now they are working on even more services to build other cool stuff!) The battles with Lotus Notes Programming (LotusScript, FormulaLanguage) in my early years; working my way out of that to be a part of one of the coolest new teams at the Vision, creating awesome stuff with Flash. Getting introduced to agile project management and programming… seeing how much more effective that is than what we had been doing. (Including what I was taught in college! Can I have my money back!?) ;)

This wont be my first time in Melbourne as I had the chance to visit in 2004 when I was taking some time off after college to travel around the world. I fell in love with the city as soon as I arrived. The culture, the tastes, and the laid back vibe that permeated the place was exactly what I was hoping to find when I went to Australia. I remember thinking/feeling that when I left, I wasnt really leaving and would get to come back some day. I am so excited that I get to come back and work for an organization who’s vision and mission I strongly believe in.

 

Get more about PDF recovery

Switch to our mobile site


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser