Search Results

Search found 14 results on 1 pages for 'dweebsonduty'.

Page 1/1 | 1 

  • Android rawQuery help

    - by dweebsonduty
    I was wondering how I could query my database of 1400 items and get only the DISTINCT types and row ids. Below is the actual sql that I want to run by my program crashes if I dont return ids. return mDb.rawQuery("SELECT DISTINCT Type from the_foods",null); Any ideas?

    Read the article

  • AuthSub target path prefix does not match the provided "next" URL

    - by dweebsonduty
    I am trying to use the Gcal API in PHP. I am using the ZEND framework function getAuthSubUrl($company) { $next = "http://$company.mysite.com"; $scope = 'http://www.google.com/calendar/feeds/'; $secure = false; $session = true; return (Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session)); } $authSubUrl = getAuthSubUrl(); echo "<a href=\"$authSubUrl\">login to your Google account"</a> I am not sure what I am doing wrong here. I am following the google example almost exactly. They do have $next = getCurrentUrl(); in their expample but I am getting undefined errors when I try that.

    Read the article

  • Get text from listview onclick (Android)

    - by dweebsonduty
    I am creating lists in my android app and would like to capture the text of the list item that is clicked but I want to do it in a seperate function so I only have to write the code once. And I want to be able to compare the string to another sting. What is the best way to do this?

    Read the article

  • Ruby On Rails Paths

    - by dweebsonduty
    I am having trouble with paths in ruby on rails My Routes: map.resources :companies do |company| company.resources :customers do |customer| customer.resources :jobs end end Currently I am creating the paths by hand: <td><%= link_to 'Show', "/companies/#{params[:company_id]}/users/#{user.id}" %></td> <td><%= link_to 'Edit', "/companies/#{params[:company_id]}/users/#{user.id}/edit" %></td> For some reason I cant figure out how to get new_company_user to work I keep getting errors. The routes are all there I just need help with dynamically creating them by using the API

    Read the article

  • Basic Ruby On Rails Linking Help

    - by dweebsonduty
    So I am beginning to work with Rails and I get some of the concepts but am stuck on an important one. Let's say I have customers which has many jobs and jobs which belongs to customers. How would I go about creating a new job for a customer? I can create a link that goes to customers/1/jobs/new and I can grab the customer ID but how do I tell it that I am creating a job for customer 1? I know this is the most basic of things but I just need a push in the right direction. This is my form so far: How do I get :customer_id to populate with the customer_id param? <h1>New job</h1> <% form_for(@job) do |f| %> <%= f.error_messages %> <p> <%= f.label :customer_id %><br /> <%= f.text_field :customer_id %> </p> <p> <%= f.label :manufacturer %><br /> <%= f.text_field :manufacturer %> </p> <p> <%= f.label :serial_number %><br /> <%= f.text_field :serial_number %> </p> <p> <%= f.label :problem %><br /> <%= f.text_area :problem %> </p> <p> <%= f.label :notes %><br /> <%= f.text_area :notes %> </p> <p> <%= f.label :status %><br /> <%= f.text_field :status %> </p> <p> <%= f.label :tech_id %><br /> <%= f.text_field :tech_id %> </p> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', jobs_path %>

    Read the article

  • Passing variable string to create arrays (Android)

    - by dweebsonduty
    Hello all, I am a newb to Android and Java and want to write a funtion that will display a list based on a varable that I pass to the function. The function is below and the code below creates an array out of a string called type, but what I want to do is pass it a variable string and have it build a list based on that string. So if I wanted the type list I would say list_it("type") But if I try something like getResources().getStringArray(R.array.thelist); it doesn't work. Can someone point me in the right direction? public void list_it(String thelist){ String[] types = getResources().getStringArray(R.array.type); ArrayAdapter<String> mAdapter = new ArrayAdapter<String>(this, R.layout.list_item1, types); setListAdapter(mAdapter); ListView lv = getListView(); lv.setTextFilterEnabled(true); }

    Read the article

  • String Storage and Retrieval in Android

    - by dweebsonduty
    I have a program that has items with 3 attributes. Name(String) : Count(String) : Amount(String) Currently I am writing the database when someone is trying to access a section then reading from the database. The writing is taking too long. So my question is how can I perhaps create a nested array where I can say if name = carrot then print carrot['count'] and carrot['amount']. I am very new to Java so some sample code would be great. Or any other suggestions that you may have as far as tackling this issue.

    Read the article

  • Jquery multiple events to trigger the same function

    - by dweebsonduty
    Is there a way to have keyup, keypress, blur, and change events call the same function in one line or do I have to do them separately? The problem I have is that I need to validate some data with a db lookup and would like to make sure that there is no way that the validation is missed weather it is typed or pasted into the box.

    Read the article

  • Android Stop Counter and Destroy Media Player

    - by dweebsonduty
    I am working on an app that beeps every second. When I hit the home button I want it to close the program and stop beeping. Right now it closes the program but continues to beep. What am I doing wrong? if ((keyCode == KeyEvent.KEYCODE_HOME)) { isdone = true; mp.release(); counter.cancel(); finish(); }

    Read the article

1