Search Results

Search found 80 results on 4 pages for 'atul goyal'.

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

  • Memory consumption of each accept() call on server running on Windows 2008 [migrated]

    - by Atul
    I've written a simple and small server application on Windows 2008 that just accepts connections and does nothing else. I am doing memory footprint assessment of socket calls, What I found that each connection (after accept()) consumes at least 2.5 KB of memory. Interestingly, the memory is not consumed by the process that has accept() call but it consumed by a OS process. I believe it might be because of data structures being created inside OS for each connection. Now, I have two key questions: Is it possible by any means to reduce this memory footprint (by changing any parameters, configuration etc) ? If yes how ? (Because 2K for each connection would be too much if we planning server to accept millions of connections) If my server is intended to accept million connections, is it good idea to use Windows 2008 ? or shall I switch to some other OS? Please advice me.

    Read the article

  • Stack Over Flow Message

    - by atul
    I have created an image of my original hard disk, now i have started my pc by image hard disk, windows xp is working fine. but when we are running an other application programm, we are receiving an error message of Stack Over Flow. While my original hard disk is working fine. We don't know that programm is written in which language. I have only exe file of that. Can any one suggest, what may be the reason.

    Read the article

  • How to add a shortcut key in notepad++?

    - by Atul
    I would like to create a shortcut key for "Reloading a file" in notepad++ as I use this feature a lot in it. I tried finding documentation for it but didn't find any useful information. Is it possible? If yes, please point me to how to do this?

    Read the article

  • Playing dynamically embedded sound object via Javascript

    - by Vikram Goyal
    I need to background load some WAV files for an HTML page using AJAX. I use AJAX to get the details of the WAV files, then use the embed tag, and I can confirm that the files have loaded successfully because when I set autostart to true, the files play. However, I need the files to play only when the user clicks on a button (or an event is fired). The following is my code to preload these files: function preloadMedia() { for(var i = 0; i < testQuestions.length; i++) { var soundEmbed = document.createElement("embed"); soundEmbed.setAttribute("src", "/media/sounds/" + testQuestions[i].mediaFile); soundEmbed.setAttribute("hidden", true); soundEmbed.setAttribute("id", testQuestions[i].id); soundEmbed.setAttribute("autostart", false); soundEmbed.setAttribute("width", 0); soundEmbed.setAttribute("height", 0); soundEmbed.setAttribute("enablejavascript", true); document.body.appendChild((soundEmbed)); } } I use the following code to play the file (based on what sound file that user wants to play) function soundPlay(which) { var sounder = document.getElementById(which); sounder.Play(); } Something is wrong here, as none of the browsers I have tested on play the files using the code above. There are no errors, and the code just returns. I would have left it at that (that is - I would have convinced the client to convert all WAV's to MP3 and use MooTools). But I realized that I could play the sound files, which were not dynamically embeded. Thus, the same soundPlay function would work for a file embeded in the following manner: <embed src="/media/sounds/hug_sw1.wav" id="sound2" width="0" heigh="0" autostart="false" enablejavascript="true"/> anywhere within the HTML. And it plays well in all the browsers. Anyone have a clue on this? Is this some sort of undocumented security restriction in all the browsers? (Please remember that the files do get preloaded dynamically, as I can confirm by setting the autostart property to true - They all play). Any help appreciated.

    Read the article

  • how to get ipaddress of my computer

    - by astha goyal
    hello i want to knw the ipaddress of my computer. /sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' this command gives the ipaddress of my computer and print result on console but i want it in a varible sothat i can use it in my C program. How can i do that.

    Read the article

  • How to use sprintf instead of hardcoded values

    - by astha goyal
    I am developing a firewall for Linux as my project. I am able to capture packets and to block them. I am using IPTABLES. How can I use variables with sprintf instead of hardcoded values? sprintf(comm, "iptables -A INPUT -s $str -j DROP") // inplace of: sprintf(comm, "iptables -A INPUT -s 192.168.0.43 -j DROP")

    Read the article

  • Is is possible to populate a datatable using a Lambda expression(C#3.0)

    - by deepak.kumar.goyal
    I have a datatable. I am populating some values into that. e.g. DataTable dt =new DataTable(); dt.Columns.Add("Col1",typeof(int)); dt.Columns.Add("Col2",typeof(string)); dt.Columns.Add("Col3",typeof(DateTime)); dt.Columns.Add("Col4",typeof(bool)); for(int i=0;i< 10;i++) dt.Rows.Add(i,"String" + i.toString(),DateTime.Now,(i%2 == 0)?true:false); There is nothing wrong in this program and gives me the expected output. However, recently , I am learning Lambda and has done some basic knowledge. With that I was trying to do the same thing as under Enumerable.Range(0,9).Select(i = > { dt.Rows.Add(i,"String" + i.toString(),DateTime.Now,(i%2 == 0)?true:false); }); But I am unsuccessful. Is my approach correct(Yes I know that I am getting compile time error; since not enough knowledge on the subject so far)? Can we achieve this by the way I am doing is a big doubt(as I donot know.. just giving a shot). If so , can some one please help me in this regard. I am using C#3.0 and dotnet framework 3.5 Thanks

    Read the article

  • How to change datagrid cell's itemRenderer dynamically

    - by Shubham Goyal
    i have a simple datagrid having 2 columns named as image and place. where image column has mx.controls.Image itemRenderer and place is simple. my requirement is to change itemRenderer of image cell when it will be clicked. i means to say when user click on any image from image column than i want to show that image path in editable mode and when user edit that path then the selected cell will start displayed the updated image. i dont know how to do this and getting depressed . please anyone help me ! :(

    Read the article

  • storing data at remote server using php

    - by VIPUL GOYAL
    I want to send data to php file and execute insert query in it to store data in database. When i execute this code, it executes but database does not get updated. Code of PHP file Java code------------------------------Remote.java------------------------------ public class Remote extends Activity { EditText name; Button s; String r; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); name= (EditText)findViewById(R.id.editText1); s=(Button)findViewById(R.id.button1); s.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { r = name.getText().toString(); ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>(); postParameters.add(new BasicNameValuePair("username", r)); CustomHttpClient.executeHttpPost("http://vipul.eu5.org/abc.php", postParameters); //Enetr Your remote PHP,ASP, Servlet file link } catch (Exception e) { e.printStackTrace(); } } }); } } -----------------------------CustomHttpClient.java---------------------------- public class CustomHttpClient { private static HttpClient getHttpClient() { if (mHttpClient == null) { mHttpClient = new DefaultHttpClient(); final HttpParams params = mHttpClient.getParams(); HttpConnectionParams.setConnectionTimeout(params, HTTP_TIMEOUT); HttpConnectionParams.setSoTimeout(params, HTTP_TIMEOUT); ConnManagerParams.setTimeout(params, HTTP_TIMEOUT); } return mHttpClient; } /** * Performs an HTTP Post request to the specified url with the * specified parameters. * * @param url The web address to post the request to * @param postParameters The parameters to send via the request * @return The result of the request * @throws Exception */ public static void executeHttpPost(String url, ArrayList postParameters) throws Exception { try { HttpClient client = getHttpClient(); HttpPost request = new HttpPost(url); UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(postParameters); request.setEntity(formEntity); HttpResponse response = client.execute(request); } catch(Exception e) { } } }

    Read the article

  • Load Spikes on a Apache MySQL Server with Wordpress MU

    - by Vikram Goyal
    Hi there, I am trying to investigate the reasons for some mysterious load spikes on a Linux Apache server (2.2.14) running PHP 5.2.9 on a dedicated server with enough processing power and memory. My primary web application is a Wordpress MU (2.9.2) installation. I have investigated and ruled out DOS attack, MySQL or Apache configuration issues. The log files don't give me anything of interest, except to tell me that there is severe load. The load (which can go up to 100) just seems to come and go. It helps that I have a script that checks every 3 minutes for the load, and restarts Apache. Restarting it helps, and the server comes back, till it happens again. There seems to be no set time frame, or visitor numbers on the site that can trigger this. Even a low number of concurrent visitors (20) can trigger it. I am almost convinced that there is a rewrite loop somewhere that is causing Apache to go mad. Apache is trying to serve something that is causing it to spawn more and more processes till it keels over. My question is: Given that I am convinced that this is a rewrite issue or something similar, how can I try and figure out what the issue is? What should I monitor? Apache logs are voluminous, and not very helpful. Of course, if this is not the issue, then at least knowing what to look for will help me eliminate this as an issue and look for something else. Thanks! Vikram

    Read the article

  • What am I missing in the following buttons code?

    - by Ayush Goyal
    I am trying to increment and decrement the middle textview via buttons on the sides. The application starts up finely but by the time I click on any of the buttons it gets closed with following error. Error: process <package> has stopped unexpectedly. My main.xml: <?xml version="1.0" encoding="utf-8"?> <Button android:id="@+id/button1" android:layout_width="50dp" android:layout_height="250dp" android:text="+" android:textSize="40dp" /> <TextView android:id="@+id/tv1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0" android:textSize="80dp" android:layout_toRightOf="@+id/button1" android:layout_marginTop="75dp" android:layout_marginLeft="80dp" /> <Button android:id="@+id/button2" android:layout_width="50dp" android:layout_height="250dp" android:layout_alignParentRight="true" android:text="-" android:textSize="40dp" /> My java file: public class IncrementDecrementActivity extends Activity { int counter; Button add, sub; TextView tv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); add = (Button) findViewById(R.id.button1); sub = (Button) findViewById(R.id.button2); tv = (TextView) findViewById(R.id.tv1); add.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { counter++; tv.setText(counter); } }); sub.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { counter--; tv.setText(counter); } }); } }

    Read the article

  • Designing DAL in .NET to be "data-source independent" and not just "database independent" ?

    - by Munish Goyal
    How to design such flexible DAL (specifically in .NET) ? What interfaces .NET provides and what should be done on my own ? Its a greenfield project starting with SQL Server as data source but in future, parts of it will move to different NoSQL type of datastores. Also, we may need to experiment with lot of different datastores (like some data may have to go with Cassandra, some with RDBMS, some to other DHT etc.) Therefore easily switchable access layer will be needed. All i know right now is the 'data' and 'operations needed on that data'.

    Read the article

  • Generating SQL change scripts in SSMS 2008

    - by Munish Goyal
    I have gone through many related SO threads and got some basic info. Already generated DB diagram. After that i am unable to find a button/option to generate SQL scripts (create) for all the tables in diagram. "Generate script" button is disabled, even on clicking the table in diagram. However i enabled the auto-generate option in tools-designer. But what to do with previous diagrams. I just want an easy way to auto-generate such scripts (create/alter) and would be gud if i get auto-generated stored procs for insert/selects/update etc. EDIT: I could do generate scripts for DB objects. Now: 1. How to import DB diagram from another DB. 2. How to generate (and manage their change integrated with VS source control) routine stored-procs like insert, update and select. Ok let me ask another way, can experts guide on the usual flow of creating/altering tables (across releases), creating stored-procs (are stored-procs the best way to go ?) and their change-management using SSMS design tools and minimal effort ?

    Read the article

  • Regular Expression to replace a pattern at runtime(C#3.0)

    - by deepak.kumar.goyal
    I have a requirement. I have some files in a folder among which some file names looks like say **EUDataFiles20100503.txt, MigrateFiles20101006.txt.** Basically these are the files that I need to work upon. Now I have a config file where it is mentioned as the file pattern type as EUDataFilesYYYYMMDD, MigrateFilesYYYYMMDD. Basically the idea is that, the user can configure the file pattern and based on the pattern mentioned, I need to search for those files that are present in the folder. i.e. at runtime the YYYYMMDD will get replaced by the Year Month and Date Values. It does not matter what dates will be there(but not with time stamp ; only dates)). And the EUDataFiles or MigrateFiles names will be there.(they are fixed) i.e. If the folder has a file name as EUDataFile20100504.txt(i.e. Year 2010, Month 05, Day 04) , I should ignore this file as it is not EUDataFiles20100504.txt (kindly note that the name is plural - File(s) and not file for which the system will ignore the file). Similarly, if the Pattern given as EUDataFilesYYYYMMDD and if the file present is of type EUDataFilesYYYYDDMM then also the system should ignore. How can I solve this problem? Is it doable using regular expression(Replacing the pattern at runtime)? If so can anyone be good enough in helping me out? I am using C#3.0 and dotnet framework 3.5. Thanks

    Read the article

  • Any good GUI tool to easily create stored procs SQL server 2008 ?

    - by Munish Goyal
    The templates for stored-procs in SSMS do not auto-populate all input columns, again there is manual work involved. I am looking for something like right-click on table and say CREATE stored-proc, and then it allows to pick a template, based on which it can populate the parameters etc. and give check-box in GUI (like table designer, you can easily add/remove a column). Some support for change management with table undergoing alter or otherwise would also be helpful. Currently we manually write all stored-procs, which i think we should be able to save time and labor with automation. Any suggestion on other free 3rd party tools ?

    Read the article

  • My Application running very slow..

    - by Atul Yadav
    Hi All.. I develop a application based on Advance data grid. In this grid every column add with help of item render and I have added check box in all the column header also.In the Grid i used xml data provider. I am creating xml as string and cast this string in to xml. When i click any cell it takes 10-13 sec and in the cell click handler i get value of System.totalMemory is 255205376. Please any one suggest me what i will do. Thanks

    Read the article

  • How to add a shortcut key in notepad++?

    - by Atul
    I would like to create a shortcut key for "Reloading a file" in notepad++ as I use this feature a lot in it. I tried finding documentation for it but didn't find any useful information. Is it possible? If yes, please point me to how to do this?

    Read the article

  • problm with MANIFEST.MF in jar

    - by Atul
    hi I have created jar in the following folder: /usr/local/bin/niidle.jar. And my MANIFEST.MF file is as follows: Manifest-Version: 1.0 Main-Class: com.ensarm.niidle.web.scraper.NiidleScrapeManager Class-Path: hector-0.6.0-17.jar And I verified that,this 'hector-0.6.0-17.jar' file is also present in the folder: /Projects/EnwelibDatedOct13/Niidle/lib/hector-0.6.0-17.jar I don't want to give full class-path name in MANIFEST.MF file,because I have to run this jar on other's machine,so I gave only jar file name 'Class-Path=hector-0.6.0-17.jar' in MANIFEST.MF file. Inspite of mentioning the Class-Path in MANIFEST.MF file, when I run this using command: java -jar /usr/local/bin/niidle.jar arguments... It is showing error massage: --Exception in thread "main" java.lang.NoClassDefFoundError: me/prettyprint/hector/api/Serializer at com.ensarm.niidle.web.scraper.NiidleScrapeManager.main(NiidleScrapeManager.java:21) Caused by: java.lang.ClassNotFoundException: me.prettyprint.hector.api.Serializer at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 1 more Please give me solution for this error message..

    Read the article

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