Daily Archives

Articles indexed Tuesday May 11 2010

Page 24/123 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Forcing a method to be non-transactional in JPA (Eclipselink)

    - by rhinds
    Hi, I am developing an application using Eclipselink and as part of the app I need to be able to manipulate some of the objects which involves changing data without it being persisted to the database (i merging/changing objects for some batch generation processes). I am reluctant to change the data in the Entity objects, as there is a risk that even though i have not marked the methods as @Transactional, this method could in the future be inadvertantly called from within a transactional method and these changes could be persisted. So my question is, is there anyway to get around this? Such as force a method to always be non-transactional regardless; terminate any transactionality as soon as the method is started; etc. I know there is a .detach() method that can detach the objects from the Entity Manager, however, there are many objects and this seems like a potentially error prone fail-safe on my code.

    Read the article

  • Canvas Animation

    - by Aidia
    I'm making a graph script using canvas, i'm adding animation to a chart but i don't like the way that it's look, i use setInterval for X function adding height to a rectangle to make a bar chart for example, but i wanna an animation more fluid, is another way to do an animation?

    Read the article

  • Memory dump much smaller than available memory

    - by Daniel
    I have a Tomcat Application Server that is configured to create a memory dump on OOM, and it is started with -Xmx1024M, so a Gigabyte should be available to him. Now I found one such dump and it contains only 260MB of unretained memory. How is it possible that the dump is so much smaller than the size he should have available?

    Read the article

  • C# image drawing colours are incorrect

    - by Jon Tackabury
    I have a source bitmap that is 1x1 and I am trying to take that image and draw it to a new bitmap. The source bitmap is all red, but for some reason the new bitmap ends up with a gradient (see image). Using the code below, shouldn't the new bitmap be completely red? Where is it getting the white/alpha from? private void DrawImage() { Bitmap bmpSOURCE = new Bitmap(1, 1, PixelFormat.Format32bppArgb); using (Graphics g = Graphics.FromImage(bmpSOURCE)) { g.Clear(Color.Red); } Bitmap bmpTest = new Bitmap(300, 100, PixelFormat.Format32bppArgb); using (Graphics g = Graphics.FromImage(bmpTest)) { g.CompositingMode = CompositingMode.SourceCopy; g.CompositingQuality = CompositingQuality.AssumeLinear; g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.PageUnit = GraphicsUnit.Pixel; g.PixelOffsetMode = PixelOffsetMode.None; g.SmoothingMode = SmoothingMode.None; Rectangle rectDest = new Rectangle(0, 0, bmpTest.Width, bmpTest.Height); Rectangle rectSource = new Rectangle(0, 0, 1, 1); g.DrawImage(bmpSOURCE, rectDest, rectSource, GraphicsUnit.Pixel); } pictureBox1.Image = bmpTest; }

    Read the article

  • How to read modelstate errors when returned by Json?

    - by user281180
    How can I display modelstate errors returned by Json ? I want to do somthing like that... if (!ValidateLogOn(Name, currentPassword)) { ModelState.AddModelError("_FORM", "Username or password is incorrect."); //Return a json object to the javascript return Json(new { ModelState }); } What must be my code in the view to read the modelstate errors and display them? My actual code in the view is as follows to read the Json values: function createCategoryComplete(e) { var obj = e.get_object(); alert(obj.Values); }

    Read the article

  • How do I add artwork to an iTunes track with obj-c AppScript?

    - by demonslayer319
    aTrack is an ITReference* object, value is an NSImage* object, initialized via a URL to a jpeg. [[[[[aTrack artworks] data_] set] to:value] send]; I get the following message in GDB: 2010-03-09 16:59:42.860 Sandbox[2260:a0f] Can't pack object of class NSImage (unsupported type): <NSImage 0x10054a440 Size={0, 0} Reps=( I then tried the following code: NSData *imageData = [[NSData alloc] initWithData:[value TIFFRepresentation]]; [[[[[aTrack artworks] data_] set] to:imageData] send]; and get this message instead 2010-03-09 16:46:09.341 Sandbox[2193:a0f] Can't pack object of class NSConcreteData (unsupported type): <4d4d002a 00000000> In the AppScript documentation, it says that the "data" property of the "artwork" item is a PICTPicture image. How do I convert an NSImage to a PICT? Am I using the AppScript all wrong?

    Read the article

  • calender in oracle forms

    - by Mousarules
    Hi guys :) i want to integrate a ready made CALENDER on my oracle forms application whethear it's a java applet or other available option ; i want the end user to be able to invoke this CALENDER whenever he pressed the date button so that he can chose a specific date to be entered in a display item .

    Read the article

  • Windows powering off after "preparing your desktop" stage.

    - by Jack
    Windows 7 64 bit. The only recent change was I installed two updates for MS Office, and a cumulative security update for IE. As soon as I choose a user and login, after loading my user profile it states the preparing your desktop message, and then powers off. I have used DaRT to check the event log, but nothing is recorded. Ideas?

    Read the article

  • GIS: When and why to use ArcObjects over GDAL programming to work with ArcGIS rasters and vectors?

    - by anotherobject
    Im just starting off with GDAL + python to support operations that cannot be done with ArcGIS python geoprocessing scripting. Mainly I am doing spatial modeling/analysis/editing of raster and vector data. I am a bit confused when ArcObject development is required versus when GDAL can be used? Is there functionality of ArcObjects that GDAL does not do? Is the opposite true too? I am assuming that ArcObjects are more useful in developing online tools versus Desktop analysis and modeling where the difference is more to do with preference? In my case i prefer GDAL because of python support, which I believe ArcObjects lack. thanks!

    Read the article

  • Asp.net JSON Deserialize problem

    - by Billy
    I want to deserialize the following JSON string: [ {"name":"photos","fql_result_set":[{"owner":"123456","caption":"Caption 1", "object_id":123},{"owner":"223456","caption":"Caption 2", "object_id":456}]}, {"name":"likes","fql_result_set":[{"object_id":123,"user_id":12156144},{"object_id":456,"user_id":140342725}]} ] and get the POCO like [DataContract] public class Photo{ [DataMember] public string owner{get;set;} [DataMember] public string caption{get;set;} [DataMember] public string object_id{get;set;} } [DataContract] public class Like { [DataMember] public string object_id { get; set; } [DataMember] public string user_id { get; set; } } What should I do? I already have this piece of code: public class JSONUtil { public static T Deserialize<T>(string json) { T obj = Activator.CreateInstance<T>(); MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(json)); System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(obj.GetType()); obj = (T)serializer.ReadObject(ms); ms.Close(); return obj; }

    Read the article

  • Online validators, syntax checkers, testing tools

    - by Max Gontar
    I often need to verify some simple code before posting, and it's great if I have installed IDE, but what if not? It would be nice to have online free tools for SQL, VB.NET, C# code validation, or maybe even testing. EDIT What I actually mean are online live web tools, like JSLint for javascript. Have you seen any?

    Read the article

  • How does android communicate with dynamic services?

    - by ezekielweb
    I am trying to develop an app and I want it to bring in data from a mySQL database. But from some reading I have done on different sites, I am realizing that it is probably not going to happen. But I am curious to know, how do apps like PhoneFlix and others view that dynamic data on the application? Does it somehow just bring it in through http? If so, how would I go about doing that? Does anyone know of any good sites that will point me in the right direction? Thanks ezekielweb

    Read the article

  • Financial applications on GPGPU

    - by CUDA-dev
    I want to know what sort of financial applications can be implemented using a GPGPU. I'm aware of Option pricing/ Stock price estimation using Monte Carlo simulation on GPGPU using CUDA. Can someone enumerate the various possibilities of utilizing GPGPU for any application in Finance domain,

    Read the article

  • Cache for large read only database recommendation

    - by paddydub
    I am building site on with Spring, Hibernate and Mysql. The mysql database contains information on coordinates and locations etc, it is never updated only queried. The database contains 15000 rows of coordinates and 48000 rows of coordinate connections. Every time a request is processed, the application needs to read all these coordinates which is taking approx 3-4 seconds. I would like to set up a cache, to allow quick access to the data. I'm researching memcached at the moment, can you please advise if this would be my best option?

    Read the article

  • Appropriate USB enclosure to use with an Ultra ATA drive

    - by Topdown
    I have a friend with a broken iBook, but we wish to recover the hard disk. I haven't seen the drive itself, however the spec lists it as an "Ultra ATA drive". Could you please advise if this is 100% compatible with any standard USB IDE 2.5inch enclosure? Full spec: iBook 12" 1GHz(AP) 256MB DDR266 SDRAM built-in Keyboard/Mac OS X Bluetooth Module 40GB Ultra ATA drive Combo (DVD-ROM/CD-RW).

    Read the article

  • Hard link and Symbolic links in Unix

    - by darkie15
    Hi All, I just wanted to clarify if a hard/symbolic link is actually a file that is created ?? I ran the command: ln source hardlink ln -s source softlink -- The ls command shows this 2 links as a file. So my query is, does ln / ln -s actually create a file? Regards, Shyam

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >