Search Results

Search found 317 results on 13 pages for 'ashwin singh'.

Page 4/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | 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

  • 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

  • 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 Add-in load again n again for every instance of an application?

    - by Ashwin Upadhyay
    I have one qus. i created one shared add-in in c#.net. This add-in is working fine. now i want this add-in is load again n again when any office application is opened. For e.g. when i open any MS word document then add-in is load for that and if after that i opened another MS word document without closing previously opened document then add-in is again load for newly opend MS word document. But when i opened MS word at first time the add-in is load and if i opened MS word again but add-in is already loaded. my requirement is like that-my add-in is worked backgroundly that is its work only to record the opening,closing time of the word document and how much time spend onto that word document and also the name of this document. But when i opened one word document then add-in is loaded for that and if againg opened new word document then becaz of previously opened document add-in is not load for that document remember that priviously opened document is not closed. but if i closed previously opened document then for new document add-in is load.

    Read the article

  • When to Multithread and when not to Multithread c++ applications?

    - by Ashwin
    I have been in an assumption that multithreading gives a lot of flexibility and power to make efficient programs. But I am wrong. Multithreading is sometimes not desirable as it will create serious impact on the way the actual program behaves. My question? I am not sure of when to use and when not to use multithreads in applications. Please update this thread and give your opinions on multithreading and suggestions on its usage scenarios.

    Read the article

  • Wrapping C/C++ inside Java

    - by Ashwin
    I develop applications/programs in C/C++. I am more versed in these two languages and love being a C++ developer. I am wondering how to create a Java program that contains all my C++ code. I mean, I would like to wrap all my C++ code (that is already developed) inside Java class. But clueless how to do it. Please post your responses or methods/steps on integrating C++ inside Java. (using JNI is the way, but I could not figure it out on www how to use it) FYI, I use Eclipse IDE to develop. How and what packages should I include in my project workspace?

    Read the article

  • C++: What is the size of an object of an empty class?

    - by Ashwin
    I was wondering what could be the size of an object of an empty class. It surely could not be 0 bytes since it should be possible to reference and point to it like any other object. But, how big is such an object? I used this small program: #include <iostream> using namespace std; class Empty {}; int main() { Empty e; cerr << sizeof(e) << endl; return 0; } The output I got on both Visual C++ and Cygwin-g++ compilers was 1 byte! This was a little surprising to me since I was expecting it to be of the size of the machine word (32 bits or 4 bytes). Can anyone explain why the size of 1 byte? Why not 4 bytes? Is this dependent on compiler or the machine too? Also, can someone give a more cogent reason for why an empty class object will not be of size 0 bytes?

    Read the article

  • C: Why does gcc allow char array initialization with string literal larger than array?

    - by Ashwin
    int main() { char a[7] = "Network"; return 0; } A string literal in C is terminated internally with a nul character. So, the above code should give a compilation error since the actual length of the string literal Network is 8 and it cannot fit in a char[7] array. However, gcc (even with -Wall) on Ubuntu compiles this code without any error or warning. Why does gcc allow this and not flag it as compilation error? gcc only gives a warning (still no error!) when the char array size is smaller than the string literal. For example, it warns on: char a[6] = "Network"; [Related] Visual C++ 2012 gives a compilation error for char a[7]: 1>d:\main.cpp(3): error C2117: 'a' : array bounds overflow 1> d:\main.cpp(3) : see declaration of 'a'

    Read the article

  • using IntentExatras with Alarm Manager

    - by Ashwin
    I want to know if this code will work(I cannot try it out right now. Moreover, I have a few doubts that have to be cleared). Intent intent = new Intent(context, AlarmReceiver.class); intent.putExtra("user",global.getUsername()); intent.puExtra("password",global.getPassword); PendingIntent sender = PendingIntent.getBroadcast(context, 192837, intent, PendingIntent.FLAG_UPDATE_CURRENT); // Get the AlarmManager service Log.v("inside log_run", "new service started"); AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); am.setRepeating(AlarmManager.RTC_WAKEUP, IMMEDIATELY,60000,sender); finish(); As you can see, this code starts an AlarmManager with setRepeating(). If you see the intent(actually the pending intent) passed on to the BroadcastReceiver, there are two extras that are passed on. These are global variables that live as long as the Application is running. But this AlarmManager is meant to be run in the background (that is application will be alive only for the first few calls of the o fthe alrmamanager to the broadcast recevier) My Question Will AlarmManager make a copy of the global variables(the username and password) and maintain this copy to be passed along with the intent? Because, these values will be used in the broadcast receiver.

    Read the article

  • LaTeX: How to find package(s) that a command belongs to?

    - by Ashwin
    It is a simple question to which I am not able to find the answer: Given a LaTeX command, how do I find out what package(s) it belongs to or comes from? For example, given the \qquad horizontal spacing command, what package does it come from? Especially troublesome since it works without including any package!

    Read the article

  • PHP Infine Loop 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

  • DNS Server address configured inside Router not working

    - by Charandeep Singh
    Well, I have an ISP router in which I have configured DNS Servers to use (Primary & Secondary) like Google DNS. It works just fine. But now I have setup a computer with DNS server (Simple DNS Plus). I got it working by settings my internal DNS Server IP Address in computer. i.e. 192.168.1.3 So, instead of settings my internal DNS IP Address in every computer in my network, I want to setup DNS Server into my router. So on every DHCP request, computer get DNS Server to use. So I configured it like this: Primary DNS: 192.168.1.3 Secondry DNS: (left blank) After applying and DNS Requests stop resolving. But strange part is DNS request does goes to DNS Server but maybe not returned back, because all DNS request were available in cache logs. I don't know why this is not working, let me know if you have any solution or wordaround for this. Thanks! Update 1: NSLOOKUP Result C:\Users\user>nslookup google.com DNS request timed out. timeout was 2 seconds. Server: UnKnown Address: 192.168.1.1 DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. *** Request to UnKnown timed-out

    Read the article

  • How much RAM required by Varnish?

    - by Gobind Singh Deo
    Hi, I'm using Apache for serving static files. Apache2 require too much RAM. I want to reduce the RAM usage. I don't have experience with Varnish. It's said to be faster. I don't know how Varnish works. So, How much RAM needed for running Apache2+Varnish? Will Apache2+Varnish have higher RAM usage than Apache2 without Varnish? Thanks.

    Read the article

  • Install GRUB bootloader without installing Linux.

    - by Kavitesh Singh
    I have Windows 7 installed on the system and I want to create a separate WinPe bootable partition which system can fallback when things go wrong. Now Win7 does give this option and i might also edit the BCD store to make changes in the boot menu of Win7 or could use EasyBCD. I dont want to use these options as i need to customize hiding/unhiding of partitions at the time of booting etc. I search and found GRUB might the tool i am looking for. I want to use GRUB loader without any version of Linux installed on the system. Can someone guide me how i can install the GRUB on harddisk MBR and configure the bootmenu. I search internet and mostly i came across commands which search the GRUB on the harddisk because of existing linux installation and then try to repair it. In my case there is no Linux at all. I have Ubuntu 9.10 bootable CD/ OpenSUSE 11.2 liveCD and installation disc. Can i use them to install GRUB on my system?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >