Search Results

Search found 21488 results on 860 pages for 'image conversion'.

Page 140/860 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • how to change the image on click from database

    - by iosdev
    In my application i having multiple image in sq lite database,Since i want to change to the next image on button click,Here my code, -(void)Readthesqlitefile:(NSInteger *)sno { sqlite3 *database;//database object NSString *docpath=[self doccumentspath];//get sqlite path const char *ch=[docpath UTF8String];//string to constant char UTF8string main part to connect DB if (sqlite3_open(ch, &database)==SQLITE_OK) { const char *chstmt="SELECT * FROM animal where rowid= = %d",sno; sqlite3_stmt *sqlstmt;//to execute the above statement if (sqlite3_prepare_v2(database, chstmt, -1, &sqlstmt, NULL)==SQLITE_OK) { while (sqlite3_step(sqlstmt)==SQLITE_ROW) { const char *Bname=(char *)sqlite3_column_text(sqlstmt, 0); //converting const char to nsstring NSString *Bndname=[NSString stringWithFormat:@"%s",Bname]; NSLog(@"Brand Names=%@",Bndname); lb1.text=[NSString stringWithFormat:Bndname]; NSUInteger legnt=sqlite3_column_bytes(sqlstmt, 1); if (legnt>0) { NSData *dt=[NSData dataWithBytes:sqlite3_column_blob(sqlstmt, 1) length:legnt]; clsimg=[UIImage imageWithData:dt];//converting data to image imager.image=clsimg; } else { clsimg=nil; } } } sqlite3_finalize(sqlstmt); } sqlite3_close(database); } Button click function -(IBAction)changenext { int j; for (j=1; j<10; j++) { [self Readthesqlitefile:j]; } } its is not working pls help me to solve it out?

    Read the article

  • Objective C : UIButton image with NSArray in a random order

    - by Sarah
    Brief Idea about the flow : I have say minimum 1 and maximum 18 records in my database with a text and an image from which I have to fetch images and place any 3 of the same randomly to 3 UIButtons among which one image should match with my question. i.e. 1 is the answer and other 2 are the distractors. For Example : Question is : where is Apple? Now among the bunch of images, I want to place any 3 images on the 3 UIButtons(1 answer i.e. An Apple and 2 distractors) in a random order and on selecting the UIButton it should prompt me if it's a right answer or not. I am implementing below code for placing the UIImages in a random order : -(void) placeImages { NSMutableArray *images = [NSMutableArray arrayWithArray:arrImg]; NSArray *buttons = [NSArray arrayWithObjects:btn1,btn2,btn3, nil]; for (UIButton *btn in buttons) { int randomIndex= random() % images.count; UIImage *img = [images objectAtIndex:randomIndex]; [btn setImage:img forState:UIControlStateNormal]; [images removeObjectAtIndex:randomIndex]; } } But I am stuck at a point that how should I get 1 UIButton image with an answer and other as distractors also that how should i maintain the index of the image from the NSArray? Kindly guide me. Thank you.

    Read the article

  • CSS: image link, change on hover

    - by AP257
    I have an image that is a link. I want to show a different image when the user hovers over the link. Currently I'm using this code: <a href="http://twitter.com/me" title="Twitter link"> <div id="twitterbird" class="sidebar-poster"></div></a> div.sidebar-poster { margin-bottom: 10px; background-position: center top; background-repeat: no-repeat; width: 160px; } #twitterbird { background-image: url('twitterbird.png'); } #twitterbird:hover { background-image: url('twitterbird_hover.png'); } But I'm having loads of problems: the div isn't picking up the CSS rules (the element just isn't showing the related CSS rules when I view it in Firebug). Perhaps this is because (as I know) this is invalid HTML: you can't put an <a> around a <div>. However, if I switch to <span> then it seems I get bigger problems, because you can't set a height and width on a span reliably. Help! How can I do this better?

    Read the article

  • Image switch based on if a layer is visible

    - by Zuno
    I have a website that contains multiple pages as layers (not as separate HTML files). I have three images: <img src="image1.png" onclick="showlayer(1);return false;" /> <br /> <img src="image2.png" onclick="showlayer(2);return false;" /> <br /> <img src="image3.png" onclick="showlayer(3);return false;" /> When an image is clicked, it shows the relevant layer and hides the others. I want it to also change the image to image1_active.png / image2_active.png / image3_active.png depending on which layer is visible (not via the onclick event handler). Why not via the onclick event handler?... Layer 1 is set as visible by default in the CSS, so image1 needs to be image1_active.png by default too - since the user has not had to click on anything yet, this is why I need the image switch to detect the layer's visibility/display to change the image. The showlayer script is: function showlayer(n){ for(i=1;i<=3;i++){document.getElementById("layer"+i).style.display="none";document.getElementById("layer"+n).style.display="block"; }} Is it possible to adapt this script for this purpose? thank you

    Read the article

  • while uploading image I get errors in logcat

    - by al0ne evenings
    I am uploading image and also sending some parameters with it. I am getting errors in my logcat while doing so. Here is my code public class Camera extends Activity { ImageView ivUserImage; Button bUpload; Intent i; int CameraResult = 0; Bitmap bmp; public String globalUID; UserFunctions userFunctions; String photoName; InputStream is; int serverResponseCode = 0; ProgressDialog dialog = null; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.camera); userFunctions = new UserFunctions(); globalUID = getIntent().getExtras().getString("globalUID"); Toast.makeText(getApplicationContext(), globalUID, Toast.LENGTH_LONG).show(); ivUserImage = (ImageView)findViewById(R.id.ivUserImage); bUpload = (Button)findViewById(R.id.bUpload); openCamera(); } private void openCamera() { i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(i, CameraResult); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(resultCode == RESULT_OK) { //set image taken from camera on ImageView Bundle extras = data.getExtras(); bmp = (Bitmap) extras.get("data"); ivUserImage.setImageBitmap(bmp); //Create new Cursor to obtain the file Path for the large image String[] largeFileProjection = { MediaStore.Images.ImageColumns._ID, MediaStore.Images.ImageColumns.DATA }; String largeFileSort = MediaStore.Images.ImageColumns._ID + " DESC"; //final String photoName = MediaStore.Images.ImageColumns.BUCKET_DISPLAY_NAME; Cursor myCursor = this.managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, largeFileProjection, null, null, largeFileSort); try { myCursor.moveToFirst(); //This will actually give you the file path location of the image. final String largeImagePath = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.DATA)); //final String photoName = myCursor.getString(myCursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.BUCKET_DISPLAY_NAME)); //Log.e("URI", largeImagePath); File f = new File("" + largeImagePath); photoName = f.getName(); bUpload.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dialog = ProgressDialog.show(Camera.this, "", "Uploading file...", true); new Thread(new Runnable() { public void run() { runOnUiThread(new Runnable() { public void run() { //tv.setText("uploading started....."); Toast.makeText(getBaseContext(), "File is uploading...", Toast.LENGTH_LONG).show(); } }); if(imageUpload(globalUID, largeImagePath)) { Toast.makeText(getApplicationContext(), "Image uploaded", Toast.LENGTH_LONG).show(); } else { Toast.makeText(getApplicationContext(), "Error uploading image", Toast.LENGTH_LONG).show(); } //Log.e("Response: ", response); //System.out.println("RES : " + response); } }).start(); } }); } finally { myCursor.close(); } //Uri uriLargeImage = Uri.withAppendedPath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, String.valueOf(imageId)); //String imageUrl = getRealPathFromURI(uriLargeImage); } } public boolean imageUpload(String uid, String imagepath) { boolean success = false; //Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); Bitmap bitmapOrg = BitmapFactory.decodeFile(imagepath); ByteArrayOutputStream bao = new ByteArrayOutputStream(); bitmapOrg.compress(Bitmap.CompressFormat.JPEG, 90, bao); byte [] ba = bao.toByteArray(); String ba1=Base64.encodeToString(ba, 0); ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("image",ba1)); nameValuePairs.add(new BasicNameValuePair("uid", uid)); try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.example.info/androidfileupload/index.php"); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); if(response != null) { success = true; } is = entity.getContent(); } catch(Exception e) { Log.e("log_tag", "Error in http connection "+e.toString()); } dialog.dismiss(); return success; } Here is my logcat 06-23 11:54:48.555: E/AndroidRuntime(30601): FATAL EXCEPTION: Thread-11 06-23 11:54:48.555: E/AndroidRuntime(30601): java.lang.OutOfMemoryError 06-23 11:54:48.555: E/AndroidRuntime(30601): at java.lang.String.<init>(String.java:513) 06-23 11:54:48.555: E/AndroidRuntime(30601): at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:650) 06-23 11:54:48.555: E/AndroidRuntime(30601): at java.lang.StringBuilder.toString(StringBuilder.java:664) 06-23 11:54:48.555: E/AndroidRuntime(30601): at org.apache.http.client.utils.URLEncodedUtils.format(URLEncodedUtils.java:170) 06-23 11:54:48.555: E/AndroidRuntime(30601): at org.apache.http.client.entity.UrlEncodedFormEntity.<init>(UrlEncodedFormEntity.java:71) 06-23 11:54:48.555: E/AndroidRuntime(30601): at com.zafar.login.Camera.imageUpload(Camera.java:155) 06-23 11:54:48.555: E/AndroidRuntime(30601): at com.zafar.login.Camera$1$1.run(Camera.java:119) 06-23 11:54:48.555: E/AndroidRuntime(30601): at java.lang.Thread.run(Thread.java:1019) 06-23 11:54:53.960: E/WindowManager(30601): Activity com.zafar.login.DashboardActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@405db540 that was originally added here 06-23 11:54:53.960: E/WindowManager(30601): android.view.WindowLeaked: Activity com.zafar.login.DashboardActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@405db540 that was originally added here 06-23 11:54:53.960: E/WindowManager(30601): at android.view.ViewRoot.<init>(ViewRoot.java:266) 06-23 11:54:53.960: E/WindowManager(30601): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:174) 06-23 11:54:53.960: E/WindowManager(30601): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:117) 06-23 11:54:53.960: E/WindowManager(30601): at android.view.Window$LocalWindowManager.addView(Window.java:424) 06-23 11:54:53.960: E/WindowManager(30601): at android.app.Dialog.show(Dialog.java:241) 06-23 11:54:53.960: E/WindowManager(30601): at android.app.ProgressDialog.show(ProgressDialog.java:107) 06-23 11:54:53.960: E/WindowManager(30601): at android.app.ProgressDialog.show(ProgressDialog.java:90) 06-23 11:54:53.960: E/WindowManager(30601): at com.zafar.login.Camera$1.onClick(Camera.java:110) 06-23 11:54:53.960: E/WindowManager(30601): at android.view.View.performClick(View.java:2538) 06-23 11:54:53.960: E/WindowManager(30601): at android.view.View$PerformClick.run(View.java:9152) 06-23 11:54:53.960: E/WindowManager(30601): at android.os.Handler.handleCallback(Handler.java:587) 06-23 11:54:53.960: E/WindowManager(30601): at android.os.Handler.dispatchMessage(Handler.java:92) 06-23 11:54:53.960: E/WindowManager(30601): at android.os.Looper.loop(Looper.java:130) 06-23 11:54:53.960: E/WindowManager(30601): at android.app.ActivityThread.main(ActivityThread.java:3691) 06-23 11:54:53.960: E/WindowManager(30601): at java.lang.reflect.Method.invokeNative(Native Method) 06-23 11:54:53.960: E/WindowManager(30601): at java.lang.reflect.Method.invoke(Method.java:507) 06-23 11:54:53.960: E/WindowManager(30601): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) 06-23 11:54:53.960: E/WindowManager(30601): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) 06-23 11:54:53.960: E/WindowManager(30601): at dalvik.system.NativeStart.main(Native Method) 06-23 11:54:55.190: I/Process(30601): Sending signal. PID: 30601 SIG: 9

    Read the article

  • Image thumbnails flashes and then disappears in Windows Vista

    - by Hemant
    I have Windows Vista installed on my machine and I am facing this really annoying problem. Whenever I open a folder having images, image thumbnails appear for an instant and they are replaced by standard file icon. Argh... Points to note: Setting "Always show icon, never thumbnail" is unchecked Running Windows Aero theme (with transparency support) Have 4GB of RAM on my machine so memory is not a problem Please can you suggest a solution?

    Read the article

  • VM image including ready-to-use Kerberos server?

    - by Nicolas Raoul
    I implemented client-side Kerberos support to an open source software, and I want to test it. I don't have a Kerberos network at home and unfortunately don't have the skills/time to reliably set up one. Is there a Virtual Machine image that I could fire up, and that would include a properly working Kerberos environment, so that I can test my client app? (freely downloadable Linux/Microsoft/anything all acceptable)

    Read the article

  • How to restore using DriveImage XML image if unable to make a BartPE CD

    - by CChriss
    I have a Windows Vista laptop that won't boot at all. On the D: drive I have DriveImage XML images of C: drive, but I don't have a BartPE boot CD and I don't have a Vista install CD. How can I image the C: using the images on D: if I can't make a BartPE CD because I can't boot to Windows? Is there a BartPE (with DriveImage XML plugin) iso I can download from somewhere, or what can I do? Thanks.

    Read the article

  • Cannot make BartPE CD - how restore DriveImageXML image?

    - by CChriss
    I have a Windows Vista laptop that won't boot at all. On the D: drive I have DriveImage XML images of C: drive, but I don't have a BartPE boot CD and I don't have a Vista install CD. How can I image the C: using the images on D: if I can't make a BartPE CD because I can't boot to Windows? Is there a BartPE (with DriveImage XML plugin) iso I can download from somewhere, or what can I do? Thanks.

    Read the article

  • Good Free Ubuntu Server VMWare Image Needed

    - by Yaakov Ellis
    Can anyone recommend a good, free Ubuntu Server VMWare Image (or Virtual Appliance, as they call them)? I have looked on the VMWare VAM and there are literally hundreds to choose from. I am looking for something that can with very minimal effort serve as a development platform for LAMP applications (so it should have all of those installed, plus things like PhpMyAdmin). Bonus points if there is some way to create new Virtual Hosts (for developing and testing new sites) on Apache without having to go digging around conf files and guessing on the sytax.

    Read the article

  • How restore DriveImage XML image if cannot make BartPE CD

    - by CChriss
    I have a Windows Vista laptop that won't boot at all. On the D: drive I have DriveImage XML images of C: drive, but I don't have a BartPE boot CD and I don't have a Vista install CD. How can I image the C: using the images on D: if I can't make a BartPE CD because I can't boot to Windows? Is there a BartPE (with DriveImage XML plugin) iso I can download from somewhere, or what can I do? Thanks.

    Read the article

  • Striping cookies from image files ?

    - by iTech
    Hi, I want to achieve cookie free image serving as discussed here : Blockquote http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain Blockquote I have created a new sub-domain "static.example.com" serving only images, javscript and css (file serving restrictions made via filesmatch.conf file) , pls. tell how to make it server cookie free images. Thanks

    Read the article

  • How to restore an os from an image created by macrium reflect

    - by user23950
    Can you recommend of other os imaging software that you use if you haven't use macrium reflect yet. And how do I restore the os from that image? And which is faster? reinstalling the os then install the applications that you need. Or making use of the imaging software to backup the installation along with the applications?Which takes more time?

    Read the article

  • GUI to Change the Login Screen Wallpaper Image on Snow Leopard

    - by lexu
    the "standard" login screen background on OSC (Leopard and Snow Leopard) can be modified using these command line incantations: cd /System/Library/CoreServices sudo mv DefaultDesktop.jpg DefaultDesktop_org.jpg sudo cp /path/of/image.jpg DefaultDesktop.jpg I learned that here QUESTION: is there a GUI based utility for people like my wife and daughter? .. they DO want to customize (worse: they want me to do it ), but they DON'T want to learn the terminal ( since I know how). They DO know how to enter an admin's credentials when prompted.

    Read the article

  • Microsoft Word Image Flattening?

    - by CaMiX
    I'm trying to find a way to flatten images in a MS Word 2007 document. I want the images that have text/labels placed/layered on top of them to be merged into a single image. Are there any tools or AddIns for Word that can do this? With a 100+ page document I'm trying to avoid a manual process... I can't believe Word doesn't have a feature or option hidden somewhere that can do this out of the box.

    Read the article

  • installing SNMP in Windows x32 Customized Image

    - by André Faria
    I'm working in a environment of 40 machines, I've already installed snmp in 38 machines normally, but 2 of them appear to have been installed with a customized windows image, there is no OptionalFeatures, there is no ocsetup.exe, so I could not able to install SNMP. I tried to copy OptionalFeatures and ocsetup from another machine, but it don't work. For now I cannot simple format these two computer, it's possible to install it using another way? Thanks in advance

    Read the article

  • Unecrypted Image of Truecrypt-Encrypted System Partition

    - by Dexter
    The general tenor around the internet seems to be that you can't create images of system partitions that have been encrypted (with truecrypt) other than with dd or similar sector-by-sector copy tools. These files however are very impractical given their size (and are obviously incompressible) which makes keeping multiple states/backups of your system partition rather expensive (..especially considering current hdd prices). The problem is that backup tools (like Acronis True Image, Clonezilla, etc.) won't give you the option to create an image of (mounted/opened) Truecrypt partitions, or that there is no recovery environment for restoring the backup, that would allow to run truecrypt before doing any actual restoring. After some trial and error however, I believe I have found a very simple way. Since Truecrypt (running in Linux) creates a virtual block device, that it uses for mounting the unencrypted partitions into the file system, partclone can be used for creating/restoring images. What I did: boot up a linux live disk mount/open the drive/device/partition in truecrypt unmount the filesystem mount point again, like so: umount /media/truecryptX ("X" being the partition number assigend by truecrypt) use partclone (this is what clonezilla would do too, except that clonezilla only offers you to back up real drive partitions, not virtual block devices): partclone.ntfs -c -s /dev/mapper/truecryptX -o nameOfBackupFile for restoring steps 1-3 remain the same, and step 4 is partclone.ntfs -r -s nameOfBackupFile -o /dev/mapper/truecryptX A backup and test-restore of the system (with this method) seems to have worked fine (and the changed settings were reverted to the backup-state). The backup file is ~40 GB (and compressible down to <8GB with 7zip/LZMA2 on the "fast" setting). I can't quite believe that I'm the only one that wants to create images of encrypted drives, but doesn't want to waste 100GB on the backup of one single system state. So my question now is, given how simple this was, and that no one seems to mention anywhere that this is possible - did I miss something? or did I do something wrong? Is there any situation that I didn't think of where this method will fail? Obviously, the backup file needs to be stored in some other encrypted place in order to still remain confidential, since it is unencrypted. Also, in order to do a full "bare metal" restore, one would have to actually first (re-)install Windows, encrypt it, and only then restore the backup file. The funny thing however is that you won't need to backup any partition tables, etc. since the reinstall will effectively take care of that. Is there anything else? This is imho still a lot better than having sector-by-sector images..

    Read the article

  • New PC, Keyboard and OS and I can't do a Screen Image Capture

    - by Chadworthington
    I just got a new PC, Windows 7 Ultimate with a: fancy MS keyboard. I am puzzled why ALT+PRTSCN keyboard combo seems to put nothing on my keyboard. No lights are on the keybd (SCROLL LOCK, SHIFT, etc)-yet, when I paste into Word Pad or Paint or some program that should be able to hande images, no image is on the clipboard. Any idea what to try? This is embarrassing...

    Read the article

  • Stripping cookies from image files ?

    - by iTech
    Hi, I want to achieve cookie free image serving as discussed here : http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain I have created a new sub-domain "static.example.com" serving only images, javscript and css (file serving restrictions made via filesmatch.conf file) , pls. tell how to make it serve cookie free images. Thanks

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >