Search Results

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

Page 166/297 | < Previous Page | 162 163 164 165 166 167 168 169 170 171 172 173  | Next Page >

  • Multivalue parametres in SSRS- display in the report

    - by pfeffer
    I just started working with SSRS, so this question might seem silly. Anyway, for now I'm trying to avoid multi-valued parameters, because I want my parameters to be able to be NULL. So I'm just passing a comma-separated string of ID values to my stored procedure, and everything works. The problem I encountered is that I want to display the actual values, not IDs, in the report, so that users can see, what filter was used. If that were a multi-valued parameter, I would simply use JOIN function, but now I am out of ideas and would really appreciate some help. Thanks!

    Read the article

  • ok.. what's with this 'var' thing in C#?? [closed]

    - by KevinDeus
    Possible Duplicate: Use of var keyword in C# I have ReSharper, which is a pretty good tool to remind me of some good programming practices.. for example it always recommends that I use the most narrowed convention I can use when passing variables to functions (such as recommending IEnumerable instead of List when I fail to use any of List's specific function. Awesome. However, one of its new behaviors (for C# 4.0) is to remind me at every opportunity to use 'var' when declaring variables. Now I know that there are some valid uses of 'var', but do I really want to use it all the time? I'm sure that ReSharper has a reason for this, but I can't figure it out.. for me it makes the code less readable..

    Read the article

  • Send JSON object via GET and POST without having to wrapping it in another object literal, and manag

    - by Kucebe
    My site does some short ajax call in JSON format, using jQuery. At client-side i'd like to send object just passing it in ajax function, without being forced to wrap it in an object literal like this: {'person' : person}. For the same reasons, at server-side i'd like to manage objects without the binding of $_GET['person'] or $_POST['person']. For example: var person = { 'name' : 'John', 'lastName' : 'Doe', 'age' : 32, 'married' : true } sendAjaxRequest(person); in php, using: $person = json_decode(file_get_contents("php://input")); i can get easily the object, but only with POST format, not in GET. Any suggestions?

    Read the article

  • mac os x, find all symbolic links that point to files on a different volume

    - by Eddified
    In my ~ dir, I have some symlinks that point to "/Volumes/Macintosh HD 2/..." and I want to find them all recursively. A look at the man page for 'find' says the '-lname' argument will search the symbolic link contents. It appears to work, but not recursively: $ pwd /Users/myusername $ sudo find . -lname '/Volumes*' $ cd Documents/ $ sudo find . -lname '/Volumes*' ./Documents on Win7 ./work.rtf What's going on? How can I make this work recursively? -- The 'find' program is supposed to always work recursively. I checked perms, they look ok, but as you can see I used "sudo" just to be sure... no dice. $ ls -ld Documents/ drwx------+ 14 myusername staff 476 Jan 12 16:32 Documents/

    Read the article

  • Redeclaration of parameters

    - by Scott
    While looking through the Selenium source code I noticed the following in the PageFactory: public static <T> T initElements(WebDriver driver, Class<T> pageClassToProxy) { T page = instantiatePage(driver, pageClassToProxy); initElements(driver, page); return page; } public static void initElements(WebDriver driver, Object page) { final WebDriver driverRef = driver; initElements(new DefaultElementLocatorFactory(driverRef), page); } What is the benefit of having the following line? final WebDriver driverRef = driver; Wouldn't it have made sense to just make the parameter final, and then passing that along to the next method without declaring the new reference?

    Read the article

  • Escaping and unescaping a string with single and double quotes in Javascript

    - by Reina
    I have a search box that a user can search for any string including single AND double quotes, once they have searched, the backend is passing the keyword back to me so I can put it back in the box. I don't know what the string is so I can't escape quotes myself, below is an example: var keyword = "hello"; $("#selectionkeywords").val(); The issue I am having is that if the user enters "hello" the keyword becomes ""hello"" and I get this error: missing ) after argument list [Break On This Error] jQuery("#selectionkeywords").val(""hello""); The user could also enter single quotes so that rules it out as well. I tried using escape unescape but I still have the same issue e.g. escape(""hello"") I could get the value in an unescaped format e.g. "hello" but I don't know what to do with it, escape doesn't work on it I end up with this %26%23034%3Bhello%26%23034%3B So I'm pretty much stuck at the moment as I can't do anything to the string, any ideas?

    Read the article

  • Grid computing projects similar to NGrid (thread based)

    - by DivdeAndConquer
    Hello there, first time poster. This is a great place for reading about programming problems. I've been looking at some grid computing projects for .Net/Mono and stumbled upon NGrid. NGrid seems really appealing for grid computing because you simply pass threads to it and there is very little modification you have to make to your code. However, I see that NGrid (http://ngrid.sourceforge.net/?page=overview) is still at version 0.7 and hasn't been updated since May 2008. So, I'm wondering if there are any other grid computing projects that use a similar thread-passing architecture and if anyone has had success using NGrid.

    Read the article

  • Pass codeigniter translation array to jQuery Function

    - by grolle
    Hi, I’ve a problem by passing an array to a jQuery function. Some code: // in the language file $lang['daynames'] = array('So','Mo','Di','Mi','Do','Fr','Sa'); //In the view var config = { basePath : '' }; // THIS WORKS GREAT!!! var days = new array('lang-line('daynames')); ?'); //in the js-File $(function() { $("#datepicker").datepicker({ dateFormat : 'dd.mm.yy', showWeek : true, firstDay : 1, weekHeader : 'KW', dayNamesMin : days, monthNames : ['Januar','Februar','März','April', 'Mai','Juni','Juli','August','September', 'Oktober','November','Dezember'], onSelect : function(dateText,inst){ } }); }); If I do lang-line(‘daynames’)); ? in the view everything looks fine, so what is wrong here? Thanks and best regards ...

    Read the article

  • How to solve this issue in a URL?

    - by Ayyappan.Anbalagan
    I am working on a billing project. I am passing the invoice number to another aspx page using a query parameter; i.e. /default.aspx?editid=5 is the URL. If I change the editid to 4, then the records also changes. How to solve this issue? Page 1 LinkButton InvoiceEdit = sender as LinkButton; string EditId = InvoiceEdit.CommandArgument.ToString(); Response.Redirect("edit invoice.aspx?EditId=" + EditId); Page 2 String invoiceId = Request.QueryString["InvoiceId"].ToString();

    Read the article

  • Setting custom HTTP request headers in an URL object doesn't work.

    - by Blagovest Buyukliev
    I am trying to fetch an image from an IP camera using HTTP. The camera requires HTTP basic authentication, so I have to add the corresponding request header: URL url = new URL("http://myipcam/snapshot.jpg"); URLConnection uc = url.openConnection(); uc.setRequestProperty("Authorization", "Basic " + new String(Base64.encode("user:pass".getBytes()))); // outputs "null" System.out.println(uc.getRequestProperty("Authorization")); I am later passing the url object to ImageIO.read(), and, as you can guess, I am getting an HTTP 401 Unauthorized, although user and pass are correct. What am I doing wrong? I've also tried new URL("http://user:pass@myipcam/snapshot.jpg"), but that doesn't work either.

    Read the article

  • In Java how instance of and type cast(i.e (ClassName)) works on proxy object ?

    - by learner
    Java generates a proxy class for a given interface and provides the instance of the proxy class. But when we type cast the proxy object to our specific Object, how java handles this internally? Is this treated as special scenario? For example I have class 'OriginalClass' and it implements 'OriginalInterface', when I create proxy object by passing 'OriginalInterface' interface java created proxy class 'ProxyClass' using methods in the provided interface and provides object of this class(i.e ProxyClass). If my understanding is correct then can you please answer following queries 1) When I type cast object of ProxyClass to my class OriginalClass this works, but how java is allowing this? Same in case of instace of? 2) As my knowledge java creates a proxy class only with the methods, but what happen when I try to access attributes on this object? 3) Only interface methods are getting implemented in Proxy, but what happens when I try to access a method which not in interface and only mentioned in the class? Thanks, Student

    Read the article

  • wxWidgets - Add items to sizer via DLL

    - by intl
    I have a GUI set up with wxWidgets (C++, MSVC) and part of the functionality is to add elements to the GUI via DLL's. Essentially, I would be passing in a sizer to the DLL which will in turn add the elements based on what is in the DLL. Could someone just point me in the right direction on how to get the DLL set up? I have looked, but don't see anything that's similar to what I'm looking for. The programming of the elements is fine with me, I just need to understand how to structure the DLL programming. Help appreciated.

    Read the article

  • How do quotes/strings work in Powershell?

    - by Casey
    I'm have a command line that works in the regular old Windows Command Shell, but somehow gets misinterpreted in Powershell (I'm fairly new to Powershell). sqlcmd -S .\SQLEXPRESS -i "f:\SQLBackups\ExpressMaint.sql" -v DB="ksuite" -v OPTYPE="DB" -v BACKUPFOLDER="f:\SQLBackups" -v REPORTFOLDER="f:\SQLBackups\Reports" -v DBRETAINUNIT="days" -v DBRETAINVAL="7" Powershell seems to be stripping the drive letters out of the arguments that require paths. For example, I get the following when I attempt to run the above command in Powershell: Sqlcmd: ':\SQLBackups': Invalid argument. Enter '-?' for help. Well sure it's invalid without the drive letter. I have tried variations on double quoting it, escaping it, etc. but can't get it to work. What am I missing that Powershell does differently?

    Read the article

  • Webservice for serial port devices

    - by camx
    Hi I want to create a remote webservice for an application that is now avaliable only localy. This application controlls three devices (each is controlled separately) connected on serial port. The problem is that I don't know how to take care of passing back information that a device return requested data. For example - I send move command to the motion device (which is very slow and can take a minute or more). Can I just set a big timeout on the client side (and server side) and return for example a true/false if operation is completed or is this a bad idea? Is SOAP with big timeouts ok? And the other question is if Mono on Linux (Ubuntu 9.10, Mono 2.4) is stable enought for making a web service or should I chose Java or some other language? I'm open for recommendations. Thanks for your help!

    Read the article

  • How to get the Host value inside ~/.ssh/config

    - by iconoclast
    Within a ~/.ssh/config or ssh_config file, %h will give you the HostName value, but how do you get the Host ("alias") value? Why would I want to do that? Well, here's an example Host some_host_alias HostName 1.2.3.4 User my_user_name PasswordAuthentication no IdentityFile ~/.ssh/some_host_alias.rsa.id LocalCommand some_script.sh %h # <---- this is the critical line If I pass %h to the script, then it uses 1.2.3.4, which fails to give it all the options it needs to connect to that machine. I need to pass some_host_alias, but I can't find the % variable for that. (And: yes! I'm aware of the risk of recursion. That's solved inside the script.) UPDATE: Kenster pointed out that I could just hard-code the Host value as an argument to the script. Of course this will work in the example I gave, but it won't work if I'm using pattern matching for the Host.

    Read the article

  • DeferWindowPos and SWP_SHOWWINDOW/SWP_HIDEWINDOW

    - by Tom Bell
    I am writing a virtual desktop application which utilises the DeferWindowPos API functions. The current method I am using is moving the windows off the screen if they're not on the current virtual desktop. However I know wish to also hide the windows that are off-screen so they do not appear on the task bar. I have attempted this by also passing SWP_SHOWWINDOW/SWP_HIDEWINDOW to the DeferWindowPos() calls. I have read a few sites regarding this and one of them suggested that if SWP_SHOWWINDOW/SWP_HIDEWINDOW are passed, then the window will only show or hide, and no reposition. Can anyone confirm this, or am I doing something wrong?

    Read the article

  • Way around ASP.NET session being shared across multiple tab windows

    - by ace
    I'm storing some value in an asp.net session on the first page. On the next page, this session value is being read. However if multiple tabs are opened and there are multiple page 1-page 2 navigation going on, the value stored in session gets mixed up since the session is shared between the browser tabs. I'm wondering what are the options around this : Query String: Passing value between the pages using query string, I don't want to take this approach since there can be multiple anchor tags on page 1 linking to page 2 and I can not rewrite the URLs of each tag since they are dynamic. Cookies??? In-memory cookies are shared across browser tabs too, same as the session cookie, rite ? Any other option?

    Read the article

  • Gridview making a column invisable

    - by flyersun
    Hi I have a grid view which is dynamically generated via C# using a DataSet. I'm passing a row ID field (from the database) to the grid view, as this is required when a user clicks to edit a records. However I don't want the user to be able to view the column. I have tried the following but it doesn’t seem to work? Could anyone suggest a way to hide the column or a better way of attaching the information to the grid view row so it can be used at a later stage. c# DataColumn ColImplantCustomerDetailsID = new DataColumn(); ColImplantCustomerDetailsID.ColumnName = "Implant ID"; ColImplantCustomerDetailsID.DataType = typeof(int); ColImplantCustomerDetailsID.Visable = false; <-- visable doens't work here. asp.net

    Read the article

  • SQL Server Licensing

    - by John
    We are looking at moving our fractured code base that uses MySQL in some places and SQL Server in other places. I'm suggesting that for our purposes we don't need anything that MySQL can't do. The argument is that we have to have SQL Server anyway because we have Exchange and SharePoint. I always thought that SQL Server didn't require a separate license when using Exchange or SharePoint (WSS version). We are also using TFS. If there is a server product from Microsoft which requires the use of SQL Server then doesn't it come with some form of licensing for SQL Server? Can anyone lend some insight to this? Thanks!

    Read the article

  • Why using swap file over a SMB/NFS mounted filesystem is not possible in Linux?

    - by Avio
    I'd like to use another machine's unused RAM as swapspace for my primary Linux installation. I was just curious about performance of network ramdisks compared to local (slow) mechanical hard disks. The swapfile is on a tmpfs mountpoint and is shared through samba. However, every time I try to issue: swapon /mnt/ramswap/swapfile I get: swapon: /mnt/ramswap/swapfile: swapon failed: Invalid argument and in dmesg I read: [ 9569.806483] swapon: swapfile has holes I've tried to allocate the swapfile with dd if=/dev/zero of=swapfile bs=1024 (but also =4096 and =1048576) and with truncate -s 2G (both followed by mkswap swapfile) but the result is always the same. In this post (dated back to 2002) someone says that using a swapfile over NFS/SMB is not possible in Linux. Is this statement still valid? And if yes, what is the reason of this choice and is there any workaround to have this working?

    Read the article

  • const ready only local copies

    - by robUK
    Hello gcc 4.4.4 c89 I am just wondering is it worth passing a const into a function. i.e. void do_something(const char *dest, const int size) The size is a ready-only so I don't want to change it. However, some developers never have this as const has it is a local copy that is being used. The pointer is const as you can change the value in the calling routine. I always have a const on ready-only local copies, as it confirms to anyone reading my code that it is a ready-only variable. And also, when coding I don't make the mistake of changing it without realizing. Many thanks for any suggestions,

    Read the article

  • Haskell: monadic takeWhile?

    - by Mark Rushakoff
    I have some functions written in C that I call from Haskell. These functions return IO (CInt). Sometimes I want to run all of the functions regardless of what any of them return, and this is easy. For sake of example code, this is the general idea of what's happening currently: Prelude> let f x = print x >> return x Prelude> mapM_ f [0..5] 0 1 2 3 4 5 Prelude> I get my desired side effects, and I don't care about the results. But now I need to stop execution immediately after the first item that doesn't return my desired result. Let's say a return value of 4 or higher requires execution to stop - then what I want to do is this: Prelude> takeWhile (<4) $ mapM f [0..5] Which gives me this error: <interactive:1:22: Couldn't match expected type `[b]' against inferred type `IO a' In the first argument of `mapM', namely `f' In the second argument of `($)', namely `mapM f ([0 .. 5])' In the expression: takeWhile (< 4) $ mapM f ([0 .. 5]) And that makes sense to me - the result is still contained in the IO monad, and I can't just compare two values contained in the IO monad. I know this is precisely the purpose of monads -- chaining results together and discarding operations when a certain condition is met -- but is there an easy way to "wrap up" the IO monad in this case to stop executing the chain upon a condition of my choosing, without writing an instance of MonadPlus? Can I just "unlift" the values from f, for the purposes of the takeWhile? Is this a solution where functors fit? Functors haven't "clicked" with me yet, but I sort of have the impression that this might be a good situation to use them. Update: @sth has the closest answer to what I want - in fact, that's almost exactly what I was going for, but I'd still like to see whether there is a standard solution that isn't explicitly recursive -- this is Haskell, after all! Looking back on how I worded my question, now I can see that I wasn't clear enough about my desired behavior. The f function I used above for an example was merely an example. The real functions are written in C and used exclusively for their side effects. I can't use @Tom's suggestion of mapM_ f (takeWhile (&lt;4) [0..5]) because I have no idea whether any input will really result in success or failure until executed. I don't actually care about the returned list, either -- I just want to call the C functions until either the list is exhausted or the first C function returns a failure code. In C-style pseudocode, my behavior would be: do { result = function_with_side_effects(input_list[index++]); } while (result == success && index < max_index); So again, @sth's answer performs the exact behavior that I want, except that the results may (should?) be discarded. A dropWhileM_ function would be equivalent for my purposes. Why isn't there a function like that or takeWhileM_ in Control.Monad? I see that there was a similar discussion on a mailing list, but it appears that nothing has come of that.

    Read the article

  • Deserialising Json to derived types in Asp.Net Web API

    - by IoChaos
    I'm calling a method of my WebAPI sending a json that I would like to match (or bind) with a model. In the controller I have a method like: public Result Post([ModelBinder(typeof(CustomModelBinder))]MyClass model); 'MyClass', wich is given as a parameter is an abstract class. I would like that at, depending of the type of json passed, the correct inherited class is instantiated. To achieve it, I'm trying to implement a custom binder. The problem is that (I don't know if it's very basic but I can't find anything) I don't know how to retrieve the raw Json (or better, some kind of serialization) that comes in the request. I see: actionContext.Request.Content But all methods are exposed as async. I don't know who this fits with passing the generate model to the controller method... Thanks a lot!

    Read the article

  • how to change the name dynamicaly usign jquery grid

    - by kumar
    hello friends, I am using jquery grid I have jquery grid with user data..First Coulum is ID.. here is the code $("#table").click(function(e) { var row = jQuery(e.target).parent(); Name = row.attr("id"); Friends(Name); }); Now when i click on the row I am getting Id value.. i am passing this id value to one funcation to dispaly name.. I can able to dispaly the name only frist Id.. its not changing each and every row click? Can any body help me out thanks

    Read the article

  • Open generic interface types of open implementation don't equal interface type?

    - by George Mauer
    Here's a test that should, in my opinion be passing but is not. [TestMethod] public void can_get_open_generic_interface_off_of_implementor() { typeof(OpenGenericWithOpenService<>).GetInterfaces().First() .ShouldEqual(typeof(IGenericService<>)); } public interface IGenericService<T> { } public class OpenGenericWithOpenService<T> : IGenericService<T> { } Why does this not pass? Given Type t = typeof(OpenGenericWithOpenService<>) how do I get typeof(IGenericService<)? I'm generally curious, but if you're wondering what I'm doing, I'm writing a Structuremap convention that forwards all interfaces implemented by a class to the implementation (as a singleton).

    Read the article

< Previous Page | 162 163 164 165 166 167 168 169 170 171 172 173  | Next Page >