Search Results

Search found 276 results on 12 pages for 'marcus cole'.

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

  • Autowiring collections with IoC

    - by Marcus
    Hi, Anyone know if there exists any IoC container that can handle this: Given: ISomeInterfce<T> where T : Entity Impl1 : ISomeInterfce<Entity1> Impl2 : ISomeInterfce<Entity1> Impl3 : ISomeInterfce<Entity2> Impl4 : ISomeInterfce<Entity2> I want to be able to auto wire my system and be able to resolve like this IoC.ResolveAll(typeof(ISomeInterfce<Entity1>)) and get a collection back of all implementations of ISomeInterfce<Entity1>

    Read the article

  • Hackers as CS Majors - Easy?

    - by Marcus Pink
    Just curious. For those of you who had extensive experience programming before school (or who got really, really good at programming during school) did you're CS classes became very easy? Almost like trivial side work?

    Read the article

  • Screenshot of the Nexus One from adb?

    - by Marcus
    My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB. So far, I can get the framebuffer which I believe is a 32bit xRGB888 raw image by pulling it like this: adb pull /dev/graphics/fb0 fb0 From there though, I'm having a hard time getting it converted to a png. I'm trying with ffmpeg like this: ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb8888 -s 480x800 -i fb0 -f image2 -vcodec png image.png That creates a lovely purple image that has parts that vaguely resemble the screen, but it's by no means a clean screenshot.

    Read the article

  • Java Unicode encoding

    - by Marcus
    A Java char is 2 bytes (max size of 65,536) but there are 95,221 Unicode characters. Does this mean that you can't handle certain Unicode characters in a Java application? Does this boil down to what character encoding you are using?

    Read the article

  • Hibernate advanced select

    - by Marcus
    We want to get a row from a table using Hibernate a la: select max(id) from mytable where date = <date> Then select * from mytable where id = <max_id> We are currently using Hibernate to map mytable to Java domain objects. I know how to load the domain object based on an id. So I could just do #1 using JDBC and then load the domain object using Hibernate the "normal" way. But.. is there a way to do this with one single Hibernate logical query?

    Read the article

  • Sync Services With AddressBook

    - by Marcus
    Hi, I've developed an application to sync the Mac address book with another application. I was using an NSNotification (kABDatabaseChangedExternallyNotification) which are sent every time the address book is edited to do the syncing. However I found that if I 'overloaded' the address book (by adding 20 records really quickly or something) I didn't get all of the notifications. I have since found the Sync Services framework which seems to be aimed at my kind of application and it seems to work fine. The problem is that the changes are not 'pushed' to me in the same was as an NSNotification - I have to sync every 5 minutes or so. And, from what I can understand, I shouldn't use the AddressBook API directly but push changes back through sync services. This means that changes are not instant but lagged by how often address book/my app syncs. Is there any way to make it instant? or to use the NSNotifications reliably? Thanks for your time, Marc

    Read the article

  • How to check if two types can be compared, summed etc.?

    - by Marcus
    Hi, if given two types (Type a, Type b), is there any "nice" way to find out if those two can be compared, summed etc.? I was thinking if the types implement IConvertible, one could convert both to lets say decimal and perform a "Convert.ToDecimal(a) > Convert.ToDecimal(b)" ? I am building an expression evaluator and want to be able to work with any kind of object and thus need to know if a type can be compared to another type (it DOESN'T have to be the same types on both sides. eg. double > int)

    Read the article

  • Python Copy Through Assignment?

    - by Marcus Whybrow
    I would expect that the following code would just initialise the dict_a, dict_b and dict_c dictionaries. But it seams to have a copt through effect: dict_a = dict_b = dict_c = {} dict_c['hello'] = 'goodbye' print dict_a print dict_b print dict_c As you can see the result is as follows: {'hello': 'goodbye'} {'hello': 'goodbye'} {'hello': 'goodbye'} Why does that program give the previous result, When I would expect it to return: {} {} {'hello': 'goodbye'}

    Read the article

  • Registering a Named Function as a Listener with Jquery

    - by Marcus
    I'm new to javascript/jquery and I've done some poking around the web, but I can't figure out why the following is invalid: var toggleSection = function(sectionName) { // Do some Jquery work to toggle stuff based on sectionName string // (concatenate sectionName with other text to form selectors) }; $('#togglecont1').click(toggleSection("container1")); Is there something obvious I'm missing? Thanks in advance.

    Read the article

  • Auto mapping a IDictionary<string, myclass> with fluent nhibernate

    - by Marcus
    I have a simple class that looks like this: public class Item { // some properties public virtual IDictionary<string, Detail> Details { get; private set; } } and then I have a map that looks like this: map.HasMany(x => x.Details).AsMap<string>("Name").AsIndexedCollection<string>("Name", c => c.GetIndexMapping()).Cascade.All().KeyColumn("Item_Id")) with this map I get the following error and I don't know how to solve it? The type or method has 2 generic parameter(s), but 1 generic argument(s) were provided. A generic argument must be provided for each generic parameter.

    Read the article

  • Alright to truncate database tables when also using Hibernate?

    - by Marcus
    Is it OK to truncate tables while at the same time using Hibernate to insert data? We parse a big XML file with many relationships into Hibernate POJO's and persist to the DB. We are now planning on purging existing data at certain points in time by truncating the tables. Is this OK? It seems to work fine. We don't use Hibernate's second level cache. One thing I did notice, which is fine, is that when inserting we generate primary keys using Hibernate's @GeneratedValue where Hibernate just uses a key value one greater than the highest value in the table - and even though we are truncating the tables, Hibernate remembers the prior value and uses prior value + 1 as opposed to starting over at 1. This is fine, just unexpected. Note that the reason we do truncate as opposed to calling delete() on the Hibernate POJO's is for speed. We have gazillions of rows of data, and truncate is just so much faster.

    Read the article

  • Where can I find a list of English phrases?

    - by Marcus Adams
    I'm tasked with searching for the use of cliches and common phrases in text. The phrases are similar to the phrases you might see for the phrase puzzles on Wheel of Fortune. Here are a few examples: Safety First Too Good To be True Winning Isn't Everything I cannot find a list of phrases however. Does anybody know of such a list? Seriously, even a list of all Wheel of Fortune solutions would suffice.

    Read the article

  • Why does "request.getUserPrincipal().getName()" sometimes return a blank string?

    - by Marcus
    Has somebody an idea, why the getName method of the requests getUserPrincipal Method sometimes provides an empty String? Most of the time it returns the correct user name but not every time. This behaviour does occur randonmly. I can start the application, run the command and it works. The next time I start the application and run the command (exactly the same way as before!) it does not work... Any ideas?

    Read the article

  • How to view Mercurial changeset changes using a GUI diff tool

    - by Marcus
    We use both Examdiff and Kdiff3 to view Mercurial changes. Just add this to .hgrc: [extdiff] cmd.kdiff3 = cmd.examdiff = C:\Program Files\ExamDiff Pro\ExamDiff.exe And then you can type hg examdiff or hg diff3 to see a complete diff of all your changes. What I would like is to do the same to see a "before and after" of files for a given changeset that was checked in by someone else. I know you can type hg log to see all changesets and then hg log -vprXX to see a text diff, but that's too hard for my GUI preferring eyes. Anyone know how to the equivalent with the GUI tools?

    Read the article

  • Storing expression references to data base

    - by Marcus
    I have standard arithmetic expressions sotred as strings eg. "WIDTH * 2 + HEIGHT * 2" In this example WIDTH and HEIGHT references other objects in my system and the literals WIDTH and HEIGHT refers to a property (Name) on those objects. The problem I'm having is when the Name property on an expression object changes the expression won't match anymore. One solution I came up with is to instead of storing "WIDTH * 2 + HEIGHT * 2" i store "{ID_OF_WIDTH} * 2 + {ID_OF_HEIGHT} * 2" And let my parser be able to parse this new syntax and implement an interface or such on referenced objects IExpressionReference { string IdentifierName { get; } } Anyone have a better/alternative solution to my problem?

    Read the article

  • Best application for process flow with expandable attributes

    - by Marcus
    I am looking for the best software application to do the following I have a set of use cases that are in relationship to each other. I want to show an overview of this relationship. If the user desires the attributes for each use case (such as business rules, data elements, etc) should be expandable. This is potentially a large map which is the reason why the attributes should be expandable / collapsable. Finally all this needs to be printable. Any idea of the ideal application to do this? Thanks a lot in advance

    Read the article

  • Do we need HyperJAXB generated hashCode & equals methods?

    - by Marcus
    We've generated some (well a lot) of classes using HyperJAXB. All of the classes implement Equals and HashCode and have the implementation style below. Appears this code is never executed.. is there any particular reason we need this code? I'm looking to simplify the classes if we can. public boolean equals(Object object) { if (!(object instanceof MyClass)) { return false; } if (this == object) { return true; } final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder(); equals(object, equalsBuilder); return equalsBuilder.isEquals(); } public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getValue()); hashCodeBuilder.append(this.getId()); } public int hashCode() { final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder(); hashCode(hashCodeBuilder); return hashCodeBuilder.toHashCode(); }

    Read the article

  • How do I add the j2ee.jar to a Java2WSDL ant script programmatically?

    - by Marcus
    I am using IBM's Rational Application Developer. I have an ant script that contains the Java2WSDL task. When I run it via IBM, it gives compiler errors unless I include the j2ee.jar file in the classpath via the run tool (it does not pick up the jar files in the classpath in the script). However, I need to be able to call this script programmatically, and it is giving me this error: "java.lang.NoClassDefFoundError: org.eclipse.core.runtime.CoreException" I'm not sure which jars need to be added or where? Since a simple echo script runs, I assume that it is the j2ee.jar or another ant jar that needs to be added. I've added it to the project's buildpath, but that doesn't help. (I also have ant.jar, wsanttasks.jar, all the ant jars from the plugin, tools.jar, remoteAnt.jar, and the swt - all which are included in the buildpath when you run the script by itself.) Script: <?xml version="1.0" encoding="UTF-8"?> <project default="build" basedir="."> <path id="lib.path"> <fileset dir="C:\Program Files\IBM\WebSphere\AppServer\lib" includes="*.jar"/> <!-- Adding these does not help. <fileset dir="C:\Program Files\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70\jdk\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70\configuration\org.eclipse.osgi\bundles\1139\1\.cp\lib" includes="*.jar"/> <fileset dir="C:\Program Files\IBM\SDP70Shared\plugins" includes="*.jar"/> --> </path> <taskdef name="java2wsdl" classname="com.ibm.websphere.ant.tasks.Java2WSDL"> <classpath refid="lib.path"/> </taskdef> <target name="build"> <echo message="Beginning build"/> <javac srcdir="C:\J2W_Test\Java2Wsdl_Example" destdir="C:\J2W_Test\Java2Wsdl_Example"> <classpath refid="lib.path"/> <include name="WSExample.java"/> </javac> <echo message="Set up javac"/> <echo message="Running java2wsdl"/> <java2wsdl output="C:\J2W_Test\Java2Wsdl_Example\example\META-INF\wsdl\WSExample.wsdl" classpath="C:\J2W_Test\Java2Wsdl_Example" className= "example.WSExample" namespace="http://example" namespaceImpl="http://example" location="http://localhost:9080/example/services/WSExample" style="document" use="literal"> <mapping namespace="http://example" package="example"/> </java2wsdl> <echo message="Complete"/> </target> </project> Code: File buildFile = new File("build.xml"); Project p = new Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(Project.MSG_INFO); p.addBuildListener(consoleLogger); try { p.fireBuildStarted(); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(p.getDefaultTarget()); p.fireBuildFinished(null); } catch (BuildException e) { p.fireBuildFinished(e); } Error: [java2wsdl] java.lang.NoClassDefFoundError: org.eclipse.core.runtime.CoreException [java2wsdl] at java.lang.J9VMInternals.verifyImpl(Native Method) [java2wsdl] at java.lang.J9VMInternals.verify(J9VMInternals.java:68) [java2wsdl] at java.lang.J9VMInternals.initialize(J9VMInternals.java:129) [java2wsdl] at com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager.getDiscoveredServiceProviders(ServiceProviderManager.java:378) [java2wsdl] at com.ibm.ws.webservices.multiprotocol.discovery.ServiceProviderManager.getAllServiceProviders(ServiceProviderManager.java:214) [java2wsdl] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.initPluggableBindings(Emitter.java:2704) [java2wsdl] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.<init>(Emitter.java:389) [java2wsdl] at com.ibm.ws.webservices.tools.ant.Java2WSDL.execute(Java2WSDL.java:122) [java2wsdl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java2wsdl] at org.apache.tools.ant.Task.perform(Task.java:364) [java2wsdl] at org.apache.tools.ant.Target.execute(Target.java:341) [java2wsdl] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java2wsdl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [java2wsdl] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [java2wsdl] at att.ant.RunAnt.main(RunAnt.java:32)

    Read the article

  • JBoss warning - "Unable to fill pool"

    - by Marcus
    We're getting this random warning from JBoss.. any idea why? It happens at random times when there are no active threads. Everything works when any processing resumes. 13:49:31,764 WARN [JBossManagedConnectionPool] [ ] Unable to fill pool org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener ref used the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack The Connection descriptor used by the client was: //localhost:1521/orcl

    Read the article

  • How to restrict access to a class's data based on state?

    - by Marcus Swope
    In an ETL application I am working on, we have three basic processes: Validate and parse an XML file of customer information from a third party Match values received in the file to values in our system Load customer data in our system The issue here is that we may need to display the customer information from any or all of the above states to an internal user and there is data in our customer class that will never be populated before the values have been matched in our system (step 2). For this reason, I would like to have the values not even be available to be accessed when the customer is in this state, and I would like to have to avoid some repeated logic everywhere like: if (customer.IsMatched) DisplayTextOnWeb(customer.SomeMatchedValue); My first thought for this was to add a couple interfaces on top of Customer that would only expose the properties and behaviors of the current state, and then only deal with those interfaces. The problem with this approach is that there seems to be no good way to move from an ICustomerWithNoMatchedValues to an ICustomerWithMatchedValues without doing direct casts, etc... (or at least I can't find one). I can't be the first to have come across this, how do you normally approach this? As a last caveat, I would like for this solution to play nice with FluentNHibernate :) Thanks in advance...

    Read the article

  • Maven - Include dependent libs in jar without unpacking dependencies?

    - by Marcus
    We're trying to build a client jar that includes unpacked depenedent jar's. And the manifest should have class-path entries to the dependent jars. The snippet below works but the jars are unpacked - how can we stop the jars from being unpacked? <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>

    Read the article

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