Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 105/604 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • Passing parameters to service by URL - How do I discover the parameter names?

    - by VitalyB
    Hi, I have a report to which I have execute-only access - I don't have the access to the RDL file. This report exposes several parameters which I would like to set from URL. I've successfully changed some parameters using the standard param=data form (as explained here: http://msdn.microsoft.com/en-us/library/ms153586.aspx). However, some parameters don't have the same parameter-prompt and parameter-name. Unfortunately, to pass parameter values by URL I must know the name of the parameter and I don't see how I can deduct from the report and its parameters prompt text. I've tried to inspect the source and post-data but to no avail. Anyone has an idea? Thanks P.S I also stumbled on this: http://odetocode.com/Articles/123.aspx. However, I wasn't able to connect to the web-services of my report server.

    Read the article

  • Leaks in passing the request using URL at NSString, Objective-C.

    - by Madan Mohan
    Hi Guys, I getting the leak in this method even the allocated nsstring is released. -(BOOL)getTicket:(NSString*)userName passWord:(NSString*)aPassword isLogin:(BOOL)isLogin { login =[self getloginList]; username = login.name; password = login.password; NSString* str=@""; if (isLogin == YES) { str = @"https://accounts.=true&LOGIN_ID="; str = [str stringByAppendingString:[self _encodeString:username]]; str = [str stringByAppendingString:@"&PASSWORD="]; str = [str stringByAppendingString:[self _encodeString:password]]; } else if (isLogin == NO) { str = @"https://accounts.=true&LOGIN_ID="; str = [str stringByAppendingString:[self _encodeString:userName]]; str = [str stringByAppendingString:@"&PASSWORD="]; str = [str stringByAppendingString: [self _encodeString:aPassword]]; } NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:str] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:25.0]; [request setHTTPMethod: @"POST"]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];//****************** i am getting leak here showing as nsstring is leaking NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; printf("\n returnString in getticket:%s",[returnString UTF8String]); NSRange textRange; textRange =[returnString rangeOfString:@"TICKET"]; if(textRange.location != NSNotFound) { printf("\n **********************"); NSArray* splitValues = [returnString componentsSeparatedByString:@"TICKET="]; NSString* str1 = [splitValues objectAtIndex:1]; NSArray* splitValues1 = [str1 componentsSeparatedByString:@"RESULT"]; NSString* ticket1 = [splitValues1 objectAtIndex:0]; self.ticket = ticket1; self.isCorrectLogin = YES; [returnString release]; return YES; } else { self.isCorrectLogin = NO; [returnString release]; return NO; } return NO; } Please help me out of this problem.

    Read the article

  • Object reference not set to an instance of an object.....?

    - by jamal
    Hi guys I always got this error from my site and it keeps bugging me.I've been trying to figure out the cause of this error but I can't really figure it out. Here's the stacktrace: at BasePage.Page_PreInit(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnPreInit(EventArgs e) at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) And on my basepage I only got this code: Imports Microsoft.VisualBasic Public Class BasePage Inherits System.Web.UI.Page Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit Page.Theme = "Something" If (Request.UserAgent.IndexOf("AppleWebKit") 0) Then Request.Browser.Adapters.Clear() End If End Sub Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.Title = "Untitled Page" Then Throw New Exception("Page title cannot be ""Untitled Page"".") End If End Sub End Class According to the stacktrace this always happens on my basepage preinit event.What do you think is the problem here guys?

    Read the article

  • Passing a outside variable into a <asp:sqldatasource> tag. ASP.NET 2.0

    - by MadMAxJr
    I'm designing some VB based ASP.NET 2.0, and I am trying to make more use of the various ASP tags that visual studio provides, rather than hand writing everything in the code-behind. I want to pass in an outside variable from the Session to identify who the user is for the query. <asp:sqldatasource id="DataStores" runat="server" connectionstring="<%$ ConnectionStrings:MY_CONNECTION %>" providername="<%$ ConnectionStrings:MY_CONNECTION.ProviderName %>" selectcommand="SELECT THING1, THING2 FROM DATA_TABLE WHERE (THING2 IN (SELECT THING2 FROM RELATED_DATA_TABLE WHERE (USERNAME = @user)))" onselecting="Data_Stores_Selecting"> <SelectParameters> <asp:parameter name="user" defaultvalue ="" /> </SelectParameters> </asp:sqldatasource> And on my code behind I have: Protected Sub Data_Stores_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles Data_Stores.Selecting e.Command.Parameters("user").Value = Session("userid") End Sub Oracle squaks at me with ORA-01036, illegal variable name. Am I declaring the variable wrong in the query? I thought external variables share the same name with a @ prefixed. from what I understand, this should be placing the value I want into the query when it executes the select. EDIT: Okay, thanks for the advice so far, first error was corrected, I need to use : and not @ for the variable declaration in the query. Now it generates an ORA-01745 invalid host/bind variable name. EDIT AGAIN: Okay, looks like user was a reserved word. It works now! Thanks for other points of view on this one. I hadn't thought of that approach.

    Read the article

  • How do I reference SSIS on a build machine without installing SQL Server 2008 Client Tools?

    - by freshr
    I need to build SSIS packages on a build machine, and do not want the overhead of installing SQL Server Management Studio on this machine. A SQL Server 2008 SDK would be ideal, but I could not find where to download it. The dlls I require are (for example): Microsoft.SQLServer.ManagedDTS Microsoft.SqlServer.PipelineHost Microsoft.SqlServer.DTSPipelineWrap Microsoft.SQLServer.DTSRuntimeWrap I could attempt to copy them to the build machine individually, but I would rather just use an SDK if possible. Where can I get the SDK, or alternatively, what suggestions are there?

    Read the article

  • What is the ISO C++ way to directly define a conversion function to reference to array?

    - by ben
    According to the standard, a conversion function has a function-id operator conversion-type-id, which would look like, say, operator char(&)[4] I believe. But I cannot figure out where to put the function parameter list. gcc does not accept either of operator char(&())[4] or operator char(&)[4]() or anything I can think of. Now, gcc seems to accept (&operator char ())[4] but clang does not, and I am inclined to not either, since it does not seem to fit the grammar as I understand it. I do not want to use a typedef because I want to avoid polluting the namespace with it.

    Read the article

  • Passing parameter to base class constructor or using instance variable?

    - by deamon
    All classes derived from a certain base class have to define an attribute called "path". In the sense of duck typing I could rely upon definition in the subclasses: class Base: pass # no "path" variable here def Sub(Base): def __init__(self): self.path = "something/" Another possiblity would be to use the base class constructor: class Base: def __init__(self, path): self.path = path def Sub(Base): def __init__(self): super().__init__("something/") What would you prefer and why? Is there a better way?

    Read the article

  • Why is passing a string literal into a char* argument only sometimes a compiler error?

    - by Brian Postow
    I'm working in a C, and C++ program. We used to be compiling without the make-strings-writable option. But that was getting a bunch of warnings, so I turned it off. Then I got a whole bunch of errors of the form "Cannot convert const char* to char* in argmuent 3 of function foo". So, I went through and made a whole lot of changes to fix those. However, today, the program CRASHED because the literal "" was getting passed into a function that was expecting a char*, and was setting the 0th character to 0. It wasn't doing anything bad, just trying to edit a constant, and crashing. My question is, why wasn't that a compiler error? In case it matters, this was on a mac compiled with gcc-4.0. EDIT: added code: char * host = FindArgDefault("EMailLinkHost", ""); stripCRLF(linkHost, '\n'); where: char *FindArgDefault(char *argName, char *defVal) {// simplified char * val = defVal; return(val); } and void stripCRLF(char *str, char delim) { char *p, *q; for (p = q = str; *p; ++p) { if (*p == 0xd || *p == 0xa) { if (p[1] == (*p ^ 7)) ++p; if (delim == -1) *p = delim; } *q++ = *p; } *q = 0; // DIES HERE } This compiled and ran until it tried to set *q to 0...

    Read the article

  • Passing the "enter key" event to flash player in an ATL Window?

    - by Adam Naylor
    I have a Flash player (flash9.ocx) embedded in an ATL window and have coded functionality into the swf to respond to the return/enter key being pressed. Works fine from the standalone swf player but as soon as its played from within my embedded player it doesn't execute. It's as if my window is getting in the way somehow? Is there any way to pass the keypress through to the player? FYI, there isn't anything to weird in place on the form. Thanks!

    Read the article

  • How to assign a value to an pointer-pointer passed in call by reference?

    - by mystify
    I want to achieve something similar to what these guys do here: - (NSUInteger)countForFetchRequest:(NSFetchRequest *)request error:(NSError **)error like you can see, you pass an NSError pointer and that nice method will assign a real NSError object to your pointer in case there is an error. So the cool thing about this is, that the method returns an NSUInteger but can ALSO return an NSError, without having to mess around with ugly and fat arrays or dictionaries. So how could I assign an object to the passed-in error pointer?

    Read the article

  • Is it possible to reference a file stored in Isolated Storage by its URI?

    - by Joel
    Using this previous question as motivation, I would like to temporarily store images and videos in Isolated Storage. My application (written in WPF/C#) will allow a user to review these temporarily stored items by viewing their contents in a MediaElement. I was hoping to set the MediaElement's Source Property to a video or image's URI stored in IsolatedStorage but I cannot figure out how to dynamically create a URI since it doesn't appear to be naively supported by IsolatedStorage. Any help would be greatly appreciated - thank you in advance! Update - 1/21/09 After battling the issue for a day, I concluded that the Isolated Storage approach is not practical for storing large video files that need to be referenced by a Uri.

    Read the article

  • Any problems with this C++ const reference accessor interface idiom?

    - by mskfisher
    I was converting a struct to a class so I could enforce a setter interface for my variables. I did not want to change all of the instances where the variable was read, though. So I converted this: struct foo_t { int x; float y; }; to this: class foo_t { int _x; float _y; public: foot_t() : x(_x), y(_y) { set(0, 0.0); } const int &x; const float &y; set(int x, float y) { _x = x; _y = y; } }; I'm interested in this because it seems to model C#'s idea of public read-only properties. Compiles fine, and I haven't seen any problems yet. Besides the boilerplate of associating the const references in the constructor, what are the downsides to this method? Any strange aliasing issues? Why haven't I seen this idiom before?

    Read the article

  • Can I get a reference to an object created in a jQuery plugin?

    - by gargantaun
    Perhaps my brain is fried, but I'm writing a plugin that created an tweaks an element, but also creates an object that i'd like access to. So the plugin looks like this (function ($) { $.fn.myPlugin = function () { return this.each(function () { // do some stuff to the element... this.objectInstance = new usefulObject(); }); }; })(jQuery); function usefulObject(){ // useful object properties and methods.... this.doSomething = function(){ alert("Don't google Google. You'll break the internet."); } } so when I call the plugin, I also want to be able to get access to that usefulObject that I created. I thought something like this might work.... tweakedElement = $("#someDiv").myPlugin(); tweakedElement.objectInstance.doSomething(); ... but that's not working. How can I achieve this? Can I achieve this? Answers on a postcard, or down below, whichever suits you.

    Read the article

  • passing get parameters through named route and then to controller model; stringify_keys!

    - by user368937
    Hey, I'm just learning ruby on rails and I've been stumped on this for awhile now. Here's my url request: http://192.168.2.20:8080/Location/new/123.123,-123.123/ Here's my routes.rb: map.connect '/Location/new/:coords/', :controller => 'Location', :action => 'new', :coords => /\d+.\d+,-\d+.\d+/ map.connect '/Location/list/', :controller => 'Location', :action => 'list' map.connect '/Location/create/', :controller => 'Location', :action => 'create' Here's my location_controller.rb def new @coords = Location.new(params[:coords]) end Here's the error message it gives me: NoMethodError in LocationController#new undefined method `stringify_keys!' for "123.123,-123.123":String

    Read the article

  • Javascript (using jQuery) in a large Project... organization, passing data, private method, etc.

    - by gaoshan88
    I'm working on a large project that is organized like so: Multiple javascript files are included as needed and most code is wrapped in anonymous functions... // wutang.js //Included Files Go Here // Public stuff var MethodMan; // Private stuff (function() { var someVar1; MethodMan = function(){...}; var APrivateMethod = function(){...}; $(function(){ //jquery page load stuff here $('#meh').click(APrivateMethod); }); })(); I'm wondering about a few things here. Assuming that there are a number of these files included on a page, what has access to what and what is the best way to pass data between the files? For example, I assume that MethodMan() can be accessed by anything on any included page. It is public, yes? var someVar1 is only accessible to the methods inside that particular anonymous function and nowhere else, yes? Also true of var APrivateMethod(), yes? What if I want APrivateMethod() to make something available to some other method in a different anonymous wrapped method in a different included page. What's the best way to pass data between these private, anonymous functions on different included pages? Do I simply have to make whatever I want to use between them public? How about if I want to minimize global variables? What about the following: var PootyTang = function(){ someVar1 = $('#someid').text(); //some stuff }; and in another included file used by that same page I have: var TangyPoot = function(){ someVar1 = $('#someid').text(); //some completely different stuff }; What's the best way to share the value of someVar1 across these anonymous (they are wrapped as the first example) functions?

    Read the article

  • Where can I find "reference barcodes" to verify barcode library output?

    - by mjustin
    This question is not about 'best' barcode library recommendation, we use various products on different platforms, and need a simple way to verify if a given barcode is correct (according to its specification). There are some free online bar code generators in the Internet, and I found many differences between their output and our library output regarding graphics and text field below the code. Now I am not sure which one is wrong, and before filing bug report I want to make sure how the correct barcode should look like. We mainly need Code128 and UCC/EAN-128 with A/B/C subcodes. Which resource would you suggest?

    Read the article

  • Is it possible to use instanceof when passing objects between Threads?

    - by Risser
    I've run into an issue where instanceof works, and then it doesn't. Going into details is difficult, but I think this might be the problem: Reading this: http://www.theserverside.com/news/thread.tss?thread_id=40229 (search for Thread.currentThread), it seems to imply that, even if the two objects are the same class, if you pass them between threads with different class loaders, instanceof (and isAssignableFrom) might still fail. This certainly would explain the behavior I'm having, but I was wondering if anyone could verify it? (I wish the article linked at the beginning of the discussion was still available, but it doesn't seem like it is.) Thanks, Peter

    Read the article

  • How to reference a string from another package in a library using XML in Android?

    - by Garret Wilson
    The Android documentation tells me that I can access a string from another package by using the "package name", whatever that means: @[<package_name>:]<resource_type>/<resource_name> So in my manifest I want to access a string that I've placed in a separate library project, in the com.globalmentor.android package---that's where my R class is, after all: <activity android:label="@com.globalmentor.android:string/app_applicationlistactivity_label" android:name="com.globalmentor.android.app.ApplicationListActivity" > </activity> That doesn't even compile. But this does: <activity android:label="@string/app_applicationlistactivity_label" android:name="com.globalmentor.android.app.ApplicationListActivity" > </activity> Why? What does the Android documentation mean which it talks about the "package_name"? Why doesn't the first example work, and why does the second example work? I don't want all my resource names merged into the same R file---I want them partitioned into packages, like I wrote them.

    Read the article

  • Is foreign key reference from two different primary key from two different tables valid?

    - by arundex
    I have a foreign key that has to refer primary keys of two different tables. Table 1: animal animal_ id (primary key) Table 2: bird bird_ id (primary key) Table 3: Pet_info pet_id, type ENUM ('bird', 'animal') foreign key (pet_ id) references animal(animal_id), bird(bird_id) So, I need to check for pet_id either from animal or bird table depending on the need. Is this valid? Or should I go for some restructuring . . . NOTE: I referred this . . but I'm not sure whether I have to change my existing design

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >