Search Results

Search found 4088 results on 164 pages for 'params keyword'.

Page 98/164 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • Using Joins vs Entity associations

    - by shivesh
    I am learning Entity framework and linq-to-entities. It's possible to get cross values from multiple tables using JOINS (join keyword) or using the navigation fields ( associations) in which case the framework knows how to reference the cross data. My question is what to use when?

    Read the article

  • Rails3 nomethod error #<ActiveRecord::Relation>

    - by Dodi
    Hi! I'm writing a static page controller. I get the menuname in the routes.rb and it's call the static controller show method. match '/:menuname' = 'static#show' And static_controller.rb: @static=Staticpage.where("menuname = ?", params[:menuname]) But if I want print @static.title in the view, I get this error: undefined method `title' for # Whats wrong? the SQL query looks good: SELECT staticpages.* FROM staticpages WHERE (menuname = 'asd')

    Read the article

  • C++, class as parameter to a method, not template.

    - by ra170
    So, I came across an interesting method signature that I don't quite understand, it went along the lines of: void Initialize(std::vector< std::string > & param1, class SomeClassName * p); what I don't understand is the "class" keyword being used as the parameter, why is it there? Is it necessary to specify or it is purely superficial?

    Read the article

  • j query validation plugin for two fields

    - by jonathan p
    I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements. As i understand u set up a custom function something like this : function customValidationMethod(value, element, params){ } But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.

    Read the article

  • Will MySQL full-text-search return the results I need?

    - by mike
    I have a keyword field with a list of 5 keywords for each item. example below: 2008, Honda, Accord, Used, Car Will MySQL full text return the item above for the following search requests? 2008 Honda Accord Honda Accord Used Car If so, how well will this hold up when searching through fifty thousand plus records?

    Read the article

  • How to edit resharper's action list

    - by Gerard
    In Resharper I edited the inspection severity of the 'use var keyword when possible' to ''do not show'. But when I select a certain word in the code file, Resharper still shows a pencil with an Action list in the left border with the action 'use var'. Where can I edit the actions that should be shown? I cannot find this option.

    Read the article

  • Respond_with not working Rails 3

    - by MDM
    As no one can help me with my UJS ajax problem I am trying "respond_with", but I am getting this error: RuntimeError (In order to use respond_with, first you need to declare the formats your controller responds to in the class level) Yet I have declared it in my controller: class HomepagesController < ApplicationController respond_to :html, :xml, :js def index @homepages = Homepage.search(params[:search]) respond_with(@homepages) end Anyone has any ideas why.

    Read the article

  • javascript iterate array of variables and reassign value to each variable

    - by Shanison
    Hi how should i iterate array of variables and reassign value to each variable. E.g in jQuery function test(param1, param2) { $.each([param1, param2], function (i, v) { //check if all the input params have value, else assign the default value to it if (!v) v = default_value; //this is wrong, can't use v, which is value } } How should I get the variable and assign new value in the loop? Thank you very much!

    Read the article

  • Is there a command-line tool that could tell me if Gzip is really on beyond the Gzip 1 header param?

    - by lucidquiet
    Is there a command-line tool that could tell me if Gzip is on? What I'm looking for is something that can say the stream coming from the server is really gzipped even if the header params say Gzip:1 (which it could be falsely placing in the headers). I don't see a switch in curl, or wget, or tcpdump, or anything, but maybe I'm just missing something, or perhaps there is something else that could provide me this bit of information? Any help would be appreciated.

    Read the article

  • How do I escape reserved words used as column names? MySQL/Create Table

    - by acidzombie24
    I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved MySQL keyword. How do I escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique) create table if not exists misc_info ( id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, key TEXT UNIQUE NOT NULL, value TEXT NOT NULL)ENGINE=INNODB;

    Read the article

  • SQL Syntax for testing objects before creating views & functions

    - by Scott Weinstein
    I'm trying to figure out the syntax for creating a view (or function) but only if a dependent CLR assembly exits. I've tried both IF EXISTS (SELECT name FROM sys.assemblies WHERE name = 'MyCLRAssembly') begin create view dbo.MyView as select GETDATE() as C1 end and IF EXISTS (SELECT name FROM sys.assemblies WHERE name = 'MyCLRAssembly') create view dbo.MyView as select GETDATE() as C1 go Neither work. I get Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'view'. How can this be done?

    Read the article

  • Creating instance of interface in C#

    - by Max
    I'm working with MS Excel interop in C# and I don't understand how this particular line of code works: var excel = new Microsoft.Office.Interop.Excel.Application(); where Microsoft.Office.Interop.Excel.Application is an INTERFACE defined as: [Guid("000208D5-0000-0000-C000-000000000046")] [CoClass(typeof(ApplicationClass))] public interface Application : _Application, AppEvents_Event { } I'm thinking that some magic happens when the interface is decorated with a CoClass attribute, but still how is it possible that we can create an instance of an interface with a new keyword? Shouldn't it generate a compile time error?

    Read the article

  • Updating table from async task android

    - by CantChooseUsernames
    I'm following this tutorial: http://huuah.com/android-progress-bar-and-thread-updating/ to learn how to make progress bars. I'm trying to show the progress bar on top of my activity and have it update the activity's table view in the background. So I created an async task for the dialog that takes a callback: package com.lib.bookworm; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; public class UIThreadProgress extends AsyncTask<Void, Void, Void> { private UIThreadCallback callback = null; private ProgressDialog dialog = null; private int maxValue = 100, incAmount = 1; private Context context = null; public UIThreadProgress(Context context, UIThreadCallback callback) { this.context = context; this.callback = callback; } @Override protected Void doInBackground(Void... args) { while(this.callback.condition()) { this.callback.run(); this.publishProgress(); } return null; } @Override protected void onProgressUpdate(Void... values) { super.onProgressUpdate(values); dialog.incrementProgressBy(incAmount); }; @Override protected void onPreExecute() { super.onPreExecute(); dialog = new ProgressDialog(context); dialog.setCancelable(true); dialog.setMessage("Loading..."); dialog.setProgress(0); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setMax(maxValue); dialog.show(); } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); if (this.dialog.isShowing()) { this.dialog.dismiss(); } this.callback.onThreadFinish(); } } And in my activity, I do: final String page = htmlPage.substring(start, end).trim(); //Create new instance of the AsyncTask.. new UIThreadProgress(this, new UIThreadCallback() { @Override public void run() { row_id = makeTableRow(row_id, layout, params, matcher); //ADD a row to the table layout. } @Override public void onThreadFinish() { System.out.println("FINISHED!!"); } @Override public boolean condition() { return matcher.find(); } }).execute(); So the above creates an async task to run to update a table layout activity while showing the progress bar that displays how much work has been done.. However, I get an error saying that only the thread that started the activity can update its views. I tried doing: MainActivity.this.runOnUiThread(new Runnable() { @Override public void run() { row_id = makeTableRow(row_id, layout, params, matcher); //ADD a row to the table layout. } } But this gives me synchronization errors.. Any ideas how I can display progress and at the same time update my table in the background? Currently my UI looks like:

    Read the article

  • Routing error in rails

    - by user662503
    In my controller I have def update_project_dates p "It is end date....." @user=User.find(params[:user]) @projects=Project.find_all_by_user_id(@user) end In the view page (only some part of the code is copied and pasted) eventDrop: function() { $.ajax({ url:'/update_project_dates/', success:function(data) { alert("Hello"); } }) }, In my routes.rb I have mentioned match '/update_project_dates' => 'users#update_project_dates', :method=> :get get 'update_project_dates' But When the ajax request goes, I get the routing error as Routing Error uninitialized constant UsersController Where am I doing wrong here...Please help..

    Read the article

  • Rails forms: render different actions based on validation

    - by Martin Petrov
    Is it possible to render different actions based on what fails at validation? For example - I have one field in the form - email addres. It is validated like this: validates :email, :presence => true, :uniqueness => { :case_sensitive => false } In the controller: def create @user = User.new(params[:user]) if @user.save redirect_to somewhere else # render :new if email is blank # redirect_to somwhere if email is taken end end

    Read the article

  • How do i escape reserve names in a column? MySQL/Create Table

    - by acidzombie24
    I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved mysql keyword. How do i escape it in a create table statement? (Note: The other problem below is text must be a fixed size to be indexed/unique) create table if not exists misc_info ( id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, key TEXT UNIQUE NOT NULL, value TEXT NOT NULL)ENGINE=INNODB;

    Read the article

  • before_filter with dynamic information

    - by Lauren
    Hi I am trying to add a filter to a controller that is based on a certain role (using role_requirement) and then on the company_id that each user has. So basically I need something like this: require_role "company" ** This is working fine before_filter :company_required def company_required unless current_user.company_id == Company.find(params[:id]) end end The error I am receiving undefined method `company_id' for nil:NilClass I would appreciate any guidance. Thanks

    Read the article

  • I want to create an expression for querystrings, this stuff is hard!

    - by jkirkerx
    I want to extract some keywords out of a query string for a search application in asp.net. I decoded the url string first, so it's plain text I have this to start with, but I want to add a keyword group I'd like to trim off the stuff for pure words, but not sure if that's possible I also have a long list of possible query string value fields that I want to check against ?q= @q= ?qs= &qs=

    Read the article

  • Search images using c# in local images folder

    - by np
    We have a images folder which has about a million images in it. We need to write a program which would fetch the image based upon a keyword that is entered by the user. We need to match the file names while searching to find the right image. Looking for any suggestions. Thanks N

    Read the article

  • Signs that a SQL statement is dangerous

    - by Matt
    Hi, I want to develop a function in PHP that checks how dangerous a SQL statement is. When i say dangerous i mean, certain symbols, characters or strings that are used to get data from a database that the user shouldnt see. For example: SELECT * FROM users WHERE userId = '1' can be injected in several ways. Although i clean the params, i also want to monitor how safe the query is to run. Thanks in advance

    Read the article

  • How to search mulitple value seperated by commas in mysql

    - by Fero
    Hi all, How to search multiple values separated by commas. ex: table name : searchTest id name keyword 1 trophy1 test1,test2,test3 2 trophy2 test2,test5 Points: If i search for test2 both results trophy1 and trophy2 should be display. If i search for trophy1 then trophy1 should be as result. How to solve this issue. thanks in advance

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >