Search Results

Search found 369 results on 15 pages for 'marcus rene'.

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to embed XBase expressions in an Xtext DSL

    - by Marcus Mathioudakis
    I am writing a simple little DSL for specifying constraints on messages, and Have been trying without success for a while to embed XBase expressions into the language. The Grammar looks like this: grammar org.xtext.businessrules.BusinessRules with org.eclipse.xtext.xbase.Xbase //import "http://www.eclipse.org/xtext/xbase/Xbase" as xbase import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes generate businessRules "http://www.xtext.org/businessrules/BusinessRules" Start: rules+=Constraint*; Constraint: {Constraint} 'FOR' 'PAYLOAD' payload=PAYLOAD 'ELEMENT' element=ID 'CONSTRAINED BY' constraint=XExpression; PAYLOAD: "SimulationSessionEvents" |"stacons" |"any" ; Range: 'above' min=INT ('below' max=INT)? |'below' max=INT ('above' min=INT)? ; When trying to parse a file such as: FOR PAYLOAD SimulationSessionEvents ELEMENT matrix CONSTRAINED BY ... I can't get it to work for ... = any kind of Arithmetic expression, although it works for ...= loop or if expression, or even just a number. As soon as I do something like '-5' or '4-5' it says Couldn't resolve reference to JvmIdentifiableElement '-', even though the Xbase.xtext Grammar looks like it allows these expressions. I don't think I'm missing any Jars, as it doesn't complain when I run the mwe workflow, but only when trying to parse the input file. Any help would be much appreciated.

    Read the article

  • scala REPL is slow on vista

    - by Jacques René Mesrine
    I installed scala-2.8.0.RC3 by extracting the tgz file into my cygwin (vista) home directory. I made sure to set $PATH to scala-2.8.0.RC3/bin. I start the REPL by typing: $ scala Welcome to Scala version 2.8.0.RC3 (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> Now when I tried to enter an expression scala> 1 + 'a' the cursor hangs there without any response. Granted that I have chrome open with a million tabs and VLC playing in the background, but CPU utilization was 12% and virtual memory was about 75% utilized. What's going on ? Do I have to set the CLASSPATH or perform other steps.

    Read the article

  • Starting new transaction within existing one in Spring bean

    - by Marcus
    We have: @Transactional(propagation = Propagation.REQUIRED) public class MyClass implementes MyInterface { ... MyInterface has a single method: go(). When go() executes we start a new transaction which commits/rollbacks when the method is complete - this is fine. Now let's say in go() we call a private method in MyClass that has @Transactional(propagation = Propagation.REQUIRES_NEW. It seems that Spring "ignores" the REQUIRES_NEW annotation and does not start a new transaction. I believe this is because Spring AOP operates on the interface level (MyInterface) and does not intercept any calls to MyClass methods. Is this correct? Is there any way to start a new transaction within the go() transaction? Is the only way to call another Spring managed bean that has transactions configured as REQUIRES_NEW?

    Read the article

  • Detecting type of webservice in httpmodule

    - by Marcus
    Hi, Is there any way to detect the type of a webservice inside a httpmodule? The reason for this is that I want to do some property injection to the webservice before it's processed. I found this: http://social.msdn.microsoft.com/Forums/en/asmxandxml/thread/0e848eee-d353-4e67-b47f-89fddb600009 but that is one h..l of an ugly solution. Anyone have a nice solution?

    Read the article

  • Does Hibernate always need a setter when there is a getter?

    - by Marcus
    We have some Hibernate getter methods annotated with both @Column and @Basic. We get an exception if we don't have the corresponding setter. Why is this? In our case we are deriving the value returned from the getter (to get stored in the DB) and the setter has no functional purpose. So we just have an empty method to get around the error condition..

    Read the article

  • How to turn off autosignin of registered transports in Openfire ?

    - by Jacques René Mesrine
    This is regarding the gateway XEP 0100 support in Openfire. I have noticed that for some transports, they are auto-signed in once a connection to openfire succeeds (via the xmpp user). This applies specifically to QQ. How does one turn off this auto-signin feature ? Basically from a client perspective, I want to be able to signin selectively. So when I create an XMPPConnection to openfire, all transports should remain signed off until I send directed Presences to transports.

    Read the article

  • Entity framework unit testing with sqlite

    - by Marcus Malmgren
    Is it possible to unit test Entity Framework v2 repositories with SqLite? Is this only possible if my entities are plain Poco and not automatically generated by Entity Framework? I've generated a entity model from SqlServer and in the generated .edmx file i found this in section SSDL content: Provider="System.Data.SqlClient". Correct me if I am wrong, but shouldnt that be System.Data.SQLite in order to work with sqlite?

    Read the article

  • Wierd typeloadexception "Bad flags on delegate constructor."

    - by Marcus
    Hi, Anybody seen this exception before, Google doesn't have a single post regarding the exception. The code that raises the error is a simple add. Items.Add(item); System.TypeLoadException: Bad flags on delegate constructor. at System.Windows.Forms.ListView.Sort() at System.Windows.Forms.ListView.InsertItems(Int32 displayIndex, ListViewItem[] items, Boolean checkHosting) at System.Windows.Forms.ListView.ListViewNativeItemCollection.Add(ListViewItem value) at System.Windows.Forms.ListView.ListViewItemCollection.Add(ListViewItem value)

    Read the article

  • Using Scala and StringTemplate, how do I loop through a Map

    - by Marcus Kazmierczak
    I have my environment setup nicely using Scala, StringTempalte within the Google AppEngine. I am having trouble looping through a Map and getting it to display in the template. When I assign a simple List of just Strings to the template it works using: In Scala Servlet: var photos = List[String]() //... get photo url and title ... photos = photo_url :: photos template.setAttribute("photos", photos: _*) In Template: $photos: { photo| <div><img src="$photo$_s.jpg"></div> }$ The above works. However, any attempt of creating a Map using url and title and assigning to the template gives me an error. Here is my attempt, which does not work: In Scala Servlet: var photos = List[Map[String,String]]() //... get photo url and title ... photos = Map("url" -> url, "title" -> title) :: photos template.setAttribute("photos", photos: _*) In Template: $photos: { photo| <div><img src="$photo.url$_s.jpg" title="$photo.title$"></div> }$ This gives me the following error Class scala.collection.immutable.Map$Map2 has no such attribute: title in template context Thoughts / Ideas ?

    Read the article

  • What's the best practice to "look up" Java Enums?

    - by Marcus
    We have a REST API where clients can supply parameters representing values defined on the server in Java Enums. So we can provide a descriptive error, we add this lookup method to each Enum. Seems like we're just copying code (bad). Is there a better practice? public enum MyEnum { A, B, C, D; public static MyEnum lookup(String id) { try { return MyEnum.valueOf(id); } catch (IllegalArgumentException e) { throw new RuntimeException("Invalid value for my enum blah blah: " + id); } } } Update: The default error message provided by valueOf(..) would be No enum const class a.b.c.MyEnum.BadValue. I would like to provide a more descriptive error from the API.

    Read the article

  • How to ensure that no non-ascii unicode characters are entered ?

    - by Jacques René Mesrine
    Given a java.lang.String instance, I want to verify that it doesn't contain any unicode characters that are not ASCII alphanumerics. e.g. The string should be limited to [A-Za-z0-9.]. What I'm doing now is something very inefficient: import org.apache.commons.lang.CharUtils; String s = ...; char[] ch = s.toCharArray(); for( int i=0; i<ch.length; i++) { if( ! CharUtils.isAsciiAlphanumeric( ch[ i ] ) throw new InvalidInput( ch[i] + " is invalid" ); } Is there a better way to solve this ?

    Read the article

  • Windows Service doesn't start process with different credentials

    - by Marcus
    I have a Windows Service, running as a user, that should start several processes under different user credentials. I'm using the following code to start a process: Dim winProcess As New System.Diagnostics.Process With winProcess .StartInfo.Arguments = "some_args" .StartInfo.CreateNoWindow = True .StartInfo.ErrorDialog = False .StartInfo.FileName = "C:\TEMP\ProcessFromService\ProcessFromService\bin\Debug\ProcessFromService.exe" .StartInfo.UseShellExecute = False .StartInfo.WindowStyle = ProcessWindowStyle.Hidden 'Opgave WorkingDirectory kan soms tot problemen leiden, indien betreffende directory 'niet bereikbaar (rechten) is voor opgegeven gebruiker. 'Beter dus om deze niet op te geven. '.StartInfo.WorkingDirectory = My.Computer.FileSystem.SpecialDirectories.Temp .StartInfo.Domain = "" .StartInfo.UserName = "MyUserId" Dim strPassword As String = "MyPassword" Dim ssPassword As New Security.SecureString For Each chrPassword As Char In strPassword.ToCharArray ssPassword.AppendChar(chrPassword) Next .StartInfo.Password = ssPassword .Start() End With The process is correctly started when I use the same credentials as of which the Windows Service is running under. The process is not started, without any error, when I use different credentials. In other words: If the Windows Service is running as UserA then I can start a process running as UserA. If the Windows Service is running as UserB then I can not start a process running as UserA. I have created a test project in which I can reproduce this problem. If you put this project in C:\Temp then the used paths will be correct. You can download this test project here: https://dl.dropboxusercontent.com/u/5391091/ProcessFromService.zip NB: I hope this info is enough to explain it. If you need more info, please let me know and I will add it.

    Read the article

  • What is the fastest way to learn JPA ?

    - by Jacques René Mesrine
    I'm looking for the best resources (books, frameworks, tutorials) that will help me get up to speed with JPA. I've been happily using iBatis/JDBC for my persistence needs, so I need resources that will hopefully provide comparable functions on how to do things. e.g. how to I set the isolation level for each transaction ? I know there might be 10 books on the topic, so hopefully, your recommendation could narrow down to the best 2 books. Should I start with OpenJPA or are there other opensource JPA frameworks to use ? P.S. Do suggest if I should learn JPA2 or JPA1 ? My goal ultimately is to be able to write a Google App Engine app (which uses JPA1). Thanks Jacque

    Read the article

  • Partitioning requests in code among several servers

    - by Jacques René Mesrine
    I have several forum servers (what they are is irrelevant) which stores posts from users and I want to be able to partition requests among these servers. I'm currently leaning towards partitioning them by geographic location. To improve the locality of data, users will be separated into regions e.g. North America, South America and so on. Is there any design pattern on how to implement the function that maps the partioning property to the server, so that this piece of code has high availability and would not become a single point of failure ? f( Region ) -> Server IP

    Read the article

  • How to show a client-side message with Java JSF/Tobago?

    - by Marcus
    I have a web application created with JSF and Tobago. The user types some date into a sheet and clicks a button (all within one sheet-row). Now my java class checks whether the data is correct or not. In case there are some problems, I would like to show up something like a messagebox containing the errormessage. I cannot use something like JDialog, since this would happen only server side. Every user independently of his location needs to get the message. I thought about setting the error information into a databean and having my jsp show up the message after reloading. But how can I achieve this? Is there something like a tag which can be used for this? Or can I use the "confirmation" facet for this? But how would I start it without having the user to do something? Thanks in advance!

    Read the article

  • Detecting type of webserive in httpmodule

    - by Marcus
    Hi, Is there any way to detect the type of a webservice inside a httpmodule? The reason for this is that I want to do some property injection to the webservice before it's processed. I found this: http://social.msdn.microsoft.com/Forums/en/asmxandxml/thread/0e848eee-d353-4e67-b47f-89fddb600009 but that is one h..l of an ugly solution. Anyone have a nice solution?

    Read the article

  • How to maintain a pool of names ?

    - by Jacques René Mesrine
    I need to maintain a list of userids (proxy accounts) which will be dished out to multithreaded clients. Basically the clients will use the userids to perform actions; but for this question, it is not important what these actions are. When a client gets hold of a userid, it is not available to other clients until the action is completed. I'm trying to think of a concurrent data structure to maintain this pool of userids. Any ideas ? Would a ConcurrentQueue do the job ? Clients will dequeue a userid, and add back the userid when they are finished with it.

    Read the article

  • Allow for modular development while still running in same JVM?

    - by Marcus
    Our current app runs in a single JVM. We are now splitting up the app into separate logical services where each service runs in its own JVM. The split is being done to allow a single service to be modified and deployed without impacting the entire system. This reduces the need to QA the entire system - just need to QA the interaction with the service being changed. For inter service communication we use a combination of REST, an MQ system bus, and database views. What I don't like about this: REST means we have to marshal data to/from XML DB views couple the systems together which defeats the whole concept of separate services MQ / system bus is added complexity There is inevitably some code duplication between services You have set up n JBoss server configurations, we have to do n number of deployments, n number of set up scripts, etc, etc. Is there a better way to structure an internal application to allow modular development and deployment while allowing the app to run in a single JVM (and achieving the associated benefits)?

    Read the article

  • Posting a form with anchor link at the end?

    - by Marcus
    I have a form for comments like the one below but after the form is posted I wish to navigate to http://www.myurl.com/mypage#commentform but I don't know how to do this. Instead of changing my form maybe there is a way to return a View with my model and add #commentform to my url? <div id="commentform"> <h2>Leave a comment</h2> <% using (Html.BeginForm("Comment","Post", FormMethod.Post)) %> <% { %> <div> <%=Html.EditorFor(post => post.Comment) %> <div class="editor-button"> <input type="submit" value="Comment" /> </div> </div> <% } %> </div>

    Read the article

  • How to allow for modular development while still running in same JVM?

    - by Marcus
    Our current app runs in a single JVM. We are now splitting up the app into separate logical services where each service runs in its own JVM. The split is being done to allow a single service to be modified and deployed without impacting the entire system. This reduces the need to QA the entire system - just need to QA the interaction with the service being changed. For interservice communication we use a combination of REST, an MQ system bus, and database views. What I don't like about this: REST means we have to marshal data to/from XML DB views couple the systems together which defeats the whole concept of separate services MQ / system bus is added complexity There is inevitably some code duplication between services You have set up n JBoss server configurations, we have to do n number of deployments, n number of set up scripts, etc, etc. Is there a better way to structure an internal application to allow modular development and deployment while allowing the app to run in a single JVM (and achieving the associated benefits)?

    Read the article

  • Mercurial: Diff current source vs source at point in time

    - by Marcus
    I know how to view all changes in a changeset.. But let's say you update your source, you do a pull and you get 3 new changesets. How can you compare the current state of the remote repository (with the 3 changesets checked in) vs. the current source (on your local machine)? I'd like to do this using the visual diff tool which I currently have configured (Examdiff or Kdiff3).

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >