Search Results

Search found 104 results on 5 pages for 'parth'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Streaming and conversion of video from 3rd Parth

    - by Ashish
    Hi, I am working on a App where video has to be displayed.All these video are in .flv format, Is there any mechanism by using that I can convert this video to .mov or .m4v (supported by iphone) on the fly, so that user can view those video on their iphone or ipod. Thanks, Ashish

    Read the article

  • How can i setParth for new File use JFilechose , save dialog ?

    - by tiendv
    I have a dialog use Jfilechose, when i save a file by use FileOutputStream to create a file.txt to save in path which user want . But i have problem that it alway save in c:/user/Document Check my code DownLoadDialog downloadDialog = new DownLoadDialog(); int result = downloadDialog.showSaveDialog(queryPanel); if(result == downloadDialog.APPROVE_OPTION) { File file = downloadDialog.getSelectedFile(); //String parth =file.getPath(); //System.out.println(parth); //if(file.exists()) { // int response = JOptionPane.showConfirmDialog (null,"Overwrite existing file?","Confirm Overwrite",JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE); // if(response == JOptionPane.OK_OPTION) {} //} else { if(resultGoogleSearch > 0) { { String parth = new File(downloadDialog.getSelectedFile().getAbsolutePath().concat(".txt")).toString(); System.out.println(parth); for(int i=0;i<resultGoogleSearch;i++) { String[] temp = googleSearchResult.get(i).split("<br>"); //String resultURL = temp[0]; //File dir = downloadDialog.getCurrentDirectory(); try{ FileOutputStream googleReuslt = new FileOutputStream( downloadDialog.getSelectedFile().getAbsolutePath()+".txt" ); OutputStreamWriter writer = new OutputStreamWriter(googleReuslt); BufferedWriter buffer = new BufferedWriter(writer); writer.write(temp[0]); writer.close(); buffer.close(); } catch (FileNotFoundException fEx){ } catch(IOException ioEx) { } } } JOptionPane.showMessageDialog(IDRSApplication.idrsJFrame, IDRSResourceBundle.res.getString("successful")); } problem is here : why can't i set parth for new file ? FileOutputStream googleReuslt = new FileOutputStream( downloadDialog.getSelectedFile().getAbsolutePath()+".txt" ); OutputStreamWriter writer = new OutputStreamWriter(googleReuslt); BufferedWriter buffer = new BufferedWriter(writer); writer.write(temp[0]); writer.close(); buffer.close();

    Read the article

  • How to iterate loop inside a string searching for any word aftera fixed keyword?

    - by Parth
    Suppose I have a sting as "PHP Paddy,PHP Pranav,PHP Parth", now i have a count as 3,now how should I iterate loop in the string aiming on string after "PHP " to display the all the names? Alright This is the string "BEGIN IF (NEW.name != OLD.name) THEN INSERT INTO jos_menuaudit set menuid=OLD.id, oldvalue = OLD.name, newvalue = NEW.name, field = "name"; END IF; IF (NEW.alias != OLD.alias) THEN INSERT INTO jos_menuaudit set menuid=OLD.id, oldvalue = OLD.alias, newvalue = NEW.alias, field = "alias"; END IF; END" in which i am searching the particular word after " IF (NEW.", and after that particualar others strings should not b displayed, hence whenever in a loop it finds " IF (NEW." I musr get a word just next to it. and in this way an array should b ready for to use.

    Read the article

  • Apache: Virtual Host and .htacess for URL Rewriting not working

    - by parth
    I have configured a virtual host in my local machine and every thing is working fine. Now I want to use SEO friendly urls. To achieve this I have used the .htaccess file. My virtual host configuration is: <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/ypp" ServerName ypp.com ServerAlias www.ypp.com ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> and my .htaccess file has: AllowOverride All RewriteEngine On RewriteBase /ypp/ RewriteRule ^/browse$ /browse.php RewriteRule ^/browse/([a-z]+)$ /browse.php?cat=$1 RewriteRule ^/browse/([a-z]+)/([a-z]+)$ /browse.php?cat=$1&subcat=$2 The above .htaccess setting is not working. After that I modified my virtual host setting and it is working. The new virtual host setting is: <VirtualHost *:80> RewriteEngine On RewriteRule ^/browse$ /browse.php RewriteRule ^/browse/([a-z]+)$ /browse.php?cat=$1 RewriteRule ^/browse/([a-z]+)/([a-z]+)$ /browse.php?cat=$1&subcat=$2 ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/ypp" ServerName ypp.com ServerAlias www.ypp.com ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined <Directory "C:/xampp/htdocs/ypp"> AllowOverride All </Directory> </VirtualHost> Please let me know where I am going wrong in the .htacess file for url rewriting. I do not want to use the settings in virtual host, since for every change I have restart apache.

    Read the article

  • Is it possible for beginner to learn and develop an application in rails in 4 months?

    - by Parth
    I want to develop a web application or a website using rails. My current knowledge includes 1. HTML 2. CSS 3. C 4. Java And I am currently going through 5th chapter of the well grounded rubyist book by David A. Thomas. I came to know that learning ruby is beneficial for good knowledge of rails. So currently I am going through the basics of ruby. And learning rails in parallel. I want to know if in this scenario is it practically feasible to understand rails and develop an application/website in it within the time frame of 4 months. I need to develop an application which have atleast 3 complexity (complex functionality). Any ideas of good application for rails beginners is welcomed. But the application should be large or if it is small than it should have some complexity. Time is a constraint for me. I would have to develop application for college work but rails technology is my choice as I want to learn it.

    Read the article

  • Apache: Virtual Host and .htacess for URL Rewriting not working

    - by parth
    I have configured virtual host in my local machine and every thing working fine . Now I want to use SEO friendly urls. To achive this I have used .htacess file . My virtual host configuration is : <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/ypp" ServerName ypp.com ServerAlias www.ypp.com ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> and my .htacess file has : AllowOverride All RewriteEngine On RewriteBase /ypp/ RewriteRule ^/browse$ /browse.php RewriteRule ^/browse/([a-z]+)$ /browse.php?cat=$1 RewriteRule ^/browse/([a-z]+)/([a-z]+)$ /browse.php?cat=$1&subcat=$2 The above .htacess setting is not working . After that I have modigied my virtual host setting and it is working . new virtual host setting is : <VirtualHost *:80> RewriteEngine On RewriteRule ^/browse$ /browse.php RewriteRule ^/browse/([a-z]+)$ /browse.php?cat=$1 RewriteRule ^/browse/([a-z]+)/([a-z]+)$ /browse.php?cat=$1&subcat=$2 ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/ypp" ServerName ypp.com ServerAlias www.ypp.com ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined <Directory "C:/xampp/htdocs/ypp"> AllowOverride All </Directory> </VirtualHost> Please guide me where I am wrong in .htacess file for url rewriting . I donot want to use setting in virtual host because for every change I have restart apache .

    Read the article

  • Boot windows from grub

    - by Parth Shah
    I had Windows 7 and Ubuntu on my hard disk. I had installed Ubuntu using Wubi. To uninstall Ubuntu I deleted the Ubuntu partitions from Windows 7 Disk Management. When I re-boot my computer it shows grub rescue. What do I need to do to re-gain access to Windows? I do not have a Windows 7 DVD. Commands like rootnoverify, chainloader do not work in grub rescue. I get an unknown command error. PS: I am posting this from another computer :)

    Read the article

  • Is there a way to restore to previous version in Mac OS X after installing the update?

    - by PARTH
    Hi Guys, In my Mac OSX I recently updated my Mac from 10.6.5 to 10.6.6. After I installed the 10.6.6 version, I get error in Finder as below: The application Finder can't be opened Just around a minute after restarting my Mac everytime I get the error from Finder and then everthing stops working. I have lots of important data in my Mac but now I cant take a backup of it as Finder stops working. So, Is there a way in Mac where I can revert back to 10.6.5 version? What are my options? Please Help and Suggest Thanks

    Read the article

  • The application Finder can't be opened. -10810

    - by PARTH
    Hi Guys, I am getting an error as shown in the screenshot. This started happening after I updated my Mac OS X from 10.6.5 to 10.6.6. Problem is that Finder stops working 5 mins after the restart and all the other aplications including Xcode 3.2.5, iPhone simulator, safari,etc stops working. Everytime I have to restart the Mac as all the things hang. What could be wrong? What could be a permanent fix for this? Please Help and Suggest Thanks

    Read the article

  • Webservice error

    - by Parth
    i am new to webservices, I have created a basic stockmarket webservice, I have successfully created the server script for it and placed it in my server, Now I also creted a clent script and accessed it hruogh the same server.. Is it valid ? can boh files be accesed from the same server? or do I have to place them in different servers? If yes Then Y? If No then why do i get the blank page? I am using nusoap library for webservice. When I use my cleint script from my local machine I get these errors "Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\pranav_test\nusoap\lib\nusoap.php on line 6506 Fatal error: Class 'soapclient' not found in D:\wamp\www\pranav_test\stockclient.php on line 3" stockserver.php at server <?php function getStockQuote($symbol) { mysql_connect('localhost','root','******'); mysql_select_db('pranav_demo'); $query = "SELECT stock_price FROM stockprices " . "WHERE stock_symbol = '$symbol'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); return $row['stock_price']; } require('nusoap/lib/nusoap.php'); $server = new soap_server(); $server->configureWSDL('stockserver', 'urn:stockquote'); $server->register("getStockQuote", array('symbol' => 'xsd:string'), array('return' => 'xsd:decimal'), 'urn:stockquote', 'urn:stockquote#getStockQuote'); $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA); ?> stockclient.php <?php require_once('nusoap/lib/nusoap.php'); $c = new soapclient('http://192.168.1.20/pranav_test/stockserver.php'); $stockprice = $c->call('getStockQuote', array('symbol' => 'ABC')); echo "The stock price for 'ABC' is $stockprice."; ?> please help...

    Read the article

  • Intent and OnActivityResult causing Activity to get restart Actuomatically : Require to solve this issues

    - by Parth Dani
    i am having 20 imageview and i am having 20 button for them when i click any 1 button it gives me option to select image from gallery or camera when i select any option for example galley it will take me to the gallery and let me select image from their and let me display those images on my imageview for respective button now the problem is sometimes when i do the whole above process my activity is getting restart actuomatically and all the image which were first selected get vanished from their imageview For Refernce my code is as follow: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new_upload); // **************Code to get Road worthy number and VIN number value in // Shared Preference starts here************************ SharedPreferences myPrefs1 = this.getSharedPreferences("myPrefs", MODE_WORLD_READABLE); roadworthynumber = myPrefs1.getString(MY_ROADWORTHY, "Road Worthy Number"); vinnumber = myPrefs1.getString(MY_VIN, "VIN Number"); // **************Code to get Road worthy number and VIN number value in // Shared Preference ends here************************ // **************Code to create Directory AUSRWC starts // here************************ if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { cacheDir = new File(Environment.getExternalStorageDirectory() + File.separator + "AUSRWC" + File.separator); cacheDir.mkdirs(); } // **************Code to Create Directory AUSRWC ends // here************************ // *****************Assigning Button variable their Id declare in XML // file starts here***************** new_select1 = (Button) findViewById(R.id.new_select1); new_select2 = (Button) findViewById(R.id.new_select2); new_select3 = (Button) findViewById(R.id.new_select3); new_select4 = (Button) findViewById(R.id.new_select4); new_select5 = (Button) findViewById(R.id.new_select5); new_select6 = (Button) findViewById(R.id.new_select6); new_select7 = (Button) findViewById(R.id.new_select7); new_select8 = (Button) findViewById(R.id.new_select8); new_select9 = (Button) findViewById(R.id.new_select9); new_select10 = (Button) findViewById(R.id.new_select10); new_select11 = (Button) findViewById(R.id.new_select11); new_select12 = (Button) findViewById(R.id.new_select12); new_select13 = (Button) findViewById(R.id.new_select13); new_select14 = (Button) findViewById(R.id.new_select14); new_select15 = (Button) findViewById(R.id.new_select15); new_select16 = (Button) findViewById(R.id.new_select16); new_select17 = (Button) findViewById(R.id.new_select17); new_select18 = (Button) findViewById(R.id.new_select18); new_select19 = (Button) findViewById(R.id.new_select19); new_select20 = (Button) findViewById(R.id.new_select20); // *****************Assigning Button variable their Id declare in XML // file ends here***************** // *****************Assigning Image variable their Id declare in XML // file starts here***************** new_selectimage1 = (ImageView) findViewById(R.id.new_selectImage1); new_selectimage2 = (ImageView) findViewById(R.id.new_selectImage2); new_selectimage3 = (ImageView) findViewById(R.id.new_selectImage3); new_selectimage4 = (ImageView) findViewById(R.id.new_selectImage4); new_selectimage5 = (ImageView) findViewById(R.id.new_selectImage5); new_selectimage6 = (ImageView) findViewById(R.id.new_selectImage6); new_selectimage7 = (ImageView) findViewById(R.id.new_selectImage7); new_selectimage8 = (ImageView) findViewById(R.id.new_selectImage8); new_selectimage9 = (ImageView) findViewById(R.id.new_selectImage9); new_selectimage10 = (ImageView) findViewById(R.id.new_selectImage10); new_selectimage11 = (ImageView) findViewById(R.id.new_selectImage11); new_selectimage12 = (ImageView) findViewById(R.id.new_selectImage12); new_selectimage13 = (ImageView) findViewById(R.id.new_selectImage13); new_selectimage14 = (ImageView) findViewById(R.id.new_selectImage14); new_selectimage15 = (ImageView) findViewById(R.id.new_selectImage15); new_selectimage16 = (ImageView) findViewById(R.id.new_selectImage16); new_selectimage17 = (ImageView) findViewById(R.id.new_selectImage17); new_selectimage18 = (ImageView) findViewById(R.id.new_selectImage18); new_selectimage19 = (ImageView) findViewById(R.id.new_selectImage19); new_selectimage20 = (ImageView) findViewById(R.id.new_selectImage20); // ****Assigning Image variable their Id declare in XML file ends // here***************** // **************Creating Dialog to give option to user to new_select // image from gallery or from camera starts here**************** final String[] items = new String[] { "From Camera", "From Gallery" }; ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.select_dialog_item, items); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("select Image"); builder.setAdapter(adapter, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { if (item == 0) { if (android.os.Environment.getExternalStorageState() .equals(android.os.Environment.MEDIA_MOUNTED)) { Intent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE); File file = new File(Environment .getExternalStorageDirectory(), "/AUSRWC/picture" + ".jpg"); mImageCaptureUri = Uri.fromFile(file); try { Toast.makeText(getBaseContext(), "Click Image", Toast.LENGTH_SHORT).show(); intent.putExtra( android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intent.putExtra("return-data", true); startActivityForResult(intent, PICK_FROM_CAMERA); } catch (Exception e) { e.printStackTrace(); } } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } dialog.cancel(); } else { Intent intent = new Intent(); Toast.makeText(getBaseContext(), "Select Image", Toast.LENGTH_SHORT).show(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, "Complete action using"), PICK_FROM_FILE); } } }); dialog = builder.create(); // **************Creating Dialog to give option to user to new_select // image from gallery or from camera ends here**************** final Animation animAlpha = AnimationUtils.loadAnimation(this, R.anim.anim_alpha); // Animation Code for displaying Button // Clicked. // ********************Image 1 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 1; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 1 button code ends // here******************************* // ********************Image 2 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 2; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 2 button code ends // here******************************* // ********************Image 3 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select3.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 3; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 3 button code ends // here******************************* // ********************Image 4 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select4.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 4; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 4 button code ends // here******************************* // ********************Image 5 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select5.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 5; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 5 button code ends // here******************************* // ********************Image 6 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select6.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 6; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 6 button code ends // here******************************* // ********************Image 7 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select7.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 7; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 7 button code ends // here******************************* // ********************Image 8 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select8.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 8; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 8 button code ends // here******************************* // ********************Image 9 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select9.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 9; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 9 button code ends // here******************************* // ********************Image 10 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select10.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 10; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 10 button code ends // here******************************* // ********************Image 11 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select11.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 11; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 11 button code ends // here******************************* // ********************Image 12 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select12.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 12; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 12 button code ends // here******************************* // ********************Image 13 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select13.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 13; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 13 button code ends // here******************************* // ********************Image 14 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select14.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 14; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 14 button code ends // here******************************* // ********************Image 15 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select15.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 15; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 15 button code ends // here******************************* // ********************Image 16 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select16.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 16; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 16 button code ends // here******************************* // ********************Image 17 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select17.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 17; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 17 button code ends // here******************************* // ********************Image 18 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select18.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 18; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 18 button code ends // here******************************* // ********************Image 19 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select19.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 19; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 19 button code ends // here******************************* // ********************Image 20 button code starts // here******************************* if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) { new_select20.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { v.startAnimation(animAlpha); buttonpressed = 20; dialog.show(); } }); } else { Toast.makeText(getBaseContext(), "Please insert SdCard First", Toast.LENGTH_SHORT).show(); } // ********************Image 20 button code ends // here******************************* } // *************************When Back Button is Pressed code begins // here************************************* @Override public void onBackPressed() { Toast.makeText(new_upload.this, "Sorry You are not allowed to go back", Toast.LENGTH_SHORT).show(); return; } // *************************When Back Button is Pressed code ends // here************************************* // ***********************To get Path of new_selected Image code starts // here************************************ public String getRealPathFromURI(Uri contentUri) { String[] proj = { MediaStore.Images.Media.DATA }; Cursor cursor = managedQuery(contentUri, proj, null, null, null); if (cursor == null) return null; int column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); return cursor.getString(column_index); } // ***********************To get Path of new_selected Image code ends // here************************************ // **********************Picture obtained from the camera or from gallery // code starts here************** @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { //path = ""; Log.e("","requestCode="+requestCode); switch (requestCode){ case PICK_FROM_FILE: if (resultCode == Activity.RESULT_OK) { mImageCaptureUri = data.getData(); path = getRealPathFromURI(mImageCaptureUri); // from Gallery Log.e("", "Imagepath from gallery=" + path); if (path == null) path = mImageCaptureUri.getPath(); // from File Manager if (path != null) { dialog1 = ProgressDialog.show(new_upload.this, "", "Processing Please wait...", true); new ImageDisplayTask().execute(); } } break; case PICK_FROM_CAMERA: if (resultCode == Activity.RESULT_OK) { try { path = mImageCaptureUri.getPath(); Log.e("", "Imagepath from Camera =" + path); // bitmap = BitmapFactory.decodeFile(path); } catch (Exception e) { e.printStackTrace(); } if (path != null) { dialog1 = ProgressDialog.show(new_upload.this, "", "Processing Please wait...", true); //new ImageDisplayTask1().execute(); new ImageDisplayTask().execute(); } } break; default: } } // ********************Picture obtained from the camera or from gallery code // ends here********************************************* // ******************Image Display on Button when new_selected from gallery // Ashynch Code starts here******************************** class ImageDisplayTask extends AsyncTask<Void, Void, String> { @Override protected String doInBackground(Void... unsued) { Bitmap src = BitmapFactory.decodeFile(path); Bitmap dest = Bitmap.createBitmap(src.getWidth(), src.getHeight(), Bitmap.Config.ARGB_8888); //Bitmap dest = Bitmap.createScaledBitmap(src, src.getWidth(),src.getHeight(), true); SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); String dateTime = sdf.format(Calendar.getInstance().getTime()); // reading local `` String timestamp = dateTime + " " + roadworthynumber; SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); String dateTime1 = sdf1.format(Calendar.getInstance().getTime()); Imagename = dateTime1.toString().trim().replaceAll(":", "") .replaceAll("-", "").replaceAll(" ", "") + roadworthynumber + ".jpg"; Canvas cs = new Canvas(dest); Paint tPaint = new Paint(); tPaint.setTextSize(100); tPaint.setTypeface(Typeface.SERIF); tPaint.setColor(Color.RED); tPaint.setStyle(Style.FILL); cs.drawBitmap(src, 0f, 0f, null); float height = tPaint.measureText("yY"); cs.drawText(timestamp, 5f, src.getHeight() - height + 5f, tPaint); try { dest.compress(Bitmap.CompressFormat.JPEG, 70, new FileOutputStream(new File(cacheDir, Imagename))); dest.recycle(); src.recycle(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Override protected void onProgressUpdate(Void... unsued) { } @Override protected void onPostExecute(String serverresponse) { String error = "noerror"; Display currentDisplay = getWindowManager().getDefaultDisplay(); int dw = currentDisplay.getWidth(); int dh = currentDisplay.getHeight() - 100; Log.e("", "width= " + dw + " Height= " + dh); try { BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options(); bmpFactoryOptions.inJustDecodeBounds = true; Bitmap bmp = BitmapFactory.decodeFile( Environment.getExternalStorageDirectory() + "/AUSRWC/" + Imagename, bmpFactoryOptions); int heightRatio = (int) Math.ceil(bmpFactoryOptions.outHeight / (float) dh); int widthRatio = (int) Math.ceil(bmpFactoryOptions.outWidth / (float) dw); if (heightRatio > 1 && widthRatio > 1) { if (heightRatio > widthRatio) { bmpFactoryOptions.inSampleSize = heightRatio; } else { bmpFactoryOptions.inSampleSize = widthRatio; } } bmpFactoryOptions.inJustDecodeBounds = false; bmp = BitmapFactory.decodeFile( Environment.getExternalStorageDirectory() + "/AUSRWC/" + Imagename, bmpFactoryOptions); if (buttonpressed == 1) { new_selectimage1.setImageBitmap(bmp); //Image set on ImageView } else if (buttonpressed == 2) { new_selectimage2.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 3) { new_selectimage3.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 4) { new_selectimage4.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 5) { new_selectimage5.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 6) { new_selectimage6.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 7) { new_selectimage7.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 8) { new_selectimage8.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 9) { new_selectimage9.setImageBitmap(bmp);//Image set on ImageView } else if (buttonpressed == 10) { new_selectimage10.setImageBitmap(bmp); } else if (buttonpressed == 11) { new_selectimage11.setImageBitmap(bmp); } else if (buttonpressed == 12) { new_selectimage12.setImageBitmap(bmp); } else if (buttonpressed == 13) { new_selectimage13.setImageBitmap(bmp); } else if (buttonpressed == 14) { new_selectimage14.setImageBitmap(bmp); } else if (buttonpressed == 15) { new_selectimage15.setImageBitmap(bmp); } else if (buttonpressed == 16) { new_selectimage16.setImageBitmap(bmp); } else if (buttonpressed == 17) { new_selectimage17.setImageBitmap(bmp); } else if (buttonpressed == 18) { new_selectimage18.setImageBitmap(bmp); } else if (buttonpressed == 19) { new_selectimage19.setImageBitmap(bmp); } else if (buttonpressed == 20) { new_selectimage20.setImageBitmap(bmp); } } catch (Exc

    Read the article

  • How to fetch the data from binary log file and insert in our desired table in MySQL?

    - by Parth
    How to fetch the data from binary log file and insert in our desired table in MySQL? I am on my way of scripting a PHP code for Audit Trail, in this I encountered a situation that if there will be new table created then I will not be available with triggers for that new table and hence no tracking could be done for that, so if I code it to create three new triggers for this new table, then how will get the last change done in this table? Hence I found that Binary Log File can be helpfull for me in this case, to fetch the last change for this new table and insert it in tracking table... BUT HOW????

    Read the article

  • Suggest me solution to track the change in test DB and replicate in Another DB

    - by Parth
    Suggest me solution to track the change in test DB and replicate in Another DB... My Client need a script or any solution, if he has two Database, One Test DB in which he tests his data on test portal and if he find it appropriate he can use those changes to be done in main DB to display on Live site.. Fior this he needs the solution to record or track all updation/deletion/insertion, so that he can do the same in main DB if found appropriate, ** NOTE: ** we hav only on server, no separate server, hence binary log replication doesnt seems to be working for my case...

    Read the article

  • Problem sending ASCII Art via SMS and Email in iPhone SDK

    - by PARTH
    Hi Guys, In my iPhone app, I have ASCII art, which I am sharing via email and SMS. I have inserted the ASCII art into the Sqlite database along with the newline character and spaces. Problem is when I send them through SMS and Email, the whole ASCII art comes in left alignment and spacing between characters is lost. ASCII Art fetched in Label in my app is as below Same ASCII Art when inserted to Email API (MFMailComposeViewController) is as below How to maintain the spaces? What can be done? Please Help and Suggest. Thanks

    Read the article

  • I am using following PHP code for trigger creation but always get error, please help me to resolve i

    - by Parth
    I am using following PHP code for trigger creation but always get error, please help me to resolve it. $link = mysql_connect('localhost','root','rainserver'); mysql_select_db('information_schema'); echo $trgquery = "DELIMITER $$ DROP TRIGGER `update_data` $$ CREATE TRIGGER `update_data` AFTER UPDATE on `jos_menu` FOR EACH ROW BEGIN IF (NEW.menutype != OLD.menutype) THEN INSERT INTO jos_menuaudit set menuid=OLD.id, oldvalue = OLD.menutype, newvalue = NEW.menutype, field = 'menutype'; END IF; IF (NEW.name != OLD.name) THEN INSERT INTO jos_menuaudit set menuid=OLD.id, oldvalue = OLD.name, newvalue = NEW.name, field = 'name'; END IF; IF (NEW.alias != OLD.alias) THEN INSERT INTO jos_menuaudit set menuid=OLD.id, oldvalue = OLD.alias, newvalue = NEW.alias, field = 'alias'; END IF; END$$ DELIMITER ;"; echo "<br>"; //$trig = mysqli_query($link,$trgquery) or die("Error Exist".mysqli_error($link)); $trig = mysql_query($trgquery) or die("Error Exist".mysql_error()); I get the error as: Error ExistYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$$ DROP TRIGGER `update_data` $$ CREATE TRIGGER `update_data` AFTER UPDATE on `j' at line 1 PLease help me to create my trigger...

    Read the article

  • Problem with Facebook API in iPad application

    - by PARTH
    Hi Guys, I am working on an iPhone application which is to be converted to iPad application. The iPhone app has a facebook and twitter API integrated and when I use the same into the iPad app then the Dialog for facebook API opens same as the size as in iPhone. So it looks very small. So Is there anything that I need to doin the code? Is there seperate API for twitter and facebook for use in iPad? Please Help and Suggest Thanks

    Read the article

1 2 3 4 5  | Next Page >