Search Results

Search found 130 results on 6 pages for 'ashwin prabhu'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • How to find the name of multiple files opened on system by unique id?

    - by Ashwin Upadhyay
    I want to know about the name of all currently opened MS-Word file by its unique id. I found unique id for one file but when I gave its destination path in code. My requirement is that when any user open Word file then the unique id of this file is passed into my code and through this code the name of this file is stored into database (but it is done backgroundly and for multiple files).

    Read the article

  • how to give language option at installation time of my .net project?

    - by Ashwin
    I created one desktop project in c#. i want to know about how it could be use for different languages. i created resx file for all the forms like that: select particular form goes to the property window set localiztion true select language in which i want to show in particular language. convert all labels text and other functionality in selected language and build it. after building one another resx file created other than default resx. This process is did for all the form. so now each form having to resx file first is hi.resx for hindi and another is default resx. now my qus is that : how to give language selection option at installation time. and when user choose any language then my application is converted in that language that means particular language resx file set life time whenever user uninstall that application.

    Read the article

  • How to fetch redio button value and save this value in app.config at installation time?

    - by Ashwin
    i have one question related to add-in installation.......... qus is: i want to combine shared addin for msword created in visual studio 2005, to my project that means if i install my product then addin is also install with this........ and if i uninstall my product add-in is also uninstall........... and i also have another question other than addin i want to give language choosen option at installation time that means if user want to select hindi then our product install in hindi language and if select english than install in english... how this facility give in setup creation plzzz discribe in detail.

    Read the article

  • C++ STL: How to write wrappers for cout, cerr, cin and endl?

    - by Ashwin
    I do not like using namespace std, but I am also tired of having to type std:: in front of every cout, cin, cerr and endl. So, I thought of giving them shorter new names like this: // STLWrapper.h #include <iostream> #include <string> extern std::ostream& Cout; extern std::ostream& Cerr; extern std::istream& Cin; extern std::string& Endl; // STLWrapper.cpp #include "STLWrapper.h" std::ostream& Cout = std::cout; std::ostream& Cerr = std::cerr; std::istream& Cerr = std::cin; std::string _EndlStr("\n"); std::string& Endl = _EndlStr; This works. But, are there any problems in the above which I am missing? Is there a better way to achieve the same?

    Read the article

  • Redundant assert statements in .NET unit test framework

    - by Prabhu
    Isn't it true that every assert statement can be translated to an Assert.IsTrue, since by definition, you are asserting whether something is true or false? Why is it that test frameworks introduce options like AreEquals, IsNotNull, and especially IsFalse? I feel I spend too much time thinking about which Assert to use when I write unit tests.

    Read the article

  • Are these saml request-response good enough?

    - by Ashwin
    I have set up a single sign on(SSO) for my services. All the services confirm the identity of the user using the IDPorvider(IDP). In my case I am also the IDP. In my saml request, I have included the following: 1. the level for which auth. is required. 2. the consumer url 3. the destination service url. 4. Issuer Then, encrypting this message with the SP's(service provider) private key and then with the IDP's Public key. Then I am sending this request. The IDP on receiving the request, first decrypts with his own private key and then with SP's public key. In the saml response: 1. destination url 2. Issuer 3. Status of the response Is this good enough? Please give your suggestions?

    Read the article

  • How to find Key and IV value from .Net to PHP

    - by PHP-Prabhu
    Can any one please let me know is there any way to find a solution for the below stuffs. I need to find out the KEY and IV value from the below byte array. the byte array in .net and this has to be convert into KEY(string) and IV(string) via PHP. private static readonly byte[] Key = { 0xda, 0x3c, 0x35, 0x6f, 0xbd, 0xd, 0x87, 0xf0, 0x9a, 0x7, 0x6d, 0xab, 0x7e, 0x82, 0x36, 0xa, 0x1a, 0x5a, 0x77, 0xfe, 0x74, 0xf3, 0x7f, 0xa8, 0xaa, 0x4, 0x11, 0x46, 0x6b, 0x2d, 0x48, 0xa1 }; private static readonly byte[] IV = { 0x6d, 0x2d, 0xf5, 0x34, 0xc7, 0x60, 0xc5, 0x33, 0xe2, 0xa3, 0xd7, 0xc3, 0xf3, 0x39, 0xf2, 0x16 };

    Read the article

  • C++ STL: How to iterate vector while requiring access to element and its index?

    - by Ashwin
    I frequently find myself requiring to iterate over STL vectors. While I am doing this I require access to both the vector element and its index. I used to do this as: typedef std::vector<Foo> FooVec; typedef FooVec::iterator FooVecIter; FooVec fooVec; int index = 0; for (FooVecIter i = fooVec.begin(); i != fooVec.end(); ++i, ++index) { Foo& foo = *i; if (foo.somethingIsTrue()) // True for most elements std::cout << index << ": " << foo << std::endl; } After discovering BOOST_FOREACH, I shortened this to: typedef std::vector<Foo> FooVec; FooVec fooVec; int index = -1; BOOST_FOREACH( Foo& foo, fooVec ) { ++index; if (foo.somethingIsTrue()) // True for most elements std::cout << index << ": " << foo << std::endl; } Is there a better or more elegant way to iterate over STL vectors when both reference to the vector element and its index is required? I am aware of the alternative: for (int i = 0; i < fooVec.size(); ++i) But I keep reading about how it is not a good practice to iterate over STL containers like this.

    Read the article

  • PHP Infine Loope Problem

    - by Ashwin
    function httpGet( $url, $followRedirects=true ) { global $final_url; $url_parsed = parse_url($url); if ( empty($url_parsed['scheme']) ) { $url_parsed = parse_url('http://'.$url); } $final_url = $url_parsed; $port = $url_parsed["port"]; if ( !$port ) { $port = 80; } $rtn['url']['port'] = $port; $path = $url_parsed["path"]; if ( empty($path) ) { $path="/"; } if ( !empty($url_parsed["query"]) ) { $path .= "?".$url_parsed["query"]; } $rtn['url']['path'] = $path; $host = $url_parsed["host"]; $foundBody = false; $out = "GET $path HTTP/1.0\r\n"; $out .= "Host: $host\r\n"; $out .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n"; $out .= "Connection: Close\r\n\r\n"; if ( !$fp = @fsockopen($host, $port, $errno, $errstr, 30) ) { $rtn['errornumber'] = $errno; $rtn['errorstring'] = $errstr; } fwrite($fp, $out); while (!@feof($fp)) { $s = @fgets($fp, 128); if ( $s == "\r\n" ) { $foundBody = true; continue; } if ( $foundBody ) { $body .= $s; } else { if ( ($followRedirects) && (stristr($s, "location:") != false) ) { $redirect = preg_replace("/location:/i", "", $s); return httpGet( trim($redirect) ); } $header .= $s; } } fclose($fp); return(trim($body)); } This code sometimes go infinite loop. What's wrong here?

    Read the article

  • prompt to reboot computer after installation completed

    - by Ashwin
    I am currently adding a deployment project to my C# solution which installs a windows service and I have been trying to find a property that will make the installer prompt the user to reboot the system once installation has completed. I would prefer to simply set a property rather than create a small application that I run at the end of the install.

    Read the article

  • how to show a messege box for restart computer after installation in c#?

    - by Ashwin
    hi i want to know about how to display a messege box to display a messege "Pleace restart your computer" with yes and no option is user click on yes then system restart. This messege box want to show after complition of installation. if is there any idiea about that then please help and i also want to knw if is there any code for that then where i place this code in installer class of elsewhere?

    Read the article

  • How to perform a Depth First Search iteratively using async/parallel processing?

    - by Prabhu
    Here is a method that does a DFS search and returns a list of all items given a top level item id. How could I modify this to take advantage of parallel processing? Currently, the call to get the sub items is made one by one for each item in the stack. It would be nice if I could get the sub items for multiple items in the stack at the same time, and populate my return list faster. How could I do this (either using async/await or TPL, or anything else) in a thread safe manner? private async Task<IList<Item>> GetItemsAsync(string topItemId) { var items = new List<Item>(); var topItem = await GetItemAsync(topItemId); Stack<Item> stack = new Stack<Item>(); stack.Push(topItem); while (stack.Count > 0) { var item = stack.Pop(); items.Add(item); var subItems = await GetSubItemsAsync(item.SubId); foreach (var subItem in subItems) { stack.Push(subItem); } } return items; } EDIT: I was thinking of something along these lines, but it's not coming together: var tasks = stack.Select(async item => { items.Add(item); var subItems = await GetSubItemsAsync(item.SubId); foreach (var subItem in subItems) { stack.Push(subItem); } }).ToList(); if (tasks.Any()) await Task.WhenAll(tasks); UPDATE: If I wanted to chunk the tasks, would something like this work? foreach (var batch in items.BatchesOf(100)) { var tasks = batch.Select(async item => { await DoSomething(item); }).ToList(); if (tasks.Any()) { await Task.WhenAll(tasks); } } The language I'm using is C#.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >