view

How do i merge these two database tables into a single result set?

Hi folks, I have two tables in the system. I'm trying to make a VIEW that represents them both together, and i'm not sure how this can be done or even IF this can be done. Pets PetId INT PK Name VARCHAR(100) PetOtherNames PetID INT PK FK Name VARCHAR(100) PK So, i have a table of pets. The name (in this table) is their formal co...

How to control trackball behaviour in Android Views?

Hi. I have a FrameLayout view which contains one (MapView-like) control and some additional buttons overlaying it. (the layout xml is below). I want to allow the user to pan/scroll the main view using not only touch but also the Trackball. The problem is - using the trackball just switches the focus between all the controls on the layo...

SQL Server view: how to add missing rows using interpolation

Running into a problem. I have a table defined to hold the values of the daily treasury yield curve. It's a pretty simple table used for historical lookup of values. There are notibly some gaps in the table on year 4, 6, 8, 9, 11-19 and 21-29. The formula is pretty simple in that to calculate year 4 it's 0.5*Year3Value + 0.5*Year5Val...

How do I avoid the use of getdate() in a SQL view?

I'm writing a database view to sum up a bunch of records where the value in a date column is within the last 7 days. It looks something like this: CREATE VIEW RecentRecordSum AS SELECT t.ID, SUM(t.SomeValue) AS ValueSum FROM SomeTable t WHERE t.RecordDate >= DATEADD(d,-7,GETDATE()) GROUP BY t.ID Is ...

SQL: View against Table - are queries against the View still using Table Indexes?

I'm using a view ("UsersActive") against my table ("Users"). The view has only one filter, it checks if DateTime Users.DeletedOn is NULL; it basically contains all Users that are not deleted. If I now execute Linq queries against the view instead of the table, will they still use the table indexes or do I need to create special indexes ...

ASP.NET MVC - View with multiple models

I am trying to generate such HTML <form action="/some/process" method="post"> <input type="hidden" name="foo.a" value="aaa"/> <input type="hidden" name="bar.b" value="bbb"/> <input type="submit" /> </form> so it can be processed by this Action: public ActionResult Process(Foo foo, Bar bar) { ...

Passing data from MVC Controller to View in PHP

I have my own hand-rolled PHP MVC framework for some projects that I'm working on. When I first created the framework, it was in the context of building an admin CMS. Therefore, there was a very nice one-to-one relationship between model, view, and controller. You have a single row in the DB, which maps to a single model. The controller ...

Table View

Hi, I want button on every cell on table View. and on button click i m populating action sheet . When i click on action sheet button ,the selected value should be displayed on a clicked button (which is used to open action sheet). Thanks Harita ...

Trouble with views in CouchDB

I've followed the info at http://books.couchdb.org/relax/browsing-map-views as closely as possible but I'm not able to generate a view for my document. My database name is "twitter" and my design document looks like this: { "_id": "_design/testdocview", "_rev": "2-3250434125", "views": { "getRev": { "map": "f...

[iPhone] Displaying a new view when selecting a row in a UITableView

I have an application with multiple views. I can click on different buttons to select different views, one of which displays a table. When I select a cell on that row, I want to display a new view. I see a log line indicating that view was loaded, but the screen doesn't change. - (void)tableView:(UITableView *)tableView didSelectRowA...

How to make a view like Recents in the Phone application for iPhone?

Hi, I need to make a view just like Recents in the Phone application. There are two connected buttons on the top, and when either one is clicked, the view below will change. I tried to use UIToolbar but there are spaces between buttons. Does anyone know how to do this? Thanks in advance. -Joey ...

View array in Visual Studio debugger?

Is it possible to view an array in the Visual Studio debugger? QuickWatch only shows the first element of the array. ...

Android: onKeyDown() problem

I would like to create a photo/video capture application. I have created a CaptureView class which extends SurfaceView and placed it in the main form. The main form's activity has onCreateOptionsMenu() method which creates a menu. The menu worked fine but then I tried to implement a method onKeyDown: @Override public boolean onKeyDow...

database view performance issue

Hello everyone, I am using SQL Server 2008 and I have two tables which are of the same schema and I create a view which union the content of the two tables to provide a single view of "table" to external access. One of the table is read only and the other table contains bulk insert/delete operation (on the other table, I will use bulk ...

Where should I include a javascript reference for a view that inerhits from a Master view in ASP.NET MVC?

I have a bunch of pages inheriting from a master view. One one of these pages I want to use a popular jQuery plugin called "Uploadify". Where should I place the reference for the Uploadify javascript file? I only need it on one small page so it didn't seem right to place it in Master view. Is it 'Ok' to place it in the content tag ...

How to automatically call a method after popping a view controller off the stack on the iPhone

I need to update the parent view on an iPhone after popping a child view off the navigation stack. How can I setup the parent view to be notified or receive an automatic method call when the child is popped off the stack and the parent becomes visible again? The user enters data on the child page that I want to display on the parent pa...

How to replicate facebook photo view and show photos very fast from web

Hi, I have to create same functionality as facebook has does like all the photos display at one view and from that user can choose photo and it goes to large photo. This photos are showing very fast. I have 5 photos from web but it take so much time. Does anyone know how they shows photo very fast. ...

Cross-database views and mirroring in SQL Server

Hi, I have a question about mirroring and cross-db views. We have a view in database X which references database Y on the same server S1. The databases X & Y are both mirrored onto another server S2. The problem is: if db X fails over to S2, the view which references db Y is now looking on S2, but db Y may not have failed over. What is ...

Which view should i use to display large photos from a TabBar application

Hi i have used Tab Bar Application with 4 tabs and i have set navigation controller from IB. Now for my photo view, when user choose photo from list, it should display large photo. For larger photo, which view should i use?. If i will self.view and it will display both tab bar and navigation bar. If i will give tabbarcontroller..view t...

One controller rendering using another controller's views

I have QuestionController I now have AnotherQuestionController with actions which should render using templates and partials in app/views/question/ Is this possible? Seems like it should be. I've tried render :template => "question/answer" but answer.html.erb includes partials and I get errors like "Missing template another_questi...