Daily Archives

Articles indexed Friday April 30 2010

Page 34/114 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • NetBeans Platform Unit Test Library Dependencies

    - by Ben Hammond
    I am working on a Netbeans Platform RCP application. I use jmock in my unit tests and I have created a Library Wrapper Module to import the necessary libraries. The Module has an section named 'Libraries' and another section named 'Unit Test Libraries'. I hoped that I could add the JMock Library Wrapper to the 'Unit Test Libraries', however when I run the unit tests I get the error 'package org.jmock does not exist'. If I import the JMock Library Wrapper in to the main 'Libraries' element then it works, but this feels wrong. Maven allows me to specify unit-test only dependencies, and I assumed that NetBeans Platform did the same. Should this be possible? Am I doing something wrong? Should I resign myself to a run-time dependency on the unit-test libraries (ugh).

    Read the article

  • Greasemonkey Error: Component returned failure code: 0x80004005

    - by well son
    Hi This error triggers only sometimes when I do XMLHTTPRequest. uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/tmp2/Application%20Data/Mozilla/Firefox/Profiles/7e42a04s.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: anonymous :: line 1332" data: no how can i fix it?

    Read the article

  • PHP/MySQL - Working with two databases, one shared and one local to an instance of application

    - by Extrakun
    The situation: Using a off-the-shelf PHP application, I have to add in a new module for extra functionality. Today, it is made known that eventually four different instances of the application are to be deployed, but the data from the new functionality is to be shared among those 4 instances. Each instance should still have their own database for users, content and etc. So the data for the new functionality goes into a 'shared' database. The data for the application (user login, content, uploads) go into a 'local' database To make things more complex, the new module I am writing will fetch data from the local DB and the shared DB at the same time. A re-write of the base application will take too long. I only have control over the new module which I am writing. The ideal solution: Is there a way to encapsulate 2 databases into one name using MySQL? I do not wish to switch DB connections or specifically name the DB to query from inside my SQL statements. The application uses a DB wrapper, so I am able to change it somehow so I can invisibly attempt to read/write to two different DB. What is the best way to handle this problem?

    Read the article

  • See return value in C#

    - by Snake
    Hi, Consider the following piece of code: As you can see we are on line 28. Is there any way to see the return value of the function at this point, without letting the code return to the caller function? Foo.Bar() is a function call which generates a unique path (for example). So it's NOT constant. In VB.NET it's possible by entering the function's name in the Watch, which will then threat it as a variable. But in C# this is not possible, any other tips? PS: rewriting is not an option.

    Read the article

  • Can I use the SharePoint 2010 SQL Database through SharePoint from my App?

    - by Michael Stum
    I wonder if there is a supported way to access the SharePoint 2010 SQL Server through an API? I'm not talking about modifying any SharePoint Database directly (I know that that is still unsupported), but I'd like to store some data that my application needs, and instead of asking the user to enter a Connection String, I'd prefer to create my own database on the SQL Server that SharePoint uses. I think I could use the new Service Application stuff, but that seems a bit overkill?

    Read the article

  • LINQ to XML - How to get Dictionary from Anonymous Object?

    - by DaveDev
    Currently I'm getting a list of HeaderColumns from the following XML snippet: <PerformancePanel> <HeaderColumns> <column performanceId="12" text="Over last month %" /> <column performanceId="13" text="Over last 3 months %" /> <column performanceId="16" text="1 Year %" /> <column performanceId="18" text="3 Years % p.a." /> <column performanceId="20" text="5 Years % p.a." /> <column performanceId="22" text="10 Years % p.a." /> </HeaderColumns> </PerformancePanel> from which I create an object as follows: (admitedly similar to an earlier question!) var performancePanels = new { Panels = (from panel in doc.Elements("PerformancePanel") select new { HeaderColumns = (from column in panel.Elements("HeaderColumns").Elements("column") select new { PerformanceId = (int)column.Attribute("performanceId"), Text = (string)column.Attribute("text") }).ToList(), }).ToList() }; I'd like if HeaderColumns was a Dictionary() so later I extract the values from the anonymous object like follows: Dictionary<int, string> myHeaders = new Dictionary<int, string>(); foreach (var column in performancePanels.Panels[0].HeaderColumns) { myHeaders.Add(column.PerformanceId, column.Text); } I thought I could achieve this with the Linq to XML with something similar to this HeaderColumns = (from column in panel.Elements("HeaderColumns").Elements("column") select new Dictionary<int, string>() { (int)column.Attribute("performanceId"), (string)column.Attribute("text") }).ToDictionary<int,string>(), but this doesn't work because ToDictionary() needs a Func parameter and I don't know what that is / how to implement it, and the code's probably wrong anyway! Could somebody please suggest how I can achieve the result I need? Thanks.

    Read the article

  • is there a signal emiter/consumer engine (like in Django) for .NET (C#)

    - by user118657
    Has .NET (C#) anything like Django's Signals engine? Our business logic become really complicated over few years of adding new features. I'm going to re-architecture it. Currently all features are very coupled that makes regression errors while changing something one one place - some other place may be broken. I really like Django's apps idea where separate applications introduce new functionality and are absolutely separate. Communication between apps is implemented though signals. I wounder if there is something in .NET that allows to divide project business to many separated "apps" (plug-ins, zones, modules, you name it) and make communication using some kind of "signals". For example we have simple order flow. We can add "coupon app" that if exists in the project adds abilities to use discount coupon. We can add "cross sale" module that if exists adds abilities to offer cross-sale products Email notification module that if exists adds abilities to send order email notifications. But in the same time all this modules are "self-contained" means that communication between them is done using emitting signals (ORDER_PROCCESS_START, ORDER_SUCCESS, etcs) and other modules can subscribe to this signals and process them in required way. This architecture is not related to web, all business logic is processed on the server side like without working with HTTP directly. I wonder if it's good architecture from code maintaining and testing point of few, is it possible to do this in .NET? Any drawbacks that I don't realize now?

    Read the article

  • how to import other schema jars when using the scomp tool

    - by MikeJiang
    there is a huge amount of xml schemas for the business, some of them are common types like Money.xsd, Address.xsd, etc, while others are business specific like Customer.xsd, ShippingOrder.xsd, etc. So I decide to compile these schemas into 2 jars, one is commonbeans.jar, the other is businessbeans.jar. I've separated them into different folders. to build the commonbeans.jar is simple, just run "scomp -out commonbeans.jar ....\common*.xsd"; while run "scomp -out businessbeans.jar ....\business*.xsd" is a different story, there are errors say can't find those common types, and run "scomp -out businessbeans.jar ....\business*.xsd ....\business*.xsd" will blindly duplicate all the common types into the businessbeans.jar. so is there any way to link the commonbeans.jar when compile those busimess schemas, maybe something like "scomp -out businessbeans.jar ....\business*.xsd commonbeans.jar". I hope my poor english has expressed my issue!

    Read the article

  • Hibernate - Batch update returned unexpected row count from update: 0 actual row count: 0 expected:

    - by Sujee
    Hi All, I get following hibernate error. I am able to identify the function which causes the issue. Unfortunately there are several DB calls in the function. I am unable to find the line which causes the issue since hibernate flush the session at the end of the transaction. The below mentioned hibernate error looks like a general error. it doesn't even mentioned which Bean causes the issue. Anyone familiar with this hibernate error? Looking forward your help. Thanks in advance. Sujee. org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93) at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransacti onManager.java:500) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManag er.java:473) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(Transaction AspectSupport.java:267) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)

    Read the article

  • Samsung printer (ML-1640) margin problem

    - by Rytis
    I just got a new laser printer, Samsung ML-1640, and it has once again confirmed my experience that Samsung printers suck badly. The printer prints fine, except that the top margin is set at random, usually very small, cutting text on the top of page off. I tried updating firmware, getting new drivers, but nothing helped. I tried changing paper types, and it seemed that with the paper set as "plain" it was OK, but I just tried printing again after letting the printer rest for the night, and wasted 6 pages until I managed to print 2 boarding passes... Is there anything else I could try to resolve the issue?

    Read the article

  • Implicitly invoking parent class initializer

    - by Matt Joiner
    class A(object): def __init__(self, a, b, c): #super(A, self).__init__() super(self.__class__, self).__init__() class B(A): def __init__(self, b, c): print super(B, self) print super(self.__class__, self) #super(B, self).__init__(1, b, c) super(self.__class__, self).__init__(1, b, c) class C(B): def __init__(self, c): #super(C, self).__init__(2, c) super(self.__class__, self).__init__(2, c) C(3) In the above code, the commented out __init__ calls appear to the be the commonly accepted "smart" way to do super class initialization. However in the event that the class hierarchy is likely to change, I have been using the uncommented form, until recently. It appears that in the call to the super constructor for B in the above hierarchy, that B.__init__ is called again, self.__class__ is actually C, not B as I had always assumed. Is there some way in Python-2.x that I can overcome this, and maintain proper MRO when calling super constructors without actually naming the current class?

    Read the article

  • How to access files in interior of an iPhone App?

    - by mxg
    Hi everyone! I need in a iPhone app to access files that the app is build with(.plist etc). There's an hardcoded way to do this: NSString *appDir = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByDeletingLastPathComponent] stringByAppendingPathComponent:appFolder]; where appFolder is the name of folder app, like "test.app". After the appDir is known, to access files is simple. Is there any other, not-hardcoded way to have access to files form the app? Thanks in Advance!

    Read the article

  • Is it possible to mask CALayer in iPhone?

    - by Eonil
    I'm trying to mask CALayer with a bitmap image. And I failed masking CALayer. My code is: // 'PreloadViewController layerWithImageNamed' create a layer and set it's contents as specified UIImage. CALayer* title = [PreloadViewController layerWithImageNamed:@"pinkhug_txt.png"]; [[[self view] layer] addSublayer:title]; CALayer* title_mask = [PreloadViewController layerWithImageNamed:@"hug_mask.png"]; [title setMask:title_mask]; The Apple reference says "CALayer in iPhone does not support mask property". But there is a postings about this on SO. Is it possible? Or what's wrong with my code?

    Read the article

  • Top alignment for FlowLayout

    - by mrpaint
    I'm using a FlowLayout JPanel. The panel looks ugly when it's children components height are different. I'm looking for a solution to make them top-align (similar to valign="top" with table cell in HTML). Sorry for my bad English and hope someone can come up with a brilliant idea. Thank you

    Read the article

  • Debug HTTPS errors

    - by Murkin
    Hello everyone, When accessing my site, the SSL session is successful while the page loads. A few seconds after the page loaded FireFox shows that SSL is no longer available. I am guessing its some script (all I have is Google Analytics and Facebook). How can I see what caused FireFox (or IE/Chrome) to drop the SSL and why ?

    Read the article

  • BLAS and CUBLAS

    - by Nils
    I'm wondering about Nvidia's CUBLAS Library. Does anybody have experience with it? For example if I write a C program using BLAS will I be able to replace the calls to BLAS with calls to CUBLAS? Or even better implement a mechanism which let's the user choose at runtime? What about if I use the BLAS Library provided by Boost with C++?

    Read the article

  • How do i make a picturebox selectable?

    - by acidzombie24
    I am making a very basic map editor. I'm halfway through it and one problem i hit is how to delete an object. I would like to press delete but there appears to be no keydown event for pictureboxes and it will seem like i will have it only on my listbox. What is the best solution for deleting an object in my editor?

    Read the article

  • Pass enum value to method which is called by dynamic object

    - by user329588
    hello. I'm working on program which dynamically(in runtime) loads dlls. For an example: Microsoft.AnalysisServices.dll. In this dll we have this enum: namespace Microsoft.AnalysisServices { [Flags] public enum UpdateOptions { Default = 0, ExpandFull = 1, AlterDependents = 2, } } and we also have this class Cube: namespace Microsoft.AnalysisServices { public sealed class Cube : ... { public Cube(string name); public Cube(string name, string id); .. .. .. } } I dynamically load this dll and create object Cube. Than i call a method Cube.Update(). This method deploy Cube to SQL Analysis server. But if i want to call this method with parameters Cube.Update(UpdateOptions.ExpandFull) i get error, because method doesn't get appropriate parameter. I have already tried this, but doesn't work: dynamic updateOptions = AssemblyLoader.LoadStaticAssembly("Microsoft.AnalysisServices", "Microsoft.AnalysisServices.UpdateOptions");//my class for loading assembly Array s = Enum.GetNames(updateOptions); dynamic myEnumValue = s.GetValue(1);//1 = ExpandFull dynamicCube.Update(myEnumValue);// == Cube.Update(UpdateOptions.ExpandFull) I know that error is in parameter myEnumValue but i don't know how to get dynamically enum type from assembly and pass it to the method. Does anybody know the solution? Thank you very much for answers and help!

    Read the article

  • How can I hide these dots

    - by Patrick
    Hi, How can I hide the small dots nearby each picture in IE7 ? http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 I've tried with text-decoration:none and list-style-type:none but it didn't work. Thanks.

    Read the article

  • How to create DataSource dependency property on a wpf User Control

    - by Michael Hedgpeth
    I have a user control that wraps a grid. I want to be able to set the underlying grid's data source, but through the user control, like this: <my:CustomGrid DataSource="{Binding Path=CollectionView}" /> I have set this up in the grid like this: private static readonly DependencyProperty DataSourceProperty = DependencyProperty.Register("DataSource", typeof(IEnumerable), typeof(CustomGrid)); public IEnumerable DataSource { get { return (IEnumerable)GetValue(DataSourceProperty); } set { SetValue(DataSourceProperty, value); underlyingGrid.DataSource = value; } } But this doesn't work (it doesn't give me an error either). The data source is never set. What am I missing?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >