Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 158/297 | < Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >

  • jquery cookie - hoursToLive

    - by mathiregister
    Hi guys, i'm using the jquery cookie plugin. Everything works fine except the fact that I have no idea how to set an expiration-time for the cookie? $.cookie('opt_visible', 'true'); the jquery-cookie documentation says: hoursToLive (DEPRECATED for expiresAt) NUMBER For how many hours should the cookie be valid? (Passing 0 means to delete the cookie at the end of the browser session--this is default. Negative values will delete the cookie, but you should use the del() method instead.) That's exactly what I'd like to have. The cookie should be available as long as i'm browsing the site. As soon as i close the window or browsertab, the cookie should be deleted. How can i implement this hoursToLive thingy to my mentioned line above? Thank you

    Read the article

  • asp.net session error

    - by umeshchaurasia
    HI all, I am working with asp.net with c#.net Here i am using session state to pass the value from one page to another. i have two pages, in first page i am calculating the value and passing the value to second page using session and in second page i am displaying the message through the value. I am using these two pages for facebook application. I uploaded my two pages then i am checking with facebook by opening through internet explorer and its giving below error. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. But when i open my application using firefox the pages are working fine. please help me...

    Read the article

  • Why acegi (Spring Security) converts password to uppercase before comparing ?

    - by Tony
    One of my colleague in QA team reported a bug to me, the bug said that can't change password to lowercase, otherwise login is rejected,using number or uppercase is all fine. The login system was implemented using acegi 1.0 (now called Spring Security). This was a very strange bug,changing password is done by encrypting the user input string into MD5 string, I implemented this without using anything related acegi, I don't if the is the origin cause of the problem. When the login is rejected, through debugging, I find that, the user input is converted into uppercase by acegi when passing to the acegi comparing logic. At first, I didn't believe this, when I checkout the acegi source and debugging with it, I find it does convert both username and password to uppercase (source code line 121), Can you tell me why it does this? This can cause password encoding mismatch!

    Read the article

  • Problems executing check_mysql plugin

    - by Brian
    I'm attempting to test out the check_mysql plugin for Nagios using the command line. It works great when I'm just checking localhost but when I try to specify a different server (using the -H argument) I keep getting the following error message: CRITICAL - Unable to connect to mysql://nagios_user@{remoteServerHostname}/ - Access denied for user 'nagios_user'@'{localServerHostName}' (using password: YES) It looks like it's trying to connect to the database using the localhost server even though I've specified a different host name. I've already set up this user on the remote database and they have correct permissions. I'm just trying to figure out why the script keeps inserting the localhost server name instead of the remote one.

    Read the article

  • Powershell if statement not working - help!

    - by Dmart
    I have a batch file that takes a computer name as its argument and will install Java JRE on it remotely. Now, Im trying to run this Powershell script to repeatedly call the batch file and install Java on any system that it finds without the latest version. It seems to run error-free, but the statements inside the if code block never seem to run - even when the if conditional test evaluates to true. Can anyone look at this script and point out what I'm possibly missing? I'm using the Quest AD cmdlets, and BSOnPosh module. Thank you. get-qadcomputer -sizelimit 0 -name mypc* -searchroot 'OU=MyComputers,DC=MyDomain,DC=lcl'| test-host -property name |ForEach-Object -process { $targnm = $_.name $tststr=reg query "\\$targnm\HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" /v Java6FamilyVersion if(-not ($tststr | select-string -SimpleMatch '1.6.0_20')) { $mssg="Updating to JRE 6u20 on $targnm" Out-Host $mssg Out-File -filepath c:\install_jre_log.txt -inputobject $mssg -Append cmd /c \\server\apps\java\installjreremote.cmd $targnm } else { $mssg ="JRE 6u20 found on $targnm" Out-Host $mssg Out-File -filepath c:\install_jre_log.txt -inputobject $mssg -Append } }

    Read the article

  • ValidatorEnable is not defined when rolled with AJAX

    - by tigermain
    I have some webforms which have been working fine with various static and dynamically generated validators. For some reason now that I have implemented UpdatePanels on the forms, when I manually call the ValidatorEnable() method on one of them (when I click a checkbox) I get the "ValidatorEnable is not defined" error message. I am passing the same clientID etc into the method that I was using before I implemented the AJAX.net controls It would seem .net isnt rendering the /WebResource.axd?d=aUu4P3dfjWWyw3KQ9t2ZdqxnzYhrtq9uWWiRZduXE-g1 script to the page, adding it manually I get other missing JS objects. So how can I force it to register the relevant scripts? N.B. The validators in question are being rendered in a repeater

    Read the article

  • NHibernate Named Query Parameter Numbering @p1 @p2 etc

    - by IanT8
    A colleague recently ran into a problem where he was passing in a single date parameter to a named query. In the query, the parameter was being used twice, once in an expression and once in a GROUP BY clause. Much to our surprise, we discovered that NHibernate used two variables and sent the single named parameter in twice, as @p1 and @p2. This behaviour caused SQL to fail the query, with the usual "a column in the select clause is not in the group by clause" (I paraphrase ofcourse). Is this behaviour normal? Can it be changed? Seems to me that if you have a parameter name like :startDate, NHibernate only needs to pass in @p1 no matter how many times you might refer to :startDate in the query. Any comments? The problem was worked around by using another sub-query to overcome the SQL parsing error.

    Read the article

  • TCP/IP performance tuning under KVM/Qemu

    - by vpetersson
    With more and more companies switching to public cloud services, I'm curious what you guys' thoughts are on TCP/IP tuning in the cloud. Is it worth bothering with? Given that you don't have access to the host-server, you're somewhat limited I presume Let's say for the sake of the argument that you're running three MongoDB-servers in a replica-set on FreeBSD or Linux that all sync over an internal network. I'd also be curious if anyone made any actual performance benchmarks to back up their arguments. I benchmarked the various network drivers available for KVM/Qemu here, but I'm curious what the gurus here suggest to tune further. I started playing around a bit with the tuning-recommendations as suggested over here, but interestingly enough I saw a decrease in performance, rather than an increase, but perhaps I didn't fully understand the tweaks. Update: I did a few more benchmarks and posted the result here. Unfortunately the result wasn't really what I expected.

    Read the article

  • another question about OpenGL ES rendering to texture

    - by ensoreus
    Hello, pros and gurus! Here is another question about rendering to texture. The whole stuff is all about saving texture between passing image into different filters. Maybe all iPhone developers knows about Apple's sample code with OpenGL processing where they used GL filters(functions), but pass into them the same source image. I need to edit an image by passing it sequentelly with saving the state of the image to edit. I am very noob in OpenGL, so I spent increadibly a lot of to solve the issue. So, I desided to create 2 FBO's and attach source image and temporary image as a textures to render in. Here is my init routine: glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_TEXTURE_2D); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, (GLint *)&SystemFBO); glImage = [self loadTexture:preparedImage]; //source image for (int i = 0; i < 4; i++) { fullquad[i].s *= glImage->s; fullquad[i].t *= glImage->t; flipquad[i].s *= glImage->s; flipquad[i].t *= glImage->t; } tmpImage = [self loadEmptyTexture]; //editing image glGenFramebuffersOES(1, &tmpImageFBO); glBindFramebufferOES(GL_FRAMEBUFFER_OES, tmpImageFBO); glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, tmpImage->texID, 0); GLenum status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES); if(status != GL_FRAMEBUFFER_COMPLETE_OES) { NSLog(@"failed to make complete tmp framebuffer object %x", status); } glBindTexture(GL_TEXTURE_2D, 0); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); glGenRenderbuffersOES(1, &glImageFBO); glBindFramebufferOES(GL_FRAMEBUFFER_OES, glImageFBO); glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, glImage->texID, 0); status = glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) ; if(status != GL_FRAMEBUFFER_COMPLETE_OES) { NSLog(@"failed to make complete cur framebuffer object %x", status); } glBindTexture(GL_TEXTURE_2D, 0); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); When user drag the slider, this routine invokes to apply changes -(void)setContrast:(CGFloat)value{ contrast = value; if(flag!=mfContrast){ NSLog(@"contrast: dumped"); flag = mfContrast; glBindFramebufferOES(GL_FRAMEBUFFER_OES, glImageFBO); glClearColor(1,1,1,1); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrthof(0, 512, 0, 512, -1, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glScalef(512, 512, 1); glBindTexture(GL_TEXTURE_2D, tmpImage->texID); glViewport(0, 0, 512, 512); glVertexPointer(2, GL_FLOAT, sizeof(V2fT2f), &fullquad[0].x); glTexCoordPointer(2, GL_FLOAT, sizeof(V2fT2f), &fullquad[0].s); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); } glBindFramebufferOES(GL_FRAMEBUFFER_OES,tmpImageFBO); glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); glEnable(GL_TEXTURE_2D); glActiveTexture(GL_TEXTURE0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrthof(0, 512, 0, 512, -1, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glScalef(512, 512, 1); glBindTexture(GL_TEXTURE_2D, glImage->texID); glViewport(0, 0, 512, 512); [self contrastProc:fullquad value:contrast]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); [self redraw]; } Here are two cases: if it is the same filter(edit mode) to use, I bind tmpFBO to draw into tmpImage texture and edit glImage texture. contrastProc is a pure routine from Apples's sample. If it is another mode, than I save edited image by drawing tmpImage texture in source texture glImage, binded with glImageFBO. After that I call redraw: glBindFramebufferOES(GL_FRAMEBUFFER_OES, SystemFBO); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrthof(0, kTexWidth, 0, kTexHeight, -1, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glScalef(kTexWidth, kTexHeight, 1); glBindTexture(GL_TEXTURE_2D, glImage->texID); glViewport(0, 0, kTexWidth, kTexHeight); glVertexPointer(2, GL_FLOAT, sizeof(V2fT2f), &flipquad[0].x); glTexCoordPointer(2, GL_FLOAT, sizeof(V2fT2f), &flipquad[0].s); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glBindFramebufferOES(GL_FRAMEBUFFER_OES, 0); And here it binds visual framebuffer and dispose glImage texture. So, the result is VERY aggresive filtering. Increasing contrast volume by just 0.2 brings image to state that comparable with 0.9 contrast volume in Apple's sample code project. I miss something obvious, I guess. Interesting, if I disabple line glBindTexture(GL_TEXTURE_2D, glImage->texID); in setContrast routine it brings no effect. At all. If I replace tmpImageFBO with SystemFBO to draw glImage directly on display(and disabling redraw invoking line), all works fine. Please, HELP ME!!! :(

    Read the article

  • T-SQL QUERY PROBLEM

    - by Sam
    Hi All, I have table called Summary and the data in the table looks like this: ID Type Name Parent 1 Act Rent Null 2 Eng E21-01-Rent Rent 3 Prj P01-12-Rent E21-Rent 1 Act Fin Null 2 Eng E13-27-Fin Fin 3 Prj P56-35-Fin E13-Fin I am writing a SP which has to pull the parent based on type. Here always the type Act has ID 1, Eng has ID 2 and Prj has ID 3. The type ACT parent is always NUll, type Eng parent is Act and type Prj parent is Eng Now I have table called Detail.I am writing a SP to insert Detail Table data to the Summary table. I am passing the id as parameter: I am having problem with the parent. How do I get that? I can always say when ID is 1 then parent is Null but when ID is 2 then parent is name of ID 1 similarly when ID is 3 then parent is name of ID2. How do I get that? Can anyone help me with this:

    Read the article

  • A controller method that calls a different method on the same controller

    - by justSteve
    I have a controller method: public ActionResult Details(int id) { Order order = OrderFacade.Instance.Load(id); return View(order); } that is used for 95% of possible invocations. For the other 5% i need to manipulate the value of id before passing to the facade. I'd like to create a separate method within this same controller that executes that manipulation and then calls this (Details) method. What would the signature of that method look like? What is the syntax to call the main Details method? public ??? ManipulatorMethod(int id) { [stuff that manipulates id] [syntax to call Details(manipulatedID)] } mny thx

    Read the article

  • Comparing lists of objects and update

    - by user2915962
    I have a view, passing a LIST of Originals to this method. Before the post happened, i changed some of the properties. I now receive the updated list as a parameter in my method and would like to update the database with these new values. [HttpPost] public ActionResult NewValue(Page model) { var ListOfOriginals = Session.Query<Original>().ToList(); //GETS the objects i want to update listOfOriginals = Model.Pages // Model.page is the new list containing the updated values RavenSession.SaveChanges(); return RedirectToAction("Index"); } When i debug, i can see that listOfOriginals gets the new values. The problem is that i dont know how to update the RavenDB whith these new values. I tried adding this: Session.Store(listOfOriginals) before the SaveChanges() but that resulted in an error. Maybe there is a much better way of doing this?

    Read the article

  • google account security ?

    - by Chez
    I want to write a web-app which would ask the user to pass their google account (user and pwd) so that it can access their google data. I understand google supports alternative ways to do this, such as AuthSub and OathAuthSub. Also google discourages apparently clientLogin (which would be my approach) for web apps. My question is: if I were asking the user to register to my app by passing me a 'read only' google account ? so effectively I don't ask them to pass me their account but to create another account which is readonly. does anybody see anything wrong with this ? am I missing something ? Since their google account continues to be the admin they don't risk (in terms of security) anything. Any help would be welcome ? Thanks

    Read the article

  • What is the safest way to pass strings around in C?

    - by chucknelson
    I have a program in C using Solaris with VERY ancient compatibility it seems. Many examples, even here on SO, don't work, as well as lots of code I've written on Mac OS X. So when using very strict C, what is the safest way to pass strings? I'm currently using char pointers all over the place, due to what I thought was simplicity. So I have functions that return char*, I'm passing char* to them, etc. I'm already seeing strange behavior, like a char* I passed having its value right when I enter a function, and then the value being mysteriously gone OR corrupted/overwritten after something simple like one printf() or an malloc to some other pointer. I was thinking maybe declaring a local char[] inside each function, using strcpy() immediately, and then eventually returning a pointer where char *returnval = strdup(localchar[]); This seems...sloppy. Can anyone point me in the right direction on a simple requirement?

    Read the article

  • Mount encrypted hfs in ubuntu

    - by pagid
    I try to mount an encrypted hfs+ partition in ubuntu. An older post described quite good how to do it, but lacks the information how to use encrypted partitions. What I found so far is: # install required packages sudo apt-get install hfsprogs hfsutils hfsplus loop-aes-utils # try to mount it mount -t hfsplus -o encryption=aes-256 /dev/xyz /mount/xyz But once I run this I get the following error: Error: Password must be at least 20 characters. So I tried to type it in twice, but that results in this: ioctl: LOOP_SET_STATUS: Invalid argument, requested cipher or key (256 bits) not supported by kernel Any suggestions? Thx Edit: One thing I'm not sure about is whether I use the right password. My assumption is that it is my default one for these situations. But I'm not sure whether Max OSX choose another password (internally) for that.

    Read the article

  • I want to create a common unit test function to check all functions based on parameter

    - by Nilesh Rathod
    I want to create a common unit test function to check all functions based on parameter for e.g commonmethod(string methodname,string paramter1,....) { .... } what logic should i write inside this method so that by passing a actual function in parameter methodname and then the common method should execute that function and should return the output. i am using entity framework for all functions which has been created in my project and now i dont want to create a separate unit test function for each function.just one function should do the job based on different parameters... is that possible.. ?, if so then please provide me an code for same.. Thanks in advance..!!!

    Read the article

  • How to programatically set cell.textLabel.text from a different view?

    - by Andy
    I've got a view controller, call it VC1, that's a table view. When I tap a cell in the table view, I am presented with a new view controller, call it VC2, which is a short list of choices. After making a choice, I want to dismiss VC2 and set the cell.textLabel.text property of the VC1 cell I originally tapped to the value I selected in VC2. Conceptually speaking, what is the proper way to do this? I've tried a handful of different approaches, but all of them seem wonky at best, and only one of them actually worked - although it was the most cumbersome of all, passing references to both view controllers and table view cells and all kinds of things. It just feels like I'm making a mountain out of what is probably a mole hill. This is such a common paradigm that I find it hard to believe there's not a simple method for doing it. Thanks in advance for any input you can offer.

    Read the article

  • Email server for huge number of subscriber

    - by bogha
    My question is that my company is thinking of providing a free email account for each of its customers. As a new company we will assume that our corporate email system will be MS Exchange server which will support about 1000 employees. They are asking why not adding the customer list to be a part of Exchange users. My suggestion was to separate the two systems, for the corporate we can use Exchange but for customers (around 30000) we have to use a Linux based system. My only argument was that Linux can be used for enterprise services like this and Microsoft may fail. What do you suggest? And if you are with me on choosing Linux as the server platform, what do you suggest to use as an alternative for Exchange in Linux? Thank you.

    Read the article

  • url to http request object

    - by takeshin
    I need to convert string like this: $url = 'module/controller/action/param1/param1value/paramX/paramXvalue'; to url regarding current router (including translation and so on). Usually I generate the target urls using url view helper, but for this I need to specify all params, so I would need to manually explode the string. I tried to use request object, like this: $request = new Zend_Controller_Request_Http(); // some code here passing the $url Zend_Debug::dump($request->getControllerName()); // null instead of 'controllers' Zend_Debug::dump($request->getParams()); // null instead of array but this seems to be suspected. Do I need to dispatch this request? How to handle this case well?

    Read the article

  • Encoding gives "'ascii' codec can't encode character … ordinal not in range(128)"

    - by user140314
    I am working through the Django RSS reader project here. The RSS feed will read something like "OKLAHOMA CITY (AP) — James Harden let". The RSS feed's encoding reads encoding="UTF-8" so I believe I am passing utf-8 to markdown in the code snippet below. The em dash is where it chokes. I get the Django error of "'ascii' codec can't encode character u'\u2014' in position 109: ordinal not in range(128)" which is an UnicodeEncodeError. In the variables being passed I see "OKLAHOMA CITY (AP) \u2014 James Harden". The code line that is not working is: content = content.encode(parsed_feed.encoding, "xmlcharrefreplace") I am using markdown 2.0, django 1.1, and python 2.4. What is the magic sequence of encoding and decoding that I need to do to make this work? Thanks.

    Read the article

  • In App Purchase no valid Product IDs

    - by david
    I'm trying to get In App Purchase with my existing iPad App working. I'm stuck retrieving the Product Information from App Store: - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response The SKProductsResponse only contains invalid Product IDs. I tried every potential solution I found here or on the net: my App ID has In App enabled I generated a new provisioning profile and installed it on my device I restarted the device my App ID is the same as in my Info.plist (it's in the Store since weeks) I added In App Purchases for the App with "cleared for sale" checked I added Screenshots to my In App Purchases I tried different naming schemes for the Product ID I made triple checked that I pass the correct Product ID to the SKProductsRequest I'm passing a NSSet to the SKProductsRequest instead of a MutableSet I updated my App with the upcoming version containing in App purchase and submitted it for Review I approved one of my In App Purchases, just to see if that helps I waited more than 24 hours All of these actions brought me nothing but invalid Product IDs. I hope someone can point me into the right direction, because I'm running out of ideas.

    Read the article

  • Connecting Ingres from C

    - by avesus
    I need to connect to an Ingres supplied demodb through OpenAPI, both Ingres and C application running on windows. What i have done: Created a "node" in the Ingres Network Utility named "usernode". created user accounts in the Ingres installation (named "user" password "user") and in the Windows user management (the same creds.) Granted necessary privileges to the user in the database. In C code i have called IIapi_connect() function with an IIAPI_CONNPARM structure. Used members: co_target = "usernode::demodb", co_username = "user", co_password = "user" But IIapi_connect() call returns an error: "User provided a vnode as part of the database name (vnode::dbname), but connection information for that vnode is missing. Enter connection information for the vnode using NETUTIL." Anybody knows something that is a weird concept "node"? What are the minimum steps (in the database administration and the function parameters passing) necessary for the successful connect?

    Read the article

  • I need to generate credit card surrogates (tokens) that are format preserving.

    - by jammer59
    For an eCommerce application I need to take a credit card and use the real card for passing through to a payment gateway but I need to store, and return to the transaction initiator, a surrogate that is format preserving. Specifically, this means: 1) The number of digits in the surrogate is the same as the real card number (PAN). 2) The issuer type part of the card -- the initial 1,2 or 4 digits remains the same in the surrogate as in the original PAN. 3) The final 4 digits of the surrogate remain the same (for customer service purposes.) 4) The surrogate passes the Luhn mod10 check for a syntactially valid credit card. I can readily handle requirements 1-3 but #4 has me completely stumped! The final implementation will be either t-sql or c#. Any ideas?

    Read the article

  • How to pass an xpath into an xquery function declaration

    - by topmulch
    Hi all, I use Apache Tomcat's Exist DB as an XML database and am trying to construct a sequence by passing the following xpath, defined in FLWOR's 'let' clause: $xpath := $root/second/third into a locally defined function declaration, like so: declare function local:someFunction($uuid as xs:string?, $xpath as xs:anyAtomicType?) { let $varOne := $xpath/fourth[@uuid = $uuid]/fifthRight let $varTwo := $xpath/fourth[@uuid = $uuid]/fifthLeft let $combined := ($varOne,$varTwo) return $combined }; Of course, when entering this in the exist xquery sandbox, I get Type: xs:anyAtomicType is not defined. What should I use in place of it, or should I do this a different way? Thanks in advance for any suggestions.

    Read the article

  • Changing function parameters for onkeypress event according to source id

    - by DarRay
    I want to assign a function according to their id to all the input fields in a webpage. To do i wrote below code but all the input fields are running keyPress with same parameter.. :( ///////////////////Checks all available 'text' 'input's//////////////////// var inputs = document.getElementsByTagName('input'); var cnvtrInput = new Array(); for (var index = 0; index < inputs.length; index++) { if (inputs[index].type == 'text') { cnvtrInput[index] = new converter(inputs[index]); inputs[index].onkeypress = function() {return keyPess(cnvtrInput[index])}; } } //index--; With the last commented statement i found that the passing element of keyPress is the last value of index; Finally i tried same with textareas but failed...

    Read the article

< Previous Page | 154 155 156 157 158 159 160 161 162 163 164 165  | Next Page >