Daily Archives

Articles indexed Sunday April 25 2010

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

  • Get class of caller's method (via inspect) in Python; or: super(Class,self).method() replacement wit

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • Question about Client IDs

    - by George
    I have a user control that is emmitting javascript using the ClientId function. For example: Out &= "ValidatorHookupControlID(" & Quote & ddlMonth.ClientID & Quote & "), document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf It appears to me that the ClientID function DOES not return the ultimate ID that is sent to the browser. Instead, the ClientID function only appears to be aware of its current parent control, which in this case is a the User Control and so the ID that is returned is the ID "dtmPassportExpirationDate_ddlMonth" When in fact the usercontrol is included in a master page and the ultimate ID that is used is: "ctl00_phPageContent_dtmPassportExpirationDate_ddlMonth" I may be nuts, but that's what it appears to be doing. I expect that the ClientID function would return the ultimate ID used in the HTML. Am I missing something?

    Read the article

  • Swingworker producing duplicate output/output out of order?

    - by Stefan Kendall
    What is the proper way to guarantee delivery when using a SwingWorker? I'm trying to route data from an InputStream to a JTextArea, and I'm running my SwingWorker with the execute method. I think I'm following the example here, but I'm getting out of order results, duplicates, and general nonsense. Here is my non-working SwingWorker: class InputStreamOutputWorker extends SwingWorker<List<String>,String> { private InputStream is; private JTextArea output; public InputStreamOutputWorker(InputStream is, JTextArea output) { this.is = is; this.output = output; } @Override protected List<String> doInBackground() throws Exception { byte[] data = new byte[4 * 1024]; int len = 0; while ((len = is.read(data)) > 0) { String line = new String(data).trim(); publish(line); } return null; } @Override protected void process( List<String> chunks ) { for( String s : chunks ) { output.append(s + "\n"); } } }

    Read the article

  • C# locale-aware MaskedTextBox mask for DateTime values

    - by Timothy
    C# locale-aware MaskedTextBox mask for DateTime values I'm working through FXCop/Code Analysis's Globalization warnings and would like to know the proper, locale-aware way to set and get DateTime values through a MaskedTextBox. My form has a MaskedTextBox element with its Culture property set to "en-US", and its Mask property set to "00/00/0000" (the predefined Short date format). maskedTextBox.Text = now.ToString() displays without leading-zeros as "42/42/010_", yet I would like it to be represented as "04/24/2010".

    Read the article

  • Java Swing: how to add an image to a JPanel ?

    - by Leonel
    I have a JPanel to which I'd like to add JPEG and PNG images that I generate on the fly. All the examples I've seen so far in the Swing Tutorials, specially in the Swing examples use ImageIcons. I'm generating these images as byte arrays, and they are usually larger than the common icon they use in the examples, at 640x480. Is there any (performance or other) problem in using the ImageIcon class to display an image that size in a JPanel ? What's the usual way of doing it ? How to add an image to a JPanel without using the ImageIcon class ? Edit: A more careful examination of the tutorials and the API shows that you cannot add an ImageIcon directly to a JPanel. Instead, they achieve the same effect by setting the image as an icon of a JLabel. This just doesn't fill right...

    Read the article

  • How to copy the shipping address to billing address

    - by Jerry
    Hi all I like to know if I can copy the shipping address to billing address. I got most of the parts done but I am not sure how to copy select menu (states) value to billing address. I really appreciate any helps. My code $(document).ready(function(){ Jquery $('#same').click(function(){ if($('#same').attr('checked')){ $('#bfName').val($('#fName').val()); $('#blName').val($('#lName').val()); $('#baddress1').val($('#address1').val()); $('#baddress2').val($('#address2').val()); $('#bcity').val($('#city').val()); alert(($('#state option:selected').val())); //not sure what to do here $('#bzip').val($('#zip').val()); }; }); Html <td><select name="state"> //shipping states......only partial codes. <option value="">None <option value="AL">Alabama <option value="AK">Alaska <option value="AZ">Arizona <option value="AR">Arkansas <option value="CA">California <option value="CO">Colorado <option value="CT">Connecticut </select></td> <td><select name="bstate"> //billing state................only partial codes. <option value="">None <option value="AL">Alabama <option value="AK">Alaska <option value="AZ">Arizona <option value="AR">Arkansas <option value="CA">California <option value="CO">Colorado <option value="CT">Connecticut </select></td> Thanks a lot!

    Read the article

  • Parsing special strings within a text (eg. "%var%") ?

    - by RadiantHex
    Hi, I am supplying a Javascript function strings with commands (SVG path commands): eg. "move 10 10 line 50 50" move and line are commands numbers are x, y coordinates I would like to add special strings to these commands, that would instruct the function to use specific variables eg. "move %mouseX%+1 %mouseY%+1" where %mouseX% and %mouseY% would be the mouse x,y coordinates How can I parse and replace these?

    Read the article

  • Doctrine: Multiple (whereIn OR whereIn) query?

    - by Tom
    I'm having trouble crafting a fairly simple query with Doctrine... I have two arrays ($countries, $cities) and I need to check whether database record values would match any inside either. I'm looking for something like: ->whereIn('country', 'city', $countries, $cities) ... with 'country' being a WHERE IN for $countries and 'city' being a WHERE IN for $city. I could separate the two out but the needed query has lots of other conditions so that's not possible. The resulting SQL I'm after would be: SELECT ... WHERE ... AND ... AND ... AND ('country' IN (1,2,3) OR 'city' IN (7,8,9)) AND ... AND ...; One could therefore think of it also as a bracketing issue only. Anyone know if this is possible with Doctrine DQL? I've looked through the documentation but can't find any direction. Thanks

    Read the article

  • Get Object ID of UI element from code.

    - by andoriyu.mp
    I'm trying link 40 buttons to one event handler method and then do the processing work from one method instead of 40. I know how to link it but once I get there I don't know how to distinguish what button was pressed. Does anyone know how to reference the button object sender id or is there another way to solve this problem? Any help would be greatly appreciated.

    Read the article

  • Site to Site VPN with ISA 2006 to a Dyndns Hostname?

    - by Klaus
    Hi all, i would like to create a site-to-site VPN between my ISA 2006 and a DLink router on the other side. My ISA got a fixed external IP Address, but the Dlink only has a dynamic one. So it makes use of DynDNS. Every "cheap router" supports making VPNs to a hostname. But in ISA 2006 I have to enter a IP Address in the VPN settings. Is there any way to create the VPN connection to a Hostname? Thank you for answers! Kind regards, Klaus

    Read the article

  • CodePlex Daily Summary for Saturday, April 24, 2010

    CodePlex Daily Summary for Saturday, April 24, 2010New ProjectsAutoWorkLoad: Is an application intended to load hours to accounting system such as TimeTracker automatically.Chemistry Add-in for Word: The Chemistry Add-in for Word makes it easier for students, chemists, and researchers to insert and modify chemical information, such as labels, fo...Exceptional Visualizer: A Debugger Visualizer for VS 2008 that allows for effective visual tracing of an Exception stack. Useful for Unity Resolution Exceptions as seen i...FTE Owner Requirement: FIM 2010 Activity: Forefront Identity Manager 2010 (FIM) activity designed to ensure that group object has at least one assigned Full Time Employee owner. This policy...Globus CB: Group project 2009-2010Highlighterr for Visual C++ 2010: A simple code syntax highlighter to change the colors of classes, structs, interfaces, macros and typedefs in the Visual C++ 2010 IDE. It is implem...HTML to word (.doc): easy to export your HTML code to Microsoft Word (.doc extension)IETT Hat Güzergah Importer: http://www.iett.gov.tr sitesinden otobüs hat ve güzergahlarını indirerek RegEx ile parse eder. Elde ettiği verileri SQL Server'a kaydeder.Industrial Dashboard: WCF service that allows executing SQL Server stored procedures straight from javascript code, enabling sending and receiving structured data withou...iSafePDF: iSafePDF is a PDF protection software. it allows you to encrypt PDF document, signe them using a certificate and timestamp the signature. all those...Kordinat Dönüştürücü: * UTM Koordinatlardan DDD koordinatlara iki yönlü dönüşüm. * Google Earth üzerinde koordinat, polygon ve ruhsat gösterimi. * Türkiye Paftalarının...LinkedIn® for Windows Mobile: LinkedIn® for Windows Mobile brings your LinkedIn® account to your Window Mobile powered phone. See networkupdates / connections / profile etc. Macrosome: An F# project demonstrates recording and replaying user operations.Markov Text Generator: Markov Text Generator.MEFedMVVM: Library for building MEF MVVM applications for Silverlight and WPF. By using this library you can easily build MVVM application. *UNDER Constructi...Mercurial to Team Foundation Server Work Item Hook: This is a Mercurial hook that will mark Team Foundation Server work items as resolved with a specific format in the commit description.Metaball WPF HLSL: Metaballs in WPF 3 with pixel shaders.Project Audiophile: Project Audiophile is a suite of applications and libraries built for .Net and Mono for the purposes of listening and organising music.RSS Application Updater: A Libbrary that helps you to update your app from your web site's feed. works very good with drupal .Sherwood Content Management Suite: A project that aims to provide a powerful and flexible tool for aggregating data from different data sources. Add your own plugins to store wanted ...Sonic.Net: Sonic.Net is a .Net Library designed to facilitate development of rich client applications both in Silverlight and WPF. Sonic.Net makes use of all ...StoichiometriCS: Stoichiometric Chemical Equation Solver.Vate Game Engine: Vate is a new XNA Game Engine. For more information about this project, please visit http://blog.aphysoft.com.Yahoo OpenID YQL Demo: This is demo program how to use Yahoo OpenID and Yahoo Query Language (YQL)New ReleasesBasic Sprite Sheet Creator: Sprite Tool V1.11: I had a small error when using multiple animations without the one pixel border that I overlooked when rewriting the code. It should be completely ...Braintree Client Library: Braintree-2.0.0: Updated IsSuccess() on transaction results to return false on declined transactions Search results now implement IEnumerable and will automatical...BV Commerce 5 Import Export Tools: Version 5.7.0 (for BV Commerce 5.7): Updated version compatible with BV Commerce 5.7. Do not use on earlier versions.Chemistry Add-in for Word: Chemistry Add-in for Word Beta 2: This is the source code release of the Chemistry Add-in for Word Beta 2. System Requirements To run this software, you’ll need the following: Wind...Controlled Vocabulary: 1.0.0.5: System Requirements Outlook 2007 / 2010 .Net Framework 3.5 VSTO 2010 Runtime Installation 1. Close Outlook (Use Task Manager to ensure no running ...DotNetNuke® Store: 02.01.33 RC: What's New in this release? Bugs corrected: - Fixed a bug related to encryption cookie. New Features: - Adden token pair [IFLOGGED] [/IFLOGGED] us...EdiliOS: Beta 0.2.1: Aggiunto supporto a FidoCadJ, editor FidoCad multipiattaforma di Davide Bucci, con Libreria di Ingegneria Civile integrata.Event Scavenger: Admin tool Version 3.1.1: Fixed the Admin tool that fails on editing general settings. Only Admin tool is affected.Exceptional Visualizer: Exception Visualizer: A Debugger Visualizer to help with long chains of exceptions where digging through the inner exceptions is hard to do. Specifically, this release ...fracback: Binaries: Use at your own riskFree Silverlight & WPF Chart Control - Visifire: Visifire for SL 4 and WPF Charts 3.5.1 Released: Hi, This release contains fix for the following bug: Chart threw exception with DateTime axis if IntervalType property was set as ‘Minutes’ in Ax...Free Silverlight & WPF Chart Control - Visifire: Visifire Silverlight and WPF Charts 3.0.8 Released: Hi, This release contains fix for the following bug: * Chart threw exception with DateTime axis if IntervalType property was set as ‘Minutes’...GeoUtility Library: GeoUtility Library 3.1.5.0: Please Note: This is an open source version. The commercial version offers much more functionality. Help files (english/german) are only available ...Highlighterr for Visual C++ 2010: Highlighterr for Visual C++ 2010 Test Release 1.0: To install the extension, download the and then double-click on the Highlighterr.vsix file. This should bring up a dialog saying something about wh...Highlighterr for Visual C++ 2010: Highlighterr for Visual C++ 2010 Test Release 1.01: The lack of support for /* */ comments was annoying me, so I added it. To install the extension, download the and then double-click on the Highlig...Home Access Plus+: v4.0.1.0: v4.0.1.0 Beta Change Log: Fixed an issue with laptops and the booking system (CSS and code fixes) Moved filters to top Added some Javascript to...HTML to word (.doc): FullSourceDownload: the full source contain: bin/AppWebdx7wusqu.dll Default.aspx htw.ascx htw.ascx.vb Web.configIndustrial Dashboard: 3.0 Beta: Added Example with Dojox.DataGrid Added Example with Ext.js ChartiSafePDF: iSafePDF v1.2: This is the first public release, this version support : PDF signature, timestamped signature, multi-signature, PDF encryption and meta-data modifi...linq.js - LINQ for JavaScript: ver 2.0.0.0: all code rewrite from scratch. enumerator support Dispose. namespace changed E, Linq.Enumerable -> Enumerable delete methods ToJSON ToTable Trace...LogikBug's IoC Container: Third Release: This project is dependent upon Microsoft.Practices.ServiceLocation and must be referenced when referencing LogikBug.Injection. Click here to view d...Macrosome: 0.0.1 preview: Key pointsOnly mouse clicks supported Just for preview: not stable How to useStart from Macrosome.Wpf.exe Click "Record" button will start oper...Mercurial to Team Foundation Server Work Item Hook: Version 0.1: This is the first version of the Mercurial to Team Foundation Server hook. It currently supports only adding comments to existing work items.MOSSDAL: MOSS Data Access Layer for data from the Sharepoint Lists Service: MOSSDAL Silverlight Framework Release 1: This is the first release of MOSSDAL for silverlight. For the MOSSDAL Framework for .NET release 1 click hereMOSSDAL: MOSS Data Access Layer for data from the Sharepoint Lists Service: MOSSDAL Silverlight Sample Release 1: This is the first release of the MOSSDAL framework samples for Silverlight. For the MOSSDAL .NET Release 1 Sample click hereMyWSAT - ASP.NET Membership Administration Tool: MyWSAT v3.5.1: MyWSAT 3.5.1 Update Notes - April 23rd 2010 1.) Fixed standard profile problem in web.config as well as on all the forms the profiles are used. The...NetPE: NetPE v1.0: Initial Release of NetPE. Features: -View & Editing Portable Executable -Hex editor -Full Metadata Support -Disassemble Cil/x86 codeNSIS Autorun: NSIS Autorun 0.1.1: NSIS Autorun 0.1.1 This release includes source code, application binary, and example materials.Over Store: OverStore Release 1.17.0.0: Version 1.17.0.0 - AdoNetStorage: AdoNetStorage refactored. Detailed Log messages added on each event. Database resource management moved to A...RoTwee: RoTwee (11.0.0.3): Fix for "17385 Remove saved degree val from code"Silverlight 4.0 Popup Menu: Popup Menu for Silverlight 4.0: This is the first project release. Added drop shadow and fade in effects. Left click and hover events are also supported.Silverlight 4.0 Popup Menu: Popup menu for Silverlight 4.0 Version 0.8: - Placed the invoker for the 'Opening' event handler within a dispatcher. This ensures that the visual tree is created before it is accessed.sNPCedit: sNPCedit v0.9: + Some changes in GUI and Behaviour + Added: Search functionSonic.Net: Sonic.Net v1.0.0: Sonic.Net v1.0.0 Targets Net 3.5 sp1 and Sinverlight 3 Includes: sonic.UnityConfiguration.Silverlight sonic.UnityConfiguration.WpfSurvey - web survey & form engine: Survey™ 1.2.1: Survey™ 1.2.1 release (based on the original Nsurvey 1.9.1. source files) New Features & fixes: 1. Final bits of code rewritten to become 100% ...SysPad: 4.10.10.2: Release Notes A folder management and scratchpad utility; especially useful in a business network setting that utilizes numerous, commonly used fol...Third Hand - Use your voice to control Visual Studio: Update for VS2010: Added support for VS2010, and minor improvements when using the grid.TiledLib: TiledLib 1.2: - Added overload of Map.Draw that specifies the area to draw - Added demo of a camera control for a mapXMLPreprocess: 2.0.12: What's new in this release: This release contains a number of enhancements based on feedback given through the discussion forums and issue tracker....Xrns2XMod: Xrns2Xmod 0.8: Added >> Real preliminary sound conversion for XM >> Some code optimizations Note Some samples might not be converted due to a flac parsing error ...Yahoo OpenID YQL Demo: Yahoo YQL .Net Demo: This is a demo program for using YQL with C#.netYahoo OpenID YQL Demo: YQL Demo: This is a demo program using Yahoo YQL with C#.NetYahoo OpenID YQL Demo: YQLDemo using .Net: This is a demo program for using Yahoo YQL with C#.NetMost Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitSilverlight ToolkitMicrosoft SQL Server Product Samples: Databasepatterns & practices – Enterprise LibraryWindows Presentation Foundation (WPF)ASP.NETMicrosoft SQL Server Community & SamplesPHPExcelMost Active Projectspatterns & practices – Enterprise LibraryRawrBlogEngine.NETParticle Plot PivotNB_Store - Free DotNetNuke Ecommerce Catalog ModuleDotNetZip LibraryGMap.NET - Great Maps for Windows Forms & Presentationturing machine simulatorIonics Isapi Rewrite Filterpatterns & practices: Composite WPF and Silverlight

    Read the article

  • Get class of caller's method (via inspect) in Python (alt: super() emulator)

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • PHP Programmer wanting to learn Spring

    - by grokker
    I'm a PHP programmer and I want to try creating a webapp using the Spring framework. The problem is I'm clueless and I don't know where to start. What tutorials/books/websites do you guys suggest that I should learn from? What's IoC? Do I use it alongside MVC? What components of the Spring framework should I use? How do I know what to use? Are there webapps created with Spring that I could study from? Thank you so much in advance! P.S. I've used Struts (1) about a year ago.

    Read the article

  • Eclipse (Aptana) Typing Lag

    - by Zack
    Hello SO, I've been using Aptana for some time now, and as of recent I've been dealing with files that are really, really big (500+ lines of code, which is huge for me, being a novice developer). Whenever I deal with smaller files, I get that weird sensation that I'm "in front of" what's typing, but now I'm quite sure of it--there is a significant lag between when I type something and when I see the text appear on screen. I don't have this issue with Dreamweaver CS3, so I know my computer has the capability to edit these files without this happening, but Eclipse still lags. I also don't see when something is being deleted if I hold down backspace, I see the first few characters get deleted, but then everything "hangs." Once I release the backspace key, the characters that would've been shown deleting instantly vanish all at once. The same thing happens with the forward delete key. I'm beginning to think this is an issue with Java, since I have the same feeling that everything is slightly "behind me" when I'm using -any- Java application. The computer is an intel Pentium 4 3.2 GHz Prescott, with 2GB's of DDR400 RAM and a Radeon HD3650 graphics card. If anyone knows how to fix this lagging issue, I'm all ears (eyes?); if anyone can recommend a different IDE with capabilities similar to Aptana (I do Python, HTML, CSS and JS; I use Git for SCM), I'd be glad to give it a try. Thanks!

    Read the article

  • Syntax for combining joins in mysql

    - by UltraVi01
    I seem to remember reading somewhere that there is a way to combine LEFT JOIN statements into a more simple query. I have the following query and was hoping someone could kindly take a look at it. SET @userId = 8; SELECT ug.user_id, COUNT(DISTINCT goal_id) as matches FROM user_goal ug, user u, profile p LEFT JOIN user_block ub ON @userId = ub.blocked_id LEFT JOIN user_block ub2 ON @userId = ub2.blocker_id LEFT JOIN user_user uu ON @userId = uu.user_id LEFT JOIN friend_request fr ON @userId = fr.user_id WHERE ug.user_id = u.id AND u.profile_id = p.id AND (ub.blocker_id IS NULL OR ub.blocker_id != ug.user_id) AND (ub2.blocked_id IS NULL OR ub2.blocked_id != ug.user_id) AND (uu.user_friends_id IS NULL OR uu.user_friends_id != ug.user_id) AND (fr.to_user_id IS NULL OR (fr.to_user_id != ug.user_id)) AND ug.user_id!=@userId AND p.suggestible AND goal_id IN (SELECT iug.goal_id FROM user_goal iug WHERE user_id=@userId) GROUP BY user_id ORDER BY matches DESC LIMIT 4

    Read the article

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