Search Results

Search found 7375 results on 295 pages for 'parameter'.

Page 21/295 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • MembershipUser class CreateUser password paramter

    - by d3020
    I'm using the ASP.NET Configuration for my users and their roles. I'm also using the MembershipUser class with its function CreateUser. I have it working, but was curious about something. When I add a new user and pass this function its password parameter (which in this case is coming from a textbox on the page). It seems like it only finds and accepts that textbox value when it is 6 chars or more. For example, if I type in ab123 it'll say object not set to instance of an object. However if I do abc123 it works fine. Where is that being told to do that. I didn't know if this was something I could change or where it might be doing that. Thanks.

    Read the article

  • Compilers behave differently with a null parameter of a generic method

    - by Eyal Schneider
    The following code compiles perfectly with Eclipse, but fails to compile with javac: public class HowBizarre { public static <P extends Number, T extends P> void doIt(P value) { } public static void main(String[] args) { doIt(null); } } I simplified the code, so T is not used at all now. Still, I don't see a reason for the error. For some reason javac decides that T stands for Object, and then complains that Object does not conform to the bounds of T (which is true): HowBizarre.java:6: incompatible types; inferred type argument(s) java.lang.Number,java.lang.Object do not conform to bounds of type variable (s) P,T found : <P,T>void required: void doIt(null); ^ Note that if I replace the null parameter with a non-null value, it compiles fine. Which of the compilers behaves correctly and why? Is this a bug of one of them?

    Read the article

  • tchar safe functions -- count parameter for UTF-8 constants

    - by Dustin Getz
    I'm porting a library from char to TCHAR. the count parameter of this fragment, according to MSDN, is the number of multibyte characters, not the number of bytes. so, did I get this right? _tcsncmp(access, TEXT("ftp"), 3); //or do i want _tcsnccmp? "Supported on Windows platforms only, _mbsncmp and _mbsnbcmp are multibyte versions of strncmp. _mbsncmp will compare at most count multibyte characters and _mbsnbcmp will compare at most count bytes. They both use the current multibyte code page. _tcsnccmp and _tcsncmp are the corresponding Generic functions for _mbsncmp and _mbsnbcmp, respectively. _tccmp is equivalent to _tcsnccmp."

    Read the article

  • Why is this default template parameter not allowed?

    - by Matt Joiner
    I have the following class: template <typename Type = void> class AlignedMemory { public: AlignedMemory(size_t alignment, size_t size) : memptr_(0) { int iret(posix_memalign((void **)&memptr_, alignment, size)); if (iret) throw system_error("posix_memalign"); } virtual ~AlignedMemory() { free(memptr_); } operator Type *() const { return memptr_; } Type *operator->() const { return memptr_; } //operator Type &() { return *memptr_; } //Type &operator[](size_t index) const; private: Type *memptr_; }; And attempt to instantiate an automatic variable like this: AlignedMemory blah(512, 512); This gives the following error: src/cpfs/entry.cpp:438: error: missing template arguments before ‘buf’ What am I doing wrong? Is void not an allowed default parameter?

    Read the article

  • webservice - unknown web method parameter name methodname

    - by ch3r1f
    I called a webservice for fetching items in fullcalendar. The method is never called and firebug gives this error: *"POST [http]://localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendario POST [http]://localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendario 500 Internal Server Error 1.01s" "unknown web method parameter name methodname"* Here is the asmx.vb code: <System.Web.Script.Services.ScriptService()> _ <System.Web.Services.WebService(Namespace:="http://localhost/uva/")> _ <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ Public Class ServicioFullCalendar Inherits System.Web.Services.WebService <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _ <WebMethod(MessageName:="ObtieneEventos")> _ Public Shared Function GetEventosCalendario(ByVal startDate As String, ByVal endDate As String) As String Try Return CalendarioMensualDAO.Instance.getEventos(startDate, endDate) Catch ex As Exception Throw New Exception("FullCalendar:GetEventos: " & ex.Message) Finally End Try End Function The webservice is "loaded" from the fullcalendar as follows: events: "ServicioFullCalendar.asmx/GetEventosCalendario",

    Read the article

  • Parsing a list of dictionaries passed as a POST parameter

    - by andyashton
    I have a list of python dictionaries that look like this: sandwiches = [ {'bread':'wheat', 'topping':'tomatoes', 'meat':'bacon'}, {'bread':'white', 'topping':'peanut butter', 'meat':'bacon'}, {'bread':'sourdough', 'topping':'cheese', 'meat':'bacon'} ] I want to pass this as a POST parameter to another Django app. What does the client app need to do to iterate through the list? I want to do something like: for sandwich in request.POST['sandwiches']: print "%s on %s with %s is yummy!" % (sandwich['meat'], sandwich['bread'], sandwich['topping']) But I don't seem to have a list of dicts when my data arrives at my client app.

    Read the article

  • what's the purpose of fcntl with parameter F_DUPFD

    - by Daniel
    I traced an oracle process, and find it first open a file /etc/netconfig as file handle 11, and then duplicate it as 256 by calling fcntl with parameter F_DUPFD, and then close the original file handle 11. Later it read using file handle 256. So what's the point to duplicate the file handle? Why not just work on the original file handle? 12931: 0.0006 open("/etc/netconfig", O_RDONLY|O_LARGEFILE) = 11 12931: 0.0002 fcntl(11, F_DUPFD, 0x00000100) = 256 12931: 0.0001 close(11) = 0 12931: 0.0002 read(256, " # p r a g m a i d e n".., 1024) = 1024 12931: 0.0003 read(256, " t s t p i _ c".., 1024) = 215 12931: 0.0002 read(256, 0x106957054, 1024) = 0 12931: 0.0001 lseek(256, 0, SEEK_SET) = 0 12931: 0.0002 read(256, " # p r a g m a i d e n".., 1024) = 1024 12931: 0.0003 read(256, " t s t p i _ c".., 1024) = 215 12931: 0.0003 read(256, 0x106957054, 1024) = 0 12931: 0.0001 close(256) = 0

    Read the article

  • Add parameter to PHP

    - by proyb2
    When I sent an image to the code below, uploadImage.php, through a POST method, how do I add a String parameter? <?php $hasError = false; foreach( $_FILES as $i=>$file ) { if ( $file['error'] ) { $hasError = true; } } if ( ! $hasError ) { $myFilePath = '_uploads/'.'_'.$file["name"]; $dta = file_get_contents($file['tmp_name']); file_put_contents($myFilePath, $dta); } else { echo('Stick custom error message here'); } ?>

    Read the article

  • Passing an array of data as an input parameter to an Oracle procedure

    - by Sathya
    I'm trying to pass an array of (varchar) data into an Oracle procedure. The Oracle procedure would be either called from SQL*Plus or from another PL/SQL procedure like so: BEGIN pr_perform_task('1','2','3','4'); END; pr_perform_task will read each of the input parameters and perform the tasks. I'm not sure as to how I can achieve this. My first thought was to use an input parameter of type varray but I'm getting Error: PLS-00201: identifier 'VARRAY' must be declared error, when the procedure definiton looks like this: CREATE OR REPLACE PROCEDURE PR_DELETE_RECORD_VARRAY(P_ID VARRAY) IS To summarize, how can I pass the data as an array, let the SP loop through each of the parameters and perform the task ? I'm using Oracle 10gR2 as my database.

    Read the article

  • Parameter passing Vs Table Valued Parameters Vs XML to SQL 2008 from .Net Application

    - by Harryboy
    As We are working on a asp .net project there three ways one can update data into database when there are multiple rows updation / insertion required Let's assume we need to update employee education detail (which could be 1,3,5 or 10 records) Method to Update Data Pass value as parameter (Traditional approach), If 10 records are there then 10 round trip required Pass data as xml and write logic inside your stored procedure to get that data from xml and update the table (only single roundtrip required) Use Table valued parameters (only single roundtrip required) Note : Data is available as List, so i need to convert it to xml or any other format if i need to pass. There are no. of places in entire application we need to update data in bulk (or multiple records) I just need your suggestions that Which method will be faster (please mention if there are some other overheads) Manageability or testability concern with any approach Any other bottleneck or issue with any of the approach (Serialization /Deserialization concern or limit on size of the data passing) Any other method you suggest for same operations Thanks

    Read the article

  • map.resource, parameter restrictions

    - by Tiago
    I've a controller :platform here. I'm trying to do something like: /:platform_name/ to redirect to its show, with the parameter. Here is what I've got: map.resource :platform, :as => ':platform_name', :platform_name => /pc|ps2|ps3|wii|ds|psp|xbox-360/ It's working fine. I've other neasted resources to it, and all them are accessing. But. The problem is, I've only those platform names, but when it doesnt fine another route, it aways fall on this. if I try /whatever/, it will look for the *platform_name = whatever*. I was expecting it to fall into the map.connect ':controller/:action/:id' rule. When I did *:platform_name = /pc|ps2|ps3|wii|ds|psp|xbox-360/*, wasnt expected that this rule only apply when the regular expression is fit? how could i restrict this?

    Read the article

  • how to get the type of a deferred template parameter

    - by smerlin
    Is there a way to get the defered type of a class template parameter ? template <class TPtr> struct foo { typedef TPtr ptr_type; typedef ??? element_type; /* shall be the type of a deferred TPtr*/ }; so foo<const char*>::element_type results in const char, and foo<std::vector<int>::iterator_type>::element_type results in int. i am aware of that i can use the value_type typedef for c++ iterators (like std::vector<int>::iterator_type::value_type), but raw pointers havent got a value_type typedef, so i am out of luck there.

    Read the article

  • Use a template parameter in a preprocessor directive?

    - by Ranju V
    Is it possible to use a non-type constant template parameter in a preprocessor directive? Here's what I have in mind: template <int DING> struct Foo { enum { DOO = DING }; }; template <typename T> struct Blah { void DoIt() { #if (T::Doo & 0x010) // somecode here #endif } }; When I try this with something like Blah<Foo<0xFFFF>>, VC++ 2010 complains something about unmatched parentheses in the line where we are trying to use "#if". I am guessing the preprocessor doesn't really know anything about templates and this sort of thing just isn't in its domain. What say? Thanks!

    Read the article

  • How to get url parameter value of current route in view in ASP .NET MVC

    - by Dima
    For example I am on page http://localhost:1338/category/category1?view=list&min-price=0&max-price=100 And in my view I want to render some form @using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { /*this is poblem place*/ } }, FormMethod.Get)) { <!--Render some controls--> <input type="submit" value="OK" /> } What I want is to get view parameter value from current page link to use it for constructing form get request. I tried @using(Html.BeginForm("Action", "Controller", new RouteValueDictionary { { "view", ViewContext.RouteData.Values["view"] } }, FormMethod.Get)) but it doesn't help.

    Read the article

  • Zend Framework Error:Invalid parameter number: no parameters were bound'

    - by roast_soul
    I'm using the Zend Frameworker 1.12. According to the help file, I used the Zend_Db_Statement to execute my sql. Below is my php code: $sql = "delete from options where id=?"; $stmt = new Zend_Db_Statement_Mysqli($this->getAdapter(), $sql); return $stmt->execute(array('1')); But the error is exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound' in D:\Zend\workspaces\DefaultWorkspace.metadata.plugins\org.zend.php.framework.resource\resources\ZendFramework-1\library\Zend\Db\Statement\Mysqli.php:209 Stack trace: ......... ......... I googled for days, but nothing works. Any one know how to fix it?

    Read the article

  • Using a ref Parameter with the this Keyword?

    - by grefly
    Is there a way to force the this keyword to act as a ref argument? I would like to pass in a visitor that modifies multiple properties on the object, but this only wants to act like a value parameter. Code in Object: public void Accept(Visitor<MyObject> visitor) { visitor.Visit(this); } Code in Visitor: public void Visit(ref Visitor<MyObject> receiver) { receiver.Property = new PropertyValue(); receiver.Property2 = new PropertyValue(); }

    Read the article

  • Copy constructor with more than one parameter

    - by Ravi Gupta
    I am learning C++ and was reading copy constructor from the C++: The Complete Reference. The books says that It is permissible for a copy constructor to have additional parameters as long as they have default arguments defined for them. However, in all cases the first parameter must be a reference to the object doing the initializing. But I am confused that how we are going to pass those additional parameters? I am sure there should be some way which is not given in the book and which I am unable to figure out. Can anyone help me out? EDIT: Also is it possible to pass these extra parameters in all three cases i.e. ¦ When one object explicitly initializes another, such as in a declaration ¦ When a copy of an object is made to be passed to a function ¦ When a temporary object is generated (most commonly, as a return value)

    Read the article

  • Problem calling stored procedure with a fixed length binary parameter using Entity Framework

    - by Dave
    I have a problem calling stored procedures with a fixed length binary parameter using Entity Framework. The stored procedure ends up being called with 8000 bytes of data no matter what size byte array I use to call the function import. To give some example, this is the code I am using. byte[] cookie = new byte[32]; byte[] data = new byte[2]; entities.Insert("param1", "param2", cookie, data); The parameters are nvarchar(50), nvarchar(50), binary(32), varbinary(2000) When I run the code through SQL profiler, I get this result. exec [dbo].[Insert] @param1=N'param1',@param2=N'param2',@cookie=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [SNIP because of 16000 zeros] ,@data=0x0000 All parameters went through ok other than the binary(32) cookie. The varbinary(2000) seemed to work fine and the correct length was maintained. Is there a way to prevent the extra data being sent to SQL server? This seems like a big waste of network resource.

    Read the article

  • oracle plsql: retrieve runtime parameter values when you call a procedure

    - by Luca Vaccaro
    I need a generalized method to get list of runtime parameters (values) when I call a procedure. I need something similar to the $$PLSQL_UNIT that returns the name of the running procedure. (plsql Oracle 10g) E.g. look at this sample procedure: (it simply prints its own name and parameters ) CREATE OR REPLACE PROCEDURE MY_PROC(ow in varchar2, tn IN varchar2) IS BEGIN dbms_output.put_line('proc_name: '||$$PLSQL_UNIT||' parameters: '|| ow||' '||tn ); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('ERRORE: ' ||SQLERRM); END MY_PROC; / Running procedure produces the following output: SQL> 1 BEGIN 2 IBAD_OWN.MY_PROC('first_par', 'second_par'); 3 END; 4 / proc_name: MY_PROC parameters: first_par second_par PL/SQL procedure successfully completed. I'm not satisfy because I can't copy and paste in all my procedures because I have to hard code each procedure to set their right parameter variables. Thanks in advance for the help.

    Read the article

  • Django Admin: Many-to-Many listbox doesn't show up with a through parameter

    - by NP
    Hi All, I have the following models: class Message(models.Model): date = models.DateTimeField() user = models.ForeignKey(User) thread = models.ForeignKey('self', blank=True, null=True) ... class Forum(models.Model): name = models.CharField(max_length=24) messages = models.ManyToManyField(Message, through="Message_forum", blank=True, null=True) ... class Message_forum(models.Model): message = models.ForeignKey(Message) forum = models.ForeignKey(Forum) status = models.IntegerField() position = models.IntegerField(blank=True, null=True) tags = models.ManyToManyField(Tag, blank=True, null=True) In the admin site, when I go to add/change a forum, I don't see the messages listbox as you'd expect. However, it shows up if I remove the 'through' parameter in the ManyToManyField declaration. What's up with that? I've registered all three models (plus Tag) to the admin site in admin.py. TIA

    Read the article

  • Problem passing a reference as a named parameter to a variadic function

    - by Michael Mrozek
    I'm having problems in Visual Studio 2003 with the following: void foo(const char*& str, ...) { va_list args; va_start(args, str); const char* foo; while((foo = va_arg(args, const char*)) != NULL) { printf("%s\n", foo); } } When I call it: const char* one = "one"; foo(one, "two", "three", NULL); I get: Access violation reading location 0xcccccccc on the printf() line -- va_arg() returned 0xcccccccc. I finally discovered it's the first parameter being a reference that breaks it -- if I make it a normal char* everything is fine. It doesn't seem to matter what the type is; being a reference causes it to fail at runtime. Is this a known problem with VS2003, or is there some way in which that's legal behavior? It doesn't happen in GCC; I haven't tested with newer Visual Studios to see if the behavior goes away

    Read the article

  • SQL CLR and nullable datetime parameter

    - by toluca70
    I'm trying to write a SQLCLR function that takes a DateTime2 as input and returns another DateTime2. Based on this post I altered the parameter to be the C# type DateTime giving me the level of precision I require. However because the input can be null I would like it to be DateTime?; the return type as well. using System; using Microsoft.SqlServer.Server; namespace SqlServer.Functions { public class UserDefinedFunctions { [SqlFunction(DataAccess = DataAccessKind.None)] public static DateTime? GetLocalTimeFromGMT(DateTime? dateTime) { if (dateTime.HasValue) return DateTime.SpecifyKind(dateTime.Value, DateTimeKind.Utc).ToLocalTime(); else return (DateTime?)null; } } } The problem is I get the following error when I try to deploy: Error 1 Cannot find the type 'Nullable`1', because it does not exist or you do not have permission. SqlServer.Functions I'm using Sql Server 2008 and Visual Studio 2008.

    Read the article

  • Value cannot be null.Parameter name: key when databind in ASP.NET

    - by Yongwei Xing
    Hi all I am triing to bind the data to a listbox from sql server then got the error "Value cannot be null.Parameter name: key" sqlCommand = "SELECT [Country] FROM [tbl_LookupCountry] where [Country] IS NOT NULL"; SqlConnection sqlConCountry = new SqlConnection(connectString); SqlCommand sqlCommCountry = new SqlCommand(); sqlCommCountry.Connection = sqlConCountry; sqlCommCountry.CommandType = System.Data.CommandType.Text; sqlCommCountry.CommandText = sqlCommand; sqlCommCountry.CommandTimeout = 300; sqlConCountry.Open(); reader = sqlCommCountry.ExecuteReader(); ddlCountry.DataSource = reader; ddlCountry.DataBind(); sqlConCountry.Close(); Does anyone meet this problem before?

    Read the article

  • How do I assign by "reference" to a class field in c#?

    - by Jamie
    I am trying to understand how to assign by "reference" to a class field in c#. I have the follwing example to consider: public class X { public X() { string example = "X"; new Y( ref example ); new Z( ref example ); System.Diagnostics.Debug.WriteLine( example ); } } public class Y { public Y( ref string example ) { example += " (Updated By Y)"; } } public class Z { private string _Example; public Z( ref string example ) { this._Example = example; this._Example += " (Updated By Z)"; } } var x = new X(); When running the above code the output is: X (Updated By Y) And not: X (Updated By Y) (Updated By Z) As I had hoped. It seems that assigning a "ref parameter" to a field loses the reference. Is there any way to keep hold of the reference when assigning to a field? Thanks.

    Read the article

  • How to write data by dynamic parameter name

    - by Maxim Welikobratov
    I need to be able to write data to datastore of google-app-engine for some known entity. But I don't want write assignment code for each parameter of the entity. I meen, I don't want do like this val_1 = self.request.get('prop_1') val_2 = self.request.get('prop_2') ... val_N = self.request.get('prop_N') item.prop_1 = val_1 item.prop_2 = val_2 ... item.prop_N = val_N item.put() instead, I want to do something like this args = self.request.arguments() for prop_name in args: item.set(prop_name, self.request.get(prop_name)) item.put() dose anybody know how to do this trick?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >