Search Results

Search found 2947 results on 118 pages for 'params noob'.

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

  • Rails noob - How to work on data stored in models

    - by Raghav Kanwal
    I'm a beginner to Ruby and Rails, and I have made a couple applications like a Microposts clone and a Todo-List for starters, but I'm starting work on another project. I've got 2 models - user and tracker, you log in via the username which is authenticated and you can log down data which is stored in the tracker table. The tracker has a column named "Calories" and I would like Rails to sum all of the values entered if they are on the same date, and output the result which is subtracted from, say 3000 in a new statement after the display of the model. I know what I'm talking about is just ruby code, im just not sure how to incorporate it. :( Could someone please guide me through this? And also link me to some guides/tutorials which teach working on data from models? Thank you :)

    Read the article

  • SharePointBeginners: A new group for a global noob community

    - by PeterBrunone
    Recently, a discussion broke out (go figure) on a SharePoint list that I frequent.  It had grown in size to the point where the more advanced members were sometimes turned off by the volume of questions that appeared TOO simple.  This happens all the time, as something becomes larger and specialization is necessary.Anyhoo, my response was to create the SharePoint Beginners group.  Come out and join us at http://groups.google.com/group/sharepointbeginners , where no question is too simple; all we ask is to show us that you tried to find the answer.

    Read the article

  • TypeScript or JavaScript for noob web developer [closed]

    - by Phil Murray
    Following the recent release by Microsoft of TypeScript I was wondering if this is something that should be considered for a experienced WinForm and XAML developer looking to get into more web development. From reviewing a number of sites and videos online it appears that the type system for TypeScript makes more sense to me as a thick client developer than the dynamic type system in Javascript. I understand that Typescript compiles down to JavaScript but it appears that the learning curve is shallower due to the current tooling provided by Microsoft. What are your thoughts?

    Read the article

  • Noob-Friendly Guides to WSGI?

    - by Johnny McKenzie
    world! I have recently been delving into server-side code web development with python, and I have hit a brick wall; you see, I know little about server side code and HTTP (other than the v. basics with php shudder), and all of the docs for wsgi that I have found seem to be for people already well established in the field. Are there any n00b happy guides for server-side scripting (the theory of), or on wsgi out there. Http would be helpful, video tuts are also greatly appreciated. Thanks in advance.

    Read the article

  • A real noob question

    - by Jaymz
    I have a Hp mini netbook that has been wiped clean, there is nothing other than the bios on it, it has no DVD and I don't have an external DVD. I can change the boot order to boot from a usb device. I have downloaded ubuntu-12.04.1-desktop-i386 I have one of these http://www.kikatek.com/P100600/34609-IOMEGA-250gb-Select-Portable-HDD-2-5-USB?source=froogle currently formatted to NTFS but I can format to exFAT I have tried Linuxlive USB creator, all that managed to do was dual boot the desktop pc that I'm working off, and when booting on the wiped clean netbook, just left me with a black screen with a blinking cursor I have also tried Unetbootin, this managed to change my 'My Computer' icon to Install Ubuntu (C:) and now again, my desktop pc dual boots with the Wubi software, the Unetbootin, wouldn't let me select my external drive to write to Please I'm a complete idiot, i need a super idiots guide to doing this Regards Jaymz

    Read the article

  • mobile app development noob

    - by hit
    I know c, most of c++, a little assembly, win32 console, etc I'm looking for free, cross-platform, c / c++, emulator, etc I'm a beginner to the mobile app world, so I'm lost. some that pop to mind on this list: http://en.wikipedia.org/wiki/Mobile_application_development Airplay SDK, Aqua, BatteryTech, DragonFireSDK, IwGame Engine, Symbian, Windows Mobile i don't wanna use a API that is considered obsolete, if someone could set me on the right path, thanks

    Read the article

  • Joomla template parameters and params.ini - file becomes unwritable after save.

    - by Moak
    I am using wamp and creating a Joomla template with changeable parameters. initially the message is The parameter file \templates\ssc_2010\params.ini is writable! once I make changes everything works as expected, except now i get the message: The parameter file \templates\ssc_2010\params.ini is unwritable! One solution is to brows to the directory, right click the file, select properties, and uncheck read-only. Again the file is writable but once I modify the parameters again it becomes read only again. I'm quite lazy and would like to prevent this from happening again, I've notice this happening in past projects, but now I have to work a lot with parameters so it becomes quite boring doing manual labor like that :P

    Read the article

  • Accessing the params hash for year and month rails and using in helper

    - by Matt
    So I took some php code and turned it into a calendar with a helper to make a simple calendar. I got my data from inside the helper: def calendar_maker a = Time.now b = a.month d = a.year h = Time.gm(d,b,1) #first day of month Now I want to try and do it with parameters within my method #from the helper file def calendar_maker(year, month) a = Time.now b = month c = year h = Time.gm(d,b,1) #first day of month #from my html.erb file <%= @month %> and <%= @year %> <%= params["month"] %><br /> <%= params["action"] %><br /> <%= params["year"] %><br /> <%= calendar_maker( @year, @month) %> #from controller file def calendar @month = params[:month] @year = params[:year] end Anyways mistakes were made and not finding documentation anywhere or not looking in the right place. How do I get this to work with my params hash. Thanks for the help.

    Read the article

  • 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

  • Directory Not Found Error

    - by noobguy
    I am trying to verify tails and when I get to the command prompt portion of the verification some difficulties seem to have arose. Below is the script: noob@noob-System-Product-Name:~$ cd [/media/noob/UUI] bash: cd: [/media/noob/UUI]: No such file or directory noob@noob-System-Product-Name:~$ gpg --keyid-format long --import tails-signing.key gpg: can't open `tails-signing.key': No such file or directory gpg: Total number processed: 0 Same thing happens when I try from download directory; noob@noob-System-Product-Name:~$ cd [/home/noob/Downloads] bash: cd: [/home/noob/Downloads]: No such file or directory noob@noob-System-Product-Name:~$ gpg --keyid-format long --import tails-signing.key gpg: can't open `tails-signing.key': No such file or directory gpg: Total number processed: 0 Any suggestions would be greatly appreciated.

    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

  • linux nooB: Installing ffmpeg + dependencies on aws linux ami (repo issues)

    - by HdN8
    Im installing ffmpeg to run on an amazon linux ami, and have added the rpmforge repo and the dag repo. Here are some guidelines I'm using for reference: TWoZaO and Razuna The rpmforge repo has ffmpeg, but if you try to install it then it will complain that is missing dependencies (for me libSDL-1.2.so.0()(64bit)). Regardless I will install ffmpeg from svn so I can be sure to enable the options I want (namely libx264). It seems strange to me though that SDL is not in rpmforge or dag, and in according to both of my references above, it should be there. I tried to grab it manually from here, but it needs these dependencies, so no-go: error: Failed dependencies: SDL = 1.2.10-8.el5 is needed by SDL-devel-1.2.10-8.el5.x86_64 alsa-lib-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libGL-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libGLU-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libSDL-1.2.so.0()(64bit) is needed by SDL-devel-1.2.10-8.el5.x86_64 libX11-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXext-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXrandr-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXrender-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 libXt-devel is needed by SDL-devel-1.2.10-8.el5.x86_64 Any advice for a linux nooB lost in a mess of repos and dependency errors?

    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

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