Search Results

Search found 305 results on 13 pages for 'marcus morris'.

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

  • POST with curl without sending data

    - by Marcus
    Is there a way to use curl to send a POST request without sending any data? We usually post like: curl --data @C:\mydata.txt http://1.2.3.4/myapi If you omit the --data you are doing a GET. How can you omit it and still do a POST?

    Read the article

  • Set property with reflection after Fluent Nhibernates automapping has occured?

    - by Marcus
    I have an abstract baseclass with a collection of details IList that is automapped with fnh. After it has been populated with the correct values i would like to set some properties with reflection on the my class that inherits the abstract baseclass. I have tried to accomplish this in the constructor of my abstract baseclass but obviously my Details collection is empty when the occurs so my question is, what is the recommended way of doing this?

    Read the article

  • Java Non-Blocking HTTP Server

    - by Marcus
    I have written an application using embedded Jetty that makes network calls to other services. I presume that the serving threads are idle whilst waiting for the network calls to complete. Is there any way to have a worker thread that switches between requests to perform work that can be done at the current time and then when the network calls return also handle that? A request would be returned when all work has been completed for it. I know this is a common paradigm, and I have used it for non-blocking TCP networking, but I'm unsure as to how to achieve this on a Java HTTP server whilst also waiting on external results. Any links or explanations are appreciated. Thanks

    Read the article

  • Understanding max JVM heap size

    - by Marcus
    I've read the max heap size on 32bit Windows is ~1.5GB which is due to the fact that the JVM requires contiguous memory. Can someone explain the concept of "contiguous memory" and why you only have max 1.5GB on Windows? Secondly, what then is the max heap size on 64 bit Windows and why is this different than what's available on 32 bit?

    Read the article

  • Hibernate configuration - session factory scanning?

    - by Marcus
    We have this hibernate.cfg.xml file. Is there a way to tell Hibernate to just scan a directory instead of having to add an entry here for each class? <hibernate-configuration> <session-factory> <mapping class="com.abc.domain.model.A" /> <mapping class="com.abc.domain.model.B" /> <mapping class="com.abc.domain.model.C" /> <mapping class="com.abc.domain.model.D" /> <mapping class="com.abc.domain.model.E" /> </session-factory> </hibernate-configuration>

    Read the article

  • How do I shorten the repository URL using svn+ssh similar to svnserve -r?

    - by Marcus
    In the svnbook, it shows you how to shorten the URL to your repositories when using svnserve as a daemon, using -r like: svnserve -d -r /usr/local/repositories That way, you can refer to the repository you need right after the hostname in the URL without revealing any of the local path (which is /usr/local/repositories/project1): svn checkout svn://host.example.com/project1 However, now that I am switching to svn+ssh, I have the local path back in my repository URL: svn checkout svn+ssh://host.example.com/usr/local/repositories/project1 Does anyone know how to hide that local path and use a shorter URL as up above, using svn+ssh and WITHOUT using a UNIX soft link on the svn server? (you still end up with an extra string in the URL if you use a soft link...) UPDATE: The solution to this can be found in the accepted answer over on ServerFault (the green-checked answer). Yay!

    Read the article

  • Setting application affinity in gdb

    - by Marcus Ahlberg
    Is there a simple way of setting the affinity of the application I'm debugging without locking gdb to the same core? The reason why I'm asking is that the application is running with real time priority and it needs to run on a single core. At the moment I use this command line taskset -c 3 gdbserver :1234 ./app.out but the application stops responding and freezes the gdb server, making debugging impossible. I suspect that the real time priority of the application prevents gdb from executing. If I start the application and then start gdb without affinity setting, then I can attach and debug the application without gdb freezing. Is there a simple way to start gdb and the application with different affinities? Or preferably: Is there a gdb command to set affinity of the child process?

    Read the article

  • Starting new transaction 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? Update: Adding that when clients execute go() they do so via a reference to the interface, not the class: @Autowired MyInterface impl; impl.go();

    Read the article

  • Support-function in the GJK-algorithm.

    - by Marcus Johansson
    I am trying to implement the GJK-algorithm but I got stuck instantly. The problem is to implement the Support-function that isn't O(n^2). As it is now I'm computing the complete Minkowski difference, and then there is really no point in doing the GJK-algorithm. (or is it?) What I mean by Support-function is the function that returns the point in the Minkowski difference that is furthest away in a specified direction. I assume this shouldn't be O(n^2) as it is in my current implementation.

    Read the article

  • Open closed prinicple, problem

    - by Marcus
    Hi, I'm trying to apply OCP to a code snippet I have that in it's current state is really smelly, but I feel I'm not getting all the way to the end. Current code: public abstract class SomeObject {} public class SpecificObject1 : SomeObject {} public class SpecificObject2 : SomeObject {} // Smelly code public class Model { public void Store(SomeObject someObject) { if (someObject is SpecificObject1) {} else if (someObject is SpecificObject2) {} } } That is really ugly, my new approach looks like this: // No so smelly code public class Model { public void Store(SomeObject someObject) { throw new Expception("Not allowed!"); } public void Store(SpecificObject1 someObject) {} public void Store(SpecificObject2 someObject) {} } When a new SomeObject type comes along I must implement how that specific object is stored, this will break OCP cause I need to alter the Model-class. To move the store logic to SomeObject also feels wrong cause then I will violate SRP (?), becuase in this case the SomeObject is almost like a DTO, it's resposibility it not how to know to store itself. If a new implementation to SomeObject comes along who's store implementation is missing I will get a runtime error due to exception in Store method in Model class, it also feels like a code smell. This is because calling code will in the form of IEnumerable<SomeObject> sequence; I will not know the specific types of the sequence objects. I can't seem to grasp the OCP-concept. Anyone has any concrete examples or links that is a bit more than just some Car/Fruit example?

    Read the article

  • Diminishing programmer wants to get back to programming

    - by Marcus TV
    I last programmed actively in 2002. It is almost 8 years now. I learned C and then moved to Visual Basic for our thesis project in the university. I would like to ask suggestions on what programming language should I learn and put to profitability use in areas such as desktop applications, web development, and database applications.

    Read the article

  • How to implement a single instance app manager in java (CVM PhoneME)?

    - by Marcus
    Hi, I'm working on a application manager for embeded platform based on the CVM PhoneME VM. The VM is started by a C++ app which configures the CVM and then triggers the VM itself. This C++ app is called form the command line passing the main class name and the classpath of a java application. There is a main java app (lets call it Manager) which loads the app using classloaders. I want this manager to be a single instance application so it could track all running apps. In other words: The first time I start an app (app1 for instance), the VM will launch and the Manager will load the app1. In further calls to load other apps (app2, app3 and so on), the same instance of the Manager would load those apps. The manager is working fine, except for the fact that this is not a single instance. Is it possible to do what I want? I found this: http://www.knowledgesutra.com/forums/topic/59760-how-to-implement-single-instance-application-on-java/ This is almost the same I want, except for the app loading part. However, the necessary packages are not available in the CVM implementation. Thanks very much.

    Read the article

  • Apache Shiro, INI-Configuration, Perms per URL: How to get URL params?

    - by Marcus Schultö
    I want to use Apache Shiro[1] in my JSF-Application to perform URL-based authorization checks, configuration done in shiro.ini As I see in the Shiro-documentation[2] there is a way to use a "perms"-filter /remoting/rpc/** = authc, perms["remote:invoke"] In my scenario I want this functionality, but on entity-level[3], where the entity-Id is in the http-request # "Open settings for user with id=123": # /user/settings.xhtml?user_id=123 /user/settings.xhtml = perms["user:update:XXX"] So, how do I do this with Shiro? How to I tell the perms-filter to check for http-params? Or is this supposed to be done in my Realm-Implemenation, concrete by calling FacesContext? [1] https://shiro.apache.org [2] https://shiro.apache.org/web.html#Web-webini [3] This can be done at least programmatically: SecurityUtils.getSubject().isPermitted("printer:query:lp7200") https://shiro.apache.org/permissions.html

    Read the article

  • Deleting locked files with Java?

    - by Marcus
    We have to delete some directories and their contents using Java running on Windows. I was worried about running into the directory files being locked. We could just invoke Unlocker to do the delete. Or is there a more Java centric way to handle this situation?

    Read the article

  • Select 2 Rows from Table when COUNT of another table

    - by Marcus
    Here is the code that I currently have: SELECT `A`.* FROM `A` LEFT JOIN `B` ON `A`.`A_id` = `B`.`value_1` WHERE `B`.`value_2` IS NULL AND `B`.`userid` IS NULL ORDER BY RAND() LIMIT 2 What it currently is supposed to do is select 2 rows from A when the 2 rows A_id being selected are not in value_1 or value_2 in B. And the rows in B are specific to individual users with userid. What I need to do is make it also so that also checks if there are already N rows in B matching a A_id (either in value_1, or value_2) and userid, and if there are more than N rows, it doesn't select the A row.

    Read the article

  • How to determine the inner context node within an XSLT select

    - by Marcus Rickert
    Hi there! I'm trying to determine a subset of nodes stored in the variable objs by using a user defined function cube:is_active: <xsl:variable name="active_cubes" select="$objs[cube:is_active(XXX) = 'TRUE']"/ Since the function does not allow a local context I'm required to pass it as a parameter (denoted by XXX). However, the usual suspects "." or "current()" do not work since they refer to context node of the surrounding block and NOT to the current element of objs which is evaluated. The only solution so far which DOES work is: XXX=SOME_CHILD_TAG/.. But this is really ugly since it depends on the existence of the child tag for the parent node to work correctly. Is there any other way? Thanks!

    Read the article

  • jquery with php loading file

    - by Marcus Solv
    I'm trying to use jquery with a simple php code: $('#some').click(function() { <?php require_once('some1.php?name="some' + index + '"'); ?> }); It shows no error, so I don't know what is wrong. In some1 I have: <?php //Start session session_start(); //Include database connection details require_once('../sql/config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } //Sanitize the POST values $name = clean($_GET['name']); ?> It's not complete because I want to make a sql command (insert). I want when I click in #some to execute that file (create a entry in the table that isn't define yet).

    Read the article

  • Customizing Bugzilla 4.0.2 Bug ID numbers

    - by Marcus Polk
    Is it possible to customize Bugzilla bug numbers and add a letter designator, to immediately know it came from Bugzilla? My company is evaluating Bugzilla and has now added many new bugs. We also use 2 other bug databases. This wasn't my decision and I believe they were trying to incorporate better reporting, etc. I read an answer here about "seeding" Bugzilla bug numbers, by setting the "AUTO_INCREMENT" field in the "bugs" table to a different value. I wish I would've thought about this sooner and found this board. Setting that value to start at 9000 or some extraordinary value would have ensured that we knew exactly which bugs came from Bugzilla. However, would it be possible to change the field in the "bugs" table to accept letters, as well? Of course that would probably just mess up the whole auto incrementing of the numbers. Any help or advice is greatly appreciated. Thank you.

    Read the article

  • How to capture the event if a new process (application!) is started?

    - by Marcus
    I would like to have some eventhandler which raise if a new application is started. I've heard that this is possible by using a hook but the only examples I can find are based on mouse/keyboard events. What is an example link of how I can create such a hook in C#? Oh and btw: Nope, I don't want to use WMI which could be a solution as well but it's not an option in my case.

    Read the article

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