helper

VLC helper protocol on Mac OS X

Hey everybody, I am trying to add a vlc:// helper protocol on Mac OS X. To register the protocol, I have unsuccessfully been playing around with the MoreInternet PrefPane. What I want to have in my browser is a vlc://someressource.com/audio.mp3, which should launch VLC and add http://someressource.com/audio.mp3 to the playlist (this wo...

Android and SQLite using the SQLiteOpenHelper

I have a SQLite database, and several tables within that datbase. I am developing a DBAdapter for each table within the database. (reference Reto Meier's Professional Android 2 Application Development, Listing 7.1). I am using the adb shell to interface with the database from the command line and see that the database is being populated...

Rails helper, show word not date.

Hi Everyone, A follow on from this questions: http://stackoverflow.com/questions/3032598/rails-created-at-on-display-if-today Is it possible to output the word TODAY rather than the date when using the following helper? def created_today k k.created_at if k.created_at.to_date == Date.today end <%=h created_today(k) %> Thanks,...

Register view_helper zf 1.10.3

I create my view helper it located in /library/My/View/helpers/SpecialPurpose.php the class name is My_View_Helper_SpecialPurpose it have public function specialPurpose() it return some HTML i register this path in bootstrap.php $view = Zend_Layout::getMvcInstance()->getView(); $view->addBasePath('/my/view/helpers',"My_View_Helper"); ...

AJAX pagination in Zend Framework

How do you display AJAX paginated data using Zend_Framework? Are there any good examples using paginationControl(), ajaxLink() and ajaxContext() helpers? Would you share your implementation? ...

Fluent NHibernate - good complete working Helper class for managing SessionFactory/Session?

I was going through nHibernate Helper Class question on SO... I would like to get a helper class for fluent nHibernate... can anyone provide/refer a proper OO type helper class for managing a singleton of the SessionFactory and then also for managing Sessions? ...

HAML select helper not ordering options correctly

Hello all, I'm trying to get some forms out, but I'm having trouble, in that HAML is not ordering the options in my select elements properly. Here is my echo statement: =select 'user', @empty_data, {"Less than $40k" => 1, "$40k - $70k" => 2, "$70k - $100k" => 3, "$100k+" => 4, "No Thanks" => 5 } However, when the HTML gets rendered,...

Finding Controls of the Same Type

Does anybody have a good way of finding ALL the controls within an object that is of the same type? Here's my scenario, I have a tab control and within each tab control exists a user control (ALL of which match the same base type e.g. MyBaseClassControl). I want to be able to find that user control WITHOUT having to use the control.Fin...

resusable function in codeigniter

Almost in all function in most of my controller i have to see to same things. i.e 1.Check if logged in. 2.Check the privilege. I know how to do it. But what is the best way, so that i don't have to re-write the same code everywhere? Is it to make a helper or something? I'm a bit new to codeigniter, all i know is basic php! ...

cakePHP Tree helper By Andy Dawson incorrect ?

Tree helper By Andy Dawson http://bakery.cakephp.org/articles/view/tree-helper-1 //---acl_aros_controller $aros = $this->AclAro->find('threaded'); $this->set('aros',$aros); //--- View echo $tree->generate($aros, array('alias'=>'alias')); RESULT ----------------------------------------------------- Root ----|Members ...

c# helper class file stays on shared server even after I delete it, how do I refresh?

Using asp.net mvc2 on vs2008 on local machine and hosting on a shared server at discountasp.net Problem started when I could not make the .UTCNow deliver the correct "Office is open/closed" string as follows: In the view user control: <div><%=OfficeTimes.LondonOpenOfficeMessage() %></div> And in the helper file: public static class...

Advanced Rails Recipes - (4) Toggle Attributes with Ajax

I have implemented David Heinemeier Hansson's article in "Advanced Rails Recipes" called Toggling Attributes with AJAX. I have a question about implementing this fantastic recipe in a more general setting. Hansson's tutorial works when toggling only one type of attribute in one view because the spinner image is named: 'spinner-#{object....

Zend Framework Action Helper Problem

Hi, I'm a relative noob when it comes to Zend Framework, however I've got a form that I need to use if a couple of views so I thought I might use a Action Helper to instantiate the form set a few attributes and pass it to the relevant view. I've created the Action Helper and can call it from within the relevant controller's action, howe...

code helper for c programming

Are there any plugins for visual studio (any version) or any other ide that can show you the standard library function prototypes and their (examples) , return etc for the standard c library... much like the java code helper found in eclipse if I am not mistaken (I am not a java developer but I think I saw something similar to what I des...

Ent.LIbrary Data Helper for reduce code lines

any helper class for reduce code lines using ent Library ?? for example, I have this code, can I use reduce lines using any helper class ?? Any sample please Database db = DatabaseFactory.CreateDatabase("ConnectionStrings.Oracle.D04PES01"); using (DbCommand cm = db.GetStoredProcCommand("TBL_POC_TEST_TIPOS.TBL_POC_TEST_...

Zend View Helper strange issue

Hello everyone, I have been working on a zend framework project on localhost (OS: Snow Leopard) and when I uploaded the files on the hosting server (shared hosting) I got some errors about a view helper i was using there. More specifically: The project structure is like this: ( i ommited some irrelevant subfolders and the numbers in th...

Rails: Manually change order of choices in select() helper?

I've got the following select() form helper method: select("treatment", "frequency_unit", { "hour" => "hour", "day" => "day", "week" => "week", "month" => "month", "year" => "year" }) The helper is organizing the choices seemingly randomly...I'd like it to maintain the order of the choices as I have them listed above. How can I make ...

In rspec, why can't I use be_false etc in helper classes?

When using a helper class with an rspec test, I can't see to use the .should be_false idiom. It's okay in a function defined in a helper .rb file, but when it's within a class the be_false symbol is not found. Example below -- why doesn't this work? How can I use be_false et al in a helper? It seems possible that it's intentional tha...

Organizing c# project helper classes

Whats are some best practices for where you should have helper classes in a .NET project? Referring to classes separate from business layer stuff, but presentation and app stuff like appsetting config managers and other code that would sometimes be module specific or sometimes be used throughout the app. ...

How to pass form field params to CakePHP Ajax Helper functions

I've done some jQuery functions in a CakePHP project but finally I decided to try the Ajax Helper . Unfortunately I don't get the idea of how to pass a parameter (form field value) to the AJAX function. I did the following: $obtainProduct = $ajax->remoteFunction( array( 'url' => array( 'controller' => 'products', 'acti...