Daily Archives

Articles indexed Monday May 17 2010

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

  • PyQt4: Why does Python crash on close when using QTreeWidgetItem?

    - by Rini
    I'm using Python 3.1.1 and PyQt4 (not sure how to get that version number?). Python is crashing whenever I exit my application. I've seen this before as a garbage collection issue, but this time I'm not sure how to correct the problem. This code crashes: import sys from PyQt4 import QtGui class MyWindow(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) self.tree = QtGui.QTreeWidget(self) self.setCentralWidget(self.tree) QtGui.QTreeWidgetItem(self.tree) # This line is the problem self.show() app = QtGui.QApplication(sys.argv) mw = MyWindow() sys.exit(app.exec_()) If I remove the commented line, the code exits without a problem. If I remove the 'self.tree' parent from the initialization, the code exits without a problem. If I try to use self.tree.addTopLevelItem, the code crashes again. What could be the problem?

    Read the article

  • How to extract valid email from larger string in Scala

    - by luigi-prog
    My scala version 2.7.7 Im trying to extract an email adress from a larger string. the string itself follows no format. the code i've got: import scala.util.matching.Regex import scala.util.matching._ val Reg = """\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b""".r "yo my name is joe : [email protected]" match { case Reg(e) => println("match: " + e) case _ => println("fail") } the Regex passes in RegExBuilder but does not pass for scala. Also if there is another way to do this without regex that would be fine also. Thanks!

    Read the article

  • Ruby ROXML - how to get an array to render its xml?

    - by Brian D.
    I'm trying to create a Messages object that inherits Array. The messages will gather a group of Message objects. I'm trying to create an xml output with ROXML that looks like this: <messages> <message> <type></type> <code></code> <body></body> </message> ... </messages> However, I can't figure out how to get the message objects in the Messages object to display in the xml. Here is the code I've been working with: require 'roxml' class Message include ROXML xml_accessor :type xml_accessor :code xml_accessor :body end class Messages < Array include ROXML # I think this is the problem - but how do I tell ROXML that # the messages are in this instance of array? xml_accessor :messages, :as => [Message] def add(message) self << message end end message = Message.new message.type = "error" message.code = "1234" message.body = "This is a test message." messages = Messages.new messages.add message puts messages.length puts messages.to_xml This outputs: 1 <messages/> So, the message object I added to messages isn't getting displayed. Anyone have any ideas? Or am I going about this the wrong way? Thanks for any help.

    Read the article

  • ASP.NET GridView "Client-Side Confirmation when Deleting" stopped working on ie - how come?

    - by tarnold
    A few months ago, I have programmed an ASP.NET GridView with a custom "Delete" LinkButton and Client-Side JavaScript Confirmation according to this msdn article: http://msdn.microsoft.com/en-us/library/bb428868.aspx (published in April 2007) or e.g. http://stackoverflow.com/questions/218733/javascript-before-aspbuttonfield-click The code looks like this: <ItemTemplate> <asp:LinkButton ID="deleteLinkButton" runat="server" Text="Delete" OnCommand="deleteLinkButtonButton_Command" CommandName='<%# Eval("id") %>' OnClientClick='<%# Eval("id", "return confirm(\"Delete Id {0}?\")") %>' /> </ItemTemplate> Surprisingly, "Cancel" doesn't work no more with my ie (Version: 6.0.2900.2180.xpsp_sp2_qfe.080814-1242) - it always deletes the row. With Opera (Version 9.62) it still works as expeced and described in the msdn article. More surprisingly, on a fellow worker's machine with the same ie version, it still works ("Cancel" will not delete the row). The generated code looks like <a onclick="return confirm(...);" href="javascript:__doPostBack('...')"> As confirm(...) returns false on "Cancel", I expect the __doPostBack event in the href not to be fired. Are there any strange ie settings I accidentally might have changed? What else could be the cause of this weird behaviour? Or is this a "please reinstall WinXP" issue?

    Read the article

  • Difference of two series in MySQL

    - by Brian
    I have a table with the following fields in MySQL: date, Value, Type. Type can be either exports or imports. I want a query that returns the trade deficit (exports-imports) for each month. Is this possible with a single query?

    Read the article

  • PerThreadLifetimeManager in Unity

    - by DorianGrey
    Hi, In the Unity PerThreadLifetimeManager documentation, I read that: "This lifetime manager does not dispose the instances it holds". Ref.: http://msdn.microsoft.com/en-us/library/ff647854.aspx So, if I am using a ThreadPool, does it mean that objects resolved using Unity on a Thread of the ThreadPool will not get disposed at the end of the work done in that thread before being returned to the pool? Any pattern or ideas how I can ensure that the objects do get disposed & I get a clean thread from the thread pool? Thanks!

    Read the article

  • DataContract Known Types - passing array

    - by Erup
    Im having problems when passing an generic List, trough a WCF operation. In this case, there is a List of int. The example 4 is described here in MSDN. Note that in MSDN sample, is described: // This will serialize and deserialize successfully because the generic List is equivalent to int[], which was added to known types. Above, is the DataContract: [DataContract] [KnownType(typeof(int[]))] [KnownType(typeof(object[]))] public class AccountData { [DataMember] public object accNumber1; [DataMember] public object accNumber2; [DataMember] public object accNumber3; [DataMember] public object accNumber4; } In client side, Im calling the operation like this: DataTransfer.Service.AccountData data = new DataTransfer.Service.AccountData() { accNumber1 = 100, accNumber2 = new int[100], accNumber3 = new List<int>(), accNumber4 = new ArrayList() }; cService.AddAccounts(data); Also, here is the decorations of the generated AccountData obj (WCF proxy): [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="AccountData", Namespace="http://schemas.datacontract.org/2004/07/DataTransfer.Service")] [System.SerializableAttribute()] [System.Runtime.Serialization.KnownTypeAttribute(typeof(DataTransfer.Client.CustomerServiceReference.PurchaseOrder))] [System.Runtime.Serialization.KnownTypeAttribute(typeof(DataTransfer.Client.CustomerServiceReference.Customer))] [System.Runtime.Serialization.KnownTypeAttribute(typeof(int[]))] [System.Runtime.Serialization.KnownTypeAttribute(typeof(object[]))]

    Read the article

  • Is it possible to hide the dock icon programmatically

    - by Unicorn
    Is it possible to hide dock icon programmatically on demand. I know one way by which defining property "Application is agent (UIElement)" in plist we make the cocoa app as user agent. But this result in hiding the dock icon permanently. I am looking for a way where i can control visibility of dock icon. Any idea ?

    Read the article

  • BCS with Visual Studio 2010

    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). This feed URL has been discontinued. Please update your reader's URL to : http://feeds.feedburner.com/winsmarts Read full article .... ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Column locking in innodb?

    - by mingyeow
    I know this sounds weird, but apparently one of my columns is locked. select * from table where type_id = 1 and updated_at < '2010-03-14' limit 1; select * from table where type_id = 3 and updated_at < '2010-03-14' limit 10; the first one would not finish running, while the second one completes smoothly. the only difference is the type_id Thanks in advance for your help - i have an urgent data job to finish, and this problem is driving me crazy

    Read the article

  • CodePlex Daily Summary for Sunday, May 16, 2010

    CodePlex Daily Summary for Sunday, May 16, 2010New Projects3D Calculator: 3D Calc is a simple calculator application for Windows Phone 7, the purpose of this project is to demo the 3D animations capabilities of WP7 and sh...azaleas: AzaleasBlueset Studio Opensource Projects: Only for Opensource projects form Blueset Studio.Breck: A Phoenix and Jumper Moneky Production: Breck is a first person non-violent shooter developed in C++ and Dark GDK. After the main game is developed we are looking into making a sequel or...Discuz! Forum SDK: This project is use to login in and post or reply topic on discuz forum.Dominion.NET: Evolving Dominion source code originally written in VB6 and posted by "jatill" on Collectible Card Game Headquarters. Migration of the design and s...EkspSys2010-ITR: A mini project for the course Experimental System devolopment in spring 2010Facebook Graph Toolkit: This project is a .Net implementation of the Facebook Graph API. The aim of this project is to be a replacement to the existing Facebook Toolkit (h...iFree: This is a solution for Vietnamese network socialInfoPath Editor for Developer: InfoPath Editor for developer allows user to modify the html text directly inside InfoPath designer or filler and push the change back to InfoPath ...iZeit: Run your own online calendar, with blog integration, recurrence, todo list and categories.machgos dotNet Tests: Just some little test-projects for learningmim: TBAMinePost: MinePost is a game made for the first 48 hour Reddit Game Jam.Mockina: Mockina is a mock framework. Expression tree syntax is used to specify which members to mock, both public and non-public. The code is easy to under...MSBuild Launch Pad (mPad): This is just another shell extension for MSBuild to enable quick execution of MSBuild scripts via Windows Explorer context menu. (C) 2010 Lex LiPeacock: A browser like tabbed applicationPrimeCalculation: PrimeCalculation is a .NET app to calculate primes in a given range. Speed on Core2Duo 2,4GHZ: Found all primes from 0 to 1 billion in 35 seconds (...Slightly Silverlight: A Framework that leverages Silverlight for processing, business logic but standard HTML for the presentation layer.Stopwatch: Stopwatch is a tool for measuring the time. To start and pause stopwatch you only need to press a key on the keyboard. An additional context menu a...YAXLib: Yet Another XML Serialization Library for the .NET Framework: YAXLib is an XML Serialization library which helps you structure freely the XML result, choose among private and public fields to be serialized, an...New ReleasesActivate Your Glutes: v1.0.3.0: This release is a migration to VS2010, .Net 4, MVC2 and Entity Framework 4. The code has also been considerably cleaned up - taking advantage of E...AnyCAD: AnyCAD.Free.ENU.v1.1: http://www.anycad.net Modeling •2D: Line, Rectangle, Arc, Arch, Circle, Spline, Polygon •Feature: Extrude, Loft, Chamfer, Sweep, Revol •Boolean: ...Blueset Studio Opensource Projects: 多功能计算器 3.5: 稳定版本。Code for Rapid C# Windows Development eBook: LLBLGen LINQPad Data Context Driver Ver 1.0.0.0: First release of a Static LLBLGen Pro Data Context Driver for LINQPad I recommend LINQPad 4 as it seems more stable with this driver than LINQPad 2.DSQLT - Dynamic SQL Templates: Release 1.2. Some behaviour has changed!!: Attention. Some behaviour has changed! Now its necessary to use WildCards in the pattern-parameter for DSQLT.AllSourceContains DSQLT.Databases DSQ...FDS AutoCAD plug-in: FDS to AutoCAD plug-in: Basic functionality was implemented. Some routines like setting fds executable location are still not automated.Feature Builder Guidance Extensions: FBGX 2 - Standalone FX: Background: The Feature Builder Guidance is extensible and displays guidance content supplied by all the Feature Builder Guidance Extensions (FBGX...Floe IRC Client: Floe IRC Client 2010-05 R3: - You can now right click on the input box to get options for toggling bold, underline, colors, etc. - The size of the nickname column is now saved...Floe IRC Client: Floe IRC Client 2010-05 R4: - A user's channel status now appears next to their nick when they talk (e.g. @Nick or +Nick) - Fixed an error where certain kinds of network probl...HD-Trailers.NET Downloader: HD-Trailers.NET Downloader v1.0: Version 1.0 Thanks to Wolfgang for all his help. I let this project languish for too long while focusing on other things, but his involvement has ...InfoPath Editor for Developer: InfoPath Editor Beta 1: Intial Release: Can load InfoPath inner html. Can edit InfoPath inner html. InfoPath 2007 only.LinkSharp: LinkSharp 0.1.0: First release of LinkSharp. Set up iis, and use the sql script to create a new database.PowerAuras: PowerAuras V3.0.0F: This version adds better integration with GTFO New Flags Added PvP flag In 5-Man Instance In Raid Instance In Battleground In ArenaRx Contrib: V1.4: Add the ability to catch internal exception and the ability to publish error by queue adaptersSEO SiteMap: SEO SiteMap RC1: -SevenZipLib Library: v9.13.2: Stable release associated with 7z.dll 9.13 beta. Ability to create and update archives not implemente yet.Silverlight / WPF Controls: Upload, FlipPanel, DeepZoom, Animation, Encryption: Code Camp Demonstration: This code example demonstrates MVVM/MEF with WPF with attached properties,security and custom ICommand class.SQL Data Capture - Black Box Application Testing: SQLDataCapture V1.2: Added Entity Framework Support to CRUD generator (Insert Stored Procedure) and switched to VS 2010 for development.Stopwatch: Stopwatch 0.1: Stopwatch Release 0.1VCC: Latest build, v2.1.30515.0: Automatic drop of latest buildYet another developer blog - Examples: Asynchronous TreeView in ASP.NET MVC: This sample application shows how to use jQuery TreeView plugin for creating an asynchronous TreeView in ASP.NET MVC. This application is accompani...Most Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)patterns & practices – Enterprise LibraryMicrosoft SQL Server Community & SamplesPHPExcelASP.NETMost Active Projectspatterns & practices – Enterprise LibraryRawrPHPExcelBlogEngine.NETMicrosoft Biology FoundationCustomer Portal Accelerator for Microsoft Dynamics CRMWindows Azure Command-line Tools for PHP DevelopersMirror Testing SystemN2 CMSStyleCop

    Read the article

  • JMX Based Monitoring - Part Two - JVM Monitoring

    - by Anthony Shorten
    This the second article in the series focussing on the JMX based monitoring capabilities possible with the Oracle Utilities Application Framework. In all versions of the Oracle utilities Application Framework, it is possible to use the basic JMX based monitoring available with the Java Virtual Machine to provide basic statistics ablut the JVM. In Java 5 and above, the JVM automatically allowed local monitoring of the JVM statistics from an approporiate console. When I say local I mean the monitoring tool must be executed from the same machine (and in some cases the same user that is running the JVM) to connect to the JVM directly. If you are using jconsole, for example, then you must have access to a GUI (X-Windows or Windows) to display the jconsole output. This is the easist way of monitoring without doing too much configration but is not always practical. Java offers a remote monitorig capability to allow yo to connect to a remotely executing JVM from a console (like jconsole). To use this facility additional JVM options must be added to the command line that started the JVM. Details of the additional options for the version of the Java you are running is located at the JMX information site. Typically to remotely connect to a running JVM that JVM must be configured with the following categories of options: JMX Port - The JVM must allow connections on a listening port specified on the command line Connection security - The connection to the JVM can be secured. This is recommended as JMX is not just a monitoring protocol it is a managemet protocol. It is possible to change values in a running JVM using JMX and there are NO "Are you sure?" safeguards. For a Oracle Utilities Application Framework based application there are a few guidelines when configuring and using this JMX based remote monitoring of the JVM's: Online JVM - The JVM used to run the online system is embedded within the J2EE Web Application Server. To enable JMX monitoring on this JVM you can either change the startup script that starts the Web Application Server or check whether your J2EE Web Application natively supports JVM statistics collection. Child JVM's (COBOL only) - The Child JVM's should not be monitored using this method as they are recycled regularly by the configuration and therefore statistics collected are of little value. Batch Threadpoools - Batch already has a JMX interface (which will be covered in another article). Additional monitoring can be enabled but the base supported monitoring is sufficient for most needs. If you are an Oracle Utilities Application Framework site, then you can specify the additional options for JMX Java monitoring on the OPTS paramaters supported for each component of the architecture. Just ensure the port numbers used are unique for each JVM running on any machine.

    Read the article

  • Will .Net 4.0 include a new CLR or keep with version 2.0

    - by Rory Becker
    Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10 and .Net 4.0 so this may very soon not be the case. (Info available here - http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx)

    Read the article

  • best-practice to display flash on Iphone / Ipad ?

    - by terrani
    Hi, I have a website that uses flash. I would like to convert the website so that iphone / ipad users can see my website. I understand that Iphone / Ipad can't render flash. What would be the best-practice to convert flash website to iphone / ipad compatible? I am thinking HTML 5.

    Read the article

  • More complex view matrix calculation required to composite 3d models with 2d video

    - by lzcd
    I'm utilising some 2d / 3d tracking data (provided by pfHoe) to help integrate some 3d models into the playback of some 2d video. Things are working.... okay... but there's still some visible 'slipping' of the models against the video background and I suspect this is may be because the XNA CreatePerspective helper method isn't taking into account some of the additional data supplied by pfHoe such as independent horizontal / vertical field of view angles and focal length. Would anyone be able to point me towards some examples of constructing view matrices that include such details?

    Read the article

  • Placing PHP array values into a javascript array?

    - by Michael Harringon
    Is these a way i can loop through a PHP array and have the data outputted into a JavaScript array? For example, the JS script below will not work var mon_Loop = <?php echo $rowCount_Mon ?>; var mon_Events = new Array(); for(i = 0; i < mon_Loop; i++) { mon_Events[i] = <?php $divMon[i] ?> } I Know its because the "i" is not a php variable so therefore invalid inside the php section, but its just an way to show what i would like to achieve. The $rowCount variable count the number of rows and is then used to for the loop. Lets say, for example that I want to place the contents of the PHP array "$divMon[0]" into the javascript array mon_Events[0]. I know that i can do it manually, like below mon_Events[0] = <?php echo $divMon[0] ?> But i have lots of these and therefore need the loop, Is there some JS or PHP that could do this? Cheers.

    Read the article

  • Restoring a "Canceled" event with Google Calendar API?

    - by user283182
    I'm trying to change the status of an event back from "canceled" to "confirmed" using Google Calendar API (I'm using .NET but an answer in any language would help) but I get GDataRequestException error: "You can't modify a cancelled event" If I've used the API to delete an event in a repeating series, for example, is it possible to change the status of the resulting recurrence exception (there's no EXDATE, just a new "canceled" event that is only visible when the feed is requested with start and end date) to "confirmed" (or even delete the resulting exception completely) in order to restore the repeating series to the original state? event.Delete() and event.Update() don't even see the event any longer once it's been .canceled. event.Update() gives the above error. Thanks!

    Read the article

  • Column locking in innodb?

    - by ming yeow
    I know this sounds weird, but apparently one of my columns is locked. select * from table where type_id = 1 and updated_at < '2010-03-14' limit 1; select * from table where type_id = 3 and updated_at < '2010-03-14' limit 10; the first one would not finish running even in a few hours, while the second one completes smoothly. the only difference is the type_id between the 2 queries. a bit of background, the first statement screwed up before which i had to kill manually. Thanks in advance for your help - i have an urgent data job to finish, and this problem is driving me crazy

    Read the article

  • The database engine couldn't lock the table, because it is already in use by another person or proce

    - by tintincute
    Hi I tried to do "Split a Database" and after I clicked on the "Split" button, here is what I got: "The database engine couldn't lock the table, because it is already in use by another person or process" Any idea? Thanks additional question: is it possible to split your database many times? first i'm trying it at home and the following day i would like to try it at the office if it works. i already tried the split and if i do it tomorrow at the office would that be a problem? Thanks

    Read the article

  • Adding a searchbar to display array items on a tableview?

    - by skiria
    I want to build an app that shows a empty tableview. Then users can write a text on a searchbar and when they click on Search button the tableview will be written with array items founded. I've see this tutorial: link text, but I only need to search when user click SearchButton. How can I do this? What methods do i have to use? I've tried with this method, but it doesn't works. - (void) searchBarSearchButtonClicked:(UISearchBar *)theSearchBar { NSInteger nVideos = [appDelegate.allVideos count]; NSLog(@"number of videos: %i", nVideos);

    Read the article

  • Question about A Sketching Website on the IPAD, Dragging and Touching

    - by pfunc
    I've been testing out the new functionality of html5 and js to create a sketching site. I've been looking into this for a possible client that wants their site to be ipad accessible, but also have drawing features on it. So i created a rough experiment where you can drag your mouse across a screen to draw lines. I went to test it on an ipad and realized this doesn't work. Why? because dragging on an ipad is reserved for actually dragging the screen around. Is there something you can do to get around this? I'm sure this could be done if made for an app, but what about just a normal website.

    Read the article

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