Search Results

Search found 3112 results on 125 pages for 'daylight saving'.

Page 11/125 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Can I sleep one of the displays on a dual-monitor setup? [duplicate]

    - by archedpenguin
    This question already has an answer here: Can I sleep one of the displays on a dual-monitor setup (running Windows 7)? 4 answers I want to be able to 'put the display to sleep' on one of my two monitors when it isn't needed, so it doesn't distract me or use unnecessary power. Ideally, the display would be asleep, but the OS would remain in dual-monitor mode, so I could still have a variety of windows open in the sleeping monitor's display space, which would mean I wouldn't have to keep switching between single- and dual-monitor modes. Its the same as "Can I sleep one of the displays on a dual-monitor setup (running Windows 7)?" I just wasn't sure I could comment on such an old thread. None of the answers there provided a perfect solution and I was wondering if there is now a solution available.

    Read the article

  • WCF Data Service BeginSaveChanges not saving changes in Silverlight app

    - by Enigmativity
    I'm having a hell of a time getting WCF Data Services to work within Silverlight. I'm using the VS2010 RC. I've struggled with the cross domain issue requiring the use of clientaccesspolicy.xml & crossdomain.xml files in the web server root folder, but I just couldn't get this to work. I've resorted to putting both the Silverlight Web App & the WCF Data Service in the same project to get past this issue, but any advice here would be good. But now that I can actually see my data coming from the database and being displayed in a data grid within Silverlight I thought my troubles were over - but no. I can edit the data and the in-memory entity is changing, but when I call BeginSaveChanges (with the appropriate async EndSaveChangescall) I get no errors, but no data updates in the database. Here's my WCF Data Services code: public class MyDataService : DataService<MyEntities> { public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("*", EntitySetRights.All); config.SetServiceOperationAccessRule("*", ServiceOperationRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } protected override void OnStartProcessingRequest(ProcessRequestArgs args) { base.OnStartProcessingRequest(args); HttpContext context = HttpContext.Current; HttpCachePolicy c = HttpContext.Current.Response.Cache; c.SetCacheability(HttpCacheability.ServerAndPrivate); c.SetExpires(HttpContext.Current.Timestamp.AddSeconds(60)); c.VaryByHeaders["Accept"] = true; c.VaryByHeaders["Accept-Charset"] = true; c.VaryByHeaders["Accept-Encoding"] = true; c.VaryByParams["*"] = true; } } I've pinched the OnStartProcessingRequest code from Scott Hanselman's article Creating an OData API for StackOverflow including XML and JSON in 30 minutes. Here's my code from my Silverlight app: private MyEntities _wcfDataServicesEntities; private CollectionViewSource _customersViewSource; private ObservableCollection<Customer> _customers; private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { _wcfDataServicesEntities = new MyEntities(new Uri("http://localhost:7156/MyDataService.svc/")); _customersViewSource = this.Resources["customersViewSource"] as CollectionViewSource; DataServiceQuery<Customer> query = _wcfDataServicesEntities.Customer; query.BeginExecute(result => { _customers = new ObservableCollection<Customer>(); Array.ForEach(query.EndExecute(result).ToArray(), _customers.Add); Dispatcher.BeginInvoke(() => { _customersViewSource.Source = _customers; }); }, null); } } private void button1_Click(object sender, RoutedEventArgs e) { _wcfDataServicesEntities.BeginSaveChanges(r => { var response = _wcfDataServicesEntities.EndSaveChanges(r); string[] results = new[] { response.BatchStatusCode.ToString(), response.IsBatchResponse.ToString() }; _customers[0].FinAssistCompanyName = String.Join("|", results); }, null); } The response string I get back data binds to my grid OK and shows "-1|False". My intent is to get a proof-of-concept working here and then do the appropriate separation of concerns to turn this into a simple line-of-business app. I've spent hours and hours on this. I'm being driven insane. Any ideas how to get this working?

    Read the article

  • Inserting Google Maps into a WYSIWYG editor, then saving and retrieving properly

    - by Tatu Ulmanen
    Hi, I'm trying to extend jWysiwyg with an function to add a map from Google Maps. I can get the map all right, but I'm having problems with how to handle the generated map so it can be saved with the page and then retrieved. To open the process up a bit: User enters editor which is created using jWysiwyg. User clicks on a button which asks for an address, then returns the corresponding latitude and longitude. I use this location information to create a map using Google Maps API (V3), which I then insert into the editable WYSIWYG area. When I save the page, the whole Google generated HTML gets saved into the database, which will not work properly when opened next time (I get a grey box when I open up the page again). Now, the problem is that I need to insert the map in such a format that it will work afterwards (perhaps using <script> tags). I also need the map to be visible in the WYSIWYG editor itself, so I cannot just put in a placeholder tag which would later be populated with the correct map data. So, in short; how would you insert a Google Map into a WYSIWYG editor in a way that it is both visible/previewable from the editor itself and could also be saved in a format that would work properly when opened the next time?

    Read the article

  • Change post categories while saving post

    - by fuunnews
    Hi everybody, I'm trying to change post categories inside a save_post action callback function, but I get endless recursion, because wp_update_post method fires save_post action itself. Maybe somebody did this before& Or there is a way to change post categories without using wp_update_post method?

    Read the article

  • Saving files in cocoa

    - by happyCoding25
    Hello, Im sure this is a really easy to answer question but I'm still new to cocoa. I need to save my applications data. The app has 4 text fields and each field needs to be saved into one file. Then when you open the file it needs to know what goes in what field. Im really stuck with this. Also, I do know how to use the save panel. Thanks in advance.

    Read the article

  • Android: Saving custom button and spinner on orientation change

    - by Jacob Huggart
    Hello All, I am new to Android programming and was handed a fairly large program that is almost complete, but needed support for switching between portrait and landscape view. I added android:configChanges="keyboardHidden|orientation" to the manifest and used onConfigurationChanged to save the view data and that works. However, there is a button that displays the date selected (when pressed a calendar to select the date comes up) and a spinner that displays the current view and is used to select a new view. Those two items are being cleared/reset and do not work at all after the screen flip. I have been attempting to use onSaveInstanceState and onRestoreInstanceState to fix that, but I cannot figure out how to get it to work. Any advice? FYI, This is how my spinner is set up: Spinner s = (Spinner) findViewById(R.id.siteSelector); ArrayAdapter<?> adapter = ArrayAdapter.createFromResource( this, R.array.sites, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); s.setAdapter(adapter);

    Read the article

  • jquery treeview global saving position

    - by kusanagi
    i use such treeview http://docs.jquery.com/Plugins/Treeview/treeview, it saves perfect opened nodes when i click to subnodes links, but if i click on link, that is not in treeview the treeview is closes. for example- in treeview i have product categories, when click on category it loads list of products, but if i click on product details (this link not in treeview) then treeview is close. any ideas?

    Read the article

  • Problem Saving Silverlight 4 Business Application

    - by rip
    I’m trying to create a new project using the Silverlight 4 business application template in Visual Studio 2010 beta 2. When I click “Save All” after the project is created I get build errors such as: The project file "..\BusinessApplication1.Web\BusinessApplication1.Web.vbproj" was not found. BusinessApplication1 Unable to open module file 'C:\Users\XX\AppData\Local\Temporary Projects\BusinessApplication1\Assets\Resources\ApplicationStrings.Designer.vb': System Error &H80070003& C:\Users\XX\AppData\Local\Temporary Projects\BusinessApplication1\Assets\Resources\ApplicationStrings.Designer.vb 1 1 BusinessApplication1 Any idea what I am doing wrong?

    Read the article

  • django-admin: creating,saving and relating a m2m model

    - by pastylegs
    I have two models: class Production(models.Model): gallery = models.ManyToManyField(Gallery) class Gallery(models.Model): name = models.CharField() I have the m2m relationship in my productions admin, but I want that functionality that when I create a new Production, a default gallery is created and the relationship is registered between the two. So far I can create the default gallery by overwriting the productions save: def save(self, force_insert=False, force_update=False): if not ( Gallery.objects.filter(name__exact="foo").exists() ): g = Gallery(name="foo") g.save() self.gallery.add(g) This creates and saves the model instance (if it doesn't already exist), but I don't know how to register the relationship between the two?

    Read the article

  • Resize and saving an image to disk in Monotouch

    - by Chris S
    I'm trying to resize an image loaded from disk - a JPG or PNG (I don't know the format when I load it) - and then save it back to disk. I've got the following code which I've tried to port from objective-c, however I've got stuck on the last parts. Original Objective-C. This may not be the best way of achieving what I want to do - any solution is fine for me. int width = 100; int height = 100; using (UIImage image = UIImage.FromFile(filePath)) { CGImage cgimage = image.CGImage; CGImageAlphaInfo alphaInfo = cgimage.AlphaInfo; if (alphaInfo == CGImageAlphaInfo.None) alphaInfo = CGImageAlphaInfo.NoneSkipLast; CGBitmapContext context = new CGBitmapContext(IntPtr.Zero, width, height, cgimage.BitsPerComponent, 4 * width, cgimage.ColorSpace, alphaInfo); context.DrawImage(new RectangleF(0, 0, width, height), cgimage); /* Not sure how to convert this part: CGImageRef ref = CGBitmapContextCreateImage(bitmap); UIImage* result = [UIImage imageWithCGImage:ref]; CGContextRelease(bitmap); // ok if NULL CGImageRelease(ref); */ }

    Read the article

  • Android - Saving an object in onSaveInstanceState?

    - by Donal Rafferty
    I have created a small XML parsing application for Android that displays information in a listview and then allows a user to click on the list view and a dialog with further info will pop up. The problem is that when the screen orientation is changed when a dialog screen is open I get a null pointer error. The null pointer occurs on the following line: if(setting.getAddForPublicUserNames() == 1){ This line is part of my dialogPrepare method: @Override public void onPrepareDialog(int id, Dialog dialog) { switch(id) { case (SETTINGS_DIALOG) : afpunText = ""; if(setting.getAddForPublicUserNames() == 1){ afpunText = "Yes"; } else{ afpunText = "No"; } String Text = "Login Settings: " + "\n" + "Password: " + setting.getPassword() + "\n" + "Server: " + setting.getServerAddress() + "\n" + "Register: " + setting.getRegistrarAddress() + "\n" + "Realm: " + setting.getRealm() + "\n" + "Public UserNames: " + afpunText + "\n" + "Preference Settings: " + "\n" + "Request VDN: " + setting.getRequestVDN() + "\n" + "Handover Settings: " + "\n" + "Enable Handover: " + setting.getEnableHandover() + "\n" + "Hand Over Number: " + setting.getHandoverNum() + "\n"; AlertDialog settingsDialog = (AlertDialog)dialog; settingsDialog.setTitle("Auth ID: " + setting.getUserName()); tv = (TextView)settingsDialog.findViewById(R.id.detailsTextView); if (tv != null) tv.setText(Text); break; } } So the error is that my variable setting is null after the screen orientation changes. I have tried to use the onSaveInstance state methods to fix that as follows: @Override public void onSaveInstanceState(Bundle savedInstanceState) { for(int i = 0; i < settings.size(); i++){ savedInstanceState.putString("Username"+i, settings.get(i).getUserName()); savedInstanceState.putString("Password"+i, settings.get(i).getPassword()); savedInstanceState.putString("Server"+i, settings.get(i).getServerAddress()); savedInstanceState.putString("Registrar"+i, settings.get(i).getRegistrarAddress()); savedInstanceState.putString("Realm"+i, settings.get(i).getRealm()); savedInstanceState.putInt("PUserNames"+i, settings.get(i).getAddForPublicUserNames()); savedInstanceState.putString("RequestVDN"+i, settings.get(i).getRequestVDN()); savedInstanceState.putString("EnableHandOver"+i, settings.get(i).getEnableHandover()); savedInstanceState.putString("HandOverNum"+i, settings.get(i).getHandoverNum()); } super.onSaveInstanceState(savedInstanceState); } and @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); //Check to see if this is required // Restore UI state from the savedInstanceState. // This bundle has also been passed to onCreate. for(int i = 0; i<settings.size(); i++){ settings.get(i).setUserName(savedInstanceState.getString("Username"+i)); settings.get(i).setPassword(savedInstanceState.getString("Password"+i)) ; settings.get(i).setServerAddress(savedInstanceState.getString("Server"+i)); settings.get(i).setRegistrarAddress(savedInstanceState.getString("Registrar"+i)); settings.get(i).setRealm(savedInstanceState.getString("Realm"+i)); settings.get(i).setAddForPublicUserNames(savedInstanceState.getInt("PUserNames"+i)); settings.get(i).setRequestVDN(savedInstanceState.getString("RequestVDN"+i)); settings.get(i).setEnableHandover(savedInstanceState.getString("EnableHandOver"+i)); settings.get(i).setHandoverNum(savedInstanceState.getString("HandOverNum"+i)); } } However the error still remains, I think I have to save the selected setting from what was selected from the ListView? But how do I save a setting object in onSavedInstance?

    Read the article

  • .Net Custom Configuration Section and Saving Changes within PropertyGrid

    - by Paul
    If I load the My.Settings object (app.config) into a PropertyGrid, I am able to edit the property inside the propertygrid and the change is automatically saved. PropertyGrid1.SelectedObject = My.Settings I want to do the same with a Custom Configuration Section. Following this code example (from here http://www.codeproject.com/KB/vb/SerializePropertyGrid.aspx), he is doing explicit serialization to disk when a "Save" button is pushed. Public Class Form1 'Load AppSettings Dim _appSettings As New AppSettings() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click _appSettings = AppSettings.Load() ' Actually change the form size Me.Size = _appSettings.WindowSize PropertyGrid1.SelectedObject = _appSettings End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click _appSettings.Save() End Sub End Class In my code, my custom section Inherits from ConfigurationSection (see below) Question: Is there something built into ConfigurationSection class that does the autosave? If not, what is the best way to handle this, should it be in the PropertyGrid.PropertyValueChagned? (how does the My.Settings handle this internally?) Here is the example Custom Class that I am trying to get to auto-save and how I load into property grid. Dim config As System.Configuration.Configuration = _ ConfigurationManager.OpenExeConfiguration( _ ConfigurationUserLevel.None) PropertyGrid2.SelectedObject = config.GetSection("CustomSection") Public NotInheritable Class CustomSection Inherits ConfigurationSection ' The collection (property bag) that contains ' the section properties. Private Shared _Properties As ConfigurationPropertyCollection ' The FileName property. Private Shared _FileName As New ConfigurationProperty("fileName", GetType(String), "def.txt", ConfigurationPropertyOptions.IsRequired) ' The MasUsers property. Private Shared _MaxUsers _ As New ConfigurationProperty("maxUsers", _ GetType(Int32), 1000, _ ConfigurationPropertyOptions.None) ' The MaxIdleTime property. Private Shared _MaxIdleTime _ As New ConfigurationProperty("maxIdleTime", _ GetType(TimeSpan), TimeSpan.FromMinutes(5), _ ConfigurationPropertyOptions.IsRequired) ' CustomSection constructor. Public Sub New() _Properties = New ConfigurationPropertyCollection() _Properties.Add(_FileName) _Properties.Add(_MaxUsers) _Properties.Add(_MaxIdleTime) End Sub 'New ' This is a key customization. ' It returns the initialized property bag. Protected Overrides ReadOnly Property Properties() _ As ConfigurationPropertyCollection Get Return _Properties End Get End Property <StringValidator( _ InvalidCharacters:=" ~!@#$%^&*()[]{}/;'""|\", _ MinLength:=1, MaxLength:=60)> _ <EditorAttribute(GetType(System.Windows.Forms.Design.FileNameEditor), GetType(System.Drawing.Design.UITypeEditor))> _ Public Property FileName() As String Get Return CStr(Me("fileName")) End Get Set(ByVal value As String) Me("fileName") = value End Set End Property <LongValidator(MinValue:=1, _ MaxValue:=1000000, ExcludeRange:=False)> _ Public Property MaxUsers() As Int32 Get Return Fix(Me("maxUsers")) End Get Set(ByVal value As Int32) Me("maxUsers") = value End Set End Property <TimeSpanValidator(MinValueString:="0:0:30", _ MaxValueString:="5:00:0", ExcludeRange:=False)> _ Public Property MaxIdleTime() As TimeSpan Get Return CType(Me("maxIdleTime"), TimeSpan) End Get Set(ByVal value As TimeSpan) Me("maxIdleTime") = value End Set End Property End Class 'CustomSection

    Read the article

  • Saving custom attributes in NSAttributedString

    - by regulus6633
    I need to add a custom attribute to the selected text in an NSTextView. So I can do that by getting the attributed string for the selection, adding a custom attribute to it, and then replacing the selection with my new attributed string. So now I get the text view's attributed string as NSData and write it to a file. Later when I open that file and restore it to the text view my custom attributes are gone! After working out the entire scheme for my custom attribute I find that custom attributes are not saved for you. Look at the IMPORTANT note here: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/AttributedStrings/Tasks/RTFAndAttrStrings.html So I have no idea how to save and restore my documents with this custom attribute. Any help?

    Read the article

  • saving WPF InkCanvas to a JPG - image is getting cropped

    - by Jason
    I have a WPF InkCanvas control I'm using to capture a signature in my application. The control looks like this - it's 700x300 However, when I save it as a JPG, the resulting image looks like this, also 700x300 The code I'm using to save sigPath = System.IO.Path.GetTempFileName(); MemoryStream ms = new MemoryStream(); FileStream fs = new FileStream(sigPath, FileMode.Create); RenderTargetBitmap rtb = new RenderTargetBitmap((int)inkSig.Width, (int)inkSig.Height, 96d, 96d, PixelFormats.Default); rtb.Render(inkSig); JpegBitmapEncoder encoder = new JpegBitmapEncoder(); encoder.Frames.Add(BitmapFrame.Create(rtb)); encoder.Save(fs); fs.Close(); This is the XAML I'm using: <Window x:Class="Consent.Client.SigPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Transparent" Topmost="True" AllowsTransparency="True" Title="SigPanel" Left="0" Top="0" Height="1024" Width="768" WindowStyle ="None" ShowInTaskbar="False" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" > <Border BorderThickness="1" BorderBrush="Black" Background='#FFFFFFFF' x:Name='DocumentRoot' Width='750' Height='400' CornerRadius='10'> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock Name="txtLabel" FontSize="24" HorizontalAlignment="Center" >Label</TextBlock> <InkCanvas Opacity="1" Background="Beige" Name="inkSig" Width="700" Height="300" /> <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> <Button FontSize="24" Margin="10" Width="150" Name="btnSave" Click="btnSave_Click">Save</Button> <Button FontSize="24" Margin="10" Width="150" Name="btnCancel" Click="btnCancel_Click">Cancel</Button> <Button FontSize="24" Margin="10" Width="150" Name="btnClear" Click="btnClear_Click">Clear</Button> </StackPanel> </StackPanel> </Border> In the past this worked perfectly. I can't figure out what changed that is causing the image to shift when it is saved.

    Read the article

  • Mass saving xls as csv

    - by korki
    hi, here's the trick. gotta convert 'bout 300 files from xls to csv, wrote some simple macro to do it, here's the code: Dim wb As Workbook For Each wb In Application.Workbooks wb.Activate Rows("1:1").Select Selection.Delete Shift:=xlUp ActiveWorkbook.SaveAs Filename:= _ "C:\samplepath\CBM Cennik " & ActiveWorkbook.Name & " 2010-04-02.csv" _ , FileFormat:=xlCSV, CreateBackup:=False Next wb but it doesn't do exactly what i want - saves file "example.xls" as "example.xls 2010-04-02.csv", what i need is "example 2010-04-02.csv" need support guys ;)

    Read the article

  • Rails Nested Forms Attributes not saving if Fields Added with jQuery

    - by looloobs
    Hi I have a rails form with a nested form. I used Ryan Bates nested form with jquery tutorial and I have it working fine as far as adding the new fields dynamically. But when I go to submit the form it does not save any of the associated attributes. However if the partial builds when the form loads it creates the attribute just fine. I can not figure out what is not being passed in the javascript that is failing to communicate that the form object needs to be saved. Any help would be great. class Itinerary < ActiveRecord::Base accepts_nested_attributes_for :trips end itinerary/new.html <% form_for ([@move, @itinerary]), :html => {:class => "new_trip" } do |f| %> <%= f.error_messages %> <%= f.hidden_field :move_id, :value => @move.id %> <% f.fields_for :trips do |builder| %> <%= render "trip", :f => builder %> <% end %> <%= link_to_add_fields "Add Another Leg to Your Trip", f, :trips %> <p><%= f.submit "Submit" %></p> <% end %> application_helper.rb def link_to_remove_fields(name, f) f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)") end def link_to_add_fields(name, f, association) new_object = f.object.class.reflect_on_association(association).klass.new fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder| render(association.to_s.singularize, :f => builder) end link_to_function(name, h("add_fields(this, \"#{association}\", \"#{escape_javascript(fields)}\")")) end application.js function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g") $(link).parent().before(content.replace(regexp, new_id)); }

    Read the article

  • Saving a single NSMutableDictionary in a plist

    - by yesimarobot
    I have one dictionary I need to save into a plist. The paletteDictionary always returns nil: - (void)saveUserPalette:(id) sender { [paletteDictionary setObject:matchedPaletteColor1Array forKey:@"1"]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"UserPaletteData.plist"]; // write plist to disk [paletteDictionary writeToFile:path atomically:YES]; } I'm reading the data back in a different view like: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"UserPaletteData.plist"]; NSMutableDictionary *plistDictionary = [NSMutableDictionary dictionaryWithContentsOfFile:path]; if(plistDictionary==nil ){ NSLog(@"failed to retrieve dictionary from disk"); }

    Read the article

  • Resizing and saving an image in WinMobile and .NET CF throws OutOfMemoryException

    - by devguy
    I have a WinMobile app which allows the user the snap a photo with the camera, and then use for for various things. The photo can be snapped at 1600x1200, 800x600 or 640x480, but it must always be resized to 400px for the longest size (the other is proportional of course). Here's the code: private void LoadImage(string path) { Image tmpPhoto = new Bitmap(path); // calculate new bitmap size... double width = ... double height = ... // draw new bitmap Image photo = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); using (Graphics g = Graphics.FromImage(photo)) { g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0, 0, photo.Width, photo.Height)); int srcX = (int)((double)(tmpPhoto.Width - width) / 2d); int srcY = (int)((double)(tmpPhoto.Height - height) / 2d); g.DrawImage(tmpPhoto, new Rectangle(0, 0, photo.Width, photo.Height), new Rectangle(srcX, srcY, photo.Width, photo.Height), GraphicsUnit.Pixel); } tmpPhoto.Dispose(); // save new image and dispose photo.Save(Path.Combine(config.TempPath, config.TempPhotoFileName), System.Drawing.Imaging.ImageFormat.Jpeg); photo.Dispose(); } Now the problem is that the app breaks in the photo.Save call, with an OutOfMemoryException. And I don't know why, since I dispose the tempPhoto (with the original photo from the camera) as soon as I can, and I also dispose the Graphics obj. Why does this happen? It seems impossible to me that one can't take a photo with the camera and resize/save it without making it crash :( Should I restor t C++ for such a simple thing? Thanks.

    Read the article

  • Saving State of Objects in GXT

    - by 8EM
    Is there a way to store the state of objects in GXT? That is, having a dynamically configurable GUI built in GXT, you can add your own widgets 'on-the-fly' in any order you like - with your own custom everything. Is there a way to save the state of all the objects, so one can load the profile back at a later date?

    Read the article

  • Saving a datawindow as PDF in PB 10.5

    - by gd047
    I have a grid datawindow with a picture in it's background (with dimensions of an A4 page) and I would like to export both data and the picture as a (single page) PDF file. I used several combinations of the following commands but at most I got a 0-sized pdf. //dw_1.Modify("Datawindow.Export.PDF.Method = Distill! ") //dw_1.Modify("DataWindow.Export.PDF.Method = XSLFOP! ") dw_1.Object.DataWindow.Export.PDF.Method = Distill! //dw_1.Object.DataWindow.Printer = "\\prntsrvr\pr-6" dw_1.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No" dw_1.SaveAs("c:\dw_one.pdf", PDF!, false) User’s guide (on page 533) says: … the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript… Installing Ghostscript For licensing reasons, Ghostscript is not installed with PowerBuilder. You (and your users) must download and install it before you can use this technique… Does anyone have any idea what is the procedure?

    Read the article

  • Saving selected rows in a jqGrid while paging

    - by Dan
    I have a jqGrid with which users will select records. A large number of records could be selected across multiple pages. The selected rows seem to get cleared out when the user pages through the data. Is it up to the developer to manually track the selected rows in an array? I'm fine doing this, but I'm not sure what the best way is. I'm not sure I want to be splicing an array whenever any number of records are selected as that seems like it could really slow things down. My end goal is to have a jQueryUI dialog that, when closed, while store all the selected rows so I can post it to the server. Insight, questions, comments; all are appreciated! Note: added aspnetmvc tag only because this is for an MVC app

    Read the article

  • Using DockPanel Suite's XML saving with My.Settings

    - by Cyclone
    In vb.net, how can I use SaveAsXML and LoadFromXML (DockPanel Suite functions) with My.Settings? I know there is a way to save it to a stream, but I don't know enough about System.IO to do this. DockPanel Suite: http://sourceforge.net/projects/dockpanelsuite/ I would very much prefer to store configuration using My.Settings instead of as an XML file. Thanks for the help! EDIT: Since the only person to answer so far has since deleted their answer, I feel I should explain further: Those two methods can both accept a stream object, but I have not used System.IO enough to know how to properly initialize a stream, let alone get a string out of a stream. EDIT: Googling has gotten me nowhere. EDIT: Still waiting for this. I've tried everything...

    Read the article

  • Saving a select count(*) value to an integer (SQL Server)

    - by larryq
    Hi everyone, I'm having some trouble with this statement, owing no doubt to my ignorance of what is returned from this select statement: declare @myInt as INT set @myInt = (select COUNT(*) from myTable as count) if(@myInt <> 0) begin print 'there's something in the table' end There are records in myTable, but when I run the code above the print statement is never run. Further checks show that myInt is in fact zero after the assignment above. I'm sure I'm missing something, but I assumed that a select count would return a scalar that I could use above?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >