Daily Archives

Articles indexed Friday June 1 2012

Page 5/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Best practice? - Array/Dictionary as a Core Data Entity Attribute

    - by Run Loop
    I am new to Core Data. I have noticed that collection types are not available as attribute types and would like to know what the most efficient way is of storing array/dictionary type data as an attribute (e.g. the elements that make up an address like street, city, etc. does not require a separate entity and is more conveniently stored as a dictionary/array than separate attributes/fields). Thank you.

    Read the article

  • Using Entity Framework (code first) migrations in production

    - by devdigital
    I'm just looking into using EF migrations for our project, and in particular for performing schema changes in production between releases. I can see that generating SQL (delta) script files is an option, but is there no way of running the migrations programmatically on app start up? Will I instead need to add each delta script to the solution and write my own framework to apply them in order (from the current version to the latest) on bootstrap?

    Read the article

  • Does javascript event handling occur inside or outside the program flow?

    - by Carlo Roosen
    This question is related to Javascript event handling and flow control, but it is one step beyond. The question that remains unanswered is: when an event is fired and control is returned to the browser, could the browser decide to handle other events first (fired by other scripts or user action) (A), or will it always handle my event directly (B)? The question is important, because in case (B) you can rely on the fact that nothing has been changed between firing the event and the event handler, while (A) gives no guarantees whatsoever. My first guess is (B), how else could stopPropagation() and preventDefault() work? But giving it a second thought, it is no hard evidence.

    Read the article

  • C++ AMP, for loops to parallel_for_each loop

    - by user1430335
    I'm converting an algorithm to make use of the massive acceleration that C++ AMP provides. The stage I'm at is putting the for loops into the known parallel_for_each loop. Normally this should be a straightforward task to do but it appears more complex then I first thought. It's a nested loop which I increment using steps of 4 per iterations: for(int j = 0; j < height; j += 4, data += width * 4 * 4) { for(int i = 0; i < width; i += 4) { The trouble I'm having is the use of the index. I can't seem to find a way to properly fit this into the parallel_for_each loop. Using an index of rank 2 is the way to go but manipulating it via branching will do harm to the performance gain. I found a similar post: Controlling the index variables in C++ AMP. It also deals about index manipulation but the increment aspect doesn't cover my issue. With kind regards, Forcecast

    Read the article

  • Should I trust Redis for data integrity?

    - by Jiaji
    In my current project, I have PostgreSQL as my master DB, and Redis as kind of a slave, e.g., when some user adds another as a friend, first the relationship will be stored in PostgreSQL and then a friend list in Redis will be updated. When some user's friend list is requested, it will be pulled out of Redis instead of PostgreSQL. The question is: when I update the friend list in Redis, should I get a fresh copy outof PostgreSQL, and replace the old list in Redis with the new one or should I keep the old list and simply SADD the userid into the list? The latter is of course best for performance, but intuitively the former does a better job in keep the data integrity? And if something like Celery is used, is the second method worth the risk?

    Read the article

  • NDepend: How to not display 'tier' assemblies in dependency graph?

    - by Edward Buatois
    I was able to do this in an earlier version of nDepend by going to tools-options and setting which assemblies would be part of the analysis (and ignore the rest). The latest version of the trial version of nDepend lets me set it, but it seems to ignore the setting and always analyze all assemblies whether I want it to or not. I tried to delete the "tier" assemblies by moving them over to the "application assemblies" list, but when I delete them out of there, they just get added back to the "tier" list, which I can't ignore. I don't want my dependency graph to contain assemblies like "system," "system.xml," and "system.serialization!" I want only MY assemblies in the dependency graph! Or is that a paid-version feature now? Is there a way to do what I'm talking about?

    Read the article

  • Adding css class to jspDrag on scroll

    - by Jeff
    Today I implemented the horizontal jScrollPane script and the element I intended to scrolls like a charm. Via CSS I'm using an image for the jspDrag element. Now for my question; I see that there are a few css classes added to the jspDrag like jspHover and jspActive. Is it also possible to add css classes when I scroll to the left or right? I would like to do this, so I can change the image according to the scroll. (Hoping my question is clear, a reaction would be highly appreciated. Kind regards)

    Read the article

  • Convert PHP date into javascript date format

    - by LeeTee
    I have a PHP script that outputs an array of data. This is then transformed into JSON using the json_encode() function. My issue is I have a date within my array and its is not in the correct javascript format. How can I convert this within PHP so it is? $newticket['ThreadID'] = $addticket; $newticket['Subject'] = $subject; //$newticket['DateCreated'] = date('d-m-Y G:H'); Instead of the above fo rthe date I need the equivilant of the javascript function new Date() When I output the above I get the following "Fri Jun 01 2012 11:08:48 GMT+0100 (GMT Daylight Time)" However, If I format my PHP date to be the same, javascript rejects it. Confused... Can anyone help?

    Read the article

  • Automatic website screenshots for Web app?

    - by amfeng
    Is there a way to take automatic screenshots of a web page (by specifying its URL) in a web app using PHP or Ruby on Rails? Perhaps using a plugin or some external REST service. I've researched a lot, and nothing seems to fit except something like this (http://www.binarymoon.co.uk/2010/02/automated-take-screenshots-website-free/) but I doubt Wordpress would just let me spam their servers for something not Wordpress related. I'd like to use it for my own web application so I'm not sure of the legal implications..how hard is this to implement myself? What does it entail? Thanks!

    Read the article

  • Verify windows log-in via smart card

    - by Ronen Rabinovitz
    Hi I need to verify in my WPF application if the user log in to his computer via password or via smart-card. Both login options are available in my company clients but my application need to open only in the smart-card login. All the clients are windows 7 OS. I look at some sites: http://technet.microsoft.com/en-us/library/ff404285(v=ws.10).aspx http://www.codeproject.com/Articles/240655/Using-a-Smart-Card-Certificate-with-NET-Security-i and I'm thinking I need to get the enhanced key usage (EKU) attribute field. If the EKU is empty = then the user was loged via password and not via smartcard. I only need this simple check, I do not care for creating/validations on certificates atc.

    Read the article

  • Geolocation and jQuery - Can't post results using ajax

    - by etombaugh
    I'm currently working on a project to make a location-aware site. In essence, the user comes to the page, and their location is found using the HTML5 method and then using jQuery, the location is posted to a page which saves the location/address to a codeigniter session, but if they want to update their location, or change to a different location(IE they want to use their work address as the location instead of their present address), theres a jQuery colorbox that displays and lets them type in a custom address. Everything works flawlessly to get the initial location, but when I try and get the updated location saved, I receive the error "Uncaught TypeError: Object [object DOMWindow] has no method 'lat'" which then Google Chrome references as being an error not in jQuery, but in the file for Google Maps API. Any suggestions? jQuery('.inputsubmit').click(function() { //Takes values from user submitted fields and parses them into an address string var street = jQuery('.inputaddress').val(); var city = jQuery('.inputcity').val(); var state = jQuery('.inputstate').val(); var address = street +" "+ city +", " +state; geocoder = new google.maps.Geocoder(); var geocoderresult= geocoder.geocode({'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var newlocation = results[0].geometry.location; //Posts coordinates and address string to a CodeIgniter function to update users session information jQuery.post("somepage", {location: newlocation, address: address},function(data) { alert("Data Loaded: " + data); }); } else { alert("Geocoder failed due to: " + status); } }); }); I've tried everything I can think of to get the post to work. All of the code works up till the point, and I've commented out the post line and everything works correctly. This is one of our main website's features, to provide instant and quick results based off of location. Thanks!

    Read the article

  • HDFS some datanodes of cluster are suddenly disconnected while reducers are running

    - by user1429825
    I have 8 slave computers and 1 master computer for running Hadoop (ver 0.21) some datanodes of cluster are suddenly disconnected while I was running MapReduce code on 10GB data After all mappers finished and around 80% of reducers was processed, randomly one or more datanode disconned from network. and then the other datanodes start to disappear from network even if I killed the MapReduce job when I found some datanode was disconnected. I've tried to change dfs.datanode.max.xcievers to 4096, turned off fire-walls of all computing node, disabled selinux and increased the number of file open limit to 20000 but they didn't work at all... anyone have a idea to solve this problem? followings are error log from mapreduce 12/06/01 12:31:29 INFO mapreduce.Job: Task Id : attempt_201206011227_0001_r_000006_0, Status : FAILED java.io.IOException: Bad connect ack with firstBadLink as ***.***.***.148:20010 at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:889) at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:820) at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:427) and followings are logs from datanode 2012-06-01 13:01:01,118 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Receiving block blk_-5549263231281364844_3453 src: /*.*.*.147:56205 dest: /*.*.*.142:20010 2012-06-01 13:01:01,136 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(*.*.*.142:20010, storageID=DS-1534489105-*.*.*.142-20010-1337757934836, infoPort=20075, ipcPort=20020) Starting thread to transfer block blk_-3849519151985279385_5906 to *.*.*.147:20010 2012-06-01 13:01:19,135 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(*.*.*.142:20010, storageID=DS-1534489105-*.*.*.142-20010-1337757934836, infoPort=20075, ipcPort=20020):Failed to transfer blk_-5797481564121417802_3453 to *.*.*.146:20010 got java.net.ConnectException: > Connection timed out at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:373) at org.apache.hadoop.hdfs.server.datanode.DataNode$DataTransfer.run(DataNode.java:1257) at java.lang.Thread.run(Thread.java:722) 2012-06-01 13:06:20,342 INFO org.apache.hadoop.hdfs.server.datanode.DataBlockScanner: Verification succeeded for blk_6674438989226364081_3453 2012-06-01 13:09:01,781 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(*.*.*.142:20010, storageID=DS-1534489105-*.*.*.142-20010-1337757934836, infoPort=20075, ipcPort=20020):Failed to transfer blk_-3849519151985279385_5906 to *.*.*.147:20010 got java.net.SocketTimeoutException: 480000 millis timeout while waiting for channel to be ready for write. ch : java.nio.channels.SocketChannel[connected local=/*.*.*.142:60057 remote=/*.*.*.147:20010] at org.apache.hadoop.net.SocketIOWithTimeout.waitForIO(SocketIOWithTimeout.java:246) at org.apache.hadoop.net.SocketOutputStream.waitForWritable(SocketOutputStream.java:164) at org.apache.hadoop.net.SocketOutputStream.transferToFully(SocketOutputStream.java:203) at org.apache.hadoop.hdfs.server.datanode.BlockSender.sendChunks(BlockSender.java:388) at org.apache.hadoop.hdfs.server.datanode.BlockSender.sendBlock(BlockSender.java:476) at org.apache.hadoop.hdfs.server.datanode.DataNode$DataTransfer.run(DataNode.java:1284) at java.lang.Thread.run(Thread.java:722) hdfs-site.xml <configuration> <property> <name>dfs.name.dir</name> <value>/home/hadoop/data/name</value> </property> <property> <name>dfs.data.dir</name> <value>/home/hadoop/data/hdfs1,/home/hadoop/data/hdfs2,/home/hadoop/data/hdfs3,/home/hadoop/data/hdfs4,/home/hadoop/data/hdfs5</value> </property> <property> <name>dfs.replication</name> <value>3</value> </property> <property> <name>dfs.datanode.max.xcievers</name> <value>4096</value> </property> <property> <name>dfs.http.address</name> <value>0.0.0.0:20070</value> <description>50070 The address and the base port where the dfs namenode web ui will listen on. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.datanode.http.address</name> <value>0.0.0.0:20075</value> <description>50075 The datanode http server address and port. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.secondary.http.address</name> <value>0.0.0.0:20090</value> <description>50090 The secondary namenode http server address and port. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.datanode.address</name> <value>0.0.0.0:20010</value> <description>50010 The address where the datanode server will listen to. If the port is 0 then the server will start on a free port. </description> <property> <name>dfs.datanode.ipc.address</name> <value>0.0.0.0:20020</value> <description>50020 The datanode ipc server address and port. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.datanode.https.address</name> <value>0.0.0.0:20475</value> </property> <property> <name>dfs.https.address</name> <value>0.0.0.0:20470</value> </property> </configuration> mapred-site.xml <configuration> <property> <name>mapred.job.tracker</name> <value>masternode:29001</value> </property> <property> <name>mapred.system.dir</name> <value>/home/hadoop/data/mapreduce/system</value> </property> <property> <name>mapred.local.dir</name> <value>/home/hadoop/data/mapreduce/local</value> </property> <property> <name>mapred.map.tasks</name> <value>32</value> <description> default number of map tasks per job.</description> </property> <property> <name>mapred.tasktracker.map.tasks.maximum</name> <value>4</value> </property> <property> <name>mapred.reduce.tasks</name> <value>8</value> <description> default number of reduce tasks per job.</description> </property> <property> <name>mapred.map.child.java.opts</name> <value>-Xmx2048M</value> </property> <property> <name>io.sort.mb</name> <value>500</value> </property> <property> <name>mapred.task.timeout</name> <value>1800000</value> <!-- 30 minutes --> </property> <property> <name>mapred.job.tracker.http.address</name> <value>0.0.0.0:20030</value> <description> 50030 The job tracker http server address and port the server will listen on. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>mapred.task.tracker.http.address</name> <value>0.0.0.0:20060</value> <description> 50060 </property> </configuration>

    Read the article

  • How can I return the number of rows affected in sqlplus to a shell script?

    - by jessica
    Here is my shell script: # Deletes data from the 'sample' table starting August 30, 2011. # This is done in stages with a 7 second break every # 2 seconds or so to free up the database for other users. # The message "Done." will be printed when there are # no database entries left to delete. user="*****" pass="*****" while(true); do starttime=`date +%s` while [[ $((`date +%s` - $starttime)) -lt 2 ]]; do sqlplus $user/$pass@//blabla <<EOF whenever sqlerror exit 1 delete from sample where sampletime >= to_date('08-30-2011','mm-dd-yyyy') and rownum <= 2; commit; EOF rows = ??? if [ $rows -eq 0 ] ; then echo "Done." exit 0; fi done sleep 7 done If there is no way to get the number of rows, maybe I can use an error code returned by sqlplus to figure out when to end the script? Any thoughts? Thank you!

    Read the article

  • LibreOffice UNO Java API: how to open a document, execute a macro and close it?

    - by MarcoS
    I'm working on LibreOffice server-side: on the server I run soffice --accept=... Then I use Java LibreOffice client API's to apply a macro on a document (calc or writer). The java execution does not give any error, but I do not get the job done (macro code is executed, but it's effects are not in the output file). More, after macro script is invoked, the Basic debugger window appears, apparently stopped on the first line of my macro; F5 does not restart it... This is the relevant code I'm using: try { XComponentContext xLocalContext = Bootstrap.createInitialComponentContext(null); System.out.println("xLocalContext"); XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager(); System.out.println("xLocalServiceManager"); Object urlResolver = xLocalServiceManager.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", xLocalContext); System.out.println("urlResolver"); XUnoUrlResolver xUrlResolver = (XUnoUrlResolver) UnoRuntime.queryInterface(XUnoUrlResolver.class, urlResolver); System.out.println("xUrlResolve"); try { String uno = "uno:" + unoMode + ",host=" + unoHost + ",port=" + unoPort + ";" + unoProtocol + ";" + unoObjectName; Object rInitialObject = xUrlResolver.resolve(uno); System.out.println("rInitialObject"); if (null != rInitialObject) { XMultiComponentFactory xOfficeFactory = (XMultiComponentFactory) UnoRuntime.queryInterface( XMultiComponentFactory.class, rInitialObject); System.out.println("xOfficeFactory"); Object desktop = xOfficeFactory.createInstanceWithContext("com.sun.star.frame.Desktop", xLocalContext); System.out.println("desktop"); XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class, desktop); System.out.println("xComponentLoader"); PropertyValue[] loadProps = new PropertyValue[3]; loadProps[0] = new PropertyValue(); loadProps[0].Name = "Hidden"; loadProps[0].Value = Boolean.TRUE; loadProps[1] = new PropertyValue(); loadProps[1].Name = "ReadOnly"; loadProps[1].Value = Boolean.FALSE; loadProps[2] = new PropertyValue(); loadProps[2].Name = "MacroExecutionMode"; loadProps[2].Value = new Short(com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN); try { XComponent xComponent = xComponentLoader.loadComponentFromURL("file:///" + inputFile, "_blank", 0, loadProps); System.out.println("xComponent from " + inputFile); String macroName = "Standard.Module1.MYMACRONAME?language=Basic&location=application"; Object[] aParams = null; XScriptProviderSupplier xScriptPS = (XScriptProviderSupplier) UnoRuntime.queryInterface(XScriptProviderSupplier.class, xComponent); XScriptProvider xScriptProvider = xScriptPS.getScriptProvider(); XScript xScript = xScriptProvider.getScript("vnd.sun.star.script:"+macroName); short[][] aOutParamIndex = new short[1][1]; Object[][] aOutParam = new Object[1][1]; @SuppressWarnings("unused") Object result = xScript.invoke(aParams, aOutParamIndex, aOutParam); System.out.println("xScript invoke macro" + macroName); XStorable xStore = (XStorable)UnoRuntime.queryInterface(XStorable.class, xComponent); System.out.println("xStore"); if (outputFileType.equalsIgnoreCase("pdf")) { System.out.println("writer_pdf_Export"); loadProps[0].Name = "FilterName"; loadProps[0].Value = "writer_pdf_Export"; } xStore.storeToURL("file:///" + outputFile, loadProps); System.out.println("storeToURL to file " + outputFile); xComponent.dispose(); xComponentLoader = null; rInitialObject = null; System.out.println("done."); System.exit(0); } catch(IllegalArgumentException e) { System.err.println("Error: Can't load component from url " + inputFile); } } else { System.err.println("Error: Unknown initial object name at server side"); } } catch(NoConnectException e) { System.err.println("Error: Server Connection refused: check server is listening..."); } } catch(java.lang.Exception e) { System.err.println("Error: Java exception:"); e.printStackTrace(); }

    Read the article

  • How To use Simple Html Video Player Also Have Rewind Forward Capability For The Next Video ?? PHP HTML

    - by Syed Raza
    i am trying to use this code for video in html but fistle it is for flash videos and second thing is that it do not have rewind forward capability for the next video clip my code is, <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="250" height="250" align="middle"> <param name="allowScriptAccess" value="sameDomain"/> <param name="movie" value="Pro Tools Tutorials.swf"/> <param name="quality" value="high"/> <param name="bgcolor" value="#000000"/> <param name="allowFullScreen" value="true"/> <embed src="/unknittingmouse1.swf" quality="high" align="middle" bgcolor="#ffffff" width="250" height="230" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed> </object> we have to also be carefull that that video code will run on internet explorer Hopes to listen from you soon, thanks in advance

    Read the article

  • Providing unique layout for specific resolution in Android 2.3.3

    - by user1384991
    I need to use specific xml-layouts based on screen resolution, not size. So, the first design is used for resolution <= 480x800, and the second - for resolution = 480x800. How is it done ? update. Possible solution: Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); final int height = display.getHeight(); final int width = display.getWidth();

    Read the article

  • Uncompress a TIFF file without going through BufferedImage

    - by Gert
    I am receiving large size CCITT Group 4 compressed TIFF files that need to be written elsewhere as uncompressed TIFF files. I am using the jai_imageio TIFF reader and writer to do that and it works well as long as the product _width * height_ of the image fits in an integer. Here is the code I am using: TIFFImageReaderSpi readerSpi= new TIFFImageReaderSpi(); ImageReader imageReader = readerSpi.createReaderInstance(); byte[] data = blobManager.getObjectForIdAndVersion(id, version); ImageInputStream imageInputStream = ImageIO.createImageInputStream(data); imageReader.setInput(imageInputStream); TIFFImageWriterSpi writerSpi = new TIFFImageWriterSpi(); ImageWriter imageWriter = writerSpi.createWriterInstance(); ImageWriteParam imageWriteParam = imageWriter.getDefaultWriteParam(); imageWriteParam.setCompressionMode(ImageWriteParam.MODE_DISABLED); //bufferFile is created in the constructor ImageOutputStream imageOutputStream = ImageIO.createImageOutputStream(bufferFile); imageWriter.setOutput(imageOutputStream); //Now read the bitmap BufferedImage bufferedImage = imageReader.read(0); IIOImage iIOImage = new IIOImage(bufferedImage, null, null); //and write it imageWriter.write(null, iIOImage, imageWriteParam); Unfortunately, the files that I receive are often very large and the BufferedImage cannot be created. I have been trying to find a way to stream from the ImageReader directly to the ImageWriter but I cannot find out how to do that. Anybody with a suggestion?

    Read the article

  • Copying 1-D array into 2 -D array

    - by Digvijay Yadav
    I have one two dimensional array and one single dimensional array. The two dimensional array is of NxM size. And the one dimensional array is of size N x M means it has N X M elements. Now I want to copy all the elements of the one dimensional array into the 2-D array. This is what I tried for(i = 0; i < M; i += 1) { for(j = 0; j < N; j += 1) { arr2d[i][j] = arr2d[(i*j +j)]; } } But not working Any suggestions???

    Read the article

  • How to implement event notification mechanism in AIR

    - by nxhoaf
    Do you know how to implement event notification mechanism in AIR ? For simplicity, consider an example: I want to build two applications: "television" and "remote". Among them, television is implemented using AIR. For the "television" I want to use my remote to send message to the television. How must I do to implement "television" in such way that, it runs in waiting mode and whenever it receives a message from "remote", it will process the message and make a suitable action (i.e. change channel, increase volume...). Thank you in advance.

    Read the article

  • WPF 3.5 RenderTargetBitmap memory hog

    - by kingRauk
    I have a 3.5 WPF application that use's RenderTargetBitmap. It eat's memory like a big bear. It's is a know problem in 3.5 that RenderTargetBitmap.Render has memory problems. Have find some solutions for it, but i doesnt help. https://connect.microsoft.com/VisualStudio/feedback/details/489723/rendertargetbitmap-render-method-causes-a-memory-leak Program takes too much memory And more... Does anyway have any more ideas to solve it... static Image Method(FrameworkElement e, int width, int height) { const int dpi = 192; e.Width = width; e.Height = height; e.Arrange(new Rect(0, 0, width, height)); e.UpdateLayout(); if(element is Graph) (element as Graph).UpdateComponents(); var bitmap = new RenderTargetBitmap((int)(width*dpi/96.0), (int)(height*dpi/96.0), dpi, dpi, PixelFormats.Pbgra32); bitmap.Render(element); var encoder = new PngBitmapEncoder(); encoder.Frames.Add(BitmapFrame.Create(bitmap)); using (var stream = new MemoryStream()) { encoder.Save(stream); element.Clip = null; Dispose(element); bitmap.Freeze(); DisposeRender(bitmap); bitmap.Clear(); GC.Collect(); GC.WaitForPendingFinalizers(); return System.Drawing.Image.FromStream(stream); } } public static void Dispose(FrameworkElement element) { GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); } public static void DisposeRender(RenderTargetBitmap bitmap) { if (bitmap != null) bitmap.Clear(); bitmap = null; GC.Collect(); GC.WaitForPendingFinalizers(); }

    Read the article

  • 907 Invalid Jar Midlet Class is not public: autostartup

    - by vajapravin
    I am developing blackberry app. I use eclipse. When I run app from eclipse it runs well on device. But when I run it on manually installed - copy web and standard folders to my device memory and run jar file it gives me 907 invalid jar... my .cod file is Manifest-Version: 1.0 MIDlet-Jar-Size: 65712 MicroEdition-Configuration: CLDC-1.1 MIDlet-Version: 0.0.1 MIDlet-Name: app_blackberry_6 RIM-COD-Size: 61852 RIM-COD-URL-69: App1.cod RIM-COD-URL-68: App2.cod ...and I have also tried to change size of MIDlet-Jar-Size: 0 but is not working.

    Read the article

  • Repairing The Visual Studio 2012 UI

    - by Ken Cox [MVP]
    I have sympathy for ‘Softies who don’t like the controversial ‘Metro’ UI changes but are afraid to say so. After all, who wants to commit a CLM (Career-Limiting Move) by declaring that the Emperor has no clothes (or gradients) and that ALL CAPS IN MENUS ARE DUMB? Talk about power! Here’s a higher-up (anyone got a name?) who has enforced a flat, monochrome, uninteresting user interface in Visual Studio 2012  that has been damned with faint praise by consumers. The pushback must have been enormous. Some ‘Softies disengage from the raging debate with, “It’s not my decision” while others feebly point out that the addition of some colour pixels in the icons is a real improvement over the beta version. True, I guess. With the UI pretty much locked, its down to repairing the damage. Fortunately, some Empire dissident has leaked the news to a blogger that  those SHOUTING CAPs aren’t hardcoded afterall: How To Prevent Visual Studio 2012 ALL CAPS Menus And so it goes. By RTM, I’m sure there will be many more add-ons to help us ‘de-Metro’ VS 2012 and recreate our favourite Visual Studio 2010 themes for it.

    Read the article

  • APress Deal of the Day - 1/June/2012 - Introducing Visual C# 2010

    - by TATWORTH
    Today's $10 Deal of the Day from APress at http://www.apress.com/9781430231714 is Introducing Visual C# 2010."If you're new to C# programming, this book is the ideal way to get started. Respected author Adam Freeman guides you through the C# language by carefully building up your knowledge from fundamental concepts to advanced features." Adam Freeman is an excellent author. This is an excellent introduction to C# programming and a manual for those with experience. Having read through book, I am very impressed by its practical approach to C#. I cannot improve on the by-line "Get started on your C# journey with an expert by your side leading by example" Adam Freeman teaches C# by precept and example. I suspect he drives a Volvo C30 as it comes up in many of the code examples! Throughout the book there are numerous links back and forth so as to avoid over complicating the current topic. I have have no hesitation in recommending this book both to programmers starting out with C# and to the seasoned professional. It is a book that should be on every C# development team's book shelf.

    Read the article

  • SQL Injection – Beyond the Basics - A good article

    - by TATWORTH
    At http://www.sqlmag.com/content1/topic/sql-injection-basics-142364/catpath/sql-server/utm_source/feedburner/utm_medium/feed, there is an excellent article on the measures needed to defeat SQL Injection Attack. Read the article but also remember that the account the application uses to access the database adhere to the following points:NEVER EVER use the sa account even in development.Route access via a role on the database.The account should have the minimum privilege required for the job.The account should have no access whatsoever to any other database not required by the application.If you can avoid mixed mode authentication do so and grant access via to a windows group to which you add users.

    Read the article

  • setting up my own name server

    - by mmokh
    I'm in the process of setting up my own name servers using BIND9, however I want to visualize the name server setup in relation to registrars and other name servers. Say I have a domain www.mydomain.com I setup my 2 name servers: ns1.mydomain.com - 192.168.0.1 ns2.mydomain.com - 192.168.0.2 1) How does the world know that my name servers are now at ns1.mydomain and ns2.mydomain. I read about setting up glue records at my registrar. Could you please elaborate on this, i.e. once i setup these glue records, can I now use my name servers in NS records for any other domain? For e.g. NS records for www.otherdomain.com - ns1.mydomain.com/ns2.mydomain.com 2) Given I setup the glue records as mentioned above, do I "have to" update mydomain.com NS records to point to my name servers? Can I keep mydomain.com NS records pointing to my registrars name servers, however use ns1.mydomain.com/ns2.mydomain.com as name servers for any other domain I own? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >