save

Best way to save/load pictures with .Net & SQL Server 2005?

喜夏-厌秋 提交于 2019-12-07 19:07:46
问题 What is the typical way to handle product pictures in a web-page selling products? Say I had a database with books or computer components etc, all of which have their own sample pictures for example... Should I save them into the DB as binary data, or somehow handle them in the codebehind, saving them into a directory with the appropriate link to the picture file being saved into the product table in the DB? I'm trying to make a sales company example, and while I can come up with ways to do

Android: Saving image to storage

£可爱£侵袭症+ 提交于 2019-12-07 18:13:29
Currently my application, takes a photo, and put's the data into a ImageView. public void openCamera() { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); } } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) { Bundle extras = data.getExtras(); Bitmap photo = (Bitmap) data.getExtras().get("data"); imageView.setImageBitmap(photo); } } Now, i

How to append a variable to a .mat file?

与世无争的帅哥 提交于 2019-12-07 18:06:55
问题 If I already have a .mat file with the variables x and y , is there a way to use the save command to add another variable z to the .mat file without having to explicitly state the variables x and y in the save command? 回答1: If you look at the save() function documentation, there is a form of the save command that might help: save(filename, ..., '-append') The help for this form says: save(filename, ..., '-append') adds new variables to an existing file. You can specify the '-append' option

Save output to disk using FMOD

我怕爱的太早我们不能终老 提交于 2019-12-07 18:01:54
问题 I am using FMOD to play some sounds and I would like to save the resulting mix to the disk. I have been trying the system->recordStart(0, sound, true) path, but that saves the microphone input of the device. In some way, I would like to redirect the speakers output to the disk Thank you Marc 回答1: To redirect everything that would go to the speakers to disk simply use the function System::setOutput and pass in a value of FMOD_OUTPUTTYPE_WAVWRITER. Make sure you call this function before you

C# images cropping,splitting,saving

我怕爱的太早我们不能终老 提交于 2019-12-07 16:00:38
问题 as stated in subject, i have an image: private Image testing; testing = new Bitmap(@"sampleimg.jpg"); I would like to split it into 3 x 3 matrix meaning 9 images in total and save it.Any tips or tricks to do this simple? I'm using visual studios 2008 and working on smart devices. Tried some ways but i can't get it. This is what i tried: int x = 0; int y = 0; int width = 3; int height = 3; int count = testing.Width / width; Bitmap bmp = new Bitmap(width, height); Graphics g = Graphics

Android: Shared preferences not saving the state of the buttons

懵懂的女人 提交于 2019-12-07 14:07:34
问题 I have a tab-host with three activities and in each activity I have buttons. On each button press I am changing the background drawable resource So now How can I save the pressed state of each button in all three child activities so that when I move from one activity to the other, the button pressed state will be reflected on moving back. first activity -> all 2 buttons pressed -> go to 2nd activity -> come back to first activity -> all buttons in first activity should be in pressed state

Save an imagesc output in Matlab

爷,独闯天下 提交于 2019-12-07 14:05:04
问题 I am using imagesc to get an integral image. However, I only manage to display it and then I have to save it by hand, I can't find a way to save the image from the script with imwrite or imsave. Is it possible at all? The code: image='C:\image.jpg'; in1= imread((image)); in=rgb2gray(in1); in_in= cumsum(cumsum(double(in)), 2); figure, imagesc(in_in); 回答1: You can also use the print command. For instance if you are running over multiple images and want to serialize them and save them, you can

Save gif to iOS Photo Library in Swift

拜拜、爱过 提交于 2019-12-07 13:30:47
问题 I'm traing to save a GIF image located in temp file already created with Regift code. Regift: https://github.com/matthewpalmer/Regift The thing is that after saving with PHPhotoLibrary the GIF become a still image. In other questions there's answers that refeer AssetsLibrary but this has been deprecated by Apple and doesn't work for iOS 10. Questions: Save GIF image from URL to Camera Roll How to write animated GIF to iOS camera roll? None of this answers works... I just want to convert an

NHibernate issue with assigned string ID and different case chars

久未见 提交于 2019-12-07 12:50:06
问题 I've a problem when save an entity with assigned string Id on NHibernate...I try to explain the issue with an example. Well, suppose to have an entity on database with ID "AAA", if I execute this statements ENTITYTYPE entity = Session.Get<ENTITYTYPE>("AAA"); ENTITYTYPE newentity = new ENTITYTYPE() { Id = "aaa" }; Session.Delete(entity); Session.Save(newentity); Session.Flush(); On Flush NHibernate raise an exception with this message: "Could not synchronize database state with session" /

Problems saving several pdf files in R

时光毁灭记忆、已成空白 提交于 2019-12-07 12:04:17
问题 I'm trying to save several xyplots created with a "for" loop in R and I'm not able to get complete pdf files (all files have the same size and I can't open them) if I execute the following loop: for (i in 1:length(gases.names)) { # Set ylim; r_y <- round(range(ratio.cal[,i][ratio.cal[,i]<999], na.rm = T), digits = 1); r_y <- c(r_y[1]-0.1, r_y[2]+0.1); outputfile <- paste (path, "/cal_ratio_",gases.names[i], ".pdf", sep=""); dev.new(); xyplot(ratio.cal[,i] ~ data.GC.all$data.time, groups =