views

What does it mean to add a hyphen to the closing tag of a ruby loop <% -%>

I'm a noob at this and can't figure out why the hyphen gets added to something like this: <% if flash[:notice] -%> <%= flash[:notice] %> <% end -%> Not even sure if my jargon in the title of this question is accurate. ...

django how get session in models

django how get session in models or how get session out views ...

How can i check sql server 'views' dependencies

Is there a way that i can find out what base tables are being used by views using a custom query or stored procedure? ...

Drupal - Lightbox -> iframe node displaying entire website with views

I am attempting to make a view that would list thumbnails of my projects, then when clicking them enlarge the photo using lightbox and list out some text and a link to the website. I am not sure if there is a way I can just add text to the lightbox using views so right now I have it using a field for Lightbox2 iframe: thumb200wh->node p...

How do you pass or share variables between django views?

Hi, I'm kind of lost as to how to do this: I have some chained select boxes, with one select box per view. Each choice should be saved so that a query is built up. At the end, the query should be run. But how do you share state in django? I can pass from view to template, but not template to view and not view to view. Or I'm truly ...

What is the use case of the generic ViewMasterPage<T>?

In ASP.NET MVC there are generic master views (ViewMaserPage<T>). But what is the purpose of them? As I see it, generic argument of master view and "slave" view must be equal and this constraints me to using the same model for all my views. ...

Issue Displaying/Hiding Views (Obj-C iPhone Programming)

All right all, So I've got a UITableView that is inited in applicationDidFinishLaunching like so: [self showForumList]; Said method does this: -(void)showForumList { ForumList *fl = [ForumList alloc]; [fl initWithNibName:@"ForumList" bundle:[NSBundle mainBundle]]; self.ForumList = fl; [window addSubview:[self.ForumList ...

Combine two views into one view

I have two views that I would like to combine into one. The first view shows all items of X where company ID = Y. This is to give preferential sort to the client first, and then everyone else. So I created a second view, all items of X, where company ID != Y. I created it as an Attachment to attach to the first view, but I don't think...

ERROR: there is no parameter $1 when creating view

When we try to create a view within a funcion we get ERROR: there is no parameter $1. This is the sample code. Begin CREATE VIEW artikelnr AS SELECT datum, 'uitgifte' as "type", CASE WHEN 'test'='test' THEN 0 END as "aantal ontvangen", aantal as "aantal uitgegeven" FROM uitgifteregel JOIN artikel ON artikel.artikelnr = new.artikelnr J...

Rails: DRY in views

Hy, I have a layout in the views/layout that has 2 cols and then in every view i have content_for :main_col and content_for :side_col. The problem is that i have more than 5 views with the same content in the content_for :side_col You have a better idea on how to do this?thanks ...

Loading Views dynamically

Case 1: I have created View-based sample application and tried execute below code. When I press on "Job List" button it should load another view having "Back Btn" on it. In test function, if I use [self.navigationController pushViewController:jbc animated:YES]; nothing gets loaded, but if I use [self presentModalViewController:jbc ...

SQL: How to join a view with a table?

UPDATED: I am using MySQL statement to create a view: I need to show Editors First Name, Last Name and the City if they shipped more than 50 books. The three tables I have are: create table editors ( ed_id char(11), ed_lname varchar(20), ed_fname varchar(20), ed_pos varchar(12), phone varchar(10), address varchar(30), ...

Rails: show some examples of code from controllers, models and views

Hy, my controller example: class FriendsController < ApplicationController before_filter :authorize, :except => [:friends] ############## ############## ## REQUESTS ## ############## ############## ################## # GET MY FRIENDS # ################## # Get my friends. def friends @frie...

Why use NoSQL over Materialized Views?

There has been a lot of talk recently about NoSQL. The #1 reason why I hear people use NoSQL is because they start to de-normalize their DBMS data so much so, to increase performance, that they end up with just one table with all of their data within that single table. With Materialized Views however, you can keep your data normalized,...

How do I get rid of extra lines in my output from Rails

I am using Rails 2.1 to output tables from a database. But the output includes lots of extra lines and tabs. I am using a while loop with lots of nested if statements. I am also wrapping all of my non-output lines in <%- code -%>. Any idea what might be happening and a solution? Thanks, NOTE: I keep attempting to paste in the code, and ...

CodeIgniter/PHP - Calling a view from within a view

Hi Folks Basically for my webapp I'm trying to organise it a bit better. As it at the moment, every time I want to load a page, I have to do it from my controller like so: $this->load->view('subviews/template/headerview'); $this->load->view('subviews/template/menuview'); $this->load->view('The-View-I-Want-To-Load'); ...

Showing a view in Eclipse

Hi. I'm developing a plug-in in Eclipse and I want to show a view. I'm using this: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.articles.MyView"); however it's being added on the right not at the set of views where I want it to be displayed. How can I specify the location? Thanks a...

Rails Layout name inside view

How can I print out the name of current layout in a view? Example puts controller.current_layout Thx ...

what is best flexibility and why? Using db views, db tables, stored proc. and objects in tables...

Hi! I want to know what is best practice for using db views, db tables, stored proc. and objects in tables... Which of these is more flexible and why, can You explain? Best regards! ...

In Spring MVC (2.0) how can you easily hook multiple pages/urls to use 1 controller?

<!--dispatcher file--> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/foo/bar/baz/boz_a.html">bozController</prop> </props> </property> </bean> <!--mappings file--> <bean id="bozController" class="com.mycompany.foo.bar.baz....