Daily Archives

Articles indexed Sunday May 23 2010

Page 7/78 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Disable Code analysis warnings .NET

    - by acidzombie24
    In visual studios i can run code analysis on my .NET project. I am running basic correctness and have 85 warnings. Which is a little much. Also majority of them are in external code. How do i disable specific warnings so i can focus on the more important warnings? I tried the below but it does not recognize code analysis warnings. (I first tried w/o the CA) #pragma warning disable CA1820 CA1065 CA2100

    Read the article

  • Defining a SPI in Clojure

    - by Joe Holloway
    I'm looking for an idiomatic way(s) to define an interface in Clojure that can be implemented by an external "service provider". My application would locate and instantiate the service provider module at runtime and delegate certain responsibilities to it. Let's say, for example, that I'm implementing a RPC mechanism and I want to allow a custom middleware to be injected at configuration time. This middleware could pre-process the message, discard messages, wrap the message handler with logging, etc. I know several ways to do this if I fall back to Java reflection, but feel that implementing it in Clojure would help my understanding. (Note, I'm using SPI in a general sense here, not specifically referring to the way it's defined in the JAR file specification) Thanks

    Read the article

  • View all ntext column text in SQL Server Management Studio for SQL CE database

    - by Dave
    I often want to do a "quick check" of the value of a large text column in SQL Server Management Studio (SSMS). The maximum number of characters that SSMS will let you view, in grid results mode, is 65535. (It is even less in text results mode.) Sometimes I need to see something beyond that range. Using SQL Server 2005 databases, I often used the trick of converting it to XML, because SSMS lets you view much larger amounts of text that way: SELECT CONVERT(xml, MyCol) FROM MyTable WHERE ... But now I am using SQL CE, and there is no Xml data type. There is still a "Maximum Characters Retreived XML" value under Options; I suppose this is useful when connecting to other data sources. I know I can just get the full value by running a little console app or something, but is there a way within SSMS to see the entire ntext column value? [Edit] OK, this didn't get much attention the first time around (18 views?!). It's not a huge concern, but maybe I'm just obsessed with it. There has to be some good way around this, doesn't there? So a modest bounty is active. What I am willing to accept as answers, in order from best-to-worst: A solution that works just as easy as the XML trick in SQL CE. That is, a single function (convert, cast, etc.) that does the job. A not-too-invasive way to hack SSMS to get it to display more text in the results. An equivalent SQL query (perhaps something that creatively uses SUBSTRING and generates multiple ad-hoc columns??) to see the results. The solution should work with nvarchar and ntext columns of any length in SQL CE from SSMS. Any ideas?

    Read the article

  • Which SOA architecture is most appropriate for a Java application?

    - by Robert Greiner
    I am currently working on a pretty large Java 6 application where we are looking to split some of our functionality out into a service oriented architecture. It seems that the primary SOA framework for the application space is OSGi and I have been looking into Felix and Knopplerfish but I wanted to make sure that this isn't my only option. Does it make sense to use an actual web service protocol for our application like SOAP, even though we are not building a web app? Is this even acceptable? Have any of you used an implementation of OSGi (Felix, etc.) with your desktop application? if so, how did it go? Do you know of anything better? We're all pretty new to SOA here so any help would be greatly appreciated.

    Read the article

  • Helping managers and customers understand SOA

    - by David
    I frequently hear Service-Oriented Architecture (SOA) being tossed around as a buzzword among non-technical customers or program managers with little concern or understanding for what it actually entails (example: "Can I buy a SOA?"). There's also a lot of misinformation about SOA (example: "Only web apps can use SOA") and a general lack of understanding for its capabilities (example: "SOA can make your make all of your data work together"). What are some key facts that you, as someone who understand the technical side of SOA, use to educate program managers on the appropriate use and understanding of SOA? What's the best way to set the record straight with non-technical folks?

    Read the article

  • Compile and optimize for different target architectures

    - by Peter Smit
    Summary: I want to take advantage of compiler optimizations and processor instruction sets, but still have a portable application (running on different processors). Normally I could indeed compile 5 times and let the user choose the right one to run. My question is: how can I can automate this, so that the processor is detected at runtime and the right executable is executed without the user having to chose it? I have an application with a lot of low level math calculations. These calculations will typically run for a long time. I would like to take advantage of as much optimization as possible, preferably also of (not always supported) instruction sets. On the other hand I would like my application to be portable and easy to use (so I would not like to compile 5 different versions and let the user choose). Is there a possibility to compile 5 different versions of my code and run dynamically the most optimized version that's possible at execution time? With 5 different versions I mean with different instruction sets and different optimizations for processors. I don't care about the size of the application. At this moment I'm using gcc on Linux (my code is in C++), but I'm also interested in this for the Intel compiler and for the MinGW compiler for compilation to Windows. The executable doesn't have to be able to run on different OS'es, but ideally there would be something possible with automatically selecting 32 bit and 64 bit as well. Edit: Please give clear pointers how to do it, preferably with small code examples or links to explanations. From my point of view I need a super generic solution, which is applicable on any random C++ project I have later. Edit I assigned the bounty to ShuggyCoUk, he had a great number of pointers to look out for. I would have liked to split it between multiple answers but that is not possible. I'm not having this implemented yet, so the question is still 'open'! Please, still add and/or improve answers, even though there is no bounty to be given anymore. Thanks everybody!

    Read the article

  • Question about using adaptive layout + print style sheet

    - by Michael
    Hey everyone, In my web design class, we looked at creating different style sheets for different window sizes and using a javascript that detects the window size and loads the right style sheet. In the head, I'm linking to three external style sheets, as well as a link to the javascript file. So the adaptive layout works fine. However... I also need to be able to use a print style sheet with this particular webpage (it's the requirement for this project). The problem is this that the way the javascript was written makes it so that it ignores the print style sheet. When I go to print preview, it ignores the print style sheet and the preview shows me all of my webpage unstyled. It looks like just the html when opened in a browser. I am using the javascript by Kevin Hale at ParticleTree, and I'm sure there are those familiar with this :] http://particletree.com/examples/dynamiclayouts/ I would like to know what needs to be changed so that the print style sheet isn't ignored. I've shown this to my professor. However, her email wasn't clear enough, but I understand that somehow the script is ignoring the print.css and that's why the print preview shows a css-less preview. Since it's the weekend, I won't be able to get an answer until Monday, and I was hoping someone can help me out. Thank you very much! Michael

    Read the article

  • SQLCE 3.5 FIPS compliance on Windows Mobile 6.0

    - by trampster
    What is a positions of SQLCE 3.5 when running on Windows Mobile 6.0 in relation to FIPS compliance. I have read lots of differing reports on this and need a definitive answer, one which comes from a reliable source (please provide links) I have read this "The encryption modes in SQL Server Compact 3.5 are FIPS complaint if FIPS mode is enabled at the OS level." Is this true? if so how does one enable it at the OS level.

    Read the article

  • How do I free SQLServerCE's COM instance from the current running process?

    - by David Thornley
    It's been a while since I touched COM so be nice ;) This is under WindowsCE 5.0 with SQLServerCE 2.0. After calling this to load SQLServerCE 2.0 : - IDBInitialize *pIDBInitialize = NULL; CoCreateInstance(CLSID_SQLSERVERCE_2_0, NULL, CLSCTX_INPROC_SERVER, IID_IDBInitialize, (void**)&pIDBInitialize); Module load occurs for SSCE20.dll which obviously loads the SQLServerCE engine into the process space. What I don't understand is if I do this immediately after :- pIDBInitialize->Release(); I don't see a dll module unload, so that SSCE20.dll (and friends) are still loaded into my process. Now I tried CoFreeUnusedLibraries() which I figure forces COM to purge any unused libraries, but it doesn't seem to do the trick. At runtime I want to be able to completely unload the SQLServerCE 2.0 dll from the process to streamline an upgrade to 3.5SP1. I suspect this has something to do with the shared dll model that Microsoft use under WindowsCE... but, I might be wrong :) Thanks in advance, David.

    Read the article

  • SQLCe connection error 0x80004005

    - by nihi_l_ist
    Hello. I get the error when i'm trying to open a database in PocketPC emulator or from the program with connection's Open() method(C#)..Here it is: Description: Internal error: SQL Server Compact made an unsupported request to the host operating system. Can someone explain what can cause this error to appear. The database and application are on Storage Card(shared folder from PC, on which Everyone has read/write permissions)Thank you. FOUND that its because of storing DB on Storage Card(after moving database to 'My Documents' error disappears), but still don't know the reason of error.

    Read the article

  • Silverlight 4 race condition with DataGrid master details control

    - by Simon_Weaver
    Basically I want a DataGrid (master) and details (textbox), where DataGrid is disabled during edit of details (forcing people to save/cancel)... Here's what I have... I have a DataGrid which serves as my master data. <data:DataGrid IsEnabled="{Binding CanLoad,ElementName=dsReminders}" ItemsSource="{Binding Data, ElementName=dsReminders}" > Its data comes from a DomainDataSource: <riaControls:DomainDataSource Name="dsReminders" AutoLoad="True" ... I have a bound Textbox which is the 'details' (very simple right now). There are buttons (Save/Cancel) which should be enabled when user tries to edit the text. Unfortunately Silverlight doesn't support UpdateSourceTrigger=PropertyChanged so I have to raise an event: <TextBox Text="{Binding SelectedItem.AcknowledgedNote, Mode=TwoWay, UpdateSourceTrigger=Explicit, ElementName=gridReminders}" TextChanged="txtAcknowledgedNote_TextChanged"/> The event to handle this calls BindingExpression.UpdateSource to update the source immediately: private void txtAcknowledgedNote_TextChanged(object sender, TextChangedEventArgs e) { BindingExpression be = txtAcknowledgedNote.GetBindingExpression(TextBox.TextProperty); be.UpdateSource(); } IN other words - typing in the textbox causes CanLoad of the DomainDataSource to become False (because we're editing). This in turn disables the DataGrid (IsEnabled is bound to it) and enables 'Cancel' and 'Save' buttons. However I'm running up against a race condition if I move quickly through rows in the DataGrid (just clicking random rows). The TextChanged presumably is being called on the textbox and confusing the DomainDataSource which then thinks there's been a change. So how should I disable the DataGrid while editing without having the race condition? One obvious solution would be to use KeyDown events to trigger the call to UpdateSource but I always hate having to do that.

    Read the article

  • Is the Unicode prefix N still needed in SQL Compact Edition?

    - by Dave
    At least in previous versions of SQL Server, you had to prefix Unicode string constants with an "N" to make them be treated as Unicode. Thus, select foo from bar where fizz = N'buzz' (See "Server-Side Programming with Unicode" for SQL Server 2005 "from the horse's mouth" documentation.) We have an application that is using SQL Compact Edition and I am wondering if that is still necessary. From the testing I am doing, it appears to be unneeded. That is, the following SQL statements both behave identically in SQL CE, but the second one fails in SQL Server 2005: select foo from bar where foo=N'???' select foo from bar where foo='???' (I hope I'm not swearing in some language I don't know about...) I'm wondering if that is because all strings are treated as Unicode in SQL CE, or if perhaps the default code page is now Unicode-aware. If anyone has seen any official documentation, either yea or nay, I'd appreciate it. I know I could go the safe route and just add the "N"'s, but there's a lot of code that will need changed, and if I don't need to, I don't want to! Thanks for your help!

    Read the article

  • Webcam error (libv4lconvert) while capturing VIDEO

    - by shadyabhi
    I get the following when I capture images using my web-cam.. libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff ...(same error repeating) ... I also had issue that my camera was not getting detected in ubuntu. So, in order to run an application that uses the webcam, I have to run a command like LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./6dofhand Whats causing these errors?

    Read the article

  • Is this a violation of the single responsiblity principle?

    - by L. Moser
    I have the following method and interface: public object ProcessRules(List<IRule> rules) { foreach(IRule rule in rules) { if(EvaluateExpression(rule.Exp) == true) return rule.Result; } //Some error handling here for not hitting any rules } public interface IRule { Expression Exp; Object Result; int Precedence; } Because rules have a precedence, they should actually never be processed out of order. This leads me with (I think) three solutions: Sort rules before passing them into the evaluator. Change the parameter type to something that enforces a sort order. Sort within the evaluator. I like option 3 because it always ensures that it is sorted and I like option 1 because it seems more cohesive. And option 2 seems like a good compromise. Is a scenario like this context specific/subjective, or is there really a best practice to be applied here?

    Read the article

  • serialize/deserialize a LinkedHashMap (android) java

    - by user348058
    So i want to pass a LinkedHashMap to an intent. //SEND THE MAP Intent singlechannel = new Intent(getBaseContext(),singlechannel.class); singlechannel.putExtra("db",shows1);//perase to startActivity(singlechannel); //GET THE MAP LinkedHashMap<String,String> db = new LinkedHashMap<String,String>(); db=(LinkedHashMap<String,String>) getIntent().getSerializableExtra("db"); This one Worked Like a charm with HashMap. But with LinkedHashMap i got a problem I got a warning "Type safety: Unchecked cast from Serializable to LinkedHashMap" But i had this warning with HashMap too? Any ideas.Any help is much appreciated Also I just saw this. https://issues.apache.org/jira/browse/HARMONY-6498

    Read the article

  • Is Form validation and Business validation too much?

    - by Robert Cabri
    I've got this question about form validation and business validation. I see a lot of frameworks that use some sort of form validation library. You submit some values and the library validates the values from the form. If not ok it will show some errors on you screen. If all goes to plan the values will be set into domain objects. Here the values will be or, better said, should validated (again). Most likely the same validation in the validation library. I know 2 PHP frameworks having this kind of construction Zend/Kohana. When I look at programming and some principles like Don't Repeat Yourself (DRY) and single responsibility principle (SRP) this isn't a good way. As you can see it validates twice. Why not create domain objects that do the actual validation. Example: Form with username and email form is submitted. Values of the username field and the email field will be populated in 2 different Domain objects: Username and Email class Username {} class Email {} These objects validate their data and if not valid throw an exception. Do you agree? What do you think about this aproach? Is there a better way to implement validations? I'm confused about a lot of frameworks/developers handling this stuff. Are they all wrong or am I missing a point? Edit: I know there should also be client side kind of validation. This is a different ballgame in my Opinion. If You have some comments on this and a way to deal with this kind of stuff, please provide.

    Read the article

  • array size for extendible hashing

    - by Phenom
    If I want to use extendible hashing to store a maximum of 100 records, then what is the minimum array size that I need? I am guessing that an array of 100 would be sufficient, but I could be wrong. I also suspect that I can use a smaller array.

    Read the article

  • Active record taking Date.today as yesterday

    - by Mongus Pong
    I have a strange one.. I am doing something like : tip = find (:first, :conditions => ["last_shown = ? or last_shown is null", Date.today]) And then a little later on I do : tip.last_shown = Date.today tip.save When I look at output of these queries, ActiveRecord is doing the first query with todays date as I would expect. However, the send query, ActiveRecord is setting the last_shown date to be yesterdays date. Why on earth would it do this? I have config.time_zone = 'UTC' in my environment.rb. I can use Time.now.utc.to_date instead of Date.today but it makes no difference.

    Read the article

  • Help understanding the Single Responsibility Principle

    - by user204588
    I'm trying to understand what a responsibility actually is so I want to use an example of something I'm currently working on. I have a app that imports product information from one system to another system. The user of the apps gets to choose various settings for which product fields in one system that want to use in the other system. So I have a class, say ProductImporter and it's responsibility is to import products. This class is large, probably too large. The methods in this class are complex and would be for example, getDescription. This method doesn't simply grab a description from the other system but sets a product description based on various settings set by the user. If I were to add a setting and a new way to get a description, this class could change. So, is that two responsibilities? Is there one that imports products and one that gets a description. It would seem this way, almost every method I have would be in it's own class and that seems like overkill. I really need a good description of this principle because it's hard for me to completely understand. I don't want needless complexity.

    Read the article

  • Can you select an element with two classes in jQuery

    - by Petras
    I have an element that has two classes but can't seem to select it with jQuery. Is it possible. Here's the code: <html> <head runat="server"> <script type="text/javascript" src="abc/scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { alert($(".x.y").html()); //shows null, I want it to show "456" }); </script> </head> <body> <div class="x" class"y">456</div> </body> </html>

    Read the article

  • Performance in SQL Mobile with one big column that's not being selected

    - by Anthony Mastrean
    I have a SQL Mobile database with one table. It has several columns with useful, often queried data and one column that stores a relatively large string per record (1000+ characters) that is not queried often. Imagine this fake schema, the "lifeStory" field is the large one. table1 String firstName String lastName String address String lifeStory A representative query would be SELECT firstName, lastName, address FROM table1 WHERE firstName = :p1 Does anyone know of any performance concerns leaving that large, infrequently queried column in this table?

    Read the article

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