Search Results

Search found 94 results on 4 pages for 'senthil'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • How to use string interpolation when rendering templates?

    - by Senthil
    I found this code in a Rails cookbook. class BlogController < ApplicationController def display_by_date year = params[:year] month = params[:month] day = params[:day] day ='0'+day if day && day.size == 1 @day = day if ( year && month && day ) render(:template => "blog/#{year}/#{month}/#{day}") elsif ( year ) render(:template => "blog/#{year}/list") end end end I'm not sure what to name the templates so the router can find them. Thanks for your help.

    Read the article

  • Rails/SQl query help: Find all created Categories past 7 days per each day?

    - by Senthil
    I'm unable to get SQL and Rails to play properly when trying to find Categories that are created each day, the past 7 days. So basically I want to find each Category sorted by the day they were created for the past 7 days. I found this on stackoverflow, but it isn't finding a Category that I just created: Category.all(:conditions => ["created_at > ? AND created_at < ?", t.at_beginning_of_day, t.tomorrow.at_beginning_of_day]) Any help?

    Read the article

  • drupal hook just before inserting/updating user info

    - by Senthil
    Hi, I want to hook into drupal's user registration and be able to stop it or allow it to proceed just before database insert. All validations and 3rd party stuff must be done and just before inserting I need to hook in. What is the hook and the operation to do this? I tried 'validate' operation in the hook_user. But, after I check against my logic and let the registration proceed, it should not fail due to some other validation. If I let it proceed, no application logic after that should stop the registration (unless the DB engine fails or something of course). If I stop it, I will set a form error so that nothing happens. How can this be accomplished? P.S. I am using Drupal 6.16

    Read the article

  • Capturing datagrid cell header click

    - by Senthil
    Hi, I just want to check if a click is made in an datagrid whether the click is made on a header r on a cell content. I am facing a problem when... when cell is clicked i am manipulating with the data. But if the header is clicked for sorting ,same cell click event is triggered. How can i stop this ?

    Read the article

  • what factors should a fresher(for programmer job) consider and learn before saying yes to employer f

    - by Senthil
    what factors should a fresher(for programmer job) consider and learn before saying yes to employer for job offer? and to contract? and most importantly how should one get the details?how can I approach them? I know some employers dont want to give such details..right? I have shortlisted by a Software COmpany..that is parter with microsoft. and works on technology like VB ADO.DOTNET,and some other reporting stuffs.,sql servers etc.,Tell me about scope of that..because They are asking me to sign for 2 year certificate bond agreement..I want to be a great programmer and Project Leader after 5 years..advise me guys..Language/OS not problem for me,As I curious to learn more things. Most of the SO members are programmers..so yours advice is greatly appreciated

    Read the article

  • undefined method `parameterize' for nil:NilClass

    - by Senthil
    I've been trying to do SEO friendly urls, and managed to get it work, but when I call index action on blogs, I get a weird "undefined method `parameterize' for nil:NilClass." The method works when using show method. def to_s title end def to_param "#{id}-#{to_s.parameterize}" end

    Read the article

  • How to save SMS to inbox in android programmatically?

    - by Senthil
    I have written the below code , for sending SMS . SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(destAddr, null, mMessageText, il, null); But this is not updating in my Inbox ,I need to save the same message in Inbox, Or is there any way to invoke a native SMS application to send SMS ?

    Read the article

  • Compare two audio files of beat/tempo and rating in iphone

    - by Senthil Kumar
    Hello, I want to develop iPhone application should have the ability to count the number of phrases that are received when user sing on mic. This application should also have the ability to decipher whether the users phrases are in or out of cadence with a preset beat.When user sing on mic Instrumental music only play. So I have to merge the User Recorded voice with Instrumental music this is one Audio file.Already i have on original Song file.I have to compare both and give the Rating to users. [Note: Instrumental music is without vocal of Original Song file] Can you please help me?. Thanks Vadivelu

    Read the article

  • Tooltip in Datagrid.

    - by senthil-nathanr
    Is there any way to show the tooltip in Datagrid for more than 30 seconds? example, here is my code e.Item.Cells(7).Tooltip = e.Item.Cells(6).Text on mousehover the tooltip will be displayed only 6 or 7 seconds, is there any way to increase the time for the tooltip?

    Read the article

  • Ruby Search tree example confusion

    - by Senthil
    I've been trying to take apart this app which creates a search tree based on keywords, but I'm afraid its a bit too complex for me. Would anyone mind explaining it? The format is off, so here's a pastebin (is pastie.org down?) version of it. Any help is appreciated.

    Read the article

  • Find git branch that got pushed to a bare repository.

    - by Senthil A Kumar
    Lets have 2 repositories, one containing the actual data repo and a bare repository which is loaded with deltas from the actual data repository by doing a git push from data repo to bare repo. Hope you have understood the model that am using here. Am creating clones by cloning the bare repo, and i will be pushing from the branches in my local clone to the branches in bare repository. When am pushing data from my branch to bare repo, the data is automatically synced to the data repo by a hook. The question i have - is there a way to find from which branch a code has come to the bare repo. I can see the source and target branch during a git push, but after pushing can i see from logs or other way to identify from which branch and repository the data has been pushed from? If there are 5 developers pushing to bare repo, can i find in the bare repo from which branch and clone a code is pushed?

    Read the article

  • finding middle element of an array

    - by senthil
    Hi all, I came cross a question in my interview. Question: Array of integers will be given as the input and you should find out the middle element when sorted , but without sorting. For Example. Input: 1,3,5,4,2 Output: 3 When you sort the given input array, it will be 1,2,3,4,5 where middle element is 3. You should find this in one pass without sorting. Any solutions for this?

    Read the article

  • background worker window controls not rendered

    - by senthil
    Is there any way to load window inside the background worker thread without using showdialog()? the background worker only terminate only after getting some input from the window. Here the issue is window shown but the button and other controls are not rendered even we don't have control over any of the window.

    Read the article

  • Use Enterprise Manager Cloud Control to monitor OBIEE 11.1.1.7.x Dashboards

    - by Torben Hein -Oracle
    (in via Senthil )  If your OBIEE 11.1.1.7.x is set up in the following way: The OBIEE repository is an Oracle Database and is set up as a data warehouse Usage tracking is enabled in OBIEE. ( For information on how to enable usage tracking in OBIEE, refer to the following link: Setting Up Usage Tracking in Oracle BI 11g ) The OBIEE instance is discovered in EM Cloud Control. ( For information on how to discover an OBIEE instance in Cloud Control, refer to the following link: Discovering Oracle Business Intelligence Instance and Oracle Essbase Targets ) The OBIEE repository is discovered in EM Cloud Control. ( For information on how to discover an Oracle database, refer to the following link: Discovering, Promoting, and Adding Database Targets ) then we've got news for you: KM Article:  OBIEE 11g: How To Diagnose Slowly Performing Dashboards using Enterprise Manager Cloud Control (Doc ID 1668236.1) takes you step by step through monitoring the SQL query performance behind your OBIEE dashboard. This Diagnostic approach ... .. will help you piece together information on BI dashboard performance, e.g. processing time from the different layers of the BI system including the repository. .. should enable you to get to the bottom of slow dashboards by using the wealth of information available in EM Cloud Control on OBIEE and Oracle DB. .. will NOT fix any performance issues on its own, but will help identify bottlenecks while processing dashboard requests. (layout and post: Torben, authorized: Lia)

    Read the article

  • Arraylist is null; I cannot access books in the arraylist

    - by user3701380
    I am a beginner-intermediate java programmer and I am getting a null pointer exception from my arraylist. I am writing a bookstore program for APCS and when i add the book, it is supposed to add to the arraylist in the inventory class. But when i call a method to search for a book (e.g. by title), it shows that there isn't anything in the arraylist. //Here is my inventory class -- it has all methods for adding the book or searching for one The searching methods are in getBookByTitle, getBookByAuthor, and getBookByISBN and the method for adding a book is addBook package webbazonab; //Inventory Class //Bharath Senthil //Ansh Sikka import java.util.ArrayList; public class Inventory{ private ArrayList<Book> allBooks = new ArrayList<Book>(); private String bookTitles; private String bookAuthors; private String bookPrices; private String bookCopies; private String ISBNs; public Inventory() { } //@param double price, int copies, String bookTitle, String Author, String isbnNumber public void addBooks(Book addedBook){ allBooks.add(addedBook); } public boolean isAvailable(){ for(Book myBook : allBooks){ if(myBook.copiesLeft() == 0) return false; } return true; } public String populateTitle(){ for (Book titleBooks : allBooks){ bookTitles = titleBooks.getTitle() + "\n"; return bookTitles; } return bookTitles; } public String populateAuthor(){ for(Book authorBooks : allBooks){ bookAuthors = authorBooks.getAuthor() + "\n"; return bookAuthors; } return bookAuthors; } public String populatePrice(){ for (Book pricedBooks : allBooks){ bookPrices = String.valueOf(pricedBooks.getPrice()) + "\n"; } return "$" + bookPrices; } /** * * @return */ public String populateCopies(){ for (Book amtBooks : allBooks){ bookCopies = String.valueOf(amtBooks.copiesLeft()) + "\n"; return bookCopies; } return bookCopies; } public String populateISBN(){ for (Book isbnNums : allBooks){ ISBNs = isbnNums.getIsbn() + "\n"; return ISBNs; } return ISBNs; } @SuppressWarnings("empty-statement") public Book getBookByTitle(String titleSearch) { for(Book titleBook : allBooks) { if (titleBook.getTitle().equals(titleSearch)) { return titleBook; } } return null; } public Book getBookByISBN(String isbnSearch){ for(Book isbnBookSearches : allBooks){ if(isbnBookSearches.getIsbn().equals(isbnSearch)){ return isbnBookSearches; } } return null; } public Book getBookByAuthor(String authorSearch){ for(Book authorBookSearches : allBooks){ if(authorBookSearches.getAuthor().equals(authorSearch)){ return authorBookSearches; } } return null; } public void sort(){ for(int i = 0; i < allBooks.size(); i++) { for(int k = 0; k < allBooks.size(); k++) { if(((Book) allBooks.get(i)).getIsbn().compareTo(((Book) allBooks.get(k)).getIsbn()) < 1) { Book temp = (Book) allBooks.get(k); allBooks.set(k, allBooks.get(i)); allBooks.set(i, temp); } else if(((Book) allBooks.get(i)).getIsbn().compareTo(((Book) allBooks.get(k)).getIsbn()) > 1) { Book temp = (Book) allBooks.get(i); allBooks.set(i, allBooks.get(k)); allBooks.set(k, temp); } } } } public ArrayList<Book> getBooks(){ return allBooks; } } //The exception occurs when i call the method here (in another class): Inventory lib = new Inventory(); jTextField12.setText(lib.getBookByAuthor(authorSearch).getTitle()); Here is my book class if you need it package webbazonab; //Webbazon AB //Project By: Ansh Sikka and Bharath Senthil public class Book { private double myPrice; private String myTitle; private String bookAuthor; private String isbn; private int myCopies; public Book(double price, int copies, String bookTitle, String Author, String isbnNumber) { myPrice = price; myCopies = copies; myTitle = bookTitle; bookAuthor = Author; isbn = isbnNumber; } public double getPrice() { return myPrice; } public String getIsbn() { return isbn; } public String getTitle() { return myTitle; } public String getAuthor() { return bookAuthor; } public int copiesLeft(){ return myCopies; } public String notFound(){ return "The book you searched for could not be found!"; } public String toString() { return "Title: " + getTitle() + "\nAuthor: " + getAuthor() + "\nNumber of Available Books: " + copiesLeft() + "\nPrice: $" + getPrice(); } } Thanks!

    Read the article

< Previous Page | 1 2 3 4