save

is this LINQ save function acceptable? (to have a shared INSERT/UPDATE logic like this?) looking for feedback...

Hey guys, new to WPF and really struggling with 'the right way' to do things... public void Save(CompanyContact entityToSave) { try { var saveEntity = (from cc in db.CompanyContacts where cc.CompanyContactId == entityToSave.CompanyContactId select cc).SingleOrDefault(); if (saveEntity == null) { /...

CKEditor and Font Color saved but not working

Hi everybody, I've just installed CKEditor and call it with JS tag. When I save the text, all the font attributes (indentation, space, size, decoration,etc.) are correctly saved . The problem is that when I want to edit the data, with CKEditor, all these attributes are well loaded but the COLOR even if, in the example below, it's set t...

Differences of behavior in saving/loading file between iPhone and iPod Touch

Hi, I have developed an application (a Sudoku to be accurate) that runs perfectly smoothly on the iPhone (after of course several minor versions to do some bug fixing). But I have had several reports of issues on iPod Touch exclusively. The normal modus operandi is the following: the first start does not load anything from file the ...

WinForm chart control: Change size of chart when saving it to a file

Hi, is there a way to change size of chart when using method Chart.SaveImage() from the source code? Right now the only way I found to set the size of chart, is resize the form on which chart control (System.Windows.Forms.DataVisualization.Charting.Chart) sits. Can I explicit set its width and height? Trying to change Chart.Size, Chart...

how to upload browse file in asp

I am trying to upload browse file in asp and succeeded but i have to save it as user corresponding id can anybody help me and how to see this record on id basis ...

Browser event when downloaded file is saved to disk

I have sensitive files to download to users, and each user is permitted to download a given file exactly once. If the download fails, I want to permit the re-download, but not otherwise. It's not sufficient to rely on logging/processing the file download request at the server - I need to know deterministically when the file is complete...

How to save a resource from an executable jar file to local drive ?

I wonder if there is a way to extract a resource file packaged in an executable jar file and save it to a local drive, so when a user downloads my jar file and double clicks on it, it will first save one file from the resource to his C: drive, then run my program. ...

How do you save a plot in Octave 3.0.5 if it has latex in it?

My school has Matlab but I can't use it at home so I am trying to learn Octave. I am having trouble saving plots as png files so I can put them in a report. I read you can use print("filename.png") to save the plots, but I am getting some kind of error I am assuming is due to using latex in my labels I am using xlabel('\omega') Error ...

Help Saving an bitmap using OutputStream on Android, following the Activities onPause.

In my activite's onCreate i have public void onCreate() { try { FIStream = super.openFileInput("4.png"); MyImagePort.load(FIStream); FIStream.close(); FIStream = null; } catch (FileNotFoundException e) { Log.w("spriter","File not found"); } catch (IOException e) { e....

How to save Columns of a grid as rows in db.

I want to save grid columns as rows in db. Please see the following image. Columns 'Full Package' is saved as row in db but I have make it as column. 'Package for 1' is new record, each Event Member must be saved as individual record in db. There might be more columns like this. I need to save/update records in one go. Thanks. ...

C# - How to change PNG quality or color depth.

I am supposed to write a program that gets some PNG images from the user, does some simple edits like rotation and saves them inside a JAR file so that it can use the images as resources. The problem is when I open, say an 80kb image and then save it with C#, I get an image with the same quality but for 130kb space. And because it has to...

save png image with custom quality or color depth in C#

I wanted to know how could I change the quality or color depth of an image and save it in PNG. The encoder method seems to work only for jpegs. Thanks in advance. ...

Saving "heavy" figure to PDF in MATLAB - rendering problem

I generate a figure in MATLAB with large amount of elements (100000+) and want to save it into a PDF file. With zbuffer or painters renderer I've got very large and slowly opened file (over 4 Mb) - all points are in vector format. Using OpenGL renderer rasterize the figure in PDF, ok for the plot, but not good for text labels. The file s...

ASP.NET error on Bitmap.Save "Exception (0x80004005): A generic error occurred in GDI+."

Hi, I have a function which first reads an image from disk, resizes it and then saves to another directory. when i use the Bitmap.Save(directory + theimagename) it returns the error as i stated in the question title. i checked the directory is right, and the given image name doesn't exist in that dir. what is weird, is that the same c...

create a new model instance version instead of update

Hi, I have a model with a version field - autocreate timestamp. When a model instance is being saved I want to create a new instance with a new timestamp instead of updating the old model instance. Is it possible? I thought of overriding the model save() method but I don't know how to create a new instance without creating a infinite ...

Bitmap.Save problems

Hello, can anyone tell me if you know to be a problem with Bitmap and steganography for WM 6? I am working on a project and i have to hide a digital signature in a bitmap. The algorithm works perfect, as in untill i have the image on the memory the bitmap contains the modified bytes. But after i save the image (Bitmap.Save()) and I reo...

Django save_m2m() and excluded field

UPDATE: I ended up creating a new forms.Form instead of using a ModelForm hi, in a ModelForm I replaced a field by excluding it and adding a new one with the same name, as shown below in AddRestaurantForm. When saving the form with the code shown below, I get an error in form.save_m2m() ("Truncated incorrect DOUBLE value"), which seems...

JFileChooser - multiple file filters?

Hi guys, I have a question about the JFileChooser in Swing. I'm trying to get multiple file extensions in the drop-down box, but have no idea how to do it. There is the method extFilter = FileNameExtensionFilter(description, extensions); that I can then use by writing fileChooser.setFileFilter(extFilter); however, as you can see,...

Saving HttpResponse/Request to file system

Here is my scenario. User fills out this large page which is dynamically created based off DB values. Those values can change. When the user fills out the page and hits submit we want to save a copy of the page as html on the server, this way if the text or wording changes, when they go back to view their posted information, it is histor...

How to save a picture to a file?

I'm trying to use a standard Intent that will take a picture, then allow approval or retake. Then I want to save the picture into a file. Here's the Intent I am using: Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); startActivityForResult( intent, 22 ); The documentation says: The caller may pass ...