Daily Archives

Articles indexed Tuesday April 13 2010

Page 18/126 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • What's your most controversial programming opinion?

    - by Jon Skeet
    This is definitely subjective, but I'd like to try to avoid it becoming argumentative. I think it could be an interesting question if people treat it appropriately. The idea for this question came from the comment thread from my answer to the "What are five things you hate about your favorite language?" question. I contended that classes in C# should be sealed by default - I won't put my reasoning in the question, but I might write a fuller explanation as an answer to this question. I was surprised at the heat of the discussion in the comments (25 comments currently). So, what contentious opinions do you hold? I'd rather avoid the kind of thing which ends up being pretty religious with relatively little basis (e.g. brace placing) but examples might include things like "unit testing isn't actually terribly helpful" or "public fields are okay really". The important thing (to me, anyway) is that you've got reasons behind your opinions. Please present your opinion and reasoning - I would encourage people to vote for opinions which are well-argued and interesting, whether or not you happen to agree with them.

    Read the article

  • Boost Thread Specific Storage Question (boost/thread/tss.hpp)

    - by Hassan Syed
    The boost threading library has an abstraction for thread specific (local) storage. I have skimmed over the source code and it seems that the TSS functionality can be used in an application with any existing thread regardless of weather it was created from boost::thread --i.e., this implies that certain callbacks are registered with the kernel to hook in a callback function that may call the destructor of any TSS objects when the thread or process is going out of scope. I have found these callbacks. I need to cache HMAC_CTX's from OpenSSL inside the worker threads of various web-servers (see this, detailed, question for what I am trying to do), and as such I do not controll the life-time of the thread -- the web-server does. Therefore I will use the TSS functionality on threads not created by boost::thread. I just wanted to validate my assumptions before I started implementing the caching logic, are there any flaws in my logic ?

    Read the article

  • Unable to load WSDL file error in flex while making a call to a web service.

    - by Angeline Aarthi
    I am trying to call a webservice from my Flex application and this is the code: <mx:WebService id="myWebService" wsdl="http://172.16.111.103:22222/cics/services/PRESENT1?wsdl"> <mx:operation name="PRESENT1Operation" result="resultHandler(event)" fault="faultHandler(event)"> </mx:operation> </mx:WebService> //Function to send customer id to the wsdl request private function searchDetails():void{ myWebService.PRESENT1Operation.send(cusNo.text); cusDetails.visible=true; } The webservice is up and running. I have a separate Java application to test the webservice, And I am able to execute it properly. I am able to request the webservice and get response. But If I try to call the webservice through the Flex application, I get the following error. [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://172.16.111.103:22222/cics/services/PRESENT1?WSDL)"] at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:225] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Please some one help me with this.

    Read the article

  • Why doesn't SetNotifyWindowMessage() call my WndProc()?

    - by manuel
    I'm using WinForms, and I'm trying to get SetNotifyWindowMessage() to call the WndProc, but it does not do so. The function call: HRESULT initSAPI(HWND hWnd) { ... if(FAILED( g_cpRecoCtxt->SetNotifyWindowMessage( hWnd, WM_RECOEVENT, 0, 0 ))) MessageBoxW(hWnd, L"Error sending window message", L"SAPI Initialization Error", 0); ... } The WndProc: LRESULT WndProc (HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) { case WM_RECOEVENT: ProcessRecoEvent(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } Note: initSAPI() is called on a mouse click event.

    Read the article

  • show reports using graphs.

    - by user175084
    i am currently using MScharts to display information from my reports... is there a way i can display the reports in a better way.. using silverlight or something whic is free for commercial use// i want the reports to graphs to just stand out.. any suggestions?? thanks

    Read the article

  • What's an elegant way to conditionally add a class to an HTML element in a view?

    - by ryeguy
    I occasionally have to add a class to an html element based on a condition. The problem is I can't figure out a clean way of doing it. Here's an example of the stuff I've tried: <div <%= if @status = 'success'; "class='ok'"; end %>> some message here </div> OR <% if @status == 'success' %> <div class='success'> <% else %> <div> <% end %> some message here </div> I don't like the first approach because it's crowded looking and hard to read. I don't like the second approach because the nesting is screwed up. It'd be nice to put it in the model, (something like @status.css_class), but that doesn't belong there. What do most people do?

    Read the article

  • Sybase SQLAnywhere jConnect routines?

    - by jr
    I have a database which is part of a closed system and the end-user of the system would like me to write some reports using the data contains in a Sybase SQL Anywhere Database. The system doesn't provide the reports that they are looking for, but access to the data is available by connecting to this ASA database. The vendor of the software would likely prefer I not update the database and I am basically read-only as I am just doing some reporting. All is good, seal is not broken, warranty still intact, etc,etc.. My main problem is that I am using jConnect in order to read from the database, and jConnect requires some "jConnect Routines" to be installed into the database. I've found that I can make this happen by just doing an "Alter Database Upgrade JConnect On", but I just don't fully understand what this does and if there is any risks associated with it. So, my question is does anyone know exactly what jConnect routines are and how are they used? Is there any risk adding these to a database? Should I be worried about this?

    Read the article

  • BWToolkit inclusion crashing

    - by Schroedinger
    Hey guys I'm using the latest version of XCode (3.2.2) and I've linked the framework using the tutorial. I was building my app and tested it and I get a BWToolkit exception on decoding. I've included the Framework in the frameworks and added it to the copy files stage. I even created a new dummy app including the framework and adding it to the copy files stage and it still crashes when I try to run. Any ideas? Do I need to include it somewhere in the app? I'm worried I've overlooked something really simple. 2010-04-13 14:14:24.540 BWTestFramework[7504:a0f] An uncaught exception was raised 2010-04-13 14:14:24.543 BWTestFramework[7504:a0f] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (BWSplitView) 2010-04-13 14:14:24.545 BWTestFramework[7504:a0f] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (BWSplitView)' *** Call stack at first throw: ( 0 CoreFoundation 0x00007fff84a77d24 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff82ba00f3 objc_exception_throw + 45 2 CoreFoundation 0x00007fff84a77b47 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x00007fff84a77ad4 +[NSException raise:format:] + 148 4 Foundation 0x00007fff83804aa6 _decodeObjectBinary + 2427 5 Foundation 0x00007fff83805825 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 6 Foundation 0x00007fff83805d65 -[NSArray(NSArray) initWithCoder:] + 462 7 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 8 Foundation 0x00007fff83803f99 _decodeObject + 208 9 AppKit 0x00007fff8069fbfb -[NSView initWithCoder:] + 362 10 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 11 Foundation 0x00007fff83803f99 _decodeObject + 208 12 AppKit 0x00007fff806adfbb -[NSWindowTemplate initWithCoder:] + 3824 13 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 14 Foundation 0x00007fff83805825 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229 15 Foundation 0x00007fff83805268 -[NSSet(NSSet) initWithCoder:] + 447 16 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 17 Foundation 0x00007fff83803f99 _decodeObject + 208 18 AppKit 0x00007fff8062fcde -[NSIBObjectData initWithCoder:] + 1983 19 Foundation 0x00007fff83804b1f _decodeObjectBinary + 2548 20 Foundation 0x00007fff83803f99 _decodeObject + 208 21 AppKit 0x00007fff8062f40d loadNib + 146 22 AppKit 0x00007fff8062e96d +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248 23 AppKit 0x00007fff8062e7a5 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326 24 AppKit 0x00007fff8062bd27 NSApplicationMain + 279 25 BWTestFramework 0x0000000100001891 main + 33 26 BWTestFramework 0x0000000100001868 start + 52 ) terminate called after throwing an instance of 'NSException' That's the crash report

    Read the article

  • Use of FTP "append" command

    - by sahs
    I want to upload a file to a ftp server programmatically (C++). If the connection is lost while uploading a file, I wouldn't want to upload the file from scratch, but to upload only the part that I haven't sent. Does the APPE command fulfill my demand? What list of FTP commands should I use exactly? And how?

    Read the article

  • Two collections manyToOne to same primary key

    - by Ethiel
    Hi, guys, I'm coding a web page in Hibernate-JPA and Oracle. I need the following: I have two classes: Place and Home. I need two collections of type Place in every Home: I do the following: Home: @ManyToOne @JoinColumn(name="ID_PLACES") private List<Places>places1; @ManyToOne @JoinColumn(name="ID_PLACES") private List<Places>Places2; However, hibernate got an exception (repeated column) and forces to me to mapping with insert and update to false. How Can I get Two ManyToOne relationship to same primary key with insert a true?.

    Read the article

  • What user runs the git hook?

    - by Jasie
    I have a post-update hook on my server, such that when I git push it does a pull on the live web directory. However, while the push always succeeds, the post-update hook sometimes fails. The hook is pretty simple: #!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". cd /var/www env -i git pull I'm pushing updates from a variety of places, but sometimes I have to login as root on the server and manuall do a env -i git pull I only have to do it 20% of the time though. Any ideas why it would fail randomly? Thanks!

    Read the article

  • XamlParseException due to DatePicker from WPFToolKit

    - by baron
    Hello everyone, Error : UnhandledException: System.Windows.Markup.XamlParseException: '/WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Error at object 'System.Windows.ComponentResourceKey' in markup file 'WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml'. Error at object 'System.Windows.ResourceDictionary'. ---> System.Windows.Markup.XamlParseException: Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Error at object 'System.Windows.ComponentResourceKey' in markup file 'WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml'. ---> System.TypeLoadException: Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. I keep getting the following exception. I am getting the exception when I run the application exe from the Release folder. I do not get the exception at all when normally debugging the application in Visual Studio. I have worked out that the exception is because of a DatePicker control I am using - as if I remove the control (build and run the release exe again) the exception goes away. How on earth could I work out what is going wrong here? The datepicker looks so much better but for the effort this looks like it might be to fix I may be incline to switch for a textbox which I validate when the submit button is pressed! Dissapointing...

    Read the article

  • dynamic html "more information" callout / annotation (jquery? ajax control toolkit?)

    - by nailitdown
    Hola, I have an app i'm building in c#, and i'd like to have the ability to have a user click a "more information" icon next to a field, which will then show a callout with some blurb about why the field contains what it does. ideally it'd look a lot like the ValidatorCallout, but instead of being shown as a result of validation, it'll be shown as a result of a mouseclick, or hover. Anyone know of a nice way to do this with either the ajaxcontroltoolkit, or jquery? cheers for any help you can give me.

    Read the article

  • Restricting dynamically loaded classes and jars based on a security policy

    - by Max
    Hi, I would like to dynamically load a set of jars or classes (i.e. plugins loaded at runtime). At the same time, I would like to restrict what these plugins are able to do in the JVM. For a test case, I would like to restrict them to pretty much everything (right now I'm just allowing one System.getProperty value to be read). I am currently using a security policy file, but I'm having difficulty specifying a policy for one folder or package in my codeBase, but not another. Here is how my policy looks now: grant codeBase "file:/home/max/programming/java/plugin/plugins/" { permission java.util.PropertyPermission "java.version", "read"; }; grant codeBase "file:/home/max/programming/java/plugin/api/" { permission java.security.AllPermission; }; Where (for testing purposes), all files in the plugins package and folder are restricted, but the classes in the api folder are not. Is this possible? Do I have to create a custom class loader? Is there a better way to go about doing this? Thanks.

    Read the article

  • Objective-C and sqlite's DATETIME type.

    - by sant0sk1
    I have a sqlite3 table that I'm trying to map to an object in objective-C. One attribute of the table is 'completed_at' which is stored as a DATETIME. I want to create a property on my objective-C class (which inherits from NSObject) that will map well to the 'completed_at' attribute. Objective-C has an NSDate type but I'm not sure if that will map directly?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >