Search Results

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

Page 122/164 | < Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >

  • Asp.net Report Viewer - Custom filter parameters

    - by Chris
    Hi all, for a data warehouse project I need to know about some best practices regarding custom report viewer filters/parameters. Usually I use the standard parameter feature for reports, like multiple select boxes, check boxes, text boxes etc.. But for the current project some reports require more complex report parameters. E.g. a user wants to analyze some measures. For that the user needs to set a filter on a specific address. There are over 100.000 address to choose from, so he has to have the ability to search for an address (full text). Since such features cannot be done with the standard parameters, I will have to create custom params within a ASPX page which are then passed to the report viewer control. So my question is: Are there any best practices on how to create custom parameters? Did anyone had similar problems, if so, how did you solve it?

    Read the article

  • Display alternate content when Flash is not installed with jquery.swfobject

    - by Deca
    How can I display alternate HTML with the jquery.swfobject plugin for browsers without Flash? I'm unable to find any documentation or examples showing how to do this. Here is a snippet of my code: <script type="text/javascript" language="Javascript" src="jquery.1.4.2.js"></script> <script type="text/javascript" language="Javascript" src="jquery.swfobject.1-0-9.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#contentflash").flash({ swf: "myswf.swf", width: "100%", height: "100%", params: { wmode: "opaque" } }); }); </script> </head> <body> <div id="contentflash"></div>

    Read the article

  • How to test flash.message in a Grails webflow?

    - by callie16
    I'm using webflows in Grails and I'm currently writing tests for it. Now, inside I've got something that throws an error so I set a message to the flash scope before redirecting: ... if (some_condition) { flash.message = "my error message" return error() } ... Now, I know that when I'm going to display this in the GSP page, I access the flash message as <g:if test="${message}">... instead of the usual <g:if test="${flash.message}">... So anyway, I'm writing my test and I'm wondering how to test the content of the message? Usually, in normal actions in the controllers, I follow what's written in here . However, since this is a webflow, I can't seem to find the message even if I check controller.flash.message / controller.params.message / controller.message . I've also tried looking at the flow scope... Any ideas on how to see the message then? Thanks a bunch!

    Read the article

  • jQuery - getting the id of the item selected

    - by John Leonard
    I have a basic jQuery selector question. Let's say I'm parsing JSON and generating a row of data for each item in my result set. On each item row, I want an action button. What is the best practice to script that button so its click action can reference the data specific to that row? Starting with the block below, how do I generate a 'Click Me' button that when clicked will alert with its json data? $.getJSON(url,params,function(json){ if(json.items){ $.each(json.items, function(i, n){ var item = json.items[i];

    Read the article

  • Rails: textfield list to array of strings

    - by poseid
    I want to take input from a textfield and turn it into an array of strings. After having submitted the "post", I want to display again the textfield, but with the array showed below. I have a view that would look like: <% form_tag "/list2array" do -%> <%= text_area_tag "mylist" %> <div><%= submit_tag 'save' %></div> <% end -%> <% @myArray.each do |item| %> <%= item %> <% end %> And as a start for the controller: class List2ArrayController < ApplicationController def index end def save @myArray = params[:mylist].split("\r\n") end end However, after the post, I only get an empty textfield without values in the array from the previous POST. Do I need to use the model layer for my experiment? How? Or do I need to modify my controller?

    Read the article

  • how so select similarities in MySQL?

    - by mysqllearner
    Currently, I am doing a search function. Lets say in my database, I have this data: Keyword1 Keyword2 Keyword3 Keysomething Key and the user entered: "Key" as the keyword to search. This is my current query: Q1: SELECT * FROM data WHERE (data_string LIKE '$key%' OR data_string LIKE '%$key%' OR data_string LIKE '%$key') Basically, I have 2 questions: How do I sort by (order by) similarity. From above example, I should have "Key" as my first result. My current result is: Keyword1, Keyword2, Keyword3, Keysomething and Key My SQL query only search by the "data_string" column, what if I want to seach others column? Do I need to do something like this: Q2: SELECT * FROM data WHERE (data_string LIKE '$key%' OR data_string LIKE '%$key%' OR data_string LIKE '%$key') OR (data_other LIKE '$key%' OR data_other LIKE '%$key%' OR data_other LIKE '%$key') ... Is there any better/faster query than Q2?

    Read the article

  • XML-RPC in CodeIgniter is for creating a API?

    - by ajsie
    I have read some tutorials about creating an API and i wonder if XML-RPC and XML-RPC server in CodeIgniter are for creating this? If yes, what are the benefits of using these classes rather than im just using regular class/methods/params to create my API interface. This is what it said in the documentation: Quite simply it is a way for two computers to communicate over the internet using XML. One computer, which we will call the client, sends an XML-RPC request to another computer, which we will call the server. Once the server receives and processes the request it will send back a response to the client.

    Read the article

  • rails: undefined method and form_tags

    - by SuperString
    I have this in courses.html.erb under app/views/students <% if @student.courses.count < Course.count then%> <% form_tag(course_add_student_path(@student)) do%> <%= select_tag(:course, options_from_collection_for_select(@student.unenrolled_courses, :id, :name))%> <%= submit_tag 'Enroll'%> <%end%> <%else%> <p><%=h @student.name%> is enrolled in every course. </p> <%end%> I have this in my students_controller.rb under app/controllers: def course_add @student = Student.find(params[:id]) @course = Course.find(params[:course]) unless @student.enrolled_in?(@course) @student.coursess << @course flash[:notice] = 'course added' else flash[:error] = 'course already enrolled' end redirect_to :action => courses, :id => @student end And in my routes.rb, I have: resources :students, :has_many => [:awards], :member => {:courses => :get, :course_add => :post, :course_remove => :post} However, I am getting this error: undefined method `course_add_student_path' for #<#<Class:0x105321d78>:0x1053200e0> What am I missing here? Rake routes output: students GET /students(.:format) {:action=>"index", :controller=>"students"} POST /students(.:format) {:action=>"create", :controller=>"students"} new_student GET /students/new(.:format) {:action=>"new", :controller=>"students"} edit_student GET /students/:id/edit(.:format) {:action=>"edit", :controller=>"students"} student GET /students/:id(.:format) {:action=>"show", :controller=>"students"} PUT /students/:id(.:format) {:action=>"update", :controller=>"students"} DELETE /students/:id(.:format) {:action=>"destroy", :controller=>"students"} courses GET /courses(.:format) {:action=>"index", :controller=>"courses"} POST /courses(.:format) {:action=>"create", :controller=>"courses"} new_course GET /courses/new(.:format) {:action=>"new", :controller=>"courses"} edit_course GET /courses/:id/edit(.:format) {:action=>"edit", :controller=>"courses"} course GET /courses/:id(.:format) {:action=>"show", :controller=>"courses"} PUT /courses/:id(.:format) {:action=>"update", :controller=>"courses"} DELETE /courses/:id(.:format) {:action=>"destroy", :controller=>"courses"} student_awards GET /students/:student_id/awards(.:format) {:action=>"index", :controller=>"awards"} POST /students/:student_id/awards(.:format) {:action=>"create", :controller=>"awards"} new_student_award GET /students/:student_id/awards/new(.:format) {:action=>"new", :controller=>"awards"} edit_student_award GET /students/:student_id/awards/:id/edit(.:format) {:action=>"edit", :controller=>"awards"} student_award GET /students/:student_id/awards/:id(.:format) {:action=>"show", :controller=>"awards"} PUT /students/:student_id/awards/:id(.:format) {:action=>"update", :controller=>"awards"} DELETE /students/:student_id/awards/:id(.:format) {:action=>"destroy", :controller=>"awards"} courses_student GET /students/:id/courses(.:format) {:action=>"courses", :controller=>"students"} GET /students(.:format) {:action=>"index", :controller=>"students"} POST /students(.:format) {:action=>"create", :controller=>"students"} GET /students/new(.:format) {:action=>"new", :controller=>"students"} GET /students/:id/edit(.:format) {:action=>"edit", :controller=>"students"} GET /students/:id(.:format) {:action=>"show", :controller=>"students"} PUT /students/:id(.:format) {:action=>"update", :controller=>"students"} DELETE /students/:id(.:format) {:action=>"destroy", :controller=>"students"}

    Read the article

  • Data loss when converting from QString to QByteArray

    - by SleepyCod
    I'm using QPlainTextEdit as an HTML editor, saving the data through an HTTP post with QNetworkAccessManager. I experience data loss when using HTML special characters such as & (ampersand) I'm building a POST request with a QByteArray (as mentioned in the docs). QByteArray postData; QMapIterator<QString, QString> i(params); while(i.hasNext()) { i.next(); postData .append(i.key().toUtf8()) .append("=") .append(i.value().toUtf8()) .append("&"); } postData.remove(postData.length()-1, 1); //Do request QNetworkRequest postRequest = QNetworkRequest(res); oManager.post(postRequest, postData);

    Read the article

  • Replacing keywords in text with php & mysql

    - by intacto
    Hello, I have a news site containing an archive with more than 1 million news. I created a word definitions database with about 3000 entries, consisting of word-definition pairs. What I want to do is adding a definition next to every occurence of these words in the news. I cant make a static change as I can add a new keyword everyday, so i can make it realtime or cached. The question is, a str_replace or a preg_replace would be very slow for searching 3 thousand keywords in a text and replacing them. Are there any fast alternatives?

    Read the article

  • sql query where parameters null not null

    - by Laziale
    I am trying to do a sql query and to build the where condition dynamically depending if the parameters are null or no. I have something like this: SELECT tblOrder.ProdOrder, tblOrder.Customer FROM tblOrder CASE WHEN @OrderId IS NOT NULL THEN WHERE tblOrder.OrderId = @OrderId ELSE END CASE WHEN @OrderCustomer IS NOT NULL THEN AND tblOrder.OrderCustomer = @OrderCustomer ELSE END END This doesn't work, but this is just a small prototype how to assemble the query, so if the orderid is not null include in the where clause, or if the ordercustomer is not null include in the where clause. But I see problem here, for example if the ordercustomer is not null but the orderid is null, there will be error because the where keyword is not included. Any advice how I can tackle this problem. Thanks in advance, Laziale

    Read the article

  • Page load fires twice on Firefox - PLEASE HELP !

    - by The_AlienCoder
    OK 1ST SOME BACKGROUND - I have a page showing the number of hits(or views) of any selected item. The hit counter procedure that is called at every page load i.e if (Request.QueryString.HasKeys()) { // get item id from icoming url e.g details.aspx?itemid=26 string itemid = Request.Params["itemid"]; if (!Page.IsPostBack) { countHit(itemid); } } THE PROBLEM - My expectation was that the counter would be increased by 1 on every page load but the counters on my datalist and formview are always behind and stepped by 2 i.e instead of 1, 2, 3, 4 its - 0, 2 , 4, 6 It seems that the page load is firing twice. Later I discovered that this only happens when you are using Mozilla Firefox. The page behaves fine with other browsers like IE This becoming quite frustrating. CAN ANY1 HELP :-(

    Read the article

  • reading csv file without for

    - by Abruzzo Forte e Gentile
    Hi All I need to read a CSV file in python. Since for last row I receive a 'NULL byte' error I would like to avoid using for keyword but the while. Do you know how to do that? reader = csv.reader( file ) for row in reader # I have an error at this line # do whatever with row I want to substitute the for-loop with a while-loop so that I can check if the row is NULL or not. What is the function for reading a single row in the CSV module? Thanks Thanks p.S. below the traceback Traceback (most recent call last): File "FetchNeuro_TodayTrades.py", line 189, in for row in reader: _csv.Error: line contains NULL byte

    Read the article

  • Caching stored procedure results in Linq'u

    - by itdebeloper
    In our web application we have a lots of stored procedures look like this one: getSomeData(/* 7 diffrent params */) This stored procedure don't make any updates. We are using Linq'u. I know that the date are changing no often than once per day so the results for the same sets of parameters values will be the same. Does Linqu have cache simple solution? I know how to 'manually' write cache mechanism in .net, but I supposed that in Linqu this problem was solved. I'm a lazy guy :) so I'm looking for something realy simple like: Linqu_global_store_procedure_configuration.CacheDuration="600" Linqu_global_store_procedure_configuration.CacheVaryByParam="*" I'm using .net 3.5 but its not any problem to move for 4.0.

    Read the article

  • Function return type style

    - by JB
    I'm learning c++0x, at least the parts supported by the Visual C++ Express 2010 Beta. This is a question about style rather than how it works. Perhaps it's too early for style and good practice to have evolved yet for a standard that isn't even released yet... In c++0x you can define the return type of a method using - type at the end of the function instead of putting the type at the start. I believe this change in syntax is required due to lambdas and some use cases of the new decltype keyword, but you can use it anywhere as far as I know. // Old style int add1(int a, int b) { return a + b; } // New style return type auto add2(int a, int b) -> int { return a + b; } My question really then, is given that some functions will need to be defined in the new way is it considered good style to define all functions in this way for consistency? Or should I stick to only using it when necessary?

    Read the article

  • passing get parameters through named route and then to controller model; stringify_keys!

    - by user368937
    Hey, I'm just learning ruby on rails and I've been stumped on this for awhile now. Here's my url request: http://192.168.2.20:8080/Location/new/123.123,-123.123/ Here's my routes.rb: map.connect '/Location/new/:coords/', :controller => 'Location', :action => 'new', :coords => /\d+.\d+,-\d+.\d+/ map.connect '/Location/list/', :controller => 'Location', :action => 'list' map.connect '/Location/create/', :controller => 'Location', :action => 'create' Here's my location_controller.rb def new @coords = Location.new(params[:coords]) end Here's the error message it gives me: NoMethodError in LocationController#new undefined method `stringify_keys!' for "123.123,-123.123":String

    Read the article

  • What do I need to change to get this 'acts_as_rateable' Rails plugin working with this code from the

    - by tepidsam
    Hello! I'm working my way through the 'Foundation Rails 2' book. In Chapter 9, we are building a little "plugins" app. In the book, he installs the acts_as_rateable plugin found at http://juixe.com/svn/acts_as_rateable. This plugin doesn't appear to exist in 2010 (the page for this "old" plugin seems to be working again...it was down when I tried it earlier), so I found another acts_as_rateable plugin at http://github.com/azabaj/acts_as_rateable. These plugins are different and I'm trying to get the "new" plugin working with the code/project/app from the Foudations 2 book. I was able to use the migration generator included with the "new" plugin and it worked. Now,though, I'm a bit confused. In the book, he has us create a new controller to work with the plugin (the old plugin). Here's the code for that: class RatingsController < ApplicationController def create @plugin = Plugin.find(params[:plugin_id]) rating = Rating.new(:rating => params[:rating]) @plugin.ratings << average_rating redirect_to @plugin end end Then he had us change the routing: map.resources :plugins, :has_many => :ratings map.resources :categories map.root :controller => 'plugins' Next, we modified the following to the 'show' template so that it looks like this: <div id="rate_plugin"> <h2>Rate this plugin</h2> <ul class="star-rating"> <li> <%= link_to "1", @plugin.rate_it(1), :method => :post, :title => "1 star out of 5", :class => "one-star" %> </li> <li> <%= link_to "2", plugin_ratings_path(@plugin, :rating => 2), :method => :post, :title => "2 stars out of 5", :class => "two-stars" %> </li> <li> <%= link_to "3", plugin_ratings_path(@plugin, :rating => 3), :method => :post, :title => "3 stars out of 5", :class => "three-stars" %> </li> <li> <%= link_to "4", plugin_ratings_path(@plugin, :rating => 4), :method => :post, :title => "4 stars out of 5", :class => "four-stars" %> </li> <li> <%= link_to "5", plugin_ratings_path(@plugin, :rating => 5), :method => :post, :title => "5 stars out of 5", :class => "five-stars" %> </li> </ul> </div> The problem is that we're using code for a different plugin. When I try to actually "rate" one of the plugins, I get an "unknown attribute" error. That makes sense. I'm using attribute names for the "old" plugin, but I should be using attributes names for the "new" plugin. The problem is...I've tried using a variety of different attribute names and I keep getting the same error. From the README for the "new" plugin, I think I should be using some of these but I haven't been able to get them working: Install the plugin into your vendor/plugins directory, insert 'acts_as_rateable' into your model, then restart your application. class Post < ActiveRecord::Base acts_as_rateable end Now your model is extended by the plugin, you can rate it ( 1-# )or calculate the average rating. @plugin.rate_it( 4, current_user.id ) @plugin.average_rating #=> 4.0 @plugin.average_rating_round #=> 4 @plugin.average_rating_percent #=> 80 @plugin.rated_by?( current_user ) #=> rating || false Plugin.find_average_of( 4 ) #=> array of posts See acts_as_rateable.rb for further details! I'm guessing that I might have to make some "bigger" changes to get this plugin working. I'm asking this question to learn and only learn. The book gives code to get things working with the old plugin, but if one were actually building this app today it would be necessary to use this "new" plugin, so I would like to see how it could be used. Cheers! Any ideas on what I could change to get the "new" plugin working?

    Read the article

  • Storing expression template functors

    - by UncaughtException
    Hello guys, at the moment I'm really interested in expression templates and want to code a library for writing and differentiating mathematical functions with a lambda-style syntax. At the moment, I'm able to write (_x * _x)(2); and get the correct result 4. But I would really like to do something like MathFunction f = _x * _x; f(2);, but I don't have any ideas on how to cope with the recursive expression templates on the right side. Is it possible to achieve this without using the 'auto'-Keyword instead of MathFunction or having to make the operator() virtual? Thanks for your help!

    Read the article

  • MYSQL - REMOVE HTML TAGS from Record

    - by Dam
    Need help to form the MYSQL query from table one column having the bellow content Row1 : this is first <a href='mytext.txt'>row</a> from the table Row 2 : THis is the second row <img src ='mytext.jpg'> my image is there Row 3 : <p>This is the Third row my mytext is there </p> Row 4 : <p class='te_mytext'>This is the Third row my text is there </p> this is the table rows i try to search the keyword as 'mytext' my query is SELECT * from table WHERE colmn_name ` like '%mytext%' " i will get all the 4 rows as result but the result is wrong ..... need to get the correct output as only Row 3 the reason this row only having the mytext inside the content all other are not in content but mytext having in all rows how can i write the Query MYSQL please help me (NOT in PHP only MYSQL )

    Read the article

  • BlackBerry - Convert EncodedImage to byte []

    - by user324884
    I am using below code where i don't want to use JPEGEncodedImage.encode because it increases the size. So I need to directly convert from EncodedImage to byte array. FileConnection fc= (FileConnection)Connector.open(name); is=fc.openInputStream(); byte[] ReimgData = IOUtilities.streamToBytes(is); EncodedImage encode_image = EncodedImage.createEncodedImage(ReimgData, 0, (int)fc.fileSize()); encode_image = sizeImage(encode_image, (int)maxWidth,(int)maxHeight); JPEGEncodedImage encoder=JPEGEncodedImage.encode(encode_image.getBitmap(),50); ReimgData=encoder.getData(); is.read(ReimgData); HttpMultipartRequest( content[0], content[1], content[2], params, "image",txtfile.getText(), "image/jpeg", ReimgData );

    Read the article

  • How do I create a point system in a Rails/Twitter app that assigns points to users and non-authentic

    - by codyvbrown
    I'm building a question and answer application on top of twitter and I'm hitting some snags because I'm inevitably dealing with two classes of users: authenticated and non-authenticated. The site enable users to give points to other users, who may or may not be authenticated, and I want to create a site-wide point system where the application stores and displays this information on their profile. I want to save this point data to the user because that would be faster and more efficient but non-authenticated users aren't in our system, we only have the twitter handle. So instead we display the points in our system like this: @points = point.all( :select => "tag, count(*) AS count", # Return tag and count :group => 'tag', # Group by the tag :order => "2 desc", :conditions => {:twitter_handle => params[:username]}) Is there a better way to do this? Is there a better way to associate data with non-authenticated users?

    Read the article

  • Returnimng collection of interfaces

    - by apoorv020
    I have created the following interface public interface ISolutionSpace { public boolean isFeasible(); public boolean isSolution(); public Set<ISolutionSpace> generateChildren(); } However, in the implementation of ISolutionSpace in a class called EightQueenSolutionSpace, I am going to return a set of EightQueenSolutionSpace instances, like the following stub: @Override public Set<ISolutionSpace> generateChildren() { return new HashSet<EightQueenSolutionSpace>(); } However this stub wont compile. What changes do I need to make? EDIT: I tried 'HashSet' as well and had tried using the extends keyword. However since 'ISolutionSpace' is an interface and EightQueenSolutionSpace is an implementation(and not a subclass) of 'ISolutionSpace', it is still not working.

    Read the article

  • Android Samsung S2 spannablestringbuilder error

    - by Bilal Akmal
    I'm working on an app which fetches data from server using JSON. It is working fine in emulator but in my phone, it is giving error and not getting data. The error comes at this point in JSON Parser.... HttpPost httpPost = new HttpPost(url); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost);//Error Point httpEntity = httpResponse.getEntity(); On the third line logcat shows.... SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length I have searched a lot but it doesn't help me.

    Read the article

  • very simple delegate musing

    - by Ted
    Sometimes the simplest questions make me love C/C++ and C# more and more. Today sitting on the bus musing aout delegates I remembered reading somwhere you don't need to use the new keyword when instaniating a new delegate. For example: public static void SomeMethod(string message) { ... } ... public delegate void TestDelgate(string message); //Define a delegate ........... //create a new instance ..METHOD 1 TestDelgate t = new TestDelgate(SomeMethod); //OR another way to create a new instance ..METHOD 2 TestDelgate t = SomeMethod; //create a new instance ..METHOD 2 So todays questions are What happens under the hood in method 2. Does the compiler expand method 2 into method 1, hence writing TestDelgate t = SomeMethod; is just a shortcut for TestDelgate t = new TestDelgate(SomeMethod);, or is there another reason for the exsitence of method 2 Do you guys think method 1 or method 2 is better for readability (this is a subjective question, but I'd just like to get a unscientific feel of general opinion of stackoverflow :-))

    Read the article

  • ok.. what's with this 'var' thing in C#?? [closed]

    - by KevinDeus
    Possible Duplicate: Use of var keyword in C# I have ReSharper, which is a pretty good tool to remind me of some good programming practices.. for example it always recommends that I use the most narrowed convention I can use when passing variables to functions (such as recommending IEnumerable instead of List when I fail to use any of List's specific function. Awesome. However, one of its new behaviors (for C# 4.0) is to remind me at every opportunity to use 'var' when declaring variables. Now I know that there are some valid uses of 'var', but do I really want to use it all the time? I'm sure that ReSharper has a reason for this, but I can't figure it out.. for me it makes the code less readable..

    Read the article

< Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >