Search Results

Search found 2030 results on 82 pages for 'params'.

Page 2/82 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Shell how configure command to always work with some params?

    - by Gabriel L. Oliveira
    Hi. I want to know how to configure your environment to execute some command with specific params everytime you use it. So, if I have a command named: spec I want to know where I configure my bash to always use: spec -c --format nested instead of just 'spec' I tried to put this like an alias on my .bashrc file, like: alias spec='spec -c --format pretty' but didn't work. Any tip?

    Read the article

  • check params['Filedata'] in rails.

    - by krunal shah
    How to check that my params['Filedata'] is corrupted or not? I have function it's reading file from params['Filedata'] and writing it to the other file. File.open(upload_file, "wb") { |f| f.write(params['Filedata'].read) } this line working fine for me.. But when i am calling this function with delayed job funtion send_later than I am getting error with params['Filedata'].read.

    Read the article

  • Grails populate params with XML from POST request

    - by othman
    I have a RestFull grails api that i expose through grails Controller. I need to automatically bind the xml data sent in a POST request. I don't think using groovy bindData(object,params) works as the params reference seems not having the xml elements. i use the parseRequest=true in the UrlMappings but yet the params Object does'nt have the xml elements. am i missing some other config so that my params object get automatically populated with the xml body elements?

    Read the article

  • Browsing Your ADF Application Module Pooling Params with WLST

    - by Duncan Mills
    In ADF 11g you can of course use Enterprise Manager (EM) to browse and configure the settings used by ADF Business Components  Application Modules, as shown here for one of my sample deployed applications. This screen you can access from the EM homepage by pulling down the Application Deployment menu, and then ADF > Configure ADF Business Components. Then select the profile that you are actually using (Hint: look in the DataBindings.cpx file to work this out - probably the "Local" version unless you've explicitly changed it. )So, from this screen you can change the pooling parameters and the world is good. But what if you don't have EM installed? In that case you can use the WebLogic scripting capabilities to view (and Update) the MBean Properties. Explanation The pooling parameters and many others are handled through Message Driven Beans that are created for the deployed application in the server. In the case of the ADF BC pooling parameters, this MBean will combine the configuration deployed as part of the application, along with any overrides defined as -D environement commands on the JVM startup for the application server instance. Using WLST to Browse the Bean ValuesFor our purposes here I'm doing this interactively, although you can also write a script or write Java to achieve the same thing.Step 0: Before You Start You will need the followingAccess to the console on the machine that is running the serverThe WebLogic Admin username and password (I'll use weblogic/password as my example here - yours will be different)The name of the deployed application (in this example FMWdh_application1)The package path to the bc4j.xcfg file (in this example oracle.demo.fmwdh.model.service.common.bc4j.xcfg) This is based on the default path for your model project so it shoudl be fairly easy to work out.The BC configuration your AM is actually running with (look in the DataBindings.cpx for that. In this example DealHelpServiceDeployed is the profile being used..)Step 1: Start the WLST consoleTo start at the beginning, you need to run the WLST command but that needs a little setup:Change to the wlserver_10.3/server/bin directory e.g. under your Fusion Middleware Home[oracle@mymachine] cd /home/oracle/FMW_R1/wlserver_10.3/server/binSet your environment using the setWLSEnv script. e.g. on Oracle Enterprise Linux:[oracle@mymachine bin] source setWLSEnv.shStart the WLST interactive console[oracle@mymachine bin] java weblogic.WLSTInitializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandswls:/offline> Step 2:Enter the WLST commandsConnect to the server wls:> connect('weblogic','password')Change to the Custom root, this is where the AMPooling MBeans are registered wls:> custom()Change to the b4j MBean directorywls:> cd ('oracle.bc4j.mbean.config')Work out the correct directory for the AM configuration you need. This is the difficult bit, not because it's hard to do, but because the names are long. The structure here is such that every child MBean is displayed at the same level as the parent, so for each deployed application there will be many directories shown. In fact, do an ls() command here and you'll see what I mean. Each application will have one MBean for the app as a whole, and then for each deployed configuration in the .xcfg file you'll see: One for the config entry itself, and then one each for Security, DB Connection and AM Pooling. So if you deploy an app with just one configuration you'll see 5 directories, if it has two configurations in the .xcfg you'll see 9 and so on.The directory you are looking for will contain those bits of information you gathered in Step 0, specifically the Application Name, the configuration you are using and the xcfg name: First of all narrow your list to just those directories returned from the ls() command that begin oracle.bc4j.mbean.config:name=AMPool. These identify the AM pooling MBeans for all the deployed applications. Now look for the correct application name e.g. Application=FMWdh_application1The config setting in that sub-list should already be correct and match what you expect e.g. oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfgFinally look for the correct value for the AppModuleConfigType e.g. oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployedNow you have identified the correct directory name, change to that (keep the name on one line of course - I've had to split it across lines here for clarity:wls:> cd ('oracle.bc4j.mbean.config:name=AMPool,     type=oracle.bc4j.mbean.config.AppModuleConfigType.AMPoolType,    oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfg,    Application=FMWdh_application1,    oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployed') Now you can actually view the parameter values with a simple ls() commandwls:> ls()And here's the output in which you can view the realtime values of the various pool settings: -rw- AmpoolConnectionstrategyclass oracle.jbo.common.ampool.DefaultConnectionStrategy -rw- AmpoolDoampooling true -rw- AmpoolDynamicjdbccredentials false -rw- AmpoolInitpoolsize 2 -rw- AmpoolIsuseexclusive true -rw- AmpoolMaxavailablesize 40 -rw- AmpoolMaxinactiveage 600000 -rw- AmpoolMaxpoolsize 4096 -rw- AmpoolMinavailablesize 2 -rw- AmpoolMonitorsleepinterval 600000 -rw- AmpoolResetnontransactionalstate true -rw- AmpoolSessioncookiefactoryclass oracle.jbo.common.ampool.DefaultSessionCookieFactory -rw- AmpoolTimetolive 3600000 -rw- AmpoolWritecookietoclient false -r-- ConfigMBean true -rw- ConnectionPoolManager oracle.jbo.server.ConnectionPoolManagerImpl -rw- Doconnectionpooling false -rw- Dofailover false -rw- Initpoolsize 0 -rw- Maxpoolcookieage -1 -rw- Maxpoolsize 4096 -rw- Poolmaxavailablesize 25 -rw- Poolmaxinactiveage 600000 -rw- Poolminavailablesize 5 -rw- Poolmonitorsleepinterval 600000 -rw- Poolrequesttimeout 30000 -rw- Pooltimetolive -1 -r-- ReadOnly false -rw- Recyclethreshold 10 -r-- RestartNeeded false -r-- SystemMBean false -r-- eventProvider true -r-- eventTypes java.lang.String[jmx.attribute.change] -r-- objectName oracle.bc4j.mbean.config:name=AMPool,type=oracle.bc4j.mbean.config.AppModuleConfigType.AMPoolType,oracle.bc4j.mbean.config=oracle.demo.fmwdh.model.service.common.bc4j.xcfg,Application=FMWdh_application1,oracle.bc4j.mbean.config.AppModuleConfigType=DealHelpServiceDeployed -rw- poolClassName oracle.jbo.common.ampool.ApplicationPoolImpl Thanks to Brian Fry on the JDeveloper PM Team who did most of the work to put this sequence of steps together with me badgering him over his shoulder.

    Read the article

  • Pattern to iterate Request Params

    - by NOOBie
    My view is not a strongly typed view and I need to iterate through Request Params in the controller action to determine the values posted. Is there a better way to iterate through the nameValueCollection AllKeys? I am currently looping through the Request Params and setting values appropriately. foreach (var key in Request.Params.AllKeys) { if (key.Equals("CustomerId")) queryObject.CustomerId = Request.Params[key]; else if (key.Equals("OrderId")) queryObject.OrderId= Request.Params[key]; //and so on } I see a considerable amount of repetition in this code. Is there a better way to handle this?

    Read the article

  • RSpec View testing: How to modify params?

    - by sebastiangeiger
    I am trying to test my views with RSpec. The particular view that is causing me troubles changes its appearance depending on a url parameter: link_to "sort>name", model_path(:sort_by => 'name') which results in http://mydomain/model?sort_by=name My view then uses this parameter like that: <% if params[:sort_by] == 'name' %> <div>Sorted by Name</div> <% end %> The RSpec looks like this: it "should tell the user the attribute for sorting order" do #Problem: assign params[:sort_for] = 'name' render "/groups/index.html.erb" response.should have_tag("div", "Sorted by Name") end I would like to test my view (without controller) in RSpec but I can't get this parameter into my params variable. I tried assign in all different flavours: assign[:params] = {:sort_by => 'name'} assign[:params][:sort_by] = 'name' ... no success so far. Every idea is appreciated.

    Read the article

  • Get params value from component Joomla 3.0

    - by yogeshK
    I have saved value like this in my component table fields params. unique=1 default_value=Default validate=Validate validate_error_msg=Validate error messag searchable=1 Now i want to get value in my component.So I am passing values in my component's view.html.php in this way $params = new JForm($row->params); but its not working. Now I want to get value so I am taking like this $this->params->getValue('default_value'); But its not work where as in Joomla 2.5 ,we can get value like this $this->params->get('default_value');

    Read the article

  • Not able to save extjs combo using grails controller

    - by abhi
    Hi all, I am a newbie to grails/extjs I am developing a web based config tool for my team .My issue is with comboboxes of extjs I have three remote comboxes(many to one hibernate mappng).I am using hiddenName to submit its value field(which is id primay key of database) instead of its display field which is name which i get by rendering it as json.some how I see that if I select diff index other than which is loaded from db and try updating it.it definitely sends it as params but in save method of grails its not updated. I want to understand Why? I have pasted snippetof both combobox and grails method? { xtype : 'combo', id:'cpsServerid', fieldLabel : 'CpsServer', name : 'cpsServer', //hiddenId:'cpsID', hiddenName:'cpsID', store: cpsServerStore, displayField:'NAME', valueField:'ID', editable:true, typeAhead:true, mode:'remote', triggerAction:'all', width:300, autoScroll:true, selected:name, selectOnFocus:true}, GRAILS SAVE def saveApplicationSubscription = { println "saveApplicationSubscription, params = $params" ApplicationSubscription subscription if (params.id) { subscription = ApplicationSubscription.get(params.id as int) subscription.cpsServer = CpsServer.get(params.cpsID as int) subscription.topic = params.topic subscription.description = params.description subscription.subscriberApplication = SubscriberApplication.get(params.subAppID as int) subscription.outputQueue = OutputQueue.get(params.outputID as int) bindData(subscription , params) } else { params.id = 0 subscription = new ApplicationSubscription(params) subscription.id = params.id as int subscription.cpsServer = CpsServer.get(params.cpsID as int ) subscription.topic = params.topic subscription.description = params.description subscription.subscriberApplication = SubscriberApplication.get(params.subAppID as int) subscription.outputQueue = OutputQueue.get(params.outputID as int) // subscription.messageFormat = params.messageFormat } if (subscription.save()) { log.info("Saved ApplicationSubscription $subscription") render([success: true] as JSON) } else { log.info("Failed to save ApplicationSubscription $subscription, errors = ${subscription.errors}") render([success: false, errors: subscription.errors] as JSON) } } I would really apperciate any help

    Read the article

  • How to sanitize grape params

    - by Boti
    I want to mass update attributes of an entity. How can I sanitize properly the params which is coming from grape? This is my console log about the parameters: params.except(:route_info, :token, :id) => {"display_number"=>"7"} [18] pry(#<Grape::Endpoint>)> params.permit(:display_number) ArgumentError: wrong number of arguments (2 for 0..1) from /Users/boti/.rvm/gems/ruby-2.0.0-p353@thelocker/gems/hashie-2.0.5/lib/hashie/mash.rb:207:in `default' [19] pry(#<Grape::Endpoint>)> params.sanitize => nil

    Read the article

  • grails date from params in controller

    - by nils petersohn
    y is it so hard to extract the date from the view via the params in a grails controller? i don't want to extract the date by hand like this: instance.dateX = parseDate(params["dateX_value"])//parseDate is from my helper class i just want to use instance.properties = params you know :) in the model the type is java.util.Date and in the params is all the information (dateX_month, dateX_day, ...) i searched on the net and found nothing on this :( i hoped that grails 1.3.0 could help but still the same thing. i can't and will not belief that extracting the date by hand is nessesary!

    Read the article

  • doctrine query() params?

    - by fayer
    i created a Doctrine_Query and executes it but i wanna know what params i can pass to it. $q = Doctrine_Query::create() ->select('cl.id, cl.name') ->from('ContactList cl'); $contactLists = $q->execute($params, $hydrationMode); from the api documentation: execute($params = array(), $hydrationMode = null) where do they tell me about the params? and also hydration mode. seems like i cannot find anything in the documentations. would be great if they had a reference for everything. thanks

    Read the article

  • Get methods params type parsing wsdl file in a rails/ruby application

    - by Marco Sangiorgi
    Hi, I have a question about ruby and wsdl soap. I couldn't find a way to get each method's params and their type. For example, if I found out that a soap has a methods called "get_user_information" (using wsdlDriver) is there a way to know if this method requires some params and what type of params does it require (int, string, complex type, ecc..)? I'd like to be able to build html forms from a remote wsdl for each method... Sorry for my horrible English :D

    Read the article

  • remove params from form request

    - by joe
    Hello folks, Upon user interaction, I need to remove certain input params from an HTML form before submission. Using javascript to remove the input fields from the DOM doesn't seem to actually remove the params from being sent through the request. Is there a way to delete or clear the actual request params?

    Read the article

  • Rails dealing with blank params at controller level

    - by stephenmurdoch
    I have a User model: class User < ActiveRecord::Base has_secure_password # validation lets users update accounts without entering password validates :password, presence: { on: :create }, allow_blank: { on: :update } validates :password_confirmation, presence: { if: :password_digest_changed? } end I also have a password_reset_controller: def update # this is emailed to the user by the create action - not shown @user=User.find_by_password_reset_token!(params[:id]) if @user.update_attributes(params[:user]) # user is signed in if password and confirmation pass validations sign_in @user redirect_to root_url, :notice => "Password has been reset." else flash.now[:error] = "Something went wrong, please try again." render :edit end end Can you see the problem here? A user can submit a blank a password/confirmation and rails will sign them in, because the User model allows blank on update. It's not a security concern, since an attacker would still need access to a user's email account before they could get anywhere near this action, but my problem is that a user submitting 6 blank chars would be signed in, and their password would not be changed for them, which could lead to confusion later on. So, I've come up with the following solution, and I'd like to check if there's a better way of doing it, before I push to production: def update @user=User.find_by_password_reset_token!(params[:id]) # if user submits blank password, add an error, and render edit action if params[:user][:password].blank? @user.errors.add(:password_digest, "can't be blank.") render :edit elsif @user.update_attributes(params[:user]) sign_in @user redirect_to root_url, :notice => "Password has been reset." else flash.now[:error] = "Something went wrong, please try again." render :edit end end Should I be checking for nil as well as blank? Are there any rails patterns or idiomatic ruby techniques for solving this? [Fwiw, I've got required: true on the html inputs, but want this handled server side too.]

    Read the article

  • Android: Cannot get the httpPost params but can get the httpGet from php

    - by jjLin
    Here is my android code to send request: // defaultHttpClient DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(serverUrl); List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("abc", "abc2")); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); InputStream is = null; is = httpEntity.getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader( is, "UTF-8"), 8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); String json = ""; json = sb.toString(); Log.d("JSON", "JSON is:" + json); and here is my php code to get the request: <?php echo $_POST['abc']; ?> When I run the application, the string json is nothing. I expect to get JSON is:abc2 Then I change the some code, in android part: HttpPost httpPost = new HttpPost(serverUrl); change to: HttpPost httpPost = new HttpPost(serverUrl + "?abc=abc3"); in php part: <?php echo $_GET['abc']; ?> This time, the string json in logcat is JSON is:abc3. It is correct!! I have tried lots of time, but seems cannot send HttpPost request with params. Any one can help me to find out what wrongs with my code??

    Read the article

  • Get XML-RPC (Andorid - PHP) web service different params type

    - by Jovan
    Hi, I want to create XML-RPC web service for Andorid (client) - PHP (Server) communication I create XML-RPC PHP web service server using this tutorial: http://articles.sitepoint.com/article/own-web-service-php-xml-rpc/5 For andorid client web service I use this project: http://code.google.com/p/android-xmlrpc/ server and client communication is OK, but I have problem with getting params from andorid client to php server. From andorid client I send two params (first integer and second float number) Object[] params = { 3, 3.6f, }; method.call(params); , but I don't know how to handle this parameters in php server?? in php server there is some function , but with only one param ($news_id): function news_viewNewsItem ( $news_id ) { /* Define the query to fetch the news item */ $query = "SELECT * FROM kd_xmlrpc_news WHERE news_id = '" . $news_id . "'"; $sql = mysql_query ( $query ); if ( $result = mysql_fetch_array ( $sql ) ) { /* Extract the variables for sending in our server response */ $news_item['news_id'] = $result['news_id']; $news_item['date'] = XMLRPC_convert_timestamp_to_iso8601( mysql_datetime_to_timestamp( $result['date'] ) ); $news_item['title'] = $result['title']; $news_item['full_desc'] = $result['full_desc']; $news_item['author'] = $result['author']; /* Respond to the client with the news item */ XMLRPC_response(XMLRPC_prepare($news_item), KD_XMLRPC_USERAGENT); } else { /* If there was an error, respond with a fault code instead */ XMLRPC_error("1", "news_viewNewsItem() error: Unable to read news:" . mysql_error(), KD_XMLRPC_USERAGENT); } } In server.py file there is functions for every method but I dont know how to write in php server: def add(self, x, y): print print "input x=%s, y=%s" % (str(x), str(y)) sum = x + y print "output", sum print return sum Can some one help me with code , and tell me how to handle various types from client to server?? Thanks and Happy New Year

    Read the article

  • wsimport and header params for logging

    - by Milan
    I have this situation. Generating form based on the WSDL. I made it but I came to the situation when the wsimport tool generates classes with methods with params for header(for authentication) and the params are not just simple types. But some complex. The problem is that I dont know which classes will be generated so I need simple types for the methods. @WebMethod(operationName = "DNSLookup", action = "http://www.strikeiron.com/DNSLookup") @WebResult(name = "DNSLookupResult", targetNamespace = "http://www.strikeiron.com") @RequestWrapper(localName = "DNSLookup", targetNamespace = "http://www.strikeiron.com", className = "invoker.DNSLookup") @ResponseWrapper(localName = "DNSLookupResponse", targetNamespace = "http://www.strikeiron.com", className = "invoker.DNSLookupResponse") public SIWsOutputOfDNSInfo dnsLookup( @WebParam(name = "HostNameOrIPAddress", targetNamespace = "http://www.strikeiron.com") String hostNameOrIPAddress, @WebParam(name = "LicenseInfo", targetNamespace = "http://ws.strikeiron.com", header = true, partName = "LicenseInfo") LicenseInfo licenseInfo, @WebParam(name = "SubscriptionInfo", targetNamespace = "http://ws.strikeiron.com", header = true, mode = WebParam.Mode.OUT, partName = "SubscriptionInfo") Holder<SubscriptionInfo> subscriptionInfo); you can see that LicenseInfo licenseInfo, and Holder subscriptionInfo);? Is it possible to somehow to specify to have simple types for header params?

    Read the article

  • .NET: Preserving some, but not all query params during redirect

    - by kasper pedersen
    Hi all, Could someone tell me if the code below would achieve what I want, which is: Check if the query parameters 'return_path' and/or 'user_state' are present in the query string, and if so append them to the query string of the redirect URI. As I'm not a .NET dev and don't have a server to test this on, I was hoping someone could give me some feedback. ArrayList vars = new ArrayList(); vars.Add("return_path"); vars.Add("user_state"); string newUrl = "/new/request/uri" + "?"; ArrayList params = new ArrayList(); foreach ( string key in Request.QueryString ) { if (vars.contains(key)) { params.Add(key + "=" + HttpUtility.URLPathEncode(Request.QueryString[key])); } } String[] paramArr = (String[]) params.ToArray( typeof (string) ); String queryString = String.join("&", paramArr); Response.Redirect(newUrl); Thank you :)

    Read the article

  • Access params[] and local attributes in static class as *_filter

    - by Mattias
    Hi! I'm trying to refactor some code and move some of my before_filter's from the controller to a class. Before: class UsersController < ApplicationController before_filter :find_user def find_user @user = User.find(params[:id]) end end ... After class FindUserFilter def self.filter(controller) @user = User.find(params[:id]) end end class UsersController < ApplicationController before_filter FindUserFilter end class GuestbookController < ApplicationController before_filter FindUserFilter end This results in an error because neither params[:id] nor @user is available/definable in the FindUserFilter-class. Any idea how to fix this?

    Read the article

  • C# Func delegate with params type

    - by Sarah Vessels
    How, in C#, do I have a Func parameter representing a method with this signature? XmlNode createSection(XmlDocument doc, params XmlNode[] childNodes) I tried having a parameter of type Func<XmlDocument, params XmlNode[], XmlNode> but, ooh, ReSharper/Visual Studio 2008 go crazy highlighting that in red.

    Read the article

  • HttpProtocolParams.setUseExpectContinue(params, false) - when to set true?

    - by johnrock
    I am using org.apache.http.impl.client.DefaultHttpClient to retrieve xml from a webservice and am trying to determine whether to set HttpProtocolParams.setUseExpectContinue(params, true) or HttpProtocolParams.setUseExpectContinue(params, false). I am not clear on how to determine this. Can anyone offer a best practices guideline on when this should be true and when it should be false and also the possible implications of each setting? Thanks!

    Read the article

  • Passing input hidden params through urllib2 POST request

    - by ramrajedotcom
    I need to make POST request to CAS SSO server login page, and CAS login page has few input hidden params which are dynamically populated through java. I don't know how to read these hidden param values from response and pass in to CAS server. Without passing these hidden params I am not able to login. Does any one how to read input hidden param values from urllib2 response? Thanks in advance!

    Read the article

  • Using Func<...> and params?

    - by grady
    Hello, I wrote this code: public static bool MyMethod(int someid, params string[] types) {...} How could I write that using Func? public static Func < int, ?params?, bool > MyMethod = ??? Thanks :-)

    Read the article

  • Read from params[] in Rails

    - by Adnan
    Hi, I use: <%= select( "payment", "id", { "Visa" => "1", "Mastercard" => "2"}) %> and I get this in HTML <select id="payment_id" name="payment[id]"><option value="2">Mastercard</option> <option value="1">Visa</option></select> now how can I read the payment[id] with params[], if I use params[payment[id]] I get an error.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >