Search Results

Search found 8839 results on 354 pages for 'optional parameters'.

Page 10/354 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Unity-Animation parameters are not being set

    - by user1814893
    I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); animator.SetBool("Jump",true); and animator is the correctly referenced animator object. However the values that the parameters are set to do not appear to change in the animator window, nor do they appear to impact what is happening on the screen. However they do seem to impact the values obtained when doing the following: animator.GetFloat("walkingSpeed"); The animator consists of the shown blend tree, which works correctly and is always active, however due to the values not being changed it does not blends, and always acts as if the value with which it blends (walkingSpeed is 0). What is going on?

    Read the article

  • C# replacing out parameters with struct

    - by Jonathan
    I'm encountering a lot of methods in my project that have a bunch of out parameters embedded in them and its making it cumbersome to call the methods as I have to start declaring the variables before calling the methods. As such, I would like to refactor the code to return a struct instead and was wondering if this is a good idea. One of the examples from an interface: void CalculateFinancialReturnTotals(FinancialReturn fr, out decimal expenses, out decimal revenue, out decimal levyA, out decimal levyB, out decimal profit, out decimal turnover, out string message) and if I was to refactor that, i would be putting all the out parameters in the struct such that the method signature is much simpler as below. [structName] CalculateFinancialReturnTotals(FinancialReturn fr); Please advise.

    Read the article

  • SharePoint and Visual Studio - Replaceable parameters

    - by Sahil Malik
    SharePoint 2010 Training: more information What is a replaceable parameter? Sometimes you may see something like $SharePoint.Project.AssemblyFullName$ in your code. Visual studio is doing some magic to replace it during compile/build time with the full assembly signature. The following apply to these tokens or replaceable parameters - Tokens can be specified anywhere in a line. Tokens cannot span multiple lines. The same token may be specified multiple times on the same line and in the same file. Different tokens may be specified on the same line. Tokens that do not follow these rules are ignored without providing a warning or error. The replacement of tokens by string values is done immediately after manifest transformation, thus allowing manifest templates edited by a user to use tokens. Visual studio supports the following replaceable parameters -   Name Read full article ....

    Read the article

  • Optional read from STDIN in C

    - by Yuval A
    My application is basically a shell which expects an input of type cmd [x], where cmd is constant and x is optional. So cmd 1 is legal as well as cmd by itself - then I assume a default parameter for x. I am doing this: char cmd[64]; scanf("%s", cmd); int arg; scanf("%d", &arg); // but this should be optional How can I read the integer parameter, and set it to a default if none is currently available in the prompt? I do not want the prompt to wait for additional input if it was not given in the original command. I tried several versions using fgetc() and getchar() and comparing them to EOF but to no avail. Each version I tried ends up waiting on that optional integer parameter.

    Read the article

  • Optional attribute values in MappedField

    - by David Brooks
    I'm new to Scala and Lift, coming from a slightly odd background in PLT Scheme. I've done a quick search on this topic and found lots of questions but no answers. I'm probably looking in the wrong place. I've been working my way through tutorials on using Mapper to create database-backed objects, and I've hit a stumbling block: what types should be used to stored optional attribute values. For example, a simple ToDo object might comprise a title and an optional deadline (e.g. http://rememberthemilk.com). The former would be a MappedString, but the latter could not be a MappedDateTime since the type constraints on the field require, say, defaultValue to return a Date (rather than a Date or null/false/???). Is an underlying NULL handled by the MappedField subclasses? Or are there optional equivalents to things like MappedInt, MappedString, MappedDateTime that allow the value to be NULL in the database? Or am I approaching this in the wrong way?

    Read the article

  • Function that requires many parameters

    - by user877329
    I have a problem related to this: Are there guidelines on how many parameters a function should accept? In my case, I have a function that describes a rounded rectangle. The caller specifies An integer which determines how the rectangle should be merged into previously created shapes An Anchor, which is a point that is used for alignment (right, left, top, bottom etc). (0,-1) means that position (next parameter) describes the top, middle point of the rectangle. The position of the rectangle Width and height Corner radius Should I use Parameter Object pattern in this case? It is hard to see how these parameters are related

    Read the article

  • associating a filetype with a batch script, and getting parameters passed to file of that type.

    - by Carson Myers
    Sorry for the cryptic title. I have associated python scripts with a batch file that looks like this: python %* I did this because on my machine, python is installed at C:\python26 and I prefer not to reinstall it (for some reason, it won't let me add a file association to the python interpreter. I can copy the executable to Program Files and it works -- but nothing out of Program Files seems to work). Anyways, I can do this, so far: C:\py django-admin C:\py python "C:\python26\Lib\site-packages\django\bin\django-admin.py" Type 'django-admin.py help' for usage. C:\py django-admin startproject myProj C:\py python "C:\python26\Lib\site-packages\django\bin\django-admin.py" Type 'django-admin.py help' for usage. but the additional parameters don't get passed along to the batch script. This is getting very annoying, all I want to do is run python scripts :) How can I grab the rest of the parameters in this situation?

    Read the article

  • Python: How To copy function parameters into object's fields effortlessly ?

    - by bandana
    Many times I have member functions that copy parameters into object's fields. For Example: class NouveauRiches(object): def __init__(self, car, mansion, jet, bling): self.car = car self.mansion = mansion self.jet = jet self.bling = bling Is there a python language construct that would make the above code less tedious? One could use *args: def __init__(self, *args): self.car, self.mansion, self.jet, self.bling = args +: less tedious -: function signature not revealing enough. need to dive into function code to know how to use function -: does not raise a TypeError on call with wrong # of parameters (but does raise a ValueError) Any other ideas? (Whatever your suggestion, make sure the code calling the function does stays simple)

    Read the article

  • Optional parameters for interfaces

    - by bryanjonker
    Using c# 4.0 -- building an interface and a class that implements the interface. I want to declare an optional parameter in the interface and have it be reflected in the class. So, I have the following: public interface IFoo { void Bar(int i, int j=0); } public class Foo { void Bar(int i, int j=0) { // do stuff } } This compiles, but it doesn't look right. The interface needs to have the optional parameters, because otherwise it doesn't reflect correctly in the interface method signature. Should I skip the optional parameter and just use a nullable type? Or will this work as intended with no side effects or consequences?

    Read the article

  • reading parameters and files on browser, looking how to execute on server

    - by jbcolmenares
    I have a site done in Rails, which uses javascript to load files and generate forms for the user to input certain information. Those files and parameters are then to be used in a fortran code on the server. When the UI was on the server (using Qt), I would create a parameters file and execute the fortran code using threads so I wouldn't block the computer. Now that is web-based, I need to make the server and browser talk. What's the procedure for that? where should I start looking? I'm already using rails + javascript. I need that extra tool to do the talking, and no idea where to start.

    Read the article

  • LDAP :Failed to find add in mandatory or optional attribute list

    - by Manju Prabhu
    I am trying to import an ldif file which has following content- DN: cn=myUser,cn=Users,dc=us,dc=oracle,dc=com objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetorgperson objectclass: orcluser objectclass: orcluserV2 cn: myUser givenname: myUser mail: myUser orclsamaccountname: myUser sn: myUser uid: myUser userpassword:: somepassword dn: cn=Administrator,cn=Groups,dc=us,dc=oracle,dc=com objectclass: person changetype: modify add: uniquemember uniquemember: cn=myUser,cn=Users,dc=us,dc=oracle,dc=com When I do this, LDAP throws follwing error javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - Failed to find add in mandatory or optional attribute list.]; remaining name 'cn=Administrator,cn=Groups,dc=us,dc=oracle,dc=com' The user gets imported, but it is not added to the group(Group exists). What am i missing ?

    Read the article

  • What is the proper odbc command for calling Oracle stored procedure with parameters from .Net?

    - by Hamish Grubijan
    In the case of MSFT SQL Server 08, it is: odbcCommand = new OdbcCommand("{call " + SP_NAME + " (?,?,?,?,?,?,?) }", odbcConn); When I try to do the same thing for Oracle, I get: OdbcException: ERROR [HYC00] [Oracle][ODBC]Optional feature not implemented. Feel free to ask for clarification, and please help. I am using .Net 3.5, SQL Server 08, and Oracle 11g_home1. P.S. The Oracle stored procedure does have some 3 more parameters, but I believe I am handling this in my code.

    Read the article

  • Is there a significant mechanical difference between these faux simulations of default parameters?

    - by ccomet
    C#4.0 introduced a very fancy and useful thing by allowing default parameters in methods. But C#3.0 doesn't. So if I want to simulate "default parameters", I have to create two of that method, one with those arguments and one without those arguments. There are two ways I could do this. Version A - Call the other method public string CutBetween(string str, string left, string right, bool inclusive) { return str.CutAfter(left, inclusive).CutBefore(right, inclusive); } public string CutBetween(string str, string left, string right) { return CutBetween(str, left, right, false); } Version B - Copy the method body public string CutBetween(string str, string left, string right, bool inclusive) { return str.CutAfter(left, inclusive).CutBefore(right, inclusive); } public string CutBetween(string str, string left, string right) { return str.CutAfter(left, false).CutBefore(right, false); } Is there any real difference between these? This isn't a question about optimization or resource usage or anything (though part of it is my general goal of remaining consistent), I don't even think there is any significant effect in picking one method or the other, but I find it wiser to ask about these things than perchance faultily assume.

    Read the article

  • Implicitly including optional dependencies in Maven

    - by Jon Todd
    I have a project A which has a dependency X. Dependency X has an optional dependency Y which doens't get included in A by default. Is there a way to include Y in my POM without explicitly including it? In Ivy they have a way to essentailly say include all optional dependencies of X, does Maven have a way to do this?

    Read the article

  • jQuery UI Autocomplete plug-in pass in optional data for ajax call

    - by dev.e.loper
    I'm using jQuery UI Autocomplete plug-in. I'm giving it an URL to make an ajax call and retrieve data. I want to pass optional data parameters but not as part of URL. In the code they make a getJSON call and pass in 'request' parameter(which is an optional data parameter), however I don't see a way to get at this request parameter. this.source = function( request, response ) { $.getJSON( url, request, response ); };

    Read the article

  • External USB HD with -optional- mains?

    - by Stephen
    Hi, I'm Christmas-present-buying, and I'd appreciate recommendations for a USB HD with an optional mains power input. I've hunted, but can't find all the information I want (partially due to sketchy product specifications). Background: This is for a digital TV which I do not own, and so I'd like to get it correct first time. The TV has a USB port to allow recording straight to disk, but the manuals don't say how much power can be drawn through the USB port. The manual's instructions state, possibly generically, to plug the drive in before connecting to the TV. Ideally I'd like a small (2.5"?) drive which can draw power over USB, with an mains power input if it turns out the USB port on the TV doesn't offer enough juice. The ideal is to use one cable, two max. A powered USB hub would introduce too much clutter. I've spotted that the LaCie Petit drives have what appears to be an additional power input, but I'm not even sure from the specs what that is. And the device doesn't ship with a mains adapter. Suggestions?

    Read the article

  • External SATA drive does not work without the optional USB cable *also* connected

    - by Software Monkey
    I have Vantec NST-260SU external eSATA/USB drive enclosure (which came with an optional separate power supply) connected to a relatively new Windows 7 computer. The drive should work as a SATA drive with either the separate power supply or using a USB cable solely for power. I would prefer to use the external power supply because I have used all my rear USB ports. Now, if I connect both the eSATA and USB cable, then: The drive shows in the BIOS list of AHCI drives (and not in the list of attached USB devices). Everything I can see about it in Computer Management seems to show it as a SATA driver (for example, it shows as "Location 0 (Channel 5, Target 0, Lun 0)" like my other SATA drives (and not "on USB Mass Storage Device" like my USB flash-drives). It seems very fast, very much faster than my USB flash drives. However, if I disconnect the USB cable and attach the power adapter instead, the drive does not show in the BIOS list and cannot be seen by Windows. The power LED on the enclosure is lit, and the drive enclosure becomes warm after running for a bit, so I am sure it is receiving power. Does anyone know if this device requires both the USB and eSATA cable, and if so, why? Or is there possibly something I need to do to reset the enclosure to not need the USB - the install instructions are pretty clear that you must connect the SATA cable before connecting the USB cable in order for the drive to function as SATA, which I am sure I did. PS: I have reviewed the small manual which came with it, which has not been of help.

    Read the article

  • Pass parameters to a script securely

    - by codeholic
    What is the best way to pass parameters to a forked script securely? E. g. passing parameters through command line operands is not secure, since someone who has an account on the host can run ps and see them. Unnamed pipe is quite secure, as far as I understand, isn't it? I mean, passing parameters to STDIN of the forked process. What about passing parameters in environment vars? Is it secure? What about passing parameters by other means I didn't mention?

    Read the article

  • How do I pass a variable number of parameters along with a callback function?

    - by Bungle
    I'm using a function to lazy-load the Sizzle selector engine (used by jQuery): var sizzle_loaded; // load the Sizzle script function load_sizzle(module_name) { var script; // load Sizzle script and set up 'onload' and 'onreadystatechange' event // handlers to ensure that external script is loaded before dependent // code is executed script = document.createElement('script'); script.src = 'sizzle.min.js'; script.onload = function() { sizzle_loaded = true; gather_content(module_name); }; script.onreadystatechange = function() { if ((script.readyState === 'loaded' || script.readyState === 'complete') && !sizzle_loaded) { sizzle_loaded = true; gather_content(module_name); } }; // append script to the document document.getElementsByTagName('head')[0].appendChild(script); } I set the onload and onreadystatechange event handlers, as well as the sizzle_loaded flag to call another function (gather_content()) as soon as Sizzle has loaded. All of this is needed to do this in a cross-browser way. Until now, my project only had to lazy-load Sizzle at one point in the script, so I was able to just hard-code the gather_content() function call into the load_sizzle() function. However, I now need to lazy-load Sizzle at two different points in the script, and call a different function either time once it's loaded. My first instinct was to modify the function to accept a callback function: var sizzle_loaded; // load the Sizzle script function load_sizzle(module_name, callback) { var script; // load Sizzle script and set up 'onload' and 'onreadystatechange' event // handlers to ensure that external script is loaded before dependent // code is executed script = document.createElement('script'); script.src = 'sizzle.min.js'; script.onload = function() { sizzle_loaded = true; callback(module_name); }; script.onreadystatechange = function() { if ((script.readyState === 'loaded' || script.readyState === 'complete') && !sizzle_loaded) { sizzle_loaded = true; callback(module_name); } }; // append script to the document document.getElementsByTagName('head')[0].appendChild(script); } Then, I could just call it like this: load_sizzle(module_name, gather_content); However, the other callback function that I need to use takes more parameters than gather_content() does. How can I modify my function so that I can specify a variable number of parameters, to be passed with the callback function? Or, am I going about this the wrong way? Ultimately, I just want to load Sizzle, then call any function that I need to (with any arguments that it needs) once it's done loading. Thanks for any help!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >