Search Results

Search found 1079 results on 44 pages for 'deepak kumar goyal'.

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

  • 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

  • How to detect internet connectivity using java program

    - by Sunil Kumar Sahoo
    How to write a java program which will tell me whether I have internet access or not. I donot want to ping or create connection with some external url because if that server will be down then my program will not work. I want reliable way to detect which will tell me 100% guarantee that whether I have internet connection or not irrespective of my Operating System. I want the program for the computers who are directly connected to internet. I have tried with the below program URL url = new URL("http://www.xyz.com/"); URLConnection conn = url.openConnection(); conn.connect(); I want something more appropriate than this program Thanks Sunil Kumar Sahoo

    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

  • How to maximize java swing application

    - by Sunil Kumar Sahoo
    Hi All, I have created a login page using java swing. and i created jar for the application. Now when I run the jar then my login page is displayed then i minimize the application and again run the jar then another instance of my application is displayed (means now in my system I have two login page. 1 is in minimized format and another is in normal state. But I want that if in my system login page is already running and is minimized then if i run the jar once again then it will not start as a new application rather it should maximize the earlier login page. How to achieve this type of functionality ? please help me Thanks Sunil Kumar Sahoo

    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

  • generate all subsets of size k from a set

    - by Kumar
    hi, i want to generate all the subsets of size k from a set. eg:-say i have a set of 6 elements, i have to list all the subsets in which the cardinality of elements is 3. I tried looking for solution,but those are code snippets. Its been long since I have done coding,so I find it hard to understand the code and construct a executable program around it. A complete executable program in C or C++ will be quite helpful. Hoping of an optimal solution using recursion. Thanks in advance. Kumar.

    Read the article

  • Cannot get Correct month for a call from call log history

    - by Nishant Kumar
    I am trying to extract information from the call log of the android. I am getting the call date that is one month back from the actual time of call. I mean to say that the information extracted by my code for the date of call is one mont back than the actual call date. I have the following in the Emulator: I saved a contact. Then I made a call to the contact. Code: I have 3 ways of extracting call Date information but getting the same wrong result. My code is as follows: /* Make the query to call log content */ Cursor callLogResult = context.getContentResolver().query( CallLog.Calls.CONTENT_URI, null, null, null, null); int columnIndex = callLogResult.getColumnIndex(Calls.DATE); Long timeInResult = callLogResult.getLong(columnIndex); /* Method 1 to change the milliseconds obtained to the readable date formate */ Time time = new Time(); time.toMillis(true); time.set(timeInResult); String callDate= time.monthDay+"-"+time.month+"-"+time.year; /* Method 2 for extracting the date from tha value read from the column */ Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(time); String Month = calendar.get(Calendar.MONTH) ; /* Method 3 for extracting date from the result obtained */ Date date = new Date(timeInResult); String mont = date.getMonth() While using the Calendar method , I also tried to set the DayLight SAving Offset but it didnot worked, calendar.setTimeZone(TimeZone.getTimeZone("Europe/Paris")); int DST_OFFSET = calendar.get( Calendar.DST_OFFSET ); // DST_OFFSET Boolean isSet = calendar.getTimeZone().useDaylightTime(); if(isSet) calendar.set(Calendar.DST_OFFSET , 0); int reCheck = calendar.get(Calendar.DST_OFFSET ); But the value is not set to 0 in recheck. I am getting the wrong month value by using this also. Please some one help me where I am wrong? or is this the error in emulator ?? Thanks, Nishant Kumar Engineering Student

    Read the article

  • FMS NetConnection.Connect.Close happening when starts and even in the middle of video in Flash with

    - by Sunil Kumar
    Hi I have developed a Flash Video player in Flash CS3 with Action Script 2.0 to play video from Adobe Flash Media Server 3.5. To play video from FMS 3.5, first I have to verify my swf file on FMS 3.5 server console so that it can be ensure that RTMP video URL only be play in verified SWF file. Right now I am facing problem of "NetConnection.Connect.Close" when I try to connect my NetConnection Object to FMS 3.5 to stream video from that server. So now I am getting this message "NetConnection.Connect.Close" from FMS 3.5. When this is happening in my office area at the same time when I am checking the the same video url from out side the office (With help of my friends who is in another office) area it is working fine. My friends naver faced even a single issue with NetConnection.Connect.Close. But in my office when I got message NetConnection.Connect.Close, I can play another streaming video very well like mtv.com jaman.com rajshri.com etc. Some time FMS works fine and video starts playing but in the middle of the video same thing happen "NetConnection.Connect.Close" There is no issue of Bandwidth in my office. I do't know why this is happening. Please see the message when I am getting "NetConnection.Connect.Close" message. NetConn == data: NetConn == objectEncoding: 0 NetConn == description: Connection succeeded. NetConn == code: NetConnection.Connect.Success NetConn == level: status NetConn == level: status NetConn == code: NetConnection.Connect.Closed Please help Thanks & regards Sunil Kumar

    Read the article

  • which xml validator will work perfectly for multithreading project

    - by Sunil Kumar Sahoo
    Hi All, I have used jdom for xml validation against schema. The main problem there is that it gives an error FWK005 parse may not be called while parsing The main reason was that multiple of threads working for xerces validation at the same time. SO I got the solution that i have to lock that validation. which is not good So I want to know which xml validator works perfectly for multithreading project public static HashMap validate(String xmlString, Validator validator) { HashMap<String, String> map = new HashMap<String, String>(); long t1 = System.currentTimeMillis(); DocumentBuilder builder = null; try { //obtain lock to proceed // lock.lock(); try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); // Source source = new DOMSource(builder.parse(new ByteArrayInputStream(xmlString.getBytes()))); validator.validate(new StreamSource(new StringReader(xmlString))); map.put("ISVALID", "TRUE"); logger.info("We have successfuly validated the schema"); } catch (Exception ioe) { ioe.printStackTrace(); logger.error("NOT2 VALID STRING IS :" + xmlString); map.put("MSG", ioe.getMessage()); // logger.error("IOException while validating the input XML", ioe); } logger.info(map); long t2 = System.currentTimeMillis(); logger.info("XML VALIDATION TOOK:::" + (t2 - t1)); } catch (Exception e) { logger.error(e); } finally { //release lock // lock.unlock(); builder = null; } return map; } Thanks Sunil Kumar Sahoo

    Read the article

  • How to play .3gp videos in mobile using RTMP (FMS) and HTTP?

    - by Sunil Kumar
    Hi I am not able to play video on mobile device which is .3gp container and H.263 / AMR_NB encoded. I just want to play my website videos in mobile device also just like youtube.com. I want to use RTMP and HTTP both. My requirement is as follows- Which codec and container will be best? Should I use FLV to play video on mobile device? RTSP required or can be use RTMP? Is NetStream and NetConnection methods different from Flash Player in Flash Lite Player? How to play 3gp video using RTMP stream ie. ns.play(“mp4:mobilevideo.3gp”, 0, -1, true) is it ok or any thing else required? For mobile browser and computer browser, can I use single player or I have to make different player for computer browser and mobile browser? It would be better if I can do it with single player for both mobile and computer browser. Sample code required for testing. If you can. I got below article in which they mention that we can play video 3gp container in mobile also. Please find the article. Articles URL- http://www.hsharma.com/tech/articles/flash-lite-30-video-formats-and-video-volume/ http://www.adobe.com/devnet/logged_in/dmotamedi_fms3.html Thanks Sunil Kumar

    Read the article

  • android odbc connection

    - by Vijay Kumar
    i want to connect odbc connection for my android application. Here in my program i'm using oracle database 11g and my table name is sample. After i run the program close the emulator open the database the values could not be stored. Please give one solution or any changes in my program or connection string. package com.odbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import android.app.Activity; import android.os.Bundle; public class OdbcActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String first="vijay"; String last="kumar"; try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localshot:1521:XE","system","vijay"); PreparedStatement pst=con.prepareStatement("insert into sample(first,last) values(?,?"); pst.setString(1,first); pst.setString(2,last); pst.executeUpdate(); } catch(Exception e) { System.out.println("Exception:"+e); } } }

    Read the article

  • Help regarding Android NDK

    - by Siva Kumar
    I am a beginner in using Android NDK. I am using Eclipse and I installed cygwin to build the c file to generate the .so file But while building the c file in cygwin I am always getting the error make: ***No rule to make target 'file.c' ... .Stop I tried building different C codes but for every file it says the same error .. Here is the source code: public class ndktest extends Activity { static { System.loadLibrary("ndkt"); } private native void helloLog(String logThis); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); helloLog("this is to test log file"); } } file.c void Java_com_ndktest_helloLog(JNIEnv * env, jobject this, jstring logThis) { jboolean isCopy; const char * szLogThis = (*env)->GetStringUTFChars(env, logThis, &isCopy); (*env)->ReleaseStringUTFChars(env, logThis, szLogThis); } And here is my Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_LDLIBS := -llog LOCAL_MODULE := ndkt LOCAL_SRC_FILES := file.c include $(BUILD_SHARED_LIBRARY) I searched for the solution for the cause of error ... but nothing works for me. Can anyone tell me where I am making the mistake ? Thanks, Siva Kumar

    Read the article

  • Forward Shibboleth Environment Variables to Tomcat via Apache

    - by Deepak Singh Rawat
    I am using Shibbolethv2.3 with Apache web server and Tomcat application server. I am using Apache as a reverse proxy using mod_proxy.so. I am not able to forward the Shibboleth environment variables from Apache to Tomcat. I am able to forward the attributes in the headers but as already mentioned in the wiki this approach is not safe. I have tried forwarding the environment variables by the following directive : SetEnv AJP_username ${username} then at the Java side I can access the attribute by : request.getAttribute("username"); The strange thing here is that, I get a different value instead of the one set by Shibboleth. I get the Windows account name as a result. If I use any other attribute name, I get a null value. I have searched a lot and have run out of options. Please guide me towards the right solution. My setup details : Shibboleth version : 2.3 OS : Windows XP SP3 Webserver : Apache 2.2 Application Server : Tomcat 6 Proxy module : mod_proxy.so

    Read the article

  • RTL8168B/8111B Lan card is not detected in Redhat..Error is make ***/lib/modules/2.6.18-53.e15/build

    - by Deepak Narwal
    0 Hello friends... In My computer Lan card model is Realtek RTL8168B/8111B PCI-E GIGABIT ETHERNET NIC (NDIS 6.20) My system is dual boot windows 7 and redhat 5.1.Redhat is not picking up this model of Lan card automaticlly. I tried it by downloading from realtak site for this particular model and find some .tar packages for my kernal and when i tried to install them ... check old drivers & unload it build the module and install make */lib/modules/2.6.18-53.e15/build: no such file or directory stop make[1]: *[modules] error 2 make : [modules] error 2 i downloaded tar files from sites and unpack according to their instrution i tried to run autorun.sh script as mentioned in readme file but after doing this it is showing above error... Now what to do i am not getting

    Read the article

  • .htaccess to nginx rewite

    - by Deepak
    please help me with changing this .htaccess to rginx rewite RewriteRule ^show.php/(.*)$ show2.php?img=$1 [L] RewriteRule ^out.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^view.php/(.)$ view2.php?img=$1 [L] RewriteRule ^images.php/([a-z]{1})(.)$ images2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^gallery/([0-9]+)-([^/])/(.)$ gallery.php?gal=$1&img=$3 [L] RewriteRule ^view/([0-9]+)-([^/])/(.)$ gallery_body.php?gal=$1&img=$3 [L]

    Read the article

  • Cannot access any remote resource after connecting to Cisco VPN on Vista

    - by Deepak Singh Rawat
    I have installed Cisco vpn client version 5.0.07.0290 on Vista Business SP2. I am able to successfully connnect to the vpn. But after connecting I am not able to access any resource in the vpn (like database, other computers in the network etc.). I have tried the following without any success : Older versions of the client Other vpn clients like Shrewsoft : same issue as the cisco vpn client Disabled Internet Connection Sharing service Installed the client in the root administrator account Run the installer as administrator Run the vpngui and ipsecdialer in XP compatibility mode and as administrator I am not sure how to troubleshoot this issue. Can somebody please help me in troubleshooting this issue? P.S : I've Zonealarm firewall, can that be an issue?

    Read the article

  • Cannot access any remote resource after connecting to Cisco VPN on Vista

    - by Deepak Singh Rawat
    I have installed Cisco vpn client version 5.0.07.0290 on Vista Business SP2. I am able to successfully connnect to the vpn. But after connecting I am not able to access any resource in the vpn (like database, other computers in the network etc.). I have tried the following without any success : Older versions of the client Other vpn clients like Shrewsoft : same issue as the cisco vpn client Disabled Internet Connection Sharing service Installed the client in the root administrator account Run the installer as administrator Run the vpngui and ipsecdialer in XP compatibility mode and as administrator I am not sure how to troubleshoot this issue. Can somebody please help me in troubleshooting this issue? P.S : I've Zonealarm firewall, can that be an issue?

    Read the article

  • HOw to deny a particular mac address client not to obtain ip/name from dhcp & dns server..

    - by Deepak Narwal
    Hello Friends... I configures DHCP server on my rhel 5.4 machine.Clients are getting ip from this DHCP server.NO problem upto this.. NOw i want that a particular mac address client do not pick ip from this dhcp server.. Same question is with my DNS server. I want that a particular mac address client do not pick name from this dns server.. PLz discuss in little bit details i am very new in this field.I am learning these things.I hope YOu will give detailed explaiantion.. Thanks IN ADvance friends..

    Read the article

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