views

iPhone4.0: pushing a navigationController over a TabbarController

Problem: after pushing the UINavigationController to the tabBarController nothing changes. I have a tabbar based app, and it contains a button, that should open up a navigation based page to show images when touched by the user. The code snippet that I used and modified from stackoverflow does not seem to work. Could please someone take...

Websites and Database Views

What are the security implications of websites accessing database views instead of using stored procedures? The views in question are only being read from; not written to. Edit The applications in question are ASP.Net MVC 2 using the Entity Framework (v.4). ...

Loading data in Views depending on MapKit annotation callout click

I have a map with a disclosure button on the callout of it's annotations, which when clicked displays a detail view. Each point on the map needs to load up different data in the detail view - I dont want to build separate views for each annotation, for obvious reasons, but I am unsure of the best way to do this. How do I flag which ann...

Create list of nodes that are referenced at least once

I'm sure this is simple with the Node Relationship module but I can't wrap my head around it. I have a list called 'Comedian Profile' which has a node reference field for it. You then make - you guess it - profiles for comedians. To make an 'Events' (that doubles as an Ubercart item) you select the comedian. It then creates a view in th...

How to expose the distinct filter in views

Hello there, i was wondering if there by any chance is possible to implement an exposed filter in views that either sets the SELECT DISCTINCT() on or off. Does anyone know if that is possible? ...

Django: POST form requires CSRF? GET doesn't?

Are forms that use the POST method required to have CSRF protection? I'm following a book and the code examples throw 403 errors. I did some searching and it seems as if I need to enable CSRF in all my forms. My questions are: Does Django now require that all POST forms be protected from CSRF? All I need to do to accomplish this is...

link to a controller function from the view

I have a function to take ownership of a job which updates the database to update the username in a table row. I want to link to this function from the view and then redirect to the appropriate page. How do you link to a controller function or a model function from the view? from the index i want to have another link beside show, edit...

Setting up Drupal node reference autosuggest to search on two separate fields

The simple versoin of my question: I need a CCK Node reference field to search on two different fields in a node. What's the best way to do this? Some Background I run a calendar for a physical therapy program. Each lecture has a reading list. Readings are their own content type and the lecture has a autosuggest node reference field th...

Can you have 2 views with separate exposed filters on 1 page?

I have two views loaded on the front page. Both contain exposed filters which when modified, display different content (done using the Better Exposed Filters module). When modifying one view the URL will be http:example.com/?cid[]=1 and the changes will take effect. When modifying the other view the URL will be http:example.com/?type[]...

Is using views for everything a crazy idea?

I'm working on building a MySQL database and I'm thinking that rather than encode a bunch of complex join queries in the front end I'll create a view for any queries I need and then have all the front end code do simple SELECT whatever FROM some_view WHERE something=5; queries. It seems like a great idea as it abstracts away the underl...

Custom drupal ajax forms based on content type cck

Why hello there Stackoverflow, I have a nutcracker for ya, is there an "good" way to create 100% custom forms or rather just textboxes and have the values sent to an url like so: http://site/drupal/formreciever-content-type , post-sending the values of X textboxes with jQuery for example? Without having to do so much backend work, right...

In Zend Framework applications, what purpose does the /views/filters serve ?

I have an idea of what view helpers do (/view/helpers), but I have no idea what a view filter (/view/filters) is, or what its used for, can some one please shed some light on the matter? Thank You =) ...

Android: PreferenceActivity: Why is this 'simple' logic check on a stored preference value not evaluating?

Following an example from Professional Android 2 Application Development I set up a pref class as follows: //Preferences.java public class Preferences extends PreferenceActivity{ public static final String PREF_SPEED_UNIT ="PREF_SPEED_UNIT"; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(sa...

Advice on Rails sanitize() in the view or how secure is my code

I have a partial that contains this sanitize() code: <%= sanitize comment.body, :tags => %w(a b embed i img object p param), :attributes => %w(allowfullscreen allowscriptaccess href name src type value) %> I'd like users to be able to embed videos, links, pictures, use italics, bold, etc. How unsafe is this and if I put this on a liv...

Performance of a view compared to a query (with union statements)

I need to often run a query that aggregates data from different tables, something like select Name, Code, Date From TableA union select Surname, TheCode, TheDate From TableB union [...] -- this stands for some more select statements union select NickName, MyCode, getdate() from tableC (the example is simplicistic, but it is like, this...

Decouple all the exposed filters in Drupal with each other and make each exposed filter as a separate block

I have created a custom content type and using views2 for creating various page-views. I have used a taxonomy (having 4 terms, say "A", "B", "C" and "D") for broader categorization of this content type. There are 4 other taxonomies corresponding to each of the above terms "A", "B", "C" and "D" called "Taxonomy-A", "Taxonomy-B", "Taxonomy...

Drupal: Add Archive to Primary Links as SubNav

My site has news articles that I want to add to the sub-nav under "News" as years. News 2010 2009 But I only want the current year and 1 previous year. And I need it to happen automatically. I know how to create a page view that will only show news articles from the previous year, I just don't know how to change the Menu & Node T...

Transition behavior using transitionFromView and transitionWithView

Hi, I am attempting to create a transition between two subviews (view1 and view2). When a button is pressed I want view1 (front) to flip and show view2 (back). I have tried both transitionFromView and transitionWithView. Each works - but each has a problem. transitionFromView - flips the superview (the whole window view flips, not the...

Custom compound CCK field - How to display individual sub-fields in Views?

In Drupal 6, I have created a simple Pricing CCK compound field module with a "cost" and a "product" sub-field based on this excellent tutorial: http://www.poplarware.com/articles/cck_field_module function usginpricing_field_settings($op, $field) { switch ($op) { case 'database columns': $columns['cost'] = array('type' => 'v...

preloading ad view

i have aplication with a very short lifespan. in most cases a services pops a activity and the user reacts within a few seconds and dismisses the poped activity. In this activity i show a mobclix advertisment. But loading of this takes about 5 seconds, this is to long for my use. So can i preload this ad in the service , and display it...