Search Results

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

Page 48/164 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • htaccess Rewrite Rule duplicate - help me out please / RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L]

    - by elmaso
    Hello, I have this code in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(.*)\+apple\+fruit/$ ?q=$1 [L] this turns the searchquery in /keyword+apple+fruit/ thats ok.. the only problem is, if I type in /keyword+apple+fruit +any+text+haha+ apple+fruit/ the htacces is showing content - but I don't want that. is there any command to say - ok apple + fruit only one time in the url and the second time send a 404 or show nothing.. thank you!!

    Read the article

  • String Parsing in C#

    - by Betamoo
    What is the most efficient way to parse a C# string in the form of "(params (abc 1.3)(sdc 2.0)....)" into a struct in the form struct Params { double abc,sdc....; } Thanks EDIT The structure always have the same parameters (number and names).. but the order is not granted..

    Read the article

  • I got an error when implementing tde in sql2008

    - by mahima
    while using USE mssqltips_tde; CREATE DATABASE ENCRYPTION KEY with ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert GO getting error Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'KEY'. Msg 319, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. please help in resolving the same as i need to implement Encryption on my DB

    Read the article

  • POST parameters strangely parsed inside phantomjs

    - by user61629
    I am working with PHP/CURL and would like to send POST data to my phantomjs script, by setting the postfields array below: In my php controller I have: $data=array('first' => 'John', 'last' => 'Smith'); $url='http://localhost:7788/'; $output = $this->my_model->get_data($url,$data); In my php model I have: public function get_data($url,$postFieldArray) { $ch = curl_init(); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFieldArray); curl_setopt($ch, CURLOPT_URL, $url); $output = curl_exec($ch); In my phantomJS script that I am running locally I have: // import the webserver module, and create a server var server = require('webserver').create(); var port = require('system').env.PORT || 7788; console.log("Start Application"); console.log("Listen port " + port); // Create serever and listen port server.listen(port, function(request, response) { // Print some information Just for debbug console.log("We got some requset !!!"); console.log("request method: ", request.method); // request.method POST or GET if(request.method == 'POST' ){ console.log("POST params should be next: "); console.log("POST params: ",request.post); exit; } I first start and run the phantomjs script (myscript.js) from the command line, then I run my php script. The output is: $ phantomjs.exe myscript.js Start Application Listen port 7788 null We got some requset !!! request method: POST POST params should be next: POST params: ------------------------------e70d439800f9 Content-Disposition: form-data; name="first" John ------------------------------e70d439800f9 Content-Disposition: form-data; name="last" Smith ------------------------------e70d439800f9-- I'm confused about the the output. I was expecting something more like: first' => 'John', 'last' => 'Smith Can someone explain why it looks this way? How can I parse the request.post object to assign to variables inside myscript.js

    Read the article

  • POST request from Python to PHP

    - by RainbowHat
    Python params = urllib.parse.urlencode({'spam': '1', 'eggs': '2', 'bacon': '3'}) binary_data = params.encode('utf-8') reg = urllib.request.Request("http://www.abc.com/abc/smart/ap/request/",binary_data) reg.add_header('Content-Type','application/x-www-form-urlencoded') f = urllib.request.urlopen(reg) print(f.read()) PHP if($_SERVER['REQUEST_METHOD'] == 'POST') { //parse_str($_SERVER['QUERY_STRING']); var_dump($_SERVER['QUERY_STRING']); } When i try print binary_data , it does show the parameter but by the time it reaches the PHP , i see nothing. Any idea?

    Read the article

  • Google search from within an iPhone app

    - by Chonch
    Hey, I want to have the user enter a keyword in my app and then search google for this keyword, perform some logic on the results and display a final conclusion to the user. Is this possible? How do I perform the search on google from my app? What is the format of the reply? If anybody has some code samples for this, they would be greatly appreciated. Thanks,

    Read the article

  • ruby on rails ferret search:.only 10 records are getting from table

    - by jissy
    ruby on rails ferret search:.only 10 records are getting from table.For pagination i did it ,but only 10 records are getting even though there exists more records satisfying the search condition.if any of you know how to solve this,please reply. no limit is givenf it is not a ferret search all records are getting from table , and pagination is working the code is: @search_sd_ticket_result=ServiceDeskTicket.find_with_ferret(params[:sd_ticket][:servicedeskticket]).paginate :per_page =5, :page=params[:page]

    Read the article

  • Clean way to assign value unless empty

    - by atmorell
    Hello, I often need to assign a variable, if the source value is set. So far I have done it like this: filters[:red] = params[:search][:red] unless params[:search][:red].nil? This works but looks a bit clumsy. There must be a more DRY way of getting this result. Any suggestions? Best regards. Asbjørn Morell.

    Read the article

  • What is wrong with this code? [closed]

    - by rajesh
    function checkLength(obj,url){ //alert("URL="+url+" OBJ="+obj); if(obj) { var params = 'query='+obj; var myAjax = new Ajax.Request(url, { method: 'post', parameters: params, onComplete: loadResponse }); } } The code isn't working, but I don't know why. I think I need to include other files, but I don't know which

    Read the article

  • i tried to implement tde in sql2008...n got the error below.....plz help me to resolve...

    - by mahima
    while using USE mssqltips_tde; CREATE DATABASE ENCRYPTION KEY with ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert GO getting error Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'KEY'. Msg 319, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. please help in resolving the same as i need to implement Encryption on my DB

    Read the article

  • ios how can user cancel facebook sign in?

    - by Jackson
    When a user gets to this screen, there is no way to cancel out of it. What can I do? To get this view in the first place I am running: NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: vid, @"link", vid, @"source", vid, @"picture", @"My Place", @"name", @"YouTube Presentation", @"caption", title, @"description", @"Enjoy this Video", @"message", nil]; [app.facebook dialog:@"stream.publish" andParams:params andDelegate:self];

    Read the article

  • Passing direct parameters to a Controller#method when testing via RSpec

    - by gmile
    Normally to pass parameters via in RSpec we do: params[:my_key] = my_value get :my_method Where my_method deals with what it received from params. But in my controller I have a method, which takes args directly i.e.: def my_method(*args) ... end How do I call the method with those args from within the test? I've tried get :my_method(args) but Ruby interpreter complains about syntax error.

    Read the article

  • Convert a form_tag select_datetime to SQL datetime

    - by Mitchell
    Hi I am trying to make a simple search form that uses a startTime and endTime to specify a time range. The db has a datetime field time that is compared against. So far when i try to use params[:startTime] in the controller I get an array of values which wont work with :conditions = ['time < ?', params[:endTime]] Is there a simple solution to parse the form's datetime to SQL datetime?

    Read the article

  • How do I convert a Twitter User ID to a Twitter Username

    - by codyvbrown
    Hi I'm building an app in rails that needs to convert a twitter id into the twitter username. This is the code that pulls the id. url = 'http://twitter.com/' + params[:username] buffer = open(url, 'UserAgent' = 'irb').read @vouched_user_twitter_id = buffer[/\d+(?=.rss)/] How do I use that number to pull the username once i no longer have params. Thanks!

    Read the article

  • order keywords by frequency in PHP mySql

    - by Gusepo
    Hello, I've got a database with video ids and N keywords for each video. I made a table with 1 video ID and 1 keyword ID in each row. What's the easiest way to order keywords by frequency? I mean to extract the number of times a keyword is used and order them. Is it possible to do that with sql or do I need to use php arrays? Thanks

    Read the article

  • what is the wrong in the code ???

    - by rajesh
    function checkLength(obj,url){ //alert("URL="+url+" OBJ="+obj); if(obj) { var params = 'query='+obj; var myAjax = new Ajax.Request(url, { method: 'post', parameters: params, onComplete: loadResponse }); } } is nor working why i think there is requirement of include some files in it.which is that??/

    Read the article

  • ajax functionality not working ???

    - by rajesh
    the problem is that 1)how can i come to know that the ajax is working properly?. 2)and how can i retrieve this sent data in controller in cakephp? function checkLength(obj,url){ alert("URL="+url+" OBJ="+obj); if(obj) { var params = 'query='+obj; var myAjax = new Ajax.Request(url,{method: 'post',parameters:params,onSuccess: loadResponse}); }

    Read the article

  • Ruby on Rails: instance & class variables not maintaining value in controller

    - by DerNalia
    at the top of my controller, outside of any method, I have @@javascript_is_disabled = false and I have methods that that the view calls and invokes something like this @@javascript_is_disabled = params[:javascript_disabled] but when I need the @@javascript_is_disabled in completely different method.. it is always false. I know it changes in the method with params args... cause those methods behave differently, and appropriately And ideas?

    Read the article

  • how to save related models with non-null foreign key

    - by Fortress
    I have a model called user which has_one email. I put the foreign key (NOT NULL) inside users table. Now I'm trying to save it in the following way: @email = Email.new(params[:email]) @email.user = User.new(params[:user]) @email.save This raises a db exception, because the foreign key constraint is not met (NULL is inserted into email_id). How can I elegantly solve this or is my data modeling wrong?

    Read the article

  • Can IDL evaluate strings as code?

    - by Carthage
    Is there any functionality in IDL that will allow it to evaluate a a string as code? Or, failing that, is there a nice, dynamic way of including /KEYWORD in functions? For example, if I wanted to ask them for what type of map projection the user wants, is there a way to do it nicely, without large if/case statements for the /Projection_Type keyword it needs? With even a small number of user options, the combinations would cause if/case statements to get out of hand very quickly to handle all the possible options.

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >